@vonage/vivid 4.14.3 → 4.15.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 +15 -3
- package/lib/combobox/combobox.d.ts +2 -2
- package/lib/option/option.d.ts +6 -0
- package/package.json +1 -1
- package/shared/definition11.cjs +6 -1
- package/shared/definition11.js +6 -1
- package/shared/definition16.cjs +17 -4
- package/shared/definition16.js +18 -5
- package/shared/definition17.cjs +4 -7
- package/shared/definition17.js +4 -7
- package/shared/definition2.cjs +2 -2
- package/shared/definition2.js +2 -2
- package/shared/definition27.cjs +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.cjs +0 -3
- package/shared/definition29.js +0 -3
- package/shared/definition30.cjs +1 -0
- package/shared/definition30.js +1 -0
- package/shared/definition5.cjs +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition51.cjs +1 -1
- package/shared/definition51.js +1 -1
- package/shared/definition63.cjs +19 -3
- package/shared/definition63.js +19 -3
- package/shared/listbox.cjs +3 -22
- package/shared/listbox.js +2 -21
- package/shared/presentationDate.cjs +5 -4
- package/shared/presentationDate.js +5 -4
- package/shared/text-field2.cjs +4 -1
- package/shared/text-field2.js +4 -1
- 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/vivid.api.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"kind": "variable",
|
|
11
11
|
"name": "AccordionExpandMode",
|
|
12
12
|
"type": {
|
|
13
|
-
"text": "{\n\t/**\n\t * Designates only a single
|
|
13
|
+
"text": "{\n\t/**\n\t * Designates only a single AccordionItem can be open a time.\n\t */\n\tsingle: 'single',\n\n\t/**\n\t * Designates multiple AccordionItems can be open simultaneously.\n\t */\n\tmulti: 'multi',\n}"
|
|
14
14
|
},
|
|
15
|
-
"default": "{\n\t/**\n\t * Designates only a single
|
|
15
|
+
"default": "{\n\t/**\n\t * Designates only a single AccordionItem can be open a time.\n\t */\n\tsingle: 'single',\n\n\t/**\n\t * Designates multiple AccordionItems can be open simultaneously.\n\t */\n\tmulti: 'multi',\n}",
|
|
16
16
|
"description": "Expand mode for Accordion",
|
|
17
17
|
"privacy": "public"
|
|
18
18
|
},
|
|
@@ -4630,6 +4630,18 @@
|
|
|
4630
4630
|
{
|
|
4631
4631
|
"description": "Default slot.",
|
|
4632
4632
|
"name": ""
|
|
4633
|
+
},
|
|
4634
|
+
{
|
|
4635
|
+
"description": "Slot to add an icon to the combobox control.",
|
|
4636
|
+
"name": "icon"
|
|
4637
|
+
},
|
|
4638
|
+
{
|
|
4639
|
+
"description": "Slot to add meta content to the combobox control.",
|
|
4640
|
+
"name": "meta"
|
|
4641
|
+
},
|
|
4642
|
+
{
|
|
4643
|
+
"description": "Describes how to use the combobox. Alternative to the `helper-text` attribute.",
|
|
4644
|
+
"name": "helper-text"
|
|
4633
4645
|
}
|
|
4634
4646
|
],
|
|
4635
4647
|
"members": [
|
|
@@ -16626,7 +16638,7 @@
|
|
|
16626
16638
|
"text": "{\n\tsingleValue: 'single-value',\n}"
|
|
16627
16639
|
},
|
|
16628
16640
|
"default": "{\n\tsingleValue: 'single-value',\n}",
|
|
16629
|
-
"description": "The selection modes of a
|
|
16641
|
+
"description": "The selection modes of a Slider.",
|
|
16630
16642
|
"privacy": "public"
|
|
16631
16643
|
},
|
|
16632
16644
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Popup } from '../popup/popup';
|
|
2
2
|
import type { Appearance, Shape, Size } from '../enums';
|
|
3
|
-
import { AffixIcon, type FormElement } from '../../shared/patterns';
|
|
3
|
+
import { AffixIcon, type ErrorText, type FormElement, FormElementHelperText, FormElementSuccessText } from '../../shared/patterns';
|
|
4
4
|
import type { ListboxOption } from '../option/option';
|
|
5
5
|
import { FormAssociatedCombobox } from './combobox.form-associated';
|
|
6
6
|
import { ComboboxAutocomplete } from './combobox.options';
|
|
@@ -31,5 +31,5 @@ export declare class Combobox extends FormAssociatedCombobox {
|
|
|
31
31
|
connectedCallback(): void;
|
|
32
32
|
filterOptions(): void;
|
|
33
33
|
}
|
|
34
|
-
export interface Combobox extends AffixIcon, FormElement {
|
|
34
|
+
export interface Combobox extends AffixIcon, FormElement, FormElementHelperText, ErrorText, FormElementSuccessText, FormElement {
|
|
35
35
|
}
|
package/lib/option/option.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
2
|
+
import { ARIAGlobalStatesAndProperties } from '../../shared/foundation/patterns/aria-global';
|
|
1
3
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
4
|
export declare function isListboxOption(el: Element): el is ListboxOption;
|
|
3
5
|
export declare class ListboxOption extends VividElement {
|
|
@@ -31,3 +33,7 @@ export declare class DelegatesARIAListboxOption {
|
|
|
31
33
|
ariaSelected: 'true' | 'false' | string | null;
|
|
32
34
|
ariaSetSize: string | null;
|
|
33
35
|
}
|
|
36
|
+
export interface DelegatesARIAListboxOption extends ARIAGlobalStatesAndProperties {
|
|
37
|
+
}
|
|
38
|
+
export interface ListboxOption extends DelegatesARIAListboxOption, AffixIconWithTrailing {
|
|
39
|
+
}
|
package/package.json
CHANGED
package/shared/definition11.cjs
CHANGED
|
@@ -157,6 +157,11 @@ function renderIconOrPending(context, icon, pending, size = enums.Size.Normal) {
|
|
|
157
157
|
return affixIconTemplate(icon, affix.IconWrapper.Slot);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
const getButtonType = (type) => {
|
|
161
|
+
const types = ["submit", "button", "reset"];
|
|
162
|
+
if (types.indexOf(type) > -1) return type;
|
|
163
|
+
return "submit";
|
|
164
|
+
};
|
|
160
165
|
const buttonContent = (context) => {
|
|
161
166
|
const chevronTemplate = chevronTemplateFactory(context);
|
|
162
167
|
return vividElement.html`<span class="content">
|
|
@@ -180,7 +185,7 @@ function renderButtonContent(context) {
|
|
|
180
185
|
formnovalidate="${(x) => x.formnovalidate}"
|
|
181
186
|
formtarget="${(x) => x.formtarget}"
|
|
182
187
|
name="${(x) => x.name}"
|
|
183
|
-
type="${(x) => x.type
|
|
188
|
+
type="${(x) => getButtonType(x.type)}"
|
|
184
189
|
value="${(x) => x.value}"
|
|
185
190
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
186
191
|
aria-busy="${(x) => x.ariaBusy}"
|
package/shared/definition11.js
CHANGED
|
@@ -155,6 +155,11 @@ function renderIconOrPending(context, icon, pending, size = Size.Normal) {
|
|
|
155
155
|
return affixIconTemplate(icon, IconWrapper.Slot);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
const getButtonType = (type) => {
|
|
159
|
+
const types = ["submit", "button", "reset"];
|
|
160
|
+
if (types.indexOf(type) > -1) return type;
|
|
161
|
+
return "submit";
|
|
162
|
+
};
|
|
158
163
|
const buttonContent = (context) => {
|
|
159
164
|
const chevronTemplate = chevronTemplateFactory(context);
|
|
160
165
|
return html`<span class="content">
|
|
@@ -178,7 +183,7 @@ function renderButtonContent(context) {
|
|
|
178
183
|
formnovalidate="${(x) => x.formnovalidate}"
|
|
179
184
|
formtarget="${(x) => x.formtarget}"
|
|
180
185
|
name="${(x) => x.name}"
|
|
181
|
-
type="${(x) => x.type
|
|
186
|
+
type="${(x) => getButtonType(x.type)}"
|
|
182
187
|
value="${(x) => x.value}"
|
|
183
188
|
aria-atomic="${(x) => x.ariaAtomic}"
|
|
184
189
|
aria-busy="${(x) => x.ariaBusy}"
|
package/shared/definition16.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const definition = require('./definition63.cjs');
|
|
|
5
5
|
const definition$3 = require('./definition35.cjs');
|
|
6
6
|
const textField = require('./text-field.cjs');
|
|
7
7
|
const vividElement = require('./vivid-element.cjs');
|
|
8
|
-
const
|
|
8
|
+
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
9
9
|
const listbox = require('./listbox.cjs');
|
|
10
10
|
const formAssociated = require('./form-associated.cjs');
|
|
11
11
|
const affix = require('./affix.cjs');
|
|
@@ -19,7 +19,7 @@ const slotted = require('./slotted.cjs');
|
|
|
19
19
|
const when = require('./when.cjs');
|
|
20
20
|
const classNames = require('./class-names.cjs');
|
|
21
21
|
|
|
22
|
-
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.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(--_connotation-color-fierce)}.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:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - 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}}";
|
|
22
|
+
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.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(--_connotation-color-fierce)}.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:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - 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}}";
|
|
23
23
|
|
|
24
24
|
class _Combobox extends listbox.Listbox {
|
|
25
25
|
}
|
|
@@ -542,14 +542,22 @@ __decorateClass([
|
|
|
542
542
|
vividElement.attr
|
|
543
543
|
], Combobox.prototype, "placeholder", 2);
|
|
544
544
|
Combobox = __decorateClass([
|
|
545
|
+
formElements.errorText,
|
|
545
546
|
formElements.formElements
|
|
546
547
|
], Combobox);
|
|
547
|
-
|
|
548
|
+
applyMixinsWithObservables.applyMixinsWithObservables(
|
|
549
|
+
Combobox,
|
|
550
|
+
affix.AffixIcon,
|
|
551
|
+
formElements.FormElementHelperText,
|
|
552
|
+
formElements.FormElementSuccessText
|
|
553
|
+
);
|
|
548
554
|
|
|
549
555
|
const getStateClasses = ({
|
|
550
556
|
icon,
|
|
551
557
|
iconSlottedContent,
|
|
552
558
|
metaSlottedContent,
|
|
559
|
+
errorValidationMessage,
|
|
560
|
+
successText,
|
|
553
561
|
shape,
|
|
554
562
|
scale,
|
|
555
563
|
disabled,
|
|
@@ -565,7 +573,9 @@ const getStateClasses = ({
|
|
|
565
573
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
566
574
|
["no-label", !label],
|
|
567
575
|
["has-icon", !!icon || Boolean(iconSlottedContent?.length)],
|
|
568
|
-
["has-meta", Boolean(metaSlottedContent?.length)]
|
|
576
|
+
["has-meta", Boolean(metaSlottedContent?.length)],
|
|
577
|
+
["error", Boolean(errorValidationMessage)],
|
|
578
|
+
["success", !!successText]
|
|
569
579
|
);
|
|
570
580
|
function renderLabel() {
|
|
571
581
|
return vividElement.html` <label for="control" class="label">
|
|
@@ -645,6 +655,9 @@ const comboboxTemplate = (context) => {
|
|
|
645
655
|
</slot>
|
|
646
656
|
</div>
|
|
647
657
|
</${popupTag}>
|
|
658
|
+
<div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
|
|
659
|
+
${formElements.getFeedbackTemplate(context)}
|
|
660
|
+
</div>
|
|
648
661
|
</template>
|
|
649
662
|
`;
|
|
650
663
|
};
|
package/shared/definition16.js
CHANGED
|
@@ -3,13 +3,13 @@ import { P as Popup, p as popupDefinition } from './definition63.js';
|
|
|
3
3
|
import { l as listboxOptionDefinition } from './definition35.js';
|
|
4
4
|
import { s as styles$1 } from './text-field.js';
|
|
5
5
|
import { D as DOM, O as Observable, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
7
7
|
import { L as Listbox } from './listbox.js';
|
|
8
8
|
import { F as FormAssociated } from './form-associated.js';
|
|
9
9
|
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
10
10
|
import { u as uniqueId } from './strings.js';
|
|
11
11
|
import { l as limit } from './numbers.js';
|
|
12
|
-
import { f as formElements } from './form-elements.js';
|
|
12
|
+
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, g as getFeedbackTemplate } from './form-elements.js';
|
|
13
13
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
14
14
|
import { c as chevronTemplateFactory } from './definition11.js';
|
|
15
15
|
import { r as ref } from './ref.js';
|
|
@@ -17,7 +17,7 @@ import { s as slotted } from './slotted.js';
|
|
|
17
17
|
import { w as when } from './when.js';
|
|
18
18
|
import { c as classNames } from './class-names.js';
|
|
19
19
|
|
|
20
|
-
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.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(--_connotation-color-fierce)}.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:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - 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}}";
|
|
20
|
+
const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([aria-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host{position:relative;display:inline-flex;flex-direction:column;gap:4px}.base{--_text-field-gutter-end: 8px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.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(--_connotation-color-fierce)}.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:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{position:absolute;z-index:1;display:inline-block;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);line-height:1;pointer-events:none;transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{position:relative;display:flex;flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}.listbox{display:flex;max-height:var(--combobox-height, 408px);flex-direction:column;padding:4px;border-radius:8px;contain:paint;gap:2px;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width, 100%)}@supports selector(:has(*)){.fieldset:has(.control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.fieldset:focus-within:after{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - 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}}";
|
|
21
21
|
|
|
22
22
|
class _Combobox extends Listbox {
|
|
23
23
|
}
|
|
@@ -540,14 +540,22 @@ __decorateClass([
|
|
|
540
540
|
attr
|
|
541
541
|
], Combobox.prototype, "placeholder", 2);
|
|
542
542
|
Combobox = __decorateClass([
|
|
543
|
+
errorText,
|
|
543
544
|
formElements
|
|
544
545
|
], Combobox);
|
|
545
|
-
|
|
546
|
+
applyMixinsWithObservables(
|
|
547
|
+
Combobox,
|
|
548
|
+
AffixIcon,
|
|
549
|
+
FormElementHelperText,
|
|
550
|
+
FormElementSuccessText
|
|
551
|
+
);
|
|
546
552
|
|
|
547
553
|
const getStateClasses = ({
|
|
548
554
|
icon,
|
|
549
555
|
iconSlottedContent,
|
|
550
556
|
metaSlottedContent,
|
|
557
|
+
errorValidationMessage,
|
|
558
|
+
successText,
|
|
551
559
|
shape,
|
|
552
560
|
scale,
|
|
553
561
|
disabled,
|
|
@@ -563,7 +571,9 @@ const getStateClasses = ({
|
|
|
563
571
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
564
572
|
["no-label", !label],
|
|
565
573
|
["has-icon", !!icon || Boolean(iconSlottedContent?.length)],
|
|
566
|
-
["has-meta", Boolean(metaSlottedContent?.length)]
|
|
574
|
+
["has-meta", Boolean(metaSlottedContent?.length)],
|
|
575
|
+
["error", Boolean(errorValidationMessage)],
|
|
576
|
+
["success", !!successText]
|
|
567
577
|
);
|
|
568
578
|
function renderLabel() {
|
|
569
579
|
return html` <label for="control" class="label">
|
|
@@ -643,6 +653,9 @@ const comboboxTemplate = (context) => {
|
|
|
643
653
|
</slot>
|
|
644
654
|
</div>
|
|
645
655
|
</${popupTag}>
|
|
656
|
+
<div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
|
|
657
|
+
${getFeedbackTemplate(context)}
|
|
658
|
+
</div>
|
|
646
659
|
</template>
|
|
647
660
|
`;
|
|
648
661
|
};
|
package/shared/definition17.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
|
-
const keyCodes = require('./key-codes.cjs');
|
|
6
5
|
const repeat = require('./repeat.cjs');
|
|
7
|
-
const
|
|
6
|
+
const keyCodes = require('./key-codes.cjs');
|
|
8
7
|
const children = require('./children.cjs');
|
|
8
|
+
const slotted = require('./slotted.cjs');
|
|
9
9
|
const when = require('./when.cjs');
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -536,11 +536,8 @@ const _DataGrid = class _DataGrid extends vividElement.VividElement {
|
|
|
536
536
|
this.generatedHeader.columnDefinitions = this.columnDefinitions;
|
|
537
537
|
this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns;
|
|
538
538
|
this.generatedHeader.rowType = this.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
|
|
539
|
-
if (this.firstChild !== null
|
|
540
|
-
this.insertBefore(
|
|
541
|
-
generatedHeaderElement,
|
|
542
|
-
this.firstChild !== null ? this.firstChild : this.rowsPlaceholder
|
|
543
|
-
);
|
|
539
|
+
if (this.firstChild !== null) {
|
|
540
|
+
this.insertBefore(generatedHeaderElement, this.firstChild);
|
|
544
541
|
}
|
|
545
542
|
return;
|
|
546
543
|
}
|
package/shared/definition17.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { a as attr, o as observable, V as VividElement, D as DOM, O as Observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
|
-
import { d as keyEnd, g as keyHome, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, i as keyArrowRight, h as keyArrowLeft, b as keyEscape, m as keyFunction2, k as keyEnter, a as keySpace } from './key-codes.js';
|
|
4
3
|
import { R as RepeatDirective } from './repeat.js';
|
|
5
|
-
import {
|
|
4
|
+
import { d as keyEnd, g as keyHome, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, i as keyArrowRight, h as keyArrowLeft, b as keyEscape, m as keyFunction2, k as keyEnter, a as keySpace } from './key-codes.js';
|
|
6
5
|
import { c as children } from './children.js';
|
|
6
|
+
import { s as slotted, e as elements } from './slotted.js';
|
|
7
7
|
import { w as when } from './when.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -534,11 +534,8 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
534
534
|
this.generatedHeader.columnDefinitions = this.columnDefinitions;
|
|
535
535
|
this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns;
|
|
536
536
|
this.generatedHeader.rowType = this.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
|
|
537
|
-
if (this.firstChild !== null
|
|
538
|
-
this.insertBefore(
|
|
539
|
-
generatedHeaderElement,
|
|
540
|
-
this.firstChild !== null ? this.firstChild : this.rowsPlaceholder
|
|
541
|
-
);
|
|
537
|
+
if (this.firstChild !== null) {
|
|
538
|
+
this.insertBefore(generatedHeaderElement, this.firstChild);
|
|
542
539
|
}
|
|
543
540
|
return;
|
|
544
541
|
}
|
package/shared/definition2.cjs
CHANGED
|
@@ -20,11 +20,11 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
20
20
|
};
|
|
21
21
|
const AccordionExpandMode$1 = {
|
|
22
22
|
/**
|
|
23
|
-
* Designates only a single
|
|
23
|
+
* Designates only a single AccordionItem can be open a time.
|
|
24
24
|
*/
|
|
25
25
|
single: "single",
|
|
26
26
|
/**
|
|
27
|
-
* Designates multiple
|
|
27
|
+
* Designates multiple AccordionItems can be open simultaneously.
|
|
28
28
|
*/
|
|
29
29
|
multi: "multi"
|
|
30
30
|
};
|
package/shared/definition2.js
CHANGED
|
@@ -18,11 +18,11 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
18
18
|
};
|
|
19
19
|
const AccordionExpandMode$1 = {
|
|
20
20
|
/**
|
|
21
|
-
* Designates only a single
|
|
21
|
+
* Designates only a single AccordionItem can be open a time.
|
|
22
22
|
*/
|
|
23
23
|
single: "single",
|
|
24
24
|
/**
|
|
25
|
-
* Designates multiple
|
|
25
|
+
* Designates multiple AccordionItems can be open simultaneously.
|
|
26
26
|
*/
|
|
27
27
|
multi: "multi"
|
|
28
28
|
};
|
package/shared/definition27.cjs
CHANGED
package/shared/definition27.js
CHANGED
package/shared/definition29.cjs
CHANGED
|
@@ -570,9 +570,6 @@ __decorateClass([
|
|
|
570
570
|
__decorateClass([
|
|
571
571
|
vividElement.attr({ mode: "boolean" })
|
|
572
572
|
], MenuItem.prototype, "checked");
|
|
573
|
-
__decorateClass([
|
|
574
|
-
vividElement.observable
|
|
575
|
-
], MenuItem.prototype, "submenuRegion");
|
|
576
573
|
__decorateClass([
|
|
577
574
|
vividElement.observable
|
|
578
575
|
], MenuItem.prototype, "hasSubmenu");
|
package/shared/definition29.js
CHANGED
|
@@ -568,9 +568,6 @@ __decorateClass([
|
|
|
568
568
|
__decorateClass([
|
|
569
569
|
attr({ mode: "boolean" })
|
|
570
570
|
], MenuItem.prototype, "checked");
|
|
571
|
-
__decorateClass([
|
|
572
|
-
observable
|
|
573
|
-
], MenuItem.prototype, "submenuRegion");
|
|
574
571
|
__decorateClass([
|
|
575
572
|
observable
|
|
576
573
|
], MenuItem.prototype, "hasSubmenu");
|
package/shared/definition30.cjs
CHANGED
|
@@ -75,6 +75,7 @@ const NavDisclosureTemplate = (context) => {
|
|
|
75
75
|
const iconTag = context.tagFor(definition.Icon);
|
|
76
76
|
return vividElement.html`<details class="base" ${ref.ref("details")} ?open=${(x) => x.open}>
|
|
77
77
|
<summary class="${getClasses}"
|
|
78
|
+
aria-label=${(x) => x.label ? x.label : "Toggle"}
|
|
78
79
|
role="button"
|
|
79
80
|
aria-controls="disclosure-content"
|
|
80
81
|
aria-expanded="${(x) => x.open}"
|
package/shared/definition30.js
CHANGED
|
@@ -73,6 +73,7 @@ const NavDisclosureTemplate = (context) => {
|
|
|
73
73
|
const iconTag = context.tagFor(Icon);
|
|
74
74
|
return html`<details class="base" ${ref("details")} ?open=${(x) => x.open}>
|
|
75
75
|
<summary class="${getClasses}"
|
|
76
|
+
aria-label=${(x) => x.label ? x.label : "Toggle"}
|
|
76
77
|
role="button"
|
|
77
78
|
aria-controls="disclosure-content"
|
|
78
79
|
aria-expanded="${(x) => x.open}"
|
package/shared/definition5.cjs
CHANGED
|
@@ -8,8 +8,8 @@ const enums = require('./enums.cjs');
|
|
|
8
8
|
const applyMixins = require('./apply-mixins.cjs');
|
|
9
9
|
const localized = require('./localized.cjs');
|
|
10
10
|
const playbackRates = require('./playbackRates.cjs');
|
|
11
|
-
const when = require('./when.cjs');
|
|
12
11
|
const repeat = require('./repeat.cjs');
|
|
12
|
+
const when = require('./when.cjs');
|
|
13
13
|
const classNames = require('./class-names.cjs');
|
|
14
14
|
|
|
15
15
|
const styles = ":host{display:block}.wrapper{container-type:inline-size}.base{display:inline-flex;box-sizing:border-box;align-items:center;padding:8px;color:var(--vvd-color-canvas-text);gap:8px;inline-size:100%;user-select:none}.base.disabled{color:var(--vvd-color-neutral-300)}.base .slider{flex:1;grid-area:slider}.base .controls{display:flex;align-items:center;justify-content:center;gap:8px;grid-area:controls}.base .time-stamp{display:inline-flex}.base .time-stamp .current-time,.base .time-stamp .total-time{margin-inline:6px;min-inline-size:32px}.base .playback-button{grid-area:playback}@container (max-width: 500px){.base.two-lines{display:inline-grid;grid-template:auto auto/1fr;grid-template-areas:\"slider\" \"controls\";inline-size:100%;row-gap:4px}.base.two-lines .time-stamp{margin-inline:auto 2px}.base.two-lines.playback{grid-template-areas:\"slider slider\" \"controls playback\";grid-template-columns:1fr auto}.base.two-lines.playback .time-stamp{margin-inline:auto}.base .slider{box-sizing:border-box;min-inline-size:auto;padding-inline:2px}}";
|
package/shared/definition5.js
CHANGED
|
@@ -6,8 +6,8 @@ import { M as MediaSkipBy } from './enums.js';
|
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
7
7
|
import { L as Localized } from './localized.js';
|
|
8
8
|
import { g as getPlaybackRatesArray } from './playbackRates.js';
|
|
9
|
-
import { w as when } from './when.js';
|
|
10
9
|
import { r as repeat } from './repeat.js';
|
|
10
|
+
import { w as when } from './when.js';
|
|
11
11
|
import { c as classNames } from './class-names.js';
|
|
12
12
|
|
|
13
13
|
const styles = ":host{display:block}.wrapper{container-type:inline-size}.base{display:inline-flex;box-sizing:border-box;align-items:center;padding:8px;color:var(--vvd-color-canvas-text);gap:8px;inline-size:100%;user-select:none}.base.disabled{color:var(--vvd-color-neutral-300)}.base .slider{flex:1;grid-area:slider}.base .controls{display:flex;align-items:center;justify-content:center;gap:8px;grid-area:controls}.base .time-stamp{display:inline-flex}.base .time-stamp .current-time,.base .time-stamp .total-time{margin-inline:6px;min-inline-size:32px}.base .playback-button{grid-area:playback}@container (max-width: 500px){.base.two-lines{display:inline-grid;grid-template:auto auto/1fr;grid-template-areas:\"slider\" \"controls\";inline-size:100%;row-gap:4px}.base.two-lines .time-stamp{margin-inline:auto 2px}.base.two-lines.playback{grid-template-areas:\"slider slider\" \"controls playback\";grid-template-columns:1fr auto}.base.two-lines.playback .time-stamp{margin-inline:auto}.base .slider{box-sizing:border-box;min-inline-size:auto;padding-inline:2px}}";
|
package/shared/definition51.cjs
CHANGED
|
@@ -95,6 +95,7 @@ class Tabs extends vividElement.VividElement {
|
|
|
95
95
|
tab.style[gridProperty] = `${index + 1}`;
|
|
96
96
|
!this.#isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
|
|
97
97
|
});
|
|
98
|
+
this.#updateTabsConnotation();
|
|
98
99
|
};
|
|
99
100
|
this.setTabPanels = () => {
|
|
100
101
|
this.tabpanels.forEach((tabpanel, index) => {
|
|
@@ -196,7 +197,6 @@ class Tabs extends vividElement.VividElement {
|
|
|
196
197
|
this.#handleActiveIndicatorPosition();
|
|
197
198
|
}
|
|
198
199
|
this.#patchIndicatorStyleTransition();
|
|
199
|
-
this.#updateTabsConnotation();
|
|
200
200
|
this.#scrollToIndex(this.activeTabIndex);
|
|
201
201
|
}
|
|
202
202
|
#isLastTabSelectedAfterRemove;
|
package/shared/definition51.js
CHANGED
|
@@ -93,6 +93,7 @@ class Tabs extends VividElement {
|
|
|
93
93
|
tab.style[gridProperty] = `${index + 1}`;
|
|
94
94
|
!this.#isHorizontal() ? tab.classList.add("vertical") : tab.classList.remove("vertical");
|
|
95
95
|
});
|
|
96
|
+
this.#updateTabsConnotation();
|
|
96
97
|
};
|
|
97
98
|
this.setTabPanels = () => {
|
|
98
99
|
this.tabpanels.forEach((tabpanel, index) => {
|
|
@@ -194,7 +195,6 @@ class Tabs extends VividElement {
|
|
|
194
195
|
this.#handleActiveIndicatorPosition();
|
|
195
196
|
}
|
|
196
197
|
this.#patchIndicatorStyleTransition();
|
|
197
|
-
this.#updateTabsConnotation();
|
|
198
198
|
this.#scrollToIndex(this.activeTabIndex);
|
|
199
199
|
}
|
|
200
200
|
#isLastTabSelectedAfterRemove;
|
package/shared/definition63.cjs
CHANGED
|
@@ -1105,7 +1105,8 @@ function isContainingBlock(elementOrCss) {
|
|
|
1105
1105
|
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1106
1106
|
|
|
1107
1107
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1108
|
-
|
|
1108
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1109
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1109
1110
|
}
|
|
1110
1111
|
function getContainingBlock(element) {
|
|
1111
1112
|
let currentNode = getParentNode(element);
|
|
@@ -1663,6 +1664,10 @@ const platform = {
|
|
|
1663
1664
|
isRTL
|
|
1664
1665
|
};
|
|
1665
1666
|
|
|
1667
|
+
function rectsAreEqual(a, b) {
|
|
1668
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1666
1671
|
// https://samthor.au/2021/observing-dom/
|
|
1667
1672
|
function observeMove(element, onMove) {
|
|
1668
1673
|
let io = null;
|
|
@@ -1682,12 +1687,13 @@ function observeMove(element, onMove) {
|
|
|
1682
1687
|
threshold = 1;
|
|
1683
1688
|
}
|
|
1684
1689
|
cleanup();
|
|
1690
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1685
1691
|
const {
|
|
1686
1692
|
left,
|
|
1687
1693
|
top,
|
|
1688
1694
|
width,
|
|
1689
1695
|
height
|
|
1690
|
-
} =
|
|
1696
|
+
} = elementRectForRootMargin;
|
|
1691
1697
|
if (!skip) {
|
|
1692
1698
|
onMove();
|
|
1693
1699
|
}
|
|
@@ -1720,6 +1726,16 @@ function observeMove(element, onMove) {
|
|
|
1720
1726
|
refresh(false, ratio);
|
|
1721
1727
|
}
|
|
1722
1728
|
}
|
|
1729
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1730
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
1731
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
1732
|
+
// area anymore. This can happen under performance constraints. This may
|
|
1733
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1734
|
+
// work around this, we compare the element's bounding rect now with
|
|
1735
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
1736
|
+
// are not equal then the element moved, so we refresh.
|
|
1737
|
+
refresh();
|
|
1738
|
+
}
|
|
1723
1739
|
isFirstUpdate = false;
|
|
1724
1740
|
}
|
|
1725
1741
|
|
|
@@ -1797,7 +1813,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1797
1813
|
}
|
|
1798
1814
|
function frameLoop() {
|
|
1799
1815
|
const nextRefRect = getBoundingClientRect(reference);
|
|
1800
|
-
if (prevRefRect && (
|
|
1816
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1801
1817
|
update();
|
|
1802
1818
|
}
|
|
1803
1819
|
prevRefRect = nextRefRect;
|
package/shared/definition63.js
CHANGED
|
@@ -1103,7 +1103,8 @@ function isContainingBlock(elementOrCss) {
|
|
|
1103
1103
|
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1104
1104
|
|
|
1105
1105
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1106
|
-
|
|
1106
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1107
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1107
1108
|
}
|
|
1108
1109
|
function getContainingBlock(element) {
|
|
1109
1110
|
let currentNode = getParentNode(element);
|
|
@@ -1661,6 +1662,10 @@ const platform = {
|
|
|
1661
1662
|
isRTL
|
|
1662
1663
|
};
|
|
1663
1664
|
|
|
1665
|
+
function rectsAreEqual(a, b) {
|
|
1666
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1664
1669
|
// https://samthor.au/2021/observing-dom/
|
|
1665
1670
|
function observeMove(element, onMove) {
|
|
1666
1671
|
let io = null;
|
|
@@ -1680,12 +1685,13 @@ function observeMove(element, onMove) {
|
|
|
1680
1685
|
threshold = 1;
|
|
1681
1686
|
}
|
|
1682
1687
|
cleanup();
|
|
1688
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1683
1689
|
const {
|
|
1684
1690
|
left,
|
|
1685
1691
|
top,
|
|
1686
1692
|
width,
|
|
1687
1693
|
height
|
|
1688
|
-
} =
|
|
1694
|
+
} = elementRectForRootMargin;
|
|
1689
1695
|
if (!skip) {
|
|
1690
1696
|
onMove();
|
|
1691
1697
|
}
|
|
@@ -1718,6 +1724,16 @@ function observeMove(element, onMove) {
|
|
|
1718
1724
|
refresh(false, ratio);
|
|
1719
1725
|
}
|
|
1720
1726
|
}
|
|
1727
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1728
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
1729
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
1730
|
+
// area anymore. This can happen under performance constraints. This may
|
|
1731
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1732
|
+
// work around this, we compare the element's bounding rect now with
|
|
1733
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
1734
|
+
// are not equal then the element moved, so we refresh.
|
|
1735
|
+
refresh();
|
|
1736
|
+
}
|
|
1721
1737
|
isFirstUpdate = false;
|
|
1722
1738
|
}
|
|
1723
1739
|
|
|
@@ -1795,7 +1811,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1795
1811
|
}
|
|
1796
1812
|
function frameLoop() {
|
|
1797
1813
|
const nextRefRect = getBoundingClientRect(reference);
|
|
1798
|
-
if (prevRefRect && (
|
|
1814
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1799
1815
|
update();
|
|
1800
1816
|
}
|
|
1801
1817
|
prevRefRect = nextRefRect;
|
package/shared/listbox.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const option = require('./option.cjs');
|
|
4
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
|
+
const applyMixins = require('./apply-mixins.cjs');
|
|
5
6
|
const keyCodes = require('./key-codes.cjs');
|
|
6
7
|
const strings = require('./strings.cjs');
|
|
7
8
|
const ariaGlobal = require('./aria-global.cjs');
|
|
@@ -22,26 +23,6 @@ function findLastIndex(array, predicate) {
|
|
|
22
23
|
return -1;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
/**
|
|
26
|
-
* Apply mixins to a constructor.
|
|
27
|
-
* Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
function applyMixins(derivedCtor, ...baseCtors) {
|
|
31
|
-
const derivedAttributes = vividElement.AttributeConfiguration.locate(derivedCtor);
|
|
32
|
-
baseCtors.forEach(baseCtor => {
|
|
33
|
-
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
34
|
-
if (name !== "constructor") {
|
|
35
|
-
Object.defineProperty(derivedCtor.prototype, name,
|
|
36
|
-
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
37
|
-
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const baseAttributes = vividElement.AttributeConfiguration.locate(baseCtor);
|
|
41
|
-
baseAttributes.forEach(x => derivedAttributes.push(x));
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
26
|
var __defProp = Object.defineProperty;
|
|
46
27
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
47
28
|
var result = void 0 ;
|
|
@@ -509,7 +490,7 @@ __decorateClass([
|
|
|
509
490
|
__decorateClass([
|
|
510
491
|
vividElement.observable
|
|
511
492
|
], DelegatesARIAListbox.prototype, "ariaMultiSelectable");
|
|
512
|
-
applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
513
|
-
applyMixins(Listbox, DelegatesARIAListbox);
|
|
493
|
+
applyMixins.applyMixins(DelegatesARIAListbox, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
494
|
+
applyMixins.applyMixins(Listbox, DelegatesARIAListbox);
|
|
514
495
|
|
|
515
496
|
exports.Listbox = Listbox;
|
package/shared/listbox.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { i as isListboxOption } from './option.js';
|
|
2
|
-
import {
|
|
2
|
+
import { V as VividElement, O as Observable, a as attr, o as observable } from './vivid-element.js';
|
|
3
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
3
4
|
import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
|
|
4
5
|
import { u as uniqueId } from './strings.js';
|
|
5
6
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
@@ -20,26 +21,6 @@ function findLastIndex(array, predicate) {
|
|
|
20
21
|
return -1;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
/**
|
|
24
|
-
* Apply mixins to a constructor.
|
|
25
|
-
* Sourced from {@link https://www.typescriptlang.org/docs/handbook/mixins.html | TypeScript Documentation }.
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
function applyMixins(derivedCtor, ...baseCtors) {
|
|
29
|
-
const derivedAttributes = AttributeConfiguration.locate(derivedCtor);
|
|
30
|
-
baseCtors.forEach(baseCtor => {
|
|
31
|
-
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
32
|
-
if (name !== "constructor") {
|
|
33
|
-
Object.defineProperty(derivedCtor.prototype, name,
|
|
34
|
-
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
35
|
-
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const baseAttributes = AttributeConfiguration.locate(baseCtor);
|
|
39
|
-
baseAttributes.forEach(x => derivedAttributes.push(x));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
24
|
var __defProp = Object.defineProperty;
|
|
44
25
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
45
26
|
var result = void 0 ;
|
|
@@ -6172,10 +6172,11 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6172
6172
|
} else {
|
|
6173
6173
|
this.#openPopupIfPossible();
|
|
6174
6174
|
vividElement.DOM.processUpdates();
|
|
6175
|
-
const tabbableDate = this.
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6175
|
+
const tabbableDate = this._tabbableDate;
|
|
6176
|
+
if (tabbableDate)
|
|
6177
|
+
this.shadowRoot.querySelector(
|
|
6178
|
+
`[data-date="${tabbableDate}"]`
|
|
6179
|
+
).focus();
|
|
6179
6180
|
}
|
|
6180
6181
|
}
|
|
6181
6182
|
// --- Dialog header ---
|
|
@@ -6170,10 +6170,11 @@ class DatePickerBase extends FormAssociatedDatePickerBase {
|
|
|
6170
6170
|
} else {
|
|
6171
6171
|
this.#openPopupIfPossible();
|
|
6172
6172
|
DOM.processUpdates();
|
|
6173
|
-
const tabbableDate = this.
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6173
|
+
const tabbableDate = this._tabbableDate;
|
|
6174
|
+
if (tabbableDate)
|
|
6175
|
+
this.shadowRoot.querySelector(
|
|
6176
|
+
`[data-date="${tabbableDate}"]`
|
|
6177
|
+
).focus();
|
|
6177
6178
|
}
|
|
6178
6179
|
}
|
|
6179
6180
|
// --- Dialog header ---
|
package/shared/text-field2.cjs
CHANGED
|
@@ -56,7 +56,10 @@ function v4(options, buf, offset) {
|
|
|
56
56
|
return native.randomUUID();
|
|
57
57
|
}
|
|
58
58
|
options = options || {};
|
|
59
|
-
const rnds = options.random
|
|
59
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
60
|
+
if (rnds.length < 16) {
|
|
61
|
+
throw new Error('Random bytes length must be >= 16');
|
|
62
|
+
}
|
|
60
63
|
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
61
64
|
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
62
65
|
return unsafeStringify(rnds);
|
package/shared/text-field2.js
CHANGED
|
@@ -54,7 +54,10 @@ function v4(options, buf, offset) {
|
|
|
54
54
|
return native.randomUUID();
|
|
55
55
|
}
|
|
56
56
|
options = options || {};
|
|
57
|
-
const rnds = options.random
|
|
57
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
58
|
+
if (rnds.length < 16) {
|
|
59
|
+
throw new Error('Random bytes length must be >= 16');
|
|
60
|
+
}
|
|
58
61
|
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
59
62
|
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
60
63
|
return unsafeStringify(rnds);
|
package/styles/core/all.css
CHANGED
package/styles/core/theme.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Thu, 13 Feb 2025 13:39:16 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Thu, 13 Feb 2025 13:39:16 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Thu, 13 Feb 2025 13:39:17 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|