@helsenorge/designsystem-react 14.10.0 → 14.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BabyMobileMedium.js +1 -1
- package/lib/CHANGELOG.md +16 -0
- package/lib/Checkbox.js +25 -48
- package/lib/Checkbox.js.map +1 -1
- package/lib/CheckboxMarker.js +60 -0
- package/lib/CheckboxMarker.js.map +1 -0
- package/lib/ChildMedium.js +1 -1
- package/lib/EyeContactMedium.js +79 -0
- package/lib/EyeContactMedium.js.map +1 -0
- package/lib/FacialRecognitionFingerprintMedium.js +1 -1
- package/lib/Filter.js +12 -12
- package/lib/Filter.js.map +1 -1
- package/lib/FormGroup.js +5 -5
- package/lib/FormGroup.js.map +1 -1
- package/lib/GiveBabyFoodMedium.js +1 -1
- package/lib/Illustration.js +1 -1
- package/lib/IllustrationNames.js +4 -0
- package/lib/IllustrationNames.js.map +1 -1
- package/lib/LazyIllustration.js +5 -1
- package/lib/LazyIllustration.js.map +1 -1
- package/lib/Radio.js +73 -0
- package/lib/Radio.js.map +1 -0
- package/lib/RadioButton.js +81 -3
- package/lib/RadioButton.js.map +1 -1
- package/lib/RadioButton2.js +3 -73
- package/lib/RadioButton2.js.map +1 -1
- package/lib/RadioMarker.js +31 -0
- package/lib/RadioMarker.js.map +1 -0
- package/lib/ReadLettersMedium.js +1 -1
- package/lib/Search.js +4 -4
- package/lib/Search.js.map +1 -1
- package/lib/SkinToSkinMedium.js +106 -0
- package/lib/SkinToSkinMedium.js.map +1 -0
- package/lib/StorkMedium.js +1 -1
- package/lib/StrollerMedium.js +1 -1
- package/lib/Support2Medium.js +1 -1
- package/lib/TableBody.js +1 -1
- package/lib/TableHead.js +1 -1
- package/lib/TableRow.js +1 -1
- package/lib/ThinkingMedium.js +1 -1
- package/lib/VisualCheckbox.js +77 -0
- package/lib/VisualCheckbox.js.map +1 -0
- package/lib/VisualRadio.js +62 -0
- package/lib/VisualRadio.js.map +1 -0
- package/lib/__mocks__/matchMedia.js +3 -2
- package/lib/__mocks__/matchMedia.js.map +1 -1
- package/lib/components/Checkbox/CheckboxMarker/CheckboxMarker.d.ts +20 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +309 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss.d.ts +25 -0
- package/lib/components/Checkbox/styles.module.scss +9 -269
- package/lib/components/Checkbox/styles.module.scss.d.ts +1 -17
- package/lib/components/Icons/Sort.js +12 -12
- package/lib/components/Icons/Sort.js.map +1 -1
- package/lib/components/Illustration/index.js +1 -1
- package/lib/components/Illustrations/BabyMobile.js +1 -1
- package/lib/components/Illustrations/Child.js +1 -1
- package/lib/components/Illustrations/Doctor.js +1 -1
- package/lib/components/Illustrations/EyeContact.d.ts +8 -0
- package/lib/components/Illustrations/EyeContact.js +16 -0
- package/lib/components/Illustrations/EyeContact.js.map +1 -0
- package/lib/components/Illustrations/EyeContactMedium.d.ts +3 -0
- package/lib/components/Illustrations/EyeContactMedium.js +2 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
- package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/lib/components/Illustrations/ReadLetters.js +1 -1
- package/lib/components/Illustrations/SkinToSkin.d.ts +8 -0
- package/lib/components/Illustrations/SkinToSkin.js +16 -0
- package/lib/components/Illustrations/SkinToSkin.js.map +1 -0
- package/lib/components/Illustrations/SkinToSkinMedium.d.ts +3 -0
- package/lib/components/Illustrations/SkinToSkinMedium.js +2 -0
- package/lib/components/Illustrations/Stork.js +1 -1
- package/lib/components/Illustrations/Stroller.js +1 -1
- package/lib/components/Illustrations/Support2.js +1 -1
- package/lib/components/Illustrations/Thinking.js +1 -1
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/PanelList/index.js +1 -1
- package/lib/components/RadioButton/RadioMarker/RadioMarker.d.ts +20 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss +288 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss.d.ts +20 -0
- package/lib/components/RadioButton/index.d.ts +0 -1
- package/lib/components/RadioButton/index.js +3 -3
- package/lib/components/RadioButton/styles.module.scss +13 -275
- package/lib/components/RadioButton/styles.module.scss.d.ts +2 -12
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Validation/index.js +1 -1
- package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +5 -128
- package/lib/components/VisualCheckboxCloud/styles.module.scss +2 -9
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualCheckbox.d.ts +26 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualContent.d.ts +10 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js +5 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +7 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts +33 -0
- package/lib/components/VisualCheckboxGroup/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/index.js +43 -0
- package/lib/components/VisualCheckboxGroup/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss +6 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss.d.ts +10 -0
- package/lib/components/{VisualRadioButtonCloud/RadioButton/RadioButton.d.ts → VisualRadioCloud/Radio/Radio.d.ts} +3 -3
- package/lib/components/VisualRadioCloud/Radio/index.d.ts +3 -0
- package/lib/components/VisualRadioCloud/Radio/index.js +5 -0
- package/lib/components/VisualRadioCloud/Radio/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss +7 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss.d.ts +15 -0
- package/lib/components/{VisualRadioButtonCloud/VisualRadioButtonCloud.d.ts → VisualRadioCloud/VisualRadioCloud.d.ts} +8 -8
- package/lib/components/VisualRadioCloud/index.d.ts +3 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/index.js +7 -7
- package/lib/components/VisualRadioCloud/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/styles.module.scss +6 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/styles.module.scss.d.ts +1 -1
- package/lib/components/VisualRadioGroup/VisualRadio/VisualContent.d.ts +10 -0
- package/lib/components/VisualRadioGroup/VisualRadio/VisualRadio.d.ts +26 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js +5 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +7 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualRadioGroup/VisualRadioGroup.d.ts +39 -0
- package/lib/components/VisualRadioGroup/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/index.js +63 -0
- package/lib/components/VisualRadioGroup/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/styles.module.scss +6 -0
- package/lib/components/VisualRadioGroup/styles.module.scss.d.ts +10 -0
- package/lib/resourceHelper.js +10 -6
- package/lib/resourceHelper.js.map +1 -1
- package/lib/resources/HN.Designsystem.Filter.en-GB.json.d.ts +5 -3
- package/lib/resources/HN.Designsystem.Filter.nb-NO.json.d.ts +5 -3
- package/lib/resources/Resources.d.ts +10 -2
- package/lib/scss/_visual-form.scss +357 -0
- package/lib/utils3.js +10 -98
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +28 -11
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +58 -28
- package/lib/utils5.js.map +1 -1
- package/package.json +115 -1
- package/scss/_visual-form.scss +357 -0
- package/lib/components/RadioButton/utils.d.ts +0 -2
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js +0 -5
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss +0 -133
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss.d.ts +0 -15
- package/lib/components/VisualRadioButtonCloud/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/styles.module.scss +0 -13
- package/lib/utils6.js +0 -60
- package/lib/utils6.js.map +0 -1
package/lib/utils5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils5.js","names":[],"sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"utils5.js","names":["clone: Partial<T>"],"sources":["../src/components/Table/utils.ts"],"sourcesContent":["import React from 'react';\n\nimport type { ModeType } from './constants';\nimport type { BreakpointConfig } from './Table';\n\nimport { ResponsiveTableVariant } from './constants';\nimport { Breakpoint } from '../../hooks/useBreakpoint';\nimport { isTouchDevice } from '../../utils/device';\n\nimport styles from './styles.module.scss';\n\n/**\n * Sjekk om det skal brukes CSS for å bestemme responsivt utseende på dette breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns true om breakpoint bruker CSS\n */\nconst configUsesCss = (config: BreakpointConfig): boolean =>\n config.variant === ResponsiveTableVariant.centeredoverflow || config.variant === ResponsiveTableVariant.block;\n\n/**\n * Lag klassenavn for CSS-config\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns CSS-klassenavn\n */\nconst mapConfigToClass = (config: BreakpointConfig): string =>\n config.variant === 'centeredoverflow' || config.variant === 'block' ? styles[`table--${config.variant}-${config.breakpoint}`] : '';\n\n/**\n * Sorter konfigurasjon etter breakpoints, fra største til minste\n * @param a Konfigurasjon for responsiv oppførsel\n * @param b Konfigurasjon for responsiv oppførsel\n * @returns Sortert liste\n */\nconst sortByBreakpointsDescending = (a: BreakpointConfig, b: BreakpointConfig): number =>\n Breakpoint[a.breakpoint] - Breakpoint[b.breakpoint];\n\n/**\n * Sjekk om en konfigurasjon skal brukes for nåværende breakpoint\n * @param a Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns true dersom config skal brukes for breakpointet\n */\nconst isValidForCurrentBreakpoint = (config: BreakpointConfig, breakpoint: Breakpoint): boolean =>\n Breakpoint[config.breakpoint] >= breakpoint;\n\n/**\n * Finn konfigurasjon for nåværende breakpoint\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @returns Konfigurasjon for responsiv oppførsel\n */\nconst getConfigForBreakpoint = (config: BreakpointConfig | BreakpointConfig[], breakpoint: Breakpoint): BreakpointConfig | undefined => {\n if (Array.isArray(config)) {\n config.sort(sortByBreakpointsDescending);\n\n return config.find(x => isValidForCurrentBreakpoint(x, breakpoint));\n } else if (config && isValidForCurrentBreakpoint(config, breakpoint)) {\n return config;\n }\n};\n\n/**\n * Finn konfigurasjon for nåværende breakpoint og tabellbredde\n * @param config Konfigurasjon for responsiv oppførsel\n * @param breakpoint Nåværende breakpoint\n * @param tableWidth Bredde på tabell i px\n * @returns Konfigurasjon for responsiv oppførsel uten fallbackVariant\n */\nexport const getCurrentConfig = (\n config: BreakpointConfig | BreakpointConfig[],\n breakpoint: Breakpoint,\n tableWidth: number,\n windowWidth: number\n): Omit<BreakpointConfig, 'fallbackVariant'> | undefined => {\n const breakpointConfig = getConfigForBreakpoint(config, breakpoint);\n const canUseHorizontalScroll = isTouchDevice();\n const canUseCenteredOverflow = tableWidth <= windowWidth;\n\n if (!breakpointConfig) {\n return;\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: canUseHorizontalScroll ? ResponsiveTableVariant.horizontalscroll : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.centeredoverflow &&\n !canUseCenteredOverflow &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant === ResponsiveTableVariant.centeredoverflow\n ) {\n return {\n variant: canUseCenteredOverflow ? ResponsiveTableVariant.centeredoverflow : ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n if (\n breakpointConfig.variant === ResponsiveTableVariant.horizontalscroll &&\n !canUseHorizontalScroll &&\n breakpointConfig.fallbackVariant !== ResponsiveTableVariant.horizontalscroll\n ) {\n return {\n variant: breakpointConfig.fallbackVariant ?? ResponsiveTableVariant.none,\n breakpoint: breakpointConfig.breakpoint,\n };\n }\n\n return breakpointConfig;\n};\n\n/**\n * Finn klassenavn for responsiv oppførsel\n * @param config Konfigurasjon for responsiv oppførsel\n * @returns Klassenavn\n */\nexport const getBreakpointClass = (config?: BreakpointConfig): string | undefined =>\n config && configUsesCss(config) ? mapConfigToClass(config) : undefined;\n\n/**\n * Finn riktig posisjon for horisontal sentrering av tabell som skal vises \"centeredoverflow\"\n * @param parentWidth Bredde på element som tabellen ligger i\n * @param tableWidth Bredde på tabellen\n * @returns Styling som posisjonerer tabellen riktig\n */\nexport const getCenteredOverflowTableStyle = (parentWidth: number, tableWidth: number): React.CSSProperties | undefined => {\n if (parentWidth >= tableWidth) {\n return;\n }\n\n const COLUMN_GUTTER_WIDTH_PX = 8;\n\n return { left: `${(parentWidth - tableWidth) / 2 - COLUMN_GUTTER_WIDTH_PX}px` };\n};\n\n/**\n * Map children and inject the `mode` prop into element children, but never on React.Fragment.\n * If a Fragment is encountered, its children are mapped and updated, while the Fragment wrapper is preserved.\n */\nexport const mapChildrenWithMode = (children: React.ReactNode, mode: ModeType | undefined): React.ReactNode =>\n React.Children.map(children, child => {\n if (!React.isValidElement(child)) return child;\n if (child.type === React.Fragment) {\n const fragmentChildren = (child.props as { children?: React.ReactNode }).children;\n const mapped = React.Children.map(fragmentChildren, gc =>\n React.isValidElement<{ mode?: ModeType }>(gc) ? React.cloneElement(gc, { mode }) : gc\n );\n return React.cloneElement(child, undefined, mapped);\n }\n return React.cloneElement(child as React.ReactElement<{ mode?: ModeType }>, { mode });\n });\n\n/**\n * Create a shallow copy of an object with specific keys omitted.\n */\nexport const omitProps = <T extends Record<PropertyKey, unknown>>(obj: T, keys: Array<keyof T>): Partial<T> => {\n const clone: Partial<T> = { ...obj };\n for (const k of keys) {\n delete clone[k];\n }\n return clone;\n};\n"],"mappings":";;;;;AAgBA,IAAM,iBAAiB,WACrB,OAAO,YAAY,uBAAuB,oBAAoB,OAAO,YAAY,uBAAuB;AAO1G,IAAM,oBAAoB,WACxB,OAAO,YAAY,sBAAsB,OAAO,YAAY,UAAU,YAAO,UAAU,OAAO,QAAQ,GAAG,OAAO,gBAAgB;AAQlI,IAAM,+BAA+B,GAAqB,MACxD,WAAW,EAAE,cAAc,WAAW,EAAE;AAQ1C,IAAM,+BAA+B,QAA0B,eAC7D,WAAW,OAAO,eAAe;AAQnC,IAAM,0BAA0B,QAA+C,eAAyD;AACtI,KAAI,MAAM,QAAQ,OAAO,EAAE;AACzB,SAAO,KAAK,4BAA4B;AAExC,SAAO,OAAO,MAAK,MAAK,4BAA4B,GAAG,WAAW,CAAC;YAC1D,UAAU,4BAA4B,QAAQ,WAAW,CAClE,QAAO;;AAWX,MAAa,oBACX,QACA,YACA,YACA,gBAC0D;CAC1D,MAAM,mBAAmB,uBAAuB,QAAQ,WAAW;CACnE,MAAM,yBAAyB,eAAe;CAC9C,MAAM,yBAAyB,cAAc;AAE7C,KAAI,CAAC,iBACH;AAGF,KACE,iBAAiB,YAAY,uBAAuB,oBACpD,CAAC,0BACD,iBAAiB,oBAAoB,uBAAuB,iBAE5D,QAAO;EACL,SAAS,yBAAyB,uBAAuB,mBAAmB,uBAAuB;EACnG,YAAY,iBAAiB;EAC9B;AAGH,KACE,iBAAiB,YAAY,uBAAuB,oBACpD,CAAC,0BACD,iBAAiB,oBAAoB,uBAAuB,iBAE5D,QAAO;EACL,SAAS,iBAAiB,mBAAmB,uBAAuB;EACpE,YAAY,iBAAiB;EAC9B;AAGH,KACE,iBAAiB,YAAY,uBAAuB,oBACpD,CAAC,0BACD,iBAAiB,oBAAoB,uBAAuB,iBAE5D,QAAO;EACL,SAAS,yBAAyB,uBAAuB,mBAAmB,uBAAuB;EACnG,YAAY,iBAAiB;EAC9B;AAGH,KACE,iBAAiB,YAAY,uBAAuB,oBACpD,CAAC,0BACD,iBAAiB,oBAAoB,uBAAuB,iBAE5D,QAAO;EACL,SAAS,iBAAiB,mBAAmB,uBAAuB;EACpE,YAAY,iBAAiB;EAC9B;AAGH,QAAO;;AAQT,MAAa,sBAAsB,WACjC,UAAU,cAAc,OAAO,GAAG,iBAAiB,OAAO,GAAG,KAAA;AAQ/D,MAAa,iCAAiC,aAAqB,eAAwD;AACzH,KAAI,eAAe,WACjB;AAKF,QAAO,EAAE,MAAM,IAAI,cAAc,cAAc,IAFhB,EAE2C,KAAK;;AAOjF,MAAa,uBAAuB,UAA2B,SAC7D,MAAM,SAAS,IAAI,WAAU,UAAS;AACpC,KAAI,CAAC,MAAM,eAAe,MAAM,CAAE,QAAO;AACzC,KAAI,MAAM,SAAS,MAAM,UAAU;EACjC,MAAM,mBAAoB,MAAM,MAAyC;EACzE,MAAM,SAAS,MAAM,SAAS,IAAI,mBAAkB,OAClD,MAAM,eAAoC,GAAG,GAAG,MAAM,aAAa,IAAI,EAAE,MAAM,CAAC,GAAG,GACpF;AACD,SAAO,MAAM,aAAa,OAAO,KAAA,GAAW,OAAO;;AAErD,QAAO,MAAM,aAAa,OAAkD,EAAE,MAAM,CAAC;EACrF;AAKJ,MAAa,aAAqD,KAAQ,SAAqC;CAC7G,MAAMA,QAAoB,EAAE,GAAG,KAAK;AACpC,MAAK,MAAM,KAAK,KACd,QAAO,MAAM;AAEf,QAAO"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@helsenorge/designsystem-react",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "14.
|
|
5
|
+
"version": "14.11.1",
|
|
6
6
|
"description": "The official design system for Helsenorge built with React.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -732,6 +732,120 @@
|
|
|
732
732
|
},
|
|
733
733
|
"./components/Validation/types": {
|
|
734
734
|
"types": "./lib/components/Validation/types.d.ts"
|
|
735
|
+
},
|
|
736
|
+
"./components/Avatar/constants": {
|
|
737
|
+
"types": "./lib/components/Avatar/constants.d.ts"
|
|
738
|
+
},
|
|
739
|
+
"./components/Chip/resourceHelper": {
|
|
740
|
+
"types": "./lib/components/Chip/resourceHelper.d.ts"
|
|
741
|
+
},
|
|
742
|
+
"./components/DropdownOld/constants": {
|
|
743
|
+
"types": "./lib/components/DropdownOld/constants.d.ts"
|
|
744
|
+
},
|
|
745
|
+
"./components/ElementHeader/utils": {
|
|
746
|
+
"types": "./lib/components/ElementHeader/utils.d.ts"
|
|
747
|
+
},
|
|
748
|
+
"./components/EmptyState/constants": {
|
|
749
|
+
"types": "./lib/components/EmptyState/constants.d.ts"
|
|
750
|
+
},
|
|
751
|
+
"./components/Expander/constants": {
|
|
752
|
+
"types": "./lib/components/Expander/constants.d.ts"
|
|
753
|
+
},
|
|
754
|
+
"./components/Filter/resourceHelper": {
|
|
755
|
+
"types": "./lib/components/Filter/resourceHelper.d.ts"
|
|
756
|
+
},
|
|
757
|
+
"./components/Filter/resourcesMock": {
|
|
758
|
+
"types": "./lib/components/Filter/resourcesMock.d.ts"
|
|
759
|
+
},
|
|
760
|
+
"./components/Filter/useFilter": {
|
|
761
|
+
"types": "./lib/components/Filter/useFilter.d.ts"
|
|
762
|
+
},
|
|
763
|
+
"./components/Filter/useFilterDrawer": {
|
|
764
|
+
"types": "./lib/components/Filter/useFilterDrawer.d.ts"
|
|
765
|
+
},
|
|
766
|
+
"./components/Filter/utils": {
|
|
767
|
+
"types": "./lib/components/Filter/utils.d.ts"
|
|
768
|
+
},
|
|
769
|
+
"./components/FormLayout/constants": {
|
|
770
|
+
"types": "./lib/components/FormLayout/constants.d.ts"
|
|
771
|
+
},
|
|
772
|
+
"./components/Icon/utils": {
|
|
773
|
+
"types": "./lib/components/Icon/utils.d.ts"
|
|
774
|
+
},
|
|
775
|
+
"./components/Input/constants": {
|
|
776
|
+
"types": "./lib/components/Input/constants.d.ts"
|
|
777
|
+
},
|
|
778
|
+
"./components/Input/resourceHelper": {
|
|
779
|
+
"types": "./lib/components/Input/resourceHelper.d.ts"
|
|
780
|
+
},
|
|
781
|
+
"./components/Label/utils": {
|
|
782
|
+
"types": "./lib/components/Label/utils.d.ts"
|
|
783
|
+
},
|
|
784
|
+
"./components/LinkList/resourceHelper": {
|
|
785
|
+
"types": "./lib/components/LinkList/resourceHelper.d.ts"
|
|
786
|
+
},
|
|
787
|
+
"./components/ListEditMode/constants": {
|
|
788
|
+
"types": "./lib/components/ListEditMode/constants.d.ts"
|
|
789
|
+
},
|
|
790
|
+
"./components/Loader/constants": {
|
|
791
|
+
"types": "./lib/components/Loader/constants.d.ts"
|
|
792
|
+
},
|
|
793
|
+
"./components/Modal/constants": {
|
|
794
|
+
"types": "./lib/components/Modal/constants.d.ts"
|
|
795
|
+
},
|
|
796
|
+
"./components/Panel/constants": {
|
|
797
|
+
"types": "./lib/components/Panel/constants.d.ts"
|
|
798
|
+
},
|
|
799
|
+
"./components/PanelList/utils": {
|
|
800
|
+
"types": "./lib/components/PanelList/utils.d.ts"
|
|
801
|
+
},
|
|
802
|
+
"./components/PopMenu/constants": {
|
|
803
|
+
"types": "./lib/components/PopMenu/constants.d.ts"
|
|
804
|
+
},
|
|
805
|
+
"./components/Progressbar/constants": {
|
|
806
|
+
"types": "./lib/components/Progressbar/constants.d.ts"
|
|
807
|
+
},
|
|
808
|
+
"./components/StatusDot/constants": {
|
|
809
|
+
"types": "./lib/components/StatusDot/constants.d.ts"
|
|
810
|
+
},
|
|
811
|
+
"./components/Table/constants": {
|
|
812
|
+
"types": "./lib/components/Table/constants.d.ts"
|
|
813
|
+
},
|
|
814
|
+
"./components/Tag/constants": {
|
|
815
|
+
"types": "./lib/components/Tag/constants.d.ts"
|
|
816
|
+
},
|
|
817
|
+
"./components/Textarea/resourceHelper": {
|
|
818
|
+
"types": "./lib/components/Textarea/resourceHelper.d.ts"
|
|
819
|
+
},
|
|
820
|
+
"./components/Title/utils": {
|
|
821
|
+
"types": "./lib/components/Title/utils.d.ts"
|
|
822
|
+
},
|
|
823
|
+
"./components/Toggle/constants": {
|
|
824
|
+
"types": "./lib/components/Toggle/constants.d.ts"
|
|
825
|
+
},
|
|
826
|
+
"./components/VisualCheckboxCloud/VisualCheckboxCloud": {
|
|
827
|
+
"types": "./lib/components/VisualCheckboxCloud/VisualCheckboxCloud.d.ts",
|
|
828
|
+
"import": "./lib/components/VisualCheckboxCloud/index.js",
|
|
829
|
+
"require": "./lib/components/VisualCheckboxCloud/index.js",
|
|
830
|
+
"default": "./lib/components/VisualCheckboxCloud/index.js"
|
|
831
|
+
},
|
|
832
|
+
"./components/VisualCheckboxGroup/VisualCheckboxGroup": {
|
|
833
|
+
"types": "./lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts",
|
|
834
|
+
"import": "./lib/components/VisualCheckboxGroup/index.js",
|
|
835
|
+
"require": "./lib/components/VisualCheckboxGroup/index.js",
|
|
836
|
+
"default": "./lib/components/VisualCheckboxGroup/index.js"
|
|
837
|
+
},
|
|
838
|
+
"./components/VisualRadioCloud/VisualRadioCloud": {
|
|
839
|
+
"types": "./lib/components/VisualRadioCloud/VisualRadioCloud.d.ts",
|
|
840
|
+
"import": "./lib/components/VisualRadioCloud/index.js",
|
|
841
|
+
"require": "./lib/components/VisualRadioCloud/index.js",
|
|
842
|
+
"default": "./lib/components/VisualRadioCloud/index.js"
|
|
843
|
+
},
|
|
844
|
+
"./components/VisualRadioGroup/VisualRadioGroup": {
|
|
845
|
+
"types": "./lib/components/VisualRadioGroup/VisualRadioGroup.d.ts",
|
|
846
|
+
"import": "./lib/components/VisualRadioGroup/index.js",
|
|
847
|
+
"require": "./lib/components/VisualRadioGroup/index.js",
|
|
848
|
+
"default": "./lib/components/VisualRadioGroup/index.js"
|
|
735
849
|
}
|
|
736
850
|
},
|
|
737
851
|
"scripts": {
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'breakpoints' as breakpoints;
|
|
3
|
+
@use 'font-mixins' as fonts;
|
|
4
|
+
|
|
5
|
+
// Wrapper layout shared by VisualCheckboxCloud and VisualRadioCloud
|
|
6
|
+
@mixin visual-form-cloud {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-flow: row wrap;
|
|
9
|
+
gap: var(--core-space-4xs) var(--core-space-xs);
|
|
10
|
+
|
|
11
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
12
|
+
gap: var(--core-space-m) var(--core-space-s);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Pill-style input shared by VisualCheckboxCloud/Checkbox and VisualRadioCloud/Radio
|
|
17
|
+
@mixin visual-form-pill(
|
|
18
|
+
$pill-padding-mobile: var(--core-space-3xs) var(--core-space-m),
|
|
19
|
+
$checked-pill-padding-md: var(--core-space-3xs) var(--core-space-m) var(--core-space-3xs) 1.25rem
|
|
20
|
+
) {
|
|
21
|
+
position: relative;
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: stretch;
|
|
24
|
+
min-height: 2.75rem;
|
|
25
|
+
padding: 0.313rem 0;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
|
|
28
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__input {
|
|
33
|
+
// Hides input while making sure screen reader outline wraps the entire component
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
position: absolute;
|
|
36
|
+
z-index: 0;
|
|
37
|
+
inset: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
outline: none;
|
|
41
|
+
appearance: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__pill {
|
|
45
|
+
position: relative;
|
|
46
|
+
z-index: 1;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--core-space-2xs);
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
min-height: var(--core-space-l);
|
|
52
|
+
padding: $pill-padding-mobile;
|
|
53
|
+
border-radius: 100px;
|
|
54
|
+
background-color: var(--color-action-background-ondark);
|
|
55
|
+
border: 1px solid var(--color-action-border-onlight);
|
|
56
|
+
color: var(--color-base-text-onlight);
|
|
57
|
+
|
|
58
|
+
@include fonts.title6;
|
|
59
|
+
|
|
60
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
61
|
+
min-height: var(--core-space-xl);
|
|
62
|
+
padding: var(--core-space-3xs) var(--core-space-l);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:hover &__pill {
|
|
67
|
+
background-color: var(--color-action-background-ondark-hover);
|
|
68
|
+
border-color: var(--color-action-border-onlight-hover);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:active &__pill {
|
|
72
|
+
background-color: var(--color-action-background-ondark-selected);
|
|
73
|
+
border-color: var(--color-action-border-onlight-hover);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&--checked &__pill,
|
|
77
|
+
&:has(input:checked) &__pill {
|
|
78
|
+
background-color: var(--color-action-background-onlight);
|
|
79
|
+
color: var(--color-action-text-ondark);
|
|
80
|
+
border-color: var(--color-action-background-onlight);
|
|
81
|
+
padding: var(--core-space-3xs) var(--core-space-s);
|
|
82
|
+
|
|
83
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
84
|
+
padding: $checked-pill-padding-md;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--checked:hover &__pill,
|
|
89
|
+
&:has(input:checked):hover &__pill {
|
|
90
|
+
background-color: var(--color-action-graphics-onlight-hover);
|
|
91
|
+
border-color: var(--color-action-graphics-onlight-hover);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&--checked:active &__pill,
|
|
95
|
+
&:has(input:checked):active &__pill {
|
|
96
|
+
background-color: var(--color-action-background-onlight-active);
|
|
97
|
+
border-color: var(--color-action-background-onlight-active);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--invalid &__pill {
|
|
101
|
+
background-color: var(--color-action-background-ondark);
|
|
102
|
+
border-color: var(--color-destructive-border-normal);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--invalid:hover &__pill {
|
|
106
|
+
background-color: var(--color-destructive-background-normal);
|
|
107
|
+
border-color: var(--color-destructive-border-normal);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&--invalid:active &__pill {
|
|
111
|
+
background-color: var(--color-destructive-background-emphasized);
|
|
112
|
+
border-color: var(--color-destructive-border-normal);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&--invalid#{&}--checked &__pill,
|
|
116
|
+
&--invalid:has(input:checked) &__pill {
|
|
117
|
+
background-color: var(--color-destructive-graphics-normal);
|
|
118
|
+
border-color: var(--color-destructive-graphics-normal);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--invalid#{&}--checked:hover &__pill,
|
|
122
|
+
&--invalid:has(input:checked):hover &__pill {
|
|
123
|
+
background-color: var(--color-destructive-graphics-hover);
|
|
124
|
+
border-color: var(--color-destructive-graphics-hover);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&--invalid#{&}--checked:active &__pill,
|
|
128
|
+
&--invalid:has(input:checked):active &__pill {
|
|
129
|
+
background-color: var(--color-destructive-graphics-emphasized-onlight);
|
|
130
|
+
border-color: var(--color-destructive-graphics-emphasized-onlight);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__input:focus-visible + &__pill {
|
|
134
|
+
outline: 3px solid var(--color-action-border-onlight-focus);
|
|
135
|
+
border-color: var(--color-action-border-ondark);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&__icon {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
|
|
143
|
+
svg {
|
|
144
|
+
fill: var(--color-action-graphics-ondark);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&__label {
|
|
149
|
+
text-box: trim-both cap alphabetic;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Grid layout shared by VisualCheckboxGroup and VisualRadioGroup.
|
|
154
|
+
@mixin visual-form-group {
|
|
155
|
+
display: grid;
|
|
156
|
+
grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
|
|
157
|
+
gap: var(--core-space-xs);
|
|
158
|
+
|
|
159
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
160
|
+
gap: 0.75rem var(--core-space-xs, 0.75rem);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&--variant-line {
|
|
164
|
+
grid-template-columns: 1fr;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Styling shared by VisualCheckbox and VisualRadio
|
|
169
|
+
@mixin visual-form-card {
|
|
170
|
+
display: flex;
|
|
171
|
+
position: relative;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
width: 100%;
|
|
174
|
+
|
|
175
|
+
&--variant-line {
|
|
176
|
+
flex-direction: row;
|
|
177
|
+
justify-content: flex-start;
|
|
178
|
+
align-items: center;
|
|
179
|
+
min-height: 6rem;
|
|
180
|
+
min-width: 15.125rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&--variant-rectangle {
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
align-items: center;
|
|
186
|
+
min-height: 12.625rem;
|
|
187
|
+
min-width: 8.75rem;
|
|
188
|
+
height: 100%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__input {
|
|
192
|
+
// Hides input while making sure screen reader outline wraps the entire component
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
position: absolute;
|
|
195
|
+
z-index: 0;
|
|
196
|
+
inset: 0;
|
|
197
|
+
width: 100%;
|
|
198
|
+
height: 100%;
|
|
199
|
+
outline: none;
|
|
200
|
+
appearance: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&__frame {
|
|
204
|
+
position: relative;
|
|
205
|
+
width: 100%;
|
|
206
|
+
z-index: 1;
|
|
207
|
+
display: inline-flex;
|
|
208
|
+
border-radius: 4px;
|
|
209
|
+
background: var(--color-action-background-ondark);
|
|
210
|
+
border: 2px solid var(--color-action-border-onlight);
|
|
211
|
+
color: var(--color-base-text-onlight);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&--variant-line &__frame {
|
|
215
|
+
margin-left: -2.87rem;
|
|
216
|
+
gap: var(--core-space-2xs);
|
|
217
|
+
flex-direction: row;
|
|
218
|
+
justify-content: flex-end;
|
|
219
|
+
align-items: center;
|
|
220
|
+
min-height: 4.63rem;
|
|
221
|
+
min-width: 12.25rem;
|
|
222
|
+
padding: var(--core-space-s) var(--core-space-m) var(--core-space-s) var(--core-space-2xl);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&--variant-rectangle &__frame {
|
|
226
|
+
margin-top: -4.37rem;
|
|
227
|
+
flex: 1;
|
|
228
|
+
gap: var(--core-space-xs);
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
align-items: center;
|
|
231
|
+
justify-content: flex-end;
|
|
232
|
+
text-align: center;
|
|
233
|
+
min-width: 8.75rem;
|
|
234
|
+
min-height: 10.25rem;
|
|
235
|
+
padding: var(--core-space-3xl) var(--core-space-xs) var(--core-space-m) var(--core-space-xs);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&__visual-content {
|
|
239
|
+
position: relative;
|
|
240
|
+
z-index: 2;
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
justify-content: center;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
border-radius: 100%;
|
|
246
|
+
background: var(--color-action-background-ondark);
|
|
247
|
+
border: 2px solid var(--color-action-border-ondark);
|
|
248
|
+
|
|
249
|
+
> * {
|
|
250
|
+
width: 100%;
|
|
251
|
+
height: 100%;
|
|
252
|
+
object-fit: cover;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&--variant-line &__visual-content {
|
|
257
|
+
min-width: var(--core-space-4xl);
|
|
258
|
+
min-height: var(--core-space-4xl);
|
|
259
|
+
|
|
260
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
261
|
+
min-width: var(--core-space-5xl);
|
|
262
|
+
min-height: var(--core-space-5xl);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&--variant-rectangle &__visual-content {
|
|
267
|
+
flex-shrink: 0;
|
|
268
|
+
width: calc(100% - 2rem);
|
|
269
|
+
min-width: 6.75rem;
|
|
270
|
+
max-width: 13rem;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&--checked &__frame,
|
|
274
|
+
&:has(input:checked) &__frame {
|
|
275
|
+
background: var(--color-action-background-onlight);
|
|
276
|
+
color: var(--color-action-text-ondark);
|
|
277
|
+
border-color: var(--color-action-background-onlight);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&--invalid &__frame {
|
|
281
|
+
background: var(--color-action-background-ondark);
|
|
282
|
+
border-color: var(--core-color-cherry-500);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&:hover &__frame {
|
|
286
|
+
background: var(--core-color-neutral-50);
|
|
287
|
+
border-color: var(--color-action-border-onlight-hover);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:active &__frame {
|
|
291
|
+
background: var(--core-color-neutral-100);
|
|
292
|
+
border-color: var(--color-action-border-onlight-hover);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&--checked:hover &__frame,
|
|
296
|
+
&:has(input:checked):hover &__frame {
|
|
297
|
+
background: var(--color-action-background-onlight-hover);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&--checked:active &__frame,
|
|
301
|
+
&:has(input:checked):active &__frame {
|
|
302
|
+
background: var(--color-action-background-onlight-active);
|
|
303
|
+
border-color: var(--color-action-background-onlight-active);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&--invalid:hover &__frame {
|
|
307
|
+
background: var(--core-color-cherry-50);
|
|
308
|
+
border-color: var(--core-color-cherry-500);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
&--invalid:active &__frame {
|
|
312
|
+
background: var(--core-color-cherry-100);
|
|
313
|
+
border-color: var(--core-color-cherry-500);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
&--invalid#{&}--checked &__frame,
|
|
317
|
+
&--invalid:has(input:checked) &__frame {
|
|
318
|
+
background: var(--core-color-cherry-50);
|
|
319
|
+
color: var(--color-base-text-onlight);
|
|
320
|
+
border-color: var(--core-color-cherry-500);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&--invalid#{&}--checked:hover &__frame,
|
|
324
|
+
&--invalid:has(input:checked):hover &__frame {
|
|
325
|
+
background: var(--core-color-cherry-100);
|
|
326
|
+
border-color: var(--core-color-cherry-500);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&--invalid#{&}--checked:active &__frame,
|
|
330
|
+
&--invalid:has(input:checked):active &__frame {
|
|
331
|
+
background: var(--core-color-cherry-200);
|
|
332
|
+
border-color: var(--core-color-cherry-500);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&__input:focus-visible + &__frame {
|
|
336
|
+
outline: 4px solid var(--color-action-border-onlight-focus);
|
|
337
|
+
border-color: var(--color-action-border-ondark);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&__icon {
|
|
341
|
+
display: inline-flex;
|
|
342
|
+
align-items: center;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
|
|
345
|
+
svg {
|
|
346
|
+
fill: var(--color-action-graphics-ondark);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&__label {
|
|
351
|
+
flex: 1;
|
|
352
|
+
min-width: 0;
|
|
353
|
+
overflow-wrap: anywhere;
|
|
354
|
+
|
|
355
|
+
@include fonts.label-subdued;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/VisualRadioButtonCloud/RadioButton/index.ts"],"sourcesContent":["import RadioButton from './RadioButton';\nexport * from './RadioButton';\nexport default RadioButton;\n"],"mappings":";AAEA,IAAA,sBAAe"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use '../../../scss/screen-reader' as *;
|
|
3
|
-
@use '../../../scss/breakpoints' as breakpoints;
|
|
4
|
-
@use '../../../scss/font-mixins' as fonts;
|
|
5
|
-
@import '../../../scss/supernova/styles/colors.css';
|
|
6
|
-
@import '../../../scss/supernova/styles/spacers.css';
|
|
7
|
-
|
|
8
|
-
.visual-radio-button {
|
|
9
|
-
position: relative;
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: stretch;
|
|
12
|
-
min-height: 2.75rem;
|
|
13
|
-
padding: 0.313rem 0;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
|
|
16
|
-
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
17
|
-
padding: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&__input {
|
|
21
|
-
// Hides input while making sure screen reader outline wraps the entire component
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
position: absolute;
|
|
24
|
-
z-index: 0;
|
|
25
|
-
inset: 0;
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
outline: none;
|
|
29
|
-
appearance: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&__pill {
|
|
33
|
-
position: relative;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: var(--core-space-2xs);
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
min-height: var(--core-space-l);
|
|
40
|
-
padding: var(--core-space-3xs) var(--core-space-m);
|
|
41
|
-
border-radius: 100px;
|
|
42
|
-
background-color: var(--color-action-background-ondark);
|
|
43
|
-
border: 1px solid var(--color-action-border-onlight);
|
|
44
|
-
color: var(--color-base-text-onlight);
|
|
45
|
-
|
|
46
|
-
@include fonts.title6;
|
|
47
|
-
|
|
48
|
-
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
49
|
-
min-height: var(--core-space-xl);
|
|
50
|
-
padding: var(--core-space-3xs) var(--core-space-l);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:hover &__pill {
|
|
55
|
-
background-color: var(--color-action-background-ondark-hover);
|
|
56
|
-
border-color: var(--color-action-border-onlight-hover);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:active &__pill {
|
|
60
|
-
background-color: var(--color-action-background-ondark-selected);
|
|
61
|
-
border-color: var(--color-action-border-onlight-hover);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&--checked &__pill {
|
|
65
|
-
background-color: var(--color-action-background-onlight);
|
|
66
|
-
color: var(--color-action-text-ondark);
|
|
67
|
-
border-color: var(--color-action-background-onlight);
|
|
68
|
-
padding: var(--core-space-3xs) var(--core-space-s);
|
|
69
|
-
|
|
70
|
-
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
71
|
-
padding: var(--core-space-3xs) var(--core-space-m) var(--core-space-3xs) 1.25rem;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&--checked:hover &__pill {
|
|
76
|
-
background-color: var(--color-action-graphics-onlight-hover);
|
|
77
|
-
border-color: var(--color-action-graphics-onlight-hover);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&--checked:active &__pill {
|
|
81
|
-
background-color: var(--color-action-background-onlight-active);
|
|
82
|
-
border-color: var(--color-action-background-onlight-active);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&--invalid &__pill {
|
|
86
|
-
background-color: var(--color-action-background-ondark);
|
|
87
|
-
border-color: var(--color-destructive-border-normal);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&--invalid:hover &__pill {
|
|
91
|
-
background-color: var(--color-destructive-background-normal);
|
|
92
|
-
border-color: var(--color-destructive-border-normal);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&--invalid:active &__pill {
|
|
96
|
-
background-color: var(--color-destructive-background-emphasized);
|
|
97
|
-
border-color: var(--color-destructive-border-normal);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&--invalid#{&}--checked &__pill {
|
|
101
|
-
background-color: var(--color-destructive-graphics-normal);
|
|
102
|
-
border-color: var(--color-destructive-graphics-normal);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&--invalid#{&}--checked:hover &__pill {
|
|
106
|
-
background-color: var(--color-destructive-graphics-hover);
|
|
107
|
-
border-color: var(--color-destructive-graphics-hover);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&--invalid#{&}--checked:active &__pill {
|
|
111
|
-
background-color: var(--color-destructive-graphics-emphasized-onlight);
|
|
112
|
-
border-color: var(--color-destructive-graphics-emphasized-onlight);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&__input:focus-visible + &__pill {
|
|
116
|
-
outline: 3px solid var(--color-action-border-onlight-focus);
|
|
117
|
-
border-color: var(--color-action-border-ondark);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&__icon {
|
|
121
|
-
display: inline-flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
|
|
125
|
-
svg {
|
|
126
|
-
fill: var(--color-action-graphics-ondark);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&__label {
|
|
131
|
-
text-box: trim-both cap alphabetic;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type Styles = {
|
|
2
|
-
'visual-radio-button': string;
|
|
3
|
-
'visual-radio-button__icon': string;
|
|
4
|
-
'visual-radio-button__input': string;
|
|
5
|
-
'visual-radio-button__label': string;
|
|
6
|
-
'visual-radio-button__pill': string;
|
|
7
|
-
'visual-radio-button--checked': string;
|
|
8
|
-
'visual-radio-button--invalid': string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export type ClassNames = keyof Styles;
|
|
12
|
-
|
|
13
|
-
declare const styles: Styles;
|
|
14
|
-
|
|
15
|
-
export default styles;
|