@vonage/vivid 4.21.1 → 4.23.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/custom-elements.json +2055 -640
- package/index.cjs +1 -1
- package/index.js +2 -2
- package/lib/accordion-item/accordion-item.d.ts +11 -5
- package/lib/action-group/action-group.d.ts +8 -6
- package/lib/alert/alert.d.ts +21 -9
- package/lib/audio-player/audio-player.d.ts +13 -6
- package/lib/badge/badge.d.ts +11 -5
- package/lib/banner/banner.d.ts +26 -12
- package/lib/breadcrumb/breadcrumb.d.ts +333 -1
- package/lib/breadcrumb/breadcrumb.template.d.ts +2 -3
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +8 -6
- package/lib/button/button.d.ts +11 -5
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar-event/calendar-event.d.ts +333 -1
- package/lib/checkbox/checkbox.d.ts +8 -6
- package/lib/combobox/combobox.d.ts +11 -5
- package/lib/date-picker/date-picker.d.ts +74 -50
- package/lib/date-range-picker/date-range-picker.d.ts +38 -26
- package/lib/date-time-picker/date-time-picker.d.ts +76 -52
- package/lib/dial-pad/dial-pad.d.ts +11 -5
- package/lib/dialog/dialog.d.ts +16 -8
- package/lib/divider/divider.d.ts +8 -6
- package/lib/enums.d.ts +0 -4
- package/lib/fab/fab.d.ts +11 -5
- package/lib/file-picker/file-picker.d.ts +338 -1
- package/lib/header/header.d.ts +333 -1
- package/lib/menu/menu.d.ts +16 -8
- package/lib/menu-item/menu-item.d.ts +338 -2
- package/lib/nav/nav.d.ts +333 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +16 -8
- package/lib/nav-item/nav-item.d.ts +11 -5
- package/lib/note/note.d.ts +11 -5
- package/lib/number-field/number-field.d.ts +26 -12
- package/lib/option/option.d.ts +341 -3
- package/lib/progress/progress.d.ts +8 -6
- package/lib/progress-ring/progress-ring.d.ts +8 -6
- package/lib/radio-group/radio-group.d.ts +333 -1
- package/lib/range-slider/range-slider.d.ts +11 -5
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +1 -1
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +7 -1
- package/lib/rich-text-editor/menubar/consts.d.ts +18 -0
- package/lib/rich-text-editor/menubar/menubar.d.ts +3 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +14 -3
- package/lib/searchable-select/option-tag.d.ts +14 -6
- package/lib/searchable-select/searchable-select.d.ts +349 -7
- package/lib/select/select.d.ts +339 -3
- package/lib/selectable-box/selectable-box.d.ts +8 -6
- package/lib/slider/slider.d.ts +16 -8
- package/lib/split-button/split-button.d.ts +26 -12
- package/lib/switch/switch.d.ts +8 -6
- package/lib/tab/tab.d.ts +349 -7
- package/lib/tab-panel/tab-panel.d.ts +333 -1
- package/lib/tabs/definition.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +6 -1
- package/lib/tag/tag.d.ts +338 -2
- package/lib/tag-group/tag-group.d.ts +8 -6
- package/lib/text-anchor/text-anchor.d.ts +16 -8
- package/lib/text-area/text-area.d.ts +8 -6
- package/lib/text-field/text-field.d.ts +16 -8
- package/lib/time-picker/time-picker.d.ts +38 -26
- package/lib/toggletip/toggletip.d.ts +9 -3
- package/lib/tooltip/tooltip.d.ts +9 -3
- package/lib/tree-item/tree-item.d.ts +338 -2
- package/lib/tree-view/tree-view.d.ts +333 -1
- package/lib/video-player/video-player.d.ts +14 -6
- package/package.json +1 -1
- package/shared/affix.js +1 -1
- package/shared/aria/aria-change-subscription.d.ts +6 -0
- package/shared/aria/aria-mixin.d.ts +338 -0
- package/shared/aria/delegate-aria-behavior.d.ts +31 -0
- package/shared/aria/delegates-aria.d.ts +14 -9
- package/shared/aria/host-semantics-behavior.d.ts +22 -0
- package/shared/aria/host-semantics.d.ts +337 -0
- package/shared/attribute-binding-behaviour.cjs +41 -0
- package/shared/attribute-binding-behaviour.js +39 -0
- package/shared/calendar-event.cjs +2 -1
- package/shared/calendar-event.js +2 -1
- package/shared/definition.js +1 -1
- package/shared/definition10.cjs +8 -2
- package/shared/definition10.js +9 -3
- package/shared/definition11.cjs +4 -28
- package/shared/definition11.js +5 -29
- package/shared/definition12.cjs +4 -1
- package/shared/definition12.js +5 -2
- package/shared/definition13.js +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition15.cjs +9 -8
- package/shared/definition15.js +11 -10
- package/shared/definition16.cjs +1 -1
- package/shared/definition16.js +2 -2
- package/shared/definition17.js +1 -1
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +3 -0
- package/shared/definition19.js +4 -1
- package/shared/definition2.js +1 -1
- package/shared/definition20.js +1 -1
- package/shared/definition21.js +1 -1
- package/shared/definition22.cjs +3 -2
- package/shared/definition22.js +5 -4
- package/shared/definition23.cjs +4 -2
- package/shared/definition23.js +6 -4
- package/shared/definition24.js +1 -1
- package/shared/definition25.cjs +2 -14
- package/shared/definition25.js +3 -15
- package/shared/definition26.cjs +15 -2
- package/shared/definition26.js +16 -3
- package/shared/definition27.cjs +3 -2
- package/shared/definition27.js +4 -3
- package/shared/definition28.cjs +1 -1
- package/shared/definition28.js +2 -2
- package/shared/definition29.js +1 -1
- package/shared/definition3.cjs +4 -3
- package/shared/definition3.js +6 -5
- package/shared/definition30.cjs +34 -34
- package/shared/definition30.js +36 -36
- package/shared/definition31.cjs +6 -4
- package/shared/definition31.js +8 -6
- package/shared/definition32.js +1 -1
- package/shared/definition33.cjs +7 -2
- package/shared/definition33.js +8 -3
- package/shared/definition34.js +1 -1
- package/shared/definition35.cjs +3 -14
- package/shared/definition35.js +5 -16
- package/shared/definition36.cjs +8 -5
- package/shared/definition36.js +9 -6
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +7 -8
- package/shared/definition38.js +9 -10
- package/shared/definition39.cjs +7 -8
- package/shared/definition39.js +9 -10
- package/shared/definition4.cjs +1 -1
- package/shared/definition4.js +2 -2
- package/shared/definition40.cjs +8 -5
- package/shared/definition40.js +9 -6
- package/shared/definition41.cjs +1 -1
- package/shared/definition41.js +2 -2
- package/shared/definition42.js +1 -1
- package/shared/definition43.cjs +506 -93
- package/shared/definition43.js +502 -89
- package/shared/definition44.cjs +27 -10
- package/shared/definition44.js +28 -11
- package/shared/definition45.cjs +12 -6
- package/shared/definition45.js +13 -7
- package/shared/definition46.cjs +18 -6
- package/shared/definition46.js +20 -8
- package/shared/definition47.js +1 -1
- package/shared/definition48.js +1 -1
- package/shared/definition49.cjs +10 -3
- package/shared/definition49.js +12 -5
- package/shared/definition5.cjs +7 -2
- package/shared/definition5.js +8 -3
- package/shared/definition50.cjs +8 -7
- package/shared/definition50.js +10 -9
- package/shared/definition51.cjs +3 -2
- package/shared/definition51.js +4 -3
- package/shared/definition52.cjs +8 -4
- package/shared/definition52.js +9 -5
- package/shared/definition53.cjs +5 -0
- package/shared/definition53.js +6 -2
- package/shared/definition54.cjs +4 -3
- package/shared/definition54.js +6 -5
- package/shared/definition55.cjs +7 -4
- package/shared/definition55.js +8 -5
- package/shared/definition56.cjs +69 -15
- package/shared/definition56.js +70 -16
- package/shared/definition57.cjs +163 -112
- package/shared/definition57.js +165 -114
- package/shared/definition58.js +1 -1
- package/shared/definition59.js +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition60.js +1 -1
- package/shared/definition61.cjs +8 -5
- package/shared/definition61.js +9 -6
- package/shared/definition62.cjs +5 -2
- package/shared/definition62.js +6 -3
- package/shared/definition63.js +1 -1
- package/shared/definition64.js +1 -1
- package/shared/definition65.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.cjs +4 -2
- package/shared/definition8.js +6 -4
- package/shared/definition9.js +1 -1
- package/shared/delegates-aria.cjs +106 -56
- package/shared/delegates-aria.js +107 -58
- package/shared/enums.cjs +0 -6
- package/shared/enums.js +1 -6
- package/shared/foundation/button/button.d.ts +8 -6
- package/shared/foundation/vivid-element/vivid-element.d.ts +339 -1
- package/shared/host-semantics.cjs +65 -0
- package/shared/host-semantics.js +62 -0
- package/shared/option.cjs +7 -1
- package/shared/option.js +7 -1
- package/shared/patterns/affix.d.ts +22 -10
- package/shared/patterns/anchored.d.ts +18 -6
- package/shared/patterns/localized.d.ts +11 -5
- package/shared/patterns/trapped-focus.d.ts +11 -5
- package/shared/picker-field/mixins/calendar-picker.d.ts +19 -13
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +19 -13
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +11 -5
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +38 -26
- package/shared/picker-field/mixins/single-date-picker.d.ts +55 -37
- package/shared/picker-field/mixins/single-value-picker.d.ts +17 -11
- package/shared/picker-field/mixins/time-selection-picker.d.ts +38 -26
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +38 -26
- package/shared/picker-field/picker-field.d.ts +21 -9
- package/shared/picker-field.template.js +1 -1
- package/shared/repeat.js +1 -1
- package/shared/single-value-picker.cjs +3 -0
- package/shared/single-value-picker.js +3 -0
- package/shared/slider.template.cjs +10 -9
- package/shared/slider.template.js +10 -9
- package/shared/templating/attribute-binding-behaviour.d.ts +15 -0
- package/shared/templating/render-in-light-dom.d.ts +22 -0
- package/shared/text-anchor.template.cjs +2 -13
- package/shared/text-anchor.template.js +2 -13
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/shared/time-selection-picker.template.js +1 -1
- package/shared/vivid-element.cjs +96 -2
- package/shared/vivid-element.js +93 -3
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -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/text-anchor/index.js +1 -1
- package/vivid.api.json +316 -70
- package/shared/Reflector.cjs +0 -71
- package/shared/Reflector.js +0 -69
package/shared/definition28.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VividElement, a as attr, o as observable, v as volatile, h as html,
|
|
1
|
+
import { V as VividElement, a as attr, o as observable, v as volatile, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
2
2
|
import { _ as _curry1, a as _curry2, b as _has } from './_has.js';
|
|
3
3
|
import { c as classNames } from './class-names.js';
|
|
4
4
|
import { w as when } from './when.js';
|
|
@@ -132,7 +132,7 @@ var memoizeWith = /*#__PURE__*/_curry2(function memoizeWith(keyGen, fn) {
|
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
const ICONS_BASE_URL = "https://icon.resources.vonage.com";
|
|
135
|
-
const ICONS_VERSION = "4.6.
|
|
135
|
+
const ICONS_VERSION = "4.6.5";
|
|
136
136
|
|
|
137
137
|
const numberConverter = {
|
|
138
138
|
toView(value) {
|
package/shared/definition29.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VividElement, a as attr, h as html,
|
|
1
|
+
import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
2
2
|
import { c as classNames } from './class-names.js';
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/shared/definition3.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const vividElement = require('./vivid-element.cjs');
|
|
|
4
4
|
const delegatesAria = require('./delegates-aria.cjs');
|
|
5
5
|
const classNames = require('./class-names.cjs');
|
|
6
6
|
|
|
7
|
-
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--
|
|
7
|
+
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{position:relative;display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);inline-size:inherit;vertical-align:middle}.base:before{position:absolute;z-index:1;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inset:0;pointer-events:none}.base:not(.tight){padding:4px;column-gap:4px}.base:not(.shape-pill){border-radius:8px}.base.shape-pill{border-radius:24px}::slotted([role=separator]){align-self:stretch;margin-block:4px}";
|
|
8
8
|
|
|
9
9
|
var __defProp = Object.defineProperty;
|
|
10
10
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -41,8 +41,9 @@ const getClasses = ({ appearance, shape, tight }) => classNames.classNames(
|
|
|
41
41
|
);
|
|
42
42
|
const ActionGroupTemplate = vividElement.html`<div
|
|
43
43
|
class="${getClasses}"
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
${delegatesAria.delegateAria({
|
|
45
|
+
role: (x) => x.role ? x.role : "group"
|
|
46
|
+
})}
|
|
46
47
|
>
|
|
47
48
|
<slot></slot>
|
|
48
49
|
</div>`;
|
package/shared/definition3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { V as VividElement, a as attr, h as html,
|
|
2
|
-
import { D as DelegatesAria } from './delegates-aria.js';
|
|
1
|
+
import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
2
|
+
import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
|
|
3
3
|
import { c as classNames } from './class-names.js';
|
|
4
4
|
|
|
5
|
-
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--
|
|
5
|
+
const styles = ":host{display:inline-block}.base{--_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base{position:relative;display:flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);inline-size:inherit;vertical-align:middle}.base:before{position:absolute;z-index:1;border-radius:inherit;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inset:0;pointer-events:none}.base:not(.tight){padding:4px;column-gap:4px}.base:not(.shape-pill){border-radius:8px}.base.shape-pill{border-radius:24px}::slotted([role=separator]){align-self:stretch;margin-block:4px}";
|
|
6
6
|
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -39,8 +39,9 @@ const getClasses = ({ appearance, shape, tight }) => classNames(
|
|
|
39
39
|
);
|
|
40
40
|
const ActionGroupTemplate = html`<div
|
|
41
41
|
class="${getClasses}"
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
${delegateAria({
|
|
43
|
+
role: (x) => x.role ? x.role : "group"
|
|
44
|
+
})}
|
|
44
45
|
>
|
|
45
46
|
<slot></slot>
|
|
46
47
|
</div>`;
|
package/shared/definition30.cjs
CHANGED
|
@@ -6,6 +6,7 @@ const vividElement = require('./vivid-element.cjs');
|
|
|
6
6
|
const keyCodes = require('./key-codes.cjs');
|
|
7
7
|
const affix = require('./affix.cjs');
|
|
8
8
|
const direction = require('./direction.cjs');
|
|
9
|
+
const hostSemantics = require('./host-semantics.cjs');
|
|
9
10
|
const anchored = require('./anchored.cjs');
|
|
10
11
|
const delegatesAria = require('./delegates-aria.cjs');
|
|
11
12
|
const dom = require('./dom.cjs');
|
|
@@ -94,12 +95,11 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
94
95
|
this.setItems = () => {
|
|
95
96
|
const newItems = this.domChildren();
|
|
96
97
|
this.removeItemListeners();
|
|
97
|
-
this.menuItems = newItems;
|
|
98
|
-
|
|
99
|
-
if (menuItems.length) {
|
|
98
|
+
this.menuItems = newItems.filter(this.isMenuItemElement);
|
|
99
|
+
if (this.menuItems.length) {
|
|
100
100
|
this.focusIndex = 0;
|
|
101
101
|
}
|
|
102
|
-
menuItems.forEach((item, index) => {
|
|
102
|
+
this.menuItems.forEach((item, index) => {
|
|
103
103
|
item.setAttribute("tabindex", index === 0 ? "0" : "-1");
|
|
104
104
|
item.addEventListener("expanded-change", this.handleExpandedChanged);
|
|
105
105
|
item.addEventListener("focus", this.handleItemFocus);
|
|
@@ -183,7 +183,7 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
183
183
|
if (autoFocusElement instanceof HTMLElement) {
|
|
184
184
|
autoFocusElement.focus();
|
|
185
185
|
} else {
|
|
186
|
-
this.setFocus(0
|
|
186
|
+
this.setFocus(0);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
@@ -206,16 +206,16 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
206
206
|
}
|
|
207
207
|
switch (e.key) {
|
|
208
208
|
case keyCodes.keyArrowDown:
|
|
209
|
-
this.setFocus(this.focusIndex + 1
|
|
209
|
+
this.setFocus(this.focusIndex + 1);
|
|
210
210
|
return;
|
|
211
211
|
case keyCodes.keyArrowUp:
|
|
212
|
-
this.setFocus(this.focusIndex - 1
|
|
212
|
+
this.setFocus(this.focusIndex - 1);
|
|
213
213
|
return;
|
|
214
214
|
case keyCodes.keyEnd:
|
|
215
|
-
this.setFocus(this.menuItems.length - 1
|
|
215
|
+
this.setFocus(this.menuItems.length - 1);
|
|
216
216
|
return;
|
|
217
217
|
case keyCodes.keyHome:
|
|
218
|
-
this.setFocus(0
|
|
218
|
+
this.setFocus(0);
|
|
219
219
|
return;
|
|
220
220
|
default:
|
|
221
221
|
return true;
|
|
@@ -227,22 +227,18 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
227
227
|
domChildren() {
|
|
228
228
|
return Array.from(this.children).filter((child) => !child.hasAttribute("hidden")).filter((child) => !child.hasAttribute("slot"));
|
|
229
229
|
}
|
|
230
|
-
setFocus(focusIndex
|
|
230
|
+
setFocus(focusIndex) {
|
|
231
231
|
if (this.menuItems === void 0) {
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
if (focusIndex >= 0 && focusIndex < this.menuItems.length) {
|
|
235
235
|
const child = this.menuItems[focusIndex];
|
|
236
|
-
if (this.
|
|
237
|
-
|
|
238
|
-
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
239
|
-
}
|
|
240
|
-
this.focusIndex = focusIndex;
|
|
241
|
-
child.setAttribute("tabindex", "0");
|
|
242
|
-
child.focus();
|
|
243
|
-
break;
|
|
236
|
+
if (this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1) {
|
|
237
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
244
238
|
}
|
|
245
|
-
focusIndex
|
|
239
|
+
this.focusIndex = focusIndex;
|
|
240
|
+
child.setAttribute("tabindex", "0");
|
|
241
|
+
child.focus();
|
|
246
242
|
}
|
|
247
243
|
}
|
|
248
244
|
get #triggerBehaviour() {
|
|
@@ -291,14 +287,15 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
291
287
|
if (this.#triggerBehaviour === "auto" && clickedOnNonCheckboxMenuItem) {
|
|
292
288
|
this.open = false;
|
|
293
289
|
}
|
|
290
|
+
const domChildren = this.domChildren();
|
|
294
291
|
const changedMenuItem = e.target;
|
|
295
|
-
const changeItemIndex =
|
|
292
|
+
const changeItemIndex = domChildren.indexOf(changedMenuItem);
|
|
296
293
|
if (changeItemIndex === -1) {
|
|
297
294
|
return;
|
|
298
295
|
}
|
|
299
296
|
if (changedMenuItem.role === "menuitemradio" && changedMenuItem.checked) {
|
|
300
297
|
for (let i = changeItemIndex - 1; i >= 0; --i) {
|
|
301
|
-
const item =
|
|
298
|
+
const item = domChildren[i];
|
|
302
299
|
const role = item.getAttribute("role");
|
|
303
300
|
if (role === MenuItemRole.menuitemradio) {
|
|
304
301
|
item.checked = false;
|
|
@@ -307,9 +304,9 @@ const _Menu = class _Menu extends anchored.Anchored(delegatesAria.DelegatesAria(
|
|
|
307
304
|
break;
|
|
308
305
|
}
|
|
309
306
|
}
|
|
310
|
-
const maxIndex =
|
|
307
|
+
const maxIndex = domChildren.length - 1;
|
|
311
308
|
for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {
|
|
312
|
-
const item =
|
|
309
|
+
const item = domChildren[i];
|
|
313
310
|
const role = item.getAttribute("role");
|
|
314
311
|
if (role === MenuItemRole.menuitemradio) {
|
|
315
312
|
item.checked = false;
|
|
@@ -357,11 +354,12 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
357
354
|
if (result) __defProp(target, key, result);
|
|
358
355
|
return result;
|
|
359
356
|
};
|
|
360
|
-
class MenuItem extends affix.AffixIcon(vividElement.VividElement) {
|
|
357
|
+
class MenuItem extends hostSemantics.HostSemantics(affix.AffixIcon(vividElement.VividElement)) {
|
|
361
358
|
constructor() {
|
|
362
359
|
super();
|
|
363
360
|
// eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
|
|
364
361
|
this.role = MenuItemRole.menuitem;
|
|
362
|
+
this.checked = false;
|
|
365
363
|
this.hasSubmenu = false;
|
|
366
364
|
this.currentDirection = direction.Direction.ltr;
|
|
367
365
|
/**
|
|
@@ -652,11 +650,13 @@ const MenuItemTemplate = (context) => {
|
|
|
652
650
|
const iconTag = context.tagFor(definition.Icon);
|
|
653
651
|
return vividElement.html`
|
|
654
652
|
<template
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
653
|
+
${hostSemantics.applyHostSemantics({
|
|
654
|
+
role: MenuItemRole.menuitem,
|
|
655
|
+
ariaHasPopup: (x) => x.hasSubmenu ? "menu" : void 0,
|
|
656
|
+
ariaChecked: (x) => x.role !== MenuItemRole.menuitem ? x.checked : void 0,
|
|
657
|
+
ariaDisabled: (x) => x.disabled,
|
|
658
|
+
ariaExpanded: (x) => x.expanded
|
|
659
|
+
})}
|
|
660
660
|
@keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}"
|
|
661
661
|
@click="${handleClick}"
|
|
662
662
|
@mouseover="${(x, c) => x.handleMouseOver(c.event)}"
|
|
@@ -729,8 +729,7 @@ const MenuTemplate = (context) => {
|
|
|
729
729
|
x.open = state;
|
|
730
730
|
}
|
|
731
731
|
return vividElement.html`
|
|
732
|
-
<template
|
|
733
|
-
@change="${(x, c) => x._onChange(c.event)}"
|
|
732
|
+
<template @change="${(x, c) => x._onChange(c.event)}"
|
|
734
733
|
@focusout="${(x, c) => x._onFocusout(c.event)}">
|
|
735
734
|
${anchorSlotTemplate}
|
|
736
735
|
<${popupTag}
|
|
@@ -749,8 +748,9 @@ const MenuTemplate = (context) => {
|
|
|
749
748
|
</div>
|
|
750
749
|
<div
|
|
751
750
|
class="body"
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
${delegatesAria.delegateAria({
|
|
752
|
+
role: "menu"
|
|
753
|
+
})}
|
|
754
754
|
@keydown="${(x, c) => x.handleMenuKeyDown(c.event)}"
|
|
755
755
|
@focusout="${(x, c) => x.handleFocusOut(c.event)}"
|
|
756
756
|
>
|
package/shared/definition30.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { P as Popup, p as popupDefinition } from './definition65.js';
|
|
2
2
|
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
3
|
-
import { D as DOM, V as VividElement, o as observable, a as attr, h as html,
|
|
3
|
+
import { D as DOM, V as VividElement, o as observable, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
4
4
|
import { g as keyHome, d as keyEnd, e as keyArrowUp, f as keyArrowDown, h as keyArrowLeft, i as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
5
5
|
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
6
6
|
import { D as Direction, g as getDirection } from './direction.js';
|
|
7
|
+
import { H as HostSemantics, a as applyHostSemantics } from './host-semantics.js';
|
|
7
8
|
import { A as Anchored, a as anchorSlotTemplateFactory } from './anchored.js';
|
|
8
|
-
import { D as DelegatesAria } from './delegates-aria.js';
|
|
9
|
+
import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
|
|
9
10
|
import { i as isHTMLElement } from './dom.js';
|
|
10
11
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
11
12
|
import { r as ref } from './ref.js';
|
|
@@ -92,12 +93,11 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
92
93
|
this.setItems = () => {
|
|
93
94
|
const newItems = this.domChildren();
|
|
94
95
|
this.removeItemListeners();
|
|
95
|
-
this.menuItems = newItems;
|
|
96
|
-
|
|
97
|
-
if (menuItems.length) {
|
|
96
|
+
this.menuItems = newItems.filter(this.isMenuItemElement);
|
|
97
|
+
if (this.menuItems.length) {
|
|
98
98
|
this.focusIndex = 0;
|
|
99
99
|
}
|
|
100
|
-
menuItems.forEach((item, index) => {
|
|
100
|
+
this.menuItems.forEach((item, index) => {
|
|
101
101
|
item.setAttribute("tabindex", index === 0 ? "0" : "-1");
|
|
102
102
|
item.addEventListener("expanded-change", this.handleExpandedChanged);
|
|
103
103
|
item.addEventListener("focus", this.handleItemFocus);
|
|
@@ -181,7 +181,7 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
181
181
|
if (autoFocusElement instanceof HTMLElement) {
|
|
182
182
|
autoFocusElement.focus();
|
|
183
183
|
} else {
|
|
184
|
-
this.setFocus(0
|
|
184
|
+
this.setFocus(0);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
/**
|
|
@@ -204,16 +204,16 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
204
204
|
}
|
|
205
205
|
switch (e.key) {
|
|
206
206
|
case keyArrowDown:
|
|
207
|
-
this.setFocus(this.focusIndex + 1
|
|
207
|
+
this.setFocus(this.focusIndex + 1);
|
|
208
208
|
return;
|
|
209
209
|
case keyArrowUp:
|
|
210
|
-
this.setFocus(this.focusIndex - 1
|
|
210
|
+
this.setFocus(this.focusIndex - 1);
|
|
211
211
|
return;
|
|
212
212
|
case keyEnd:
|
|
213
|
-
this.setFocus(this.menuItems.length - 1
|
|
213
|
+
this.setFocus(this.menuItems.length - 1);
|
|
214
214
|
return;
|
|
215
215
|
case keyHome:
|
|
216
|
-
this.setFocus(0
|
|
216
|
+
this.setFocus(0);
|
|
217
217
|
return;
|
|
218
218
|
default:
|
|
219
219
|
return true;
|
|
@@ -225,22 +225,18 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
225
225
|
domChildren() {
|
|
226
226
|
return Array.from(this.children).filter((child) => !child.hasAttribute("hidden")).filter((child) => !child.hasAttribute("slot"));
|
|
227
227
|
}
|
|
228
|
-
setFocus(focusIndex
|
|
228
|
+
setFocus(focusIndex) {
|
|
229
229
|
if (this.menuItems === void 0) {
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
if (focusIndex >= 0 && focusIndex < this.menuItems.length) {
|
|
233
233
|
const child = this.menuItems[focusIndex];
|
|
234
|
-
if (this.
|
|
235
|
-
|
|
236
|
-
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
237
|
-
}
|
|
238
|
-
this.focusIndex = focusIndex;
|
|
239
|
-
child.setAttribute("tabindex", "0");
|
|
240
|
-
child.focus();
|
|
241
|
-
break;
|
|
234
|
+
if (this.focusIndex > -1 && this.menuItems.length >= this.focusIndex - 1) {
|
|
235
|
+
this.menuItems[this.focusIndex].setAttribute("tabindex", "-1");
|
|
242
236
|
}
|
|
243
|
-
focusIndex
|
|
237
|
+
this.focusIndex = focusIndex;
|
|
238
|
+
child.setAttribute("tabindex", "0");
|
|
239
|
+
child.focus();
|
|
244
240
|
}
|
|
245
241
|
}
|
|
246
242
|
get #triggerBehaviour() {
|
|
@@ -289,14 +285,15 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
289
285
|
if (this.#triggerBehaviour === "auto" && clickedOnNonCheckboxMenuItem) {
|
|
290
286
|
this.open = false;
|
|
291
287
|
}
|
|
288
|
+
const domChildren = this.domChildren();
|
|
292
289
|
const changedMenuItem = e.target;
|
|
293
|
-
const changeItemIndex =
|
|
290
|
+
const changeItemIndex = domChildren.indexOf(changedMenuItem);
|
|
294
291
|
if (changeItemIndex === -1) {
|
|
295
292
|
return;
|
|
296
293
|
}
|
|
297
294
|
if (changedMenuItem.role === "menuitemradio" && changedMenuItem.checked) {
|
|
298
295
|
for (let i = changeItemIndex - 1; i >= 0; --i) {
|
|
299
|
-
const item =
|
|
296
|
+
const item = domChildren[i];
|
|
300
297
|
const role = item.getAttribute("role");
|
|
301
298
|
if (role === MenuItemRole.menuitemradio) {
|
|
302
299
|
item.checked = false;
|
|
@@ -305,9 +302,9 @@ const _Menu = class _Menu extends Anchored(DelegatesAria(VividElement)) {
|
|
|
305
302
|
break;
|
|
306
303
|
}
|
|
307
304
|
}
|
|
308
|
-
const maxIndex =
|
|
305
|
+
const maxIndex = domChildren.length - 1;
|
|
309
306
|
for (let i = changeItemIndex + 1; i <= maxIndex; ++i) {
|
|
310
|
-
const item =
|
|
307
|
+
const item = domChildren[i];
|
|
311
308
|
const role = item.getAttribute("role");
|
|
312
309
|
if (role === MenuItemRole.menuitemradio) {
|
|
313
310
|
item.checked = false;
|
|
@@ -355,11 +352,12 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
355
352
|
if (result) __defProp(target, key, result);
|
|
356
353
|
return result;
|
|
357
354
|
};
|
|
358
|
-
class MenuItem extends AffixIcon(VividElement) {
|
|
355
|
+
class MenuItem extends HostSemantics(AffixIcon(VividElement)) {
|
|
359
356
|
constructor() {
|
|
360
357
|
super();
|
|
361
358
|
// eslint-disable-next-line @nrwl/nx/workspace/no-attribute-default-value
|
|
362
359
|
this.role = MenuItemRole.menuitem;
|
|
360
|
+
this.checked = false;
|
|
363
361
|
this.hasSubmenu = false;
|
|
364
362
|
this.currentDirection = Direction.ltr;
|
|
365
363
|
/**
|
|
@@ -650,11 +648,13 @@ const MenuItemTemplate = (context) => {
|
|
|
650
648
|
const iconTag = context.tagFor(Icon);
|
|
651
649
|
return html`
|
|
652
650
|
<template
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
651
|
+
${applyHostSemantics({
|
|
652
|
+
role: MenuItemRole.menuitem,
|
|
653
|
+
ariaHasPopup: (x) => x.hasSubmenu ? "menu" : void 0,
|
|
654
|
+
ariaChecked: (x) => x.role !== MenuItemRole.menuitem ? x.checked : void 0,
|
|
655
|
+
ariaDisabled: (x) => x.disabled,
|
|
656
|
+
ariaExpanded: (x) => x.expanded
|
|
657
|
+
})}
|
|
658
658
|
@keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}"
|
|
659
659
|
@click="${handleClick}"
|
|
660
660
|
@mouseover="${(x, c) => x.handleMouseOver(c.event)}"
|
|
@@ -727,8 +727,7 @@ const MenuTemplate = (context) => {
|
|
|
727
727
|
x.open = state;
|
|
728
728
|
}
|
|
729
729
|
return html`
|
|
730
|
-
<template
|
|
731
|
-
@change="${(x, c) => x._onChange(c.event)}"
|
|
730
|
+
<template @change="${(x, c) => x._onChange(c.event)}"
|
|
732
731
|
@focusout="${(x, c) => x._onFocusout(c.event)}">
|
|
733
732
|
${anchorSlotTemplate}
|
|
734
733
|
<${popupTag}
|
|
@@ -747,8 +746,9 @@ const MenuTemplate = (context) => {
|
|
|
747
746
|
</div>
|
|
748
747
|
<div
|
|
749
748
|
class="body"
|
|
750
|
-
|
|
751
|
-
|
|
749
|
+
${delegateAria({
|
|
750
|
+
role: "menu"
|
|
751
|
+
})}
|
|
752
752
|
@keydown="${(x, c) => x.handleMenuKeyDown(c.event)}"
|
|
753
753
|
@focusout="${(x, c) => x.handleFocusOut(c.event)}"
|
|
754
754
|
>
|
package/shared/definition31.cjs
CHANGED
|
@@ -70,11 +70,13 @@ const NavDisclosureTemplate = (context) => {
|
|
|
70
70
|
const iconTag = context.tagFor(definition.Icon);
|
|
71
71
|
return vividElement.html`<details class="base" ${ref.ref("details")} ?open=${(x) => x.open}>
|
|
72
72
|
<summary class="${getClasses}"
|
|
73
|
-
role="button"
|
|
74
73
|
aria-controls="disclosure-content"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
${delegatesAria.delegateAria({
|
|
75
|
+
role: "button",
|
|
76
|
+
ariaExpanded: (x) => x.open,
|
|
77
|
+
ariaCurrent: (x) => getAriaCurrent(x.ariaCurrent, x.open)
|
|
78
|
+
})}
|
|
79
|
+
>
|
|
78
80
|
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
79
81
|
${(x) => x.label}
|
|
80
82
|
<slot name="meta"></slot>
|
package/shared/definition31.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition28.js';
|
|
2
|
-
import { V as VividElement, a as attr, h as html,
|
|
2
|
+
import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
4
|
-
import { D as DelegatesAria } from './delegates-aria.js';
|
|
4
|
+
import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
|
|
5
5
|
import { r as ref } from './ref.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
|
@@ -68,11 +68,13 @@ const NavDisclosureTemplate = (context) => {
|
|
|
68
68
|
const iconTag = context.tagFor(Icon);
|
|
69
69
|
return html`<details class="base" ${ref("details")} ?open=${(x) => x.open}>
|
|
70
70
|
<summary class="${getClasses}"
|
|
71
|
-
role="button"
|
|
72
71
|
aria-controls="disclosure-content"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
${delegateAria({
|
|
73
|
+
role: "button",
|
|
74
|
+
ariaExpanded: (x) => x.open,
|
|
75
|
+
ariaCurrent: (x) => getAriaCurrent(x.ariaCurrent, x.open)
|
|
76
|
+
})}
|
|
77
|
+
>
|
|
76
78
|
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
|
|
77
79
|
${(x) => x.label}
|
|
78
80
|
<slot name="meta"></slot>
|
package/shared/definition32.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition28.js';
|
|
2
|
-
import { h as html,
|
|
2
|
+
import { h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { b as AffixIcon } from './affix.js';
|
|
4
4
|
import { T as TextAnchor } from './text-anchor.js';
|
|
5
5
|
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
package/shared/definition33.cjs
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const vividElement = require('./vivid-element.cjs');
|
|
4
|
+
const delegatesAria = require('./delegates-aria.cjs');
|
|
4
5
|
|
|
5
6
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
6
7
|
|
|
7
|
-
class Nav extends vividElement.VividElement {
|
|
8
|
+
class Nav extends delegatesAria.DelegatesAria(vividElement.VividElement) {
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const NavTemplate = vividElement.html`
|
|
11
|
+
const NavTemplate = vividElement.html`
|
|
12
|
+
<nav ${delegatesAria.delegateAria()}>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</nav>
|
|
15
|
+
`;
|
|
11
16
|
|
|
12
17
|
const navDefinition = vividElement.defineVividComponent("nav", Nav, NavTemplate, [], {
|
|
13
18
|
styles
|
package/shared/definition33.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { V as VividElement, h as html,
|
|
1
|
+
import { V as VividElement, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
2
|
+
import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
|
|
2
3
|
|
|
3
4
|
const styles = "nav{display:flex;flex-direction:column;gap:4px}";
|
|
4
5
|
|
|
5
|
-
class Nav extends VividElement {
|
|
6
|
+
class Nav extends DelegatesAria(VividElement) {
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
const NavTemplate = html`
|
|
9
|
+
const NavTemplate = html`
|
|
10
|
+
<nav ${delegateAria()}>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</nav>
|
|
13
|
+
`;
|
|
9
14
|
|
|
10
15
|
const navDefinition = defineVividComponent("nav", Nav, NavTemplate, [], {
|
|
11
16
|
styles
|
package/shared/definition34.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition28.js';
|
|
2
|
-
import { V as VividElement, a as attr, h as html,
|
|
2
|
+
import { V as VividElement, a as attr, h as html, g as createRegisterFunction, i as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
4
4
|
import { c as classNames } from './class-names.js';
|
|
5
5
|
import { w as when } from './when.js';
|
package/shared/definition35.cjs
CHANGED
|
@@ -8,15 +8,15 @@ const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
|
8
8
|
const delegatesAria = require('./delegates-aria.cjs');
|
|
9
9
|
const formAssociated = require('./form-associated.cjs');
|
|
10
10
|
const affix = require('./affix.cjs');
|
|
11
|
-
const localized = require('./localized.cjs');
|
|
12
11
|
const keyCodes = require('./key-codes.cjs');
|
|
12
|
+
const localized = require('./localized.cjs');
|
|
13
13
|
const formElements = require('./form-elements.cjs');
|
|
14
14
|
const enums = require('./enums.cjs');
|
|
15
15
|
const classNames = require('./class-names.cjs');
|
|
16
16
|
const when = require('./when.cjs');
|
|
17
17
|
const ref = require('./ref.cjs');
|
|
18
18
|
|
|
19
|
-
const styles = ":host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--
|
|
19
|
+
const styles = ":host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base{--_connotation-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 8px;--_text-field-pill-border-radius: 24px;display:inline-grid;width:100%;gap:4px;grid-template-columns:min-content 1fr max-content}.base.size-condensed{--_text-field-gutter-start: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-gutter-end: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-icon-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 4px}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:3/4}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){width:100%!important;box-sizing:border-box!important;border:0 none!important;border-radius:inherit!important;margin:initial!important;appearance:none!important;background-color:transparent!important;block-size:100%!important;color:inherit!important;font:inherit;outline:transparent;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;text-align:inherit}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{position:absolute;z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));line-height:1;transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.fieldset:has(.wrapper .control:focus-within):after{--focus-stroke-gap-color: transparent;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))}}@supports not selector(:has(*)){.wrapper:focus-within:after{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));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:\"\";inset:0;pointer-events:none}}:host([internal-part]) .fieldset{background-color:transparent;font:var(--vvd-typography-heading-4);line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}.base{--_text-field-gutter-end: 70px}.control::-webkit-outer-spin-button,.control::-webkit-inner-spin-button{appearance:none}.control-buttons{position:absolute;z-index:1;right:3px;display:flex}.readonly .control-buttons,.disabled .control-buttons{pointer-events:none}.control-buttons .divider{margin-block:8px}.control-buttons>*{flex-shrink:0}";
|
|
20
20
|
|
|
21
21
|
class _NumberField extends vividElement.VividElement {
|
|
22
22
|
}
|
|
@@ -397,18 +397,7 @@ const NumberFieldTemplate = (context) => {
|
|
|
397
397
|
?spellcheck="${(x) => x.spellcheck}"
|
|
398
398
|
:value="${(x) => x._presentationValue}"
|
|
399
399
|
type="text"
|
|
400
|
-
|
|
401
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
402
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
403
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
404
|
-
aria-haspopup="${(x) => x.ariaHasPopup}"
|
|
405
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
406
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
407
|
-
aria-keyshortcuts="${(x) => x.ariaKeyShortcuts}"
|
|
408
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
409
|
-
aria-live="${(x) => x.ariaLive}"
|
|
410
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
411
|
-
aria-roledescription="${(x) => x.ariaRoleDescription}"
|
|
400
|
+
${delegatesAria.delegateAria()}
|
|
412
401
|
${ref.ref("control")}
|
|
413
402
|
/>
|
|
414
403
|
</div>
|