@odx/foundation 1.0.0-beta.21 → 1.0.0-beta.211
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/README.md +51 -9
- package/dist/_virtual_class-decorator-runtime.js +13 -0
- package/dist/components/accordion/accordion.d.ts +11 -6
- package/dist/components/accordion-item/accordion-item.d.ts +25 -0
- package/dist/components/{accordion → accordion-panel}/accordion-panel.d.ts +4 -3
- package/dist/components/action-button/action-button.d.ts +28 -0
- package/dist/components/action-group/action-group.d.ts +6 -13
- package/dist/components/anchor-navigation/anchor-navigation.d.ts +8 -6
- package/dist/components/anchor-navigation/index.d.ts +0 -1
- package/dist/components/area-footer/area-footer.d.ts +29 -0
- package/dist/components/area-header/area-header.d.ts +20 -4
- package/dist/components/autocomplete/autocomplete.d.ts +27 -0
- package/dist/components/avatar/avatar.d.ts +34 -5
- package/dist/components/badge/badge.d.ts +32 -5
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +3 -7
- package/dist/components/button/button.d.ts +33 -23
- package/dist/components/button-group/button-group.d.ts +10 -5
- package/dist/components/card/card.d.ts +14 -3
- package/dist/components/checkbox/checkbox.d.ts +6 -6
- package/dist/components/checkbox-group/checkbox-group.d.ts +10 -5
- package/dist/components/chip/chip.d.ts +14 -5
- package/dist/components/drawer/drawer.d.ts +17 -0
- package/dist/components/dropdown/dropdown.d.ts +25 -13
- package/dist/components/empty-state/empty-state.d.ts +42 -0
- package/dist/components/form-field/form-field.d.ts +3 -4
- package/dist/components/format/base-format.d.ts +2 -2
- package/dist/components/format/format-bytes.d.ts +1 -1
- package/dist/components/format/format-number.d.ts +1 -1
- package/dist/components/format/relative-time.d.ts +2 -2
- package/dist/components/gradient-overlay/gradient-overlay.d.ts +23 -0
- package/dist/components/header/header.d.ts +12 -2
- package/dist/components/header/index.d.ts +0 -1
- package/dist/components/highlight/highlight.d.ts +27 -7
- package/dist/components/icon-button/icon-button.d.ts +15 -16
- package/dist/components/image/image.d.ts +5 -5
- package/dist/components/inline-message/inline-message.d.ts +17 -6
- package/dist/components/input/input.d.ts +15 -10
- package/dist/components/key-value/key-value.d.ts +49 -0
- package/dist/components/key-value-list/key-value-list.d.ts +15 -0
- package/dist/components/label/label.d.ts +11 -0
- package/dist/components/line-clamp/line-clamp.d.ts +3 -3
- package/dist/components/link/link.d.ts +14 -4
- package/dist/components/list/list.d.ts +10 -2
- package/dist/components/list-item/list-item.d.ts +24 -0
- package/dist/components/loader.d.ts +2 -0
- package/dist/components/loading-overlay/loading-overlay.d.ts +3 -5
- package/dist/components/loading-spinner/loading-spinner.d.ts +9 -3
- package/dist/components/logo/logo.d.ts +12 -3
- package/dist/components/main-menu/index.d.ts +1 -4
- package/dist/components/main-menu/main-menu-button.d.ts +3 -2
- package/dist/components/main-menu/main-menu.d.ts +1 -7
- package/dist/components/main.d.ts +75 -58
- package/dist/components/menu/menu.d.ts +7 -5
- package/dist/components/menu-item/menu-item.d.ts +27 -4
- package/dist/components/modal/modal.d.ts +10 -27
- package/dist/components/navigation/navigation.d.ts +18 -0
- package/dist/components/navigation-item/navigation-item.d.ts +11 -7
- package/dist/components/navigation-item-group/navigation-item-group.d.ts +20 -0
- package/dist/components/option/option.d.ts +6 -3
- package/dist/components/page/page.d.ts +20 -6
- package/dist/components/page-layout/page-layout.d.ts +9 -1
- package/dist/components/pagination/pagination.d.ts +3 -2
- package/dist/components/popover/compute-popover-placement.d.ts +13 -0
- package/dist/components/popover/popover-host.d.ts +43 -0
- package/dist/components/popover/popover-observer.d.ts +10 -0
- package/dist/{cdk → components}/popover/popover.d.ts +3 -2
- package/dist/components/progress-bar/base-progress.d.ts +23 -0
- package/dist/components/progress-bar/progress-bar.d.ts +3 -14
- package/dist/components/progress-ring/progress-ring.d.ts +33 -0
- package/dist/components/radio-button/radio-button.d.ts +5 -3
- package/dist/components/radio-group/radio-group.d.ts +12 -4
- package/dist/components/rail-navigation/rail-navigation.d.ts +5 -7
- package/dist/components/scroll-container/scroll-container.d.ts +36 -0
- package/dist/components/search-bar/search-bar.d.ts +19 -5
- package/dist/components/select/select.d.ts +11 -10
- package/dist/components/separator/separator.d.ts +10 -4
- package/dist/components/sidebar/sidebar.d.ts +30 -0
- package/dist/components/skeleton/skeleton.d.ts +13 -6
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/slider-handle.d.ts +6 -6
- package/dist/components/slider/slider-marks.d.ts +2 -2
- package/dist/components/slider/slider.d.ts +2 -3
- package/dist/components/slider/slider.models.d.ts +4 -3
- package/dist/components/spinbox/spinbox.d.ts +14 -10
- package/dist/components/status/status.d.ts +24 -0
- package/dist/components/switch/switch.d.ts +12 -2
- package/dist/components/tab-bar/tab-bar.d.ts +36 -0
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/table/table-body.d.ts +1 -3
- package/dist/components/table/table-cell.d.ts +1 -3
- package/dist/components/table/table-checkbox-cell.d.ts +2 -2
- package/dist/components/table/table-header-cell.d.ts +1 -1
- package/dist/components/table/table-header.d.ts +5 -3
- package/dist/components/table/table-row.d.ts +3 -3
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/text/text.d.ts +23 -3
- package/dist/components/textarea/textarea.d.ts +21 -0
- package/dist/components/tile/tile.d.ts +33 -0
- package/dist/components/title/title.d.ts +19 -5
- package/dist/components/toast/toast.d.ts +15 -3
- package/dist/components/toggle-button/toggle-button.d.ts +32 -6
- package/dist/components/toggle-button-group/toggle-button-group.d.ts +20 -0
- package/dist/components/toggle-content/toggle-content.d.ts +4 -4
- package/dist/components/toolbar/toolbar.d.ts +14 -0
- package/dist/components/tooltip/tooltip.d.ts +50 -3
- package/dist/components/translate/translate.d.ts +2 -2
- package/dist/components-loader.js +3 -0
- package/dist/components.js +3851 -4248
- package/dist/en.js +6 -0
- package/dist/i18n/{lib/is-localized.d.ts → is-localized.d.ts} +3 -2
- package/dist/i18n/{lib/localization.d.ts → localization.d.ts} +0 -1
- package/dist/i18n/main.d.ts +7 -6
- package/dist/i18n/translate.d.ts +6 -0
- package/dist/i18n/translations/en.json.d.ts +19 -0
- package/dist/i18n/types.d.ts +30 -0
- package/dist/i18n.js +52 -58
- package/dist/lib/behaviors/can-be-collapsed.d.ts +10 -0
- package/dist/lib/behaviors/can-be-disabled.d.ts +9 -0
- package/dist/lib/behaviors/can-be-expanded.d.ts +11 -0
- package/dist/lib/behaviors/checkbox-control-group.d.ts +21 -0
- package/dist/lib/behaviors/checkbox-control.d.ts +15 -0
- package/dist/lib/behaviors/form-associated.d.ts +22 -0
- package/dist/lib/behaviors/is-draggable.d.ts +23 -0
- package/dist/lib/behaviors/listbox-control.d.ts +26 -0
- package/dist/lib/behaviors/number-form-control.d.ts +11 -0
- package/dist/lib/behaviors/option-control.d.ts +18 -0
- package/dist/lib/behaviors/radio-group-control.d.ts +12 -0
- package/dist/lib/control-element.d.ts +40 -0
- package/dist/lib/controllers/active-descendants-controller.d.ts +29 -0
- package/dist/lib/controllers/drag.controller.d.ts +18 -0
- package/dist/lib/controllers/expandable-controller.d.ts +6 -10
- package/dist/lib/custom-element.d.ts +8 -5
- package/dist/lib/dialog-element.d.ts +183 -0
- package/dist/lib/interactive-control-element.d.ts +19 -0
- package/dist/lib/link-control-element.d.ts +19 -0
- package/dist/lib/models/appearance.d.ts +8 -0
- package/dist/lib/models/layout.d.ts +46 -0
- package/dist/lib/models/shape.d.ts +7 -0
- package/dist/lib/models/size.d.ts +11 -0
- package/dist/lib/models/variant.d.ts +12 -0
- package/dist/main.d.ts +25 -0
- package/dist/main.js +1144 -727
- package/dist/styles-native.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/utils/attribute-directive.d.ts +20 -0
- package/dist/utils/command-directive.d.ts +22 -0
- package/dist/utils/dom-events.d.ts +49 -0
- package/dist/{lib/types/a11y.d.ts → utils/dom-types.d.ts} +1 -17
- package/dist/utils/dom.d.ts +17 -0
- package/dist/utils/lit.d.ts +4 -0
- package/dist/utils/main.d.ts +11 -0
- package/dist/utils/shared-event-listener.d.ts +3 -0
- package/dist/utils/shared-resize-observer.d.ts +7 -0
- package/dist/utils/types.d.ts +5 -0
- package/dist/utils/unique-id.d.ts +20 -0
- package/dist/utils.js +299 -0
- package/dist/vendor.js +1968 -0
- package/package.json +55 -32
- package/dist/cdk/control/checkbox-form-control.d.ts +0 -15
- package/dist/cdk/control/checkbox-group-form-control.d.ts +0 -21
- package/dist/cdk/control/listbox-form-control.d.ts +0 -22
- package/dist/cdk/control/option-control.d.ts +0 -24
- package/dist/cdk/control/radio-group-form-control.d.ts +0 -22
- package/dist/cdk/drag-drop/drag-events.d.ts +0 -9
- package/dist/cdk/drag-drop/drag.controller.d.ts +0 -18
- package/dist/cdk/drag-drop/is-draggable.d.ts +0 -18
- package/dist/cdk/interactive/interactive-element.d.ts +0 -28
- package/dist/cdk/interactive/interactive-link.d.ts +0 -15
- package/dist/cdk/main.d.ts +0 -14
- package/dist/cdk/popover/popover-host.d.ts +0 -25
- package/dist/cdk/popover/popover.models.d.ts +0 -34
- package/dist/cdk/popover/popover.utils.d.ts +0 -5
- package/dist/cdk.js +0 -950
- package/dist/components/accordion/accordion-header.d.ts +0 -17
- package/dist/components/accordion/index.d.ts +0 -4
- package/dist/components/action-group/index.d.ts +0 -2
- package/dist/components/anchor-navigation/anchor-observer.d.ts +0 -11
- package/dist/components/area-header/area-header.models.d.ts +0 -12
- package/dist/components/area-header/index.d.ts +0 -3
- package/dist/components/avatar/avatar.models.d.ts +0 -18
- package/dist/components/avatar/index.d.ts +0 -3
- package/dist/components/avatar-group/avatar-group.d.ts +0 -15
- package/dist/components/avatar-group/index.d.ts +0 -2
- package/dist/components/badge/badge.models.d.ts +0 -14
- package/dist/components/badge/index.d.ts +0 -3
- package/dist/components/breadcrumbs/breadcrumbs-item.d.ts +0 -17
- package/dist/components/breadcrumbs/index.d.ts +0 -3
- package/dist/components/button/button.models.d.ts +0 -27
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button-group/index.d.ts +0 -2
- package/dist/components/card/index.d.ts +0 -2
- package/dist/components/checkbox/index.d.ts +0 -2
- package/dist/components/checkbox-group/checkbox-group.models.d.ts +0 -6
- package/dist/components/checkbox-group/index.d.ts +0 -3
- package/dist/components/chip/chip.models.d.ts +0 -10
- package/dist/components/chip/index.d.ts +0 -3
- package/dist/components/circular-progress-bar/circular-progress-bar.d.ts +0 -42
- package/dist/components/circular-progress-bar/circular-progress-bar.models.d.ts +0 -7
- package/dist/components/circular-progress-bar/index.d.ts +0 -3
- package/dist/components/combobox/combobox.d.ts +0 -20
- package/dist/components/combobox/index.d.ts +0 -2
- package/dist/components/content-box/content-box.d.ts +0 -11
- package/dist/components/content-box/content-box.models.d.ts +0 -2
- package/dist/components/content-box/index.d.ts +0 -2
- package/dist/components/dropdown/dropdown.models.d.ts +0 -6
- package/dist/components/dropdown/index.d.ts +0 -3
- package/dist/components/form-field/index.d.ts +0 -2
- package/dist/components/header/header-actions.d.ts +0 -10
- package/dist/components/headline/headline.d.ts +0 -13
- package/dist/components/headline/headline.models.d.ts +0 -8
- package/dist/components/headline/index.d.ts +0 -3
- package/dist/components/highlight/index.d.ts +0 -2
- package/dist/components/icon-button/index.d.ts +0 -2
- package/dist/components/image/index.d.ts +0 -2
- package/dist/components/inline-message/index.d.ts +0 -3
- package/dist/components/inline-message/inline-message.models.d.ts +0 -12
- package/dist/components/input/index.d.ts +0 -3
- package/dist/components/input/input.models.d.ts +0 -7
- package/dist/components/line-clamp/index.d.ts +0 -2
- package/dist/components/link/base-link.d.ts +0 -15
- package/dist/components/link/index.d.ts +0 -3
- package/dist/components/list/index.d.ts +0 -3
- package/dist/components/list/list-item.d.ts +0 -27
- package/dist/components/loading-overlay/index.d.ts +0 -2
- package/dist/components/loading-spinner/index.d.ts +0 -2
- package/dist/components/logo/index.d.ts +0 -3
- package/dist/components/logo/logo.models.d.ts +0 -9
- package/dist/components/main-menu/main-menu-link.d.ts +0 -9
- package/dist/components/main-menu/main-menu-subtitle.d.ts +0 -12
- package/dist/components/main-menu/main-menu-title.d.ts +0 -12
- package/dist/components/menu/index.d.ts +0 -3
- package/dist/components/menu/menu-label.d.ts +0 -9
- package/dist/components/menu-item/index.d.ts +0 -2
- package/dist/components/modal/index.d.ts +0 -3
- package/dist/components/modal/modal.models.d.ts +0 -5
- package/dist/components/navigation-item/index.d.ts +0 -3
- package/dist/components/navigation-item/navigation-item.models.d.ts +0 -6
- package/dist/components/option/index.d.ts +0 -2
- package/dist/components/page/index.d.ts +0 -3
- package/dist/components/page/page.models.d.ts +0 -10
- package/dist/components/page-layout/index.d.ts +0 -2
- package/dist/components/pagination/index.d.ts +0 -2
- package/dist/components/progress-bar/index.d.ts +0 -3
- package/dist/components/progress-bar/progress-bar.models.d.ts +0 -7
- package/dist/components/radio-button/index.d.ts +0 -2
- package/dist/components/radio-group/index.d.ts +0 -3
- package/dist/components/radio-group/radio-group.models.d.ts +0 -6
- package/dist/components/rail-navigation/index.d.ts +0 -2
- package/dist/components/search-bar/index.d.ts +0 -4
- package/dist/components/search-bar/search-bar.events.d.ts +0 -7
- package/dist/components/search-bar/search-bar.models.d.ts +0 -6
- package/dist/components/select/index.d.ts +0 -2
- package/dist/components/separator/index.d.ts +0 -3
- package/dist/components/separator/separator.models.d.ts +0 -6
- package/dist/components/skeleton/index.d.ts +0 -3
- package/dist/components/skeleton/skeleton.models.d.ts +0 -13
- package/dist/components/spacer/index.d.ts +0 -2
- package/dist/components/spacer/spacer.d.ts +0 -13
- package/dist/components/spacer/spacer.models.d.ts +0 -7
- package/dist/components/spinbox/index.d.ts +0 -2
- package/dist/components/stack/index.d.ts +0 -3
- package/dist/components/stack/stack.d.ts +0 -17
- package/dist/components/stack/stack.models.d.ts +0 -25
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/text/index.d.ts +0 -3
- package/dist/components/text/text.models.d.ts +0 -14
- package/dist/components/title/index.d.ts +0 -3
- package/dist/components/title/title.models.d.ts +0 -10
- package/dist/components/toast/index.d.ts +0 -3
- package/dist/components/toast/toast.models.d.ts +0 -5
- package/dist/components/toggle-button/index.d.ts +0 -2
- package/dist/components/toggle-content/index.d.ts +0 -2
- package/dist/components/tooltip/index.d.ts +0 -3
- package/dist/components/tooltip/tooltip.models.d.ts +0 -8
- package/dist/components/translate/index.d.ts +0 -2
- package/dist/components/visually-hidden/index.d.ts +0 -2
- package/dist/components/visually-hidden/visually-hidden.d.ts +0 -11
- package/dist/i18n/lib/translate.d.ts +0 -11
- package/dist/lib/controllers/active-desendants-controller.d.ts +0 -25
- package/dist/lib/controllers/focus-trap.controller.d.ts +0 -14
- package/dist/lib/main.d.ts +0 -31
- package/dist/lib/mixins/can-be-disabled.d.ts +0 -15
- package/dist/lib/mixins/can-be-expanded.d.ts +0 -10
- package/dist/lib/mixins/can-be-highlighted.d.ts +0 -8
- package/dist/lib/mixins/can-be-readonly.d.ts +0 -7
- package/dist/lib/mixins/can-be-required.d.ts +0 -7
- package/dist/lib/mixins/can-be-selected.d.ts +0 -9
- package/dist/lib/mixins/can-be-validated.d.ts +0 -12
- package/dist/lib/mixins/form-control.d.ts +0 -17
- package/dist/lib/mixins/number-control.d.ts +0 -12
- package/dist/lib/mixins/with-loading-state.d.ts +0 -8
- package/dist/lib/utils/date.d.ts +0 -2
- package/dist/lib/utils/dedupe-mixin.d.ts +0 -3
- package/dist/lib/utils/dom.d.ts +0 -15
- package/dist/lib/utils/empty-slot-fallback-fix.d.ts +0 -8
- package/dist/lib/utils/get-unique-id.d.ts +0 -36
- package/dist/lib/utils/keyboard-events.d.ts +0 -43
- package/dist/lib/utils/lit.d.ts +0 -5
- package/dist/lib/utils/query-assigned-element.d.ts +0 -16
- package/dist/lib/utils/search-text-content.d.ts +0 -8
- package/dist/lib/utils/shared-intersection-observer.d.ts +0 -18
- package/dist/lib/utils/shared-resize-observer.d.ts +0 -18
- package/dist/lib/utils/transformers.d.ts +0 -5
- package/dist/loader/main.d.ts +0 -2
- package/dist/loader.js +0 -12
- package/dist/vendor-dJxQG085.js +0 -138
- /package/dist/i18n/{lib/config.d.ts → config.d.ts} +0 -0
- /package/dist/i18n/{lib/format.d.ts → format.d.ts} +0 -0
- /package/dist/i18n/{lib/models.d.ts → models.d.ts} +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReactiveElement } from 'lit';
|
|
2
|
-
type Interface<T> = {
|
|
3
|
-
[K in keyof T]: T[K];
|
|
4
|
-
};
|
|
5
|
-
export type QueryAssignedElementDecorator = {
|
|
6
|
-
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
7
|
-
<C extends Interface<ReactiveElement>, V extends Element | undefined>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
8
|
-
};
|
|
9
|
-
export interface QueryAssignedElementOptions {
|
|
10
|
-
slot?: string;
|
|
11
|
-
selector?: string;
|
|
12
|
-
flatten?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare function queryAssignedElement(options?: QueryAssignedElementOptions): QueryAssignedElementDecorator;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=query-assigned-element.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a IntersectionObserver instance safely, falling back to a dummy if the API is not supported.
|
|
3
|
-
*
|
|
4
|
-
* @param {IntersectionObserverCallback} callback - The callback to execute when an observed element's size changes.
|
|
5
|
-
* @returns {IntersectionObserver} A IntersectionObserver instance or a dummy object with no-op methods if unsupported.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createIntersectionObserver(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
|
|
8
|
-
export interface SharedIntersectionObserverOptions {
|
|
9
|
-
fpsLimit: number;
|
|
10
|
-
}
|
|
11
|
-
declare class SharedIntersectionObserverInstance {
|
|
12
|
-
#private;
|
|
13
|
-
observe(target: Element, handler: IntersectionObserverCallback, options?: SharedIntersectionObserverOptions): void;
|
|
14
|
-
unobserve(target: Element): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const SharedIntersectionObserver: SharedIntersectionObserverInstance;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=shared-intersection-observer.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a ResizeObserver instance safely, falling back to a dummy if the API is not supported.
|
|
3
|
-
*
|
|
4
|
-
* @param {ResizeObserverCallback} callback - The callback to execute when an observed element's size changes.
|
|
5
|
-
* @returns {ResizeObserver} A ResizeObserver instance or a dummy object with no-op methods if unsupported.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createResizeObserver(callback: ResizeObserverCallback): ResizeObserver;
|
|
8
|
-
export interface SharedResizeObserverOptions extends ResizeObserverOptions {
|
|
9
|
-
fpsLimit: number;
|
|
10
|
-
}
|
|
11
|
-
declare class SharedResizeObserverInstance {
|
|
12
|
-
#private;
|
|
13
|
-
observe(target: Element, handler: ResizeObserverCallback, options?: SharedResizeObserverOptions): void;
|
|
14
|
-
unobserve(target: Element): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const SharedResizeObserver: SharedResizeObserverInstance;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=shared-resize-observer.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function toAriaBooleanAttribute(value: boolean, removeOnFalse?: boolean): 'true' | 'false';
|
|
2
|
-
export declare function fromAriaBooleanAttribute(value?: string | null): boolean;
|
|
3
|
-
export declare function fromToggleEventState(state: string): boolean;
|
|
4
|
-
export declare function toToggleEventState(state: boolean): 'open' | 'closed';
|
|
5
|
-
//# sourceMappingURL=transformers.d.ts.map
|
package/dist/loader/main.d.ts
DELETED
package/dist/loader.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as cdkComponents from '@odx/foundation/cdk';
|
|
2
|
-
import * as components from '@odx/foundation/components';
|
|
3
|
-
|
|
4
|
-
async function defineCustomElements() {
|
|
5
|
-
for (const entry of Object.values({ ...components, ...cdkComponents })) {
|
|
6
|
-
if (typeof entry !== "function") continue;
|
|
7
|
-
entry.define?.();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
defineCustomElements();
|
|
11
|
-
|
|
12
|
-
export { defineCustomElements };
|
package/dist/vendor-dJxQG085.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
function round(value, precision = 0) {
|
|
2
|
-
if (!Number.isInteger(precision)) {
|
|
3
|
-
throw new Error('Precision must be an integer.');
|
|
4
|
-
}
|
|
5
|
-
const multiplier = Math.pow(10, precision);
|
|
6
|
-
return Math.round(value * multiplier) / multiplier;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function minBy(items, getValue) {
|
|
10
|
-
let minElement = items[0];
|
|
11
|
-
let min = Infinity;
|
|
12
|
-
for (let i = 0; i < items.length; i++) {
|
|
13
|
-
const element = items[i];
|
|
14
|
-
const value = getValue(element);
|
|
15
|
-
if (value < min) {
|
|
16
|
-
min = value;
|
|
17
|
-
minElement = element;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return minElement;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function uniqBy(arr, mapper) {
|
|
24
|
-
const map = new Map();
|
|
25
|
-
for (let i = 0; i < arr.length; i++) {
|
|
26
|
-
const item = arr[i];
|
|
27
|
-
const key = mapper(item);
|
|
28
|
-
if (!map.has(key)) {
|
|
29
|
-
map.set(key, item);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return Array.from(map.values());
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function o(i,e,t){return typeof i===e?()=>i:typeof i=="function"?i:t}class FocusGroupController{constructor(e,{hostDelegatesFocus:t,direction:n,elementEnterAction:s,elements:r,focusInIndex:h,isFocusableElement:c,listenerScope:l}={elements:()=>[]}){this._currentIndex=-1;this.prevIndex=-1;this._direction=()=>"both";this.directionLength=5;this.hostDelegatesFocus=false;this.elementEnterAction=e=>{};this._focused=false;this._focusInIndex=e=>0;this.isFocusableElement=e=>true;this._listenerScope=()=>this.host;this.offset=0;this.recentlyConnected=false;this.handleFocusin=e=>{if(!this.isEventWithinListenerScope(e))return;const t=e.composedPath();let n=-1;t.find(s=>(n=this.elements.indexOf(s),n!==-1)),this.prevIndex=this.currentIndex,this.currentIndex=n>-1?n:this.currentIndex,this.isRelatedTargetOrContainAnElement(e)&&this.hostContainsFocus();};this.handleClick=()=>{var n;const e=this.elements;if(!e.length)return;let t=e[this.currentIndex];this.currentIndex<0||((!t||!this.isFocusableElement(t))&&(this.setCurrentIndexCircularly(1),t=e[this.currentIndex]),t&&this.isFocusableElement(t)&&((n=e[this.prevIndex])==null||n.setAttribute("tabindex","-1"),t.setAttribute("tabindex","0")));};this.handleFocusout=e=>{this.isRelatedTargetOrContainAnElement(e)&&this.hostNoLongerContainsFocus();};this.handleKeydown=e=>{if(!this.acceptsEventKey(e.key)||e.defaultPrevented)return;let t=0;switch(this.prevIndex=this.currentIndex,e.key){case "ArrowRight":t+=1;break;case "ArrowDown":t+=this.direction==="grid"?this.directionLength:1;break;case "ArrowLeft":t-=1;break;case "ArrowUp":t-=this.direction==="grid"?this.directionLength:1;break;case "End":this.currentIndex=0,t-=1;break;case "Home":this.currentIndex=this.elements.length-1,t+=1;break}e.preventDefault(),this.direction==="grid"&&this.currentIndex+t<0?this.currentIndex=0:this.direction==="grid"&&this.currentIndex+t>this.elements.length-1?this.currentIndex=this.elements.length-1:this.setCurrentIndexCircularly(t),this.elementEnterAction(this.elements[this.currentIndex]),this.focus();};this.mutationObserver=new MutationObserver(()=>{this.handleItemMutation();}),this.hostDelegatesFocus=t||false,this.host=e,this.host.addController(this),this._elements=r,this.isFocusableElement=c||this.isFocusableElement,this._direction=o(n,"string",this._direction),this.elementEnterAction=s||this.elementEnterAction,this._focusInIndex=o(h,"number",this._focusInIndex),this._listenerScope=o(l,"object",this._listenerScope);}get currentIndex(){return this._currentIndex===-1&&(this._currentIndex=this.focusInIndex),this._currentIndex-this.offset}set currentIndex(e){this._currentIndex=e+this.offset;}get direction(){return this._direction()}get elements(){return this.cachedElements||(this.cachedElements=this._elements()),this.cachedElements}set focused(e){e!==this.focused&&(this._focused=e);}get focused(){return this._focused}get focusInElement(){return this.elements[this.focusInIndex]}get focusInIndex(){return this._focusInIndex(this.elements)}isEventWithinListenerScope(e){return this._listenerScope()===this.host?true:e.composedPath().includes(this._listenerScope())}handleItemMutation(){if(this._currentIndex==-1||this.elements.length<=this._elements().length)return;const e=this.elements[this.currentIndex];if(this.clearElementCache(),this.elements.includes(e))return;const t=this.currentIndex!==this.elements.length,n=t?1:-1;t&&this.setCurrentIndexCircularly(-1),this.setCurrentIndexCircularly(n),this.focus();}update({elements:e}={elements:()=>[]}){this.unmanage(),this._elements=e,this.clearElementCache(),this.manage();}reset(){var n;const e=this.elements;if(!e.length)return;this.setCurrentIndexCircularly(this.focusInIndex-this.currentIndex);let t=e[this.currentIndex];this.currentIndex<0||((!t||!this.isFocusableElement(t))&&(this.setCurrentIndexCircularly(1),t=e[this.currentIndex]),t&&this.isFocusableElement(t)&&((n=e[this.prevIndex])==null||n.setAttribute("tabindex","-1"),t.setAttribute("tabindex","0")));}focusOnItem(e,t){var n;if(e&&this.isFocusableElement(e)&&this.elements.indexOf(e)){const s=this.elements.indexOf(e)-this.currentIndex;this.setCurrentIndexCircularly(s),(n=this.elements[this.prevIndex])==null||n.setAttribute("tabindex","-1");}this.focus(t);}focus(e){var s;const t=this.elements;if(!t.length)return;let n=t[this.currentIndex];(!n||!this.isFocusableElement(n))&&(this.setCurrentIndexCircularly(1),n=t[this.currentIndex]),n&&this.isFocusableElement(n)&&((!this.hostDelegatesFocus||t[this.prevIndex]!==n)&&((s=t[this.prevIndex])==null||s.setAttribute("tabindex","-1")),n.tabIndex=0,n.focus(e),this.hostDelegatesFocus&&!this.focused&&this.hostContainsFocus());}clearElementCache(e=0){this.mutationObserver.disconnect(),delete this.cachedElements,this.offset=e,requestAnimationFrame(()=>{this.elements.forEach(t=>{this.mutationObserver.observe(t,{attributes:true});});});}setCurrentIndexCircularly(e){const{length:t}=this.elements;let n=t;this.prevIndex=this.currentIndex;let s=(t+this.currentIndex+e)%t;for(;n&&this.elements[s]&&!this.isFocusableElement(this.elements[s]);)s=(t+s+e)%t,n-=1;this.currentIndex=s;}hostContainsFocus(){this.host.addEventListener("focusout",this.handleFocusout),this.host.addEventListener("keydown",this.handleKeydown),this.focused=true;}hostNoLongerContainsFocus(){this.host.addEventListener("focusin",this.handleFocusin),this.host.removeEventListener("focusout",this.handleFocusout),this.host.removeEventListener("keydown",this.handleKeydown),this.focused=false;}isRelatedTargetOrContainAnElement(e){const t=e.relatedTarget,n=this.elements.includes(t),s=this.elements.some(r=>r.contains(t));return !(n||s)}acceptsEventKey(e){if(e==="End"||e==="Home")return true;switch(this.direction){case "horizontal":return e==="ArrowLeft"||e==="ArrowRight";case "vertical":return e==="ArrowUp"||e==="ArrowDown";case "both":case "grid":return e.startsWith("Arrow")}}manage(){this.addEventListeners();}unmanage(){this.removeEventListeners();}addEventListeners(){this.host.addEventListener("focusin",this.handleFocusin),this.host.addEventListener("click",this.handleClick);}removeEventListeners(){this.host.removeEventListener("focusin",this.handleFocusin),this.host.removeEventListener("focusout",this.handleFocusout),this.host.removeEventListener("keydown",this.handleKeydown),this.host.removeEventListener("click",this.handleClick);}hostConnected(){this.recentlyConnected=true,this.addEventListeners();}hostDisconnected(){this.mutationObserver.disconnect(),this.removeEventListeners();}hostUpdated(){this.recentlyConnected&&(this.recentlyConnected=false,this.elements.forEach(e=>{this.mutationObserver.observe(e,{attributes:true});}));}}
|
|
36
|
-
|
|
37
|
-
class RovingTabindexController extends FocusGroupController{constructor(){super(...arguments);this.managed=true;this.manageIndexesAnimationFrame=0;}set focused(e){e!==this.focused&&(super.focused=e,this.manageTabindexes());}get focused(){return super.focused}clearElementCache(e=0){cancelAnimationFrame(this.manageIndexesAnimationFrame),super.clearElementCache(e),this.managed&&(this.manageIndexesAnimationFrame=requestAnimationFrame(()=>this.manageTabindexes()));}manageTabindexes(){this.focused&&!this.hostDelegatesFocus?this.updateTabindexes(()=>({tabIndex:-1})):this.updateTabindexes(e=>({removeTabIndex:e.contains(this.focusInElement)&&e!==this.focusInElement,tabIndex:e===this.focusInElement?0:-1}));}updateTabindexes(e){this.elements.forEach(a=>{const{tabIndex:n,removeTabIndex:s}=e(a);if(!s){this.focused?a!==this.elements[this.currentIndex]&&(a.tabIndex=n):a.tabIndex=n;return}const t=a;t.requestUpdate&&t.requestUpdate();});}manage(){this.managed=true,this.manageTabindexes(),super.manage();}unmanage(){this.managed=false,this.updateTabindexes(()=>({tabIndex:0})),super.unmanage();}hostUpdated(){super.hostUpdated(),this.host.hasUpdated||this.manageTabindexes();}}
|
|
38
|
-
|
|
39
|
-
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
40
|
-
let pendingThis = undefined;
|
|
41
|
-
let pendingArgs = null;
|
|
42
|
-
const leading = edges != null && edges.includes('leading');
|
|
43
|
-
const trailing = edges == null || edges.includes('trailing');
|
|
44
|
-
const invoke = () => {
|
|
45
|
-
if (pendingArgs !== null) {
|
|
46
|
-
func.apply(pendingThis, pendingArgs);
|
|
47
|
-
pendingThis = undefined;
|
|
48
|
-
pendingArgs = null;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
const onTimerEnd = () => {
|
|
52
|
-
if (trailing) {
|
|
53
|
-
invoke();
|
|
54
|
-
}
|
|
55
|
-
cancel();
|
|
56
|
-
};
|
|
57
|
-
let timeoutId = null;
|
|
58
|
-
const schedule = () => {
|
|
59
|
-
if (timeoutId != null) {
|
|
60
|
-
clearTimeout(timeoutId);
|
|
61
|
-
}
|
|
62
|
-
timeoutId = setTimeout(() => {
|
|
63
|
-
timeoutId = null;
|
|
64
|
-
onTimerEnd();
|
|
65
|
-
}, debounceMs);
|
|
66
|
-
};
|
|
67
|
-
const cancelTimer = () => {
|
|
68
|
-
if (timeoutId !== null) {
|
|
69
|
-
clearTimeout(timeoutId);
|
|
70
|
-
timeoutId = null;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const cancel = () => {
|
|
74
|
-
cancelTimer();
|
|
75
|
-
pendingThis = undefined;
|
|
76
|
-
pendingArgs = null;
|
|
77
|
-
};
|
|
78
|
-
const flush = () => {
|
|
79
|
-
cancelTimer();
|
|
80
|
-
invoke();
|
|
81
|
-
};
|
|
82
|
-
const debounced = function (...args) {
|
|
83
|
-
if (signal?.aborted) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
pendingThis = this;
|
|
87
|
-
pendingArgs = args;
|
|
88
|
-
const isFirstCall = timeoutId == null;
|
|
89
|
-
schedule();
|
|
90
|
-
if (leading && isFirstCall) {
|
|
91
|
-
invoke();
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
debounced.schedule = schedule;
|
|
95
|
-
debounced.cancel = cancel;
|
|
96
|
-
debounced.flush = flush;
|
|
97
|
-
signal?.addEventListener('abort', cancel, { once: true });
|
|
98
|
-
return debounced;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function isPlainObject(value) {
|
|
102
|
-
if (!value || typeof value !== 'object') {
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
const proto = Object.getPrototypeOf(value);
|
|
106
|
-
const hasObjectPrototype = proto === null ||
|
|
107
|
-
proto === Object.prototype ||
|
|
108
|
-
Object.getPrototypeOf(proto) === null;
|
|
109
|
-
if (!hasObjectPrototype) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function flattenObject(object, { delimiter = '.' } = {}) {
|
|
116
|
-
return flattenObjectImpl(object, '', delimiter);
|
|
117
|
-
}
|
|
118
|
-
function flattenObjectImpl(object, prefix = '', delimiter = '.') {
|
|
119
|
-
const result = {};
|
|
120
|
-
const keys = Object.keys(object);
|
|
121
|
-
for (let i = 0; i < keys.length; i++) {
|
|
122
|
-
const key = keys[i];
|
|
123
|
-
const value = object[key];
|
|
124
|
-
const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;
|
|
125
|
-
if (isPlainObject(value) && Object.keys(value).length > 0) {
|
|
126
|
-
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
if (Array.isArray(value)) {
|
|
130
|
-
Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
result[prefixedKey] = value;
|
|
134
|
-
}
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export { RovingTabindexController as R, debounce as d, flattenObject as f, minBy as m, round as r, uniqBy as u };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|