@vonage/vivid 5.23.1 → 5.25.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/README.md +1 -1
- 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/avatar/index.cjs +10 -10
- package/avatar/index.js +4 -3
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb-item/index.cjs +9 -5
- package/breadcrumb-item/index.js +11 -6
- package/bundled/affix.cjs +1 -1
- package/bundled/affix.js +1 -1
- package/bundled/definition10.cjs +2 -1
- package/bundled/definition10.js +3 -2
- package/bundled/definition11.cjs +4 -4
- package/bundled/definition11.js +4 -3
- package/bundled/definition12.cjs +1 -1
- package/bundled/definition12.js +1 -0
- package/bundled/definition15.cjs +8 -7
- package/bundled/definition15.js +27 -24
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +22 -109
- package/bundled/definition18.cjs +12 -83
- package/bundled/definition18.js +20 -426
- package/bundled/definition19.cjs +87 -7
- package/bundled/definition19.js +433 -16
- package/bundled/definition20.cjs +7 -37
- package/bundled/definition20.js +17 -172
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +155 -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 +33 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +81 -0
- package/bundled/definition3.cjs +5 -5
- package/bundled/definition3.js +10 -40
- package/bundled/definition4.cjs +6 -6
- package/bundled/definition4.js +4 -3
- package/bundled/definition6.cjs +11 -11
- package/bundled/definition6.js +4 -3
- package/bundled/definition9.cjs +12 -6
- package/bundled/definition9.js +66 -43
- package/bundled/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/icon.cjs +1 -0
- package/bundled/icon.js +34 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +28 -12
- package/bundled/mixins.cjs +8 -8
- package/bundled/mixins.js +4 -3
- package/bundled/optgroup.cjs +1 -0
- package/bundled/optgroup.js +27 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +93 -0
- 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/card/index.cjs +22 -22
- package/card/index.js +4 -3
- package/color-picker/index.cjs +18 -18
- package/color-picker/index.js +4 -3
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +31 -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 +8438 -7866
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +26 -26
- package/data-grid/index.js +9 -8
- 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 +7 -7
- package/dial-pad/index.js +124 -54
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/dialog/index.cjs +14 -14
- package/dialog/index.js +4 -3
- 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/empty-state/index.cjs +3 -3
- package/empty-state/index.js +4 -3
- 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/file-picker/index.cjs +7 -7
- package/file-picker/index.js +4 -3
- 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/icon/definition.cjs +2 -1
- package/icon/definition.js +2 -1
- package/index.cjs +209 -198
- package/index.js +59 -54
- 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 +3 -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 +8 -8
- package/lib/components.d.ts +2 -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 -2
- 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/listbox/definition.d.ts +3 -0
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +1302 -0
- package/lib/listbox/listbox.template.d.ts +3 -0
- package/lib/listbox/variations.browser-spec.d.ts +1 -0
- package/lib/menu/menu.d.ts +2 -3
- 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 -10
- 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/rich-text-editor/rte/features/base.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- 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 +3 -1
- package/lib/text-area/text-area.d.ts +8 -8
- package/lib/text-field/text-field.d.ts +10 -9
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/toggletip/toggletip.d.ts +3 -2
- package/lib/tooltip/tooltip.d.ts +3 -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/listbox/definition.cjs +5 -0
- package/listbox/definition.js +2 -0
- package/listbox/index.cjs +11 -0
- package/listbox/index.js +540 -0
- 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-disclosure/index.cjs +4 -4
- package/nav-disclosure/index.js +4 -3
- 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 +6 -0
- package/optgroup/definition.js +3 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/option/definition.cjs +2 -1
- package/option/definition.js +2 -1
- package/package.json +9 -8
- 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/popover/index.cjs +5 -5
- package/popover/index.js +4 -3
- 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 +13 -13
- package/rich-text-editor/index.js +26 -23
- 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 +23 -23
- package/searchable-select/index.js +67 -49
- 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/listbox/commands.d.ts +17 -0
- package/shared/listbox/move.d.ts +6 -0
- package/shared/listbox/options.d.ts +12 -0
- package/shared/listbox/selection.d.ts +28 -0
- package/shared/listbox/state.d.ts +26 -0
- package/shared/listbox/typeahead.d.ts +8 -0
- package/shared/listbox/with-options-filter.d.ts +440 -0
- package/shared/listbox/with-options.d.ts +862 -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/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +4 -3
- 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/table/index.cjs +13 -13
- package/table/index.js +4 -3
- 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/index.cjs +11 -11
- package/tag/index.js +4 -3
- 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/affix.cjs +2 -2
- package/unbundled/affix.js +1 -1
- package/unbundled/base-progress.cjs +1 -1
- package/unbundled/base-progress.js +1 -1
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/definition.cjs +2 -65
- package/unbundled/definition.js +4 -61
- package/unbundled/definition11.cjs +4 -3
- package/unbundled/definition11.js +3 -2
- package/unbundled/definition12.cjs +3 -2
- package/unbundled/definition12.js +3 -2
- package/unbundled/definition13.cjs +1 -1
- package/unbundled/definition13.js +1 -1
- package/unbundled/definition14.cjs +2 -1
- package/unbundled/definition14.js +2 -1
- package/unbundled/definition17.cjs +9 -4
- package/unbundled/definition17.js +9 -4
- package/unbundled/definition2.cjs +14 -3
- package/unbundled/definition2.js +15 -4
- package/unbundled/definition21.cjs +2 -1
- package/unbundled/definition21.js +2 -1
- package/unbundled/definition23.cjs +3 -1
- package/unbundled/definition23.js +4 -2
- package/unbundled/definition24.cjs +6 -4
- package/unbundled/definition24.js +6 -4
- package/unbundled/definition25.cjs +2 -1
- package/unbundled/definition25.js +2 -1
- package/unbundled/definition26.cjs +7 -4
- package/unbundled/definition26.js +7 -4
- package/unbundled/definition27.cjs +39 -5
- package/unbundled/definition27.js +40 -6
- package/unbundled/definition28.cjs +4 -3
- package/unbundled/definition28.js +4 -3
- package/unbundled/definition29.cjs +5 -168
- package/unbundled/definition29.js +11 -162
- package/unbundled/definition30.cjs +26 -506
- package/unbundled/definition30.js +24 -498
- package/unbundled/definition31.cjs +503 -39
- package/unbundled/definition31.js +501 -37
- package/unbundled/definition32.cjs +39 -239
- package/unbundled/definition32.js +36 -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 +1993 -26
- package/unbundled/definition35.js +1965 -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 +395 -227
- package/unbundled/definition40.js +393 -225
- package/unbundled/definition41.cjs +269 -47
- package/unbundled/definition41.js +264 -42
- package/unbundled/definition42.cjs +48 -67
- package/unbundled/definition42.js +45 -64
- package/unbundled/definition43.cjs +56 -383
- package/unbundled/definition43.js +55 -382
- package/unbundled/definition44.cjs +387 -44
- package/unbundled/definition44.js +383 -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 +589 -48
- package/unbundled/definition49.js +587 -47
- package/unbundled/definition50.cjs +90 -21
- package/unbundled/definition50.js +88 -16
- package/unbundled/definition51.cjs +47 -32
- package/unbundled/definition51.js +44 -29
- package/unbundled/definition52.cjs +22 -323
- package/unbundled/definition52.js +16 -320
- package/unbundled/definition53.cjs +33 -212
- package/unbundled/definition53.js +29 -208
- package/unbundled/definition54.cjs +318 -41
- package/unbundled/definition54.js +314 -37
- package/unbundled/definition55.cjs +199 -253
- package/unbundled/definition55.js +193 -247
- package/unbundled/definition56.cjs +45 -53
- package/unbundled/definition56.js +42 -49
- package/unbundled/definition57.cjs +255 -133
- package/unbundled/definition57.js +253 -128
- package/unbundled/definition58.cjs +49 -245
- package/unbundled/definition58.js +47 -244
- package/unbundled/definition59.cjs +127 -444
- package/unbundled/definition59.js +124 -444
- package/unbundled/definition6.cjs +2 -1
- package/unbundled/definition6.js +2 -1
- package/unbundled/definition60.cjs +230 -3746
- package/unbundled/definition60.js +223 -3576
- package/unbundled/definition61.cjs +427 -739
- package/unbundled/definition61.js +425 -737
- package/unbundled/definition62.cjs +3762 -103
- package/unbundled/definition62.js +3593 -97
- package/unbundled/definition63.cjs +678 -886
- package/unbundled/definition63.js +672 -877
- package/unbundled/definition64.cjs +104 -108
- package/unbundled/definition64.js +100 -104
- package/unbundled/definition65.cjs +999 -65
- package/unbundled/definition65.js +995 -58
- package/unbundled/definition66.cjs +105 -155
- package/unbundled/definition66.js +101 -151
- package/unbundled/definition67.cjs +71 -121
- package/unbundled/definition67.js +63 -119
- package/unbundled/definition68.cjs +162 -51
- package/unbundled/definition68.js +158 -47
- package/unbundled/definition69.cjs +117 -75
- package/unbundled/definition69.js +116 -71
- package/unbundled/definition70.cjs +59 -21
- package/unbundled/definition70.js +56 -15
- package/unbundled/definition71.cjs +80 -75
- package/unbundled/definition71.js +76 -74
- package/unbundled/definition72.cjs +20 -305
- package/unbundled/definition72.js +14 -230
- package/unbundled/definition73.cjs +75 -315
- package/unbundled/definition73.js +74 -307
- package/unbundled/definition74.cjs +308 -30
- package/unbundled/definition74.js +231 -24
- package/unbundled/definition75.cjs +314 -109
- package/unbundled/definition75.js +304 -106
- package/unbundled/definition76.cjs +26 -250
- package/unbundled/definition76.js +21 -246
- package/unbundled/definition77.cjs +133 -27
- package/unbundled/definition77.js +124 -25
- package/unbundled/definition78.cjs +230 -116
- package/unbundled/definition78.js +227 -107
- package/unbundled/definition79.cjs +28 -203
- package/unbundled/definition79.js +26 -193
- package/unbundled/definition80.cjs +126 -477
- package/unbundled/definition80.js +118 -473
- package/unbundled/definition81.cjs +221 -0
- package/unbundled/definition81.js +202 -0
- package/unbundled/definition82.cjs +517 -0
- package/unbundled/definition82.js +497 -0
- package/unbundled/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- package/unbundled/icon.cjs +67 -0
- package/unbundled/icon.js +61 -0
- package/unbundled/linkable.cjs +1 -1
- package/unbundled/linkable.js +1 -1
- package/unbundled/listbox.cjs +29 -7
- package/unbundled/listbox.js +29 -7
- package/unbundled/mixins.cjs +2 -1
- package/unbundled/mixins.js +2 -1
- package/unbundled/optgroup.cjs +66 -0
- package/unbundled/optgroup.js +54 -0
- package/unbundled/option.cjs +176 -0
- package/unbundled/option.js +164 -0
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- 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 +568 -231
|
@@ -1,407 +1,80 @@
|
|
|
1
|
-
import { d as createRegisterFunction,
|
|
2
|
-
import {
|
|
1
|
+
import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
+
import { t as iconDefinition } from "./definition.js";
|
|
3
3
|
import { t as __decorate } from "./decorate.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import { r as feedbackMessageDefinition, t as WithFeedback } from "./mixins.js";
|
|
9
|
-
import { t as FormElement } from "./form-element.js";
|
|
10
|
-
import { t as WithErrorText } from "./with-error-text.js";
|
|
11
|
-
import { t as WithContextualHelp } from "./with-contextual-help.js";
|
|
12
|
-
import { ExecutionContext, Observable, attr, html, nullableNumberConverter, observable, ref, repeat, slotted, volatile, when } from "@microsoft/fast-element";
|
|
4
|
+
import { a as affixIconTemplateFactory, i as IconWrapper, n as AffixIconWithTrailing } from "./affix.js";
|
|
5
|
+
import { n as delegateAria } from "./delegates-aria.js";
|
|
6
|
+
import { t as VividFoundationButton } from "./button.js";
|
|
7
|
+
import { attr, html, ref } from "@microsoft/fast-element";
|
|
13
8
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
14
|
-
//#region src/lib/
|
|
15
|
-
var
|
|
9
|
+
//#region src/lib/fab/fab.scss?inline
|
|
10
|
+
var fab_default = ".control.connotation-accent{--_connotation-color-primary:var(--vvd-fab-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-fab-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-fab-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-contrast:var(--vvd-fab-accent-contrast,var(--vvd-color-neutral-800));--_connotation-color-fierce:var(--vvd-fab-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-firm:var(--vvd-fab-accent-firm,var(--vvd-color-canvas-text))}.control.connotation-cta{--_connotation-color-primary:var(--vvd-fab-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-fab-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-fab-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-contrast:var(--vvd-fab-cta-contrast,var(--vvd-color-cta-800));--_connotation-color-fierce:var(--vvd-fab-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-firm:var(--vvd-fab-cta-firm,var(--vvd-color-cta-600))}.control.connotation-announcement{--_connotation-color-primary:var(--vvd-fab-announcement-primary,var(--vvd-color-announcement-500));--_connotation-color-primary-text:var(--vvd-fab-announcement-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-fab-announcement-primary-increment,var(--vvd-color-announcement-600));--_connotation-color-contrast:var(--vvd-fab-announcement-contrast,var(--vvd-color-announcement-800));--_connotation-color-fierce:var(--vvd-fab-announcement-fierce,var(--vvd-color-announcement-700));--_connotation-color-firm:var(--vvd-fab-announcement-firm,var(--vvd-color-announcement-600))}.control{--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary);--_appearance-color-outline:transparent}@media (hover:hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary-increment);--_appearance-color-outline:transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary-increment);--_appearance-color-outline:transparent}.control:disabled,.control.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:transparent}.control:active:where(:not(.disabled,:disabled)),.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-fierce);--_appearance-color-outline:transparent}.control{--_fab-inline-padding:12px;box-sizing:border-box;border-radius:var(--_fab-border-radius);background:var(--_appearance-color-fill,var(--_elevation-fill));block-size:var(--_fab-block-size);color:var(--_appearance-color-text,var(--vvd-color-canvas-text));align-items:center;column-gap:var(--fab-icon-gap);filter:var(--_elevation-shadow);font:var(--vvd-typography-base-bold);padding-inline:var(--_fab-inline-padding);vertical-align:middle;border:0;transition:background-color .15s linear,filter .15s linear;display:inline-flex}.control:not(.connotation-accent,.connotation-cta,.connotation-announcement){--focus-stroke-gap-color:transparent}.control:focus-visible{outline:none;position:relative}.control:focus-visible:after{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));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control{user-select:none}.control.size-expanded{--_fab-border-radius:40px;--_fab-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16));--_fab-inline-padding:20px}.control.size-condensed{--_fab-border-radius:20px;--_fab-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));font:var(--vvd-typography-base-condensed-bold)}.control.size-condensed [data-vvd-component=icon]{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 2)}.control:not(.size-expanded,.size-condensed){--_fab-border-radius:24px;--_fab-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control:not(.size-condensed){font:var(--vvd-typography-base-bold)}.control.icon-only{--_fab-inline-padding:0;border-radius:50%;place-content:center}@supports (aspect-ratio:1){.control.icon-only{aspect-ratio:1}}@supports not (aspect-ratio:1){.control.icon-only{inline-size:var(--_fab-block-size)}}.control:not(.icon-only){--fab-icon-gap:10px}.control.disabled{--_elevation-fill:var(--_vvd-tinted-color-surface-nonedp,var(--vvd-color-surface-nonedp));--_elevation-shadow:var(--_vvd-tinted-shadow-surface-nonedp,var(--vvd-shadow-surface-nonedp));cursor:not-allowed}.control:not(.disabled){--_elevation-fill:var(--_vvd-tinted-color-surface-4dp,var(--vvd-color-surface-4dp));--_elevation-shadow:var(--_vvd-tinted-shadow-surface-4dp,var(--vvd-shadow-surface-4dp));cursor:pointer}@media (hover:hover){.control:not(.disabled):hover{--_elevation-fill:var(--_vvd-tinted-color-surface-12dp,var(--vvd-color-surface-12dp));--_elevation-shadow:var(--_vvd-tinted-shadow-surface-12dp,var(--vvd-shadow-surface-12dp))}}.control:not(.disabled):active{--_elevation-fill:var(--_vvd-tinted-color-surface-24dp,var(--vvd-color-surface-24dp));--_elevation-shadow:var(--_vvd-tinted-shadow-surface-24dp,var(--vvd-shadow-surface-24dp))}slot[name=icon]{line-height:1}.icon-trailing slot[name=icon]{order:1;display:inline-block}.control.size-extended slot[name=icon]{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16)) / 2.3333)}.control:not(.size-extended) slot[name=icon]{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2)}";
|
|
16
11
|
//#endregion
|
|
17
|
-
//#region src/lib/
|
|
18
|
-
/** Extracts files from a DataTransfer, including files from directories. */
|
|
19
|
-
async function filesFromDataTransfer(dataTransfer) {
|
|
20
|
-
return dataTransfer.items?.[0]?.webkitGetAsEntry != null ? await filesFromDataTransferItems(dataTransfer.items) : Array.from(dataTransfer.files);
|
|
21
|
-
}
|
|
22
|
-
async function filesFromDataTransferItems(items) {
|
|
23
|
-
const result = [];
|
|
24
|
-
for (const item of items) {
|
|
25
|
-
const file = item.getAsFile();
|
|
26
|
-
if (file) result.push(Promise.resolve([file]));
|
|
27
|
-
else {
|
|
28
|
-
const entry = item.webkitGetAsEntry();
|
|
29
|
-
if (entry) result.push(filesFromEntry(entry, false));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return (await Promise.all(result)).flat();
|
|
33
|
-
}
|
|
34
|
-
var filesFromEntry = (entry, ignoreHiddenFiles) => {
|
|
35
|
-
const handleFileEntry = (file) => new Promise((resolve, reject) => {
|
|
36
|
-
file.file((f) => {
|
|
37
|
-
if (ignoreHiddenFiles && f.name.substring(0, 1) === ".") resolve([]);
|
|
38
|
-
else resolve([f]);
|
|
39
|
-
}, reject);
|
|
40
|
-
});
|
|
41
|
-
const promise = entry.isFile ? handleFileEntry(entry) : entry.isDirectory ? filesFromDirectory(entry) : Promise.resolve([]);
|
|
42
|
-
promise.catch(() => null);
|
|
43
|
-
return promise;
|
|
44
|
-
};
|
|
45
|
-
var filesFromDirectory = async (directory) => new Promise((resolve, reject) => {
|
|
46
|
-
const result = [];
|
|
47
|
-
const dirReader = directory.createReader();
|
|
48
|
-
const readEntries = () => {
|
|
49
|
-
dirReader.readEntries((entries) => {
|
|
50
|
-
for (const entry of entries) result.push(filesFromEntry(entry, true));
|
|
51
|
-
if (entries.length) readEntries();
|
|
52
|
-
else resolve(Promise.all(result).then((r) => r.flat()));
|
|
53
|
-
}, reject);
|
|
54
|
-
};
|
|
55
|
-
readEntries();
|
|
56
|
-
});
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/lib/file-picker/accept.ts
|
|
59
|
-
/** Match a file against an accept string, like native file input */
|
|
60
|
-
function isAcceptedFileType(file, accept) {
|
|
61
|
-
if (!accept) return true;
|
|
62
|
-
const validTypes = accept.split(",");
|
|
63
|
-
const isBasePattern = (type) => /\/\*$/.test(type);
|
|
64
|
-
const baseType = (type) => type.replace(/\/.*$/, "");
|
|
65
|
-
for (let validType of validTypes) {
|
|
66
|
-
validType = validType.trim();
|
|
67
|
-
if (validType.charAt(0) === ".") {
|
|
68
|
-
if (file.name.toLowerCase().endsWith(validType.toLowerCase())) return true;
|
|
69
|
-
} else if (isBasePattern(validType)) {
|
|
70
|
-
if (baseType(file.type) === baseType(validType)) return true;
|
|
71
|
-
} else if (file.type === validType) return true;
|
|
72
|
-
}
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/lib/file-picker/file-picker.ts
|
|
12
|
+
//#region src/lib/fab/fab.ts
|
|
77
13
|
/**
|
|
78
14
|
* @public
|
|
79
|
-
* @component
|
|
80
|
-
* @slot
|
|
81
|
-
* @
|
|
15
|
+
* @component fab
|
|
16
|
+
* @slot icon - The preferred way to add an icon to the component.
|
|
17
|
+
* @testSelector byLabel byLabel
|
|
18
|
+
* @testAction click click #control
|
|
19
|
+
* @testRef control shadow button.control
|
|
82
20
|
*/
|
|
83
|
-
var
|
|
84
|
-
constructor(..._args) {
|
|
85
|
-
super(..._args);
|
|
86
|
-
this.singleFile = false;
|
|
87
|
-
this.maxFiles = null;
|
|
88
|
-
this.maxFileSize = 256;
|
|
89
|
-
this.valueChanged = (previous, next) => {
|
|
90
|
-
super.valueChanged(previous, next);
|
|
91
|
-
if (next === "" && this.files.length) this.removeAllFiles();
|
|
92
|
-
};
|
|
93
|
-
this.proxy = document.createElement("input");
|
|
94
|
-
this.setFormValue = (value, state) => {
|
|
95
|
-
if (typeof value === "string") return;
|
|
96
|
-
super.setFormValue(value, state);
|
|
97
|
-
};
|
|
98
|
-
this._customValidationError = null;
|
|
99
|
-
this.#customValidationChangeHandler = { handleChange: () => {
|
|
100
|
-
this._customValidationError = this.#customValidationChangeObserver.observe(this, ExecutionContext.default);
|
|
101
|
-
} };
|
|
102
|
-
this._dragHover = false;
|
|
103
|
-
this._allFiles = [];
|
|
104
|
-
}
|
|
105
|
-
/** @internal */
|
|
106
|
-
nameChanged(previous, next) {
|
|
107
|
-
super.nameChanged(previous, next);
|
|
108
|
-
this.#updateFormValue();
|
|
109
|
-
}
|
|
110
|
-
#updateFormValue() {
|
|
111
|
-
const files = this.files;
|
|
112
|
-
if (!this.name) this.setFormValue(null);
|
|
113
|
-
else {
|
|
114
|
-
const formData = new FormData();
|
|
115
|
-
for (const file of files) formData.append(this.name, file);
|
|
116
|
-
this.setFormValue(formData);
|
|
117
|
-
}
|
|
118
|
-
this.#setValueToAFakePathLikeNativeInput();
|
|
119
|
-
}
|
|
120
|
-
#setValueToAFakePathLikeNativeInput() {
|
|
121
|
-
this.value = this.files.length > 0 ? `C:\\fakepath\\${this.files[0].name}` : "";
|
|
122
|
-
}
|
|
123
|
-
/** @internal */
|
|
124
|
-
validate() {
|
|
125
|
-
super.validate(this.control);
|
|
126
|
-
}
|
|
127
|
-
/** @internal */
|
|
128
|
-
formResetCallback() {
|
|
129
|
-
this.removeAllFiles();
|
|
130
|
-
super.formResetCallback();
|
|
131
|
-
}
|
|
132
|
-
#getCustomValidationError() {
|
|
133
|
-
if (this.rejectedFiles.length > 0) return this.locale.filePicker.invalidFilesError;
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
/** @internal */
|
|
137
|
-
_customValidationErrorChanged() {
|
|
138
|
-
/* v8 ignore if -- @preserve */
|
|
139
|
-
if (this.proxy) this.proxy.setCustomValidity(this._customValidationError ?? "");
|
|
140
|
-
this.validate();
|
|
141
|
-
}
|
|
142
|
-
#customValidationChangeHandler;
|
|
143
|
-
#customValidationChangeObserver;
|
|
144
|
-
#startObservingCustomValidation() {
|
|
145
|
-
this.#customValidationChangeObserver = Observable.binding(() => this.#getCustomValidationError(), this.#customValidationChangeHandler, true);
|
|
146
|
-
this.#customValidationChangeHandler.handleChange();
|
|
147
|
-
}
|
|
148
|
-
#stopObservingCustomValidation() {
|
|
149
|
-
this.#customValidationChangeObserver.dispose();
|
|
150
|
-
}
|
|
151
|
-
connectedCallback() {
|
|
152
|
-
super.connectedCallback();
|
|
153
|
-
this.#startObservingCustomValidation();
|
|
154
|
-
}
|
|
155
|
-
disconnectedCallback() {
|
|
156
|
-
super.disconnectedCallback();
|
|
157
|
-
this.#stopObservingCustomValidation();
|
|
158
|
-
}
|
|
159
|
-
/** @internal */
|
|
160
|
-
_onDragEnter() {
|
|
161
|
-
if (this.disabled) return true;
|
|
162
|
-
this._dragHover = true;
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
/** @internal */
|
|
166
|
-
_onDragOver(e) {
|
|
167
|
-
if (this.disabled) return true;
|
|
168
|
-
if (!e.dataTransfer) return true;
|
|
169
|
-
const effect = e.dataTransfer.effectAllowed;
|
|
170
|
-
e.dataTransfer.dropEffect = "move" === effect || "linkMove" === effect ? "move" : "copy";
|
|
171
|
-
return false;
|
|
172
|
-
}
|
|
173
|
-
/** @internal */
|
|
174
|
-
_onDragLeave(e) {
|
|
175
|
-
if (this.disabled) return true;
|
|
176
|
-
/* v8 ignore else -- @preserve */
|
|
177
|
-
if (e.currentTarget === e.target) this._dragHover = false;
|
|
178
|
-
return true;
|
|
179
|
-
}
|
|
180
|
-
/** @internal */
|
|
181
|
-
_onDrop(e) {
|
|
182
|
-
if (this.disabled) return true;
|
|
183
|
-
this._dragHover = false;
|
|
184
|
-
if (!e.dataTransfer) return true;
|
|
185
|
-
filesFromDataTransfer(e.dataTransfer).then((files) => this.#addFiles(files)).catch((err) => {
|
|
186
|
-
console.error(err);
|
|
187
|
-
});
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
/** @internal */
|
|
191
|
-
_onDragEnd() {
|
|
192
|
-
if (this.disabled) return true;
|
|
193
|
-
this._dragHover = false;
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
/** @internal */
|
|
197
|
-
_onControlClick() {
|
|
198
|
-
/* v8 ignore if -- @preserve */
|
|
199
|
-
if (this.disabled) return;
|
|
200
|
-
this._hiddenInput.click();
|
|
201
|
-
}
|
|
202
|
-
/** @internal */
|
|
203
|
-
_onRemoveFileClick(file) {
|
|
204
|
-
if (this.disabled) return;
|
|
205
|
-
this._allFiles = this._allFiles.filter((f) => f !== file);
|
|
206
|
-
this.$emit("change");
|
|
207
|
-
}
|
|
208
|
-
/** @internal */
|
|
209
|
-
_allFilesChanged() {
|
|
210
|
-
this.#updateFormValue();
|
|
211
|
-
}
|
|
212
|
-
#addFiles(files) {
|
|
213
|
-
const newFiles = Array.from(files).filter((file) => !this._allFiles.some((existingFile) => existingFile.name === file.name && existingFile.size === file.size));
|
|
214
|
-
if (this.singleFile && newFiles.length > 0) this._allFiles = [newFiles[newFiles.length - 1]];
|
|
215
|
-
else this._allFiles = [...this._allFiles, ...newFiles];
|
|
216
|
-
this.$emit("change");
|
|
217
|
-
}
|
|
218
|
-
/** Removes all files from the File Picker. */
|
|
219
|
-
removeAllFiles() {
|
|
220
|
-
this._allFiles = [];
|
|
221
|
-
}
|
|
21
|
+
var Fab = class extends AffixIconWithTrailing(VividFoundationButton) {
|
|
222
22
|
/**
|
|
223
|
-
*
|
|
23
|
+
* Handles click events.
|
|
24
|
+
* Prevents interaction when disabled.
|
|
25
|
+
*
|
|
224
26
|
* @internal
|
|
225
27
|
*/
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
};
|
|
233
|
-
const result = [];
|
|
234
|
-
let validFileIndex = 0;
|
|
235
|
-
for (const file of this._allFiles) {
|
|
236
|
-
const validatedFile = {
|
|
237
|
-
file,
|
|
238
|
-
validationError: validationError(file, validFileIndex)
|
|
239
|
-
};
|
|
240
|
-
result.push(validatedFile);
|
|
241
|
-
if (!validatedFile.validationError) validFileIndex++;
|
|
28
|
+
clickHandler(event) {
|
|
29
|
+
/* v8 ignore else -- @preserve */
|
|
30
|
+
if (this.disabled) {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
event.stopImmediatePropagation();
|
|
33
|
+
return;
|
|
242
34
|
}
|
|
243
|
-
return
|
|
244
|
-
}
|
|
245
|
-
/** List of files that have been added to the file picker and passed validation */
|
|
246
|
-
get files() {
|
|
247
|
-
return this._validatedFiles.filter((f) => !f.validationError).map((f) => f.file);
|
|
248
|
-
}
|
|
249
|
-
/** List of files that have been added to the file picker but failed validation */
|
|
250
|
-
get rejectedFiles() {
|
|
251
|
-
return this._validatedFiles.filter((f) => !!f.validationError).map((f) => f.file);
|
|
252
|
-
}
|
|
253
|
-
/** @internal */
|
|
254
|
-
_onHiddenInputChange(e) {
|
|
255
|
-
this.#addFiles(this._hiddenInput.files);
|
|
256
|
-
this._hiddenInput.value = "";
|
|
257
|
-
e.stopPropagation();
|
|
258
|
-
}
|
|
259
|
-
/** @internal */
|
|
260
|
-
_formatNumber(value) {
|
|
261
|
-
const str = String(value);
|
|
262
|
-
if (this.locale.common.useCommaAsDecimalSeparator) return str.replace(".", ",");
|
|
263
|
-
return str;
|
|
35
|
+
return true;
|
|
264
36
|
}
|
|
265
37
|
};
|
|
266
|
-
__decorate([attr
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
})], FilePicker.prototype, "singleFile", void 0);
|
|
270
|
-
__decorate([attr({
|
|
271
|
-
attribute: "max-files",
|
|
272
|
-
converter: nullableNumberConverter,
|
|
273
|
-
mode: "fromView"
|
|
274
|
-
})], FilePicker.prototype, "maxFiles", void 0);
|
|
275
|
-
__decorate([attr({
|
|
276
|
-
mode: "fromView",
|
|
277
|
-
attribute: "max-file-size"
|
|
278
|
-
})], FilePicker.prototype, "maxFileSize", void 0);
|
|
279
|
-
__decorate([attr], FilePicker.prototype, "accept", void 0);
|
|
280
|
-
__decorate([attr], FilePicker.prototype, "size", void 0);
|
|
281
|
-
__decorate([attr({ attribute: "invalid-file-type-error" })], FilePicker.prototype, "invalidFileTypeError", void 0);
|
|
282
|
-
__decorate([attr({ attribute: "max-files-exceeded-error" })], FilePicker.prototype, "maxFilesExceededError", void 0);
|
|
283
|
-
__decorate([attr({ attribute: "file-too-big-error" })], FilePicker.prototype, "fileTooBigError", void 0);
|
|
284
|
-
__decorate([observable], FilePicker.prototype, "_customValidationError", void 0);
|
|
285
|
-
__decorate([observable], FilePicker.prototype, "_dragHover", void 0);
|
|
286
|
-
__decorate([observable], FilePicker.prototype, "_allFiles", void 0);
|
|
287
|
-
__decorate([volatile], FilePicker.prototype, "_validatedFiles", null);
|
|
38
|
+
__decorate([attr], Fab.prototype, "connotation", void 0);
|
|
39
|
+
__decorate([attr], Fab.prototype, "size", void 0);
|
|
40
|
+
__decorate([attr], Fab.prototype, "label", void 0);
|
|
288
41
|
//#endregion
|
|
289
|
-
//#region src/lib/
|
|
290
|
-
var
|
|
291
|
-
|
|
292
|
-
tb: "TB",
|
|
293
|
-
gb: "GB",
|
|
294
|
-
mb: "MB",
|
|
295
|
-
kb: "KB",
|
|
296
|
-
b: "b"
|
|
297
|
-
};
|
|
298
|
-
var renderFileSize = (x, size) => {
|
|
299
|
-
let selectedSize = 0;
|
|
300
|
-
let selectedUnit = "b";
|
|
301
|
-
/* v8 ignore else -- @preserve */
|
|
302
|
-
if (size > 0) {
|
|
303
|
-
const units = [
|
|
304
|
-
"tb",
|
|
305
|
-
"gb",
|
|
306
|
-
"mb",
|
|
307
|
-
"kb",
|
|
308
|
-
"b"
|
|
309
|
-
];
|
|
310
|
-
for (let i = 0; i < units.length; i++) {
|
|
311
|
-
const unit = units[i];
|
|
312
|
-
if (size >= Math.pow(filesizeBase, 4 - i) / 10) {
|
|
313
|
-
selectedSize = size / Math.pow(filesizeBase, 4 - i);
|
|
314
|
-
selectedUnit = unit;
|
|
315
|
-
break;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
selectedSize = Math.round(10 * selectedSize) / 10;
|
|
319
|
-
}
|
|
320
|
-
return html`<strong>${x._formatNumber(selectedSize)}</strong>
|
|
321
|
-
${dictFileSizeUnits[selectedUnit]}`;
|
|
322
|
-
};
|
|
323
|
-
var FilePickerTemplate = (context) => {
|
|
324
|
-
const iconTag = context.tagFor(Icon);
|
|
325
|
-
const buttonTag = context.tagFor(Button);
|
|
42
|
+
//#region src/lib/fab/fab.template.ts
|
|
43
|
+
var FabTemplate = (context) => {
|
|
44
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
326
45
|
return html`
|
|
327
|
-
<
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
${delegateAria({ ariaDescribedBy: (x) => x._feedbackDescribedBy })}
|
|
346
|
-
>
|
|
347
|
-
<${iconTag}
|
|
348
|
-
class="upload-icon"
|
|
349
|
-
name="cloud-upload-line"
|
|
350
|
-
size="-4"
|
|
351
|
-
label="${(x) => x.locale.filePicker.uploadFilesLabel}"
|
|
352
|
-
></${iconTag}>
|
|
353
|
-
<span class="upload-text"><slot></slot></span>
|
|
354
|
-
</button>
|
|
355
|
-
${(x) => x._getFeedbackTemplate(context)}
|
|
356
|
-
</div>
|
|
357
|
-
<div class="preview-list">
|
|
358
|
-
${repeat((x) => x._validatedFiles, html`
|
|
359
|
-
<div class="${(x) => classNames("preview", ["has-error", !!x.validationError])}">
|
|
360
|
-
<div class="details">
|
|
361
|
-
<div class="filename">${(x) => x.file.name}</div>
|
|
362
|
-
<div class="size">${(x, c) => renderFileSize(c.parent, x.file.size)}</div>
|
|
363
|
-
</div>
|
|
364
|
-
<div class="error-message">
|
|
365
|
-
<${iconTag} name="info-line" size="-6"></${iconTag}>
|
|
366
|
-
${(x) => x.validationError}
|
|
367
|
-
</div>
|
|
368
|
-
<${buttonTag}
|
|
369
|
-
class="remove-btn" icon="delete-line" appearance="ghost-light" size="condensed"
|
|
370
|
-
?disabled="${(_, c) => c.parent.disabled}"
|
|
371
|
-
aria-label="${(_, c) => c.parent.locale.filePicker.removeFileLabel}"
|
|
372
|
-
@click="${(x, c) => c.parent._onRemoveFileClick(x.file)}"></${buttonTag}>
|
|
373
|
-
</div>`)}
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
376
|
-
<input
|
|
377
|
-
${ref("_hiddenInput")}
|
|
378
|
-
class="hidden-input"
|
|
379
|
-
aria-hidden="true"
|
|
380
|
-
type="file"
|
|
381
|
-
?disabled="${(x) => x.disabled}"
|
|
382
|
-
?multiple="${(x) => !x.singleFile && (x.maxFiles == null || x.maxFiles > 1)}"
|
|
383
|
-
accept="${(x) => x.accept || null}"
|
|
384
|
-
tabindex="-1"
|
|
385
|
-
@change="${(x, c) => x._onHiddenInputChange(c.event)}"
|
|
386
|
-
/>
|
|
46
|
+
<button
|
|
47
|
+
class="${(x) => classNames("control", [`connotation-${x.connotation}`, Boolean(x.connotation)], [`size-${x.size}`, Boolean(x.size)], ["icon-only", !x.label && !!(x.icon || x.iconSlottedContent?.length)], ["icon-trailing", x.iconTrailing], ["disabled", x.disabled])} "
|
|
48
|
+
?autofocus="${(x) => x.autofocus}"
|
|
49
|
+
form="${(x) => x.formId}"
|
|
50
|
+
formaction="${(x) => x.formaction}"
|
|
51
|
+
formenctype="${(x) => x.formenctype}"
|
|
52
|
+
formmethod="${(x) => x.formmethod}"
|
|
53
|
+
formnovalidate="${(x) => x.formnovalidate}"
|
|
54
|
+
formtarget="${(x) => x.formtarget}"
|
|
55
|
+
name="${(x) => x.name}"
|
|
56
|
+
type="${(x) => x.type}"
|
|
57
|
+
value="${(x) => x.value}"
|
|
58
|
+
${delegateAria({ ariaDisabled: (x) => x.disabled })}
|
|
59
|
+
${ref("control")}
|
|
60
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
61
|
+
>
|
|
62
|
+
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)} ${(x) => x.label}
|
|
63
|
+
</button>
|
|
387
64
|
`;
|
|
388
65
|
};
|
|
389
66
|
//#endregion
|
|
390
|
-
//#region src/lib/
|
|
67
|
+
//#region src/lib/fab/definition.ts
|
|
391
68
|
/** @internal */
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
buttonDefinition,
|
|
395
|
-
feedbackMessageDefinition
|
|
396
|
-
], {
|
|
397
|
-
styles: file_picker_default,
|
|
69
|
+
var fabDefinition = defineVividComponent("fab", Fab, FabTemplate, [iconDefinition], {
|
|
70
|
+
styles: fab_default,
|
|
398
71
|
shadowOptions: { delegatesFocus: true }
|
|
399
72
|
});
|
|
400
73
|
/**
|
|
401
|
-
* Registers the
|
|
74
|
+
* Registers the FAB elements with the design system.
|
|
402
75
|
*
|
|
403
76
|
* @param prefix - the prefix to use for the component name
|
|
404
77
|
*/
|
|
405
|
-
var
|
|
78
|
+
var registerFab = createRegisterFunction(fabDefinition);
|
|
406
79
|
//#endregion
|
|
407
|
-
export {
|
|
80
|
+
export { registerFab as n, Fab as r, fabDefinition as t };
|