Merged in fix/3697-prettier-configs (pull request #3396)

fix(SW-3691): Setup one prettier config for whole repo

* Setup prettierrc in root and remove other configs


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
This commit is contained in:
Rasmus Langvad
2026-01-07 12:45:50 +00:00
parent 932413412b
commit d0546926a9
500 changed files with 18367 additions and 18419 deletions

View File

@@ -2,6 +2,6 @@
display: flex;
}
div[data-rac][data-open='true'] .chevron {
div[data-rac][data-open="true"] .chevron {
transform: rotate(180deg);
}

View File

@@ -1,13 +1,13 @@
import { IconProps } from '../../Icons'
import { MaterialIcon } from '../../Icons/MaterialIcon'
import styles from './chevron.module.css'
import { IconProps } from "../../Icons"
import { MaterialIcon } from "../../Icons/MaterialIcon"
import styles from "./chevron.module.css"
export default function SelectChevron(props: IconProps) {
return (
<span aria-hidden="true" className={styles.chevron}>
<MaterialIcon
icon="keyboard_arrow_down"
color={props.color ?? 'Icon/Default'}
color={props.color ?? "Icon/Default"}
size={20}
/>
</span>

View File

@@ -1,5 +1,5 @@
'use client'
import { ReactElement, useState } from 'react'
"use client"
import { ReactElement, useState } from "react"
import {
Button,
type Key,
@@ -8,17 +8,17 @@ import {
Popover,
Select as ReactAriaSelect,
SelectValue,
} from 'react-aria-components'
} from "react-aria-components"
import SelectChevron from './SelectChevron'
import SelectChevron from "./SelectChevron"
import styles from './select.module.css'
import { InputLabel } from '../InputLabel'
import { Typography } from '../Typography'
import styles from "./select.module.css"
import { InputLabel } from "../InputLabel"
import { Typography } from "../Typography"
interface SelectProps extends Omit<
React.SelectHTMLAttributes<HTMLSelectElement>,
'onSelect'
"onSelect"
> {
defaultSelectedKey?: Key
items: { label: string; value: Key }[]
@@ -37,14 +37,14 @@ interface SelectProps extends Omit<
type SelectPortalContainer = HTMLDivElement | undefined
type SelectPortalContainerArgs = HTMLDivElement | null
const DELIMITER = ':'
const DELIMITER = ":"
/**
* @deprecated Do not use.
*/
export default function Select({
className = '',
'aria-label': ariaLabel,
className = "",
"aria-label": ariaLabel,
defaultSelectedKey,
items,
label,
@@ -78,16 +78,16 @@ export default function Select({
let chevronProps = {}
if (discreet) {
chevronProps = { color: 'baseButtonTextOnFillNormal' }
chevronProps = { color: "baseButtonTextOnFillNormal" }
} else if (disabled) {
chevronProps = { color: 'disabled' }
chevronProps = { color: "disabled" }
}
return (
<div className={`${styles.container} ${className}`} ref={setRef}>
<ReactAriaSelect
aria-label={ariaLabel}
className={`${styles.select} ${discreet ? styles.discreet : ''} select-container`}
className={`${styles.select} ${discreet ? styles.discreet : ""} select-container`}
defaultSelectedKey={defaultSelectedKey}
name={name}
onSelectionChange={handleOnSelect}
@@ -105,7 +105,7 @@ export default function Select({
<>
<InputLabel
required={required}
size={discreet ? 'discreet' : 'regular'}
size={discreet ? "discreet" : "regular"}
>
{label}
{discreet && DELIMITER}
@@ -113,7 +113,7 @@ export default function Select({
{selectedText && (
<Typography
variant="Body/Paragraph/mdRegular"
className={optionsIcon ? styles.iconLabel : ''}
className={optionsIcon ? styles.iconLabel : ""}
>
<p>
{optionsIcon ? optionsIcon : null}
@@ -165,9 +165,9 @@ export default function Select({
function useSetOverflowVisibleOnRA(isNestedInModal?: boolean) {
function setOverflowVisible(isOpen: boolean) {
if (isOpen) {
document.body.style.overflow = 'visible'
document.body.style.overflow = "visible"
} else if (!isNestedInModal) {
document.body.style.overflow = ''
document.body.style.overflow = ""
}
}

View File

@@ -10,16 +10,16 @@
gap: var(--Space-x05);
}
.select[data-focused='true'] {
.select[data-focused="true"] {
border: 2px solid var(--Border-Interactive-Focus);
outline: none;
}
.select[data-focused='true'].discreet {
.select[data-focused="true"].discreet {
border: 1px solid transparent;
outline: none;
}
.select[data-focus-visible='true'].discreet {
.select[data-focus-visible="true"].discreet {
border: 2px solid var(--Border-Interactive-Focus);
}
@@ -97,8 +97,8 @@
padding: var(--Space-x1);
}
.listBoxItem[data-focused='true'],
.listBoxItem[data-selected='true'] {
.listBoxItem[data-focused="true"],
.listBoxItem[data-selected="true"] {
background: var(--UI-Input-Controls-Surface-Hover);
border-radius: var(--Corner-radius-md);
outline: none;
@@ -111,7 +111,7 @@
.listBoxItem.showRadioButton:before {
flex-shrink: 0;
content: '';
content: "";
margin-right: var(--Space-x15);
background-color: white;
width: 24px;
@@ -120,6 +120,6 @@
box-shadow: inset 0 0 0 2px var(--Base-Border-Normal);
}
.listBoxItem[data-selected='true'].showRadioButton:before {
.listBoxItem[data-selected="true"].showRadioButton:before {
box-shadow: inset 0 0 0 8px var(--Surface-UI-Fill-Active);
}