@vonage/vivid 4.12.0 → 4.12.1

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.
Files changed (85) hide show
  1. package/custom-elements.json +851 -60
  2. package/lib/accordion/accordion.d.ts +21 -2
  3. package/lib/accordion-item/accordion-item.d.ts +6 -2
  4. package/lib/calendar/calendar.d.ts +1 -1
  5. package/lib/date-picker/date-picker.d.ts +1 -0
  6. package/lib/radio/radio.d.ts +12 -2
  7. package/lib/radio/radio.form-associated.d.ts +10 -0
  8. package/lib/radio-group/radio-group.d.ts +20 -2
  9. package/lib/tab/tab.d.ts +3 -2
  10. package/lib/tab-panel/tab-panel.d.ts +2 -2
  11. package/lib/tabs/tabs.d.ts +30 -9
  12. package/package.json +1 -1
  13. package/shared/date-picker/date-picker-base.d.ts +1 -0
  14. package/shared/definition.cjs +29 -72
  15. package/shared/definition.js +30 -73
  16. package/shared/definition16.cjs +1 -2
  17. package/shared/definition16.js +1 -2
  18. package/shared/definition17.cjs +2 -2
  19. package/shared/definition17.js +2 -2
  20. package/shared/definition18.cjs +6 -1
  21. package/shared/definition18.js +6 -1
  22. package/shared/definition19.cjs +17 -8
  23. package/shared/definition19.js +17 -8
  24. package/shared/definition2.cjs +154 -187
  25. package/shared/definition2.js +157 -190
  26. package/shared/definition20.cjs +1 -1
  27. package/shared/definition20.js +1 -1
  28. package/shared/definition29.cjs +2 -2
  29. package/shared/definition29.js +2 -2
  30. package/shared/definition35.cjs +1 -1
  31. package/shared/definition35.js +1 -1
  32. package/shared/definition40.cjs +226 -399
  33. package/shared/definition40.js +229 -402
  34. package/shared/definition42.cjs +3 -2
  35. package/shared/definition42.js +3 -2
  36. package/shared/definition43.cjs +1 -0
  37. package/shared/definition43.js +1 -0
  38. package/shared/definition44.cjs +1 -1
  39. package/shared/definition44.js +1 -1
  40. package/shared/definition47.cjs +3 -2
  41. package/shared/definition47.js +3 -2
  42. package/shared/definition49.cjs +1 -1
  43. package/shared/definition49.js +1 -1
  44. package/shared/definition5.cjs +1 -1
  45. package/shared/definition5.js +1 -1
  46. package/shared/definition50.cjs +1 -11
  47. package/shared/definition50.js +1 -11
  48. package/shared/definition51.cjs +4 -14
  49. package/shared/definition51.js +5 -15
  50. package/shared/definition52.cjs +269 -19
  51. package/shared/definition52.js +273 -23
  52. package/shared/definition57.cjs +26 -4
  53. package/shared/definition57.js +27 -5
  54. package/shared/definition61.cjs +1 -1
  55. package/shared/definition61.js +1 -1
  56. package/shared/definition62.cjs +17 -8
  57. package/shared/definition62.js +17 -8
  58. package/shared/form-associated.cjs +1 -1
  59. package/shared/form-associated.js +1 -1
  60. package/shared/icon.cjs +1 -1
  61. package/shared/icon.js +1 -1
  62. package/shared/index.cjs +1 -0
  63. package/shared/index.js +1 -1
  64. package/shared/key-codes.cjs +1 -94
  65. package/shared/key-codes.js +2 -89
  66. package/shared/key-codes2.cjs +87 -1
  67. package/shared/key-codes2.js +83 -2
  68. package/shared/listbox.cjs +6 -7
  69. package/shared/listbox.js +3 -4
  70. package/shared/numbers.cjs +0 -12
  71. package/shared/numbers.js +1 -12
  72. package/shared/presentationDate.cjs +14 -0
  73. package/shared/presentationDate.js +15 -1
  74. package/shared/radio.cjs +92 -117
  75. package/shared/radio.js +93 -118
  76. package/shared/slider.template.cjs +2 -15
  77. package/shared/slider.template.js +2 -14
  78. package/shared/strings.cjs +26 -0
  79. package/shared/strings.js +25 -1
  80. package/styles/core/all.css +1 -1
  81. package/styles/core/theme.css +1 -1
  82. package/styles/core/typography.css +1 -1
  83. package/styles/tokens/theme-dark.css +4 -4
  84. package/styles/tokens/theme-light.css +4 -4
  85. package/styles/tokens/vivid-2-compat.css +1 -1
@@ -1,5 +1,24 @@
1
- import { AccordionExpandMode, Accordion as FastAccordion } from '@microsoft/fast-foundation';
2
- export declare class Accordion extends FastAccordion {
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ export declare const AccordionExpandMode: {
3
+ readonly single: "single";
4
+ readonly multi: "multi";
5
+ };
6
+ export type AccordionExpandMode = typeof AccordionExpandMode[keyof typeof AccordionExpandMode];
7
+ export declare class Accordion extends FoundationElement {
3
8
  expandmode: AccordionExpandMode;
9
+ activeid: string | null;
10
+ activeItemIndex: number;
11
+ accordionIds: Array<string | null>;
12
+ private change;
13
+ private findExpandedItem;
14
+ private setItems;
15
+ private resetItems;
16
+ private removeItemListeners;
17
+ private activeItemChange;
18
+ private getItemIds;
19
+ private isSingleExpandMode;
20
+ private handleItemKeyDown;
21
+ private adjust;
22
+ private focusItem;
4
23
  closeAll(): void;
5
24
  }
@@ -1,12 +1,16 @@
1
- import { AccordionItem as FASTAccordionItem } from '@microsoft/fast-foundation';
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { AffixIconWithTrailing } from '../../shared/patterns/affix';
3
3
  import type { Size } from '../enums.js';
4
4
  export type AccordionItemSize = Extract<Size, Size.Condensed | Size.Normal>;
5
- export declare class AccordionItem extends FASTAccordionItem {
5
+ export declare class AccordionItem extends FoundationElement {
6
+ headinglevel: 1 | 2 | 3 | 4 | 5 | 6;
7
+ expanded: boolean;
8
+ id: string;
6
9
  heading?: string;
7
10
  noIndicator: boolean;
8
11
  meta?: string;
9
12
  size?: AccordionItemSize;
13
+ private change;
10
14
  }
11
15
  export interface AccordionItem extends AffixIconWithTrailing {
12
16
  }
@@ -5,7 +5,7 @@ export declare class Calendar extends FoundationElement {
5
5
  startDay?: 'sunday' | 'monday';
6
6
  locales?: string | string[] | undefined;
7
7
  hour12: boolean;
8
- getEventContext: (this: Calendar, e: MouseEvent | KeyboardEvent) => import("./helpers/calendar.event-context").CalendarEventContext | null;
8
+ getEventContext: (this: Calendar, e: KeyboardEvent | MouseEvent) => import("./helpers/calendar.event-context").CalendarEventContext | null;
9
9
  private getCalendarEventContainingCell;
10
10
  private arrowKeysInteractions;
11
11
  private activateElement;
@@ -2,6 +2,7 @@ import { type ErrorText, type FormElement } from '../../shared/patterns';
2
2
  import { DatePickerBase } from '../../shared/date-picker/date-picker-base';
3
3
  export declare class DatePicker extends DatePickerBase {
4
4
  #private;
5
+ protected _updatePresentationValue(): void;
5
6
  constructor();
6
7
  }
7
8
  export interface DatePicker extends ErrorText, FormElement {
@@ -1,8 +1,18 @@
1
- import { Radio as FastRadio } from '@microsoft/fast-foundation';
1
+ import { type SyntheticViewTemplate } from '@microsoft/fast-element';
2
+ import { type FoundationElementDefinition } from '@microsoft/fast-foundation';
2
3
  import type { Connotation } from '../enums.js';
4
+ import { FormAssociatedRadio } from './radio.form-associated';
3
5
  export type RadioConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
4
- export declare class Radio extends FastRadio {
6
+ export type RadioControl = Pick<HTMLInputElement, 'checked' | 'disabled' | 'readOnly' | 'focus' | 'setAttribute' | 'getAttribute'>;
7
+ export type RadioOptions = FoundationElementDefinition & {
8
+ checkedIndicator?: string | SyntheticViewTemplate;
9
+ };
10
+ export declare class Radio extends FormAssociatedRadio {
5
11
  ariaLabel: string | null;
6
12
  label?: string;
7
13
  connotation?: RadioConnotation;
14
+ readOnly: boolean;
15
+ name: string;
16
+ constructor();
17
+ private isInsideRadioGroup;
8
18
  }
@@ -0,0 +1,10 @@
1
+ import { CheckableFormAssociated, FoundationElement } from '@microsoft/fast-foundation';
2
+ declare class _Radio extends FoundationElement {
3
+ }
4
+ interface _Radio extends CheckableFormAssociated {
5
+ }
6
+ declare const FormAssociatedRadio_base: typeof _Radio;
7
+ export declare class FormAssociatedRadio extends FormAssociatedRadio_base {
8
+ proxy: HTMLInputElement;
9
+ }
10
+ export {};
@@ -1,4 +1,22 @@
1
- import { RadioGroup as FastRadioGroup } from '@microsoft/fast-foundation';
2
- export declare class RadioGroup extends FastRadioGroup {
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import { Orientation } from '@microsoft/fast-web-utilities';
3
+ export declare class RadioGroup extends FoundationElement {
4
+ #private;
3
5
  label?: string;
6
+ readOnly: boolean;
7
+ disabled: boolean;
8
+ name: string;
9
+ nameChanged(): void;
10
+ value: string;
11
+ orientation: Orientation | 'horizontal' | 'vertical';
12
+ private get isInsideToolbar();
13
+ disconnectedCallback(): void;
14
+ private setupRadioButtons;
15
+ private radioChangeHandler;
16
+ private moveToRadioByIndex;
17
+ private moveRightOffGroup;
18
+ private moveLeftOffGroup;
19
+ private checkFocusedRadio;
20
+ private moveRight;
21
+ private moveLeft;
4
22
  }
package/lib/tab/tab.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { Tab as FoundationTab } from '@microsoft/fast-foundation';
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { AffixIconWithTrailing } from '../../shared/patterns/affix';
3
3
  import { Localized } from '../../shared/patterns';
4
4
  import type { Connotation, Shape } from '../enums.js';
5
5
  export type TabConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
6
6
  export type TabShape = Extract<Shape, Shape.Rounded | Shape.Sharp>;
7
- export declare class Tab extends FoundationTab {
7
+ export declare class Tab extends FoundationElement {
8
+ disabled: boolean;
8
9
  connotation?: TabConnotation;
9
10
  shape?: TabShape;
10
11
  label?: string;
@@ -1,3 +1,3 @@
1
- import { TabPanel as FoundationTabPanel } from '@microsoft/fast-foundation';
2
- export declare class TabPanel extends FoundationTabPanel {
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ export declare class TabPanel extends FoundationElement {
3
3
  }
@@ -1,21 +1,42 @@
1
- import { Tabs as FoundationTabs } from '@microsoft/fast-foundation';
1
+ import { FoundationElement, TabsOrientation } from '@microsoft/fast-foundation';
2
2
  import type { Connotation, TabsGutters } from '../enums.js';
3
3
  export declare const ACTIVE_TAB_WIDTH = "--_tabs-active-tab-inline-size";
4
4
  export type TabsConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA>;
5
5
  export type Gutters = Extract<TabsGutters, TabsGutters.Small | TabsGutters.None>;
6
- export declare class Tabs extends FoundationTabs {
6
+ export declare class Tabs extends FoundationElement {
7
7
  #private;
8
+ orientation: TabsOrientation;
9
+ activeid: string;
10
+ activeindicator: boolean;
11
+ activetab: HTMLElement;
12
+ private prevActiveTabIndex;
13
+ private activeTabIndex;
14
+ private tabIds;
15
+ private tabpanelIds;
16
+ private change;
17
+ private isDisabledElement;
18
+ private isHiddenElement;
19
+ private isFocusableElement;
20
+ private getActiveIndex;
21
+ private setTabs;
22
+ private setTabPanels;
23
+ private getTabIds;
24
+ private getTabPanelIds;
25
+ private setComponent;
26
+ private handleTabClick;
27
+ private isHorizontal;
28
+ private handleTabKeyDown;
29
+ adjust(adjustment: number): void;
30
+ private adjustForward;
31
+ private adjustBackward;
32
+ private moveToTabByIndex;
33
+ private focusTab;
8
34
  tablist?: HTMLElement;
9
35
  connotation?: TabsConnotation;
10
36
  gutters?: Gutters;
11
37
  scrollablePanel: boolean;
12
- connotationChanged(): void;
13
- orientationChanged(): void;
14
- activeidChanged(oldValue: string, newValue: string): void;
15
- tabsChanged(): void;
16
- tabpanelsChanged(): void;
17
- patchIndicatorStyleTransition(): void;
18
38
  connectedCallback(): void;
19
39
  disconnectedCallback(): void;
20
- constructor();
40
+ private handleActiveIndicatorPosition;
41
+ private animateActiveIndicator;
21
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/vivid",
3
- "version": "4.12.0",
3
+ "version": "4.12.1",
4
4
  "type": "module",
5
5
  "module": "./index.js",
6
6
  "main": "./index.cjs",
@@ -14,6 +14,7 @@ export declare abstract class DatePickerBase extends FormAssociatedDatePickerBas
14
14
  connectedCallback(): void;
15
15
  disconnectedCallback(): void;
16
16
  protected abstract _getCustomValidationError(): string | null;
17
+ protected abstract _updatePresentationValue(): void;
17
18
  protected abstract _getSelectedDates(): DateStr[];
18
19
  }
19
20
  export interface DatePickerBase extends Localized, FormElementHelperText, TrappedFocus {
@@ -3,79 +3,10 @@
3
3
  const index = require('./index.cjs');
4
4
  const definition = require('./definition27.cjs');
5
5
  const affix = require('./affix.cjs');
6
- const startEnd = require('./start-end.cjs');
7
6
  const applyMixins = require('./apply-mixins.cjs');
8
7
  const ref = require('./ref.cjs');
9
8
  const when = require('./when.cjs');
10
9
 
11
- /**
12
- * An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.
13
- *
14
- * @slot start - Content which can be provided between the heading and the icon
15
- * @slot end - Content which can be provided between the start slot and icon
16
- * @slot heading - Content which serves as the accordion item heading and text of the expand button
17
- * @slot - The default slot for accordion item content
18
- * @slot expanded-icon - The expanded icon
19
- * @slot collapsed-icon - The collapsed icon
20
- * @fires change - Fires a custom 'change' event when the button is invoked
21
- * @csspart heading - Wraps the button
22
- * @csspart button - The button which serves to invoke the item
23
- * @csspart heading-content - Wraps the slot for the heading content within the button
24
- * @csspart icon - The icon container
25
- * @csspart expanded-icon - The expanded icon slot
26
- * @csspart collapsed-icon - The collapsed icon
27
- * @csspart region - The wrapper for the accordion item content
28
- *
29
- * @public
30
- */
31
- let AccordionItem$1 = class AccordionItem extends index.FoundationElement {
32
- constructor() {
33
- super(...arguments);
34
- /**
35
- * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the
36
- * heading element.
37
- *
38
- * @defaultValue 2
39
- * @public
40
- * @remarks
41
- * HTML attribute: heading-level
42
- */
43
- this.headinglevel = 2;
44
- /**
45
- * Expands or collapses the item.
46
- *
47
- * @public
48
- * @remarks
49
- * HTML attribute: expanded
50
- */
51
- this.expanded = false;
52
- /**
53
- * @internal
54
- */
55
- this.clickHandler = (e) => {
56
- this.expanded = !this.expanded;
57
- this.change();
58
- };
59
- this.change = () => {
60
- this.$emit("change");
61
- };
62
- }
63
- };
64
- index.__decorate([
65
- index.attr({
66
- attribute: "heading-level",
67
- mode: "fromView",
68
- converter: index.nullableNumberConverter,
69
- })
70
- ], AccordionItem$1.prototype, "headinglevel", void 0);
71
- index.__decorate([
72
- index.attr({ mode: "boolean" })
73
- ], AccordionItem$1.prototype, "expanded", void 0);
74
- index.__decorate([
75
- index.attr
76
- ], AccordionItem$1.prototype, "id", void 0);
77
- applyMixins.applyMixins(AccordionItem$1, startEnd.StartEnd);
78
-
79
10
  const styles = ":host{--_vvd-accordion-item-accent-firm-wrapper: var( --vvd-accordion-item-accent-firm )}.heading-button{--vvd-accordion-item-accent-firm: var( --_vvd-accordion-item-accent-firm-wrapper, var(--vvd-accordion-item-accent-primary) )}:host{display:flex;box-sizing:border-box;flex-direction:column}.heading-container{margin:0}.heading-button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.heading-button:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.heading-button:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.heading-button{--_connotation-color-faint: var(--vvd-accordion-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-accordion-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-accordion-item-accent-firm, var(--vvd-color-canvas-text))}.heading-button{--focus-stroke-gap-color: transparent;display:flex;width:100%;align-items:center;padding:16px;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer;text-align:left}.heading-button:focus-visible{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))}.heading-button.size-condensed{font:var(--vvd-typography-base-extended-bold);gap:12px}.heading-button:not(.size-condensed){font:var(--vvd-typography-heading-4);gap:16px}.heading-content{flex:auto}.meta{overflow:hidden;max-width:var(--accordion-item-meta-inline-size, 20%);flex-shrink:0;color:var(--vvd-color-neutral-600);text-align:end;text-overflow:ellipsis;white-space:nowrap}.heading-button:not(.size-condensed) .meta{font:var(--vvd-typography-base-bold)}.heading-button.size-condensed .meta{font:var(--vvd-typography-base-condensed-bold)}.region{display:none;padding:8px 32px 24px 16px}.region:not(.size-condensed).padded{padding-inline-start:52px}:host([expanded]) .region{display:block}.region.size-condensed.padded{padding-inline-start:44px}slot[name=icon]{color:var(--vvd-color-neutral-600)}.heading-button:not(.size-condensed) slot[name=icon]{font:inherit}.heading-button.size-condensed slot[name=icon]{font:var(--vvd-typography-base-extended)}:host(:not([icon-trailing])) slot[name=icon]:last-of-type{color:var(--_appearance-color-text)}";
80
11
 
81
12
  var __defProp = Object.defineProperty;
@@ -87,12 +18,38 @@ var __decorateClass = (decorators, target, key, kind) => {
87
18
  if (result) __defProp(target, key, result);
88
19
  return result;
89
20
  };
90
- class AccordionItem extends AccordionItem$1 {
21
+ class AccordionItem extends index.FoundationElement {
91
22
  constructor() {
92
23
  super(...arguments);
24
+ this.headinglevel = 2;
25
+ this.expanded = false;
93
26
  this.noIndicator = false;
27
+ /**
28
+ * @internal
29
+ */
30
+ this.clickHandler = () => {
31
+ this.expanded = !this.expanded;
32
+ this.change();
33
+ };
34
+ this.change = () => {
35
+ this.$emit("change");
36
+ };
94
37
  }
95
38
  }
39
+ __decorateClass([
40
+ index.attr({
41
+ attribute: "heading-level",
42
+ mode: "fromView",
43
+ converter: index.nullableNumberConverter
44
+ })
45
+ ], AccordionItem.prototype, "headinglevel");
46
+ __decorateClass([
47
+ index.attr({ mode: "boolean" })
48
+ ], AccordionItem.prototype, "expanded");
49
+ // @ts-expect-error Type is incorrectly non-optional
50
+ __decorateClass([
51
+ index.attr
52
+ ], AccordionItem.prototype, "id");
96
53
  __decorateClass([
97
54
  index.attr
98
55
  ], AccordionItem.prototype, "heading");
@@ -116,7 +73,7 @@ const header = (context, hTag) => {
116
73
  id="${(x) => x.id}"
117
74
  aria-expanded="${(x) => x.expanded}"
118
75
  aria-controls="${(x) => x.id}-panel"
119
- @click="${(x, c) => x.clickHandler(c.event)}"
76
+ @click="${(x) => x.clickHandler()}"
120
77
  ${ref.ref("expandbutton")}
121
78
  >
122
79
 
@@ -158,7 +115,7 @@ const accordionItemRegistries = [
158
115
  ];
159
116
  const registerAccordionItem = index.registerFactory(accordionItemRegistries);
160
117
 
161
- exports.AccordionItem = AccordionItem$1;
118
+ exports.AccordionItem = AccordionItem;
162
119
  exports.accordionItemDefinition = accordionItemDefinition;
163
120
  exports.accordionItemRegistries = accordionItemRegistries;
164
121
  exports.registerAccordionItem = registerAccordionItem;
@@ -1,79 +1,10 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, h as html, r as registerFactory } from './index.js';
1
+ import { F as FoundationElement, a as attr, n as nullableNumberConverter, h as html, r as registerFactory } from './index.js';
2
2
  import { a as iconRegistries } from './definition27.js';
3
3
  import { b as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
4
- import { S as StartEnd } from './start-end.js';
5
4
  import { a as applyMixins } from './apply-mixins.js';
6
5
  import { r as ref } from './ref.js';
7
6
  import { w as when } from './when.js';
8
7
 
9
- /**
10
- * An individual item in an {@link @microsoft/fast-foundation#(Accordion:class) }.
11
- *
12
- * @slot start - Content which can be provided between the heading and the icon
13
- * @slot end - Content which can be provided between the start slot and icon
14
- * @slot heading - Content which serves as the accordion item heading and text of the expand button
15
- * @slot - The default slot for accordion item content
16
- * @slot expanded-icon - The expanded icon
17
- * @slot collapsed-icon - The collapsed icon
18
- * @fires change - Fires a custom 'change' event when the button is invoked
19
- * @csspart heading - Wraps the button
20
- * @csspart button - The button which serves to invoke the item
21
- * @csspart heading-content - Wraps the slot for the heading content within the button
22
- * @csspart icon - The icon container
23
- * @csspart expanded-icon - The expanded icon slot
24
- * @csspart collapsed-icon - The collapsed icon
25
- * @csspart region - The wrapper for the accordion item content
26
- *
27
- * @public
28
- */
29
- let AccordionItem$1 = class AccordionItem extends FoundationElement {
30
- constructor() {
31
- super(...arguments);
32
- /**
33
- * Configures the {@link https://www.w3.org/TR/wai-aria-1.1/#aria-level | level} of the
34
- * heading element.
35
- *
36
- * @defaultValue 2
37
- * @public
38
- * @remarks
39
- * HTML attribute: heading-level
40
- */
41
- this.headinglevel = 2;
42
- /**
43
- * Expands or collapses the item.
44
- *
45
- * @public
46
- * @remarks
47
- * HTML attribute: expanded
48
- */
49
- this.expanded = false;
50
- /**
51
- * @internal
52
- */
53
- this.clickHandler = (e) => {
54
- this.expanded = !this.expanded;
55
- this.change();
56
- };
57
- this.change = () => {
58
- this.$emit("change");
59
- };
60
- }
61
- };
62
- __decorate([
63
- attr({
64
- attribute: "heading-level",
65
- mode: "fromView",
66
- converter: nullableNumberConverter,
67
- })
68
- ], AccordionItem$1.prototype, "headinglevel", void 0);
69
- __decorate([
70
- attr({ mode: "boolean" })
71
- ], AccordionItem$1.prototype, "expanded", void 0);
72
- __decorate([
73
- attr
74
- ], AccordionItem$1.prototype, "id", void 0);
75
- applyMixins(AccordionItem$1, StartEnd);
76
-
77
8
  const styles = ":host{--_vvd-accordion-item-accent-firm-wrapper: var( --vvd-accordion-item-accent-firm )}.heading-button{--vvd-accordion-item-accent-firm: var( --_vvd-accordion-item-accent-firm-wrapper, var(--vvd-accordion-item-accent-primary) )}:host{display:flex;box-sizing:border-box;flex-direction:column}.heading-container{margin:0}.heading-button{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.heading-button:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.heading-button:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.heading-button{--_connotation-color-faint: var(--vvd-accordion-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-accordion-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-accordion-item-accent-firm, var(--vvd-color-canvas-text))}.heading-button{--focus-stroke-gap-color: transparent;display:flex;width:100%;align-items:center;padding:16px;border:none;background-color:var(--_appearance-color-fill);color:var(--_appearance-color-text);cursor:pointer;text-align:left}.heading-button:focus-visible{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))}.heading-button.size-condensed{font:var(--vvd-typography-base-extended-bold);gap:12px}.heading-button:not(.size-condensed){font:var(--vvd-typography-heading-4);gap:16px}.heading-content{flex:auto}.meta{overflow:hidden;max-width:var(--accordion-item-meta-inline-size, 20%);flex-shrink:0;color:var(--vvd-color-neutral-600);text-align:end;text-overflow:ellipsis;white-space:nowrap}.heading-button:not(.size-condensed) .meta{font:var(--vvd-typography-base-bold)}.heading-button.size-condensed .meta{font:var(--vvd-typography-base-condensed-bold)}.region{display:none;padding:8px 32px 24px 16px}.region:not(.size-condensed).padded{padding-inline-start:52px}:host([expanded]) .region{display:block}.region.size-condensed.padded{padding-inline-start:44px}slot[name=icon]{color:var(--vvd-color-neutral-600)}.heading-button:not(.size-condensed) slot[name=icon]{font:inherit}.heading-button.size-condensed slot[name=icon]{font:var(--vvd-typography-base-extended)}:host(:not([icon-trailing])) slot[name=icon]:last-of-type{color:var(--_appearance-color-text)}";
78
9
 
79
10
  var __defProp = Object.defineProperty;
@@ -85,12 +16,38 @@ var __decorateClass = (decorators, target, key, kind) => {
85
16
  if (result) __defProp(target, key, result);
86
17
  return result;
87
18
  };
88
- class AccordionItem extends AccordionItem$1 {
19
+ class AccordionItem extends FoundationElement {
89
20
  constructor() {
90
21
  super(...arguments);
22
+ this.headinglevel = 2;
23
+ this.expanded = false;
91
24
  this.noIndicator = false;
25
+ /**
26
+ * @internal
27
+ */
28
+ this.clickHandler = () => {
29
+ this.expanded = !this.expanded;
30
+ this.change();
31
+ };
32
+ this.change = () => {
33
+ this.$emit("change");
34
+ };
92
35
  }
93
36
  }
37
+ __decorateClass([
38
+ attr({
39
+ attribute: "heading-level",
40
+ mode: "fromView",
41
+ converter: nullableNumberConverter
42
+ })
43
+ ], AccordionItem.prototype, "headinglevel");
44
+ __decorateClass([
45
+ attr({ mode: "boolean" })
46
+ ], AccordionItem.prototype, "expanded");
47
+ // @ts-expect-error Type is incorrectly non-optional
48
+ __decorateClass([
49
+ attr
50
+ ], AccordionItem.prototype, "id");
94
51
  __decorateClass([
95
52
  attr
96
53
  ], AccordionItem.prototype, "heading");
@@ -114,7 +71,7 @@ const header = (context, hTag) => {
114
71
  id="${(x) => x.id}"
115
72
  aria-expanded="${(x) => x.expanded}"
116
73
  aria-controls="${(x) => x.id}-panel"
117
- @click="${(x, c) => x.clickHandler(c.event)}"
74
+ @click="${(x) => x.clickHandler()}"
118
75
  ${ref("expandbutton")}
119
76
  >
120
77
 
@@ -156,4 +113,4 @@ const accordionItemRegistries = [
156
113
  ];
157
114
  const registerAccordionItem = registerFactory(accordionItemRegistries);
158
115
 
159
- export { AccordionItem$1 as A, accordionItemDefinition as a, accordionItemRegistries as b, registerAccordionItem as r };
116
+ export { AccordionItem as A, accordionItemDefinition as a, accordionItemRegistries as b, registerAccordionItem as r };
@@ -10,7 +10,6 @@ const startEnd = require('./start-end.cjs');
10
10
  const select_options = require('./select.options.cjs');
11
11
  const applyMixins = require('./apply-mixins.cjs');
12
12
  const formAssociated = require('./form-associated.cjs');
13
- const numbers = require('./numbers.cjs');
14
13
  const strings = require('./strings.cjs');
15
14
  const affix = require('./affix.cjs');
16
15
  const formElements = require('./form-elements.cjs');
@@ -445,7 +444,7 @@ let Combobox$1 = class Combobox extends FormAssociatedCombobox {
445
444
  */
446
445
  selectedIndexChanged(prev, next) {
447
446
  if (this.$fastController.isConnected) {
448
- next = numbers.limit(-1, this.options.length - 1, next);
447
+ next = strings.limit(-1, this.options.length - 1, next);
449
448
  // we only want to call the super method when the selectedIndex is in range
450
449
  if (next !== this.selectedIndex) {
451
450
  this.selectedIndex = next;
@@ -8,8 +8,7 @@ import { S as StartEnd } from './start-end.js';
8
8
  import { S as SelectPosition } from './select.options.js';
9
9
  import { a as applyMixins } from './apply-mixins.js';
10
10
  import { F as FormAssociated } from './form-associated.js';
11
- import { l as limit } from './numbers.js';
12
- import { u as uniqueId } from './strings.js';
11
+ import { u as uniqueId, l as limit } from './strings.js';
13
12
  import { A as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
14
13
  import { f as formElements } from './form-elements.js';
15
14
  import { h as handleEscapeKeyAndStopPropogation } from './index2.js';
@@ -2,13 +2,13 @@
2
2
 
3
3
  const definition = require('./definition27.cjs');
4
4
  const index = require('./index.cjs');
5
- const keyCodes = require('./key-codes.cjs');
5
+ const keyCodes = require('./key-codes2.cjs');
6
6
  const repeat = require('./repeat.cjs');
7
7
  const slotted = require('./slotted.cjs');
8
8
  const children = require('./children.cjs');
9
9
  const icon = require('./icon.cjs');
10
10
  const when = require('./when.cjs');
11
- const keyCodes$1 = require('./key-codes2.cjs');
11
+ const keyCodes$1 = require('./key-codes.cjs');
12
12
 
13
13
  /**
14
14
  * This set of exported strings reference https://developer.mozilla.org/en-US/docs/Web/Events
@@ -1,12 +1,12 @@
1
1
  import { a as iconRegistries } from './definition27.js';
2
2
  import { F as FoundationElement, _ as __decorate, a as attr, o as observable, D as DOM, h as html, O as Observable, r as registerFactory } from './index.js';
3
- import { d as keyEnd, g as keyHome, h as keyArrowRight, i as keyArrowLeft, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, b as keyEscape, m as keyFunction2, k as keyEnter } from './key-codes.js';
3
+ import { d as keyEnd, g as keyHome, h as keyArrowRight, i as keyArrowLeft, j as keyPageDown, l as keyPageUp, f as keyArrowDown, e as keyArrowUp, b as keyEscape, m as keyFunction2, k as keyEnter } from './key-codes2.js';
4
4
  import { R as RepeatDirective } from './repeat.js';
5
5
  import { s as slotted, e as elements } from './slotted.js';
6
6
  import { c as children } from './children.js';
7
7
  import { I as Icon } from './icon.js';
8
8
  import { w as when } from './when.js';
9
- import { b as keyEnter$1, g as keySpace } from './key-codes2.js';
9
+ import { g as keyEnter$1, k as keySpace } from './key-codes.js';
10
10
 
11
11
  /**
12
12
  * This set of exported strings reference https://developer.mozilla.org/en-US/docs/Web/Events
@@ -45,11 +45,16 @@ let DatePicker = class extends presentationDate.DatePickerBase {
45
45
  this.value = "";
46
46
  return;
47
47
  }
48
+ this._adjustSelectedMonthToEnsureVisibilityOf(this.value);
49
+ }
50
+ this._updatePresentationValue();
51
+ }
52
+ _updatePresentationValue() {
53
+ if (this.value) {
48
54
  this._presentationValue = presentationDate.formatPresentationDate(
49
55
  this.value,
50
56
  this.locale.datePicker
51
57
  );
52
- this._adjustSelectedMonthToEnsureVisibilityOf(this.value);
53
58
  } else {
54
59
  this._presentationValue = "";
55
60
  }
@@ -43,11 +43,16 @@ let DatePicker = class extends DatePickerBase {
43
43
  this.value = "";
44
44
  return;
45
45
  }
46
+ this._adjustSelectedMonthToEnsureVisibilityOf(this.value);
47
+ }
48
+ this._updatePresentationValue();
49
+ }
50
+ _updatePresentationValue() {
51
+ if (this.value) {
46
52
  this._presentationValue = formatPresentationDate(
47
53
  this.value,
48
54
  this.locale.datePicker
49
55
  );
50
- this._adjustSelectedMonthToEnsureVisibilityOf(this.value);
51
56
  } else {
52
57
  this._presentationValue = "";
53
58
  }
@@ -134,6 +134,22 @@ let DateRangePicker = class extends presentationDate.DatePickerBase {
134
134
  currentEndChanged() {
135
135
  this.end = this.currentEnd;
136
136
  }
137
+ /**
138
+ * @internal
139
+ */
140
+ _updatePresentationValue() {
141
+ if (this.start && this.end) {
142
+ this._presentationValue = formatPresentationDateRange(
143
+ {
144
+ start: this.start,
145
+ end: this.end
146
+ },
147
+ this.locale.datePicker
148
+ );
149
+ } else {
150
+ this._presentationValue = "";
151
+ }
152
+ }
137
153
  /**
138
154
  * @internal
139
155
  */
@@ -335,18 +351,11 @@ handleChangedValues_fn = function() {
335
351
  __privateMethod(this, _DateRangePicker_instances, updateValues_fn).call(this, { start: this.end, end: this.start });
336
352
  return;
337
353
  }
338
- this._presentationValue = formatPresentationDateRange(
339
- {
340
- start: this.start,
341
- end: this.end
342
- },
343
- this.locale.datePicker
344
- );
345
354
  this.value = formatRange(this.start, this.end);
346
355
  } else {
347
356
  this.value = "";
348
- this._presentationValue = "";
349
357
  }
358
+ this._updatePresentationValue();
350
359
  const dateToEnsureVisibilityOf = this.start || this.end;
351
360
  if (dateToEnsureVisibilityOf) {
352
361
  this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);