@vonage/vivid 5.15.0 → 5.16.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/definition.cjs +7 -212
- package/accordion/definition.js +2 -204
- package/accordion/index.cjs +4 -4
- package/accordion/index.js +93 -138
- package/accordion-item/definition.cjs +6 -146
- package/accordion-item/definition.js +2 -139
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +6 -2
- package/action-group/definition.cjs +5 -69
- package/action-group/definition.js +1 -62
- package/action-group/index.cjs +4 -4
- package/action-group/index.js +16 -46
- package/alert/definition.cjs +6 -201
- package/alert/definition.js +2 -194
- package/alert/index.cjs +15 -15
- package/alert/index.js +90 -136
- package/audio-player/definition.cjs +6 -463
- package/audio-player/definition.js +2 -456
- package/audio-player/index.cjs +49 -49
- package/audio-player/index.js +234 -308
- package/avatar/definition.cjs +6 -117
- package/avatar/definition.js +2 -110
- package/avatar/index.cjs +14 -14
- package/avatar/index.js +44 -84
- package/badge/definition.cjs +6 -85
- package/badge/definition.js +2 -78
- package/badge/index.cjs +4 -4
- package/badge/index.js +21 -65
- package/banner/definition.cjs +6 -160
- package/banner/definition.js +2 -153
- package/banner/index.cjs +13 -13
- package/banner/index.js +76 -109
- package/breadcrumb/definition.cjs +5 -98
- package/breadcrumb/definition.js +1 -91
- package/breadcrumb/index.cjs +4 -4
- package/breadcrumb/index.js +33 -60
- package/breadcrumb-item/definition.cjs +7 -47
- package/breadcrumb-item/definition.js +3 -40
- package/breadcrumb-item/index.cjs +5 -5
- package/breadcrumb-item/index.js +20 -32
- package/bundled/affix.cjs +10 -10
- package/bundled/affix.js +44 -57
- package/bundled/anchored.cjs +3 -3
- package/bundled/anchored.js +47 -65
- package/bundled/aria.cjs +1 -1
- package/bundled/aria.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +17 -30
- package/bundled/base-color-picker.cjs +10 -10
- package/bundled/base-color-picker.js +115 -202
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +29 -59
- package/bundled/breadcrumb-item.cjs +1 -1
- package/bundled/breadcrumb-item.js +11 -20
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +65 -109
- package/bundled/calendar-event.cjs +1 -1
- package/bundled/calendar-event.js +11 -34
- package/bundled/calendar-picker.template.cjs +77 -77
- package/bundled/calendar-picker.template.js +2881 -3297
- package/bundled/char-count.cjs +7 -7
- package/bundled/char-count.js +31 -46
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +27 -45
- package/bundled/class-names.cjs +1 -1
- package/bundled/class-names.js +8 -8
- package/bundled/data-grid.options.cjs +1 -1
- package/bundled/data-grid.options.js +22 -26
- package/bundled/decorate.cjs +1 -0
- package/bundled/decorate.js +9 -0
- package/bundled/definition.cjs +1 -39
- package/bundled/definition.js +5 -122
- package/bundled/definition10.cjs +27 -69
- package/bundled/definition10.js +173 -362
- package/bundled/definition11.cjs +19 -12
- package/bundled/definition11.js +77 -93
- package/bundled/definition12.cjs +11 -11
- package/bundled/definition12.js +122 -217
- package/bundled/definition13.cjs +18 -9
- package/bundled/definition13.js +76 -42
- package/bundled/definition14.cjs +10 -1
- package/bundled/definition14.js +28 -19
- package/bundled/definition15.cjs +73 -5
- package/bundled/definition15.js +194 -28
- package/bundled/definition16.cjs +5 -30
- package/bundled/definition16.js +16 -79
- package/bundled/definition17.cjs +13 -19
- package/bundled/definition17.js +81 -105
- package/bundled/definition18.cjs +12 -13
- package/bundled/definition18.js +67 -147
- package/bundled/definition19.cjs +48 -48
- package/bundled/definition19.js +365 -699
- package/bundled/definition2.cjs +8 -8
- package/bundled/definition2.js +80 -124
- package/bundled/definition20.cjs +5 -20
- package/bundled/definition20.js +11 -106
- package/bundled/definition21.cjs +20 -5
- package/bundled/definition21.js +57 -18
- package/bundled/definition22.cjs +16 -16
- package/bundled/definition22.js +79 -141
- package/bundled/definition3.cjs +1 -29
- package/bundled/definition3.js +183 -195
- package/bundled/definition4.cjs +39 -6
- package/bundled/definition4.js +71 -41
- package/bundled/definition5.cjs +30 -1
- package/bundled/definition5.js +48 -351
- package/bundled/definition6.cjs +28 -30
- package/bundled/definition6.js +110 -265
- package/bundled/definition7.cjs +6 -30
- package/bundled/definition7.js +22 -291
- package/bundled/definition8.cjs +13 -18
- package/bundled/definition8.js +150 -143
- package/bundled/definition9.cjs +29 -13
- package/bundled/definition9.js +157 -232
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +56 -90
- package/bundled/dialog.cjs +1 -0
- package/bundled/dialog.js +6 -0
- package/bundled/divider.cjs +1 -1
- package/bundled/divider.js +16 -33
- package/bundled/dom.cjs +1 -1
- package/bundled/dom.js +5 -5
- package/bundled/enums.cjs +1 -1
- package/bundled/enums.js +16 -9
- package/bundled/floating-ui.dom.cjs +1 -1
- package/bundled/floating-ui.dom.js +953 -1234
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +165 -327
- package/bundled/form-element.cjs +1 -1
- package/bundled/form-element.js +33 -55
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +46 -69
- package/bundled/key-codes.cjs +1 -1
- package/bundled/key-codes.js +4 -16
- package/bundled/linkable.cjs +6 -6
- package/bundled/linkable.js +25 -45
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +176 -368
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +451 -564
- package/bundled/mixins.cjs +20 -20
- package/bundled/mixins.js +162 -213
- package/bundled/normalize.cjs +1 -1
- package/bundled/normalize.js +6 -6
- package/bundled/numbers.cjs +1 -1
- package/bundled/numbers.js +9 -11
- package/bundled/picker-field.template.cjs +23 -23
- package/bundled/picker-field.template.js +108 -172
- package/bundled/playbackRates.cjs +1 -1
- package/bundled/playbackRates.js +10 -10
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +10 -14
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +421 -552
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +26 -32
- package/bundled/single-date-picker.cjs +1 -1
- package/bundled/single-date-picker.js +23 -38
- package/bundled/single-value-picker.cjs +1 -1
- package/bundled/single-value-picker.js +58 -86
- package/bundled/slider.template.cjs +13 -13
- package/bundled/slider.template.js +67 -78
- package/bundled/slottable-request.cjs +4 -4
- package/bundled/slottable-request.js +1937 -2904
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +47 -97
- package/bundled/strings.cjs +1 -1
- package/bundled/strings.js +6 -6
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +4 -4
- package/bundled/time-selection-picker.template.cjs +26 -26
- package/bundled/time-selection-picker.template.js +355 -555
- package/bundled/trapped-focus.cjs +1 -1
- package/bundled/trapped-focus.js +18 -25
- package/bundled/vivid-element.cjs +4 -5
- package/bundled/vivid-element.js +1778 -2794
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +10 -10
- package/bundled/with-contextual-help.cjs +1 -1
- package/bundled/with-contextual-help.js +15 -31
- package/bundled/with-error-text.cjs +1 -1
- package/bundled/with-error-text.js +25 -38
- package/bundled/with-success-text.cjs +1 -1
- package/bundled/with-success-text.js +8 -15
- package/button/definition.cjs +6 -14
- package/button/definition.js +3 -4
- package/button/index.cjs +1 -1
- package/button/index.js +6 -2
- package/calendar/definition.cjs +5 -360
- package/calendar/definition.js +1 -353
- package/calendar/index.cjs +20 -20
- package/calendar/index.js +346 -403
- package/calendar-event/definition.cjs +6 -58
- package/calendar-event/definition.js +2 -51
- package/calendar-event/index.cjs +7 -7
- package/calendar-event/index.js +25 -41
- package/card/definition.cjs +6 -194
- package/card/definition.js +2 -187
- package/card/index.cjs +34 -34
- package/card/index.js +80 -133
- package/checkbox/definition.cjs +6 -210
- package/checkbox/definition.js +2 -203
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +6 -2
- package/color-picker/definition.cjs +6 -1180
- package/color-picker/definition.js +2 -1173
- package/color-picker/index.cjs +94 -94
- package/color-picker/index.js +605 -742
- package/combobox/definition.cjs +6 -653
- package/combobox/definition.js +2 -646
- package/combobox/index.cjs +37 -37
- package/combobox/index.js +254 -465
- package/contextual-help/definition.cjs +6 -63
- package/contextual-help/definition.js +2 -56
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +6 -2
- package/country/definition.cjs +6 -340
- package/country/definition.js +2 -333
- package/country/index.cjs +6 -6
- package/country/index.js +1209 -308
- package/custom-elements.json +550 -1571
- package/data-grid/definition.cjs +10 -2363
- package/data-grid/definition.js +2 -2352
- package/data-grid/index.cjs +61 -61
- package/data-grid/index.js +642 -1024
- package/date-picker/definition.cjs +6 -152
- package/date-picker/definition.js +2 -145
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +66 -114
- package/date-range-picker/definition.cjs +6 -469
- package/date-range-picker/definition.js +2 -462
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +218 -338
- package/date-time-picker/definition.cjs +6 -285
- package/date-time-picker/definition.js +2 -278
- package/date-time-picker/index.cjs +4 -4
- package/date-time-picker/index.js +116 -211
- package/dial-pad/definition.cjs +6 -469
- package/dial-pad/definition.js +2 -462
- package/dial-pad/index.cjs +42 -42
- package/dial-pad/index.js +195 -311
- package/dialog/definition.cjs +6 -350
- package/dialog/definition.js +2 -343
- package/dialog/index.cjs +28 -28
- package/dialog/index.js +148 -230
- package/divider/definition.cjs +6 -42
- package/divider/definition.js +2 -35
- package/divider/index.cjs +1 -1
- package/divider/index.js +5 -2
- package/elevation/definition.cjs +4 -11
- package/elevation/definition.js +2 -2
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +5 -2
- package/empty-state/definition.cjs +6 -86
- package/empty-state/definition.js +2 -79
- package/empty-state/index.cjs +9 -9
- package/empty-state/index.js +28 -60
- package/fab/definition.cjs +6 -106
- package/fab/definition.js +2 -99
- package/fab/index.cjs +17 -17
- package/fab/index.js +46 -82
- package/file-picker/definition.cjs +6 -526
- package/file-picker/definition.js +2 -519
- package/file-picker/index.cjs +25 -25
- package/file-picker/index.js +246 -354
- package/header/definition.cjs +5 -78
- package/header/definition.js +1 -71
- package/header/index.cjs +5 -5
- package/header/index.js +28 -42
- package/icon/definition.cjs +5 -200
- package/icon/definition.js +1 -193
- package/icon/index.cjs +1 -1
- package/icon/index.js +5 -2
- package/index.cjs +350 -356
- package/index.js +79 -78
- package/layout/definition.cjs +5 -72
- package/layout/definition.js +1 -65
- package/layout/index.cjs +2 -2
- package/layout/index.js +10 -51
- package/lib/alert/alert.d.ts +0 -1
- package/lib/audio-player/audio-player.d.ts +0 -1
- package/lib/banner/banner.d.ts +0 -2
- package/lib/button/button.d.ts +0 -1
- package/lib/calendar/calendar.d.ts +0 -1
- package/lib/card/card.d.ts +0 -2
- package/lib/combobox/combobox.d.ts +1 -1
- package/lib/data-grid/data-grid-cell.d.ts +0 -3
- package/lib/data-grid/data-grid-row.d.ts +0 -3
- package/lib/data-grid/data-grid.d.ts +0 -1
- package/lib/fab/fab.d.ts +0 -1
- package/lib/file-picker/file-picker.d.ts +1 -1
- package/lib/icon/icon.d.ts +0 -2
- package/lib/menu/menu.d.ts +0 -1
- package/lib/menu-item/menu-item.d.ts +0 -1
- package/lib/option/option.d.ts +4 -0
- package/lib/pagination/pagination.d.ts +0 -7
- package/lib/popover/popover.d.ts +0 -5
- package/lib/select/select.d.ts +2 -2
- package/lib/split-button/split-button.d.ts +0 -2
- package/lib/tab/tab.d.ts +0 -2
- package/lib/table/table-head.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +0 -1
- package/lib/tag/tag.d.ts +0 -2
- package/lib/text-field/text-field.d.ts +0 -1
- package/lib/toggletip/toggletip.d.ts +0 -1
- package/lib/tree-item/tree-item.d.ts +0 -2
- package/lib/tree-view/tree-view.d.ts +0 -1
- package/locales/de-DE.cjs +382 -492
- package/locales/de-DE.js +383 -490
- package/locales/en-GB.cjs +271 -382
- package/locales/en-GB.js +272 -380
- package/locales/en-US.cjs +2 -552
- package/locales/en-US.js +1 -549
- package/locales/ja-JP.cjs +376 -492
- package/locales/ja-JP.js +377 -490
- package/locales/zh-CN.cjs +378 -495
- package/locales/zh-CN.js +379 -493
- package/menu/definition.cjs +6 -394
- package/menu/definition.js +2 -387
- package/menu/index.cjs +1 -1
- package/menu/index.js +6 -2
- package/menu-item/definition.cjs +7 -14
- package/menu-item/definition.js +3 -3
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +6 -2
- package/nav/definition.cjs +5 -27
- package/nav/definition.js +1 -20
- package/nav/index.cjs +3 -3
- package/nav/index.js +7 -10
- package/nav-disclosure/definition.cjs +6 -122
- package/nav-disclosure/definition.js +2 -115
- package/nav-disclosure/index.cjs +8 -8
- package/nav-disclosure/index.js +49 -86
- package/nav-item/definition.cjs +6 -79
- package/nav-item/definition.js +2 -72
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +33 -58
- package/note/definition.cjs +6 -61
- package/note/definition.js +2 -54
- package/note/index.cjs +5 -5
- package/note/index.js +24 -38
- package/number-field/definition.cjs +6 -440
- package/number-field/definition.js +2 -433
- package/number-field/index.cjs +31 -31
- package/number-field/index.js +160 -328
- package/option/definition.cjs +6 -13
- package/option/definition.js +3 -3
- package/option/index.cjs +1 -1
- package/option/index.js +6 -2
- package/package.json +24 -23
- package/pagination/definition.cjs +6 -256
- package/pagination/definition.js +2 -249
- package/pagination/index.cjs +37 -37
- package/pagination/index.js +148 -188
- package/popover/definition.cjs +6 -363
- package/popover/definition.js +2 -356
- package/popover/index.cjs +16 -16
- package/popover/index.js +161 -250
- package/popup/definition.cjs +5 -13
- package/popup/definition.js +3 -4
- package/popup/index.cjs +1 -1
- package/popup/index.js +6 -2
- package/progress/definition.cjs +5 -87
- package/progress/definition.js +1 -80
- package/progress/index.cjs +9 -9
- package/progress/index.js +33 -55
- package/progress-ring/definition.cjs +5 -95
- package/progress-ring/definition.js +1 -88
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +5 -2
- package/radio/definition.cjs +5 -231
- package/radio/definition.js +1 -224
- package/radio/index.cjs +1 -1
- package/radio/index.js +5 -2
- package/radio-group/definition.cjs +6 -361
- package/radio-group/definition.js +2 -354
- package/radio-group/index.cjs +10 -10
- package/radio-group/index.js +160 -242
- package/range-slider/definition.cjs +6 -632
- package/range-slider/definition.js +2 -625
- package/range-slider/index.cjs +41 -41
- package/range-slider/index.js +259 -429
- package/rich-text-editor/definition.cjs +32 -15609
- package/rich-text-editor/definition.js +2 -15576
- package/rich-text-editor/index.cjs +17 -17
- package/rich-text-editor/index.js +9061 -11419
- package/rich-text-view/definition.cjs +5 -171
- package/rich-text-view/definition.js +1 -164
- package/rich-text-view/index.cjs +1 -1
- package/rich-text-view/index.js +68 -102
- package/searchable-select/definition.cjs +5 -1404
- package/searchable-select/definition.js +2 -1398
- package/searchable-select/index.cjs +94 -94
- package/searchable-select/index.js +600 -1019
- package/select/definition.cjs +6 -1012
- package/select/definition.js +2 -1005
- package/select/index.cjs +1 -1
- package/select/index.js +6 -2
- package/selectable-box/definition.cjs +6 -174
- package/selectable-box/definition.js +2 -167
- package/selectable-box/index.cjs +18 -18
- package/selectable-box/index.js +66 -127
- package/side-drawer/definition.cjs +5 -130
- package/side-drawer/definition.js +1 -123
- package/side-drawer/index.cjs +7 -7
- package/side-drawer/index.js +47 -92
- package/simple-color-picker/definition.cjs +6 -216
- package/simple-color-picker/definition.js +2 -209
- package/simple-color-picker/index.cjs +15 -15
- package/simple-color-picker/index.js +98 -135
- package/slider/definition.cjs +6 -504
- package/slider/definition.js +2 -497
- package/slider/index.cjs +1 -1
- package/slider/index.js +6 -2
- package/split-button/definition.cjs +6 -176
- package/split-button/definition.js +2 -169
- package/split-button/index.cjs +15 -15
- package/split-button/index.js +74 -135
- package/status/definition.cjs +6 -76
- package/status/definition.js +2 -69
- package/status/index.cjs +10 -7
- package/status/index.js +38 -48
- package/styles/core/all.css +6 -5
- package/styles/core/theme.css +6 -5
- package/styles/core/typography.css +1 -2
- package/styles/tokens/theme-dark.css +17 -21
- package/styles/tokens/theme-light.css +17 -21
- package/styles/tokens/vivid-2-compat.css +1 -2
- package/switch/definition.cjs +6 -149
- package/switch/definition.js +2 -142
- package/switch/index.cjs +8 -8
- package/switch/index.js +48 -93
- package/tab/definition.cjs +6 -127
- package/tab/definition.js +2 -120
- package/tab/index.cjs +1 -1
- package/tab/index.js +6 -2
- package/tab-panel/definition.cjs +5 -29
- package/tab-panel/definition.js +1 -22
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +5 -2
- package/table/definition.cjs +15 -168
- package/table/definition.js +1 -151
- package/table/index.cjs +20 -16
- package/table/index.js +36 -85
- package/tabs/definition.cjs +7 -469
- package/tabs/definition.js +2 -461
- package/tabs/index.cjs +11 -11
- package/tabs/index.js +169 -298
- package/tag/definition.cjs +6 -176
- package/tag/definition.js +2 -169
- package/tag/index.cjs +26 -26
- package/tag/index.js +65 -126
- package/tag-group/definition.cjs +5 -40
- package/tag-group/definition.js +1 -33
- package/tag-group/index.cjs +4 -4
- package/tag-group/index.js +10 -21
- package/text-area/definition.cjs +6 -361
- package/text-area/definition.js +2 -354
- package/text-area/index.cjs +11 -11
- package/text-area/index.js +153 -266
- package/text-field/definition.cjs +6 -433
- package/text-field/definition.js +2 -426
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +6 -2
- package/time-picker/definition.cjs +7 -43
- package/time-picker/definition.js +3 -36
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +24 -29
- package/toggletip/definition.cjs +6 -161
- package/toggletip/definition.js +2 -154
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +6 -2
- package/tooltip/definition.cjs +6 -140
- package/tooltip/definition.js +2 -133
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +6 -2
- package/tree-item/definition.cjs +6 -13
- package/tree-item/definition.js +3 -3
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +6 -2
- package/tree-view/definition.cjs +6 -318
- package/tree-view/definition.js +2 -311
- package/tree-view/index.cjs +11 -11
- package/tree-view/index.js +145 -190
- package/unbundled/affix.cjs +89 -62
- package/unbundled/affix.js +58 -55
- package/unbundled/anchored.cjs +87 -94
- package/unbundled/anchored.js +74 -90
- package/unbundled/attribute-binding-behaviour.cjs +37 -43
- package/unbundled/attribute-binding-behaviour.js +31 -41
- package/unbundled/base-color-picker.cjs +226 -278
- package/unbundled/base-color-picker.js +214 -275
- package/unbundled/base-progress.cjs +63 -81
- package/unbundled/base-progress.js +57 -79
- package/unbundled/breadcrumb-item.cjs +24 -28
- package/unbundled/breadcrumb-item.js +18 -26
- package/unbundled/button.cjs +115 -175
- package/unbundled/button.js +109 -173
- package/unbundled/calendar-event.cjs +28 -41
- package/unbundled/calendar-event.js +22 -39
- package/unbundled/calendar-picker.template.cjs +620 -785
- package/unbundled/calendar-picker.template.js +560 -774
- package/unbundled/char-count.cjs +50 -80
- package/unbundled/char-count.js +44 -78
- package/unbundled/chunk.cjs +50 -0
- package/unbundled/chunk.js +33 -0
- package/unbundled/data-grid.options.cjs +80 -29
- package/unbundled/data-grid.options.js +51 -23
- package/unbundled/decorate.cjs +14 -0
- package/unbundled/decorate.js +9 -0
- package/unbundled/definition.cjs +42 -226
- package/unbundled/definition.js +24 -221
- package/unbundled/definition10.cjs +253 -0
- package/unbundled/definition10.js +229 -0
- package/unbundled/definition11.cjs +397 -0
- package/unbundled/definition11.js +379 -0
- package/unbundled/definition12.cjs +317 -0
- package/unbundled/definition12.js +287 -0
- package/unbundled/definition13.cjs +328 -0
- package/unbundled/definition13.js +310 -0
- package/unbundled/definition14.cjs +406 -0
- package/unbundled/definition14.js +388 -0
- package/unbundled/definition15.cjs +107 -0
- package/unbundled/definition15.js +89 -0
- package/unbundled/definition16.cjs +63 -0
- package/unbundled/definition16.js +45 -0
- package/unbundled/definition17.cjs +151 -0
- package/unbundled/definition17.js +133 -0
- package/unbundled/definition18.cjs +47 -0
- package/unbundled/definition18.js +35 -0
- package/unbundled/definition19.cjs +98 -0
- package/unbundled/definition19.js +80 -0
- package/unbundled/definition2.cjs +179 -401
- package/unbundled/definition2.js +161 -395
- package/unbundled/definition20.cjs +56 -0
- package/unbundled/definition20.js +43 -0
- package/unbundled/definition21.cjs +305 -0
- package/unbundled/definition21.js +286 -0
- package/unbundled/definition22.cjs +174 -0
- package/unbundled/definition22.js +156 -0
- package/unbundled/definition23.cjs +161 -0
- package/unbundled/definition23.js +143 -0
- package/unbundled/definition24.cjs +1038 -0
- package/unbundled/definition24.js +1020 -0
- package/unbundled/definition25.cjs +360 -0
- package/unbundled/definition25.js +342 -0
- package/unbundled/definition26.cjs +137 -0
- package/unbundled/definition26.js +119 -0
- package/unbundled/definition27.cjs +235 -0
- package/unbundled/definition27.js +211 -0
- package/unbundled/definition28.cjs +546 -0
- package/unbundled/definition28.js +528 -0
- package/unbundled/definition29.cjs +157 -0
- package/unbundled/definition29.js +139 -0
- package/unbundled/definition3.cjs +131 -285
- package/unbundled/definition3.js +113 -280
- package/unbundled/definition30.cjs +75 -0
- package/unbundled/definition30.js +57 -0
- package/unbundled/definition31.cjs +1265 -0
- package/unbundled/definition31.js +1247 -0
- package/unbundled/definition32.cjs +1908 -0
- package/unbundled/definition32.js +1866 -0
- package/unbundled/definition33.cjs +261 -0
- package/unbundled/definition33.js +183 -0
- package/unbundled/definition34.cjs +46 -0
- package/unbundled/definition34.js +33 -0
- package/unbundled/definition35.cjs +152 -0
- package/unbundled/definition35.js +134 -0
- package/unbundled/definition36.cjs +426 -0
- package/unbundled/definition36.js +408 -0
- package/unbundled/definition37.cjs +243 -0
- package/unbundled/definition37.js +225 -0
- package/unbundled/definition38.cjs +409 -0
- package/unbundled/definition38.js +391 -0
- package/unbundled/definition39.cjs +298 -0
- package/unbundled/definition39.js +280 -0
- package/unbundled/definition4.cjs +186 -206
- package/unbundled/definition4.js +162 -201
- package/unbundled/definition40.cjs +81 -0
- package/unbundled/definition40.js +63 -0
- package/unbundled/definition41.cjs +100 -0
- package/unbundled/definition41.js +82 -0
- package/unbundled/definition42.cjs +457 -0
- package/unbundled/definition42.js +439 -0
- package/unbundled/definition43.cjs +86 -0
- package/unbundled/definition43.js +68 -0
- package/unbundled/definition44.cjs +60 -0
- package/unbundled/definition44.js +41 -0
- package/unbundled/definition45.cjs +124 -0
- package/unbundled/definition45.js +106 -0
- package/unbundled/definition46.cjs +85 -0
- package/unbundled/definition46.js +67 -0
- package/unbundled/definition47.cjs +52 -0
- package/unbundled/definition47.js +31 -0
- package/unbundled/definition48.cjs +69 -0
- package/unbundled/definition48.js +51 -0
- package/unbundled/definition49.cjs +377 -0
- package/unbundled/definition49.js +359 -0
- package/unbundled/definition5.cjs +69 -298
- package/unbundled/definition5.js +44 -293
- package/unbundled/definition50.cjs +246 -0
- package/unbundled/definition50.js +228 -0
- package/unbundled/definition51.cjs +337 -0
- package/unbundled/definition51.js +319 -0
- package/unbundled/definition52.cjs +86 -0
- package/unbundled/definition52.js +67 -0
- package/unbundled/definition53.cjs +193 -0
- package/unbundled/definition53.js +174 -0
- package/unbundled/definition54.cjs +297 -0
- package/unbundled/definition54.js +279 -0
- package/unbundled/definition55.cjs +510 -0
- package/unbundled/definition55.js +492 -0
- package/unbundled/definition56.cjs +12728 -0
- package/unbundled/definition56.js +12553 -0
- package/unbundled/definition57.cjs +837 -0
- package/unbundled/definition57.js +819 -0
- package/unbundled/definition58.cjs +146 -0
- package/unbundled/definition58.js +128 -0
- package/unbundled/definition59.cjs +1080 -0
- package/unbundled/definition59.js +1062 -0
- package/unbundled/definition6.cjs +88 -56
- package/unbundled/definition6.js +69 -52
- package/unbundled/definition60.cjs +149 -0
- package/unbundled/definition60.js +131 -0
- package/unbundled/definition61.cjs +116 -0
- package/unbundled/definition61.js +97 -0
- package/unbundled/definition62.cjs +213 -0
- package/unbundled/definition62.js +195 -0
- package/unbundled/definition63.cjs +159 -0
- package/unbundled/definition63.js +141 -0
- package/unbundled/definition64.cjs +86 -0
- package/unbundled/definition64.js +68 -0
- package/unbundled/definition65.cjs +126 -0
- package/unbundled/definition65.js +107 -0
- package/unbundled/definition66.cjs +49 -0
- package/unbundled/definition66.js +28 -0
- package/unbundled/definition67.cjs +119 -0
- package/unbundled/definition67.js +101 -0
- package/unbundled/definition68.cjs +374 -0
- package/unbundled/definition68.js +349 -0
- package/unbundled/definition69.cjs +57 -0
- package/unbundled/definition69.js +38 -0
- package/unbundled/definition7.cjs +190 -0
- package/unbundled/definition7.js +166 -0
- package/unbundled/definition70.cjs +155 -0
- package/unbundled/definition70.js +137 -0
- package/unbundled/definition71.cjs +302 -0
- package/unbundled/definition71.js +284 -0
- package/unbundled/definition72.cjs +49 -0
- package/unbundled/definition72.js +38 -0
- package/unbundled/definition73.cjs +171 -0
- package/unbundled/definition73.js +147 -0
- package/unbundled/definition74.cjs +232 -0
- package/unbundled/definition74.js +213 -0
- package/unbundled/definition75.cjs +52241 -0
- package/unbundled/definition75.js +52223 -0
- package/unbundled/definition8.cjs +63 -0
- package/unbundled/definition8.js +44 -0
- package/unbundled/definition9.cjs +183 -0
- package/unbundled/definition9.js +165 -0
- package/unbundled/delegates-aria.cjs +90 -131
- package/unbundled/delegates-aria.js +77 -127
- package/unbundled/dialog.cjs +15 -0
- package/unbundled/dialog.js +10 -0
- package/unbundled/divider.cjs +42 -50
- package/unbundled/divider.js +30 -47
- package/unbundled/en-US.cjs +447 -0
- package/unbundled/en-US.js +443 -0
- package/unbundled/enums.cjs +166 -107
- package/unbundled/enums.js +95 -94
- package/unbundled/form-associated.cjs +408 -464
- package/unbundled/form-associated.js +396 -461
- package/unbundled/form-element.cjs +74 -83
- package/unbundled/form-element.js +68 -81
- package/unbundled/host-semantics.cjs +70 -88
- package/unbundled/host-semantics.js +57 -84
- package/unbundled/key-codes.cjs +16 -10
- package/unbundled/key-codes.js +5 -7
- package/unbundled/linkable.cjs +35 -56
- package/unbundled/linkable.js +27 -52
- package/unbundled/listbox.cjs +363 -473
- package/unbundled/listbox.js +357 -471
- package/unbundled/localized.cjs +79 -74
- package/unbundled/localized.js +61 -70
- package/unbundled/mixins.cjs +222 -225
- package/unbundled/mixins.js +186 -213
- package/unbundled/picker-field.template.cjs +188 -218
- package/unbundled/picker-field.template.js +165 -209
- package/unbundled/playbackRates.cjs +18 -11
- package/unbundled/playbackRates.js +13 -9
- package/unbundled/scrollIntoView.cjs +38 -44
- package/unbundled/scrollIntoView.js +33 -42
- package/unbundled/single-date-picker.cjs +48 -45
- package/unbundled/single-date-picker.js +43 -43
- package/unbundled/single-value-picker.cjs +106 -114
- package/unbundled/single-value-picker.js +101 -112
- package/unbundled/slider.template.cjs +107 -73
- package/unbundled/slider.template.js +67 -62
- package/unbundled/slottable-request.cjs +3114 -3503
- package/unbundled/slottable-request.js +2995 -3484
- package/unbundled/text-field.cjs +9 -5
- package/unbundled/text-field.js +4 -3
- package/unbundled/time-selection-picker.template.cjs +611 -758
- package/unbundled/time-selection-picker.template.js +554 -745
- package/unbundled/trapped-focus.cjs +45 -35
- package/unbundled/trapped-focus.js +34 -32
- package/unbundled/vivid-element.cjs +281 -273
- package/unbundled/vivid-element.js +239 -265
- package/unbundled/with-contextual-help.cjs +35 -39
- package/unbundled/with-contextual-help.js +29 -37
- package/unbundled/with-error-text.cjs +45 -55
- package/unbundled/with-error-text.js +39 -53
- package/unbundled/with-success-text.cjs +18 -22
- package/unbundled/with-success-text.js +12 -20
- package/video-player/definition.cjs +5 -69602
- package/video-player/definition.js +1 -69595
- package/video-player/index.cjs +44 -55
- package/video-player/index.js +23548 -35488
- package/visually-hidden/definition.cjs +5 -30
- package/visually-hidden/definition.js +1 -23
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +5 -2
- package/vivid.api.json +197 -2003
- package/bundled/index.cjs +0 -1
- package/bundled/index.js +0 -6
- package/unbundled/_commonjsHelpers.cjs +0 -36
- package/unbundled/_commonjsHelpers.js +0 -32
- package/unbundled/index.cjs +0 -11
- package/unbundled/index.js +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
<div class='base' @keydown='${(e,{event:
|
|
3
|
-
<${
|
|
4
|
-
${
|
|
1
|
+
const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./ref.cjs`),r=require(`./slotted.cjs`),i=require(`./decorate.cjs`),a=require(`./class-names.cjs`),o=require(`./form-associated.cjs`),s=require(`./form-element.cjs`),c=require(`./with-error-text.cjs`),l=require(`./with-contextual-help.cjs`),u=require(`./trapped-focus.cjs`),d=require(`./definition6.cjs`),f=require(`./dialog.cjs`),p=require(`./definition8.cjs`),m=require(`./mixins.cjs`),h=require(`./definition15.cjs`);var g=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,_=class extends l.t(m.t(c.t(s.t(u.t(e.t(o.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this.proxy=document.createElement(`input`),this._popupOpen=!1,this._presentationValue=``,this.value=``}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.#o),this.addEventListener(`focusin`,this.#e),this.addEventListener(`focusout`,this.#t),this.#i()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.#o),this.removeEventListener(`focusin`,this.#e),this.removeEventListener(`focusout`,this.#t),this.#a()}#e=()=>{this.$emit(`focus`,void 0,{bubbles:!1})};#t=()=>{this.$emit(`blur`,void 0,{bubbles:!1})};validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??``),super.validate(this._textFieldEl?.querySelector(`input`)??void 0)}#n={handleChange:()=>{this._updatePresentationValue()}};#r;#i(){this.#r=t.w.binding(()=>this.locale,this.#n),this.#r.observe(this,t.C.default)}#a(){this.#r.dispose()}#o=e=>{if(!this._popupOpen)return;let t=e.composedPath();[this._dialogEl,this._pickerButtonEl].some(e=>t.includes(e))||this._closePopup(!1)};#s(){this.readOnly||(this._popupOpen=!0)}_closePopup(e=!0){this._popupOpen=!1,e&&this._textFieldEl.focus()}_onBaseKeyDown(e){return this._popupOpen&&f.t(e)?(this._closePopup(),!1):!this._trappedFocus(e,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(e){this._presentationValue=e.currentTarget.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#s()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit(`clear-click`)}};i.t([t.l({attribute:`readonly`,mode:`boolean`})],_.prototype,`readOnly`,void 0),i.t([t.T],_.prototype,`_popupOpen`,void 0),i.t([t.T],_.prototype,`_presentationValue`,void 0);var v=(e,i,{withSeparator:o,padded:s})=>{let c=e.tagFor(p.i),l=e.tagFor(h.r),u=e.tagFor(d.i);return t.d`
|
|
2
|
+
<div class='base' @keydown='${(e,{event:t})=>e._onBaseKeyDown(t)}'>
|
|
3
|
+
<${l} id='text-field'
|
|
4
|
+
${n.t(`_textFieldEl`)}
|
|
5
5
|
class='control'
|
|
6
6
|
label='${e=>e.label}'
|
|
7
7
|
helper-text='${e=>e.helperText}'
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
current-value='${e=>e._presentationValue}'
|
|
12
12
|
?disabled='${e=>e.disabled}'
|
|
13
13
|
?readonly='${e=>e.readOnly}'
|
|
14
|
-
@input='${(e,
|
|
14
|
+
@input='${(e,t)=>e._onTextFieldInput(t.event)}'
|
|
15
15
|
@change='${e=>e._onTextFieldChange()}'
|
|
16
16
|
>
|
|
17
17
|
<slot
|
|
18
|
-
slot='${e=>e._helperTextSlottedContent?.length
|
|
18
|
+
slot='${e=>e._helperTextSlottedContent?.length?`helper-text`:void 0}'
|
|
19
19
|
name='helper-text'
|
|
20
|
-
${
|
|
20
|
+
${r.t(`_helperTextSlottedContent`)}
|
|
21
21
|
></slot>
|
|
22
22
|
<slot
|
|
23
|
-
slot='${e=>e._contextualHelpSlottedContent?.length
|
|
23
|
+
slot='${e=>e._contextualHelpSlottedContent?.length?`contextual-help`:void 0}'
|
|
24
24
|
name='contextual-help'
|
|
25
|
-
${
|
|
25
|
+
${r.t(`_contextualHelpSlottedContent`)}
|
|
26
26
|
></slot>
|
|
27
|
-
<${
|
|
27
|
+
<${u}
|
|
28
28
|
id='picker-button'
|
|
29
|
-
${
|
|
29
|
+
${n.t(`_pickerButtonEl`)}
|
|
30
30
|
slot='action-items'
|
|
31
31
|
size='condensed'
|
|
32
32
|
icon='${e=>e._pickerButtonIcon}'
|
|
@@ -34,34 +34,34 @@
|
|
|
34
34
|
?disabled='${e=>e.disabled||e.readOnly}'
|
|
35
35
|
aria-label='${e=>e._pickerButtonLabel}'
|
|
36
36
|
@click='${e=>e._onPickerButtonClick()}'
|
|
37
|
-
></${
|
|
38
|
-
</${
|
|
39
|
-
<${
|
|
37
|
+
></${u}>
|
|
38
|
+
</${l}>
|
|
39
|
+
<${c}
|
|
40
40
|
?open='${e=>e._popupOpen}'
|
|
41
41
|
:anchor='${e=>e._textFieldEl}'
|
|
42
42
|
offset='${e=>e._helperTextSlottedContent?.length||e.helperText||e.errorValidationMessage?8:null}'
|
|
43
43
|
placement='bottom-start'
|
|
44
44
|
class='popup'>
|
|
45
|
-
<div class="${()=>
|
|
46
|
-
${()=>
|
|
47
|
-
<div class="${()=>
|
|
48
|
-
<${
|
|
45
|
+
<div class="${()=>a.t(`dialog`,[`dialog--padded`,s])}" role='dialog' ${n.t(`_dialogEl`)} aria-modal='true' aria-label='${e=>e._dialogLabel}'>
|
|
46
|
+
${()=>i}
|
|
47
|
+
<div class="${()=>a.t(`footer`,[`footer--with-separator`,o])}">
|
|
48
|
+
<${u}
|
|
49
49
|
id='clear-button'
|
|
50
50
|
tabindex='3'
|
|
51
51
|
class='vwc-button'
|
|
52
52
|
size='condensed'
|
|
53
53
|
label='${e=>e.locale.pickerField.clearLabel}'
|
|
54
54
|
@click='${e=>e._onClearClick()}'
|
|
55
|
-
></${
|
|
56
|
-
<${
|
|
55
|
+
></${u}>
|
|
56
|
+
<${u}
|
|
57
57
|
tabindex='3'
|
|
58
58
|
class='vwc-button'
|
|
59
59
|
size='condensed'
|
|
60
60
|
appearance='filled'
|
|
61
61
|
label='${e=>e.locale.pickerField.okLabel}'
|
|
62
62
|
@click='${e=>e._onOkClick()}'
|
|
63
|
-
></${
|
|
63
|
+
></${u}>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
|
-
</${
|
|
67
|
-
</div>`};exports.
|
|
66
|
+
</${c}>
|
|
67
|
+
</div>`};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
|
|
@@ -1,151 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { t as e } from "./localized.js";
|
|
2
|
+
import { C as t, T as n, d as r, l as i, t as a, w as o } from "./vivid-element.js";
|
|
3
|
+
import { t as s } from "./ref.js";
|
|
4
|
+
import { t as c } from "./slotted.js";
|
|
5
|
+
import { t as l } from "./decorate.js";
|
|
6
|
+
import { t as u } from "./class-names.js";
|
|
7
|
+
import { n as d } from "./form-associated.js";
|
|
8
|
+
import { t as f } from "./form-element.js";
|
|
9
|
+
import { t as p } from "./with-error-text.js";
|
|
10
|
+
import { t as m } from "./with-contextual-help.js";
|
|
11
|
+
import { t as h } from "./trapped-focus.js";
|
|
12
|
+
import { i as g } from "./definition6.js";
|
|
13
|
+
import { t as _ } from "./dialog.js";
|
|
14
|
+
import { i as v } from "./definition8.js";
|
|
15
|
+
import { t as y } from "./mixins.js";
|
|
16
|
+
import { r as b } from "./definition15.js";
|
|
17
|
+
//#region src/shared/picker-field/picker-field.scss?inline
|
|
18
|
+
var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}", S = class extends m(y(p(f(h(e(d(a))))))) {
|
|
19
|
+
readOnlyChanged() {
|
|
20
|
+
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
|
|
21
|
+
}
|
|
22
|
+
constructor() {
|
|
23
|
+
super(), this.readOnly = !1, this.proxy = document.createElement("input"), this._popupOpen = !1, this._presentationValue = "", this.value = "";
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback(), document.addEventListener("click", this.#o), this.addEventListener("focusin", this.#e), this.addEventListener("focusout", this.#t), this.#i();
|
|
27
|
+
}
|
|
28
|
+
disconnectedCallback() {
|
|
29
|
+
super.disconnectedCallback(), document.removeEventListener("click", this.#o), this.removeEventListener("focusin", this.#e), this.removeEventListener("focusout", this.#t), this.#a();
|
|
30
|
+
}
|
|
31
|
+
#e = () => {
|
|
32
|
+
this.$emit("focus", void 0, { bubbles: !1 });
|
|
33
|
+
};
|
|
34
|
+
#t = () => {
|
|
35
|
+
this.$emit("blur", void 0, { bubbles: !1 });
|
|
36
|
+
};
|
|
37
|
+
validate() {
|
|
38
|
+
this.proxy && this.proxy.setCustomValidity(this._getCustomValidationError() ?? ""), super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
39
|
+
}
|
|
40
|
+
#n = { handleChange: () => {
|
|
41
|
+
this._updatePresentationValue();
|
|
42
|
+
} };
|
|
43
|
+
#r;
|
|
44
|
+
#i() {
|
|
45
|
+
this.#r = o.binding(() => this.locale, this.#n), this.#r.observe(this, t.default);
|
|
46
|
+
}
|
|
47
|
+
#a() {
|
|
48
|
+
this.#r.dispose();
|
|
49
|
+
}
|
|
50
|
+
#o = (e) => {
|
|
51
|
+
if (!this._popupOpen) return;
|
|
52
|
+
let t = e.composedPath();
|
|
53
|
+
[this._dialogEl, this._pickerButtonEl].some((e) => t.includes(e)) || this._closePopup(!1);
|
|
54
|
+
};
|
|
55
|
+
#s() {
|
|
56
|
+
/* v8 ignore else -- @preserve */
|
|
57
|
+
this.readOnly || (this._popupOpen = !0);
|
|
58
|
+
}
|
|
59
|
+
_closePopup(e = !0) {
|
|
60
|
+
this._popupOpen = !1, e && this._textFieldEl.focus();
|
|
61
|
+
}
|
|
62
|
+
_onBaseKeyDown(e) {
|
|
63
|
+
return this._popupOpen && _(e) ? (this._closePopup(), !1) : !this._trappedFocus(e, () => this._focusableElsWithinDialog());
|
|
64
|
+
}
|
|
65
|
+
_presentationValueChanged() {
|
|
66
|
+
this.dirtyValue = !0, this.validate();
|
|
67
|
+
}
|
|
68
|
+
_onTextFieldInput(e) {
|
|
69
|
+
this._presentationValue = e.currentTarget.value;
|
|
70
|
+
}
|
|
71
|
+
_onPickerButtonClick() {
|
|
72
|
+
this._popupOpen ? this._closePopup() : this.#s();
|
|
73
|
+
}
|
|
74
|
+
_onOkClick() {
|
|
75
|
+
this._closePopup();
|
|
76
|
+
}
|
|
77
|
+
_onClearClick() {
|
|
78
|
+
this.$emit("clear-click");
|
|
79
|
+
}
|
|
21
80
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.$emit("blur", void 0, { bubbles: !1 });
|
|
35
|
-
}, this.proxy = document.createElement("input"), this.#l = {
|
|
36
|
-
handleChange: () => {
|
|
37
|
-
this._updatePresentationValue();
|
|
38
|
-
}
|
|
39
|
-
}, this._popupOpen = !1, this.#i = (t) => {
|
|
40
|
-
if (!this._popupOpen)
|
|
41
|
-
return;
|
|
42
|
-
const l = t.composedPath();
|
|
43
|
-
[this._dialogEl, this._pickerButtonEl].some((o) => l.includes(o)) || this._closePopup(!1);
|
|
44
|
-
}, this._presentationValue = "", this.value = "";
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
*/
|
|
49
|
-
readOnlyChanged() {
|
|
50
|
-
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
connectedCallback() {
|
|
56
|
-
super.connectedCallback(), document.addEventListener("click", this.#i), this.addEventListener("focusin", this.#e), this.addEventListener("focusout", this.#t), this.#s();
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
super.disconnectedCallback(), document.removeEventListener("click", this.#i), this.removeEventListener("focusin", this.#e), this.removeEventListener("focusout", this.#t), this.#a();
|
|
63
|
-
}
|
|
64
|
-
#e;
|
|
65
|
-
#t;
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
validate() {
|
|
70
|
-
this.proxy && this.proxy.setCustomValidity(this._getCustomValidationError() ?? ""), super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
71
|
-
}
|
|
72
|
-
#l;
|
|
73
|
-
#o;
|
|
74
|
-
#s() {
|
|
75
|
-
this.#o = g.binding(
|
|
76
|
-
() => this.locale,
|
|
77
|
-
this.#l
|
|
78
|
-
), this.#o.observe(this, v.default);
|
|
79
|
-
}
|
|
80
|
-
#a() {
|
|
81
|
-
this.#o.dispose();
|
|
82
|
-
}
|
|
83
|
-
#i;
|
|
84
|
-
#n() {
|
|
85
|
-
/* v8 ignore else -- @preserve */
|
|
86
|
-
this.readOnly || (this._popupOpen = !0);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
_closePopup(t = !0) {
|
|
92
|
-
this._popupOpen = !1, t && this._textFieldEl.focus();
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* On keydown anywhere in the picker.
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
_onBaseKeyDown(t) {
|
|
99
|
-
return this._popupOpen && f(t) ? (this._closePopup(), !1) : !this._trappedFocus(t, () => this._focusableElsWithinDialog());
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
_presentationValueChanged() {
|
|
105
|
-
this.dirtyValue = !0, this.validate();
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @internal
|
|
109
|
-
*/
|
|
110
|
-
_onTextFieldInput(t) {
|
|
111
|
-
const l = t.currentTarget;
|
|
112
|
-
this._presentationValue = l.value;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
_onPickerButtonClick() {
|
|
118
|
-
this._popupOpen ? this._closePopup() : this.#n();
|
|
119
|
-
}
|
|
120
|
-
// --- Dialog footer ---
|
|
121
|
-
/**
|
|
122
|
-
* @internal
|
|
123
|
-
*/
|
|
124
|
-
_onOkClick() {
|
|
125
|
-
this._closePopup();
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* @internal
|
|
129
|
-
*/
|
|
130
|
-
_onClearClick() {
|
|
131
|
-
this.$emit("clear-click");
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
d([
|
|
135
|
-
x({ attribute: "readonly", mode: "boolean" })
|
|
136
|
-
], c.prototype, "readOnly");
|
|
137
|
-
d([
|
|
138
|
-
m
|
|
139
|
-
], c.prototype, "_popupOpen");
|
|
140
|
-
d([
|
|
141
|
-
m
|
|
142
|
-
], c.prototype, "_presentationValue");
|
|
143
|
-
const Q = (s, t, { withSeparator: l, padded: n }) => {
|
|
144
|
-
const o = s.tagFor(T), a = s.tagFor(P), i = s.tagFor(L);
|
|
145
|
-
return k`
|
|
146
|
-
<div class='base' @keydown='${(e, { event: r }) => e._onBaseKeyDown(r)}'>
|
|
147
|
-
<${a} id='text-field'
|
|
148
|
-
${p("_textFieldEl")}
|
|
81
|
+
l([i({
|
|
82
|
+
attribute: "readonly",
|
|
83
|
+
mode: "boolean"
|
|
84
|
+
})], S.prototype, "readOnly", void 0), l([n], S.prototype, "_popupOpen", void 0), l([n], S.prototype, "_presentationValue", void 0);
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/shared/picker-field/picker-field.template.ts
|
|
87
|
+
var C = (e, t, { withSeparator: n, padded: i }) => {
|
|
88
|
+
let a = e.tagFor(v), o = e.tagFor(b), l = e.tagFor(g);
|
|
89
|
+
return r`
|
|
90
|
+
<div class='base' @keydown='${(e, { event: t }) => e._onBaseKeyDown(t)}'>
|
|
91
|
+
<${o} id='text-field'
|
|
92
|
+
${s("_textFieldEl")}
|
|
149
93
|
class='control'
|
|
150
94
|
label='${(e) => e.label}'
|
|
151
95
|
helper-text='${(e) => e.helperText}'
|
|
@@ -155,22 +99,22 @@ const Q = (s, t, { withSeparator: l, padded: n }) => {
|
|
|
155
99
|
current-value='${(e) => e._presentationValue}'
|
|
156
100
|
?disabled='${(e) => e.disabled}'
|
|
157
101
|
?readonly='${(e) => e.readOnly}'
|
|
158
|
-
@input='${(e,
|
|
102
|
+
@input='${(e, t) => e._onTextFieldInput(t.event)}'
|
|
159
103
|
@change='${(e) => e._onTextFieldChange()}'
|
|
160
104
|
>
|
|
161
105
|
<slot
|
|
162
106
|
slot='${(e) => e._helperTextSlottedContent?.length ? "helper-text" : void 0}'
|
|
163
107
|
name='helper-text'
|
|
164
|
-
${
|
|
108
|
+
${c("_helperTextSlottedContent")}
|
|
165
109
|
></slot>
|
|
166
110
|
<slot
|
|
167
111
|
slot='${(e) => e._contextualHelpSlottedContent?.length ? "contextual-help" : void 0}'
|
|
168
112
|
name='contextual-help'
|
|
169
|
-
${
|
|
113
|
+
${c("_contextualHelpSlottedContent")}
|
|
170
114
|
></slot>
|
|
171
|
-
<${
|
|
115
|
+
<${l}
|
|
172
116
|
id='picker-button'
|
|
173
|
-
${
|
|
117
|
+
${s("_pickerButtonEl")}
|
|
174
118
|
slot='action-items'
|
|
175
119
|
size='condensed'
|
|
176
120
|
icon='${(e) => e._pickerButtonIcon}'
|
|
@@ -178,45 +122,37 @@ const Q = (s, t, { withSeparator: l, padded: n }) => {
|
|
|
178
122
|
?disabled='${(e) => e.disabled || e.readOnly}'
|
|
179
123
|
aria-label='${(e) => e._pickerButtonLabel}'
|
|
180
124
|
@click='${(e) => e._onPickerButtonClick()}'
|
|
181
|
-
></${
|
|
182
|
-
</${
|
|
183
|
-
<${
|
|
125
|
+
></${l}>
|
|
126
|
+
</${o}>
|
|
127
|
+
<${a}
|
|
184
128
|
?open='${(e) => e._popupOpen}'
|
|
185
129
|
:anchor='${(e) => e._textFieldEl}'
|
|
186
130
|
offset='${(e) => e._helperTextSlottedContent?.length || e.helperText || e.errorValidationMessage ? 8 : null}'
|
|
187
131
|
placement='bottom-start'
|
|
188
132
|
class='popup'>
|
|
189
|
-
<div class="${() =>
|
|
190
|
-
"dialog--padded",
|
|
191
|
-
n
|
|
192
|
-
])}" role='dialog' ${p(
|
|
193
|
-
"_dialogEl"
|
|
194
|
-
)} aria-modal='true' aria-label='${(e) => e._dialogLabel}'>
|
|
133
|
+
<div class="${() => u("dialog", ["dialog--padded", i])}" role='dialog' ${s("_dialogEl")} aria-modal='true' aria-label='${(e) => e._dialogLabel}'>
|
|
195
134
|
${() => t}
|
|
196
|
-
<div class="${() =>
|
|
197
|
-
<${
|
|
135
|
+
<div class="${() => u("footer", ["footer--with-separator", n])}">
|
|
136
|
+
<${l}
|
|
198
137
|
id='clear-button'
|
|
199
138
|
tabindex='3'
|
|
200
139
|
class='vwc-button'
|
|
201
140
|
size='condensed'
|
|
202
141
|
label='${(e) => e.locale.pickerField.clearLabel}'
|
|
203
142
|
@click='${(e) => e._onClearClick()}'
|
|
204
|
-
></${
|
|
205
|
-
<${
|
|
143
|
+
></${l}>
|
|
144
|
+
<${l}
|
|
206
145
|
tabindex='3'
|
|
207
146
|
class='vwc-button'
|
|
208
147
|
size='condensed'
|
|
209
148
|
appearance='filled'
|
|
210
149
|
label='${(e) => e.locale.pickerField.okLabel}'
|
|
211
150
|
@click='${(e) => e._onOkClick()}'
|
|
212
|
-
></${
|
|
151
|
+
></${l}>
|
|
213
152
|
</div>
|
|
214
153
|
</div>
|
|
215
|
-
</${
|
|
154
|
+
</${a}>
|
|
216
155
|
</div>`;
|
|
217
156
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Q as a,
|
|
221
|
-
J as p
|
|
222
|
-
};
|
|
157
|
+
//#endregion
|
|
158
|
+
export { S as n, x as r, C as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e){if(e===``)return[];let t=[];return e.split(`,`).forEach(e=>{let n=Number(e);isNaN(n)||t.push(n)}),t}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
package/bundled/playbackRates.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/shared/utils/playbackRates.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (e === "") return [];
|
|
4
|
+
let t = [];
|
|
5
|
+
return e.split(",").forEach((e) => {
|
|
6
|
+
let n = Number(e);
|
|
7
|
+
isNaN(n) || t.push(n);
|
|
8
|
+
}), t;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as t };
|
package/bundled/ref.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`./vivid-element.cjs`);var t=class extends e.h{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}};e.m.define(t);var n=e=>new t(e);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
package/bundled/ref.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
bind(t) {
|
|
8
|
-
t.source[this.options] = t.targets[this.targetNodeId];
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
r.define(s);
|
|
12
|
-
const c = (e) => new s(e);
|
|
13
|
-
export {
|
|
14
|
-
c as r
|
|
1
|
+
import { h as e, m as t } from "./vivid-element.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/templating/ref.js
|
|
3
|
+
var n = class extends e {
|
|
4
|
+
bind(e) {
|
|
5
|
+
e.source[this.options] = e.targets[this.targetNodeId];
|
|
6
|
+
}
|
|
15
7
|
};
|
|
8
|
+
t.define(n);
|
|
9
|
+
var r = (e) => new n(e);
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as t };
|
package/bundled/repeat.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./vivid-element.cjs"),V=require("./normalize.cjs");class v{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}class S{constructor(e){this.sorted=e}}const T=Object.freeze({reset:1,splice:2,optimized:3}),j=new v(0,f.emptyArray,0);j.reset=!0;const _=[j];function H(i,e,t,s,o,n){const l=n-o+1,h=t-e+1,d=new Array(l);let a,c;for(let r=0;r<l;++r)d[r]=new Array(h),d[r][0]=r;for(let r=0;r<h;++r)d[0][r]=r;for(let r=1;r<l;++r)for(let u=1;u<h;++u)i[e+u-1]===s[o+r-1]?d[r][u]=d[r-1][u-1]:(a=d[r-1][u]+1,c=d[r][u-1]+1,d[r][u]=a<c?a:c);return d}function L(i){let e=i.length-1,t=i[0].length-1,s=i[e][t];const o=[];for(;e>0||t>0;){if(e===0){o.push(2),t--;continue}if(t===0){o.push(3),e--;continue}const n=i[e-1][t-1],l=i[e-1][t],h=i[e][t-1];let d;l<h?d=l<n?l:n:d=h<n?h:n,d===n?(n===s?o.push(0):(o.push(1),s=n),e--,t--):d===l?(o.push(3),e--,s=l):(o.push(2),t--,s=h)}return o.reverse()}function $(i,e,t){for(let s=0;s<t;++s)if(i[s]!==e[s])return s;return t}function E(i,e,t){let s=i.length,o=e.length,n=0;for(;n<t&&i[--s]===e[--o];)n++;return n}function q(i,e,t,s){return e<t||s<i?-1:e===t||s===i?0:i<t?e<s?e-t:s-t:s<e?s-i:e-i}function D(i,e,t,s,o,n){let l=0,h=0;const d=Math.min(t-e,n-o);if(e===0&&o===0&&(l=$(i,s,d)),t===i.length&&n===s.length&&(h=E(i,s,d-l)),e+=l,o+=l,t-=h,n-=h,t-e===0&&n-o===0)return f.emptyArray;if(e===t){const g=new v(e,[],0);for(;o<n;)g.removed.push(s[o++]);return[g]}else if(o===n)return[new v(e,[],t-e)];const a=L(H(i,e,t,s,o,n)),c=[];let r,u=e,p=o;for(let g=0;g<a.length;++g)switch(a[g]){case 0:r!==void 0&&(c.push(r),r=void 0),u++,p++;break;case 1:r===void 0&&(r=new v(u,[],0)),r.addedCount++,u++,r.removed.push(s[p]),p++;break;case 2:r===void 0&&(r=new v(u,[],0)),r.addedCount++,u++;break;case 3:r===void 0&&(r=new v(u,[],0)),r.removed.push(s[p]),p++;break}return r!==void 0&&c.push(r),c}function P(i,e){let t=!1,s=0;for(let o=0;o<e.length;o++){const n=e[o];if(n.index+=s,t)continue;const l=q(i.index,i.index+i.removed.length,n.index,n.index+n.addedCount);if(l>=0){e.splice(o,1),o--,s-=n.addedCount-n.removed.length,i.addedCount+=n.addedCount-l;const h=i.removed.length+n.removed.length-l;if(!i.addedCount&&!h)t=!0;else{let d=n.removed;if(i.index<n.index){const a=i.removed.slice(0,n.index-i.index);a.push(...d),d=a}if(i.index+i.removed.length>n.index+n.addedCount){const a=i.removed.slice(n.index+n.addedCount-i.index);d.push(...a)}i.removed=d,n.index<i.index&&(i.index=n.index)}}else if(i.index<n.index){t=!0,e.splice(o,0,i),o++;const h=i.addedCount-i.removed.length;n.index+=h,s+=h}}t||e.push(i)}function Q(i,e){let t=[];const s=[];for(let o=0,n=e.length;o<n;o++)P(e[o],s);for(let o=0,n=s.length;o<n;++o){const l=s[o];if(l.addedCount===1&&l.removed.length===1){l.removed[0]!==i[l.index]&&t.push(l);continue}t=t.concat(D(i,l.index,l.index+l.addedCount,l.removed,0,l.removed.length))}return t}let z=Object.freeze({support:T.optimized,normalize(i,e,t){return i===void 0?t===void 0?f.emptyArray:Q(e,t):_},pop(i,e,t,s){const o=i.length>0,n=t.apply(i,s);return o&&e.addSplice(new v(i.length,[n],0)),n},push(i,e,t,s){const o=t.apply(i,s);return e.addSplice(new v(i.length-s.length,[],s.length).adjustTo(i)),o},reverse(i,e,t,s){const o=t.apply(i,s);i.sorted++;const n=[];for(let l=i.length-1;l>=0;l--)n.push(l);return e.addSort(new S(n)),o},shift(i,e,t,s){const o=i.length>0,n=t.apply(i,s);return o&&e.addSplice(new v(0,[n],0)),n},sort(i,e,t,s){const o=new Map;for(let h=0,d=i.length;h<d;++h){const a=o.get(i[h])||[];o.set(i[h],[...a,h])}const n=t.apply(i,s);i.sorted++;const l=[];for(let h=0,d=i.length;h<d;++h){const a=o.get(i[h]);l.push(a[0]),o.set(i[h],a.splice(1))}return e.addSort(new S(l)),n},splice(i,e,t,s){const o=t.apply(i,s);return e.addSplice(new v(+s[0],o,s.length>2?s.length-2:0).adjustTo(i)),o},unshift(i,e,t,s){const o=t.apply(i,s);return e.addSplice(new v(0,[],s.length).adjustTo(i)),o}});function y(i,e,t,s=!0){Reflect.defineProperty(i,e,{value:t,enumerable:!1,writable:s})}class W extends f.SubscriberSet{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,y(e,"$fastController",this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(e===void 0){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,f.Observable.notify(e,"length"))}},this.subscribe(e)}return e}get sortObserver(){let e=this._sortObserver;if(e===void 0){const t=this.subject;this._sortObserver=e={sorted:t.sorted,handleChange(){this.sorted!==t.sorted&&(this.sorted=t.sorted,f.Observable.notify(e,"sorted"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){this.splices===void 0?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){this.sorts===void 0?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.sorts,o=this.oldCollection;t===void 0&&o===void 0&&s===void 0||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,s!==void 0?this.notify(s):this.notify(((e=this._strategy)!==null&&e!==void 0?e:z).normalize(o,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,f.Updates.enqueue(this))}}let B=!1;const F=Object.freeze({sorted:0,enable(){if(B)return;B=!0,f.Observable.setArrayObserverFactory(e=>new W(e));const i=Array.prototype;i.$fastPatch||(y(i,"$fastPatch",1),y(i,"sorted",0),[i.pop,i.push,i.reverse,i.shift,i.sort,i.splice,i.unshift].forEach(e=>{i[e.name]=function(...t){var s;const o=this.$fastController;return o===void 0?e.apply(this,t):((s=o.strategy)!==null&&s!==void 0?s:z)[e.name](this,o,e,t)}}))}}),N=Object.freeze({positioning:!1,recycle:!0});function U(i,e,t,s){i.context.parent=s.source,i.context.parentContext=s.context,i.bind(e[t])}function X(i,e,t,s){i.context.parent=s.source,i.context.parentContext=s.context,i.context.length=e.length,i.context.index=t,i.bind(e[t])}function M(i){return i.nodeType===Node.COMMENT_NODE}class A extends Error{constructor(e,t){super(e),this.propertyBag=t}}class G{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=U,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=X)}bind(e){this.location=e.targets[this.directive.targetNodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),f.isHydratable(this.template)&&f.isHydratable(e)&&e.hydrationStage!==f.HydrationStage.hydrated?this.hydrateViews(this.template):this.refreshAllViews(),e.onUnbind(this)}unbind(){this.itemsObserver!==null&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else if(t[0])t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t);else return}observeItems(e=!1){if(!this.items){this.items=f.emptyArray;return}const t=this.itemsObserver,s=this.itemsObserver=f.Observable.getNotifier(this.items),o=t!==s;o&&t!==null&&t.unsubscribe(this),(o||e)&&s.subscribe(this)}updateSortedViews(e){const t=this.views;for(let s=0,o=e.length;s<o;++s){const n=e[s].sorted.slice(),l=n.slice().sort();for(let h=0,d=n.length;h<d;++h){const a=n.find(c=>n[h]===l[c]);if(a!==h){const c=l.splice(a,1);l.splice(h,0,...c);const r=t[h],u=r?r.firstChild:this.location;t[a].remove(),t[a].insertBefore(u);const p=t.splice(a,1);t.splice(h,0,...p)}}}}updateSplicedViews(e){const t=this.views,s=this.bindView,o=this.items,n=this.template,l=this.controller,h=this.directive.options.recycle,d=[];let a=0,c=0;for(let r=0,u=e.length;r<u;++r){const p=e[r],g=p.removed;let w=0,m=p.index;const R=m+p.addedCount,x=t.splice(p.index,g.length),k=c=d.length+x.length;for(;m<R;++m){const C=t[m],I=C?C.firstChild:this.location;let b;h&&c>0?(w<=k&&x.length>0?(b=x[w],w++):(b=d[a],a++),c--):b=n.create(),t.splice(m,0,b),s(b,o,m,l),b.insertBefore(I)}x[w]&&d.push(...x.slice(w))}for(let r=a,u=d.length;r<u;++r)d[r].dispose();if(this.directive.options.positioning)for(let r=0,u=t.length;r<u;++r){const p=t[r].context;p.length=u,p.index=r}}refreshAllViews(e=!1){const t=this.items,s=this.template,o=this.location,n=this.bindView,l=this.controller;let h=t.length,d=this.views,a=d.length;if((h===0||e||!this.directive.options.recycle)&&(f.HTMLView.disposeContiguousBatch(d),a=0),a===0){this.views=d=new Array(h);for(let c=0;c<h;++c){const r=s.create();n(r,t,c,l),d[c]=r,r.insertBefore(o)}}else{let c=0;for(;c<h;++c)if(c<a){const u=d[c];if(!u){const p=new XMLSerializer;throw new A(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:c,hydrationStage:this.controller.hydrationStage,itemsLength:h,viewsState:d.map(g=>g?"hydrated":"empty"),viewTemplateString:p.serializeToString(s.create().fragment),rootNodeContent:p.serializeToString(this.location.getRootNode())})}n(u,t,c,l)}else{const u=s.create();n(u,t,c,l),d.push(u),u.insertBefore(o)}const r=d.splice(c,a-c);for(c=0,h=r.length;c<h;++c)r[c].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t){const o=e[t];if(!o){const n=new XMLSerializer;throw new A(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map(l=>l?"hydrated":"empty"),rootNodeContent:n.serializeToString(this.location.getRootNode())})}o.unbind()}}hydrateViews(e){if(!this.items)return;this.views=new Array(this.items.length);let t=this.location.previousSibling;for(;t!==null;){if(!M(t)){t=t.previousSibling;continue}const s=f.HydrationMarkup.parseRepeatEndMarker(t.data);if(s===null){t=t.previousSibling;continue}t.data="";const o=t.previousSibling;if(!o)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let n=o,l=0;for(;n!==null;){if(M(n)){if(f.HydrationMarkup.isRepeatViewEndMarker(n.data))l++;else if(f.HydrationMarkup.isRepeatViewStartMarker(n.data))if(l)l--;else{if(f.HydrationMarkup.parseRepeatStartMarker(n.data)!==s)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": Mismatched start and end markers.`);n.data="",t=n.previousSibling,n=n.nextSibling;const h=e.hydrate(n,o);this.views[s]=h,this.bindView(h,this.items,s,this.controller);break}}n=n.previousSibling}if(!n)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": start should never be null.`)}}}class O{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,F.enable()}createHTML(e){return f.Markup.comment(e(this))}createBehavior(){return new G(this)}}f.HTMLDirective.define(O);function J(i,e,t=N){const s=V.normalizeBinding(i),o=V.normalizeBinding(e);return new O(s,o,Object.assign(Object.assign({},N),t))}exports.RepeatDirective=O;exports.repeat=J;
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./normalize.cjs`);var n=class{constructor(e,t,n){this.index=e,this.removed=t,this.addedCount=n}adjustTo(e){let t=this.index,n=e.length;return t>n?t=n-this.addedCount:t<0&&(t=n+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}},r=class{constructor(e){this.sorted=e}},i=Object.freeze({reset:1,splice:2,optimized:3}),a=new n(0,e.A,0);a.reset=!0;var o=[a];function s(e,t,n,r,i,a){let o=a-i+1,s=n-t+1,c=Array(o),l,u;for(let e=0;e<o;++e)c[e]=Array(s),c[e][0]=e;for(let e=0;e<s;++e)c[0][e]=e;for(let n=1;n<o;++n)for(let a=1;a<s;++a)e[t+a-1]===r[i+n-1]?c[n][a]=c[n-1][a-1]:(l=c[n-1][a]+1,u=c[n][a-1]+1,c[n][a]=l<u?l:u);return c}function c(e){let t=e.length-1,n=e[0].length-1,r=e[t][n],i=[];for(;t>0||n>0;){if(t===0){i.push(2),n--;continue}if(n===0){i.push(3),t--;continue}let a=e[t-1][n-1],o=e[t-1][n],s=e[t][n-1],c;c=o<s?o<a?o:a:s<a?s:a,c===a?(a===r?i.push(0):(i.push(1),r=a),t--,n--):c===o?(i.push(3),t--,r=o):(i.push(2),n--,r=s)}return i.reverse()}function l(e,t,n){for(let r=0;r<n;++r)if(e[r]!==t[r])return r;return n}function u(e,t,n){let r=e.length,i=t.length,a=0;for(;a<n&&e[--r]===t[--i];)a++;return a}function d(e,t,n,r){return t<n||r<e?-1:t===n||r===e?0:e<n?t<r?t-n:r-n:r<t?r-e:t-e}function f(t,r,i,a,o,d){let f=0,p=0,m=Math.min(i-r,d-o);if(r===0&&o===0&&(f=l(t,a,m)),i===t.length&&d===a.length&&(p=u(t,a,m-f)),r+=f,o+=f,i-=p,d-=p,i-r===0&&d-o===0)return e.A;if(r===i){let e=new n(r,[],0);for(;o<d;)e.removed.push(a[o++]);return[e]}else if(o===d)return[new n(r,[],i-r)];let h=c(s(t,r,i,a,o,d)),g=[],_,v=r,y=o;for(let e=0;e<h.length;++e)switch(h[e]){case 0:_!==void 0&&(g.push(_),_=void 0),v++,y++;break;case 1:_===void 0&&(_=new n(v,[],0)),_.addedCount++,v++,_.removed.push(a[y]),y++;break;case 2:_===void 0&&(_=new n(v,[],0)),_.addedCount++,v++;break;case 3:_===void 0&&(_=new n(v,[],0)),_.removed.push(a[y]),y++;break}return _!==void 0&&g.push(_),g}function p(e,t){let n=!1,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.index+=r,n)continue;let o=d(e.index,e.index+e.removed.length,a.index,a.index+a.addedCount);if(o>=0){t.splice(i,1),i--,r-=a.addedCount-a.removed.length,e.addedCount+=a.addedCount-o;let s=e.removed.length+a.removed.length-o;if(!e.addedCount&&!s)n=!0;else{let t=a.removed;if(e.index<a.index){let n=e.removed.slice(0,a.index-e.index);n.push(...t),t=n}if(e.index+e.removed.length>a.index+a.addedCount){let n=e.removed.slice(a.index+a.addedCount-e.index);t.push(...n)}e.removed=t,a.index<e.index&&(e.index=a.index)}}else if(e.index<a.index){n=!0,t.splice(i,0,e),i++;let o=e.addedCount-e.removed.length;a.index+=o,r+=o}}n||t.push(e)}function m(e,t){let n=[],r=[];for(let e=0,n=t.length;e<n;e++)p(t[e],r);for(let t=0,i=r.length;t<i;++t){let i=r[t];if(i.addedCount===1&&i.removed.length===1){i.removed[0]!==e[i.index]&&n.push(i);continue}n=n.concat(f(e,i.index,i.index+i.addedCount,i.removed,0,i.removed.length))}return n}var h=Object.freeze({support:i.optimized,normalize(t,n,r){return t===void 0?r===void 0?e.A:m(n,r):o},pop(e,t,r,i){let a=e.length>0,o=r.apply(e,i);return a&&t.addSplice(new n(e.length,[o],0)),o},push(e,t,r,i){let a=r.apply(e,i);return t.addSplice(new n(e.length-i.length,[],i.length).adjustTo(e)),a},reverse(e,t,n,i){let a=n.apply(e,i);e.sorted++;let o=[];for(let t=e.length-1;t>=0;t--)o.push(t);return t.addSort(new r(o)),a},shift(e,t,r,i){let a=e.length>0,o=r.apply(e,i);return a&&t.addSplice(new n(0,[o],0)),o},sort(e,t,n,i){let a=new Map;for(let t=0,n=e.length;t<n;++t){let n=a.get(e[t])||[];a.set(e[t],[...n,t])}let o=n.apply(e,i);e.sorted++;let s=[];for(let t=0,n=e.length;t<n;++t){let n=a.get(e[t]);s.push(n[0]),a.set(e[t],n.splice(1))}return t.addSort(new r(s)),o},splice(e,t,r,i){let a=r.apply(e,i);return t.addSplice(new n(+i[0],a,i.length>2?i.length-2:0).adjustTo(e)),a},unshift(e,t,r,i){let a=r.apply(e,i);return t.addSplice(new n(0,[],i.length).adjustTo(e)),a}});Object.freeze({reset:o,setDefaultStrategy(e){h=e}});function g(e,t,n,r=!0){Reflect.defineProperty(e,t,{value:n,enumerable:!1,writable:r})}var _=class extends e.D{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.sorts=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this._sortObserver=void 0,this.call=this.flush,g(e,`$fastController`,this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let t=this._lengthObserver;if(t===void 0){let n=this.subject;this._lengthObserver=t={length:n.length,handleChange(){this.length!==n.length&&(this.length=n.length,e.w.notify(t,`length`))}},this.subscribe(t)}return t}get sortObserver(){let t=this._sortObserver;if(t===void 0){let n=this.subject;this._sortObserver=t={sorted:n.sorted,handleChange(){this.sorted!==n.sorted&&(this.sorted=n.sorted,e.w.notify(t,`sorted`))}},this.subscribe(t)}return t}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){this.splices===void 0?this.splices=[e]:this.splices.push(e),this.enqueue()}addSort(e){this.sorts===void 0?this.sorts=[e]:this.sorts.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){let e=this.splices,t=this.sorts,n=this.oldCollection;e===void 0&&n===void 0&&t===void 0||(this.needsQueue=!0,this.splices=void 0,this.sorts=void 0,this.oldCollection=void 0,t===void 0?this.notify((this._strategy??h).normalize(n,this.subject,e)):this.notify(t))}enqueue(){this.needsQueue&&(this.needsQueue=!1,e.O.enqueue(this))}},v=!1,y=Object.freeze({sorted:0,enable(){if(v)return;v=!0,e.w.setArrayObserverFactory(e=>new _(e));let t=Array.prototype;t.$fastPatch||(g(t,`$fastPatch`,1),g(t,`sorted`,0),[t.pop,t.push,t.reverse,t.shift,t.sort,t.splice,t.unshift].forEach(e=>{t[e.name]=function(...t){let n=this.$fastController;return n===void 0?e.apply(this,t):(n.strategy??h)[e.name](this,n,e,t)}}))}}),b=Object.freeze({positioning:!1,recycle:!0});function x(e,t,n,r){e.context.parent=r.source,e.context.parentContext=r.context,e.bind(t[n])}function S(e,t,n,r){e.context.parent=r.source,e.context.parentContext=r.context,e.context.length=t.length,e.context.index=n,e.bind(t[n])}function C(e){return e.nodeType===Node.COMMENT_NODE}var w=class extends Error{constructor(e,t){super(e),this.propertyBag=t}},T=class{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=x,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(this,e),this.templateBindingObserver=e.templateBinding.createObserver(this,e),e.options.positioning&&(this.bindView=S)}bind(t){this.location=t.targets[this.directive.targetNodeId],this.controller=t,this.items=this.itemsBindingObserver.bind(t),this.template=this.templateBindingObserver.bind(t),this.observeItems(!0),e.v(this.template)&&e.v(t)&&t.hydrationStage!==e.p.hydrated?this.hydrateViews(this.template):this.refreshAllViews(),t.onUnbind(this)}unbind(){this.itemsObserver!==null&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else if(t[0])t[0].reset?this.refreshAllViews():t[0].sorted?this.updateSortedViews(t):this.updateSplicedViews(t);else return}observeItems(t=!1){if(!this.items){this.items=e.A;return}let n=this.itemsObserver,r=this.itemsObserver=e.w.getNotifier(this.items),i=n!==r;i&&n!==null&&n.unsubscribe(this),(i||t)&&r.subscribe(this)}updateSortedViews(e){let t=this.views;for(let n=0,r=e.length;n<r;++n){let r=e[n].sorted.slice(),i=r.slice().sort();for(let e=0,n=r.length;e<n;++e){let n=r.find(t=>r[e]===i[t]);if(n!==e){let r=i.splice(n,1);i.splice(e,0,...r);let a=t[e],o=a?a.firstChild:this.location;t[n].remove(),t[n].insertBefore(o);let s=t.splice(n,1);t.splice(e,0,...s)}}}}updateSplicedViews(e){let t=this.views,n=this.bindView,r=this.items,i=this.template,a=this.controller,o=this.directive.options.recycle,s=[],c=0,l=0;for(let u=0,d=e.length;u<d;++u){let d=e[u],f=d.removed,p=0,m=d.index,h=m+d.addedCount,g=t.splice(d.index,f.length),_=l=s.length+g.length;for(;m<h;++m){let e=t[m],u=e?e.firstChild:this.location,d;o&&l>0?(p<=_&&g.length>0?(d=g[p],p++):(d=s[c],c++),l--):d=i.create(),t.splice(m,0,d),n(d,r,m,a),d.insertBefore(u)}g[p]&&s.push(...g.slice(p))}for(let e=c,t=s.length;e<t;++e)s[e].dispose();if(this.directive.options.positioning)for(let e=0,n=t.length;e<n;++e){let r=t[e].context;r.length=n,r.index=e}}refreshAllViews(t=!1){let n=this.items,r=this.template,i=this.location,a=this.bindView,o=this.controller,s=n.length,c=this.views,l=c.length;if((s===0||t||!this.directive.options.recycle)&&(e.f.disposeContiguousBatch(c),l=0),l===0){this.views=c=Array(s);for(let e=0;e<s;++e){let t=r.create();a(t,n,e,o),c[e]=t,t.insertBefore(i)}}else{let e=0;for(;e<s;++e)if(e<l){let t=c[e];if(!t){let t=new XMLSerializer;throw new w(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:e,hydrationStage:this.controller.hydrationStage,itemsLength:s,viewsState:c.map(e=>e?`hydrated`:`empty`),viewTemplateString:t.serializeToString(r.create().fragment),rootNodeContent:t.serializeToString(this.location.getRootNode())})}a(t,n,e,o)}else{let t=r.create();a(t,n,e,o),c.push(t),t.insertBefore(i)}let t=c.splice(e,l-e);for(e=0,s=t.length;e<s;++e)t[e].dispose()}}unbindAllViews(){let e=this.views;for(let t=0,n=e.length;t<n;++t){let n=e[t];if(!n){let n=new XMLSerializer;throw new w(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:t,hydrationStage:this.controller.hydrationStage,viewsState:e.map(e=>e?`hydrated`:`empty`),rootNodeContent:n.serializeToString(this.location.getRootNode())})}n.unbind()}}hydrateViews(t){if(!this.items)return;this.views=Array(this.items.length);let n=this.location.previousSibling;for(;n!==null;){if(!C(n)){n=n.previousSibling;continue}let r=e._.parseRepeatEndMarker(n.data);if(r===null){n=n.previousSibling;continue}n.data=``;let i=n.previousSibling;if(!i)throw Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let a=i,o=0;for(;a!==null;){if(C(a)){if(e._.isRepeatViewEndMarker(a.data))o++;else if(e._.isRepeatViewStartMarker(a.data))if(o)o--;else{if(e._.parseRepeatStartMarker(a.data)!==r)throw Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": Mismatched start and end markers.`);a.data=``,n=a.previousSibling,a=a.nextSibling;let o=t.hydrate(a,i);this.views[r]=o,this.bindView(o,this.items,r,this.controller);break}}a=a.previousSibling}if(!a)throw Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": start should never be null.`)}}},E=class{constructor(e,t,n){this.dataBinding=e,this.templateBinding=t,this.options=n,y.enable()}createHTML(t){return e.g.comment(t(this))}createBehavior(){return new T(this)}};e.m.define(E);function D(e,n,r=b){return new E(t.t(e),t.t(n),Object.assign(Object.assign({},b),r))}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
|