@odx/foundation 1.0.0-beta.7 → 1.0.0-beta.9

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 (32) hide show
  1. package/dist/cdk/drag-drop/drag.controller.d.ts +1 -0
  2. package/dist/cdk/popover/popover-host.d.ts +1 -0
  3. package/dist/cdk/popover/popover.models.d.ts +1 -1
  4. package/dist/cdk.js +20 -20
  5. package/dist/components.js +17 -19
  6. package/dist/i18n/lib/config.d.ts +4 -3
  7. package/dist/i18n.js +14 -10
  8. package/dist/lib/controllers/expandable-controller.d.ts +3 -2
  9. package/dist/lib/controllers/focus-trap.controller.d.ts +1 -0
  10. package/dist/lib/main.d.ts +3 -6
  11. package/dist/lib/mixins/can-be-disabled.d.ts +1 -1
  12. package/dist/lib/mixins/can-be-expanded.d.ts +1 -1
  13. package/dist/lib/mixins/can-be-readonly.d.ts +1 -1
  14. package/dist/lib/mixins/can-be-required.d.ts +1 -1
  15. package/dist/lib/mixins/can-be-selected.d.ts +1 -1
  16. package/dist/lib/mixins/can-be-validated.d.ts +1 -1
  17. package/dist/lib/mixins/form-control.d.ts +1 -1
  18. package/dist/lib/mixins/number-control.d.ts +1 -1
  19. package/dist/lib/mixins/with-loading-state.d.ts +1 -1
  20. package/dist/lib/utils/a11y.d.ts +1 -0
  21. package/dist/lib/{directives/slot-fallback.d.ts → utils/empty-slot-fallback-fix.d.ts} +1 -1
  22. package/dist/lib/utils/lit.d.ts +6 -0
  23. package/dist/main.js +68 -69
  24. package/dist/styles.css +1 -1
  25. package/dist/vendor-dJxQG085.js +138 -0
  26. package/package.json +7 -7
  27. package/dist/lib/decorators/request-update-on-aria-change.d.ts +0 -4
  28. package/dist/lib/directives/optional-attr.d.ts +0 -2
  29. package/dist/lib/directives/optional-slot.d.ts +0 -3
  30. package/dist/lib/utils/object.d.ts +0 -2
  31. package/dist/vendor-BpQeSxmW.js +0 -3680
  32. /package/dist/lib/{mixins → utils}/dedupe-mixin.d.ts +0 -0
@@ -4,6 +4,7 @@ export interface DragControllerOptions<T extends DraggableElement = DraggableEle
4
4
  getDraggableElements: () => T[];
5
5
  getContainer?: () => HTMLElement;
6
6
  }
7
+ export declare const DragControllerOptions: <T extends DraggableElement = DraggableElement>(config?: Partial<DragControllerOptions<T>>) => DragControllerOptions<T>;
7
8
  export declare class DragController<T extends DraggableElement = DraggableElement> implements ReactiveController {
8
9
  #private;
9
10
  get draggableElements(): T[];
@@ -15,5 +15,6 @@ export interface PopoverHost {
15
15
  onPopoverHide?(): void;
16
16
  }
17
17
  export type PopoverHostElement = PopoverHost & CustomElement;
18
+ export declare const PopoverHostStyles: string;
18
19
  export declare const PopoverHost: <T extends Constructor<CustomElement>>(superClass: T) => Constructor<PopoverHost> & T;
19
20
  //# sourceMappingURL=popover-host.d.ts.map
@@ -23,7 +23,7 @@ export interface PopoverPlacementOptions {
23
23
  offset: number;
24
24
  outerPadding: number;
25
25
  }
26
- export declare const PopoverPlacementOptions: (config?: Partial<PopoverPlacementOptions> | null | undefined) => PopoverPlacementOptions;
26
+ export declare function PopoverPlacementOptions(options?: Partial<PopoverPlacementOptions>): PopoverPlacementOptions;
27
27
  export type PopoverSide = (typeof PopoverSide)[keyof typeof PopoverSide];
28
28
  export declare const PopoverSide: {
29
29
  readonly TOP: "top";
package/dist/cdk.js CHANGED
@@ -1,7 +1,8 @@
1
- import { dedupeMixin, createConfig, toPx, waitForAnimations, findClosestDocument, createMutationObserver, customElement, CustomElement } from '@odx/foundation';
1
+ import { dedupeMixin, toPx, waitForAnimations, findClosestDocument, createMutationObserver, customElement, CustomElement } from '@odx/foundation';
2
2
  import { property, state } from 'lit/decorators.js';
3
- import { m as minBy, a as computePosition, o as offset, s as shift, f as flip, b as size, d as arrow, h as hide, e as autoUpdate } from './vendor-BpQeSxmW.js';
4
- import { isServer, unsafeCSS, html } from 'lit';
3
+ import { m as minBy } from './vendor-dJxQG085.js';
4
+ import { arrow, flip, computePosition, offset, shift, size, hide, autoUpdate } from '@floating-ui/dom';
5
+ import { isServer, html } from 'lit';
5
6
  import { when } from 'lit/directives/when.js';
6
7
 
7
8
  var __defProp$2 = Object.defineProperty;
@@ -43,8 +44,9 @@ const IsDraggable = dedupeMixin((superClass) => {
43
44
  return IsDraggableElement;
44
45
  });
45
46
 
46
- const DragControllerOptions = createConfig({
47
- getDraggableElements: () => []
47
+ const DragControllerOptions = (config) => ({
48
+ getDraggableElements: () => [],
49
+ ...config
48
50
  });
49
51
  class DragController {
50
52
  #host;
@@ -121,9 +123,6 @@ class DragController {
121
123
  if (event.target === this.#host) {
122
124
  return minBy(this.draggableElements, (element) => element.getDistance?.(this.container, event) ?? Number.MAX_SAFE_INTEGER) ?? null;
123
125
  }
124
- if (this.isDraggable(event.target)) {
125
- return event.target;
126
- }
127
126
  return null;
128
127
  }
129
128
  }
@@ -144,14 +143,17 @@ const PopoverPlacement = {
144
143
  LEFT_START: "left-start",
145
144
  LEFT_END: "left-end"
146
145
  };
147
- const PopoverPlacementOptions = createConfig({
148
- placement: PopoverPlacement.BOTTOM,
149
- enableFallback: true,
150
- fallbackAxisSideDirection: "end",
151
- matchReferenceWidth: false,
152
- offset: 0,
153
- outerPadding: 24
154
- });
146
+ function PopoverPlacementOptions(options) {
147
+ return {
148
+ placement: PopoverPlacement.BOTTOM,
149
+ enableFallback: true,
150
+ fallbackAxisSideDirection: "end",
151
+ matchReferenceWidth: false,
152
+ offset: 0,
153
+ outerPadding: 24,
154
+ ...options
155
+ };
156
+ }
155
157
  const PopoverSide = {
156
158
  TOP: PopoverPlacement.TOP,
157
159
  RIGHT: PopoverPlacement.RIGHT,
@@ -214,6 +216,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => {
214
216
  if (kind && result) __defProp$1(target, key, result);
215
217
  return result;
216
218
  };
219
+ const PopoverHostStyles = styles$1;
217
220
  const PopoverHost = dedupeMixin((superClass) => {
218
221
  class PopoverHostClass extends superClass {
219
222
  // biome-ignore lint/suspicious/noExplicitAny: This is a mixin
@@ -238,9 +241,6 @@ const PopoverHost = dedupeMixin((superClass) => {
238
241
  this.addEventListener("toggle", this.#handleToggle);
239
242
  }
240
243
  }
241
- static {
242
- this.styles = [superClass.styles ?? [], unsafeCSS(styles$1)].flat(2);
243
- }
244
244
  #observer;
245
245
  get options() {
246
246
  return PopoverPlacementOptions({ placement: this.placement ?? PopoverPlacement.BOTTOM });
@@ -354,4 +354,4 @@ OdxPopover = __decorateClass([
354
354
  customElement("odx-popover", [styles])
355
355
  ], OdxPopover);
356
356
 
357
- export { DragController, IS_DRAG_ACTIVE_ATTRIBUTE, IsDraggable, OdxPopover, PopoverHost, PopoverPlacement, PopoverPlacementOptions, PopoverSide, isDraggableElement };
357
+ export { DragController, DragControllerOptions, IS_DRAG_ACTIVE_ATTRIBUTE, IsDraggable, OdxPopover, PopoverHost, PopoverHostStyles, PopoverPlacement, PopoverPlacementOptions, PopoverSide, isDraggableElement };
@@ -4,11 +4,9 @@ import { property, queryAssignedElements, query, queryAll, state } from 'lit/dec
4
4
  import { signal, computed, effect, SignalWatcher } from '@lit-labs/preact-signals';
5
5
  import { repeat } from 'lit/directives/repeat.js';
6
6
  import { when } from 'lit/directives/when.js';
7
- import { ifDefined } from 'lit/directives/if-defined.js';
8
- import { PopoverPlacement, PopoverHost, PopoverPlacementOptions, IsDraggable, IS_DRAG_ACTIVE_ATTRIBUTE, DragController } from '@odx/foundation/cdk';
7
+ import { PopoverPlacement, PopoverHost, PopoverPlacementOptions, PopoverHostStyles, IsDraggable, IS_DRAG_ACTIVE_ATTRIBUTE, DragController } from '@odx/foundation/cdk';
9
8
  import { IsLocalized, setTranslation } from '@odx/foundation/i18n';
10
- import { g as clamp, R as RovingTabindexController, r as round, i as debounce, m as minBy, j as maxBy } from './vendor-BpQeSxmW.js';
11
- import { styleMap } from 'lit/directives/style-map.js';
9
+ import { R as RovingTabindexController, r as round, d as debounce } from './vendor-dJxQG085.js';
12
10
  import { createContext, consume, provide } from '@lit/context';
13
11
  import { classMap } from 'lit/directives/class-map.js';
14
12
 
@@ -296,7 +294,7 @@ class BaseLink extends CanBeDisabled(CustomElement) {
296
294
  aria-hidden="${optionalAttr(ariaHidden)}"
297
295
  href=${optionalAttr(this.href)}
298
296
  target=${optionalAttr(this.target)}
299
- download=${ifDefined(this.download)}
297
+ download=${optionalAttr(this.download)}
300
298
  rel=${optionalAttr(this.rel)}
301
299
  role=${optionalAttr(role)}
302
300
  >
@@ -1481,7 +1479,7 @@ __decorateClass$10([
1481
1479
  property({ type: String, reflect: true })
1482
1480
  ], OdxDropdown.prototype, "placement", 2);
1483
1481
  OdxDropdown = __decorateClass$10([
1484
- customElement("odx-dropdown", [styles$R])
1482
+ customElement("odx-dropdown", [PopoverHostStyles, styles$R])
1485
1483
  ], OdxDropdown);
1486
1484
 
1487
1485
  const styles$Q = ":host{display:block}";
@@ -1587,7 +1585,7 @@ let OdxFormatBytes = class extends BaseFormat {
1587
1585
  }
1588
1586
  transform(value) {
1589
1587
  const units = OdxFormatBytes.UNIT_PREFIXES[this.unit];
1590
- const index = clamp(Math.floor(Math.log10(value) / 3), 0, units.length - 1);
1588
+ const index = Math.min(Math.max(0, Math.floor(Math.log10(value) / 3)), units.length - 1);
1591
1589
  const transformedValue = value / 1e3 ** index;
1592
1590
  return this.formatNumber(transformedValue, {
1593
1591
  maximumFractionDigits: 2,
@@ -2959,7 +2957,7 @@ _handleClick$2 = new WeakMap();
2959
2957
  _handleKeyDown$1 = new WeakMap();
2960
2958
  _handleReferenceKeyDown = new WeakMap();
2961
2959
  OdxMenu = __decorateClass$z([
2962
- customElement("odx-menu", [styles$x])
2960
+ customElement("odx-menu", [PopoverHostStyles, styles$x])
2963
2961
  ], OdxMenu);
2964
2962
 
2965
2963
  const styles$w = "@layer base{:host{--max-inline-size: 640px;--margin-block-start: var(--odx-size-450);--_modal-transition: var(--odx-popover-transition, var(--odx-motion-duration-default));--_modal-transition-offset-x: 0;--_modal-transition-offset-y: calc(-1 * var(--_modal-offset));--_modal-outer-padding: var(--odx-breakpoint-spacing-150-responsive);display:contents;transition-property:display}:host,.base,.base::backdrop{transition:var(--odx-transition-default);transition-behavior:allow-discrete}.base,.base::backdrop{opacity:0}.base{background:transparent;border:0;border-radius:var(--odx-border-radius-ml);box-shadow:var(--odx-shadow-level-2);color:var(--odx-color-foreground-base);margin-block-start:var(--margin-block-start);overflow:unset;padding:0;inline-size:min(var(--max-inline-size),100% - 2 * var(--_modal-outer-padding));transform:translateY(var(--odx-size-100));transition-property:opacity,display,overlay,transform,outline;&::backdrop{backdrop-filter:blur(var(--odx-elevation-blur));background-color:var(--odx-color-backdrop);transition-property:opacity}}.inner{display:flex;flex-direction:column;background-color:var(--odx-color-background-main);border-radius:inherit;padding:var(--odx-breakpoint-spacing-50) var(--odx-breakpoint-spacing-150-responsive);max-block-size:calc(100dvh - 2 * var(--_modal-outer-padding))}.header,.footer{min-block-size:var(--odx-size-300)}.header{padding-inline-end:var(--odx-size-300)}.content{padding:var(--odx-size-75) 0}.dismiss-action{position:absolute;inset-block-start:var(--odx-breakpoint-spacing-50);inset-inline-end:var(--odx-breakpoint-spacing-150-responsive)}}@layer state{:host(:not([open])){display:none}.base:focus-visible{outline-color:var(--odx-focus-ring-color)}.base[open]{&,&::backdrop{opacity:1;@starting-style{opacity:0}}transform:translate(0);@starting-style{transform:translateY(var(--odx-size-100))}}}";
@@ -3294,9 +3292,9 @@ let OdxPagination = class extends IsLocalized(CustomElement) {
3294
3292
  }
3295
3293
  get paginationContext() {
3296
3294
  return {
3297
- pageStart: clamp(this.page * this.pageSize, 0, this.totalItems),
3298
- pageEnd: clamp((this.page + 1) * this.pageSize - 1, 0, this.totalItems),
3299
- page: clamp(this.page, 1, this.totalPages),
3295
+ pageStart: Math.min(Math.max(0, this.page * this.pageSize), this.totalItems),
3296
+ pageEnd: Math.min(Math.max(0, (this.page + 1) * this.pageSize - 1), this.totalItems),
3297
+ page: Math.min(Math.max(1, this.page), this.totalPages),
3300
3298
  totalPages: this.totalPages,
3301
3299
  totalItems: this.totalItems,
3302
3300
  hasPreviousPage: this.page > 0,
@@ -3379,7 +3377,7 @@ let OdxProgressBar = class extends CustomElement {
3379
3377
  this.hideValue = false;
3380
3378
  }
3381
3379
  get valuePercentage() {
3382
- return clamp(round(this.value - this.min / this.max - this.min, 2), this.min, this.max);
3380
+ return Math.min(Math.max(this.min, round(this.value - this.min / this.max - this.min, 2)), this.max);
3383
3381
  }
3384
3382
  get valueHidden() {
3385
3383
  return this.hideValue || !this.valueText && this.indeterminate;
@@ -3397,7 +3395,7 @@ let OdxProgressBar = class extends CustomElement {
3397
3395
  aria-valuemin="0"
3398
3396
  aria-valuemax="100"
3399
3397
  aria-valuenow=${this.indeterminate ? 0 : this.value}
3400
- style=${styleMap({ "--_value-percentage": this.valuePercentage })}
3398
+ style="'--_value-percentage': ${this.valuePercentage}"
3401
3399
  >
3402
3400
  <div class="indicator"></div>
3403
3401
  </div>
@@ -4015,7 +4013,7 @@ findClosestValue_fn = function(value) {
4015
4013
  return __privateMethod$5(this, _OdxSliderHandle_instances, limitValue_fn).call(this, closestValue + (isNextValue ? this.context.step : 0));
4016
4014
  };
4017
4015
  updatePosition_fn = function(value) {
4018
- const valuePercentage = `${round(clamp((value - this.context.min) / this.context.range, 0, 1) * 100, 3)}%`;
4016
+ const valuePercentage = `${round(Math.min(Math.max(0, (value - this.context.min) / this.context.range), 1) * 100, 3)}%`;
4019
4017
  this.style.setProperty("--_position", valuePercentage);
4020
4018
  __privateGet$5(this, _nextHandle)?.style.setProperty("--_previous-position", valuePercentage);
4021
4019
  __privateGet$5(this, _previousHandle)?.style.setProperty("--_next-position", valuePercentage);
@@ -4024,12 +4022,12 @@ getValueFromPosition_fn = function(position) {
4024
4022
  return __privateMethod$5(this, _OdxSliderHandle_instances, limitValue_fn).call(this, __privateMethod$5(this, _OdxSliderHandle_instances, calculateValue_fn).call(this, position.x));
4025
4023
  };
4026
4024
  calculateValue_fn = function(relativePosition) {
4027
- return clamp(relativePosition / 100, 0, 1) * this.context.range + this.context.min;
4025
+ return Math.min(Math.max(0, relativePosition / 100), 1) * this.context.range + this.context.min;
4028
4026
  };
4029
4027
  limitValue_fn = function(value) {
4030
4028
  const startLimit = __privateGet$5(this, _previousHandle) ? Math.max(__privateGet$5(this, _previousHandle).value, this.min - this.minRange) + this.minRange : this.min;
4031
4029
  const endLimit = __privateGet$5(this, _nextHandle) ? Math.min(__privateGet$5(this, _nextHandle).value, this.max + this.minRange) - this.minRange : this.max;
4032
- return clamp(value, startLimit, endLimit);
4030
+ return Math.min(Math.max(startLimit, value), endLimit);
4033
4031
  };
4034
4032
  findPreviousHandle_fn = function() {
4035
4033
  let sibling = this.previousElementSibling;
@@ -4156,8 +4154,8 @@ let OdxSlider = class extends CustomElement {
4156
4154
  });
4157
4155
  __privateAdd$6(this, _handleSlotChange$1, async () => {
4158
4156
  const elements = this.dragController.draggableElements;
4159
- const min = minBy(elements, (elment) => elment.min)?.min ?? 0;
4160
- const max = maxBy(elements, (element) => element.max)?.max ?? 1;
4157
+ const min = elements.reduce((min2, element) => Math.min(min2, element.min), Number.POSITIVE_INFINITY);
4158
+ const max = elements.reduce((max2, element) => Math.max(max2, element.max ?? 0), Number.NEGATIVE_INFINITY);
4161
4159
  this.context = { ...this.context, min, max, range: Math.abs(max - min) };
4162
4160
  });
4163
4161
  if (!isServer) {
@@ -5119,7 +5117,7 @@ __decorateClass$2([
5119
5117
  property({ type: Boolean, reflect: true })
5120
5118
  ], OdxTooltip.prototype, "interactive", 2);
5121
5119
  OdxTooltip = __decorateClass$2([
5122
- customElement("odx-tooltip", [styles$1])
5120
+ customElement("odx-tooltip", [PopoverHostStyles, styles$1])
5123
5121
  ], OdxTooltip);
5124
5122
 
5125
5123
  var __defProp$1 = Object.defineProperty;
@@ -25,7 +25,8 @@ export interface LocalizationOptions {
25
25
  fallbackLanguage: () => Intl.UnicodeBCP47LocaleIdentifier;
26
26
  fallbackTranslation: (key: string) => string;
27
27
  }
28
- export type I18nOptions = LocalizationOptions & FormatOptions;
29
- export declare function setI18nOptions(options?: Partial<I18nOptions> | null): void;
30
- export declare function getI18nOptions(options?: Partial<I18nOptions> | null): I18nOptions;
28
+ export type I18nConfig = LocalizationOptions & FormatOptions;
29
+ export declare const I18nConfig: (config?: Partial<I18nConfig>) => I18nConfig;
30
+ export declare function setI18nOptions(options?: Partial<I18nConfig> | null): void;
31
+ export declare function getI18nOptions(options?: Partial<I18nConfig> | null): I18nConfig;
31
32
  //# sourceMappingURL=config.d.ts.map
package/dist/i18n.js CHANGED
@@ -1,20 +1,24 @@
1
1
  import { signal, effect, computed, SignalWatcher } from '@lit-labs/preact-signals';
2
- import { createConfig, parseDate, dedupeMixin } from '@odx/foundation';
2
+ import { parseDate, dedupeMixin } from '@odx/foundation';
3
3
  import { property } from 'lit/decorators.js';
4
- import { k as flattenObject, l as isNotNil } from './vendor-BpQeSxmW.js';
4
+ import { f as flattenObject } from './vendor-dJxQG085.js';
5
5
 
6
- const I18nOptions = createConfig({
6
+ const I18nConfig = (config) => ({
7
7
  defaultLocale: () => navigator.language,
8
8
  fallbackLanguage: () => "en",
9
9
  fallbackTranslation: (key) => key,
10
- relativeTimeFormatOptions: { minUnit: "minute" }
10
+ ...config,
11
+ relativeTimeFormatOptions: {
12
+ minUnit: "minute",
13
+ ...config?.relativeTimeFormatOptions
14
+ }
11
15
  });
12
- const i18nOptions = signal(null);
16
+ const i18nConfig = signal(null);
13
17
  function setI18nOptions(options) {
14
- i18nOptions.value = getI18nOptions(options);
18
+ i18nConfig.value = getI18nOptions(options);
15
19
  }
16
20
  function getI18nOptions(options) {
17
- return I18nOptions(options ?? i18nOptions.value ?? {});
21
+ return I18nConfig(options ?? i18nConfig.value ?? {});
18
22
  }
19
23
 
20
24
  function formatDate(input, options) {
@@ -84,12 +88,12 @@ function syncDocumentLanguage(root = document.documentElement) {
84
88
  const translations = signal({});
85
89
  function interpolate(value, context) {
86
90
  return value.replaceAll(/\{\{\s*([^}\s]+)\s*}}/g, (match, variableName) => {
87
- return isNotNil(context[variableName]) ? interpolate(context[variableName].toString(), context) : match;
91
+ return context[variableName] != null ? interpolate(context[variableName].toString(), context) : match;
88
92
  });
89
93
  }
90
94
  function setTranslation(locale, translation) {
91
95
  const { language } = getLocale(locale);
92
- translations.value = { ...translations.value, [language]: { ...translations.value[language], ...flattenObject(translation, { delimiter: "." }) } };
96
+ translations.value = { ...translations.value, [language]: { ...translations.value[language], ...flattenObject(translation) } };
93
97
  }
94
98
  function translate(key, contextInput, locale) {
95
99
  return computed(() => {
@@ -145,4 +149,4 @@ const IsLocalized = dedupeMixin((superClass) => {
145
149
  return IsLocalizedElement;
146
150
  });
147
151
 
148
- export { IsLocalized, formatDate, formatList, formatNumber, formatRelativeTime, getI18nOptions, getLocale, interpolate, setI18nOptions, setLocale, setTranslation, syncDocumentLanguage, translate };
152
+ export { I18nConfig, IsLocalized, formatDate, formatList, formatNumber, formatRelativeTime, getI18nOptions, getLocale, interpolate, setI18nOptions, setLocale, setTranslation, syncDocumentLanguage, translate };
@@ -5,13 +5,14 @@ export interface ExpandableItemManagerHost extends ReactiveElement {
5
5
  multiple?: boolean;
6
6
  toggleAll?: (force?: boolean, ...exclude: ExpandableItem[]) => void;
7
7
  }
8
- export interface ExpandableItemManagerConfig<T extends ExpandableItem = ExpandableItem> {
8
+ export interface ExpandableItemManagerOptions<T extends ExpandableItem = ExpandableItem> {
9
9
  getItems?: () => T[];
10
10
  }
11
+ export declare const ExpandableItemManagerOptions: (options?: Partial<ExpandableItemManagerOptions>) => ExpandableItemManagerOptions;
11
12
  export declare class ExpandableItemManager<T extends ExpandableItem> implements ReactiveController {
12
13
  #private;
13
14
  get expandableItems(): T[];
14
- constructor(host: ExpandableItemManagerHost, options?: ExpandableItemManagerConfig);
15
+ constructor(host: ExpandableItemManagerHost, options?: ExpandableItemManagerOptions);
15
16
  hostConnected?(): void;
16
17
  }
17
18
  //# sourceMappingURL=expandable-controller.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { Options } from 'focus-trap';
2
2
  import { ReactiveController, ReactiveElement } from 'lit';
3
3
  export type FocusTrapControllerOptions = Options;
4
+ export declare const FocusTrapControllerOptions: (options?: Partial<FocusTrapControllerOptions>) => FocusTrapControllerOptions;
4
5
  export declare class FocusTrapController implements ReactiveController {
5
6
  #private;
6
7
  constructor(host: ReactiveElement, options?: FocusTrapControllerOptions);
@@ -1,10 +1,6 @@
1
1
  import { ExtractAssetName } from '@odx/assets-utils';
2
2
  export * from './controllers/expandable-controller.js';
3
3
  export * from './controllers/focus-trap.controller.js';
4
- export * from './decorators/request-update-on-aria-change.js';
5
- export * from './directives/optional-attr.js';
6
- export * from './directives/optional-slot.js';
7
- export * from './directives/slot-fallback.js';
8
4
  export * from './facade/checkbox-form-control.js';
9
5
  export * from './facade/checkbox-group-form-control.js';
10
6
  export * from './facade/option-control.js';
@@ -16,16 +12,17 @@ export * from './mixins/can-be-readonly.js';
16
12
  export * from './mixins/can-be-required.js';
17
13
  export * from './mixins/can-be-selected.js';
18
14
  export * from './mixins/can-be-validated.js';
19
- export * from './mixins/dedupe-mixin.js';
20
15
  export * from './mixins/form-control.js';
21
16
  export * from './mixins/number-control.js';
22
17
  export * from './mixins/with-loading-state.js';
23
18
  export * from './utils/a11y.js';
24
19
  export * from './utils/date.js';
20
+ export * from './utils/dedupe-mixin.js';
25
21
  export * from './utils/dom.js';
22
+ export * from './utils/empty-slot-fallback-fix.js';
26
23
  export * from './utils/get-unique-id.js';
27
24
  export * from './utils/keyboard-events.js';
28
- export * from './utils/object.js';
25
+ export * from './utils/lit.js';
29
26
  export * from './utils/search-text-content.js';
30
27
  export * from './utils/shared-intersection-observer.js';
31
28
  export * from './utils/shared-resize-observer.js';
@@ -1,6 +1,6 @@
1
1
  import { ContextProvider } from '@lit/context';
2
2
  import { CustomElement } from '../custom-element.js';
3
- import { Constructor } from './dedupe-mixin.js';
3
+ import { Constructor } from '../utils/dedupe-mixin.js';
4
4
  export interface CanBeDisabled {
5
5
  disabled: boolean;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
2
3
  import { CanBeDisabled } from './can-be-disabled.js';
3
- import { Constructor } from './dedupe-mixin.js';
4
4
  export interface CanBeExpanded extends CanBeDisabled {
5
5
  expanded: boolean;
6
6
  expandable: boolean;
@@ -1,5 +1,5 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
- import { Constructor } from './dedupe-mixin.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
3
3
  export interface CanBeReadonly {
4
4
  readonly: boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
- import { Constructor } from './dedupe-mixin.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
3
3
  export interface CanBeRequired {
4
4
  required: boolean;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
2
  import { ARIAMixinStrict } from '../utils/a11y.js';
3
- import { Constructor } from './dedupe-mixin.js';
3
+ import { Constructor } from '../utils/dedupe-mixin.js';
4
4
  export interface CanBeSelected {
5
5
  selected: boolean;
6
6
  ariaSelectedValue: ARIAMixinStrict['ariaCurrent'];
@@ -1,5 +1,5 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
- import { Constructor } from './dedupe-mixin.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
3
3
  export interface CanBeValidated {
4
4
  readonly internals: ElementInternals;
5
5
  get validity(): ValidityState;
@@ -1,9 +1,9 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
2
3
  import { CanBeDisabled } from './can-be-disabled.js';
3
4
  import { CanBeReadonly } from './can-be-readonly.js';
4
5
  import { CanBeRequired } from './can-be-required.js';
5
6
  import { CanBeValidated } from './can-be-validated.js';
6
- import { Constructor } from './dedupe-mixin.js';
7
7
  type ValueType = string | number | boolean | string[] | number[] | boolean[];
8
8
  export interface IsFormControl<V extends ValueType = string> extends CanBeDisabled, CanBeReadonly, CanBeRequired, CanBeValidated {
9
9
  form: HTMLFormElement | null;
@@ -1,5 +1,5 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
- import { Constructor } from './dedupe-mixin.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
3
3
  import { IsFormControl } from './form-control.js';
4
4
  export interface IsNumberControl extends Omit<IsFormControl, 'value'> {
5
5
  min: number;
@@ -1,5 +1,5 @@
1
1
  import { CustomElement } from '../custom-element.js';
2
- import { Constructor } from './dedupe-mixin.js';
2
+ import { Constructor } from '../utils/dedupe-mixin.js';
3
3
  export interface HasLoadingState {
4
4
  loading: boolean;
5
5
  get loadingContainer(): HTMLElement;
@@ -59,4 +59,5 @@ export interface ARIAMixinStrict extends ARIAMixin {
59
59
  ariaValueText: string | null;
60
60
  role: ARIARole | null;
61
61
  }
62
+ export declare function ariaPropertyToAttribute<K extends ARIAProperty>(property: K): string;
62
63
  //# sourceMappingURL=a11y.d.ts.map
@@ -5,4 +5,4 @@ declare class SlotFallbackDirective extends Directive {
5
5
  }
6
6
  export declare const emptySlotFallbackFix: () => import('lit-html/directive.js').DirectiveResult<typeof SlotFallbackDirective>;
7
7
  export {};
8
- //# sourceMappingURL=slot-fallback.d.ts.map
8
+ //# sourceMappingURL=empty-slot-fallback-fix.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { ReactiveElement, TemplateResult, nothing } from 'lit';
2
+ import { ARIAProperty } from './a11y.js';
3
+ export declare function requestUpdateOnAriaChange(ariaProperties: ARIAProperty[]): (ctor: typeof ReactiveElement) => void;
4
+ export declare const optionalAttr: <T>(value: T) => NonNullable<T>;
5
+ export declare function optionalSlot(host: ReactiveElement, slotName: string): TemplateResult | typeof nothing;
6
+ //# sourceMappingURL=lit.d.ts.map