@sekiui/elements 0.0.56 → 0.0.57
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/dist/cdn/index.js +1053 -91
- package/dist/cdn/p-BJCq8m2o.js +138 -0
- package/dist/cdn/p-BfRJQMIU.js +111 -0
- package/dist/cdn/{p-bMBhrs0a.js → p-Bp7tjKwQ.js} +427 -7
- package/dist/cdn/seki-button.js +1 -1
- package/dist/cdn/seki-card-action.js +1 -1
- package/dist/cdn/seki-card-content.js +1 -1
- package/dist/cdn/seki-card-description.js +1 -1
- package/dist/cdn/seki-card-footer.js +1 -1
- package/dist/cdn/seki-card-header.js +1 -1
- package/dist/cdn/seki-card-title.js +1 -1
- package/dist/cdn/seki-card.js +1 -1
- package/dist/cdn/seki-field-description.js +1 -1
- package/dist/cdn/seki-field-error.js +1 -1
- package/dist/cdn/seki-field-group.js +1 -1
- package/dist/cdn/seki-field-label.js +1 -1
- package/dist/cdn/seki-field-legend.js +1 -1
- package/dist/cdn/seki-field.js +1 -1
- package/dist/cdn/seki-fieldset.js +1 -1
- package/dist/cdn/seki-input.js +1 -1
- package/dist/cdn/seki-select-content.js +1 -1
- package/dist/cdn/seki-select-group.js +1 -1
- package/dist/cdn/seki-select-option.js +1 -1
- package/dist/cdn/seki-select-trigger.js +1 -1
- package/dist/cdn/seki-select.js +1 -1
- package/dist/cdn/seki-sidebar-content.d.ts +11 -0
- package/dist/cdn/seki-sidebar-content.js +38 -0
- package/dist/cdn/seki-sidebar-footer.d.ts +11 -0
- package/dist/cdn/seki-sidebar-footer.js +38 -0
- package/dist/cdn/seki-sidebar-group.d.ts +11 -0
- package/dist/cdn/seki-sidebar-group.js +131 -0
- package/dist/cdn/seki-sidebar-header.d.ts +11 -0
- package/dist/cdn/seki-sidebar-header.js +38 -0
- package/dist/cdn/seki-sidebar-menu-item.d.ts +11 -0
- package/dist/cdn/seki-sidebar-menu-item.js +200 -0
- package/dist/cdn/seki-sidebar-menu-sub.d.ts +11 -0
- package/dist/cdn/seki-sidebar-menu-sub.js +123 -0
- package/dist/cdn/seki-sidebar-menu.d.ts +11 -0
- package/dist/cdn/seki-sidebar-menu.js +38 -0
- package/dist/cdn/seki-sidebar-trigger.d.ts +11 -0
- package/dist/cdn/seki-sidebar-trigger.js +109 -0
- package/dist/cdn/seki-sidebar.d.ts +11 -0
- package/dist/cdn/seki-sidebar.js +380 -0
- package/dist/cdn/seki-skeleton.js +2 -2
- package/dist/cdn/seki-switch.js +1 -1
- package/dist/cdn/seki-tooltip.js +1 -1
- package/dist/cjs/{index-Dd6_-KaR.js → index-tQYksITZ.js} +426 -6
- package/dist/cjs/index.cjs.js +1115 -63
- package/dist/cjs/keyboard-Cjl5HYES.js +142 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/seki-button.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-action.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-content.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-description.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-header.cjs.entry.js +1 -1
- package/dist/cjs/seki-card-title.cjs.entry.js +1 -1
- package/dist/cjs/seki-card.cjs.entry.js +1 -1
- package/dist/cjs/seki-field-description.cjs.entry.js +1 -1
- package/dist/cjs/seki-field-error.cjs.entry.js +1 -1
- package/dist/cjs/seki-field-group.cjs.entry.js +1 -1
- package/dist/cjs/seki-field-label.cjs.entry.js +1 -1
- package/dist/cjs/seki-field-legend.cjs.entry.js +1 -1
- package/dist/cjs/seki-field.cjs.entry.js +1 -1
- package/dist/cjs/seki-fieldset.cjs.entry.js +1 -1
- package/dist/cjs/seki-input.cjs.entry.js +1 -1
- package/dist/cjs/seki-select-content.cjs.entry.js +1 -1
- package/dist/cjs/seki-select-group.cjs.entry.js +1 -1
- package/dist/cjs/seki-select-option.cjs.entry.js +1 -1
- package/dist/cjs/seki-select-trigger.cjs.entry.js +1 -1
- package/dist/cjs/seki-select.cjs.entry.js +1 -1
- package/dist/cjs/seki-sidebar-content.cjs.entry.js +20 -0
- package/dist/cjs/seki-sidebar-footer.cjs.entry.js +20 -0
- package/dist/cjs/seki-sidebar-group.cjs.entry.js +105 -0
- package/dist/cjs/seki-sidebar-header.cjs.entry.js +20 -0
- package/dist/cjs/seki-sidebar-menu-item.cjs.entry.js +174 -0
- package/dist/cjs/seki-sidebar-menu-sub.cjs.entry.js +99 -0
- package/dist/cjs/seki-sidebar-menu.cjs.entry.js +20 -0
- package/dist/cjs/seki-sidebar-trigger.cjs.entry.js +86 -0
- package/dist/cjs/seki-sidebar.cjs.entry.js +342 -0
- package/dist/cjs/seki-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/seki-switch.cjs.entry.js +81 -3
- package/dist/cjs/seki-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/sekiui.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +9 -0
- package/dist/collection/components/sidebar/seki-sidebar-content.css +82 -0
- package/dist/collection/components/sidebar/seki-sidebar-content.js +33 -0
- package/dist/collection/components/sidebar/seki-sidebar-footer.css +44 -0
- package/dist/collection/components/sidebar/seki-sidebar-footer.js +31 -0
- package/dist/collection/components/sidebar/seki-sidebar-group.css +158 -0
- package/dist/collection/components/sidebar/seki-sidebar-group.js +300 -0
- package/dist/collection/components/sidebar/seki-sidebar-header.css +44 -0
- package/dist/collection/components/sidebar/seki-sidebar-header.js +32 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu-item.css +196 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu-item.js +403 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu-sub.css +357 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu-sub.js +256 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu.css +25 -0
- package/dist/collection/components/sidebar/seki-sidebar-menu.js +32 -0
- package/dist/collection/components/sidebar/seki-sidebar-trigger.css +68 -0
- package/dist/collection/components/sidebar/seki-sidebar-trigger.js +175 -0
- package/dist/collection/components/sidebar/seki-sidebar.css +352 -0
- package/dist/collection/components/sidebar/seki-sidebar.js +812 -0
- package/dist/collection/components/sidebar/types.js +18 -0
- package/dist/collection/components/skeleton/seki-skeleton.js +1 -1
- package/dist/collection/index.js +7 -0
- package/dist/collection/services/focus.js +192 -0
- package/dist/collection/services/index.js +7 -0
- package/dist/collection/services/keyboard.js +136 -0
- package/dist/collection/services/media-query.js +254 -0
- package/dist/collection/types.js +41 -0
- package/dist/collection/utils/a11y.js +291 -0
- package/dist/collection/utils/common.js +286 -0
- package/dist/components/index.js +1053 -91
- package/dist/components/p-BJCq8m2o.js +138 -0
- package/dist/components/{p-QhPshhKB.js → p-BzYKy7d3.js} +427 -7
- package/dist/components/p-DwTISp-i.js +111 -0
- package/dist/components/seki-button.js +1 -1
- package/dist/components/seki-card-action.js +1 -1
- package/dist/components/seki-card-content.js +1 -1
- package/dist/components/seki-card-description.js +1 -1
- package/dist/components/seki-card-footer.js +1 -1
- package/dist/components/seki-card-header.js +1 -1
- package/dist/components/seki-card-title.js +1 -1
- package/dist/components/seki-card.js +1 -1
- package/dist/components/seki-field-description.js +1 -1
- package/dist/components/seki-field-error.js +1 -1
- package/dist/components/seki-field-group.js +1 -1
- package/dist/components/seki-field-label.js +1 -1
- package/dist/components/seki-field-legend.js +1 -1
- package/dist/components/seki-field.js +1 -1
- package/dist/components/seki-fieldset.js +1 -1
- package/dist/components/seki-input.js +1 -1
- package/dist/components/seki-select-content.js +1 -1
- package/dist/components/seki-select-group.js +1 -1
- package/dist/components/seki-select-option.js +1 -1
- package/dist/components/seki-select-trigger.js +1 -1
- package/dist/components/seki-select.js +1 -1
- package/dist/components/seki-sidebar-content.d.ts +11 -0
- package/dist/components/seki-sidebar-content.js +38 -0
- package/dist/components/seki-sidebar-footer.d.ts +11 -0
- package/dist/components/seki-sidebar-footer.js +38 -0
- package/dist/components/seki-sidebar-group.d.ts +11 -0
- package/dist/components/seki-sidebar-group.js +131 -0
- package/dist/components/seki-sidebar-header.d.ts +11 -0
- package/dist/components/seki-sidebar-header.js +38 -0
- package/dist/components/seki-sidebar-menu-item.d.ts +11 -0
- package/dist/components/seki-sidebar-menu-item.js +200 -0
- package/dist/components/seki-sidebar-menu-sub.d.ts +11 -0
- package/dist/components/seki-sidebar-menu-sub.js +123 -0
- package/dist/components/seki-sidebar-menu.d.ts +11 -0
- package/dist/components/seki-sidebar-menu.js +38 -0
- package/dist/components/seki-sidebar-trigger.d.ts +11 -0
- package/dist/components/seki-sidebar-trigger.js +109 -0
- package/dist/components/seki-sidebar.d.ts +11 -0
- package/dist/components/seki-sidebar.js +380 -0
- package/dist/components/seki-skeleton.js +2 -2
- package/dist/components/seki-switch.js +1 -1
- package/dist/components/seki-tooltip.js +1 -1
- package/dist/esm/{index-CuXbV_yz.js → index-Dfzpqq0a.js} +426 -6
- package/dist/esm/index.js +1053 -63
- package/dist/esm/keyboard-BJCq8m2o.js +138 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/seki-button.entry.js +1 -1
- package/dist/esm/seki-card-action.entry.js +1 -1
- package/dist/esm/seki-card-content.entry.js +1 -1
- package/dist/esm/seki-card-description.entry.js +1 -1
- package/dist/esm/seki-card-footer.entry.js +1 -1
- package/dist/esm/seki-card-header.entry.js +1 -1
- package/dist/esm/seki-card-title.entry.js +1 -1
- package/dist/esm/seki-card.entry.js +1 -1
- package/dist/esm/seki-field-description.entry.js +1 -1
- package/dist/esm/seki-field-error.entry.js +1 -1
- package/dist/esm/seki-field-group.entry.js +1 -1
- package/dist/esm/seki-field-label.entry.js +1 -1
- package/dist/esm/seki-field-legend.entry.js +1 -1
- package/dist/esm/seki-field.entry.js +1 -1
- package/dist/esm/seki-fieldset.entry.js +1 -1
- package/dist/esm/seki-input.entry.js +1 -1
- package/dist/esm/seki-select-content.entry.js +1 -1
- package/dist/esm/seki-select-group.entry.js +1 -1
- package/dist/esm/seki-select-option.entry.js +1 -1
- package/dist/esm/seki-select-trigger.entry.js +1 -1
- package/dist/esm/seki-select.entry.js +1 -1
- package/dist/esm/seki-sidebar-content.entry.js +18 -0
- package/dist/esm/seki-sidebar-footer.entry.js +18 -0
- package/dist/esm/seki-sidebar-group.entry.js +103 -0
- package/dist/esm/seki-sidebar-header.entry.js +18 -0
- package/dist/esm/seki-sidebar-menu-item.entry.js +172 -0
- package/dist/esm/seki-sidebar-menu-sub.entry.js +97 -0
- package/dist/esm/seki-sidebar-menu.entry.js +18 -0
- package/dist/esm/seki-sidebar-trigger.entry.js +84 -0
- package/dist/esm/seki-sidebar.entry.js +340 -0
- package/dist/esm/seki-skeleton.entry.js +2 -2
- package/dist/esm/seki-switch.entry.js +84 -2
- package/dist/esm/seki-tooltip.entry.js +1 -1
- package/dist/esm/sekiui.js +3 -3
- package/dist/sekiui/index.esm.js +1 -1
- package/dist/sekiui/p-01cfb4e7.entry.js +1 -0
- package/dist/sekiui/{p-97e6e5ce.entry.js → p-042ec460.entry.js} +1 -1
- package/dist/sekiui/{p-3e088b5a.entry.js → p-10c008fc.entry.js} +1 -1
- package/dist/sekiui/{p-ed440425.entry.js → p-352bd295.entry.js} +1 -1
- package/dist/sekiui/p-37c5f4d9.entry.js +1 -0
- package/dist/sekiui/p-40fb71d6.entry.js +1 -0
- package/dist/sekiui/{p-eefbc037.entry.js → p-44191aed.entry.js} +1 -1
- package/dist/sekiui/{p-81709fc2.entry.js → p-4423d621.entry.js} +1 -1
- package/dist/sekiui/{p-9af5286b.entry.js → p-4636588f.entry.js} +1 -1
- package/dist/sekiui/p-471b97a5.entry.js +1 -0
- package/dist/sekiui/{p-0544d787.entry.js → p-56f0d754.entry.js} +1 -1
- package/dist/sekiui/{p-43f7c542.entry.js → p-5bc0f5aa.entry.js} +1 -1
- package/dist/sekiui/{p-eedf44b5.entry.js → p-6164cd8a.entry.js} +1 -1
- package/dist/sekiui/{p-b479935d.entry.js → p-635f4098.entry.js} +1 -1
- package/dist/sekiui/{p-35f8f9c4.entry.js → p-743fc6d9.entry.js} +1 -1
- package/dist/sekiui/p-83e65cbe.entry.js +1 -0
- package/dist/sekiui/p-8b7bd061.entry.js +1 -0
- package/dist/sekiui/{p-009183ab.entry.js → p-8d9a4878.entry.js} +1 -1
- package/dist/sekiui/p-9cb9cdfe.entry.js +1 -0
- package/dist/sekiui/p-9f2d95d7.entry.js +1 -0
- package/dist/sekiui/p-BJCq8m2o.js +1 -0
- package/dist/sekiui/p-Dfzpqq0a.js +2 -0
- package/dist/sekiui/{p-b22df79e.entry.js → p-a1a71958.entry.js} +1 -1
- package/dist/sekiui/{p-dd1e3e87.entry.js → p-a71e0c55.entry.js} +1 -1
- package/dist/sekiui/{p-1607dc4d.entry.js → p-ae227955.entry.js} +1 -1
- package/dist/sekiui/{p-cf11115c.entry.js → p-b365f5fb.entry.js} +1 -1
- package/dist/sekiui/{p-6bde807e.entry.js → p-b387a2a5.entry.js} +1 -1
- package/dist/sekiui/p-b8590f4d.entry.js +1 -0
- package/dist/sekiui/{p-88f91658.entry.js → p-c98b6d6a.entry.js} +1 -1
- package/dist/sekiui/{p-e71ad432.entry.js → p-d73cdb9a.entry.js} +1 -1
- package/dist/sekiui/{p-b10d81a6.entry.js → p-d96e770e.entry.js} +1 -1
- package/dist/sekiui/p-e62dd89b.entry.js +1 -0
- package/dist/sekiui/{p-d4c92041.entry.js → p-e7bb140c.entry.js} +1 -1
- package/dist/sekiui/{p-6e238adf.entry.js → p-eecc18f3.entry.js} +1 -1
- package/dist/sekiui/{p-4d57c6ea.entry.js → p-ff636955.entry.js} +1 -1
- package/dist/sekiui/sekiui.esm.js +1 -1
- package/dist/types/components/sidebar/seki-sidebar-content.d.ts +18 -0
- package/dist/types/components/sidebar/seki-sidebar-footer.d.ts +16 -0
- package/dist/types/components/sidebar/seki-sidebar-group.d.ts +81 -0
- package/dist/types/components/sidebar/seki-sidebar-header.d.ts +17 -0
- package/dist/types/components/sidebar/seki-sidebar-menu-item.d.ts +104 -0
- package/dist/types/components/sidebar/seki-sidebar-menu-sub.d.ts +81 -0
- package/dist/types/components/sidebar/seki-sidebar-menu.d.ts +17 -0
- package/dist/types/components/sidebar/seki-sidebar-trigger.d.ts +53 -0
- package/dist/types/components/sidebar/seki-sidebar.d.ts +185 -0
- package/dist/types/components/sidebar/types.d.ts +245 -0
- package/dist/types/components.d.ts +508 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/services/focus.d.ts +74 -0
- package/dist/types/services/index.d.ts +7 -0
- package/dist/types/services/keyboard.d.ts +74 -0
- package/dist/types/services/media-query.d.ts +121 -0
- package/dist/types/types.d.ts +105 -0
- package/dist/types/utils/a11y.d.ts +130 -0
- package/dist/types/utils/common.d.ts +142 -0
- package/package.json +2 -1
- package/dist/sekiui/p-9fe07f6e.entry.js +0 -1
- package/dist/sekiui/p-CuXbV_yz.js +0 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard Service
|
|
3
|
+
* Provides normalized keyboard event handling and shortcut management
|
|
4
|
+
* Handles cross-platform shortcuts (Ctrl/Cmd combinations)
|
|
5
|
+
*/
|
|
6
|
+
export interface KeyboardShortcut {
|
|
7
|
+
key: string;
|
|
8
|
+
ctrlKey?: boolean;
|
|
9
|
+
shiftKey?: boolean;
|
|
10
|
+
altKey?: boolean;
|
|
11
|
+
metaKey?: boolean;
|
|
12
|
+
handler: (event: Event) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface KeyboardShortcutOptions {
|
|
15
|
+
key: string;
|
|
16
|
+
ctrl?: boolean;
|
|
17
|
+
shift?: boolean;
|
|
18
|
+
alt?: boolean;
|
|
19
|
+
meta?: boolean;
|
|
20
|
+
handler: (event: KeyboardEvent) => void;
|
|
21
|
+
preventDefault?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* KeyboardService - Centralized keyboard event management
|
|
25
|
+
* Provides:
|
|
26
|
+
* - Normalized keyboard shortcuts (handles Ctrl vs Cmd on Mac)
|
|
27
|
+
* - Cross-platform shortcut registration
|
|
28
|
+
* - Event cleanup and teardown
|
|
29
|
+
*/
|
|
30
|
+
export declare class KeyboardService {
|
|
31
|
+
private shortcuts;
|
|
32
|
+
private listeners;
|
|
33
|
+
/**
|
|
34
|
+
* Register a keyboard shortcut
|
|
35
|
+
* @param id - Unique identifier for this shortcut
|
|
36
|
+
* @param options - Shortcut configuration
|
|
37
|
+
*/
|
|
38
|
+
registerShortcut(id: string, options: KeyboardShortcutOptions): void;
|
|
39
|
+
/**
|
|
40
|
+
* Register a shortcut that works with Ctrl on Windows/Linux and Cmd on Mac
|
|
41
|
+
* @param id - Unique identifier for this shortcut
|
|
42
|
+
* @param key - The key to listen for
|
|
43
|
+
* @param handler - Callback when shortcut is triggered
|
|
44
|
+
* @param preventDefault - Whether to prevent default browser behavior
|
|
45
|
+
*/
|
|
46
|
+
registerCtrlOrCmdShortcut(id: string, key: string, handler: (event: KeyboardEvent) => void, preventDefault?: boolean): void;
|
|
47
|
+
/**
|
|
48
|
+
* Unregister a keyboard shortcut
|
|
49
|
+
* @param id - The identifier of the shortcut to remove
|
|
50
|
+
*/
|
|
51
|
+
unregisterShortcut(id: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Unregister all shortcuts and clean up
|
|
54
|
+
*/
|
|
55
|
+
cleanup(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a keyboard event matches a specific key combination
|
|
58
|
+
* @param event - The keyboard event to check
|
|
59
|
+
* @param key - The key to match
|
|
60
|
+
* @param ctrl - Whether Ctrl/Cmd should be pressed
|
|
61
|
+
* @param shift - Whether Shift should be pressed
|
|
62
|
+
* @param alt - Whether Alt should be pressed
|
|
63
|
+
*/
|
|
64
|
+
matchesShortcut(event: KeyboardEvent, key: string, ctrl?: boolean, shift?: boolean, alt?: boolean): boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get the singleton KeyboardService instance
|
|
68
|
+
*/
|
|
69
|
+
export declare function getKeyboardService(): KeyboardService;
|
|
70
|
+
/**
|
|
71
|
+
* Create a new isolated KeyboardService instance
|
|
72
|
+
* Useful for testing or when you need independent event handling
|
|
73
|
+
*/
|
|
74
|
+
export declare function createKeyboardService(): KeyboardService;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media Query Service
|
|
3
|
+
* Provides utilities for responsive design and media query management
|
|
4
|
+
*/
|
|
5
|
+
export interface MediaQueryListener {
|
|
6
|
+
query: string;
|
|
7
|
+
handler: (match: boolean) => void;
|
|
8
|
+
matcher?: MediaQueryList;
|
|
9
|
+
}
|
|
10
|
+
export interface BreakpointConfig {
|
|
11
|
+
sm?: string;
|
|
12
|
+
md?: string;
|
|
13
|
+
lg?: string;
|
|
14
|
+
xl?: string;
|
|
15
|
+
'2xl'?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Default breakpoints (Tailwind-inspired)
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_BREAKPOINTS: BreakpointConfig;
|
|
21
|
+
/**
|
|
22
|
+
* MediaQueryService - Centralized media query management
|
|
23
|
+
* Provides:
|
|
24
|
+
* - Media query listener registration
|
|
25
|
+
* - Breakpoint detection
|
|
26
|
+
* - Window resize handling
|
|
27
|
+
* - Current viewport information
|
|
28
|
+
*/
|
|
29
|
+
export declare class MediaQueryService {
|
|
30
|
+
private listeners;
|
|
31
|
+
private breakpoints;
|
|
32
|
+
private resizeObserver;
|
|
33
|
+
private resizeListeners;
|
|
34
|
+
constructor(breakpoints?: BreakpointConfig);
|
|
35
|
+
/**
|
|
36
|
+
* Register a media query listener
|
|
37
|
+
* @param id - Unique identifier for this listener
|
|
38
|
+
* @param query - CSS media query string
|
|
39
|
+
* @param handler - Callback when media query matches/unmatches
|
|
40
|
+
*/
|
|
41
|
+
registerMediaQuery(id: string, query: string, handler: (match: boolean) => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* Register a breakpoint listener (easier than raw media queries)
|
|
44
|
+
* @param id - Unique identifier
|
|
45
|
+
* @param breakpoint - Breakpoint name (sm, md, lg, xl, 2xl)
|
|
46
|
+
* @param type - Type of match: 'min' (mobile-first) or 'max' (desktop-first)
|
|
47
|
+
* @param handler - Callback when breakpoint matches
|
|
48
|
+
*/
|
|
49
|
+
registerBreakpoint(id: string, breakpoint: keyof BreakpointConfig, type: ("min" | "max") | undefined, handler: (match: boolean) => void): void;
|
|
50
|
+
/**
|
|
51
|
+
* Unregister a media query listener
|
|
52
|
+
*/
|
|
53
|
+
unregisterMediaQuery(id: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a media query currently matches
|
|
56
|
+
*/
|
|
57
|
+
isMatching(query: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Check if a breakpoint is currently active
|
|
60
|
+
*/
|
|
61
|
+
isBreakpointActive(breakpoint: keyof BreakpointConfig, type?: 'min' | 'max'): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Get the current viewport width
|
|
64
|
+
*/
|
|
65
|
+
getViewportWidth(): number;
|
|
66
|
+
/**
|
|
67
|
+
* Get the current viewport height
|
|
68
|
+
*/
|
|
69
|
+
getViewportHeight(): number;
|
|
70
|
+
/**
|
|
71
|
+
* Check if viewport is mobile-sized (< 768px)
|
|
72
|
+
*/
|
|
73
|
+
isMobile(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Check if viewport is tablet-sized (768px - 1024px)
|
|
76
|
+
*/
|
|
77
|
+
isTablet(): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check if viewport is desktop-sized (>= 1024px)
|
|
80
|
+
*/
|
|
81
|
+
isDesktop(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Check if prefers-reduced-motion is enabled
|
|
84
|
+
*/
|
|
85
|
+
prefersReducedMotion(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Check if dark mode is preferred
|
|
88
|
+
*/
|
|
89
|
+
prefersDarkMode(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Get the current device orientation
|
|
92
|
+
*/
|
|
93
|
+
getOrientation(): 'portrait' | 'landscape';
|
|
94
|
+
/**
|
|
95
|
+
* Register a window resize listener
|
|
96
|
+
* @param id - Unique identifier
|
|
97
|
+
* @param handler - Callback with (width, height)
|
|
98
|
+
* @param debounceMs - Debounce delay in milliseconds
|
|
99
|
+
*/
|
|
100
|
+
registerResizeListener(id: string, handler: (width: number, height: number) => void, debounceMs?: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* Unregister a resize listener
|
|
103
|
+
*/
|
|
104
|
+
unregisterResizeListener(id: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Clean up all listeners
|
|
107
|
+
*/
|
|
108
|
+
cleanup(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Update breakpoint configuration
|
|
111
|
+
*/
|
|
112
|
+
setBreakpoints(breakpoints: BreakpointConfig): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Get the singleton MediaQueryService instance
|
|
116
|
+
*/
|
|
117
|
+
export declare function getMediaQueryService(breakpoints?: BreakpointConfig): MediaQueryService;
|
|
118
|
+
/**
|
|
119
|
+
* Create a new isolated MediaQueryService instance
|
|
120
|
+
*/
|
|
121
|
+
export declare function createMediaQueryService(breakpoints?: BreakpointConfig): MediaQueryService;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SekiUI Type Definitions
|
|
3
|
+
* Central export point for all type definitions across components and services
|
|
4
|
+
*/
|
|
5
|
+
export interface SekiButtonProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg' | 'icon-sm' | 'icon' | 'icon-lg';
|
|
8
|
+
type?: 'button' | 'submit' | 'reset';
|
|
9
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SekiFieldProps {
|
|
13
|
+
invalid?: boolean;
|
|
14
|
+
orientation?: 'vertical' | 'horizontal' | 'responsive';
|
|
15
|
+
}
|
|
16
|
+
export interface SekiInputProps {
|
|
17
|
+
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search' | 'date';
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
value?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
minLength?: number;
|
|
24
|
+
maxLength?: number;
|
|
25
|
+
pattern?: string;
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
ariaDescribedBy?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SekiSkeletonProps {
|
|
30
|
+
count?: number;
|
|
31
|
+
width?: string | number;
|
|
32
|
+
height?: string | number;
|
|
33
|
+
circle?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface SekiSwitchProps {
|
|
36
|
+
checked?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
value?: string;
|
|
40
|
+
ariaLabel?: string;
|
|
41
|
+
ariaDescribedBy?: string;
|
|
42
|
+
}
|
|
43
|
+
export type TooltipSide = 'top' | 'right' | 'bottom' | 'left';
|
|
44
|
+
export interface TooltipShowDetail {
|
|
45
|
+
side: TooltipSide;
|
|
46
|
+
}
|
|
47
|
+
export interface TooltipHideDetail {
|
|
48
|
+
side: TooltipSide;
|
|
49
|
+
}
|
|
50
|
+
export interface TooltipPositionedDetail {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
side: TooltipSide;
|
|
54
|
+
}
|
|
55
|
+
export interface CustomEventDetail {
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}
|
|
58
|
+
export type ClassValue = string | undefined | null | false | {
|
|
59
|
+
[key: string]: boolean;
|
|
60
|
+
};
|
|
61
|
+
export type DataAttributeValue = string | number | boolean | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Type guard to check if a value is a valid sidebar variant
|
|
64
|
+
*/
|
|
65
|
+
export declare function isSidebarVariant(value: any): value is 'sidebar' | 'floating' | 'inset';
|
|
66
|
+
/**
|
|
67
|
+
* Type guard to check if a value is a valid collapse mode
|
|
68
|
+
*/
|
|
69
|
+
export declare function isCollapseMode(value: any): value is 'offcanvas' | 'icon' | 'none';
|
|
70
|
+
/**
|
|
71
|
+
* Type guard to check if a value is a valid button size
|
|
72
|
+
*/
|
|
73
|
+
export declare function isButtonSize(value: any): value is 'sm' | 'md' | 'lg' | 'icon-sm' | 'icon' | 'icon-lg';
|
|
74
|
+
/**
|
|
75
|
+
* Type guard to check if a value is a valid button variant
|
|
76
|
+
*/
|
|
77
|
+
export declare function isButtonVariant(value: any): value is 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
78
|
+
/**
|
|
79
|
+
* Type guard to check if a value is a valid tooltip side
|
|
80
|
+
*/
|
|
81
|
+
export declare function isTooltipSide(value: any): value is TooltipSide;
|
|
82
|
+
/**
|
|
83
|
+
* Create a partial type (all properties optional)
|
|
84
|
+
*/
|
|
85
|
+
export type Partial<T> = {
|
|
86
|
+
[P in keyof T]?: T[P];
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Create a readonly type
|
|
90
|
+
*/
|
|
91
|
+
export type Readonly<T> = {
|
|
92
|
+
readonly [P in keyof T]: T[P];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Create a required type (all properties required)
|
|
96
|
+
*/
|
|
97
|
+
export type Required<T> = {
|
|
98
|
+
[P in keyof T]-?: T[P];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Create a record type
|
|
102
|
+
*/
|
|
103
|
+
export type Record<K extends string | number | symbol, T> = {
|
|
104
|
+
[P in K]: T;
|
|
105
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessibility Utilities
|
|
3
|
+
* Provides helpers for ARIA attributes, keyboard navigation, and accessibility features
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generate a unique ID for ARIA relationships
|
|
7
|
+
* @param prefix - Optional prefix for the ID
|
|
8
|
+
* @param suffix - Optional suffix for the ID
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateAriaId(prefix?: string, suffix?: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Set ARIA attributes on an element
|
|
13
|
+
* @param element - The element to set attributes on
|
|
14
|
+
* @param attributes - Object with attribute names and values
|
|
15
|
+
*/
|
|
16
|
+
export declare function setAriaAttributes(element: HTMLElement, attributes: Record<string, string | boolean | null>): void;
|
|
17
|
+
/**
|
|
18
|
+
* Add accessible label to an element
|
|
19
|
+
* @param element - The element to label
|
|
20
|
+
* @param label - The label text or element ID
|
|
21
|
+
* @param useAriaLabel - If true, uses aria-label; if false, uses aria-labelledby
|
|
22
|
+
*/
|
|
23
|
+
export declare function addAriaLabel(element: HTMLElement, label: string, useAriaLabel?: boolean): void;
|
|
24
|
+
/**
|
|
25
|
+
* Add accessible description to an element
|
|
26
|
+
* @param element - The element to describe
|
|
27
|
+
* @param description - The description text or element ID
|
|
28
|
+
* @param useAriaDescription - If true, uses aria-description; if false, uses aria-describedby
|
|
29
|
+
*/
|
|
30
|
+
export declare function addAriaDescription(element: HTMLElement, description: string, useAriaDescription?: boolean): void;
|
|
31
|
+
/**
|
|
32
|
+
* Set ARIA live region announcement
|
|
33
|
+
* @param element - The element to make a live region
|
|
34
|
+
* @param message - The message to announce
|
|
35
|
+
* @param politeness - 'polite' (default), 'assertive', or 'off'
|
|
36
|
+
* @param atomic - Whether to announce the entire region
|
|
37
|
+
*/
|
|
38
|
+
export declare function announceAriaLive(element: HTMLElement, message: string, politeness?: 'polite' | 'assertive' | 'off', atomic?: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Mark an element as disabled with ARIA attributes
|
|
41
|
+
* @param element - The element to mark as disabled
|
|
42
|
+
* @param disabled - Whether the element is disabled
|
|
43
|
+
*/
|
|
44
|
+
export declare function setAriaDisabled(element: HTMLElement, disabled: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* Mark an element as expanded/collapsed (for collapsible sections)
|
|
47
|
+
* @param element - The element to mark
|
|
48
|
+
* @param expanded - Whether the element is expanded
|
|
49
|
+
* @param targetId - ID of the element being controlled (optional)
|
|
50
|
+
*/
|
|
51
|
+
export declare function setAriaExpanded(element: HTMLElement, expanded: boolean, targetId?: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Mark an element as selected
|
|
54
|
+
* @param element - The element to mark
|
|
55
|
+
* @param selected - Whether the element is selected
|
|
56
|
+
*/
|
|
57
|
+
export declare function setAriaSelected(element: HTMLElement, selected: boolean): void;
|
|
58
|
+
/**
|
|
59
|
+
* Mark an element as checked (for checkboxes and radio buttons)
|
|
60
|
+
* @param element - The element to mark
|
|
61
|
+
* @param checked - The checked state ('true', 'false', or 'mixed')
|
|
62
|
+
*/
|
|
63
|
+
export declare function setAriaChecked(element: HTMLElement, checked: 'true' | 'false' | 'mixed'): void;
|
|
64
|
+
/**
|
|
65
|
+
* Set the current value of an element (for sliders, spinbuttons, etc.)
|
|
66
|
+
* @param element - The element
|
|
67
|
+
* @param current - Current value
|
|
68
|
+
* @param min - Minimum value
|
|
69
|
+
* @param max - Maximum value
|
|
70
|
+
* @param text - Optional text description of the value
|
|
71
|
+
*/
|
|
72
|
+
export declare function setAriaValueNow(element: HTMLElement, current: number, min?: number, max?: number, text?: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Mark an element as having a popup (for menus, popovers, etc.)
|
|
75
|
+
* @param element - The element with the popup trigger
|
|
76
|
+
* @param type - Type of popup: 'menu', 'listbox', 'tree', 'grid', 'dialog'
|
|
77
|
+
* @param popupId - ID of the popup element
|
|
78
|
+
*/
|
|
79
|
+
export declare function setAriaPopup(element: HTMLElement, type?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog', popupId?: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Set role for an element
|
|
82
|
+
* @param element - The element
|
|
83
|
+
* @param role - The role (button, menu, menuitem, etc.)
|
|
84
|
+
*/
|
|
85
|
+
export declare function setRole(element: HTMLElement, role: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Get the accessible name of an element
|
|
88
|
+
* Follows ARIA naming convention: aria-labelledby > aria-label > title > textContent
|
|
89
|
+
*/
|
|
90
|
+
export declare function getAccessibleName(element: HTMLElement): string;
|
|
91
|
+
/**
|
|
92
|
+
* Create a skip link for keyboard navigation
|
|
93
|
+
* @param text - Link text
|
|
94
|
+
* @param targetId - ID of element to skip to
|
|
95
|
+
*/
|
|
96
|
+
export declare function createSkipLink(text: string, targetId: string): HTMLElement;
|
|
97
|
+
/**
|
|
98
|
+
* Check if element should be hidden from screen readers
|
|
99
|
+
*/
|
|
100
|
+
export declare function isAriaHidden(element: HTMLElement): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Hide element from screen readers but keep visually visible
|
|
103
|
+
*/
|
|
104
|
+
export declare function setAriaHidden(element: HTMLElement, hidden: boolean): void;
|
|
105
|
+
/**
|
|
106
|
+
* Announce a message to screen readers immediately (without ARIA live regions)
|
|
107
|
+
* @param message - The message to announce
|
|
108
|
+
* @param politeness - 'polite' (default) or 'assertive'
|
|
109
|
+
*/
|
|
110
|
+
export declare function announceToScreenReader(message: string, politeness?: 'polite' | 'assertive'): void;
|
|
111
|
+
/**
|
|
112
|
+
* Set proper heading hierarchy
|
|
113
|
+
* @param element - The heading element
|
|
114
|
+
* @param level - Heading level (1-6)
|
|
115
|
+
*/
|
|
116
|
+
export declare function setHeadingLevel(element: HTMLElement, level: 1 | 2 | 3 | 4 | 5 | 6): void;
|
|
117
|
+
/**
|
|
118
|
+
* Enable keyboard navigation for a custom component
|
|
119
|
+
* @param element - The element that should handle keyboard
|
|
120
|
+
* @param keys - Map of key to handler function
|
|
121
|
+
*/
|
|
122
|
+
export declare function enableKeyboardNavigation(element: HTMLElement, keys: Record<string, (event: KeyboardEvent) => void>): (() => void);
|
|
123
|
+
/**
|
|
124
|
+
* Check if element has accessible focus styling
|
|
125
|
+
*/
|
|
126
|
+
export declare function hasAccessibleFocus(element: HTMLElement): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Ensure focus visible styling (for focus-visible pseudo-class)
|
|
129
|
+
*/
|
|
130
|
+
export declare function ensureFocusVisible(element: HTMLElement): void;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common Utilities
|
|
3
|
+
* Shared utility functions used across the component library
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generate a unique ID with optional prefix
|
|
7
|
+
* @param prefix - Optional prefix for the ID (default: 'id')
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateUniqueId(prefix?: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Reset ID counter (useful for testing)
|
|
12
|
+
*/
|
|
13
|
+
export declare function resetIdCounter(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Debounce a function
|
|
16
|
+
* @param fn - Function to debounce
|
|
17
|
+
* @param delay - Delay in milliseconds
|
|
18
|
+
*/
|
|
19
|
+
export declare function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Throttle a function
|
|
22
|
+
* @param fn - Function to throttle
|
|
23
|
+
* @param delay - Delay in milliseconds
|
|
24
|
+
*/
|
|
25
|
+
export declare function throttle<T extends (...args: any[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Add a class to an element
|
|
28
|
+
* @param element - The element
|
|
29
|
+
* @param className - Class name to add
|
|
30
|
+
*/
|
|
31
|
+
export declare function addClass(element: HTMLElement, className: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Remove a class from an element
|
|
34
|
+
* @param element - The element
|
|
35
|
+
* @param className - Class name to remove
|
|
36
|
+
*/
|
|
37
|
+
export declare function removeClass(element: HTMLElement, className: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Toggle a class on an element
|
|
40
|
+
* @param element - The element
|
|
41
|
+
* @param className - Class name to toggle
|
|
42
|
+
* @param force - Optional force add/remove
|
|
43
|
+
*/
|
|
44
|
+
export declare function toggleClass(element: HTMLElement, className: string, force?: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* Check if element has a class
|
|
47
|
+
* @param element - The element
|
|
48
|
+
* @param className - Class name to check
|
|
49
|
+
*/
|
|
50
|
+
export declare function hasClass(element: HTMLElement, className: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Get all data attributes from an element as an object
|
|
53
|
+
*/
|
|
54
|
+
export declare function getDataAttributes(element: HTMLElement): Record<string, string | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* Set a data attribute on an element
|
|
57
|
+
* @param element - The element
|
|
58
|
+
* @param key - Data attribute name (without 'data-' prefix)
|
|
59
|
+
* @param value - The value to set
|
|
60
|
+
*/
|
|
61
|
+
export declare function setDataAttribute(element: HTMLElement, key: string, value: string | null): void;
|
|
62
|
+
/**
|
|
63
|
+
* Get the value of a data attribute
|
|
64
|
+
* @param element - The element
|
|
65
|
+
* @param key - Data attribute name (without 'data-' prefix)
|
|
66
|
+
*/
|
|
67
|
+
export declare function getDataAttribute(element: HTMLElement, key: string): string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Dispatch a custom event from an element
|
|
70
|
+
* @param element - The element to dispatch from
|
|
71
|
+
* @param eventName - Name of the custom event
|
|
72
|
+
* @param detail - Optional detail object to include in the event
|
|
73
|
+
*/
|
|
74
|
+
export declare function dispatchCustomEvent<T = any>(element: HTMLElement | Document | Window, eventName: string, detail?: T): void;
|
|
75
|
+
/**
|
|
76
|
+
* Listen for a custom event
|
|
77
|
+
* @param element - The element to listen on
|
|
78
|
+
* @param eventName - Name of the custom event
|
|
79
|
+
* @param handler - Callback function
|
|
80
|
+
* @returns Cleanup function to remove listener
|
|
81
|
+
*/
|
|
82
|
+
export declare function onCustomEvent<T = any>(element: HTMLElement | Document | Window, eventName: string, handler: (detail: T) => void): () => void;
|
|
83
|
+
/**
|
|
84
|
+
* Get the offset position of an element relative to the viewport
|
|
85
|
+
*/
|
|
86
|
+
export declare function getElementOffset(element: HTMLElement): {
|
|
87
|
+
top: number;
|
|
88
|
+
left: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Check if an element is in the viewport
|
|
92
|
+
*/
|
|
93
|
+
export declare function isElementInViewport(element: HTMLElement): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Scroll element into view
|
|
96
|
+
* @param element - The element to scroll into view
|
|
97
|
+
* @param options - Scroll behavior options
|
|
98
|
+
*/
|
|
99
|
+
export declare function scrollIntoView(element: HTMLElement, options?: ScrollIntoViewOptions): void;
|
|
100
|
+
/**
|
|
101
|
+
* Get computed style value
|
|
102
|
+
*/
|
|
103
|
+
export declare function getComputedValue(element: HTMLElement, property: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* Wait for a specific time
|
|
106
|
+
* @param ms - Time in milliseconds
|
|
107
|
+
*/
|
|
108
|
+
export declare function wait(ms: number): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Wait for an element to appear in the DOM
|
|
111
|
+
* @param selector - CSS selector to wait for
|
|
112
|
+
* @param timeout - Timeout in milliseconds (default: 5000)
|
|
113
|
+
*/
|
|
114
|
+
export declare function waitForElement(selector: string, timeout?: number): Promise<HTMLElement>;
|
|
115
|
+
/**
|
|
116
|
+
* Clone an object deeply
|
|
117
|
+
*/
|
|
118
|
+
export declare function deepClone<T>(obj: T): T;
|
|
119
|
+
/**
|
|
120
|
+
* Merge objects
|
|
121
|
+
*/
|
|
122
|
+
export declare function mergeObjects<T extends Record<string, any>>(target: T, ...sources: Partial<T>[]): T;
|
|
123
|
+
/**
|
|
124
|
+
* Get the prefixed CSS property name (for vendor prefixes)
|
|
125
|
+
*/
|
|
126
|
+
export declare function getPrefixedProperty(property: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* Check if browser supports a CSS feature
|
|
129
|
+
*/
|
|
130
|
+
export declare function supportsCSSFeature(property: string, value: string): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Request animation frame with promise
|
|
133
|
+
*/
|
|
134
|
+
export declare function requestAnimationFramePromise(): Promise<number>;
|
|
135
|
+
/**
|
|
136
|
+
* Convert camelCase to kebab-case
|
|
137
|
+
*/
|
|
138
|
+
export declare function camelToKebab(str: string): string;
|
|
139
|
+
/**
|
|
140
|
+
* Convert kebab-case to camelCase
|
|
141
|
+
*/
|
|
142
|
+
export declare function kebabToCamel(str: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekiui/elements",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"description": "Modern, accessible Web Components with shadcn/ui-inspired design",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"jest-cli": "^29.7.0",
|
|
55
55
|
"lit": "^3.3.1",
|
|
56
56
|
"prettier": "^3.6.2",
|
|
57
|
+
"puppeteer": "^20.9.0",
|
|
57
58
|
"storybook": "^9.1.10"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{SekiSwitch as seki_switch}from"./index.esm.js";import"./p-CuXbV_yz.js";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=()=>{};var t=Object.defineProperty,s=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},i=(e,t)=>{t&&(e.__stencil__getHostRef=()=>t,t.t=e)},r=(e,t)=>t in e,n=(e,t)=>(0,console.error)(e,t),o=new Map,l=new Map,a="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",c=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],k="undefined"!=typeof window?window:{},d={i:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,i)=>e.addEventListener(t,s,i),rel:(e,t,s,i)=>e.removeEventListener(t,s,i),ce:(e,t)=>new CustomEvent(e,t)},p=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!!h&&(()=>!!k.document&&Object.getOwnPropertyDescriptor(k.document.adoptedStyleSheets,"length").writable)(),f=!1,g=[],b=[],v=(e,t)=>s=>{e.push(s),f||(f=!0,t&&4&d.i?w(x):d.raf(x))},y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){n(e)}e.length=0},x=()=>{y(g),y(b),(f=g.length>0)&&d.raf(x)},w=e=>p().then(e),$=v(b,!0),S=e=>"object"==(e=typeof e)||"function"===e;function j(e){var t,s,i;return null!=(i=null==(s=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:s.getAttribute("content"))?i:void 0}((e,s)=>{for(var i in s)t(e,i,{get:s[i],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>O,unwrap:()=>z,unwrapErr:()=>R});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const s=t(e.value);return s instanceof Promise?s.then((e=>O(e))):O(s)}if(e.isErr)return C(e.value);throw"should never get here"}var E,z=e=>{if(e.isOk)return e.value;throw e.value},R=e=>{if(e.isErr)return e.value;throw e.value};function P(){var e;const t=this.attachShadow({mode:"open"});void 0===E&&(E=null!=(e=function(){if(!h)return;const e=new CSSStyleSheet;return e.replaceSync(":host{--seki-neutral-50:hsl(0, 0%, 98%);--seki-neutral-100:hsl(0, 0%, 96.1%);--seki-neutral-200:hsl(0, 0%, 89.8%);--seki-neutral-300:hsl(0, 0%, 83.1%);--seki-neutral-400:hsl(0, 0%, 63.9%);--seki-neutral-500:hsl(0, 0%, 45.1%);--seki-neutral-600:hsl(0, 0%, 32.2%);--seki-neutral-700:hsl(0, 0%, 25.1%);--seki-neutral-800:hsl(0, 0%, 14.9%);--seki-neutral-900:hsl(0, 0%, 9%);--seki-neutral-950:hsl(0, 0%, 3.9%);--seki-primary-50:hsl(210, 100%, 97%);--seki-primary-100:hsl(210, 95%, 93%);--seki-primary-200:hsl(210, 95%, 85%);--seki-primary-300:hsl(210, 90%, 73%);--seki-primary-400:hsl(210, 85%, 58%);--seki-primary-500:hsl(210, 80%, 48%);--seki-primary-600:hsl(210, 75%, 40%);--seki-primary-700:hsl(210, 70%, 32%);--seki-primary-800:hsl(210, 65%, 25%);--seki-primary-900:hsl(210, 60%, 18%);--seki-primary-950:hsl(210, 55%, 10%);--seki-success-500:hsl(142, 71%, 45%);--seki-success-600:hsl(142, 71%, 35%);--seki-warning-500:hsl(38, 92%, 50%);--seki-warning-600:hsl(38, 92%, 40%);--seki-destructive-500:hsl(0, 84.2%, 60.2%);--seki-destructive-600:hsl(0, 72%, 41%)}:host{--seki-background:hsl(0, 0%, 100%);--seki-foreground:hsl(0, 0%, 3.9%);--seki-muted:hsl(0, 0%, 96.1%);--seki-muted-foreground:hsl(0, 0%, 45.1%);--seki-card:hsl(0, 0%, 100%);--seki-card-foreground:hsl(0, 0%, 3.9%);--seki-popover:hsl(0, 0%, 100%);--seki-popover-foreground:hsl(0, 0%, 3.9%);--seki-border:hsl(0, 0%, 89.8%);--seki-input:hsl(0, 0%, 89.8%);--seki-primary:hsl(0, 0%, 9%);--seki-primary-foreground:hsl(0, 0%, 98%);--seki-secondary:hsl(0, 0%, 96.1%);--seki-secondary-foreground:hsl(0, 0%, 9%);--seki-accent:hsl(0, 0%, 96.1%);--seki-accent-foreground:hsl(0, 0%, 9%);--seki-destructive:hsl(0, 84.2%, 60.2%);--seki-destructive-foreground:hsl(0, 0%, 98%);--seki-ring:hsl(0, 0%, 3.9%);--seki-bg-primary:var(--seki-background);--seki-bg-secondary:var(--seki-muted);--seki-bg-tertiary:var(--seki-accent);--seki-text-primary:var(--seki-foreground);--seki-text-secondary:var(--seki-muted-foreground);--seki-text-tertiary:var(--seki-neutral-400);--seki-border-default:var(--seki-border);--seki-border-emphasis:var(--seki-neutral-300)}:host([data-theme='dark']){--seki-background:hsl(0, 0%, 3.9%);--seki-foreground:hsl(0, 0%, 98%);--seki-muted:hsl(0, 0%, 14.9%);--seki-muted-foreground:hsl(0, 0%, 63.9%);--seki-card:hsl(0, 0%, 3.9%);--seki-card-foreground:hsl(0, 0%, 98%);--seki-popover:hsl(0, 0%, 3.9%);--seki-popover-foreground:hsl(0, 0%, 98%);--seki-border:hsl(0, 0%, 14.9%);--seki-input:hsl(0, 0%, 14.9%);--seki-primary:hsl(0, 0%, 98%);--seki-primary-foreground:hsl(0, 0%, 9%);--seki-secondary:hsl(0, 0%, 14.9%);--seki-secondary-foreground:hsl(0, 0%, 98%);--seki-accent:hsl(0, 0%, 14.9%);--seki-accent-foreground:hsl(0, 0%, 98%);--seki-destructive:hsl(0, 62.8%, 30.6%);--seki-destructive-foreground:hsl(0, 0%, 98%);--seki-ring:hsl(0, 0%, 83.1%);--seki-bg-primary:var(--seki-background);--seki-bg-secondary:var(--seki-muted);--seki-bg-tertiary:var(--seki-accent);--seki-text-primary:var(--seki-foreground);--seki-text-secondary:var(--seki-muted-foreground);--seki-text-tertiary:var(--seki-neutral-600);--seki-border-default:var(--seki-border);--seki-border-emphasis:var(--seki-neutral-700);--seki-button-primary-hover-bg:hsl(0, 0%, 98%, 0.9);--seki-button-secondary-hover-bg:hsl(0, 0%, 14.9%, 0.8)}:host{--seki-button-primary-bg:var(--seki-primary);--seki-button-primary-text:var(--seki-primary-foreground);--seki-button-primary-border:transparent;--seki-button-primary-hover-bg:hsl(0, 0%, 9%, 0.9);--seki-button-primary-hover-text:var(--seki-primary-foreground);--seki-button-primary-hover-border:transparent;--seki-button-secondary-bg:var(--seki-secondary);--seki-button-secondary-text:var(--seki-secondary-foreground);--seki-button-secondary-border:transparent;--seki-button-secondary-hover-bg:hsl(0, 0%, 96.1%, 0.8);--seki-button-secondary-hover-text:var(--seki-secondary-foreground);--seki-button-secondary-hover-border:transparent;--seki-button-outline-bg:transparent;--seki-button-outline-text:var(--seki-foreground);--seki-button-outline-border:var(--seki-input);--seki-button-outline-hover-bg:var(--seki-accent);--seki-button-outline-hover-text:var(--seki-accent-foreground);--seki-button-outline-hover-border:var(--seki-input);--seki-button-ghost-bg:transparent;--seki-button-ghost-text:var(--seki-foreground);--seki-button-ghost-border:transparent;--seki-button-ghost-hover-bg:var(--seki-accent);--seki-button-ghost-hover-text:var(--seki-accent-foreground);--seki-button-ghost-hover-border:transparent;--seki-button-destructive-bg:var(--seki-destructive);--seki-button-destructive-text:var(--seki-destructive-foreground);--seki-button-destructive-border:transparent;--seki-button-destructive-hover-bg:hsl(0, 84.2%, 60.2%, 0.9);--seki-button-destructive-hover-border:transparent;--seki-button-sm-padding-x:var(--seki-spacing-3, 0.75rem);--seki-button-sm-padding-y:0.375rem;--seki-button-sm-font-size:var(--seki-text-sm, 0.875rem);--seki-button-sm-height:2.25rem;--seki-button-md-padding-x:var(--seki-spacing-4, 1rem);--seki-button-md-padding-y:var(--seki-spacing-2, 0.5rem);--seki-button-md-font-size:var(--seki-text-base, 1rem);--seki-button-md-height:2.5rem;--seki-button-lg-padding-x:2rem;--seki-button-lg-padding-y:0.5rem;--seki-button-lg-font-size:1rem;--seki-button-lg-height:2.75rem;--seki-button-icon-sm-size:2rem;--seki-button-icon-size:2.5rem;--seki-button-icon-lg-size:3rem;--seki-button-icon-gap:0.5rem;--seki-button-link-bg:transparent;--seki-button-link-text:var(--seki-primary);--seki-button-link-border:transparent;--seki-button-link-hover-bg:transparent;--seki-button-link-hover-text:var(--seki-primary);--seki-button-link-hover-border:transparent;--seki-button-radius:var(--seki-radius-md, 0.375rem);--seki-button-font-weight:var(--seki-font-medium, 500);--seki-button-transition-duration:150ms;--seki-button-transition-timing:ease-in-out;--seki-button-shadow:var(--seki-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));--seki-button-shadow-hover:var(--seki-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));--seki-button-disabled-opacity:0.5;--seki-input-bg:var(--seki-background);--seki-input-border:var(--seki-border);--seki-input-text:var(--seki-foreground);--seki-input-placeholder:var(--seki-muted-foreground);--seki-input-ring:var(--seki-ring);--seki-input-invalid-border:var(--seki-destructive);--seki-input-invalid-ring:var(--seki-destructive);--seki-input-disabled-opacity:0.5;--seki-input-radius:var(--seki-radius-md);--seki-input-ring-offset:2px;--seki-select-trigger-bg:var(--seki-background);--seki-select-trigger-border:1px solid var(--seki-border);--seki-select-trigger-bg-hover:var(--seki-muted);--seki-select-trigger-radius:var(--seki-radius-md);--seki-select-trigger-min-height:2.5rem;--seki-select-trigger-padding:0.5rem 0.75rem;--seki-select-trigger-gap:0.5rem;--seki-select-content-bg:var(--seki-popover);--seki-select-content-border:1px solid var(--seki-border);--seki-select-content-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1);--seki-select-content-radius:var(--seki-radius-md);--seki-select-content-padding:0.5rem 0;--seki-select-option-padding:0.5rem 0.75rem;--seki-select-option-gap:0.5rem;--seki-select-option-radius:var(--seki-radius-sm);--seki-select-option-bg-hover:var(--seki-muted);--seki-select-option-bg-selected:var(--seki-muted);--seki-select-group-label-padding:0.5rem 0.75rem;--seki-select-group-label-font-size:var(--seki-font-size-xs);--seki-select-group-label-font-weight:var(--seki-font-semibold);--seki-select-group-label-color:var(--seki-muted-foreground);--seki-select-group-separator:1px solid var(--seki-border)}:host{--seki-spacing-0:0;--seki-spacing-0-5:0.125rem;--seki-spacing-1:0.25rem;--seki-spacing-1-5:0.375rem;--seki-spacing-2:0.5rem;--seki-spacing-2-5:0.625rem;--seki-spacing-3:0.75rem;--seki-spacing-3-5:0.875rem;--seki-spacing-4:1rem;--seki-spacing-5:1.25rem;--seki-spacing-6:1.5rem;--seki-spacing-8:2rem;--seki-spacing-10:2.5rem;--seki-spacing-12:3rem;--seki-spacing-16:4rem;--seki-spacing-20:5rem;--seki-spacing-24:6rem;--seki-input-height-sm:2rem;--seki-input-height-md:2.5rem;--seki-input-height-lg:3rem;--seki-input-padding-x:0.75rem;--seki-input-padding-y:0.5rem;--seki-input-font-size:0.875rem;--seki-input-ring-offset:2px}:host{--seki-shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);--seki-shadow-md:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--seki-shadow-lg:0 10px 15px -3px rgb(0 0 0 / 0.15), 0 4px 6px -4px rgb(0 0 0 / 0.1)}:host{--seki-font-sans:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',\n Arial, sans-serif;--seki-font-mono:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;--seki-text-xs:0.75rem;--seki-text-sm:0.875rem;--seki-text-base:1rem;--seki-text-lg:1.125rem;--seki-text-xl:1.25rem;--seki-text-2xl:1.5rem;--seki-text-3xl:1.875rem;--seki-text-4xl:2.25rem;--seki-font-normal:400;--seki-font-medium:500;--seki-font-semibold:600;--seki-font-bold:700;--seki-leading-tight:1.25;--seki-leading-normal:1.5;--seki-leading-relaxed:1.75}:host{--seki-radius-sm:0.25rem;--seki-radius-md:0.375rem;--seki-radius-lg:0.5rem;--seki-radius-xl:1rem;}"),e}())?e:null),E&&(m?t.adoptedStyleSheets.push(E):t.adoptedStyleSheets=[...t.adoptedStyleSheets,E])}var N=new WeakMap,A=e=>"sc-"+e.l,D=(e,t,...s)=>{let i=null,r=null,n=!1,o=!1;const l=[],a=t=>{for(let s=0;s<t.length;s++)i=t[s],Array.isArray(i)?a(i):null!=i&&"boolean"!=typeof i&&((n="function"!=typeof e&&!S(i))&&(i+=""),n&&o?l[l.length-1].u+=i:l.push(n?U(null,i):i),o=n)};if(a(s),t){t.key&&(r=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=U(e,null);return u.k=t,l.length>0&&(u.p=l),u.h=r,u},U=(e,t)=>({i:0,m:e,u:t,v:null,p:null,k:null,h:null}),F={},W=e=>{const t=(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};W("::slotted"),W(":host"),W(":host-context");var H,L=(e,t,s)=>null==e||S(e)?e:4&t?(s&&"string"==typeof e||"false"!==e)&&(""===e||!!e):2&t?"string"==typeof e?parseFloat(e):"number"==typeof e?e:NaN:1&t?e+"":e,T=e=>{var t;return null==(t=s(e))?void 0:t.$hostElement$},V=(e,t)=>{const s=T(e);return{emit:e=>q(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:e})}},q=(e,t,s)=>{const i=d.ce(t,s);return e.dispatchEvent(i),i},I=(e,t,s,i,n,o)=>{if(s===i)return;let l=r(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,r=G(s);let n=G(i);t.remove(...r.filter((e=>e&&!n.includes(e)))),t.add(...n.filter((e=>e&&!r.includes(e))))}else if("style"===t){for(const t in s)i&&null!=i[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in i)s&&i[t]===s[t]||(t.includes("-")?e.style.setProperty(t,i[t]):e.style[t]=i[t])}else if("key"===t);else if("ref"===t)i&&i(e);else if(l||"o"!==t[0]||"n"!==t[1]){const r=S(i);if((l||r&&null!==i)&&!n)try{if(e.tagName.includes("-"))e[t]!==i&&(e[t]=i);else{const r=null==i?"":i;"list"===t?l=!1:null!=s&&e[t]==r||("function"==typeof e.__lookupSetter__(t)?e[t]=r:e.setAttribute(t,r))}}catch(e){}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),null==i||!1===i?!1===i&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(u,t):e.removeAttribute(t)):(!l||4&o||n)&&!r&&1===e.nodeType&&(i=!0===i?"":i,c?e.setAttributeNS(u,t,i):e.setAttribute(t,i))}else if(t="-"===t[2]?t.slice(3):r(k,a)?a.slice(2):a[2]+t.slice(3),s||i){const r=t.endsWith(Y);t=t.replace(_,""),s&&d.rel(e,t,s,r),i&&d.ael(e,t,i,r)}},B=/\s/,G=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(B):[]),Y="Capture",_=RegExp(Y+"$"),J=(e,t,s)=>{const i=11===t.v.nodeType&&t.v.host?t.v.host:t.v,r=e&&e.k||{},n=t.k||{};for(const e of K(Object.keys(r)))e in n||I(i,e,r[e],void 0,s,t.i);for(const e of K(Object.keys(n)))I(i,e,r[e],n[e],s,t.i)};function K(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var Q=!1,X=(e,t,s)=>{const i=t.p[s];let r,n,o=0;if(null!==i.u)r=i.v=k.document.createTextNode(i.u);else{if(Q||(Q="svg"===i.m),!k.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(r=i.v=k.document.createElementNS(Q?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.m),Q&&"foreignObject"===i.m&&(Q=!1),J(null,i,Q),i.p)for(o=0;o<i.p.length;++o)n=X(e,i,o),n&&r.appendChild(n);"svg"===i.m?Q=!1:"foreignObject"===r.tagName&&(Q=!0)}return r["s-hn"]=H,r},Z=(e,t,s,i,r,n)=>{let o,l=e;for(l.shadowRoot&&l.tagName===H&&(l=l.shadowRoot);r<=n;++r)i[r]&&(o=X(null,s,r),o&&(i[r].v=o,re(l,o,t)))},ee=(e,t,s)=>{for(let i=t;i<=s;++i){const t=e[i];if(t){const e=t.v;ie(t),e&&e.remove()}}},te=(e,t,s=!1)=>e.m===t.m&&(s?(s&&!e.h&&t.h&&(e.h=t.h),!0):e.h===t.h),se=(e,t,s=!1)=>{const i=t.v=e.v,r=e.p,n=t.p,o=t.m,l=t.u;null===l?(J(e,t,Q="svg"===o||"foreignObject"!==o&&Q),null!==r&&null!==n?((e,t,s,i,r=!1)=>{let n,o,l=0,a=0,u=0,c=0,k=t.length-1,d=t[0],p=t[k],h=i.length-1,m=i[0],f=i[h];for(;l<=k&&a<=h;)if(null==d)d=t[++l];else if(null==p)p=t[--k];else if(null==m)m=i[++a];else if(null==f)f=i[--h];else if(te(d,m,r))se(d,m,r),d=t[++l],m=i[++a];else if(te(p,f,r))se(p,f,r),p=t[--k],f=i[--h];else if(te(d,f,r))se(d,f,r),re(e,d.v,p.v.nextSibling),d=t[++l],f=i[--h];else if(te(p,m,r))se(p,m,r),re(e,p.v,d.v),p=t[--k],m=i[++a];else{for(u=-1,c=l;c<=k;++c)if(t[c]&&null!==t[c].h&&t[c].h===m.h){u=c;break}u>=0?(o=t[u],o.m!==m.m?n=X(t&&t[a],s,u):(se(o,m,r),t[u]=void 0,n=o.v),m=i[++a]):(n=X(t&&t[a],s,a),m=i[++a]),n&&re(d.v.parentNode,n,d.v)}l>k?Z(e,null==i[h+1]?null:i[h+1].v,s,i,a,h):a>h&&ee(t,l,k)})(i,r,t,n,s):null!==n?(null!==e.u&&(i.textContent=""),Z(i,null,t,n,0,n.length-1)):!s&&null!==r&&ee(r,0,r.length-1),Q&&"svg"===o&&(Q=!1)):e.u!==l&&(i.data=l)},ie=e=>{e.k&&e.k.ref&&e.k.ref(null),e.p&&e.p.map(ie)},re=(e,t,s)=>null==e?void 0:e.insertBefore(t,s),ne=(e,t)=>{if(t&&!e.$&&t["s-p"]){const s=t["s-p"].push(new Promise((i=>e.$=()=>{t["s-p"].splice(s-1,1),i()})))}},oe=(e,t)=>{if(e.i|=16,4&e.i)return void(e.i|=512);ne(e,e.S);const s=()=>le(e,t);if(!t)return $(s);queueMicrotask((()=>{s()}))},le=(e,t)=>{const s=e.$hostElement$,i=e.t;if(!i)throw Error(`Can't render component <${s.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let r;return t?(e.i|=256,e.j&&(e.j.map((([e,t])=>he(i,e,t,s))),e.j=void 0),e.O.length&&e.O.forEach((e=>e(s))),r=he(i,"componentWillLoad",void 0,s)):r=he(i,"componentWillUpdate",void 0,s),r=ae(r,(()=>he(i,"componentWillRender",void 0,s))),ae(r,(()=>ce(e,i,t)))},ae=(e,t)=>ue(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ue=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ce=async(e,t,s)=>{var i;const r=e.$hostElement$,n=r["s-rc"];s&&(e=>{const t=e.C,s=e.$hostElement$,i=t.i,r=((e,t)=>{var s;const i=A(t),r=l.get(i);if(!k.document)return i;if(e=11===e.nodeType?e:k.document,r)if("string"==typeof r){let n,o=N.get(e=e.head||e);if(o||N.set(e,o=new Set),!o.has(i)){{n=k.document.createElement("style"),n.innerHTML=r;const i=null!=(s=d.M)?s:j(k.document);if(null!=i&&n.setAttribute("nonce",i),!(1&t.i))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),s=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(n,(null==s?void 0:s.parentNode)===e?s:null)}else if("host"in e)if(h){const t=new CSSStyleSheet;t.replaceSync(r),m?e.adoptedStyleSheets.unshift(t):e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=r+t.innerHTML:e.prepend(n)}else e.append(n);1&t.i&&e.insertBefore(n,null)}4&t.i&&(n.innerHTML+=a),o&&o.add(i)}}else e.adoptedStyleSheets.includes(r)||(m?e.adoptedStyleSheets.push(r):e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]);return i})(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);10&i&&(s["s-sc"]=r,s.classList.add(r+"-h"))})(e);ke(e,t,r,s),n&&(n.map((e=>e())),r["s-rc"]=void 0);{const t=null!=(i=r["s-p"])?i:[],s=()=>de(e);0===t.length?s():(Promise.all(t).then(s),e.i|=4,t.length=0)}},ke=(e,t,s,i)=>{try{t=t.render(),e.i&=-17,e.i|=2,((e,t,s=!1)=>{const i=e.$hostElement$,r=e.C,n=e.R||U(null,null),o=(e=>e&&e.m===F)(t)?t:D(null,null,t);if(H=i.tagName,r.P&&(o.k=o.k||{},r.P.forEach((([e,t])=>{o.k[t]=i[e]}))),s&&o.k)for(const e of Object.keys(o.k))i.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(o.k[e]=i[e]);o.m=null,o.i|=4,e.R=o,o.v=n.v=i.shadowRoot||i,se(n,o,s)})(e,t,i)}catch(t){n(t,e.$hostElement$)}return null},de=e=>{const t=e.$hostElement$,s=e.t,i=e.S;he(s,"componentDidRender",void 0,t),64&e.i?he(s,"componentDidUpdate",void 0,t):(e.i|=64,me(t),he(s,"componentDidLoad",void 0,t),e.N(t),i||pe()),e.A(t),e.$&&(e.$(),e.$=void 0),512&e.i&&w((()=>oe(e,!1))),e.i&=-517},pe=()=>{w((()=>q(k,"appload",{detail:{namespace:"sekiui"}})))},he=(e,t,s,i)=>{if(e&&e[t])try{return e[t](s)}catch(e){n(e,i)}},me=e=>e.classList.add("hydrated"),fe=(e,t,i,r)=>{const o=s(e);if(!o)return;if(!o)throw Error(`Couldn't find host element for "${r.l}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const l=o.$hostElement$,a=o.D.get(t),u=o.i,c=o.t;if(i=L(i,r.U[t][0],!!(64&r.i)),(!(8&u)||void 0===a)&&i!==a&&(!Number.isNaN(a)||!Number.isNaN(i))&&(o.D.set(t,i),c)){if(r.F&&128&u){const e=r.F[t];e&&e.map((e=>{try{c[e](i,a,t)}catch(e){n(e,l)}}))}if(2==(18&u)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(i,a,t))return;oe(o,!1)}}},ge=(e,t,i)=>{var r,n;const o=e.prototype;64&t.i&&1&i&&c.forEach((e=>{Object.defineProperty(o,e,{value(...t){var i;const r=s(this),n=null==r?void 0:r.t;if(n){const s=n[e];"function"==typeof s&&s.call(n,...t)}else null==(i=null==r?void 0:r.W)||i.then((s=>{const i=s[e];"function"==typeof i&&i.call(s,...t)}))}})}));{e.watchers&&!t.F&&(t.F=e.watchers),e.deserializers&&!t.H&&(t.H=e.deserializers),e.serializers&&!t.L&&(t.L=e.serializers);const l=Object.entries(null!=(r=t.U)?r:{});if(l.map((([e,[r]])=>{if(31&r||2&i&&32&r){const{get:n,set:l}=Object.getOwnPropertyDescriptor(o,e)||{};n&&(t.U[e][0]|=2048),l&&(t.U[e][0]|=4096),(1&i||!n)&&Object.defineProperty(o,e,{get(){{if(!(2048&t.U[e][0]))return((e,t)=>s(this).D.get(t))(0,e);const i=s(this),r=i?i.t:o;if(!r)return;return r[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(o,e,{set(n){const o=s(this);if(o){if(l)return void 0===(32&r?this[e]:o.$hostElement$[e])&&o.D.get(e)&&(n=o.D.get(e)),l.call(this,L(n,r,!!(64&t.i))),void fe(this,e,n=32&r?this[e]:o.$hostElement$[e],t);{if(!(1&i&&4096&t.U[e][0]))return fe(this,e,n,t),void(1&i&&!o.t&&o.O.push((()=>{4096&t.U[e][0]&&o.t[e]!==o.D.get(e)&&(o.t[e]=n)})));const s=()=>{const s=o.t[e];!o.D.get(e)&&s&&o.D.set(e,s),o.t[e]=L(n,r,!!(64&t.i)),fe(this,e,o.t[e],t)};o.t?s():o.O.push((()=>{s()}))}}}})}else 1&i&&64&r&&Object.defineProperty(o,e,{value(...t){var i;const r=s(this);return null==(i=null==r?void 0:r.T)?void 0:i.then((()=>{var s;return null==(s=r.t)?void 0:s[e](...t)}))}})})),1&i){const i=new Map;o.attributeChangedCallback=function(e,r,n){d.jmp((()=>{var l;const a=i.get(e),u=s(this);if(this.hasOwnProperty(a)&&(n=this[a],delete this[a]),o.hasOwnProperty(a)&&"number"==typeof this[a]&&this[a]==n)return;if(null==a){const s=null==u?void 0:u.i;if(u&&s&&!(8&s)&&128&s&&n!==r){const s=u.t,i=null==(l=t.F)?void 0:l[e];null==i||i.forEach((t=>{null!=s[t]&&s[t].call(s,n,r,e)}))}return}const c=Object.getOwnPropertyDescriptor(o,a);(n=(null!==n||"boolean"!=typeof this[a])&&n)==this[a]||c.get&&!c.set||(this[a]=n)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(n=t.F)?n:{}),...l.filter((([e,t])=>31&t[0])).map((([e,s])=>{var r;const n=s[1]||e;return i.set(n,e),512&s[0]&&(null==(r=t.P)||r.push([e,n])),n}))]))}}return e},be=(e,t)=>{he(e,"connectedCallback",void 0,t)},ve=(e,t)=>{he(e,"disconnectedCallback",void 0,t||e)},ye=(e,t={})=>{var i;if(!k.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const r=[],u=t.exclude||[],c=k.customElements,p=k.document.head,m=p.querySelector("meta[charset]"),f=k.document.createElement("style"),g=[];let b,v=!0;Object.assign(d,t),d.o=new URL(t.resourcesUrl||"./",k.document.baseURI).href;let y=!1;if(e.map((e=>{e[1].map((t=>{var i,a,k;const p={i:t[0],l:t[1],U:t[2],V:t[3]};4&p.i&&(y=!0),p.U=t[2],p.V=t[3],p.P=[],p.F=null!=(i=t[4])?i:{},p.L=null!=(a=t[5])?a:{},p.H=null!=(k=t[6])?k:{};const m=p.l,f=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,t)=>{const s={i:0,$hostElement$:e,C:t,D:new Map,q:new Map};s.T=new Promise((e=>s.A=e)),s.W=new Promise((e=>s.N=e)),e["s-p"]=[],e["s-rc"]=[],s.O=[];const i=s;e.__stencil__getHostRef=()=>i})(e=this,p),1&p.i)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.l}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else P.call(e,p)}connectedCallback(){const e=s(this);e&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,xe(this,e,p.V)),b&&(clearTimeout(b),b=null),v?g.push(this):d.jmp((()=>(e=>{if(!(1&d.i)){const t=s(e);if(!t)return;const i=t.C,r=()=>{};if(1&t.i)xe(e,t,i.V),(null==t?void 0:t.t)?be(t.t,e):(null==t?void 0:t.W)&&t.W.then((()=>be(t.t,e)));else{t.i|=1;{let s=e;for(;s=s.parentNode||s.host;)if(s["s-p"]){ne(t,t.S=s);break}}i.U&&Object.entries(i.U).map((([t,[s]])=>{if(31&s&&t in e&&e[t]!==Object.prototype[t]){const s=e[t];delete e[t],e[t]=s}})),(async(e,t,s)=>{let i;if(!(32&t.i)){if(t.i|=32,s.I){const r=((e,t)=>{const s=e.l.replace(/-/g,"_"),i=e.I;if(!i)return;const r=o.get(i);return r?r[s]:import(`./${i}.entry.js`).then((e=>(o.set(i,e),e[s])),(e=>{n(e,t.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(s,t);if(r&&"then"in r){const e=()=>{};i=await r,e()}else i=r;if(!i)throw Error(`Constructor for "${s.l}#${t.B}" was not found`);i.isProxied||(s.F=i.watchers,s.L=i.serializers,s.H=i.deserializers,ge(i,s,2),i.isProxied=!0);const l=()=>{};t.i|=8;try{new i(t)}catch(t){n(t,e)}t.i&=-9,t.i|=128,l(),be(t.t,e)}else i=e.constructor,customElements.whenDefined(e.localName).then((()=>t.i|=128));if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);const t=A(s);if(!l.has(t)){const i=()=>{};((e,t,s)=>{let i=l.get(e);h&&s?(i=i||new CSSStyleSheet,"string"==typeof i?i=t:i.replaceSync(t)):i=t,l.set(e,i)})(t,e,!!(1&s.i)),i()}}}const r=t.S,a=()=>oe(t,!0);r&&r["s-rc"]?r["s-rc"].push(a):a()})(e,t,i)}r()}})(this))))}disconnectedCallback(){d.jmp((()=>(async e=>{if(!(1&d.i)){const t=s(e);(null==t?void 0:t.G)&&(t.G.map((e=>e())),t.G=void 0),(null==t?void 0:t.t)?ve(t.t,e):(null==t?void 0:t.W)&&t.W.then((()=>ve(t.t,e)))}N.has(e)&&N.delete(e),e.shadowRoot&&N.has(e.shadowRoot)&&N.delete(e.shadowRoot)})(this))),d.raf((()=>{var e;const t=s(this);if(!t)return;const i=g.findIndex((e=>e===this));i>-1&&g.splice(i,1),(null==(e=null==t?void 0:t.R)?void 0:e.v)instanceof Node&&!t.R.v.isConnected&&delete t.R.v}))}componentOnReady(){var e;return null==(e=s(this))?void 0:e.W}};64&p.i&&(f.formAssociated=!0),p.I=e[0],u.includes(m)||c.get(m)||(r.push(m),c.define(m,ge(f,p,1)))}))})),r.length>0&&(y&&(f.textContent+=a),f.textContent+=r.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",f.innerHTML.length)){f.setAttribute("data-styles","");const e=null!=(i=d.M)?i:j(k.document);null!=e&&f.setAttribute("nonce",e),p.insertBefore(f,m?m.nextSibling:p.firstChild)}v=!1,g.length?g.map((e=>e.connectedCallback())):d.jmp((()=>b=setTimeout(pe,30)))},xe=(e,t,s)=>{s&&k.document&&s.map((([s,i,r])=>{const n=e,o=we(t,r),l=$e(s);d.ael(n,i,o,l),(t.G=t.G||[]).push((()=>d.rel(n,i,o,l)))}))},we=(e,t)=>s=>{var i;try{256&e.i?null==(i=e.t)||i[t](s):(e.j=e.j||[]).push([t,s])}catch(t){n(t,e.$hostElement$)}},$e=e=>({passive:!!(1&e),capture:!!(2&e)}),Se=e=>d.M=e;export{F as H,T as a,ye as b,V as c,e as g,D as h,p,i as r,Se as s}
|