@vonage/vivid 5.23.1 → 5.24.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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/audio-player/index.cjs +2 -2
- package/audio-player/index.js +3 -3
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/bundled/definition15.cjs +8 -7
- package/bundled/definition15.js +26 -24
- package/bundled/definition17.cjs +2 -2
- package/bundled/definition17.js +2 -2
- package/bundled/definition18.cjs +12 -83
- package/bundled/definition18.js +35 -419
- package/bundled/definition19.cjs +87 -7
- package/bundled/definition19.js +432 -16
- package/bundled/definition20.cjs +7 -37
- package/bundled/definition20.js +17 -172
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +154 -154
- package/bundled/definition22.cjs +29 -6
- package/bundled/definition22.js +172 -20
- package/bundled/definition23.cjs +6 -12
- package/bundled/definition23.js +17 -32
- package/bundled/definition24.cjs +12 -39
- package/bundled/definition24.js +32 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +77 -0
- package/bundled/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +24 -11
- package/bundled/render-in-light-dom.cjs +1 -1
- package/bundled/render-in-light-dom.js +16 -19
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +9 -1
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +29 -21
- package/country/definition.cjs +1 -1
- package/country/definition.js +1 -1
- package/country/index.cjs +1 -1
- package/country/index.js +1 -1
- package/country-group/definition.cjs +1 -1
- package/country-group/definition.js +1 -1
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +2 -2
- package/custom-elements.json +3102 -2842
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +4 -4
- package/data-grid/index.js +5 -5
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +1 -1
- package/dial-pad/definition.cjs +1 -1
- package/dial-pad/definition.js +1 -1
- package/dial-pad/index.cjs +24 -24
- package/dial-pad/index.js +120 -51
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/divider/definition.cjs +1 -1
- package/divider/definition.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/empty-state/definition.cjs +1 -1
- package/empty-state/definition.js +1 -1
- package/fab/definition.cjs +1 -1
- package/fab/definition.js +1 -1
- package/file-picker/definition.cjs +1 -1
- package/file-picker/definition.js +1 -1
- package/flag/definition.cjs +1 -1
- package/flag/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/header/index.cjs +3 -3
- package/header/index.js +3 -3
- package/index.cjs +200 -196
- package/index.js +53 -52
- package/kbd-key/definition.cjs +1 -1
- package/kbd-key/definition.js +1 -1
- package/kbd-shortcut/definition.cjs +1 -1
- package/kbd-shortcut/definition.js +1 -1
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/lib/accordion-item/accordion-item.d.ts +2 -1
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/alert/alert.d.ts +2 -2
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +6 -6
- package/lib/color-picker/color-picker.d.ts +7 -7
- package/lib/combobox/combobox.d.ts +7 -7
- package/lib/components.d.ts +1 -0
- package/lib/country-group/country-group.d.ts +2 -2
- package/lib/data-grid/data-grid-cell.d.ts +4 -3
- package/lib/data-grid/data-grid-row.d.ts +3 -2
- package/lib/data-grid/data-grid.options.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +8 -8
- package/lib/date-range-picker/date-range-picker.d.ts +4 -4
- package/lib/date-time-picker/date-time-picker.d.ts +8 -8
- package/lib/dial-pad/dial-pad.d.ts +2 -1
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/divider/divider.d.ts +1 -1
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/header/header.d.ts +1 -1
- package/lib/menu/menu.d.ts +2 -2
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
- package/lib/nav-item/nav-item.d.ts +2 -2
- package/lib/note/note.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +9 -9
- package/lib/optgroup/definition.d.ts +3 -0
- package/lib/optgroup/index.d.ts +1 -0
- package/lib/optgroup/optgroup.d.ts +430 -0
- package/lib/optgroup/optgroup.template.d.ts +2 -0
- package/lib/optgroup/variations.browser-spec.d.ts +1 -0
- package/lib/option/option.d.ts +2 -2
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/popover.d.ts +2 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +1 -1
- package/lib/range-slider/range-slider.d.ts +3 -3
- package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/lib/searchable-select/option-tag.d.ts +1 -1
- package/lib/searchable-select/searchable-select.d.ts +47 -47
- package/lib/select/select.d.ts +9 -9
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
- package/lib/slider/slider.d.ts +3 -3
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/status/status.d.ts +1 -1
- package/lib/switch/switch.d.ts +2 -2
- package/lib/tab/tab.d.ts +3 -3
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/table/table-cell.d.ts +1 -1
- package/lib/table/table-header-cell.d.ts +1 -1
- package/lib/table/table-row.d.ts +1 -1
- package/lib/table/table-sorting-button.d.ts +1 -1
- package/lib/tag/tag.d.ts +3 -3
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +8 -8
- package/lib/text-field/text-field.d.ts +9 -9
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/toggletip/toggletip.d.ts +2 -2
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +1 -1
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/definition.cjs +1 -1
- package/nav/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.cjs +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/optgroup/definition.cjs +5 -0
- package/optgroup/definition.js +2 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/package.json +6 -6
- package/pagination/definition.cjs +1 -1
- package/pagination/definition.js +1 -1
- package/platform-switch/definition.cjs +1 -1
- package/platform-switch/definition.js +1 -1
- package/popover/definition.cjs +1 -1
- package/popover/definition.js +1 -1
- package/progress/definition.cjs +1 -1
- package/progress/definition.js +1 -1
- package/radio/definition.cjs +1 -1
- package/radio/definition.js +1 -1
- package/radio-group/definition.cjs +1 -1
- package/radio-group/definition.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +1 -1
- package/rich-text-editor/index.cjs +1 -1
- package/rich-text-editor/index.js +4 -4
- package/rich-text-view/definition.cjs +1 -1
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +1 -1
- package/searchable-select/definition.js +1 -1
- package/searchable-select/index.cjs +19 -19
- package/searchable-select/index.js +60 -45
- package/select/definition.cjs +1 -1
- package/select/definition.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/foundation/button/button.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +2 -2
- package/shared/foundation/listbox/extractOptions.d.ts +2 -0
- package/shared/foundation/listbox/listbox.d.ts +2 -0
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/anchored.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/form-element.d.ts +1 -1
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
- package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/kbd-shortcut.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
- package/shared/picker-field/picker-field.d.ts +7 -7
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +1 -1
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +1 -0
- package/split-button/index.js +1 -0
- package/status/definition.cjs +1 -1
- package/status/definition.js +1 -1
- package/switch/definition.cjs +1 -1
- package/switch/definition.js +1 -1
- package/switch/index.cjs +6 -5
- package/switch/index.js +16 -14
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tab-panel/definition.cjs +1 -1
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +1 -1
- package/table/definition.js +1 -1
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +1 -1
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag-group/definition.cjs +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/definition13.cjs +1 -1
- package/unbundled/definition13.js +1 -1
- package/unbundled/definition2.cjs +9 -3
- package/unbundled/definition2.js +9 -3
- package/unbundled/definition23.cjs +1 -0
- package/unbundled/definition23.js +2 -1
- package/unbundled/definition29.cjs +2 -2
- package/unbundled/definition29.js +2 -2
- package/unbundled/definition30.cjs +65 -484
- package/unbundled/definition30.js +57 -482
- package/unbundled/definition31.cjs +501 -39
- package/unbundled/definition31.js +499 -37
- package/unbundled/definition32.cjs +38 -239
- package/unbundled/definition32.js +35 -236
- package/unbundled/definition33.cjs +236 -74
- package/unbundled/definition33.js +233 -71
- package/unbundled/definition34.cjs +74 -1968
- package/unbundled/definition34.js +70 -1940
- package/unbundled/definition35.cjs +1992 -26
- package/unbundled/definition35.js +1964 -27
- package/unbundled/definition36.cjs +26 -111
- package/unbundled/definition36.js +23 -103
- package/unbundled/definition37.cjs +53 -294
- package/unbundled/definition37.js +50 -291
- package/unbundled/definition38.cjs +282 -132
- package/unbundled/definition38.js +279 -129
- package/unbundled/definition39.cjs +165 -339
- package/unbundled/definition39.js +163 -337
- package/unbundled/definition40.cjs +394 -228
- package/unbundled/definition40.js +391 -225
- package/unbundled/definition41.cjs +263 -46
- package/unbundled/definition41.js +258 -41
- package/unbundled/definition42.cjs +47 -67
- package/unbundled/definition42.js +45 -65
- package/unbundled/definition43.cjs +56 -383
- package/unbundled/definition43.js +55 -382
- package/unbundled/definition44.cjs +386 -44
- package/unbundled/definition44.js +382 -40
- package/unbundled/definition45.cjs +53 -45
- package/unbundled/definition45.js +49 -41
- package/unbundled/definition46.cjs +40 -164
- package/unbundled/definition46.js +36 -160
- package/unbundled/definition47.cjs +171 -31
- package/unbundled/definition47.js +168 -22
- package/unbundled/definition48.cjs +30 -89
- package/unbundled/definition48.js +22 -87
- package/unbundled/definition49.cjs +70 -33
- package/unbundled/definition49.js +67 -30
- package/unbundled/definition50.cjs +54 -23
- package/unbundled/definition50.js +52 -18
- package/unbundled/definition51.cjs +23 -39
- package/unbundled/definition51.js +17 -36
- package/unbundled/definition52.cjs +29 -314
- package/unbundled/definition52.js +27 -312
- package/unbundled/definition53.cjs +301 -195
- package/unbundled/definition53.js +297 -191
- package/unbundled/definition54.cjs +210 -40
- package/unbundled/definition54.js +206 -36
- package/unbundled/definition55.cjs +42 -266
- package/unbundled/definition55.js +38 -262
- package/unbundled/definition56.cjs +266 -50
- package/unbundled/definition56.js +263 -46
- package/unbundled/definition57.cjs +48 -146
- package/unbundled/definition57.js +47 -143
- package/unbundled/definition58.cjs +127 -225
- package/unbundled/definition58.js +122 -223
- package/unbundled/definition59.cjs +199 -418
- package/unbundled/definition59.js +196 -415
- package/unbundled/definition60.cjs +441 -3738
- package/unbundled/definition60.js +431 -3565
- package/unbundled/definition61.cjs +3712 -728
- package/unbundled/definition61.js +3538 -717
- package/unbundled/definition62.cjs +769 -97
- package/unbundled/definition62.js +766 -94
- package/unbundled/definition63.cjs +100 -981
- package/unbundled/definition63.js +98 -976
- package/unbundled/definition64.cjs +988 -93
- package/unbundled/definition64.js +982 -90
- package/unbundled/definition65.cjs +109 -73
- package/unbundled/definition65.js +105 -63
- package/unbundled/definition66.cjs +69 -155
- package/unbundled/definition66.js +60 -152
- package/unbundled/definition67.cjs +154 -118
- package/unbundled/definition67.js +151 -115
- package/unbundled/definition68.cjs +124 -49
- package/unbundled/definition68.js +120 -45
- package/unbundled/definition69.cjs +51 -84
- package/unbundled/definition69.js +50 -80
- package/unbundled/definition70.cjs +91 -19
- package/unbundled/definition70.js +86 -14
- package/unbundled/definition71.cjs +20 -87
- package/unbundled/definition71.js +14 -84
- package/unbundled/definition72.cjs +76 -294
- package/unbundled/definition72.js +71 -217
- package/unbundled/definition73.cjs +288 -311
- package/unbundled/definition73.js +218 -306
- package/unbundled/definition74.cjs +326 -26
- package/unbundled/definition74.js +317 -23
- package/unbundled/definition75.cjs +27 -122
- package/unbundled/definition75.js +22 -118
- package/unbundled/definition76.cjs +103 -232
- package/unbundled/definition76.js +99 -228
- package/unbundled/definition77.cjs +259 -26
- package/unbundled/definition77.js +249 -23
- package/unbundled/definition78.cjs +29 -148
- package/unbundled/definition78.js +27 -133
- package/unbundled/definition79.cjs +117 -173
- package/unbundled/definition79.js +108 -169
- package/unbundled/definition80.cjs +181 -477
- package/unbundled/definition80.js +176 -471
- package/unbundled/definition81.cjs +517 -0
- package/unbundled/definition81.js +497 -0
- package/unbundled/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- package/unbundled/listbox.cjs +23 -6
- package/unbundled/listbox.js +23 -6
- package/unbundled/vivid-element.cjs +10 -1
- package/unbundled/vivid-element.js +10 -1
- package/video-player/definition.cjs +1 -1
- package/video-player/definition.js +1 -1
- package/vivid.api.json +194 -0
|
@@ -1,109 +1,145 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
3
|
const require_decorate = require("./decorate.cjs");
|
|
4
|
-
const
|
|
4
|
+
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
5
|
+
const require_enums = require("./enums.cjs");
|
|
6
|
+
const require_definition = require("./definition23.cjs");
|
|
7
|
+
const require_definition$1 = require("./definition58.cjs");
|
|
5
8
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
9
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
7
|
-
//#region src/lib/
|
|
10
|
+
//#region src/lib/selectable-box/selectable-box.scss?inline
|
|
11
|
+
var selectable_box_default = ":host{display:flex}.base.connotation-cta{--_connotation-color-firm-all:var(--vvd-selectable-box-cta-firm-all,var(--vvd-color-cta-600));--_connotation-color-pale:var(--vvd-selectable-box-cta-pale,var(--vvd-color-cta-300));--_connotation-color-fierce:var(--vvd-selectable-box-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-faint:var(--vvd-selectable-box-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-selectable-box-cta-soft,var(--vvd-color-cta-100))}.base:not(.connotation-cta){--_connotation-color-firm-all:var(--vvd-selectable-box-accent-firm-all,var(--vvd-color-neutral-600));--_connotation-color-pale:var(--vvd-selectable-box-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-fierce:var(--vvd-selectable-box-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-faint:var(--vvd-selectable-box-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-selectable-box-accent-soft,var(--vvd-color-neutral-100))}.base{--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-pale)}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-firm-all)}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-firm-all)}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:var(--_connotation-color-pale)}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:var(--_connotation-color-firm-all)}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:var(--_connotation-color-firm-all)}.base:disabled,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--vvd-color-neutral-100)}.base{--control-offset:calc(var(--selectable-box-spacing,16px) + 36px);padding:var(--selectable-box-spacing,16px);border:1px solid var(--_appearance-color-outline);background-color:var(--_appearance-color-fill);text-align:start;border-radius:8px;inline-size:100%;position:relative}.base.control-placement-end-stacked,.base.control-placement-start-stacked{padding-block-start:var(--control-offset)}.base.control-placement-start{padding-inline-start:var(--control-offset)}.base.control-placement-end{padding-inline-end:var(--control-offset)}.base:focus-visible{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}.base.tight{min-height:calc(var(--selectable-box-spacing,16px) * 2 + 22px);padding:0;overflow:hidden}.base.selected{background-color:var(--selectable-box-checked-bg,var(--_appearance-color-fill))}.base.clickable{cursor:pointer}.control{position:absolute;inset-block-start:var(--selectable-box-spacing,16px)}.control.start-stacked,.control.start{inset-inline-start:var(--selectable-box-spacing,16px)}.control.end-stacked,.control.end{inset-inline-end:var(--selectable-box-spacing,16px)}";
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/lib/selectable-box/selectable-box.ts
|
|
8
14
|
/**
|
|
9
15
|
* @public
|
|
10
|
-
* @component
|
|
11
|
-
* @slot -
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
15
|
-
* @
|
|
16
|
+
* @component selectable-box
|
|
17
|
+
* @slot default - Slot for box's content.
|
|
18
|
+
* @event {CustomEvent<undefined>} change - Fired when the checked state changes
|
|
19
|
+
* @testAction check check #control
|
|
20
|
+
* @testAction uncheck uncheck #control
|
|
21
|
+
* @testQuery checked checked true
|
|
22
|
+
* @testQuery unchecked checked false
|
|
23
|
+
* @testRef control nestedShadow [data-vvd-component].control div.control
|
|
16
24
|
*/
|
|
17
|
-
var
|
|
25
|
+
var SelectableBox = class extends require_delegates_aria.DelegatesAria(require_vivid_element.VividElement) {
|
|
18
26
|
constructor(..._args) {
|
|
19
27
|
super(..._args);
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
26
|
-
super.attributeChangedCallback(name, oldValue, newValue);
|
|
27
|
-
switch (name) {
|
|
28
|
-
case "open": if (this.open) this.#open();
|
|
29
|
-
else this.#close();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
#close() {
|
|
33
|
-
this.$emit("close", void 0, { bubbles: false });
|
|
34
|
-
}
|
|
35
|
-
#open() {
|
|
36
|
-
this.$emit("open", void 0, { bubbles: false });
|
|
28
|
+
this.checked = false;
|
|
29
|
+
this.clickableBox = false;
|
|
30
|
+
this.controlPlacement = "end-stacked";
|
|
31
|
+
this.tight = false;
|
|
32
|
+
this.disabled = false;
|
|
37
33
|
}
|
|
38
34
|
/** @internal */
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
_handleCheckedChange() {
|
|
36
|
+
if (this.disabled) return;
|
|
37
|
+
if (this.controlType === "radio" && this.checked) return;
|
|
38
|
+
this.checked = !this.checked;
|
|
39
|
+
if (this.clickableBox) this.$emit("change");
|
|
44
40
|
}
|
|
45
41
|
/** @internal */
|
|
46
|
-
|
|
47
|
-
if (this
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
_handleKeydown(event) {
|
|
43
|
+
if (this.disabled) return true;
|
|
44
|
+
if ((event.code === "Space" || event.code === "Enter") && this.clickableBox) {
|
|
45
|
+
this._handleCheckedChange();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
return true;
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })],
|
|
54
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], SelectableBox.prototype, "checked", void 0);
|
|
52
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
53
|
+
attribute: "clickable-box",
|
|
54
|
+
mode: "boolean"
|
|
55
|
+
})], SelectableBox.prototype, "clickableBox", void 0);
|
|
56
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], SelectableBox.prototype, "connotation", void 0);
|
|
57
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "control-type" })], SelectableBox.prototype, "controlType", void 0);
|
|
58
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
59
|
+
attribute: "control-placement",
|
|
60
|
+
mode: "fromView"
|
|
61
|
+
})], SelectableBox.prototype, "controlPlacement", void 0);
|
|
62
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], SelectableBox.prototype, "tight", void 0);
|
|
63
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], SelectableBox.prototype, "disabled", void 0);
|
|
60
64
|
//#endregion
|
|
61
|
-
//#region src/lib/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
//#region src/lib/selectable-box/selectable-box.template.ts
|
|
66
|
+
function handleControlChange(x) {
|
|
67
|
+
if (!x.clickableBox) x._handleCheckedChange();
|
|
68
|
+
}
|
|
69
|
+
function checkbox(context) {
|
|
70
|
+
const checkboxTag = context.tagFor(require_definition.Checkbox);
|
|
71
|
+
return _microsoft_fast_element.html`${(0, _microsoft_fast_element.when)((x) => x.controlType !== "radio", _microsoft_fast_element.html`
|
|
72
|
+
<${checkboxTag}
|
|
73
|
+
${require_delegates_aria.delegateAria({ ariaLabel: (x) => !x.clickableBox && x.ariaLabel ? x.ariaLabel : null }, { onlySpecified: true })}
|
|
74
|
+
@change="${(x) => handleControlChange(x)}"
|
|
75
|
+
class="control checkbox ${(x) => x.controlPlacement}"
|
|
76
|
+
connotation="${(x) => x.connotation === "cta" ? require_enums.Connotation.CTA : require_enums.Connotation.Accent}"
|
|
77
|
+
:checked="${(x) => x.checked}"
|
|
78
|
+
?disabled="${(x) => x.disabled}"
|
|
79
|
+
inert="${(x) => x.clickableBox ? true : null}"
|
|
80
|
+
></${checkboxTag}>`)} `;
|
|
81
|
+
}
|
|
82
|
+
function radio(context) {
|
|
83
|
+
const radioTag = context.tagFor(require_definition$1.Radio);
|
|
84
|
+
return _microsoft_fast_element.html`${(0, _microsoft_fast_element.when)((x) => x.controlType === "radio", _microsoft_fast_element.html`
|
|
85
|
+
<${radioTag}
|
|
86
|
+
${require_delegates_aria.delegateAria({ ariaLabel: (x) => !x.clickableBox && x.ariaLabel ? x.ariaLabel : null }, { onlySpecified: true })}
|
|
87
|
+
@change="${(x) => handleControlChange(x)}"
|
|
88
|
+
class="control radio ${(x) => x.controlPlacement}"
|
|
89
|
+
connotation="${(x) => x.connotation === "cta" ? require_enums.Connotation.CTA : require_enums.Connotation.Accent}"
|
|
90
|
+
:checked="${(x) => x.checked}"
|
|
91
|
+
?disabled="${(x) => x.disabled}"
|
|
92
|
+
inert="${(x) => x.clickableBox ? true : null}"
|
|
93
|
+
></${radioTag}>`)} `;
|
|
94
|
+
}
|
|
95
|
+
var SelectableBoxTemplate = (context) => {
|
|
96
|
+
return _microsoft_fast_element.html`<template>
|
|
97
|
+
<div
|
|
98
|
+
class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], ["tight", x.tight], ["selected", x.checked], ["clickable", x.clickableBox], ["readonly", !x.clickableBox], [`control-placement-${x.controlPlacement}`, Boolean(x.controlPlacement)], ["disabled", x.disabled])}"
|
|
99
|
+
tabindex="${(x) => x.clickableBox && !x.disabled ? "0" : null}"
|
|
100
|
+
${require_delegates_aria.delegateAria({
|
|
101
|
+
role: (x) => x.clickableBox ? "button" : null,
|
|
102
|
+
ariaPressed: (x) => x.clickableBox ? x.checked ? "true" : "false" : null,
|
|
103
|
+
ariaLabel: (x) => x.clickableBox ? x.ariaLabel : null,
|
|
104
|
+
ariaDisabled: (x) => x.clickableBox && x.disabled ? "true" : null
|
|
105
|
+
})}
|
|
106
|
+
@keydown="${(x, c) => x._handleKeydown(c.event)}"
|
|
107
|
+
@click="${(x) => x.clickableBox ? x._handleCheckedChange() : null}"
|
|
108
|
+
>
|
|
109
|
+
${checkbox(context)} ${radio(context)}
|
|
110
|
+
<slot></slot>
|
|
111
|
+
</div>
|
|
112
|
+
</template>`;
|
|
113
|
+
};
|
|
81
114
|
//#endregion
|
|
82
|
-
//#region src/lib/
|
|
115
|
+
//#region src/lib/selectable-box/definition.ts
|
|
83
116
|
/** @internal */
|
|
84
|
-
var
|
|
117
|
+
var selectableBoxDefinition = require_vivid_element.defineVividComponent("selectable-box", SelectableBox, SelectableBoxTemplate, [require_definition.checkboxDefinition, require_definition$1.radioDefinition], {
|
|
118
|
+
styles: selectable_box_default,
|
|
119
|
+
shadowOptions: { delegatesFocus: true }
|
|
120
|
+
});
|
|
85
121
|
/**
|
|
86
|
-
* Registers the
|
|
122
|
+
* Registers the selectable-box element with the design system.
|
|
87
123
|
*
|
|
88
124
|
* @param prefix - the prefix to use for the component name
|
|
89
125
|
*/
|
|
90
|
-
var
|
|
126
|
+
var registerSelectableBox = require_vivid_element.createRegisterFunction(selectableBoxDefinition);
|
|
91
127
|
//#endregion
|
|
92
|
-
Object.defineProperty(exports, "
|
|
128
|
+
Object.defineProperty(exports, "SelectableBox", {
|
|
93
129
|
enumerable: true,
|
|
94
130
|
get: function() {
|
|
95
|
-
return
|
|
131
|
+
return SelectableBox;
|
|
96
132
|
}
|
|
97
133
|
});
|
|
98
|
-
Object.defineProperty(exports, "
|
|
134
|
+
Object.defineProperty(exports, "registerSelectableBox", {
|
|
99
135
|
enumerable: true,
|
|
100
136
|
get: function() {
|
|
101
|
-
return
|
|
137
|
+
return registerSelectableBox;
|
|
102
138
|
}
|
|
103
139
|
});
|
|
104
|
-
Object.defineProperty(exports, "
|
|
140
|
+
Object.defineProperty(exports, "selectableBoxDefinition", {
|
|
105
141
|
enumerable: true,
|
|
106
142
|
get: function() {
|
|
107
|
-
return
|
|
143
|
+
return selectableBoxDefinition;
|
|
108
144
|
}
|
|
109
145
|
});
|
|
@@ -1,85 +1,127 @@
|
|
|
1
1
|
import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
2
|
import { t as __decorate } from "./decorate.js";
|
|
3
|
-
import { t as
|
|
3
|
+
import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
|
|
4
|
+
import { r as Connotation } from "./enums.js";
|
|
5
|
+
import { r as Checkbox, t as checkboxDefinition } from "./definition23.js";
|
|
6
|
+
import { r as Radio, t as radioDefinition } from "./definition58.js";
|
|
4
7
|
import { attr, html, when } from "@microsoft/fast-element";
|
|
5
8
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
6
|
-
//#region src/lib/
|
|
9
|
+
//#region src/lib/selectable-box/selectable-box.scss?inline
|
|
10
|
+
var selectable_box_default = ":host{display:flex}.base.connotation-cta{--_connotation-color-firm-all:var(--vvd-selectable-box-cta-firm-all,var(--vvd-color-cta-600));--_connotation-color-pale:var(--vvd-selectable-box-cta-pale,var(--vvd-color-cta-300));--_connotation-color-fierce:var(--vvd-selectable-box-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-faint:var(--vvd-selectable-box-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-selectable-box-cta-soft,var(--vvd-color-cta-100))}.base:not(.connotation-cta){--_connotation-color-firm-all:var(--vvd-selectable-box-accent-firm-all,var(--vvd-color-neutral-600));--_connotation-color-pale:var(--vvd-selectable-box-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-fierce:var(--vvd-selectable-box-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-faint:var(--vvd-selectable-box-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-selectable-box-accent-soft,var(--vvd-color-neutral-100))}.base{--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-pale)}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-firm-all)}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-firm-all)}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:var(--_connotation-color-pale)}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:var(--_connotation-color-firm-all)}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:var(--_connotation-color-firm-all)}.base:disabled,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--vvd-color-neutral-100)}.base{--control-offset:calc(var(--selectable-box-spacing,16px) + 36px);padding:var(--selectable-box-spacing,16px);border:1px solid var(--_appearance-color-outline);background-color:var(--_appearance-color-fill);text-align:start;border-radius:8px;inline-size:100%;position:relative}.base.control-placement-end-stacked,.base.control-placement-start-stacked{padding-block-start:var(--control-offset)}.base.control-placement-start{padding-inline-start:var(--control-offset)}.base.control-placement-end{padding-inline-end:var(--control-offset)}.base:focus-visible{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}.base.tight{min-height:calc(var(--selectable-box-spacing,16px) * 2 + 22px);padding:0;overflow:hidden}.base.selected{background-color:var(--selectable-box-checked-bg,var(--_appearance-color-fill))}.base.clickable{cursor:pointer}.control{position:absolute;inset-block-start:var(--selectable-box-spacing,16px)}.control.start-stacked,.control.start{inset-inline-start:var(--selectable-box-spacing,16px)}.control.end-stacked,.control.end{inset-inline-end:var(--selectable-box-spacing,16px)}";
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/lib/selectable-box/selectable-box.ts
|
|
7
13
|
/**
|
|
8
14
|
* @public
|
|
9
|
-
* @component
|
|
10
|
-
* @slot -
|
|
11
|
-
* @
|
|
12
|
-
* @
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
15
|
+
* @component selectable-box
|
|
16
|
+
* @slot default - Slot for box's content.
|
|
17
|
+
* @event {CustomEvent<undefined>} change - Fired when the checked state changes
|
|
18
|
+
* @testAction check check #control
|
|
19
|
+
* @testAction uncheck uncheck #control
|
|
20
|
+
* @testQuery checked checked true
|
|
21
|
+
* @testQuery unchecked checked false
|
|
22
|
+
* @testRef control nestedShadow [data-vvd-component].control div.control
|
|
15
23
|
*/
|
|
16
|
-
var
|
|
24
|
+
var SelectableBox = class extends DelegatesAria(VividElement) {
|
|
17
25
|
constructor(..._args) {
|
|
18
26
|
super(..._args);
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
25
|
-
super.attributeChangedCallback(name, oldValue, newValue);
|
|
26
|
-
switch (name) {
|
|
27
|
-
case "open": if (this.open) this.#open();
|
|
28
|
-
else this.#close();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
#close() {
|
|
32
|
-
this.$emit("close", void 0, { bubbles: false });
|
|
33
|
-
}
|
|
34
|
-
#open() {
|
|
35
|
-
this.$emit("open", void 0, { bubbles: false });
|
|
27
|
+
this.checked = false;
|
|
28
|
+
this.clickableBox = false;
|
|
29
|
+
this.controlPlacement = "end-stacked";
|
|
30
|
+
this.tight = false;
|
|
31
|
+
this.disabled = false;
|
|
36
32
|
}
|
|
37
33
|
/** @internal */
|
|
38
|
-
|
|
39
|
-
if (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
_handleCheckedChange() {
|
|
35
|
+
if (this.disabled) return;
|
|
36
|
+
if (this.controlType === "radio" && this.checked) return;
|
|
37
|
+
this.checked = !this.checked;
|
|
38
|
+
if (this.clickableBox) this.$emit("change");
|
|
43
39
|
}
|
|
44
40
|
/** @internal */
|
|
45
|
-
|
|
46
|
-
if (this
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
_handleKeydown(event) {
|
|
42
|
+
if (this.disabled) return true;
|
|
43
|
+
if ((event.code === "Space" || event.code === "Enter") && this.clickableBox) {
|
|
44
|
+
this._handleCheckedChange();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
50
48
|
}
|
|
51
49
|
};
|
|
52
|
-
__decorate([attr({ mode: "boolean" })],
|
|
53
|
-
__decorate([attr({
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
__decorate([attr({ mode: "boolean" })], SelectableBox.prototype, "checked", void 0);
|
|
51
|
+
__decorate([attr({
|
|
52
|
+
attribute: "clickable-box",
|
|
53
|
+
mode: "boolean"
|
|
54
|
+
})], SelectableBox.prototype, "clickableBox", void 0);
|
|
55
|
+
__decorate([attr], SelectableBox.prototype, "connotation", void 0);
|
|
56
|
+
__decorate([attr({ attribute: "control-type" })], SelectableBox.prototype, "controlType", void 0);
|
|
57
|
+
__decorate([attr({
|
|
58
|
+
attribute: "control-placement",
|
|
59
|
+
mode: "fromView"
|
|
60
|
+
})], SelectableBox.prototype, "controlPlacement", void 0);
|
|
61
|
+
__decorate([attr({ mode: "boolean" })], SelectableBox.prototype, "tight", void 0);
|
|
62
|
+
__decorate([attr({ mode: "boolean" })], SelectableBox.prototype, "disabled", void 0);
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/lib/selectable-box/selectable-box.template.ts
|
|
65
|
+
function handleControlChange(x) {
|
|
66
|
+
if (!x.clickableBox) x._handleCheckedChange();
|
|
67
|
+
}
|
|
68
|
+
function checkbox(context) {
|
|
69
|
+
const checkboxTag = context.tagFor(Checkbox);
|
|
70
|
+
return html`${when((x) => x.controlType !== "radio", html`
|
|
71
|
+
<${checkboxTag}
|
|
72
|
+
${delegateAria({ ariaLabel: (x) => !x.clickableBox && x.ariaLabel ? x.ariaLabel : null }, { onlySpecified: true })}
|
|
73
|
+
@change="${(x) => handleControlChange(x)}"
|
|
74
|
+
class="control checkbox ${(x) => x.controlPlacement}"
|
|
75
|
+
connotation="${(x) => x.connotation === "cta" ? Connotation.CTA : Connotation.Accent}"
|
|
76
|
+
:checked="${(x) => x.checked}"
|
|
77
|
+
?disabled="${(x) => x.disabled}"
|
|
78
|
+
inert="${(x) => x.clickableBox ? true : null}"
|
|
79
|
+
></${checkboxTag}>`)} `;
|
|
80
|
+
}
|
|
81
|
+
function radio(context) {
|
|
82
|
+
const radioTag = context.tagFor(Radio);
|
|
83
|
+
return html`${when((x) => x.controlType === "radio", html`
|
|
84
|
+
<${radioTag}
|
|
85
|
+
${delegateAria({ ariaLabel: (x) => !x.clickableBox && x.ariaLabel ? x.ariaLabel : null }, { onlySpecified: true })}
|
|
86
|
+
@change="${(x) => handleControlChange(x)}"
|
|
87
|
+
class="control radio ${(x) => x.controlPlacement}"
|
|
88
|
+
connotation="${(x) => x.connotation === "cta" ? Connotation.CTA : Connotation.Accent}"
|
|
89
|
+
:checked="${(x) => x.checked}"
|
|
90
|
+
?disabled="${(x) => x.disabled}"
|
|
91
|
+
inert="${(x) => x.clickableBox ? true : null}"
|
|
92
|
+
></${radioTag}>`)} `;
|
|
93
|
+
}
|
|
94
|
+
var SelectableBoxTemplate = (context) => {
|
|
95
|
+
return html`<template>
|
|
96
|
+
<div
|
|
97
|
+
class="${(x) => classNames("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], ["tight", x.tight], ["selected", x.checked], ["clickable", x.clickableBox], ["readonly", !x.clickableBox], [`control-placement-${x.controlPlacement}`, Boolean(x.controlPlacement)], ["disabled", x.disabled])}"
|
|
98
|
+
tabindex="${(x) => x.clickableBox && !x.disabled ? "0" : null}"
|
|
99
|
+
${delegateAria({
|
|
100
|
+
role: (x) => x.clickableBox ? "button" : null,
|
|
101
|
+
ariaPressed: (x) => x.clickableBox ? x.checked ? "true" : "false" : null,
|
|
102
|
+
ariaLabel: (x) => x.clickableBox ? x.ariaLabel : null,
|
|
103
|
+
ariaDisabled: (x) => x.clickableBox && x.disabled ? "true" : null
|
|
104
|
+
})}
|
|
105
|
+
@keydown="${(x, c) => x._handleKeydown(c.event)}"
|
|
106
|
+
@click="${(x) => x.clickableBox ? x._handleCheckedChange() : null}"
|
|
107
|
+
>
|
|
108
|
+
${checkbox(context)} ${radio(context)}
|
|
109
|
+
<slot></slot>
|
|
110
|
+
</div>
|
|
111
|
+
</template>`;
|
|
112
|
+
};
|
|
56
113
|
//#endregion
|
|
57
|
-
//#region src/lib/
|
|
114
|
+
//#region src/lib/selectable-box/definition.ts
|
|
58
115
|
/** @internal */
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
part="base ${(x) => x.alternate ? "vvd-theme-alternate" : ""}"
|
|
64
|
-
@keydown="${(x, c) => x._onKeydown(c.event)}"
|
|
65
|
-
>
|
|
66
|
-
<slot></slot>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div class="side-drawer-app-content" ?inert="${(x) => x.open && x.modal}">
|
|
70
|
-
<slot name="app-content"></slot>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
${when((x) => x.modal, html`<div
|
|
74
|
-
class="${(x) => classNames("scrim", ["open", x.open])}"
|
|
75
|
-
@click="${(x) => x._handleCloseRequest()}"
|
|
76
|
-
></div>`)}
|
|
77
|
-
`, [], { styles: ":host{display:block}.side-drawer-app-content{block-size:100%}.control{--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in sRGB, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.control ::-webkit-scrollbar{width:4px}.control ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.control ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.control{z-index:1;background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);inline-size:280px;position:fixed;inset-block:0;overflow-y:auto}.control[part~=vvd-theme-alternate]{background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);color-scheme:var(--vvd-color-scheme)}.control.trailing{inset-inline-end:0}.control:not(.open).trailing{transform:translate(100%)}.control:not(.open):not(.trailing){transform:translate(-100%)}.control.open:not(.modal).trailing+.side-drawer-app-content{margin-inline-end:var(--side-drawer-app-content-offset,280px)}.control.open:not(.modal):not(.trailing)+.side-drawer-app-content{margin-inline-start:var(--side-drawer-app-content-offset,280px)}@media (prefers-reduced-motion:no-preference){.control{transition:transform .2s cubic-bezier(.4,0,.2,1)}}.scrim{background-color:var(--vvd-color-canvas-text,currentColor);opacity:.5;position:fixed;inset:0}.scrim:not(.open){display:none}" });
|
|
116
|
+
var selectableBoxDefinition = defineVividComponent("selectable-box", SelectableBox, SelectableBoxTemplate, [checkboxDefinition, radioDefinition], {
|
|
117
|
+
styles: selectable_box_default,
|
|
118
|
+
shadowOptions: { delegatesFocus: true }
|
|
119
|
+
});
|
|
78
120
|
/**
|
|
79
|
-
* Registers the
|
|
121
|
+
* Registers the selectable-box element with the design system.
|
|
80
122
|
*
|
|
81
123
|
* @param prefix - the prefix to use for the component name
|
|
82
124
|
*/
|
|
83
|
-
var
|
|
125
|
+
var registerSelectableBox = createRegisterFunction(selectableBoxDefinition);
|
|
84
126
|
//#endregion
|
|
85
|
-
export {
|
|
127
|
+
export { selectableBoxDefinition as n, SelectableBox as r, registerSelectableBox as t };
|