@vonage/vivid 5.4.0 → 5.6.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/LICENSE.md +201 -0
- package/accordion/definition.cjs +5 -0
- package/accordion/definition.js +5 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +14 -3
- package/alert/definition.cjs +4 -12
- package/alert/definition.js +5 -13
- package/alert/index.cjs +11 -11
- package/alert/index.js +33 -37
- package/audio-player/definition.cjs +4 -0
- package/audio-player/definition.js +4 -0
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +8 -2
- package/banner/definition.cjs +2 -4
- package/banner/definition.js +2 -4
- package/banner/index.cjs +2 -2
- package/banner/index.js +1 -1
- package/breadcrumb/definition.cjs +1 -0
- package/breadcrumb/definition.js +1 -0
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +1 -0
- package/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +3 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +107 -84
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +3 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +14 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +4 -2
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +29 -19
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +73 -204
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +218 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +86 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +125 -71
- package/bundled/definition19.cjs +16 -16
- package/bundled/definition19.js +132 -94
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +89 -142
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +1 -0
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +2 -1
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +9 -3
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -0
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +7 -4
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -0
- package/bundled/definition9.cjs +6 -6
- package/bundled/definition9.js +545 -488
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +3 -1
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +11 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +22 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +149 -66
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +11 -8
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +36 -56
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +4 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +16 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +4 -4
- package/bundled/vivid-element.js +529 -492
- package/calendar/definition.cjs +2 -0
- package/calendar/definition.js +2 -0
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +174 -144
- package/checkbox/definition.cjs +1 -0
- package/checkbox/definition.js +1 -0
- package/color-picker/definition.cjs +213 -112
- package/color-picker/definition.js +213 -112
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +417 -326
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +54 -42
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +6976 -484
- package/data-grid/definition.cjs +105 -7
- package/data-grid/definition.js +105 -7
- package/data-grid/index.cjs +52 -38
- package/data-grid/index.js +313 -242
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +2 -0
- package/date-range-picker/definition.js +2 -0
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -3
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +148 -0
- package/dial-pad/definition.js +148 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +202 -101
- package/dialog/definition.cjs +1 -0
- package/dialog/definition.js +1 -0
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -0
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/definition.cjs +1 -0
- package/fab/definition.js +1 -0
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -0
- package/file-picker/definition.cjs +7 -2
- package/file-picker/definition.js +7 -2
- package/file-picker/index.cjs +6 -6
- package/file-picker/index.js +82 -73
- package/icon/definition.cjs +66 -41
- package/icon/definition.js +67 -42
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/data-grid/locale.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/icon/icon.d.ts +1 -1
- package/lib/menu/menu.d.ts +4 -4
- package/lib/rich-text-editor/definition.d.ts +3 -2
- package/lib/rich-text-editor/locale.d.ts +29 -3
- package/lib/rich-text-editor/popover.d.ts +19 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/config.d.ts +18 -0
- package/lib/rich-text-editor/rte/document.d.ts +28 -0
- package/lib/rich-text-editor/rte/exports.d.ts +23 -0
- package/lib/rich-text-editor/rte/feature.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
- package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
- package/lib/rich-text-editor/rte/instance.d.ts +57 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
- package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +6 -5
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +4 -4
- package/locales/de-DE.cjs +58 -7
- package/locales/de-DE.js +58 -7
- package/locales/en-GB.cjs +60 -9
- package/locales/en-GB.js +60 -9
- package/locales/en-US.cjs +60 -9
- package/locales/en-US.js +60 -9
- package/locales/ja-JP.cjs +59 -8
- package/locales/ja-JP.js +59 -8
- package/locales/zh-CN.cjs +58 -7
- package/locales/zh-CN.js +58 -7
- package/menu/definition.cjs +1 -0
- package/menu/definition.js +1 -0
- package/number-field/definition.cjs +5 -3
- package/number-field/definition.js +5 -3
- package/number-field/index.cjs +5 -3
- package/number-field/index.js +34 -32
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +76 -62
- package/pagination/definition.cjs +2 -0
- package/pagination/definition.js +2 -0
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -0
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/definition.cjs +4 -0
- package/radio/definition.js +4 -0
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +2 -1
- package/range-slider/definition.js +2 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +3 -1
- package/rich-text-editor/definition.cjs +17942 -1074
- package/rich-text-editor/definition.js +17926 -1079
- package/rich-text-editor/index.cjs +29 -130
- package/rich-text-editor/index.js +5565 -2474
- package/searchable-select/definition.cjs +6 -2
- package/searchable-select/definition.js +6 -2
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +14 -10
- package/select/definition.cjs +22 -4
- package/select/definition.js +22 -4
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/patterns/anchored.d.ts +8 -8
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/localized.d.ts +386 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/shared/utils/promise.d.ts +7 -0
- package/simple-color-picker/definition.cjs +11 -6
- package/simple-color-picker/definition.js +11 -6
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +44 -39
- package/slider/definition.cjs +7 -1
- package/slider/definition.js +7 -1
- package/styles/core/all.css +5 -1
- package/styles/core/theme.css +5 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/definition.cjs +1 -0
- package/switch/definition.js +1 -0
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -0
- package/tabs/definition.cjs +2 -0
- package/tabs/definition.js +2 -0
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +2 -0
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +34 -14
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/definition.cjs +13 -7
- package/text-area/definition.js +13 -7
- package/text-area/index.cjs +6 -6
- package/text-area/index.js +20 -14
- package/text-field/definition.cjs +16 -6
- package/text-field/definition.js +16 -6
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +6 -3
- package/tooltip/definition.js +6 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-view/definition.cjs +28 -6
- package/tree-view/definition.js +28 -6
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +28 -6
- package/unbundled/_commonjsHelpers.cjs +0 -26
- package/unbundled/_commonjsHelpers.js +1 -26
- package/unbundled/attribute-binding-behaviour.cjs +1 -0
- package/unbundled/attribute-binding-behaviour.js +1 -0
- package/unbundled/base-color-picker.cjs +45 -21
- package/unbundled/base-color-picker.js +45 -21
- package/unbundled/base-progress.cjs +3 -0
- package/unbundled/base-progress.js +3 -0
- package/unbundled/button.cjs +14 -10
- package/unbundled/button.js +14 -10
- package/unbundled/calendar-picker.template.cjs +3 -1
- package/unbundled/calendar-picker.template.js +3 -1
- package/unbundled/definition.cjs +1 -0
- package/unbundled/definition.js +1 -0
- package/unbundled/definition2.cjs +4 -1
- package/unbundled/definition2.js +4 -1
- package/unbundled/definition3.cjs +1 -0
- package/unbundled/definition3.js +1 -0
- package/unbundled/definition4.cjs +1 -0
- package/unbundled/definition4.js +1 -0
- package/unbundled/definition5.cjs +3 -2
- package/unbundled/definition5.js +4 -3
- package/unbundled/delegates-aria.cjs +1 -0
- package/unbundled/delegates-aria.js +1 -0
- package/unbundled/form-associated.cjs +4 -0
- package/unbundled/form-associated.js +4 -0
- package/unbundled/listbox.cjs +16 -1
- package/unbundled/listbox.js +16 -1
- package/unbundled/localized.cjs +36 -0
- package/unbundled/localized.js +37 -2
- package/unbundled/mixins.cjs +2 -0
- package/unbundled/mixins.js +2 -0
- package/unbundled/picker-field.template.cjs +3 -35
- package/unbundled/picker-field.template.js +3 -34
- package/unbundled/scrollIntoView.cjs +1 -0
- package/unbundled/scrollIntoView.js +1 -0
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +5 -1
- package/unbundled/time-selection-picker.template.js +5 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +54 -44
- package/video-player/definition.js +50 -40
- package/video-player/index.cjs +28 -28
- package/video-player/index.js +1448 -1442
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +6463 -6099
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
- package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
- package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
- package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
- package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
- package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
- package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
|
@@ -64,14 +64,22 @@ const BaseColorPicker = (Base) => {
|
|
|
64
64
|
this.proxy = document.createElement("input");
|
|
65
65
|
this.open = false;
|
|
66
66
|
this.swatches = [];
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
67
|
this._canvasColor = "";
|
|
71
68
|
}
|
|
72
69
|
connectedCallback() {
|
|
73
70
|
super.connectedCallback();
|
|
74
|
-
|
|
71
|
+
requestAnimationFrame(() => {
|
|
72
|
+
this._refreshCanvasColor();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
get _computedCanvasColor() {
|
|
79
|
+
if (!this._canvasColor) {
|
|
80
|
+
this._canvasColor = getCSSCustomProperty("--vvd-color-canvas", this);
|
|
81
|
+
}
|
|
82
|
+
return this._canvasColor;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* @internal
|
|
@@ -83,8 +91,10 @@ const BaseColorPicker = (Base) => {
|
|
|
83
91
|
* @internal
|
|
84
92
|
*/
|
|
85
93
|
_applyContrastClass(color, threshold = 3) {
|
|
86
|
-
if (!color
|
|
87
|
-
const
|
|
94
|
+
if (!color) return false;
|
|
95
|
+
const canvasColor = this._computedCanvasColor;
|
|
96
|
+
if (!canvasColor) return false;
|
|
97
|
+
const ratio = getContrastRatio(color, canvasColor);
|
|
88
98
|
return ratio < threshold;
|
|
89
99
|
}
|
|
90
100
|
/**
|
|
@@ -107,7 +117,8 @@ const BaseColorPicker = (Base) => {
|
|
|
107
117
|
}
|
|
108
118
|
/**
|
|
109
119
|
* @internal
|
|
110
|
-
|
|
120
|
+
* /
|
|
121
|
+
/* v8 ignore next -- @preserve */
|
|
111
122
|
_handleColorSaving() {
|
|
112
123
|
}
|
|
113
124
|
/**
|
|
@@ -145,21 +156,25 @@ const BaseColorPicker = (Base) => {
|
|
|
145
156
|
const currentCol = index % rowLength;
|
|
146
157
|
const totalRows = Math.ceil(totalCells / rowLength);
|
|
147
158
|
switch (event.key) {
|
|
148
|
-
case "ArrowRight":
|
|
159
|
+
case "ArrowRight": {
|
|
160
|
+
/* v8 ignore else -- @preserve */
|
|
149
161
|
if (currentCol < rowLength - 1 && index + 1 < totalCells) {
|
|
150
162
|
this._focusSwatchByIndex(index + 1);
|
|
151
163
|
}
|
|
152
164
|
return false;
|
|
165
|
+
}
|
|
153
166
|
case "ArrowLeft":
|
|
154
167
|
if (currentCol > 0) {
|
|
155
168
|
this._focusSwatchByIndex(index - 1);
|
|
156
169
|
}
|
|
157
170
|
return false;
|
|
158
|
-
case "ArrowDown":
|
|
171
|
+
case "ArrowDown": {
|
|
172
|
+
/* v8 ignore else -- @preserve */
|
|
159
173
|
if (currentRow < totalRows - 1 && index + rowLength < totalCells) {
|
|
160
174
|
this._focusSwatchByIndex(index + rowLength);
|
|
161
175
|
}
|
|
162
176
|
return false;
|
|
177
|
+
}
|
|
163
178
|
case "ArrowUp":
|
|
164
179
|
if (currentRow > 0) {
|
|
165
180
|
this._focusSwatchByIndex(index - rowLength);
|
|
@@ -171,6 +186,7 @@ const BaseColorPicker = (Base) => {
|
|
|
171
186
|
lastRowStart + currentCol,
|
|
172
187
|
totalCells - 1
|
|
173
188
|
);
|
|
189
|
+
/* v8 ignore else -- @preserve */
|
|
174
190
|
if (index !== targetIndex) {
|
|
175
191
|
this._focusSwatchByIndex(targetIndex);
|
|
176
192
|
}
|
|
@@ -233,33 +249,38 @@ const BaseColorPicker = (Base) => {
|
|
|
233
249
|
/**
|
|
234
250
|
* @internal
|
|
235
251
|
*/
|
|
236
|
-
_renderColorSwatch(iconTag) {
|
|
252
|
+
_renderColorSwatch(iconTag, tooltipTag) {
|
|
237
253
|
return html`
|
|
238
|
-
|
|
239
|
-
|
|
254
|
+
<${tooltipTag} placement="top"
|
|
255
|
+
text="${(x) => x.label ?? x.value}"
|
|
256
|
+
exportparts="vvd-theme-alternate">
|
|
257
|
+
<button
|
|
258
|
+
slot="anchor"
|
|
259
|
+
class="swatch ${(x, c) => classNames(
|
|
240
260
|
c.parent.value === x.value ? "selected" : "",
|
|
241
261
|
c.parent._applyContrastClass(x.value) ? "contrast" : ""
|
|
242
262
|
)}"
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
263
|
+
role="gridcell"
|
|
264
|
+
style="--swatch-color: ${(x) => x.value};"
|
|
265
|
+
tabindex="${(x, c) => c.index === 0 ? "0" : "-1"}"
|
|
266
|
+
aria-label="${(x, c) => c.parent.locale.baseColorPicker.colorSwatchLabel(
|
|
247
267
|
x.value,
|
|
248
268
|
x.label,
|
|
249
269
|
c.parent.value === x.value
|
|
250
270
|
)}"
|
|
251
|
-
|
|
252
|
-
|
|
271
|
+
@click="${(x, c) => c.parent._handleSwatchSelection(x.value)}"
|
|
272
|
+
@keydown="${(x, c) => c.parent._handleCellKeydown(
|
|
253
273
|
c.event,
|
|
254
274
|
x.value,
|
|
255
275
|
c.index
|
|
256
276
|
)}"
|
|
257
|
-
|
|
258
|
-
|
|
277
|
+
>
|
|
278
|
+
${when(
|
|
259
279
|
(x, c) => c.parent.value === x.value,
|
|
260
280
|
html`<${iconTag} size="-6" name="check-solid" aria-hidden="true"></${iconTag}>`
|
|
261
281
|
)}
|
|
262
|
-
|
|
282
|
+
</button>
|
|
283
|
+
</${tooltipTag}>
|
|
263
284
|
`;
|
|
264
285
|
}
|
|
265
286
|
}
|
|
@@ -269,6 +290,9 @@ const BaseColorPicker = (Base) => {
|
|
|
269
290
|
__decorateClass([
|
|
270
291
|
observable
|
|
271
292
|
], BaseColorPickerElement.prototype, "swatches");
|
|
293
|
+
__decorateClass([
|
|
294
|
+
observable
|
|
295
|
+
], BaseColorPickerElement.prototype, "_canvasColor");
|
|
272
296
|
return BaseColorPickerElement;
|
|
273
297
|
};
|
|
274
298
|
|
|
@@ -21,6 +21,7 @@ class BaseProgress extends vividElement.VividElement {
|
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
23
|
valueChanged() {
|
|
24
|
+
/* v8 ignore if -- @preserve */
|
|
24
25
|
if (this.$fastController.isConnected) {
|
|
25
26
|
this.updatePercentComplete();
|
|
26
27
|
}
|
|
@@ -29,6 +30,7 @@ class BaseProgress extends vividElement.VividElement {
|
|
|
29
30
|
* @internal
|
|
30
31
|
*/
|
|
31
32
|
minChanged() {
|
|
33
|
+
/* v8 ignore if -- @preserve */
|
|
32
34
|
if (this.$fastController.isConnected) {
|
|
33
35
|
this.updatePercentComplete();
|
|
34
36
|
}
|
|
@@ -37,6 +39,7 @@ class BaseProgress extends vividElement.VividElement {
|
|
|
37
39
|
* @private
|
|
38
40
|
*/
|
|
39
41
|
maxChanged() {
|
|
42
|
+
/* v8 ignore if -- @preserve */
|
|
40
43
|
if (this.$fastController.isConnected) {
|
|
41
44
|
this.updatePercentComplete();
|
|
42
45
|
}
|
|
@@ -19,6 +19,7 @@ class BaseProgress extends VividElement {
|
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
21
|
valueChanged() {
|
|
22
|
+
/* v8 ignore if -- @preserve */
|
|
22
23
|
if (this.$fastController.isConnected) {
|
|
23
24
|
this.updatePercentComplete();
|
|
24
25
|
}
|
|
@@ -27,6 +28,7 @@ class BaseProgress extends VividElement {
|
|
|
27
28
|
* @internal
|
|
28
29
|
*/
|
|
29
30
|
minChanged() {
|
|
31
|
+
/* v8 ignore if -- @preserve */
|
|
30
32
|
if (this.$fastController.isConnected) {
|
|
31
33
|
this.updatePercentComplete();
|
|
32
34
|
}
|
|
@@ -35,6 +37,7 @@ class BaseProgress extends VividElement {
|
|
|
35
37
|
* @private
|
|
36
38
|
*/
|
|
37
39
|
maxChanged() {
|
|
40
|
+
/* v8 ignore if -- @preserve */
|
|
38
41
|
if (this.$fastController.isConnected) {
|
|
39
42
|
this.updatePercentComplete();
|
|
40
43
|
}
|
package/unbundled/button.cjs
CHANGED
|
@@ -28,6 +28,7 @@ class VividFoundationButton extends delegatesAria.DelegatesAria(
|
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
30
|
this.handleClick = (e) => {
|
|
31
|
+
/* v8 ignore else -- @preserve */
|
|
31
32
|
if (this.disabled) {
|
|
32
33
|
e.stopPropagation();
|
|
33
34
|
}
|
|
@@ -55,6 +56,7 @@ class VividFoundationButton extends delegatesAria.DelegatesAria(
|
|
|
55
56
|
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
56
57
|
*/
|
|
57
58
|
this.handleUnsupportedDelegatesFocus = () => {
|
|
59
|
+
/* v8 ignore else -- @preserve */
|
|
58
60
|
if (this.$fastController.definition.shadowOptions) {
|
|
59
61
|
if (window.ShadowRoot && /* eslint-disable-next-line */
|
|
60
62
|
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && this.$fastController.definition.shadowOptions.delegatesFocus) {
|
|
@@ -70,36 +72,42 @@ class VividFoundationButton extends delegatesAria.DelegatesAria(
|
|
|
70
72
|
}
|
|
71
73
|
// @ts-expect-error Function is delcared but not used
|
|
72
74
|
formactionChanged() {
|
|
75
|
+
/* v8 ignore if -- @preserve */
|
|
73
76
|
if (this.proxy instanceof HTMLInputElement) {
|
|
74
77
|
this.proxy.formAction = this.formaction;
|
|
75
78
|
}
|
|
76
79
|
}
|
|
77
80
|
// @ts-expect-error Function is delcared but not used
|
|
78
81
|
formenctypeChanged() {
|
|
82
|
+
/* v8 ignore if -- @preserve */
|
|
79
83
|
if (this.proxy instanceof HTMLInputElement) {
|
|
80
84
|
this.proxy.formEnctype = this.formenctype;
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
// @ts-expect-error Function is delcared but not used
|
|
84
88
|
formmethodChanged() {
|
|
89
|
+
/* v8 ignore if -- @preserve */
|
|
85
90
|
if (this.proxy instanceof HTMLInputElement) {
|
|
86
91
|
this.proxy.formMethod = this.formmethod;
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
// @ts-expect-error Function is delcared but not used
|
|
90
95
|
formnovalidateChanged() {
|
|
96
|
+
/* v8 ignore if -- @preserve */
|
|
91
97
|
if (this.proxy instanceof HTMLInputElement) {
|
|
92
98
|
this.proxy.formNoValidate = this.formnovalidate;
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
// @ts-expect-error Function is delcared but not used
|
|
96
102
|
formtargetChanged() {
|
|
103
|
+
/* v8 ignore if -- @preserve */
|
|
97
104
|
if (this.proxy instanceof HTMLInputElement) {
|
|
98
105
|
this.proxy.formTarget = this.formtarget;
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
// @ts-expect-error Function is delcared but not used
|
|
102
109
|
typeChanged(previous, next) {
|
|
110
|
+
/* v8 ignore if -- @preserve */
|
|
103
111
|
if (this.proxy instanceof HTMLInputElement) {
|
|
104
112
|
this.proxy.type = this.type;
|
|
105
113
|
}
|
|
@@ -125,11 +133,9 @@ class VividFoundationButton extends delegatesAria.DelegatesAria(
|
|
|
125
133
|
});
|
|
126
134
|
}
|
|
127
135
|
const elements = Array.from(this.control.children);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
}
|
|
136
|
+
elements.forEach((span) => {
|
|
137
|
+
span.addEventListener("click", this.handleClick);
|
|
138
|
+
});
|
|
133
139
|
}
|
|
134
140
|
/**
|
|
135
141
|
* @internal
|
|
@@ -137,11 +143,9 @@ class VividFoundationButton extends delegatesAria.DelegatesAria(
|
|
|
137
143
|
disconnectedCallback() {
|
|
138
144
|
super.disconnectedCallback();
|
|
139
145
|
const elements = Array.from(this.control.children);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
144
|
-
}
|
|
146
|
+
elements.forEach((span) => {
|
|
147
|
+
span.removeEventListener("click", this.handleClick);
|
|
148
|
+
});
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
__decorateClass([
|
package/unbundled/button.js
CHANGED
|
@@ -26,6 +26,7 @@ class VividFoundationButton extends DelegatesAria(
|
|
|
26
26
|
* @internal
|
|
27
27
|
*/
|
|
28
28
|
this.handleClick = (e) => {
|
|
29
|
+
/* v8 ignore else -- @preserve */
|
|
29
30
|
if (this.disabled) {
|
|
30
31
|
e.stopPropagation();
|
|
31
32
|
}
|
|
@@ -53,6 +54,7 @@ class VividFoundationButton extends DelegatesAria(
|
|
|
53
54
|
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
54
55
|
*/
|
|
55
56
|
this.handleUnsupportedDelegatesFocus = () => {
|
|
57
|
+
/* v8 ignore else -- @preserve */
|
|
56
58
|
if (this.$fastController.definition.shadowOptions) {
|
|
57
59
|
if (window.ShadowRoot && /* eslint-disable-next-line */
|
|
58
60
|
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") && this.$fastController.definition.shadowOptions.delegatesFocus) {
|
|
@@ -68,36 +70,42 @@ class VividFoundationButton extends DelegatesAria(
|
|
|
68
70
|
}
|
|
69
71
|
// @ts-expect-error Function is delcared but not used
|
|
70
72
|
formactionChanged() {
|
|
73
|
+
/* v8 ignore if -- @preserve */
|
|
71
74
|
if (this.proxy instanceof HTMLInputElement) {
|
|
72
75
|
this.proxy.formAction = this.formaction;
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
// @ts-expect-error Function is delcared but not used
|
|
76
79
|
formenctypeChanged() {
|
|
80
|
+
/* v8 ignore if -- @preserve */
|
|
77
81
|
if (this.proxy instanceof HTMLInputElement) {
|
|
78
82
|
this.proxy.formEnctype = this.formenctype;
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
85
|
// @ts-expect-error Function is delcared but not used
|
|
82
86
|
formmethodChanged() {
|
|
87
|
+
/* v8 ignore if -- @preserve */
|
|
83
88
|
if (this.proxy instanceof HTMLInputElement) {
|
|
84
89
|
this.proxy.formMethod = this.formmethod;
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
// @ts-expect-error Function is delcared but not used
|
|
88
93
|
formnovalidateChanged() {
|
|
94
|
+
/* v8 ignore if -- @preserve */
|
|
89
95
|
if (this.proxy instanceof HTMLInputElement) {
|
|
90
96
|
this.proxy.formNoValidate = this.formnovalidate;
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
// @ts-expect-error Function is delcared but not used
|
|
94
100
|
formtargetChanged() {
|
|
101
|
+
/* v8 ignore if -- @preserve */
|
|
95
102
|
if (this.proxy instanceof HTMLInputElement) {
|
|
96
103
|
this.proxy.formTarget = this.formtarget;
|
|
97
104
|
}
|
|
98
105
|
}
|
|
99
106
|
// @ts-expect-error Function is delcared but not used
|
|
100
107
|
typeChanged(previous, next) {
|
|
108
|
+
/* v8 ignore if -- @preserve */
|
|
101
109
|
if (this.proxy instanceof HTMLInputElement) {
|
|
102
110
|
this.proxy.type = this.type;
|
|
103
111
|
}
|
|
@@ -123,11 +131,9 @@ class VividFoundationButton extends DelegatesAria(
|
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
133
|
const elements = Array.from(this.control.children);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
}
|
|
134
|
+
elements.forEach((span) => {
|
|
135
|
+
span.addEventListener("click", this.handleClick);
|
|
136
|
+
});
|
|
131
137
|
}
|
|
132
138
|
/**
|
|
133
139
|
* @internal
|
|
@@ -135,11 +141,9 @@ class VividFoundationButton extends DelegatesAria(
|
|
|
135
141
|
disconnectedCallback() {
|
|
136
142
|
super.disconnectedCallback();
|
|
137
143
|
const elements = Array.from(this.control.children);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
});
|
|
142
|
-
}
|
|
144
|
+
elements.forEach((span) => {
|
|
145
|
+
span.removeEventListener("click", this.handleClick);
|
|
146
|
+
});
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
__decorateClass([
|
|
@@ -7,7 +7,7 @@ const divider = require('./divider.cjs');
|
|
|
7
7
|
const button_definition = require('./definition.cjs');
|
|
8
8
|
const visuallyHidden_definition = require('../visually-hidden/definition.cjs');
|
|
9
9
|
|
|
10
|
-
const calendarStyles = ".segments{display:inline-flex
|
|
10
|
+
const calendarStyles = ".segments{gap:24px}@media (width >= 648px){.segments{display:inline-flex}}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:8px}.calendar{display:flex;flex-direction:column;margin-top:8px;gap:4px}.calendar .calendar-separator{margin-inline:10px}.calendar .calendar-weekdays{display:flex;justify-content:center}.calendar .calendar-weekday{display:inline-flex;align-items:center;justify-content:center;block-size:16px;font:var(--vvd-typography-base-condensed);inline-size:40px}.calendar .calendar-week{display:flex;justify-content:center}.calendar .calendar-day{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:28px;font:var(--vvd-typography-base);margin-inline:6px}.calendar .calendar-day.start,.calendar .calendar-day.end{border:2px solid var(--vvd-color-cta-50);background-color:var(--vvd-color-cta-200)}.calendar:focus-visible .calendar .calendar-day.start,.calendar:focus-visible .calendar .calendar-day.end{border-width:3px}.calendar .calendar-day:before,.calendar .calendar-day:after{position:absolute;z-index:-1;display:block;width:20px;height:28px}.calendar .calendar-day:before{right:50%}.calendar .calendar-day:after{left:50%}.calendar .calendar-day.range:before,.calendar .calendar-day.range:after{background-color:var(--vvd-color-cta-50)}.calendar .calendar-day.range:not(.start):before,.calendar .calendar-day.range:not(.end):after{content:\"\"}.calendar .calendar-day.outside-month,.calendar .calendar-day:disabled{color:var(--vvd-color-neutral-400)}.months-separator{margin-inline:-12px}.month-grid{display:flex;flex-direction:column;gap:34px}.month-grid .months-row{display:flex;justify-content:center;gap:29px}.month-grid .month{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:48px;font:var(--vvd-typography-base-extended);text-transform:uppercase}.month-grid .month:disabled{color:var(--vvd-color-neutral-400)}.button{--_connotation-color-primary: var(--vvd-date-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-date-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-date-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-date-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-date-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-date-picker-accent-pale, var(--vvd-color-neutral-300))}.button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.button:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.button.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.button:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.button.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.button.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.button.selected:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button.selected.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button{position:relative;padding:0;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer}.button:disabled{cursor:not-allowed}.button:focus:not(.title-action),.button.title-action:focus-visible{--focus-stroke-gap-color: transparent;color:var(--vvd-color-canvas-text);box-shadow:0 0 0 4px color-mix(in srgb,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))}.button:focus:not(.title-action).start,.button:focus:not(.title-action).end,.button.title-action:focus-visible.start,.button.title-action:focus-visible.end{border-width:3px}.button.current{border:1px solid var(--vvd-color-neutral-200)}.button.selected{border:1px solid var(--vvd-color-neutral-900)}";
|
|
11
11
|
|
|
12
12
|
const formatDateStr = (date) => dateFns.formatISO(date, { representation: "date" });
|
|
13
13
|
const currentDateStr = (now = /* @__PURE__ */ new Date()) => formatDateStr(now);
|
|
@@ -554,6 +554,7 @@ const MinMaxCalendarPicker = (SuperClass) => {
|
|
|
554
554
|
* @internal
|
|
555
555
|
*/
|
|
556
556
|
minChanged(_, newMin) {
|
|
557
|
+
/* v8 ignore if -- @preserve */
|
|
557
558
|
if (this.proxy instanceof HTMLInputElement) {
|
|
558
559
|
this.proxy.min = newMin;
|
|
559
560
|
this.validate();
|
|
@@ -569,6 +570,7 @@ const MinMaxCalendarPicker = (SuperClass) => {
|
|
|
569
570
|
* @internal
|
|
570
571
|
*/
|
|
571
572
|
maxChanged(_, newMax) {
|
|
573
|
+
/* v8 ignore if -- @preserve */
|
|
572
574
|
if (this.proxy instanceof HTMLInputElement) {
|
|
573
575
|
this.proxy.max = newMax;
|
|
574
576
|
this.validate();
|
|
@@ -5,7 +5,7 @@ import { D as Divider } from './divider.js';
|
|
|
5
5
|
import { B as Button } from './definition.js';
|
|
6
6
|
import { VwcVisuallyHiddenElement as VisuallyHidden } from '../visually-hidden/definition.js';
|
|
7
7
|
|
|
8
|
-
const calendarStyles = ".segments{display:inline-flex
|
|
8
|
+
const calendarStyles = ".segments{gap:24px}@media (width >= 648px){.segments{display:inline-flex}}.segment{display:flex;flex-direction:column;gap:12px}.segment .header{display:flex;align-items:center;padding-block:8px}.segment .title{display:flex;flex-grow:1;justify-content:center}.segment .title-action{border-radius:8px;block-size:24px;font:var(--vvd-typography-base-extended);padding-inline:8px}.calendar{display:flex;flex-direction:column;margin-top:8px;gap:4px}.calendar .calendar-separator{margin-inline:10px}.calendar .calendar-weekdays{display:flex;justify-content:center}.calendar .calendar-weekday{display:inline-flex;align-items:center;justify-content:center;block-size:16px;font:var(--vvd-typography-base-condensed);inline-size:40px}.calendar .calendar-week{display:flex;justify-content:center}.calendar .calendar-day{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:28px;font:var(--vvd-typography-base);margin-inline:6px}.calendar .calendar-day.start,.calendar .calendar-day.end{border:2px solid var(--vvd-color-cta-50);background-color:var(--vvd-color-cta-200)}.calendar:focus-visible .calendar .calendar-day.start,.calendar:focus-visible .calendar .calendar-day.end{border-width:3px}.calendar .calendar-day:before,.calendar .calendar-day:after{position:absolute;z-index:-1;display:block;width:20px;height:28px}.calendar .calendar-day:before{right:50%}.calendar .calendar-day:after{left:50%}.calendar .calendar-day.range:before,.calendar .calendar-day.range:after{background-color:var(--vvd-color-cta-50)}.calendar .calendar-day.range:not(.start):before,.calendar .calendar-day.range:not(.end):after{content:\"\"}.calendar .calendar-day.outside-month,.calendar .calendar-day:disabled{color:var(--vvd-color-neutral-400)}.months-separator{margin-inline:-12px}.month-grid{display:flex;flex-direction:column;gap:34px}.month-grid .months-row{display:flex;justify-content:center;gap:29px}.month-grid .month{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;aspect-ratio:1/1;block-size:48px;font:var(--vvd-typography-base-extended);text-transform:uppercase}.month-grid .month:disabled{color:var(--vvd-color-neutral-400)}.button{--_connotation-color-primary: var(--vvd-date-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-date-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-date-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-date-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-date-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-date-picker-accent-pale, var(--vvd-color-neutral-300))}.button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.button:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.button.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.button:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.button.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.button.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.button.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.button.selected:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button.selected.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.button{position:relative;padding:0;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer}.button:disabled{cursor:not-allowed}.button:focus:not(.title-action),.button.title-action:focus-visible{--focus-stroke-gap-color: transparent;color:var(--vvd-color-canvas-text);box-shadow:0 0 0 4px color-mix(in srgb,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))}.button:focus:not(.title-action).start,.button:focus:not(.title-action).end,.button.title-action:focus-visible.start,.button.title-action:focus-visible.end{border-width:3px}.button.current{border:1px solid var(--vvd-color-neutral-200)}.button.selected{border:1px solid var(--vvd-color-neutral-900)}";
|
|
9
9
|
|
|
10
10
|
const formatDateStr = (date) => formatISO(date, { representation: "date" });
|
|
11
11
|
const currentDateStr = (now = /* @__PURE__ */ new Date()) => formatDateStr(now);
|
|
@@ -552,6 +552,7 @@ const MinMaxCalendarPicker = (SuperClass) => {
|
|
|
552
552
|
* @internal
|
|
553
553
|
*/
|
|
554
554
|
minChanged(_, newMin) {
|
|
555
|
+
/* v8 ignore if -- @preserve */
|
|
555
556
|
if (this.proxy instanceof HTMLInputElement) {
|
|
556
557
|
this.proxy.min = newMin;
|
|
557
558
|
this.validate();
|
|
@@ -567,6 +568,7 @@ const MinMaxCalendarPicker = (SuperClass) => {
|
|
|
567
568
|
* @internal
|
|
568
569
|
*/
|
|
569
570
|
maxChanged(_, newMax) {
|
|
571
|
+
/* v8 ignore if -- @preserve */
|
|
570
572
|
if (this.proxy instanceof HTMLInputElement) {
|
|
571
573
|
this.proxy.max = newMax;
|
|
572
574
|
this.validate();
|
package/unbundled/definition.cjs
CHANGED
|
@@ -37,6 +37,7 @@ class Button extends affix.AffixIconWithTrailing(
|
|
|
37
37
|
* Prevents interaction when disabled or pending.
|
|
38
38
|
*/
|
|
39
39
|
clickHandler(event) {
|
|
40
|
+
/* v8 ignore else -- @preserve */
|
|
40
41
|
if (this.disabled || this.pending) {
|
|
41
42
|
event.preventDefault();
|
|
42
43
|
event.stopImmediatePropagation();
|
package/unbundled/definition.js
CHANGED
|
@@ -35,6 +35,7 @@ class Button extends AffixIconWithTrailing(
|
|
|
35
35
|
* Prevents interaction when disabled or pending.
|
|
36
36
|
*/
|
|
37
37
|
clickHandler(event) {
|
|
38
|
+
/* v8 ignore else -- @preserve */
|
|
38
39
|
if (this.disabled || this.pending) {
|
|
39
40
|
event.preventDefault();
|
|
40
41
|
event.stopImmediatePropagation();
|
|
@@ -107,12 +107,14 @@ class MenuItem extends hostSemantics.HostSemantics(affix.AffixIcon(vividElement.
|
|
|
107
107
|
this.#emitSyntheticClick();
|
|
108
108
|
}
|
|
109
109
|
return false;
|
|
110
|
-
case keyCodes.keyArrowRight:
|
|
110
|
+
case keyCodes.keyArrowRight: {
|
|
111
|
+
/* v8 ignore else -- @preserve */
|
|
111
112
|
if (this.submenu) {
|
|
112
113
|
this.expanded = true;
|
|
113
114
|
this.#emitSyntheticClick();
|
|
114
115
|
}
|
|
115
116
|
return false;
|
|
117
|
+
}
|
|
116
118
|
case keyCodes.keyArrowLeft:
|
|
117
119
|
if (this.expanded) {
|
|
118
120
|
this.#emitSyntheticClick();
|
|
@@ -130,6 +132,7 @@ class MenuItem extends hostSemantics.HostSemantics(affix.AffixIcon(vividElement.
|
|
|
130
132
|
* @internal
|
|
131
133
|
*/
|
|
132
134
|
expandedChanged() {
|
|
135
|
+
/* v8 ignore if -- @preserve */
|
|
133
136
|
if (this.$fastController.isConnected) {
|
|
134
137
|
if (this.submenu && !this.expanded) {
|
|
135
138
|
this.submenu.collapseExpandedItem();
|
package/unbundled/definition2.js
CHANGED
|
@@ -105,12 +105,14 @@ class MenuItem extends HostSemantics(AffixIcon(VividElement)) {
|
|
|
105
105
|
this.#emitSyntheticClick();
|
|
106
106
|
}
|
|
107
107
|
return false;
|
|
108
|
-
case keyArrowRight:
|
|
108
|
+
case keyArrowRight: {
|
|
109
|
+
/* v8 ignore else -- @preserve */
|
|
109
110
|
if (this.submenu) {
|
|
110
111
|
this.expanded = true;
|
|
111
112
|
this.#emitSyntheticClick();
|
|
112
113
|
}
|
|
113
114
|
return false;
|
|
115
|
+
}
|
|
114
116
|
case keyArrowLeft:
|
|
115
117
|
if (this.expanded) {
|
|
116
118
|
this.#emitSyntheticClick();
|
|
@@ -128,6 +130,7 @@ class MenuItem extends HostSemantics(AffixIcon(VividElement)) {
|
|
|
128
130
|
* @internal
|
|
129
131
|
*/
|
|
130
132
|
expandedChanged() {
|
|
133
|
+
/* v8 ignore if -- @preserve */
|
|
131
134
|
if (this.$fastController.isConnected) {
|
|
132
135
|
if (this.submenu && !this.expanded) {
|
|
133
136
|
this.submenu.collapseExpandedItem();
|
package/unbundled/definition3.js
CHANGED
|
@@ -76,6 +76,7 @@ class TreeItem extends hostSemantics.HostSemantics(affix.AffixIcon(vividElement.
|
|
|
76
76
|
itemsChanged() {
|
|
77
77
|
if (this.$fastController.isConnected) {
|
|
78
78
|
this.items.forEach((node) => {
|
|
79
|
+
/* v8 ignore else -- @preserve */
|
|
79
80
|
if (isTreeItemElement(node)) {
|
|
80
81
|
node.nested = true;
|
|
81
82
|
}
|
package/unbundled/definition4.js
CHANGED
|
@@ -77,7 +77,8 @@ class Popup extends vividElement.VividElement {
|
|
|
77
77
|
maxHeight: `${availableHeight}px`
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
})
|
|
80
|
+
}),
|
|
81
|
+
dom.shift()
|
|
81
82
|
];
|
|
82
83
|
let offsetValue = this.offset ?? 0;
|
|
83
84
|
if (this.arrow) {
|
|
@@ -245,7 +246,7 @@ __decorateClass([
|
|
|
245
246
|
fastElement.observable
|
|
246
247
|
], Popup.prototype, "anchor");
|
|
247
248
|
|
|
248
|
-
const styles = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}";
|
|
249
|
+
const styles = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content;min-inline-size:fit-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}";
|
|
249
250
|
|
|
250
251
|
const getClasses = ({ open, dismissible, alternate }) => fastWebUtilities.classNames(
|
|
251
252
|
"control",
|
package/unbundled/definition5.js
CHANGED
|
@@ -2,7 +2,7 @@ import { B as Button, b as buttonDefinition } from './definition.js';
|
|
|
2
2
|
import { E as Elevation, e as elevationDefinition } from './definition6.js';
|
|
3
3
|
import { V as VividElement, d as defineVividComponent, c as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { attr, nullableNumberConverter, observable, ref, when, html } from '@microsoft/fast-element';
|
|
5
|
-
import { inline, autoPlacement, flip, hide, size, arrow, offset, autoUpdate, computePosition } from '@floating-ui/dom';
|
|
5
|
+
import { inline, autoPlacement, flip, hide, size, shift, arrow, offset, autoUpdate, computePosition } from '@floating-ui/dom';
|
|
6
6
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
@@ -75,7 +75,8 @@ class Popup extends VividElement {
|
|
|
75
75
|
maxHeight: `${availableHeight}px`
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
})
|
|
78
|
+
}),
|
|
79
|
+
shift()
|
|
79
80
|
];
|
|
80
81
|
let offsetValue = this.offset ?? 0;
|
|
81
82
|
if (this.arrow) {
|
|
@@ -243,7 +244,7 @@ __decorateClass([
|
|
|
243
244
|
observable
|
|
244
245
|
], Popup.prototype, "anchor");
|
|
245
246
|
|
|
246
|
-
const styles = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}";
|
|
247
|
+
const styles = ":host{display:var(--_popup-display, inline)}.control{border-radius:inherit;background:var(--vvd-color-surface-4dp);contain:layout}.control:not(.open){display:none}.popup-wrapper{white-space:initial;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.popup-wrapper{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.popup-wrapper ::-webkit-scrollbar{width:4px}.popup-wrapper ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.popup-wrapper ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popup-wrapper{z-index:var(--_popup-z-index, 10);overflow:visible;padding:0;border:none;border-radius:8px;margin:0;inline-size:max-content;min-inline-size:fit-content}.popup-wrapper:not(.absolute){position:fixed}.popup-wrapper.absolute{position:absolute;top:0;left:0}.popup-content{display:grid;color:var(--vvd-color-canvas-text)}.dismissible .popup-content{align-content:start;grid-template-columns:1fr auto}.arrow{position:absolute;z-index:-1;width:8px;height:8px;background:var(--vvd-color-surface-4dp);transform:rotate(45deg)}.dismissible-button{align-self:flex-start;margin-block-start:4px;margin-inline-end:4px}";
|
|
247
248
|
|
|
248
249
|
const getClasses = ({ open, dismissible, alternate }) => classNames(
|
|
249
250
|
"control",
|
|
@@ -69,6 +69,7 @@ class DelegateAriaBehavior {
|
|
|
69
69
|
// }
|
|
70
70
|
startForwardingPropertiesToTarget(source, delegatedProperties, target) {
|
|
71
71
|
for (const key of delegatedProperties) {
|
|
72
|
+
/* v8 ignore else -- @preserve */
|
|
72
73
|
if (!(key in this.boundProperties)) {
|
|
73
74
|
this.forwardPropertyToTarget(target, key, source[key]);
|
|
74
75
|
}
|
|
@@ -67,6 +67,7 @@ class DelegateAriaBehavior {
|
|
|
67
67
|
// }
|
|
68
68
|
startForwardingPropertiesToTarget(source, delegatedProperties, target) {
|
|
69
69
|
for (const key of delegatedProperties) {
|
|
70
|
+
/* v8 ignore else -- @preserve */
|
|
70
71
|
if (!(key in this.boundProperties)) {
|
|
71
72
|
this.forwardPropertyToTarget(target, key, source[key]);
|
|
72
73
|
}
|