@nldd/design-system 0.9.0 → 0.10.0
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/custom-elements.json +139 -19
- package/dist/assets/styles/breakpoints.d.ts +32 -0
- package/dist/assets/styles/breakpoints.d.ts.map +1 -1
- package/dist/assets/styles/breakpoints.js +36 -0
- package/dist/assets/styles/breakpoints.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +2 -2
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.js +2 -2
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/menu/menu.styles.js +2 -2
- package/dist/components/breakpoints-Bpf2MgjM.js +39 -0
- package/dist/components/components.js +440 -457
- package/dist/components/content/blockquote/blockquote.styles.js +2 -2
- package/dist/components/content/blockquote/blockquote.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +3 -3
- package/dist/components/content/identity/identity.styles.js +2 -2
- package/dist/components/content/identity/identity.styles.js.map +1 -1
- package/dist/components/content/image/image.styles.js +1 -1
- package/dist/components/content/image/lqip-encoder-element.js +1 -1
- package/dist/components/content/title/title.styles.js +5 -5
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.styles.js +2 -2
- package/dist/components/forms/form-actions/form-actions.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +2 -2
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts +8 -0
- package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.js +11 -0
- package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.styles.js +36 -9
- package/dist/components/inputs/checkbox/checkbox.styles.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +3 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js +6 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js +7 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.styles.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.template.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.template.js +1 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.template.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.js +2 -2
- package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +2 -2
- package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.styles.js +3 -3
- package/dist/components/inputs/file-field/file-field.styles.js +2 -2
- package/dist/components/inputs/radio-button/radio-button.d.ts +8 -0
- package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.js +11 -0
- package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.styles.js +28 -9
- package/dist/components/inputs/radio-button/radio-button.styles.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +3 -0
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.js +6 -0
- package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js +7 -0
- package/dist/components/inputs/radio-button-field/radio-button-field.styles.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.template.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.template.js +2 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.template.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts +8 -0
- package/dist/components/inputs/switch/switch.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.js +11 -0
- package/dist/components/inputs/switch/switch.js.map +1 -1
- package/dist/components/inputs/switch/switch.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.styles.js +14 -2
- package/dist/components/inputs/switch/switch.styles.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts +3 -0
- package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.js +7 -0
- package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.styles.js +7 -0
- package/dist/components/inputs/switch-field/switch-field.styles.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.template.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.template.js +1 -0
- package/dist/components/inputs/switch-field/switch-field.template.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +2 -2
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +7 -7
- package/dist/components/inputs/time-field/time-field.styles.js +2 -2
- package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.styles.js +2 -2
- package/dist/components/layout/box/box.d.ts +4 -2
- package/dist/components/layout/box/box.d.ts.map +1 -1
- package/dist/components/layout/box/box.js +3 -1
- package/dist/components/layout/box/box.js.map +1 -1
- package/dist/components/layout/box/box.styles.d.ts.map +1 -1
- package/dist/components/layout/box/box.styles.js +10 -5
- package/dist/components/layout/box/box.styles.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +2 -2
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +12 -3
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +6 -0
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +6 -0
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +5 -5
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.styles.js +5 -5
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.styles.js +5 -5
- package/dist/components/layout/page-footer/page-footer.styles.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js +5 -5
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +5 -5
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +15 -13
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +20 -12
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.styles.js +8 -98
- package/dist/components/layout/page-sections/hero/hero.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js +5 -5
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js +8 -8
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/page-section-controls.js +2 -2
- package/dist/components/layout/page-sections/page-section-controls.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +0 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +2 -3
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js +6 -6
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js +5 -5
- package/dist/components/layout/page-sections/simple-section/simple-section.styles.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js +8 -8
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.styles.js.map +1 -1
- package/dist/components/layout/popover/popover.js +2 -2
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +3 -3
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +4 -4
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/spacer/spacer.styles.js +5 -5
- package/dist/components/layout/spacer/spacer.styles.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +4 -5
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js +5 -5
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.styles.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js +2 -2
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +2 -2
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +6 -0
- package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +4 -7
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +2 -2
- package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +2 -2
- package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +1 -1
- package/dist/components/navigation/pagination/pagination.styles.js +2 -2
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +9 -9
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +2 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +14 -9
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts +3 -2
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.js +13 -1
- package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +18 -125
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.js +15 -15
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +2 -2
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js +2 -2
- package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +2 -2
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.styles.js +14 -14
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +2 -2
- package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
- package/dist/components/{visibility-mixin-Crbt8PFP.js → visibility-mixin-djNSG5ZN.js} +5 -5
- package/dist/css/rich-text.css +11 -11
- package/dist/css/themes/bruin.css +182 -0
- package/dist/css/themes/donkerblauw.css +182 -0
- package/dist/css/themes/donkerbruin.css +182 -0
- package/dist/css/themes/donkergeel.css +208 -0
- package/dist/css/themes/donkergroen.css +182 -0
- package/dist/css/themes/geel.css +208 -0
- package/dist/css/themes/groen.css +182 -0
- package/dist/css/themes/hemelblauw.css +182 -0
- package/dist/css/themes/lichtblauw.css +182 -0
- package/dist/css/themes/mintgroen.css +182 -0
- package/dist/css/themes/mosgroen.css +182 -0
- package/dist/css/themes/oranje.css +196 -0
- package/dist/css/themes/paars.css +182 -0
- package/dist/css/themes/robijnrood.css +196 -0
- package/dist/css/themes/rood.css +196 -0
- package/dist/css/themes/roze.css +182 -0
- package/dist/css/themes/violet.css +182 -0
- package/dist/css/themes.css +3092 -0
- package/dist/css/variables.css +97 -132
- package/dist/favicon/bruin/favicon.svg +5 -0
- package/dist/favicon/bruin/touch-icon.png +0 -0
- package/dist/favicon/donkerblauw/favicon.svg +5 -0
- package/dist/favicon/donkerblauw/touch-icon.png +0 -0
- package/dist/favicon/donkerbruin/favicon.svg +5 -0
- package/dist/favicon/donkerbruin/touch-icon.png +0 -0
- package/dist/favicon/donkergeel/favicon.svg +5 -0
- package/dist/favicon/donkergeel/touch-icon.png +0 -0
- package/dist/favicon/donkergroen/favicon.svg +5 -0
- package/dist/favicon/donkergroen/touch-icon.png +0 -0
- package/dist/favicon/geel/favicon.svg +5 -0
- package/dist/favicon/geel/touch-icon.png +0 -0
- package/dist/favicon/groen/favicon.svg +5 -0
- package/dist/favicon/groen/touch-icon.png +0 -0
- package/dist/favicon/hemelblauw/favicon.svg +5 -0
- package/dist/favicon/hemelblauw/touch-icon.png +0 -0
- package/dist/favicon/lichtblauw/favicon.svg +5 -0
- package/dist/favicon/lichtblauw/touch-icon.png +0 -0
- package/dist/favicon/mintgroen/favicon.svg +5 -0
- package/dist/favicon/mintgroen/touch-icon.png +0 -0
- package/dist/favicon/mosgroen/favicon.svg +5 -0
- package/dist/favicon/mosgroen/touch-icon.png +0 -0
- package/dist/favicon/oranje/favicon.svg +5 -0
- package/dist/favicon/oranje/touch-icon.png +0 -0
- package/dist/favicon/paars/favicon.svg +5 -0
- package/dist/favicon/paars/touch-icon.png +0 -0
- package/dist/favicon/robijnrood/favicon.svg +5 -0
- package/dist/favicon/robijnrood/touch-icon.png +0 -0
- package/dist/favicon/rood/favicon.svg +5 -0
- package/dist/favicon/rood/touch-icon.png +0 -0
- package/dist/favicon/roze/favicon.svg +5 -0
- package/dist/favicon/roze/touch-icon.png +0 -0
- package/dist/favicon/violet/favicon.svg +5 -0
- package/dist/favicon/violet/touch-icon.png +0 -0
- package/dist/nldd.min.js +681 -771
- package/dist/types/vue.d.ts +30 -17
- package/dist/utilities/page-section-mixin.d.ts +4 -3
- package/dist/utilities/page-section-mixin.d.ts.map +1 -1
- package/dist/utilities/page-section-mixin.js +6 -4
- package/dist/utilities/page-section-mixin.js.map +1 -1
- package/dist/utilities/visibility-mixin.styles.js +5 -5
- package/dist/utilities/visibility-mixin.styles.js.map +1 -1
- package/package.json +11 -7
- package/dist/components/breakpoints-CkxsiRgH.js +0 -10
|
@@ -31,12 +31,12 @@ export const datePickerStyles = css `
|
|
|
31
31
|
--_date-picker-day-indicator-inset: var(--primitives-space-2);
|
|
32
32
|
--_date-picker-day-indicator-size: calc(var(--_date-picker-day-size) - var(--_date-picker-day-indicator-inset) * 2);
|
|
33
33
|
--_date-picker-day-indicator-corner-radius: var(--_date-picker-day-corner-radius);
|
|
34
|
-
--_date-picker-day-is-in-range-background-color: var(--
|
|
34
|
+
--_date-picker-day-is-in-range-background-color: light-dark(var(--primitives-color-accent-50), var(--primitives-color-accent-75));
|
|
35
35
|
--_date-picker-day-is-in-range-content-color: var(--semantics-content-color);
|
|
36
36
|
--_date-picker-day-is-today-border-color: light-dark(var(--primitives-color-neutral-250), var(--primitives-color-neutral-400));
|
|
37
37
|
--_date-picker-day-is-hovered-background-color: light-dark(var(--primitives-color-neutral-100), var(--primitives-color-neutral-150));
|
|
38
|
-
--_date-picker-day-is-selected-background-color: var(--semantics-controls-is-
|
|
39
|
-
--_date-picker-day-is-selected-content-color: var(--semantics-controls-is-
|
|
38
|
+
--_date-picker-day-is-selected-background-color: var(--semantics-controls-is-selected-indicator-color);
|
|
39
|
+
--_date-picker-day-is-selected-content-color: var(--semantics-controls-is-selected-contrast-color);
|
|
40
40
|
--_date-picker-day-is-outside-month-content-color: var(--semantics-content-secondary-color);
|
|
41
41
|
--_date-picker-day-is-unavailable-content-color: var(--semantics-content-secondary-color);
|
|
42
42
|
|
|
@@ -18,8 +18,8 @@ export const fileFieldStyles = css `
|
|
|
18
18
|
--_file-field-clear-button-padding-right: calc((var(--_file-field-min-size) - var(--semantics-controls-sm-min-size)) / 2);
|
|
19
19
|
--_file-field-validation-icon-area-padding-right: var(--_file-field-inline-padding);
|
|
20
20
|
--_file-field-validation-icon-size: var(--semantics-input-fields-md-validation-icon-size);
|
|
21
|
-
--_file-field-highlight-border-width: var(--semantics-surfaces-border-width);
|
|
22
|
-
--_file-field-highlight-border-color: var(--semantics-surfaces-tinted-border-color);
|
|
21
|
+
--_file-field-highlight-border-width: var(--semantics-surfaces-highlight-border-width);
|
|
22
|
+
--_file-field-highlight-border-color: var(--semantics-surfaces-tinted-highlight-border-color);
|
|
23
23
|
--_file-field-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
24
24
|
|
|
25
25
|
${inheritedTextReset}
|
|
@@ -22,9 +22,15 @@
|
|
|
22
22
|
* <nldd-radio-button name="options" value="2" accessible-label="Optie 2"></nldd-radio-button>
|
|
23
23
|
* </fieldset>
|
|
24
24
|
*
|
|
25
|
+
* On a selected row of nldd-list-item a checked control takes the colors of the
|
|
26
|
+
* row: the row sets `--context-selected-indicator-color` and
|
|
27
|
+
* `--context-selected-contrast-color`, because the accent can fall below 3:1 on
|
|
28
|
+
* the gray of a selected row.
|
|
29
|
+
*
|
|
25
30
|
* @element nldd-radio-button
|
|
26
31
|
* @attr {boolean} checked - Checked state
|
|
27
32
|
* @attr {boolean} disabled - Disabled state
|
|
33
|
+
* @attr {'inherit'} color - 'inherit' draws the control in the color of the text around it, with the mark in the surface color (`--context-parent-background-color`) or else `--semantics-content-contrast-color`, white or black against the text color. For a control on a colored surface, such as the panel of nldd-hero, where the accent would not stand out. Without it the control uses the accent.
|
|
28
34
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
29
35
|
* @attr {boolean} decorative - Renders the shape only: no role, no focus, no
|
|
30
36
|
* name/value, nothing announced. For a control that owns the state elsewhere,
|
|
@@ -63,6 +69,8 @@ export declare class NLDDRadioButton extends NLDDRadioButton_base {
|
|
|
63
69
|
focusRing: boolean;
|
|
64
70
|
name: string;
|
|
65
71
|
value: string;
|
|
72
|
+
/** 'inherit' draws the control in the surrounding text color. */
|
|
73
|
+
color: '' | 'inherit';
|
|
66
74
|
accessibleLabel: string;
|
|
67
75
|
/**
|
|
68
76
|
* Marks the control as invalid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,6CAA6C,CAAC;;AAS7F,qBACa,eAAgB,SAAQ,oBAAuC;IAE3E,OAAgB,MAAM,0BAAqB;IAE3C;wEACoE;IACpE,MAAM,CAAC,WAAW,UAAQ;IAG1B,OAAO,CAAC,eAAe,CAAS;IAGhC,OAAO,UAAS;IAGhB,UAAU,UAAS;IAGnB,QAAQ,UAAS;IACjB;;;4BAGwB;IAExB,KAAK,UAAS;IAId,QAAQ,UAAS;IAEjB;iFAC6E;IAE7E,SAAS,UAAS;IAGlB,IAAI,SAAM;IAGV,KAAK,SAAM;IAEX,iEAAiE;IAEjE,KAAK,EAAE,EAAE,GAAG,SAAS,CAAM;IAG3B,eAAe,SAAM;IAGrB;;;;;;;;OAQG;IAEH,OAAO,UAAS;IAEhB;2BACuB;IACvB,OAAO,CAAC,SAAS,CAA2B;IAE5C,gFAAgF;IAChF,OAAO,CAAC,aAAa,CAAuB;IAE5C;kDAC8C;IAC9C,IAAI,kBAAkB,IAAI,OAAO,CAEhC;IAEQ,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAM5B,YAAY,IAAI,IAAI;IAI7B;;0DAEsD;IAC7C,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAM/C,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAKrD;;;;;;;;OAQG;IACH,OAAO,CAAC,aAAa;IA0BrB;yEACqE;IAC5D,eAAe,IAAI,OAAO,GAAG,IAAI;IAKjC,SAAS,IAAI,SAAS;IAI/B,iBAAiB,IAAI,IAAI;IAKzB,wBAAwB,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI;IAItE,gEAAgE;IACzD,MAAM,IAAI,IAAI;IAYrB,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,UAAU,CAiBhB;IAEO,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -28,9 +28,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
28
28
|
* <nldd-radio-button name="options" value="2" accessible-label="Optie 2"></nldd-radio-button>
|
|
29
29
|
* </fieldset>
|
|
30
30
|
*
|
|
31
|
+
* On a selected row of nldd-list-item a checked control takes the colors of the
|
|
32
|
+
* row: the row sets `--context-selected-indicator-color` and
|
|
33
|
+
* `--context-selected-contrast-color`, because the accent can fall below 3:1 on
|
|
34
|
+
* the gray of a selected row.
|
|
35
|
+
*
|
|
31
36
|
* @element nldd-radio-button
|
|
32
37
|
* @attr {boolean} checked - Checked state
|
|
33
38
|
* @attr {boolean} disabled - Disabled state
|
|
39
|
+
* @attr {'inherit'} color - 'inherit' draws the control in the color of the text around it, with the mark in the surface color (`--context-parent-background-color`) or else `--semantics-content-contrast-color`, white or black against the text color. For a control on a colored surface, such as the panel of nldd-hero, where the accent would not stand out. Without it the control uses the accent.
|
|
34
40
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
35
41
|
* @attr {boolean} decorative - Renders the shape only: no role, no focus, no
|
|
36
42
|
* name/value, nothing announced. For a control that owns the state elsewhere,
|
|
@@ -74,6 +80,8 @@ let NLDDRadioButton = class NLDDRadioButton extends DescribedBy(FormAssociated(L
|
|
|
74
80
|
this.focusRing = false;
|
|
75
81
|
this.name = '';
|
|
76
82
|
this.value = '';
|
|
83
|
+
/** 'inherit' draws the control in the surrounding text color. */
|
|
84
|
+
this.color = '';
|
|
77
85
|
this.accessibleLabel = '';
|
|
78
86
|
/**
|
|
79
87
|
* Marks the control as invalid.
|
|
@@ -242,6 +250,9 @@ __decorate([
|
|
|
242
250
|
__decorate([
|
|
243
251
|
property({ type: String })
|
|
244
252
|
], NLDDRadioButton.prototype, "value", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
255
|
+
], NLDDRadioButton.prototype, "color", void 0);
|
|
245
256
|
__decorate([
|
|
246
257
|
property({ type: String, attribute: 'accessible-label' })
|
|
247
258
|
], NLDDRadioButton.prototype, "accessibleLabel", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"radio-button.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.ts"],"names":[],"mappings":";;;;;;AAAA;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O,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;6CACpD;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAChB;AAIX;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;8CACnC;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;wDACrC;AAarB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC3B;AA3DJ,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAsM3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"radio-button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,yBAuI7B,CAAC"}
|
|
@@ -12,17 +12,17 @@ export const radioButtonStyles = css `
|
|
|
12
12
|
--_radio-button-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
|
|
13
13
|
--_radio-button-background-color: var(--semantics-surfaces-base-background-color);
|
|
14
14
|
--_radio-button-is-selected-inner-shape-border-width: var(--primitives-border-width-regular);
|
|
15
|
-
--_radio-button-is-selected-inner-shape-border-color: var(--semantics-controls-is-
|
|
16
|
-
--_radio-button-is-selected-border-color: var(--semantics-controls-is-
|
|
17
|
-
--_radio-button-is-selected-background-color: var(--semantics-controls-is-
|
|
15
|
+
--_radio-button-is-selected-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
|
|
16
|
+
--_radio-button-is-selected-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
|
|
17
|
+
--_radio-button-is-selected-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
|
|
18
18
|
--_radio-button-is-hovered-border-color: light-dark(var(--primitives-color-neutral-600), var(--primitives-color-neutral-700));
|
|
19
|
-
--_radio-button-is-selected-is-hovered-border-color: var(--semantics-controls-is-
|
|
20
|
-
--_radio-button-is-selected-is-hovered-background-color: var(--semantics-controls-is-
|
|
21
|
-
--_radio-button-is-selected-is-hovered-inner-shape-border-color: var(--semantics-controls-is-
|
|
19
|
+
--_radio-button-is-selected-is-hovered-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
|
|
20
|
+
--_radio-button-is-selected-is-hovered-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-hovered-indicator-color));
|
|
21
|
+
--_radio-button-is-selected-is-hovered-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
|
|
22
22
|
--_radio-button-is-active-border-color: light-dark(var(--primitives-color-neutral-650), var(--primitives-color-neutral-750));
|
|
23
|
-
--_radio-button-is-selected-is-active-border-color: var(--semantics-controls-is-
|
|
24
|
-
--_radio-button-is-selected-is-active-background-color: var(--semantics-controls-is-
|
|
25
|
-
--_radio-button-is-selected-is-active-inner-shape-border-color: var(--semantics-controls-is-
|
|
23
|
+
--_radio-button-is-selected-is-active-border-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
|
|
24
|
+
--_radio-button-is-selected-is-active-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-is-active-indicator-color));
|
|
25
|
+
--_radio-button-is-selected-is-active-inner-shape-border-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
|
|
26
26
|
|
|
27
27
|
display: inline-flex;
|
|
28
28
|
position: relative;
|
|
@@ -40,6 +40,25 @@ export const radioButtonStyles = css `
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
/* ## Colors */
|
|
44
|
+
|
|
45
|
+
:host([color="inherit"]) {
|
|
46
|
+
--_radio-button-border-color: currentColor;
|
|
47
|
+
--_radio-button-background-color: transparent;
|
|
48
|
+
--_radio-button-is-hovered-border-color: currentColor;
|
|
49
|
+
--_radio-button-is-active-border-color: currentColor;
|
|
50
|
+
--_radio-button-is-selected-border-color: currentColor;
|
|
51
|
+
--_radio-button-is-selected-background-color: currentColor;
|
|
52
|
+
--_radio-button-is-selected-inner-shape-border-color: var(--context-parent-background-color, var(--semantics-content-contrast-color));
|
|
53
|
+
--_radio-button-is-selected-is-hovered-border-color: currentColor;
|
|
54
|
+
--_radio-button-is-selected-is-hovered-background-color: currentColor;
|
|
55
|
+
--_radio-button-is-selected-is-hovered-inner-shape-border-color: var(--context-parent-background-color, var(--semantics-content-contrast-color));
|
|
56
|
+
--_radio-button-is-selected-is-active-border-color: currentColor;
|
|
57
|
+
--_radio-button-is-selected-is-active-background-color: currentColor;
|
|
58
|
+
--_radio-button-is-selected-is-active-inner-shape-border-color: var(--context-parent-background-color, var(--semantics-content-contrast-color));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
43
62
|
/* # Elements */
|
|
44
63
|
|
|
45
64
|
.radio-button__outer-shape {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"radio-button.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button/radio-button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuInC,CAAC"}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* @element nldd-radio-button-field
|
|
22
22
|
* @attr {boolean} checked - Checked state
|
|
23
23
|
* @attr {boolean} disabled - Disabled state
|
|
24
|
+
* @attr {'inherit'} color - 'inherit' draws the control and its label in the color of the text around it, for a field on a colored surface such as the panel of nldd-hero. Passed to the control inside.
|
|
24
25
|
* @attr {string} value - Value for form submission
|
|
25
26
|
* @attr {string} name - Radio group name for form submission; ties the fields of one group together. Set automatically by nldd-radio-button-group.
|
|
26
27
|
* @attr {boolean} required - Required state. What it asks is whether anything in the group is checked, as a native radio does. Set automatically by nldd-radio-button-group.
|
|
@@ -47,6 +48,8 @@ export declare class NLDDRadioButtonField extends NLDDRadioButtonField_base {
|
|
|
47
48
|
* group assigns the property. */
|
|
48
49
|
name: string;
|
|
49
50
|
required: boolean;
|
|
51
|
+
/** 'inherit' draws the control and its label in the surrounding text color. */
|
|
52
|
+
color: '' | 'inherit';
|
|
50
53
|
label: string;
|
|
51
54
|
/**
|
|
52
55
|
* Marks the control as invalid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"radio-button-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,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AAG,QAAQ,GAAG,IAAI,GAAG,IAAI;IAItE;;uCAEmC;IAC5B,MAAM,IAAI,IAAI;IAYrB,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,QAAQ,CAEd;IAEF,OAAO,CAAC,OAAO,CAEb;IAEF,OAAO,CAAC,UAAU,CAehB;IAEF;yEACqE;IAC5D,eAAe,IAAI,OAAO,GAAG,IAAI;IAIjC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,yBAAyB,EAAE,oBAAoB,CAAC;KAChD;CACD"}
|
|
@@ -27,6 +27,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
27
27
|
* @element nldd-radio-button-field
|
|
28
28
|
* @attr {boolean} checked - Checked state
|
|
29
29
|
* @attr {boolean} disabled - Disabled state
|
|
30
|
+
* @attr {'inherit'} color - 'inherit' draws the control and its label in the color of the text around it, for a field on a colored surface such as the panel of nldd-hero. Passed to the control inside.
|
|
30
31
|
* @attr {string} value - Value for form submission
|
|
31
32
|
* @attr {string} name - Radio group name for form submission; ties the fields of one group together. Set automatically by nldd-radio-button-group.
|
|
32
33
|
* @attr {boolean} required - Required state. What it asks is whether anything in the group is checked, as a native radio does. Set automatically by nldd-radio-button-group.
|
|
@@ -58,6 +59,8 @@ let NLDDRadioButtonField = class NLDDRadioButtonField extends DescribedBy(FormAs
|
|
|
58
59
|
* group assigns the property. */
|
|
59
60
|
this.name = '';
|
|
60
61
|
this.required = false;
|
|
62
|
+
/** 'inherit' draws the control and its label in the surrounding text color. */
|
|
63
|
+
this.color = '';
|
|
61
64
|
this.label = '';
|
|
62
65
|
/**
|
|
63
66
|
* Marks the control as invalid.
|
|
@@ -237,6 +240,9 @@ __decorate([
|
|
|
237
240
|
__decorate([
|
|
238
241
|
property({ type: Boolean, reflect: true })
|
|
239
242
|
], NLDDRadioButtonField.prototype, "required", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
245
|
+
], NLDDRadioButtonField.prototype, "color", void 0);
|
|
240
246
|
__decorate([
|
|
241
247
|
property({ type: String })
|
|
242
248
|
], NLDDRadioButtonField.prototype, "label", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"radio-button-field.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAkB,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAG/D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAA1E;;QASE,oBAAe,GAAG,KAAK,CAAC;QAGhC,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QAGjB,UAA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AC7D,gCAAW,GAAG,IAAI,AAAP,CAAQ;AAM1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAChB;AAMX;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;kDACpD;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAC1B;AAIjB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;mDACnC;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAChB;AAaX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDAC3B;AAKhB;IADC,KAAK,EAAE;4DACoC;AAK5C;IADC,KAAK,EAAE;gEACmB;AAwB3B;IADC,KAAK,EAAE;wDACW;AAjFP,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAsNhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"radio-button-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,yBAgElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;IASrC,kBAAkB
|
|
1
|
+
{"version":3,"file":"radio-button-field.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;IASrC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"radio-button-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,iCAAiC,CAAC;AAEzC,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,oBAAoB,GAAG,cAAc,CAgCxF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
2
|
import '../radio-button/radio-button.js';
|
|
3
3
|
export function radioButtonFieldTemplate(component) {
|
|
4
4
|
// The field itself is the radio: it carries the role, the state and the
|
|
@@ -20,6 +20,7 @@ export function radioButtonFieldTemplate(component) {
|
|
|
20
20
|
>
|
|
21
21
|
<div class="radio-button-field__control">
|
|
22
22
|
<nldd-radio-button
|
|
23
|
+
color=${component.color || nothing}
|
|
23
24
|
decorative
|
|
24
25
|
?checked=${component.checked}
|
|
25
26
|
?disabled=${component.disabled}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-field.template.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-button-field.template.js","sourceRoot":"","sources":["../../../../src/components/inputs/radio-button-field/radio-button-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,iCAAiC,CAAC;AAEzC,MAAM,UAAU,wBAAwB,CAAC,SAA+B;IACvE,wEAAwE;IACxE,0EAA0E;IAC1E,4EAA4E;IAC5E,8EAA8E;IAC9E,8EAA8E;IAC9E,+EAA+E;IAC/E,2BAA2B;IAC3B,OAAO,IAAI,CAAA;;;;;;gBAMI,SAAS,CAAC,QAAQ;gBAClB,SAAS,CAAC,QAAQ;eACnB,SAAS,CAAC,SAAS;;;;aAIrB,SAAS,CAAC,KAAK,IAAI,OAAO;;gBAEvB,SAAS,CAAC,OAAO;iBAChB,SAAS,CAAC,QAAQ;mBAChB,SAAS,CAAC,UAAU;;;;MAIjC,SAAS,CAAC,KAAK;;;EAGnB,CAAC;AACH,CAAC"}
|
|
@@ -5,9 +5,15 @@
|
|
|
5
5
|
* Prefer nldd-switch-field for labeled usage — it combines the switch with a visible label.
|
|
6
6
|
* Direct use of nldd-switch requires an accessible-label attribute for screen reader accessibility.
|
|
7
7
|
*
|
|
8
|
+
* On a selected row of nldd-list-item a checked control takes the colors of the
|
|
9
|
+
* row: the row sets `--context-selected-indicator-color` and
|
|
10
|
+
* `--context-selected-contrast-color`, because the accent can fall below 3:1 on
|
|
11
|
+
* the gray of a selected row.
|
|
12
|
+
*
|
|
8
13
|
* @element nldd-switch
|
|
9
14
|
* @attr {boolean} checked - Whether the switch is on/off
|
|
10
15
|
* @attr {boolean} disabled - Disabled state
|
|
16
|
+
* @attr {'inherit'} color - 'inherit' draws the control in the color of the text around it, with the mark in the surface color (`--context-parent-background-color`) or else `--semantics-content-contrast-color`, white or black against the text color. For a control on a colored surface, such as the panel of nldd-hero, where the accent would not stand out. Without it the control uses the accent.
|
|
11
17
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
12
18
|
* @attr {string} size - Switch size: 'xs' | 'sm' (default: 'sm')
|
|
13
19
|
* @attr {string} name - Name for form submission; nothing is submitted when the switch is off
|
|
@@ -36,6 +42,8 @@ export declare class NLDDSwitch extends NLDDSwitch_base {
|
|
|
36
42
|
* script-focusable. */
|
|
37
43
|
noTab: boolean;
|
|
38
44
|
size: SwitchSize;
|
|
45
|
+
/** 'inherit' draws the control in the surrounding text color. */
|
|
46
|
+
color: '' | 'inherit';
|
|
39
47
|
accessibleLabel: string;
|
|
40
48
|
value: string;
|
|
41
49
|
private _initialChecked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,MA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AAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
|
|
@@ -12,9 +12,15 @@ var NLDDSwitch_1;
|
|
|
12
12
|
* Prefer nldd-switch-field for labeled usage — it combines the switch with a visible label.
|
|
13
13
|
* Direct use of nldd-switch requires an accessible-label attribute for screen reader accessibility.
|
|
14
14
|
*
|
|
15
|
+
* On a selected row of nldd-list-item a checked control takes the colors of the
|
|
16
|
+
* row: the row sets `--context-selected-indicator-color` and
|
|
17
|
+
* `--context-selected-contrast-color`, because the accent can fall below 3:1 on
|
|
18
|
+
* the gray of a selected row.
|
|
19
|
+
*
|
|
15
20
|
* @element nldd-switch
|
|
16
21
|
* @attr {boolean} checked - Whether the switch is on/off
|
|
17
22
|
* @attr {boolean} disabled - Disabled state
|
|
23
|
+
* @attr {'inherit'} color - 'inherit' draws the control in the color of the text around it, with the mark in the surface color (`--context-parent-background-color`) or else `--semantics-content-contrast-color`, white or black against the text color. For a control on a colored surface, such as the panel of nldd-hero, where the accent would not stand out. Without it the control uses the accent.
|
|
18
24
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
19
25
|
* @attr {string} size - Switch size: 'xs' | 'sm' (default: 'sm')
|
|
20
26
|
* @attr {string} name - Name for form submission; nothing is submitted when the switch is off
|
|
@@ -44,6 +50,8 @@ let NLDDSwitch = NLDDSwitch_1 = class NLDDSwitch extends DescribedBy(FormAssocia
|
|
|
44
50
|
* script-focusable. */
|
|
45
51
|
this.noTab = false;
|
|
46
52
|
this.size = 'sm';
|
|
53
|
+
/** 'inherit' draws the control in the surrounding text color. */
|
|
54
|
+
this.color = '';
|
|
47
55
|
this.accessibleLabel = '';
|
|
48
56
|
this.value = 'on';
|
|
49
57
|
this._initialChecked = false;
|
|
@@ -177,6 +185,9 @@ __decorate([
|
|
|
177
185
|
__decorate([
|
|
178
186
|
property({ reflect: true, converter: reflectNonDefault('sm') })
|
|
179
187
|
], NLDDSwitch.prototype, "size", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
190
|
+
], NLDDSwitch.prototype, "color", void 0);
|
|
180
191
|
__decorate([
|
|
181
192
|
property({ type: String, attribute: 'accessible-label' })
|
|
182
193
|
], NLDDSwitch.prototype, "accessibleLabel", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.ts"],"names":[],"mappings":";;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.ts"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkB,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAKhE,IAAM,UAAU,kBAAhB,MAAM,UAAW,SAAQ,WAAW,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IAAhE;;QAUN,SAAI,GAAG,EAAE,CAAC;QAGV,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QACjB;;;gCAGwB;QAExB,UAAK,GAAG,KAAK,CAAC;QAId,SAAI,GAAe,IAAI,CAAC;QAExB,iEAAiE;QAEjE,UAAK,GAAmB,EAAE,CAAC;Q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AAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;yCAClD;AAId;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAa,IAAI,CAAC,EAAE,CAAC;wCACpD;AAIxB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;yCACnC;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;mDACrC;AAGrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACd;AAMb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAajB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAvDJ,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAuKtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"switch.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,yBAwIxB,CAAC"}
|
|
@@ -16,11 +16,11 @@ export const switchStyles = css `
|
|
|
16
16
|
--_switch-border-width: var(--primitives-border-width-regular);
|
|
17
17
|
--_switch-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
|
|
18
18
|
--_switch-background-color: var(--semantics-surfaces-base-background-color);
|
|
19
|
-
--_switch-is-selected-background-color: var(--semantics-controls-is-
|
|
19
|
+
--_switch-is-selected-background-color: var(--context-selected-indicator-color, var(--semantics-controls-is-selected-indicator-color));
|
|
20
20
|
--_switch-thumb-border-width: var(--primitives-border-width-regular);
|
|
21
21
|
--_switch-thumb-border-color: light-dark(var(--primitives-color-neutral-550), var(--primitives-color-neutral-650));
|
|
22
22
|
--_switch-thumb-background-color: var(--semantics-surfaces-base-background-color);
|
|
23
|
-
--_switch-is-selected-thumb-background-color: var(--semantics-controls-is-
|
|
23
|
+
--_switch-is-selected-thumb-background-color: var(--context-selected-contrast-color, var(--semantics-controls-is-selected-mark-color));
|
|
24
24
|
|
|
25
25
|
display: inline-block;
|
|
26
26
|
position: relative;
|
|
@@ -46,6 +46,18 @@ export const switchStyles = css `
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
/* ## Colors */
|
|
50
|
+
|
|
51
|
+
:host([color="inherit"]) {
|
|
52
|
+
--_switch-border-color: currentColor;
|
|
53
|
+
--_switch-background-color: transparent;
|
|
54
|
+
--_switch-is-selected-background-color: currentColor;
|
|
55
|
+
--_switch-thumb-border-color: currentColor;
|
|
56
|
+
--_switch-thumb-background-color: currentColor;
|
|
57
|
+
--_switch-is-selected-thumb-background-color: var(--context-parent-background-color, var(--semantics-content-contrast-color));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
49
61
|
/* # Elements */
|
|
50
62
|
|
|
51
63
|
.switch__input {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"switch.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch/switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwI9B,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @element nldd-switch-field
|
|
7
7
|
* @attr {boolean} checked - Checked state
|
|
8
8
|
* @attr {boolean} disabled - Disabled state
|
|
9
|
+
* @attr {'inherit'} color - 'inherit' draws the control and its label in the color of the text around it, for a field on a colored surface such as the panel of nldd-hero. Passed to the control inside.
|
|
9
10
|
* @attr {string} value - Value for form submission
|
|
10
11
|
* @attr {string} name - Name for form submission
|
|
11
12
|
* @attr {string} label - Label text for the switch
|
|
@@ -25,6 +26,8 @@ export declare class NLDDSwitchField extends NLDDSwitchField_base {
|
|
|
25
26
|
disabled: boolean;
|
|
26
27
|
value: string;
|
|
27
28
|
name: string;
|
|
29
|
+
/** 'inherit' draws the control and its label in the surrounding text color. */
|
|
30
|
+
color: '' | 'inherit';
|
|
28
31
|
label: string;
|
|
29
32
|
required: boolean;
|
|
30
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"switch-field.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;;AAQjC,qBACa,eAAgB,SAAQ,oBAAuB;IAC3D,OAAgB,MAAM,0BAAqB;IAE3C;wEACoE;IACpE,MAAM,CAAC,WAAW,UAAQ;IAG1B,OAAO,UAAS;IAGhB,QAAQ,UAAS;IAGjB,KAAK,SAAQ;IAGb,IAAI,SAAM;IAEV,+EAA+E;IAE/E,KAAK,EAAE,EAAE,GAAG,SAAS,CAAM;IAG3B,KAAK,SAAM;IAIX,QAAQ,UAAS;IAGjB;;;;;;;;OAQG;IAEH,OAAO,UAAS;IAET,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAOjC,aAAa,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IASpC;;;;OAIG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAI5C,8EAA8E;IACrE,eAAe,IAAI,OAAO,GAAG,IAAI;IAIjC,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
* @element nldd-switch-field
|
|
13
13
|
* @attr {boolean} checked - Checked state
|
|
14
14
|
* @attr {boolean} disabled - Disabled state
|
|
15
|
+
* @attr {'inherit'} color - 'inherit' draws the control and its label in the color of the text around it, for a field on a colored surface such as the panel of nldd-hero. Passed to the control inside.
|
|
15
16
|
* @attr {string} value - Value for form submission
|
|
16
17
|
* @attr {string} name - Name for form submission
|
|
17
18
|
* @attr {string} label - Label text for the switch
|
|
@@ -21,6 +22,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
22
|
* @fires change - When checked state changes; detail: { checked: boolean, value: string }
|
|
22
23
|
*/
|
|
23
24
|
import { LitElement } from 'lit';
|
|
25
|
+
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
24
26
|
import { customElement, property } from 'lit/decorators.js';
|
|
25
27
|
import { switchFieldStyles } from './switch-field.styles.js';
|
|
26
28
|
import { switchFieldTemplate } from './switch-field.template.js';
|
|
@@ -32,6 +34,8 @@ let NLDDSwitchField = class NLDDSwitchField extends DescribedBy(LitElement) {
|
|
|
32
34
|
this.disabled = false;
|
|
33
35
|
this.value = 'on';
|
|
34
36
|
this.name = '';
|
|
37
|
+
/** 'inherit' draws the control and its label in the surrounding text color. */
|
|
38
|
+
this.color = '';
|
|
35
39
|
this.label = '';
|
|
36
40
|
this.required = false;
|
|
37
41
|
/**
|
|
@@ -93,6 +97,9 @@ __decorate([
|
|
|
93
97
|
__decorate([
|
|
94
98
|
property({ type: String })
|
|
95
99
|
], NLDDSwitchField.prototype, "name", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
102
|
+
], NLDDSwitchField.prototype, "color", void 0);
|
|
96
103
|
__decorate([
|
|
97
104
|
property({ type: String })
|
|
98
105
|
], NLDDSwitchField.prototype, "label", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"switch-field.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;A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AAC,UAAU,EAAE,aAAa,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;IAC9D,CAAC;IAEQ,MAAM;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;;AA1Ee,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAE3C;oEACoE;AAC7D,2BAAW,GAAG,IAAI,AAAP,CAAQ;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACjB;AAIV;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC;8CACnC;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAChB;AAIX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAC1B;AAajB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC3B;AAzCJ,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA4E3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"switch-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,yBAyD7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;IAShC,kBAAkB
|
|
1
|
+
{"version":3,"file":"switch-field.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;IAShC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,qBAAqB,CAAC;AAG7B,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"switch-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,qBAAqB,CAAC;AAG7B,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,eAAe,GAAG,cAAc,CAsB9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch-field.template.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,qBAAqB,CAAC;AAE7B,qGAAqG;AACrG,MAAM,UAAU,mBAAmB,CAAC,SAA0B;IAC7D,OAAO,IAAI,CAAA;;YAEA,SAAS,CAAC,iBAAiB;;;;
|
|
1
|
+
{"version":3,"file":"switch-field.template.js","sourceRoot":"","sources":["../../../../src/components/inputs/switch-field/switch-field.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,qBAAqB,CAAC;AAE7B,qGAAqG;AACrG,MAAM,UAAU,mBAAmB,CAAC,SAA0B;IAC7D,OAAO,IAAI,CAAA;;YAEA,SAAS,CAAC,iBAAiB;;;;aAI1B,SAAS,CAAC,KAAK,IAAI,OAAO;gBACvB,SAAS,CAAC,OAAO;iBAChB,SAAS,CAAC,QAAQ;;YAEvB,SAAS,CAAC,IAAI,IAAI,OAAO;aACxB,SAAS,CAAC,KAAK;gBACZ,SAAS,CAAC,OAAO;iBAChB,SAAS,CAAC,QAAQ;wBACX,SAAS,CAAC,KAAK,IAAI,OAAO;eACnC,SAAS,CAAC,aAAa;;;uCAGC,SAAS,CAAC,KAAK;;EAEpD,CAAC;AACH,CAAC"}
|