@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
|
@@ -2,424 +2,97 @@ require("./chunk.cjs");
|
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
3
|
const require_definition = require("./definition.cjs");
|
|
4
4
|
const require_decorate = require("./decorate.cjs");
|
|
5
|
+
const require_affix = require("./affix.cjs");
|
|
5
6
|
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
6
|
-
const
|
|
7
|
-
const require_localized = require("./localized.cjs");
|
|
8
|
-
const require_definition$1 = require("./definition6.cjs");
|
|
9
|
-
const require_mixins = require("./mixins.cjs");
|
|
10
|
-
const require_form_element = require("./form-element.cjs");
|
|
11
|
-
const require_with_error_text = require("./with-error-text.cjs");
|
|
12
|
-
const require_with_contextual_help = require("./with-contextual-help.cjs");
|
|
7
|
+
const require_button = require("./button.cjs");
|
|
13
8
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
14
9
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
15
|
-
//#region src/lib/
|
|
16
|
-
var
|
|
10
|
+
//#region src/lib/fab/fab.scss?inline
|
|
11
|
+
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)}";
|
|
17
12
|
//#endregion
|
|
18
|
-
//#region src/lib/
|
|
19
|
-
/** Extracts files from a DataTransfer, including files from directories. */
|
|
20
|
-
async function filesFromDataTransfer(dataTransfer) {
|
|
21
|
-
return dataTransfer.items?.[0]?.webkitGetAsEntry != null ? await filesFromDataTransferItems(dataTransfer.items) : Array.from(dataTransfer.files);
|
|
22
|
-
}
|
|
23
|
-
async function filesFromDataTransferItems(items) {
|
|
24
|
-
const result = [];
|
|
25
|
-
for (const item of items) {
|
|
26
|
-
const file = item.getAsFile();
|
|
27
|
-
if (file) result.push(Promise.resolve([file]));
|
|
28
|
-
else {
|
|
29
|
-
const entry = item.webkitGetAsEntry();
|
|
30
|
-
if (entry) result.push(filesFromEntry(entry, false));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return (await Promise.all(result)).flat();
|
|
34
|
-
}
|
|
35
|
-
var filesFromEntry = (entry, ignoreHiddenFiles) => {
|
|
36
|
-
const handleFileEntry = (file) => new Promise((resolve, reject) => {
|
|
37
|
-
file.file((f) => {
|
|
38
|
-
if (ignoreHiddenFiles && f.name.substring(0, 1) === ".") resolve([]);
|
|
39
|
-
else resolve([f]);
|
|
40
|
-
}, reject);
|
|
41
|
-
});
|
|
42
|
-
const promise = entry.isFile ? handleFileEntry(entry) : entry.isDirectory ? filesFromDirectory(entry) : Promise.resolve([]);
|
|
43
|
-
promise.catch(() => null);
|
|
44
|
-
return promise;
|
|
45
|
-
};
|
|
46
|
-
var filesFromDirectory = async (directory) => new Promise((resolve, reject) => {
|
|
47
|
-
const result = [];
|
|
48
|
-
const dirReader = directory.createReader();
|
|
49
|
-
const readEntries = () => {
|
|
50
|
-
dirReader.readEntries((entries) => {
|
|
51
|
-
for (const entry of entries) result.push(filesFromEntry(entry, true));
|
|
52
|
-
if (entries.length) readEntries();
|
|
53
|
-
else resolve(Promise.all(result).then((r) => r.flat()));
|
|
54
|
-
}, reject);
|
|
55
|
-
};
|
|
56
|
-
readEntries();
|
|
57
|
-
});
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/lib/file-picker/accept.ts
|
|
60
|
-
/** Match a file against an accept string, like native file input */
|
|
61
|
-
function isAcceptedFileType(file, accept) {
|
|
62
|
-
if (!accept) return true;
|
|
63
|
-
const validTypes = accept.split(",");
|
|
64
|
-
const isBasePattern = (type) => /\/\*$/.test(type);
|
|
65
|
-
const baseType = (type) => type.replace(/\/.*$/, "");
|
|
66
|
-
for (let validType of validTypes) {
|
|
67
|
-
validType = validType.trim();
|
|
68
|
-
if (validType.charAt(0) === ".") {
|
|
69
|
-
if (file.name.toLowerCase().endsWith(validType.toLowerCase())) return true;
|
|
70
|
-
} else if (isBasePattern(validType)) {
|
|
71
|
-
if (baseType(file.type) === baseType(validType)) return true;
|
|
72
|
-
} else if (file.type === validType) return true;
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/lib/file-picker/file-picker.ts
|
|
13
|
+
//#region src/lib/fab/fab.ts
|
|
78
14
|
/**
|
|
79
15
|
* @public
|
|
80
|
-
* @component
|
|
81
|
-
* @slot
|
|
82
|
-
* @
|
|
16
|
+
* @component fab
|
|
17
|
+
* @slot icon - The preferred way to add an icon to the component.
|
|
18
|
+
* @testSelector byLabel byLabel
|
|
19
|
+
* @testAction click click #control
|
|
20
|
+
* @testRef control shadow button.control
|
|
83
21
|
*/
|
|
84
|
-
var
|
|
85
|
-
constructor(..._args) {
|
|
86
|
-
super(..._args);
|
|
87
|
-
this.singleFile = false;
|
|
88
|
-
this.maxFiles = null;
|
|
89
|
-
this.maxFileSize = 256;
|
|
90
|
-
this.valueChanged = (previous, next) => {
|
|
91
|
-
super.valueChanged(previous, next);
|
|
92
|
-
if (next === "" && this.files.length) this.removeAllFiles();
|
|
93
|
-
};
|
|
94
|
-
this.proxy = document.createElement("input");
|
|
95
|
-
this.setFormValue = (value, state) => {
|
|
96
|
-
if (typeof value === "string") return;
|
|
97
|
-
super.setFormValue(value, state);
|
|
98
|
-
};
|
|
99
|
-
this._customValidationError = null;
|
|
100
|
-
this.#customValidationChangeHandler = { handleChange: () => {
|
|
101
|
-
this._customValidationError = this.#customValidationChangeObserver.observe(this, _microsoft_fast_element.ExecutionContext.default);
|
|
102
|
-
} };
|
|
103
|
-
this._dragHover = false;
|
|
104
|
-
this._allFiles = [];
|
|
105
|
-
}
|
|
106
|
-
/** @internal */
|
|
107
|
-
nameChanged(previous, next) {
|
|
108
|
-
super.nameChanged(previous, next);
|
|
109
|
-
this.#updateFormValue();
|
|
110
|
-
}
|
|
111
|
-
#updateFormValue() {
|
|
112
|
-
const files = this.files;
|
|
113
|
-
if (!this.name) this.setFormValue(null);
|
|
114
|
-
else {
|
|
115
|
-
const formData = new FormData();
|
|
116
|
-
for (const file of files) formData.append(this.name, file);
|
|
117
|
-
this.setFormValue(formData);
|
|
118
|
-
}
|
|
119
|
-
this.#setValueToAFakePathLikeNativeInput();
|
|
120
|
-
}
|
|
121
|
-
#setValueToAFakePathLikeNativeInput() {
|
|
122
|
-
this.value = this.files.length > 0 ? `C:\\fakepath\\${this.files[0].name}` : "";
|
|
123
|
-
}
|
|
124
|
-
/** @internal */
|
|
125
|
-
validate() {
|
|
126
|
-
super.validate(this.control);
|
|
127
|
-
}
|
|
128
|
-
/** @internal */
|
|
129
|
-
formResetCallback() {
|
|
130
|
-
this.removeAllFiles();
|
|
131
|
-
super.formResetCallback();
|
|
132
|
-
}
|
|
133
|
-
#getCustomValidationError() {
|
|
134
|
-
if (this.rejectedFiles.length > 0) return this.locale.filePicker.invalidFilesError;
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
/** @internal */
|
|
138
|
-
_customValidationErrorChanged() {
|
|
139
|
-
/* v8 ignore if -- @preserve */
|
|
140
|
-
if (this.proxy) this.proxy.setCustomValidity(this._customValidationError ?? "");
|
|
141
|
-
this.validate();
|
|
142
|
-
}
|
|
143
|
-
#customValidationChangeHandler;
|
|
144
|
-
#customValidationChangeObserver;
|
|
145
|
-
#startObservingCustomValidation() {
|
|
146
|
-
this.#customValidationChangeObserver = _microsoft_fast_element.Observable.binding(() => this.#getCustomValidationError(), this.#customValidationChangeHandler, true);
|
|
147
|
-
this.#customValidationChangeHandler.handleChange();
|
|
148
|
-
}
|
|
149
|
-
#stopObservingCustomValidation() {
|
|
150
|
-
this.#customValidationChangeObserver.dispose();
|
|
151
|
-
}
|
|
152
|
-
connectedCallback() {
|
|
153
|
-
super.connectedCallback();
|
|
154
|
-
this.#startObservingCustomValidation();
|
|
155
|
-
}
|
|
156
|
-
disconnectedCallback() {
|
|
157
|
-
super.disconnectedCallback();
|
|
158
|
-
this.#stopObservingCustomValidation();
|
|
159
|
-
}
|
|
160
|
-
/** @internal */
|
|
161
|
-
_onDragEnter() {
|
|
162
|
-
if (this.disabled) return true;
|
|
163
|
-
this._dragHover = true;
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
/** @internal */
|
|
167
|
-
_onDragOver(e) {
|
|
168
|
-
if (this.disabled) return true;
|
|
169
|
-
if (!e.dataTransfer) return true;
|
|
170
|
-
const effect = e.dataTransfer.effectAllowed;
|
|
171
|
-
e.dataTransfer.dropEffect = "move" === effect || "linkMove" === effect ? "move" : "copy";
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
/** @internal */
|
|
175
|
-
_onDragLeave(e) {
|
|
176
|
-
if (this.disabled) return true;
|
|
177
|
-
/* v8 ignore else -- @preserve */
|
|
178
|
-
if (e.currentTarget === e.target) this._dragHover = false;
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
/** @internal */
|
|
182
|
-
_onDrop(e) {
|
|
183
|
-
if (this.disabled) return true;
|
|
184
|
-
this._dragHover = false;
|
|
185
|
-
if (!e.dataTransfer) return true;
|
|
186
|
-
filesFromDataTransfer(e.dataTransfer).then((files) => this.#addFiles(files)).catch((err) => {
|
|
187
|
-
console.error(err);
|
|
188
|
-
});
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
/** @internal */
|
|
192
|
-
_onDragEnd() {
|
|
193
|
-
if (this.disabled) return true;
|
|
194
|
-
this._dragHover = false;
|
|
195
|
-
return true;
|
|
196
|
-
}
|
|
197
|
-
/** @internal */
|
|
198
|
-
_onControlClick() {
|
|
199
|
-
/* v8 ignore if -- @preserve */
|
|
200
|
-
if (this.disabled) return;
|
|
201
|
-
this._hiddenInput.click();
|
|
202
|
-
}
|
|
203
|
-
/** @internal */
|
|
204
|
-
_onRemoveFileClick(file) {
|
|
205
|
-
if (this.disabled) return;
|
|
206
|
-
this._allFiles = this._allFiles.filter((f) => f !== file);
|
|
207
|
-
this.$emit("change");
|
|
208
|
-
}
|
|
209
|
-
/** @internal */
|
|
210
|
-
_allFilesChanged() {
|
|
211
|
-
this.#updateFormValue();
|
|
212
|
-
}
|
|
213
|
-
#addFiles(files) {
|
|
214
|
-
const newFiles = Array.from(files).filter((file) => !this._allFiles.some((existingFile) => existingFile.name === file.name && existingFile.size === file.size));
|
|
215
|
-
if (this.singleFile && newFiles.length > 0) this._allFiles = [newFiles[newFiles.length - 1]];
|
|
216
|
-
else this._allFiles = [...this._allFiles, ...newFiles];
|
|
217
|
-
this.$emit("change");
|
|
218
|
-
}
|
|
219
|
-
/** Removes all files from the File Picker. */
|
|
220
|
-
removeAllFiles() {
|
|
221
|
-
this._allFiles = [];
|
|
222
|
-
}
|
|
22
|
+
var Fab = class extends require_affix.AffixIconWithTrailing(require_button.VividFoundationButton) {
|
|
223
23
|
/**
|
|
224
|
-
*
|
|
24
|
+
* Handles click events.
|
|
25
|
+
* Prevents interaction when disabled.
|
|
26
|
+
*
|
|
225
27
|
* @internal
|
|
226
28
|
*/
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
};
|
|
234
|
-
const result = [];
|
|
235
|
-
let validFileIndex = 0;
|
|
236
|
-
for (const file of this._allFiles) {
|
|
237
|
-
const validatedFile = {
|
|
238
|
-
file,
|
|
239
|
-
validationError: validationError(file, validFileIndex)
|
|
240
|
-
};
|
|
241
|
-
result.push(validatedFile);
|
|
242
|
-
if (!validatedFile.validationError) validFileIndex++;
|
|
29
|
+
clickHandler(event) {
|
|
30
|
+
/* v8 ignore else -- @preserve */
|
|
31
|
+
if (this.disabled) {
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
event.stopImmediatePropagation();
|
|
34
|
+
return;
|
|
243
35
|
}
|
|
244
|
-
return
|
|
245
|
-
}
|
|
246
|
-
/** List of files that have been added to the file picker and passed validation */
|
|
247
|
-
get files() {
|
|
248
|
-
return this._validatedFiles.filter((f) => !f.validationError).map((f) => f.file);
|
|
249
|
-
}
|
|
250
|
-
/** List of files that have been added to the file picker but failed validation */
|
|
251
|
-
get rejectedFiles() {
|
|
252
|
-
return this._validatedFiles.filter((f) => !!f.validationError).map((f) => f.file);
|
|
253
|
-
}
|
|
254
|
-
/** @internal */
|
|
255
|
-
_onHiddenInputChange(e) {
|
|
256
|
-
this.#addFiles(this._hiddenInput.files);
|
|
257
|
-
this._hiddenInput.value = "";
|
|
258
|
-
e.stopPropagation();
|
|
259
|
-
}
|
|
260
|
-
/** @internal */
|
|
261
|
-
_formatNumber(value) {
|
|
262
|
-
const str = String(value);
|
|
263
|
-
if (this.locale.common.useCommaAsDecimalSeparator) return str.replace(".", ",");
|
|
264
|
-
return str;
|
|
36
|
+
return true;
|
|
265
37
|
}
|
|
266
38
|
};
|
|
267
|
-
require_decorate.__decorate([
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
})], FilePicker.prototype, "singleFile", void 0);
|
|
271
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
272
|
-
attribute: "max-files",
|
|
273
|
-
converter: _microsoft_fast_element.nullableNumberConverter,
|
|
274
|
-
mode: "fromView"
|
|
275
|
-
})], FilePicker.prototype, "maxFiles", void 0);
|
|
276
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
277
|
-
mode: "fromView",
|
|
278
|
-
attribute: "max-file-size"
|
|
279
|
-
})], FilePicker.prototype, "maxFileSize", void 0);
|
|
280
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], FilePicker.prototype, "accept", void 0);
|
|
281
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], FilePicker.prototype, "size", void 0);
|
|
282
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "invalid-file-type-error" })], FilePicker.prototype, "invalidFileTypeError", void 0);
|
|
283
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "max-files-exceeded-error" })], FilePicker.prototype, "maxFilesExceededError", void 0);
|
|
284
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "file-too-big-error" })], FilePicker.prototype, "fileTooBigError", void 0);
|
|
285
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], FilePicker.prototype, "_customValidationError", void 0);
|
|
286
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], FilePicker.prototype, "_dragHover", void 0);
|
|
287
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], FilePicker.prototype, "_allFiles", void 0);
|
|
288
|
-
require_decorate.__decorate([_microsoft_fast_element.volatile], FilePicker.prototype, "_validatedFiles", null);
|
|
39
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Fab.prototype, "connotation", void 0);
|
|
40
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Fab.prototype, "size", void 0);
|
|
41
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Fab.prototype, "label", void 0);
|
|
289
42
|
//#endregion
|
|
290
|
-
//#region src/lib/
|
|
291
|
-
var
|
|
292
|
-
|
|
293
|
-
tb: "TB",
|
|
294
|
-
gb: "GB",
|
|
295
|
-
mb: "MB",
|
|
296
|
-
kb: "KB",
|
|
297
|
-
b: "b"
|
|
298
|
-
};
|
|
299
|
-
var renderFileSize = (x, size) => {
|
|
300
|
-
let selectedSize = 0;
|
|
301
|
-
let selectedUnit = "b";
|
|
302
|
-
/* v8 ignore else -- @preserve */
|
|
303
|
-
if (size > 0) {
|
|
304
|
-
const units = [
|
|
305
|
-
"tb",
|
|
306
|
-
"gb",
|
|
307
|
-
"mb",
|
|
308
|
-
"kb",
|
|
309
|
-
"b"
|
|
310
|
-
];
|
|
311
|
-
for (let i = 0; i < units.length; i++) {
|
|
312
|
-
const unit = units[i];
|
|
313
|
-
if (size >= Math.pow(filesizeBase, 4 - i) / 10) {
|
|
314
|
-
selectedSize = size / Math.pow(filesizeBase, 4 - i);
|
|
315
|
-
selectedUnit = unit;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
selectedSize = Math.round(10 * selectedSize) / 10;
|
|
320
|
-
}
|
|
321
|
-
return _microsoft_fast_element.html`<strong>${x._formatNumber(selectedSize)}</strong>
|
|
322
|
-
${dictFileSizeUnits[selectedUnit]}`;
|
|
323
|
-
};
|
|
324
|
-
var FilePickerTemplate = (context) => {
|
|
325
|
-
const iconTag = context.tagFor(require_definition.Icon);
|
|
326
|
-
const buttonTag = context.tagFor(require_definition$1.Button);
|
|
43
|
+
//#region src/lib/fab/fab.template.ts
|
|
44
|
+
var FabTemplate = (context) => {
|
|
45
|
+
const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
|
|
327
46
|
return _microsoft_fast_element.html`
|
|
328
|
-
<
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
${require_delegates_aria.delegateAria({ ariaDescribedBy: (x) => x._feedbackDescribedBy })}
|
|
347
|
-
>
|
|
348
|
-
<${iconTag}
|
|
349
|
-
class="upload-icon"
|
|
350
|
-
name="cloud-upload-line"
|
|
351
|
-
size="-4"
|
|
352
|
-
label="${(x) => x.locale.filePicker.uploadFilesLabel}"
|
|
353
|
-
></${iconTag}>
|
|
354
|
-
<span class="upload-text"><slot></slot></span>
|
|
355
|
-
</button>
|
|
356
|
-
${(x) => x._getFeedbackTemplate(context)}
|
|
357
|
-
</div>
|
|
358
|
-
<div class="preview-list">
|
|
359
|
-
${(0, _microsoft_fast_element.repeat)((x) => x._validatedFiles, _microsoft_fast_element.html`
|
|
360
|
-
<div class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("preview", ["has-error", !!x.validationError])}">
|
|
361
|
-
<div class="details">
|
|
362
|
-
<div class="filename">${(x) => x.file.name}</div>
|
|
363
|
-
<div class="size">${(x, c) => renderFileSize(c.parent, x.file.size)}</div>
|
|
364
|
-
</div>
|
|
365
|
-
<div class="error-message">
|
|
366
|
-
<${iconTag} name="info-line" size="-6"></${iconTag}>
|
|
367
|
-
${(x) => x.validationError}
|
|
368
|
-
</div>
|
|
369
|
-
<${buttonTag}
|
|
370
|
-
class="remove-btn" icon="delete-line" appearance="ghost-light" size="condensed"
|
|
371
|
-
?disabled="${(_, c) => c.parent.disabled}"
|
|
372
|
-
aria-label="${(_, c) => c.parent.locale.filePicker.removeFileLabel}"
|
|
373
|
-
@click="${(x, c) => c.parent._onRemoveFileClick(x.file)}"></${buttonTag}>
|
|
374
|
-
</div>`)}
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
<input
|
|
378
|
-
${(0, _microsoft_fast_element.ref)("_hiddenInput")}
|
|
379
|
-
class="hidden-input"
|
|
380
|
-
aria-hidden="true"
|
|
381
|
-
type="file"
|
|
382
|
-
?disabled="${(x) => x.disabled}"
|
|
383
|
-
?multiple="${(x) => !x.singleFile && (x.maxFiles == null || x.maxFiles > 1)}"
|
|
384
|
-
accept="${(x) => x.accept || null}"
|
|
385
|
-
tabindex="-1"
|
|
386
|
-
@change="${(x, c) => x._onHiddenInputChange(c.event)}"
|
|
387
|
-
/>
|
|
47
|
+
<button
|
|
48
|
+
class="${(x) => (0, _microsoft_fast_web_utilities.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])} "
|
|
49
|
+
?autofocus="${(x) => x.autofocus}"
|
|
50
|
+
form="${(x) => x.formId}"
|
|
51
|
+
formaction="${(x) => x.formaction}"
|
|
52
|
+
formenctype="${(x) => x.formenctype}"
|
|
53
|
+
formmethod="${(x) => x.formmethod}"
|
|
54
|
+
formnovalidate="${(x) => x.formnovalidate}"
|
|
55
|
+
formtarget="${(x) => x.formtarget}"
|
|
56
|
+
name="${(x) => x.name}"
|
|
57
|
+
type="${(x) => x.type}"
|
|
58
|
+
value="${(x) => x.value}"
|
|
59
|
+
${require_delegates_aria.delegateAria({ ariaDisabled: (x) => x.disabled })}
|
|
60
|
+
${(0, _microsoft_fast_element.ref)("control")}
|
|
61
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
62
|
+
>
|
|
63
|
+
${(x) => affixIconTemplate(x.icon, require_affix.IconWrapper.Slot)} ${(x) => x.label}
|
|
64
|
+
</button>
|
|
388
65
|
`;
|
|
389
66
|
};
|
|
390
67
|
//#endregion
|
|
391
|
-
//#region src/lib/
|
|
68
|
+
//#region src/lib/fab/definition.ts
|
|
392
69
|
/** @internal */
|
|
393
|
-
var
|
|
394
|
-
|
|
395
|
-
require_definition$1.buttonDefinition,
|
|
396
|
-
require_mixins.feedbackMessageDefinition
|
|
397
|
-
], {
|
|
398
|
-
styles: file_picker_default,
|
|
70
|
+
var fabDefinition = require_vivid_element.defineVividComponent("fab", Fab, FabTemplate, [require_definition.iconDefinition], {
|
|
71
|
+
styles: fab_default,
|
|
399
72
|
shadowOptions: { delegatesFocus: true }
|
|
400
73
|
});
|
|
401
74
|
/**
|
|
402
|
-
* Registers the
|
|
75
|
+
* Registers the FAB elements with the design system.
|
|
403
76
|
*
|
|
404
77
|
* @param prefix - the prefix to use for the component name
|
|
405
78
|
*/
|
|
406
|
-
var
|
|
79
|
+
var registerFab = require_vivid_element.createRegisterFunction(fabDefinition);
|
|
407
80
|
//#endregion
|
|
408
|
-
Object.defineProperty(exports, "
|
|
81
|
+
Object.defineProperty(exports, "Fab", {
|
|
409
82
|
enumerable: true,
|
|
410
83
|
get: function() {
|
|
411
|
-
return
|
|
84
|
+
return Fab;
|
|
412
85
|
}
|
|
413
86
|
});
|
|
414
|
-
Object.defineProperty(exports, "
|
|
87
|
+
Object.defineProperty(exports, "fabDefinition", {
|
|
415
88
|
enumerable: true,
|
|
416
89
|
get: function() {
|
|
417
|
-
return
|
|
90
|
+
return fabDefinition;
|
|
418
91
|
}
|
|
419
92
|
});
|
|
420
|
-
Object.defineProperty(exports, "
|
|
93
|
+
Object.defineProperty(exports, "registerFab", {
|
|
421
94
|
enumerable: true,
|
|
422
95
|
get: function() {
|
|
423
|
-
return
|
|
96
|
+
return registerFab;
|
|
424
97
|
}
|
|
425
98
|
});
|