@editora/ui-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +217 -0
  2. package/dist/ElementBase.d.ts +23 -0
  3. package/dist/ElementBase.d.ts.map +1 -0
  4. package/dist/alert-dialog-manager.d.ts +109 -0
  5. package/dist/alert-dialog-manager.d.ts.map +1 -0
  6. package/dist/components/color-utils.d.ts +31 -0
  7. package/dist/components/color-utils.d.ts.map +1 -0
  8. package/dist/components/date-time-utils.d.ts +49 -0
  9. package/dist/components/date-time-utils.d.ts.map +1 -0
  10. package/dist/components/ui-accordion.d.ts +27 -0
  11. package/dist/components/ui-accordion.d.ts.map +1 -0
  12. package/dist/components/ui-alert-dialog.d.ts +132 -0
  13. package/dist/components/ui-alert-dialog.d.ts.map +1 -0
  14. package/dist/components/ui-alert.d.ts +13 -0
  15. package/dist/components/ui-alert.d.ts.map +1 -0
  16. package/dist/components/ui-app-header.d.ts +11 -0
  17. package/dist/components/ui-app-header.d.ts.map +1 -0
  18. package/dist/components/ui-aspect-ratio.d.ts +17 -0
  19. package/dist/components/ui-aspect-ratio.d.ts.map +1 -0
  20. package/dist/components/ui-avatar.d.ts +16 -0
  21. package/dist/components/ui-avatar.d.ts.map +1 -0
  22. package/dist/components/ui-badge.d.ts +12 -0
  23. package/dist/components/ui-badge.d.ts.map +1 -0
  24. package/dist/components/ui-block-controls.d.ts +15 -0
  25. package/dist/components/ui-block-controls.d.ts.map +1 -0
  26. package/dist/components/ui-box.d.ts +12 -0
  27. package/dist/components/ui-box.d.ts.map +1 -0
  28. package/dist/components/ui-breadcrumb.d.ts +19 -0
  29. package/dist/components/ui-breadcrumb.d.ts.map +1 -0
  30. package/dist/components/ui-button.d.ts +9 -0
  31. package/dist/components/ui-button.d.ts.map +1 -0
  32. package/dist/components/ui-calendar.d.ts +81 -0
  33. package/dist/components/ui-calendar.d.ts.map +1 -0
  34. package/dist/components/ui-chart.d.ts +12 -0
  35. package/dist/components/ui-chart.d.ts.map +1 -0
  36. package/dist/components/ui-checkbox.d.ts +31 -0
  37. package/dist/components/ui-checkbox.d.ts.map +1 -0
  38. package/dist/components/ui-collapsible.d.ts +18 -0
  39. package/dist/components/ui-collapsible.d.ts.map +1 -0
  40. package/dist/components/ui-color-picker.d.ts +146 -0
  41. package/dist/components/ui-color-picker.d.ts.map +1 -0
  42. package/dist/components/ui-combobox.d.ts +60 -0
  43. package/dist/components/ui-combobox.d.ts.map +1 -0
  44. package/dist/components/ui-command-palette.d.ts +31 -0
  45. package/dist/components/ui-command-palette.d.ts.map +1 -0
  46. package/dist/components/ui-container.d.ts +13 -0
  47. package/dist/components/ui-container.d.ts.map +1 -0
  48. package/dist/components/ui-context-menu.d.ts +68 -0
  49. package/dist/components/ui-context-menu.d.ts.map +1 -0
  50. package/dist/components/ui-data-table.d.ts +100 -0
  51. package/dist/components/ui-data-table.d.ts.map +1 -0
  52. package/dist/components/ui-date-picker.d.ts +78 -0
  53. package/dist/components/ui-date-picker.d.ts.map +1 -0
  54. package/dist/components/ui-date-range-picker.d.ts +76 -0
  55. package/dist/components/ui-date-range-picker.d.ts.map +1 -0
  56. package/dist/components/ui-date-range-time-picker.d.ts +71 -0
  57. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -0
  58. package/dist/components/ui-date-time-picker.d.ts +79 -0
  59. package/dist/components/ui-date-time-picker.d.ts.map +1 -0
  60. package/dist/components/ui-dialog.d.ts +107 -0
  61. package/dist/components/ui-dialog.d.ts.map +1 -0
  62. package/dist/components/ui-direction-provider.d.ts +13 -0
  63. package/dist/components/ui-direction-provider.d.ts.map +1 -0
  64. package/dist/components/ui-drawer.d.ts +31 -0
  65. package/dist/components/ui-drawer.d.ts.map +1 -0
  66. package/dist/components/ui-dropdown.d.ts +52 -0
  67. package/dist/components/ui-dropdown.d.ts.map +1 -0
  68. package/dist/components/ui-empty-state.d.ts +11 -0
  69. package/dist/components/ui-empty-state.d.ts.map +1 -0
  70. package/dist/components/ui-field.d.ts +18 -0
  71. package/dist/components/ui-field.d.ts.map +1 -0
  72. package/dist/components/ui-flex.d.ts +12 -0
  73. package/dist/components/ui-flex.d.ts.map +1 -0
  74. package/dist/components/ui-floating-toolbar.d.ts +24 -0
  75. package/dist/components/ui-floating-toolbar.d.ts.map +1 -0
  76. package/dist/components/ui-form.d.ts +39 -0
  77. package/dist/components/ui-form.d.ts.map +1 -0
  78. package/dist/components/ui-gantt.d.ts +7 -0
  79. package/dist/components/ui-gantt.d.ts.map +1 -0
  80. package/dist/components/ui-grid.d.ts +12 -0
  81. package/dist/components/ui-grid.d.ts.map +1 -0
  82. package/dist/components/ui-hover-card.d.ts +42 -0
  83. package/dist/components/ui-hover-card.d.ts.map +1 -0
  84. package/dist/components/ui-icon.d.ts +10 -0
  85. package/dist/components/ui-icon.d.ts.map +1 -0
  86. package/dist/components/ui-input.d.ts +33 -0
  87. package/dist/components/ui-input.d.ts.map +1 -0
  88. package/dist/components/ui-label.d.ts +18 -0
  89. package/dist/components/ui-label.d.ts.map +1 -0
  90. package/dist/components/ui-layout.d.ts +24 -0
  91. package/dist/components/ui-layout.d.ts.map +1 -0
  92. package/dist/components/ui-menu.d.ts +57 -0
  93. package/dist/components/ui-menu.d.ts.map +1 -0
  94. package/dist/components/ui-menubar.d.ts +65 -0
  95. package/dist/components/ui-menubar.d.ts.map +1 -0
  96. package/dist/components/ui-navigation-menu.d.ts +29 -0
  97. package/dist/components/ui-navigation-menu.d.ts.map +1 -0
  98. package/dist/components/ui-pagination.d.ts +14 -0
  99. package/dist/components/ui-pagination.d.ts.map +1 -0
  100. package/dist/components/ui-plugin-panel.d.ts +7 -0
  101. package/dist/components/ui-plugin-panel.d.ts.map +1 -0
  102. package/dist/components/ui-popover.d.ts +32 -0
  103. package/dist/components/ui-popover.d.ts.map +1 -0
  104. package/dist/components/ui-portal.d.ts +33 -0
  105. package/dist/components/ui-portal.d.ts.map +1 -0
  106. package/dist/components/ui-presence.d.ts +29 -0
  107. package/dist/components/ui-presence.d.ts.map +1 -0
  108. package/dist/components/ui-progress.d.ts +35 -0
  109. package/dist/components/ui-progress.d.ts.map +1 -0
  110. package/dist/components/ui-quick-actions.d.ts +23 -0
  111. package/dist/components/ui-quick-actions.d.ts.map +1 -0
  112. package/dist/components/ui-radio-group.d.ts +34 -0
  113. package/dist/components/ui-radio-group.d.ts.map +1 -0
  114. package/dist/components/ui-scroll-area.d.ts +62 -0
  115. package/dist/components/ui-scroll-area.d.ts.map +1 -0
  116. package/dist/components/ui-section.d.ts +8 -0
  117. package/dist/components/ui-section.d.ts.map +1 -0
  118. package/dist/components/ui-select.d.ts +31 -0
  119. package/dist/components/ui-select.d.ts.map +1 -0
  120. package/dist/components/ui-selection-popup.d.ts +35 -0
  121. package/dist/components/ui-selection-popup.d.ts.map +1 -0
  122. package/dist/components/ui-separator.d.ts +7 -0
  123. package/dist/components/ui-separator.d.ts.map +1 -0
  124. package/dist/components/ui-sidebar.d.ts +29 -0
  125. package/dist/components/ui-sidebar.d.ts.map +1 -0
  126. package/dist/components/ui-skeleton.d.ts +8 -0
  127. package/dist/components/ui-skeleton.d.ts.map +1 -0
  128. package/dist/components/ui-slider.d.ts +33 -0
  129. package/dist/components/ui-slider.d.ts.map +1 -0
  130. package/dist/components/ui-slot.d.ts +15 -0
  131. package/dist/components/ui-slot.d.ts.map +1 -0
  132. package/dist/components/ui-stepper.d.ts +26 -0
  133. package/dist/components/ui-stepper.d.ts.map +1 -0
  134. package/dist/components/ui-switch.d.ts +19 -0
  135. package/dist/components/ui-switch.d.ts.map +1 -0
  136. package/dist/components/ui-table.d.ts +31 -0
  137. package/dist/components/ui-table.d.ts.map +1 -0
  138. package/dist/components/ui-tabs.d.ts +29 -0
  139. package/dist/components/ui-tabs.d.ts.map +1 -0
  140. package/dist/components/ui-textarea.d.ts +28 -0
  141. package/dist/components/ui-textarea.d.ts.map +1 -0
  142. package/dist/components/ui-time-picker.d.ts +77 -0
  143. package/dist/components/ui-time-picker.d.ts.map +1 -0
  144. package/dist/components/ui-timeline.d.ts +7 -0
  145. package/dist/components/ui-timeline.d.ts.map +1 -0
  146. package/dist/components/ui-toast.d.ts +19 -0
  147. package/dist/components/ui-toast.d.ts.map +1 -0
  148. package/dist/components/ui-toggle-group.d.ts +25 -0
  149. package/dist/components/ui-toggle-group.d.ts.map +1 -0
  150. package/dist/components/ui-toggle.d.ts +19 -0
  151. package/dist/components/ui-toggle.d.ts.map +1 -0
  152. package/dist/components/ui-toolbar.d.ts +13 -0
  153. package/dist/components/ui-toolbar.d.ts.map +1 -0
  154. package/dist/components/ui-tooltip.d.ts +39 -0
  155. package/dist/components/ui-tooltip.d.ts.map +1 -0
  156. package/dist/components/ui-visually-hidden.d.ts +10 -0
  157. package/dist/components/ui-visually-hidden.d.ts.map +1 -0
  158. package/dist/components/ui-wizard.d.ts +27 -0
  159. package/dist/components/ui-wizard.d.ts.map +1 -0
  160. package/dist/dialog-manager.d.ts +76 -0
  161. package/dist/dialog-manager.d.ts.map +1 -0
  162. package/dist/focusManager.d.ts +6 -0
  163. package/dist/focusManager.d.ts.map +1 -0
  164. package/dist/form.d.ts +24 -0
  165. package/dist/form.d.ts.map +1 -0
  166. package/dist/icons.d.ts +9 -0
  167. package/dist/icons.d.ts.map +1 -0
  168. package/dist/index.cjs.js +17522 -0
  169. package/dist/index.d.ts +165 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.esm.js +33228 -0
  172. package/dist/overlayManager.d.ts +18 -0
  173. package/dist/overlayManager.d.ts.map +1 -0
  174. package/dist/plugin.d.ts +8 -0
  175. package/dist/plugin.d.ts.map +1 -0
  176. package/dist/portal.d.ts +28 -0
  177. package/dist/portal.d.ts.map +1 -0
  178. package/dist/signal.d.ts +10 -0
  179. package/dist/signal.d.ts.map +1 -0
  180. package/dist/theme.d.ts +56 -0
  181. package/dist/theme.d.ts.map +1 -0
  182. package/dist/toast.d.ts +6 -0
  183. package/dist/toast.d.ts.map +1 -0
  184. package/package.json +42 -0
package/README.md ADDED
@@ -0,0 +1,217 @@
1
+ # @editora/ui-core
2
+
3
+ Production-oriented Web Components for Editora UI.
4
+
5
+ `@editora/ui-core` is the framework-agnostic layer. It ships:
6
+ - Custom elements (`<ui-button>`, `<ui-data-table>`, `<ui-date-picker>`, etc.)
7
+ - Imperative managers for Promise-based dialogs
8
+ - Theming/token utilities
9
+ - Overlay, focus, portal, and plugin helpers
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @editora/ui-core
15
+ ```
16
+
17
+ ## Quick Start (Vanilla / Any Framework)
18
+
19
+ Import once at app bootstrap to register all custom elements.
20
+
21
+ ```ts
22
+ import '@editora/ui-core';
23
+ ```
24
+
25
+ Then use components directly:
26
+
27
+ ```html
28
+ <ui-field label="Email" hint="Work email">
29
+ <ui-input name="email" type="email" placeholder="you@company.com" required></ui-input>
30
+ </ui-field>
31
+
32
+ <ui-button variant="primary">Save</ui-button>
33
+ ```
34
+
35
+ ## What You Get
36
+
37
+ ### Core utilities
38
+ - `createSignal`, `computed`, `effect`
39
+ - `ElementBase`
40
+ - `applyTheme`, `defaultTokens`
41
+ - `showPortalFor`, `autoUpdatePosition`, portal helpers
42
+ - focus/overlay managers
43
+ - `showToast`
44
+
45
+ ### Dialog managers (Promise API)
46
+ - `createDialogManager`, `DialogManager`
47
+ - `createAlertDialogManager`, `AlertDialogManager`
48
+
49
+ ## Component Catalog
50
+
51
+ ### Primitives and forms
52
+ - `ui-button`, `ui-input`, `ui-textarea`, `ui-label`, `ui-field`, `ui-form`
53
+ - `ui-checkbox`, `ui-radio-group`, `ui-switch`, `ui-slider`, `ui-select`, `ui-combobox`
54
+ - `ui-date-picker`, `ui-date-range-picker`, `ui-time-picker`, `ui-date-time-picker`, `ui-date-range-time-picker`
55
+ - `ui-color-picker`
56
+
57
+ ### Navigation and layout
58
+ - `ui-layout`, `ui-sidebar`, `ui-app-header`, `ui-breadcrumb`, `ui-navigation-menu`, `ui-menubar`, `ui-tabs`
59
+ - `ui-box`, `ui-flex`, `ui-grid`, `ui-section`, `ui-container`
60
+ - `ui-drawer`
61
+
62
+ ### Overlays and interactions
63
+ - `ui-dialog`, `ui-alert-dialog`, `ui-popover`, `ui-dropdown`, `ui-menu`, `ui-context-menu`, `ui-tooltip`, `ui-hover-card`
64
+ - `ui-command-palette`, `ui-quick-actions`, `ui-selection-popup`, `ui-plugin-panel`, `ui-floating-toolbar`, `ui-toolbar`
65
+ - `ui-portal`, `ui-presence`, `ui-slot`, `ui-visually-hidden`
66
+
67
+ ### Data and display
68
+ - `ui-table`, `ui-data-table`, `ui-pagination`, `ui-empty-state`, `ui-skeleton`, `ui-alert`, `ui-badge`
69
+ - `ui-chart`, `ui-timeline`, `ui-gantt`, `ui-calendar`, `ui-progress`, `ui-scroll-area`, `ui-separator`
70
+ - `ui-accordion`, `ui-collapsible`, `ui-stepper`, `ui-wizard`, `ui-avatar`, `ui-aspect-ratio`, `ui-block-controls`, `ui-icon`
71
+
72
+ ## Usage Patterns
73
+
74
+ ### 1. Attributes + events
75
+
76
+ ```html
77
+ <ui-date-picker id="start" name="startDate" clearable></ui-date-picker>
78
+ <script type="module">
79
+ import '@editora/ui-core';
80
+
81
+ const picker = document.getElementById('start');
82
+ picker.addEventListener('change', (e) => {
83
+ console.log('new date', e.detail.value);
84
+ });
85
+ </script>
86
+ ```
87
+
88
+ ### 2. Form validation and submit
89
+
90
+ ```html
91
+ <ui-form id="profileForm" autosave guard-unsaved>
92
+ <ui-field label="Full name" required>
93
+ <ui-input name="fullName" required></ui-input>
94
+ </ui-field>
95
+ <ui-field label="Email" required>
96
+ <ui-input name="email" type="email" required></ui-input>
97
+ </ui-field>
98
+ <ui-button variant="primary" type="submit">Save</ui-button>
99
+ </ui-form>
100
+
101
+ <script type="module">
102
+ import '@editora/ui-core';
103
+ const form = document.getElementById('profileForm');
104
+
105
+ form.addEventListener('submit', (e) => console.log('values', e.detail.values));
106
+ form.addEventListener('invalid', (e) => console.log('errors', e.detail.errors));
107
+ form.addEventListener('dirty-change', (e) => console.log('dirty?', e.detail.dirty));
108
+ </script>
109
+ ```
110
+
111
+ ### 3. Data table + pagination
112
+
113
+ ```html
114
+ <ui-data-table id="usersTable" sortable selectable page-size="10" pagination-id="usersPager">
115
+ <table>
116
+ <thead>
117
+ <tr>
118
+ <th data-key="id">ID</th>
119
+ <th data-key="name">Name</th>
120
+ <th data-key="role">Role</th>
121
+ </tr>
122
+ </thead>
123
+ <tbody>
124
+ <tr><td>1</td><td>Asha</td><td>Admin</td></tr>
125
+ <tr><td>2</td><td>Marco</td><td>Editor</td></tr>
126
+ </tbody>
127
+ </table>
128
+ </ui-data-table>
129
+
130
+ <ui-pagination id="usersPager"></ui-pagination>
131
+ ```
132
+
133
+ ### 4. Promise dialog manager
134
+
135
+ ```ts
136
+ import '@editora/ui-core';
137
+ import { createDialogManager } from '@editora/ui-core';
138
+
139
+ const dialogs = createDialogManager();
140
+
141
+ const result = await dialogs.confirm({
142
+ title: 'Delete record',
143
+ description: 'This action cannot be undone.',
144
+ submitText: 'Delete',
145
+ cancelText: 'Cancel',
146
+ mode: 'queue'
147
+ });
148
+
149
+ if (result.action === 'submit') {
150
+ // perform delete
151
+ }
152
+ ```
153
+
154
+ ### 5. Promise alert dialog manager
155
+
156
+ ```ts
157
+ import '@editora/ui-core';
158
+ import { createAlertDialogManager } from '@editora/ui-core';
159
+
160
+ const alerts = createAlertDialogManager();
161
+
162
+ const confirm = await alerts.confirm({
163
+ title: 'Publish changes?',
164
+ description: 'You can still unpublish later.',
165
+ confirmText: 'Publish',
166
+ cancelText: 'Not now'
167
+ });
168
+
169
+ if (confirm.action === 'confirm') {
170
+ // publish
171
+ }
172
+ ```
173
+
174
+ ## Theming
175
+
176
+ Use `applyTheme` with token overrides:
177
+
178
+ ```ts
179
+ import { applyTheme, defaultTokens } from '@editora/ui-core';
180
+
181
+ applyTheme({
182
+ ...defaultTokens,
183
+ colors: {
184
+ ...defaultTokens.colors,
185
+ primary: '#0f766e',
186
+ text: '#0f172a',
187
+ background: '#ffffff'
188
+ },
189
+ radius: '10px'
190
+ });
191
+ ```
192
+
193
+ ## Developer Notes
194
+
195
+ - This package is `sideEffects: true` because component registration happens via module import.
196
+ - Use one global import (`import '@editora/ui-core'`) in app entry.
197
+ - Events are dispatched as `CustomEvent` with `detail`, usually `bubbles: true` and `composed: true`.
198
+ - For best performance, keep long tables virtualized (`ui-data-table[virtualize]`) and avoid unnecessary DOM churn in cell renderers.
199
+
200
+ ## Development
201
+
202
+ ```bash
203
+ cd packages/ui-core
204
+ npm run build:tsc
205
+ npm test
206
+ ```
207
+
208
+ Full `npm run build` also runs Vite bundle output.
209
+
210
+ ## Troubleshooting
211
+
212
+ - Components not rendering:
213
+ - Ensure `@editora/ui-core` is imported before first render.
214
+ - Styles look unthemed:
215
+ - Apply tokens early in bootstrap with `applyTheme(...)`.
216
+ - Dialog promises never resolving:
217
+ - Ensure you call `destroy()` on manager during app teardown only, not immediately after open.
@@ -0,0 +1,23 @@
1
+ export declare abstract class ElementBase extends HTMLElement {
2
+ protected root: ShadowRoot;
3
+ private _isRendering;
4
+ private _renderRequested;
5
+ private _renderScheduled;
6
+ private _hasRendered;
7
+ private _visibilityGuardApplied;
8
+ private _lastRenderedContent;
9
+ constructor();
10
+ connectedCallback(): void;
11
+ disconnectedCallback(): void;
12
+ attributeChangedCallback(name?: string, oldValue?: string | null, newValue?: string | null): void;
13
+ protected shouldRenderOnAttributeChange(_name: string, _oldValue: string | null, _newValue: string | null): boolean;
14
+ protected setContent(html: string, options?: {
15
+ force?: boolean;
16
+ }): void;
17
+ protected invalidateContentCache(): void;
18
+ protected requestRender(): void;
19
+ private _scheduleRender;
20
+ private _requestRender;
21
+ protected abstract render(): void;
22
+ }
23
+ //# sourceMappingURL=ElementBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementBase.d.ts","sourceRoot":"","sources":["../src/ElementBase.ts"],"names":[],"mappings":"AAAA,8BAAsB,WAAY,SAAQ,WAAW;IACnD,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,oBAAoB,CAAuB;;IAOnD,iBAAiB;IAWjB,oBAAoB;IA2BpB,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAS1F,SAAS,CAAC,6BAA6B,CACrC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO;IAIV,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;IAOhE,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAIxC,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,cAAc;IAwBtB,SAAS,CAAC,QAAQ,CAAC,MAAM,IAAI,IAAI;CAClC"}
@@ -0,0 +1,109 @@
1
+ import { UIAlertDialog } from './components/ui-alert-dialog';
2
+ export type AlertDialogMode = 'queue' | 'replace' | 'stack';
3
+ export type AlertDialogAction = 'confirm' | 'cancel' | 'dismiss';
4
+ export type AlertDialogDismissSource = 'esc' | 'backdrop' | 'close-icon' | 'abort' | 'unmount' | 'replace' | 'programmatic';
5
+ export type AlertDialogBaseResult = {
6
+ id: string;
7
+ action: AlertDialogAction;
8
+ checked?: boolean;
9
+ source?: AlertDialogDismissSource;
10
+ reason?: string;
11
+ };
12
+ export type AlertResult = AlertDialogBaseResult & {
13
+ action: 'confirm' | 'dismiss';
14
+ value?: unknown;
15
+ };
16
+ export type ConfirmResult = AlertDialogBaseResult & {
17
+ action: 'confirm' | 'cancel' | 'dismiss';
18
+ value?: unknown;
19
+ };
20
+ export type PromptResult = AlertDialogBaseResult & {
21
+ action: 'confirm' | 'cancel' | 'dismiss';
22
+ value?: string;
23
+ };
24
+ export type PromptInputOptions = {
25
+ label?: string;
26
+ placeholder?: string;
27
+ defaultValue?: string;
28
+ required?: boolean;
29
+ validate?: (value: string) => string | null;
30
+ };
31
+ export type AlertDialogCheckboxOptions = {
32
+ enabled?: boolean;
33
+ label?: string;
34
+ defaultChecked?: boolean;
35
+ };
36
+ export type AlertDialogConfirmContext = {
37
+ id: string;
38
+ value?: string;
39
+ checked?: boolean;
40
+ dialog: UIAlertDialog;
41
+ signal?: AbortSignal;
42
+ };
43
+ export type AlertDialogCommonOptions = {
44
+ id?: string;
45
+ mode?: AlertDialogMode;
46
+ title?: string;
47
+ description?: string;
48
+ confirmText?: string;
49
+ cancelText?: string;
50
+ loadingText?: string;
51
+ errorMessage?: string;
52
+ dismissible?: boolean;
53
+ closeOnEsc?: boolean;
54
+ closeOnBackdrop?: boolean;
55
+ lockWhileLoading?: boolean;
56
+ role?: 'alertdialog' | 'dialog';
57
+ size?: 'sm' | 'md' | 'lg';
58
+ initialFocus?: string;
59
+ checkbox?: AlertDialogCheckboxOptions;
60
+ signal?: AbortSignal;
61
+ ariaLabel?: string;
62
+ ariaLabelledby?: string;
63
+ ariaDescribedby?: string;
64
+ headless?: boolean;
65
+ onConfirm?: (ctx: AlertDialogConfirmContext) => void | Promise<void>;
66
+ };
67
+ export type AlertDialogAlertOptions = AlertDialogCommonOptions;
68
+ export type AlertDialogConfirmOptions = AlertDialogCommonOptions;
69
+ export type AlertDialogPromptOptions = AlertDialogCommonOptions & {
70
+ input?: PromptInputOptions;
71
+ };
72
+ export type AlertDialogManagerApi = {
73
+ alert: (options?: AlertDialogAlertOptions) => Promise<AlertResult>;
74
+ confirm: (options?: AlertDialogConfirmOptions) => Promise<ConfirmResult>;
75
+ prompt: (options?: AlertDialogPromptOptions) => Promise<PromptResult>;
76
+ destroy: (reason?: 'unmount' | 'abort' | 'programmatic') => void;
77
+ setContainer: (container: HTMLElement | null) => void;
78
+ };
79
+ export declare class AlertDialogManager implements AlertDialogManagerApi {
80
+ private _container;
81
+ private _ownsContainer;
82
+ private _queue;
83
+ private _active;
84
+ private _disposed;
85
+ private _seed;
86
+ constructor(container?: HTMLElement | null);
87
+ setContainer(container: HTMLElement | null): void;
88
+ alert(options?: AlertDialogAlertOptions): Promise<AlertResult>;
89
+ confirm(options?: AlertDialogConfirmOptions): Promise<ConfirmResult>;
90
+ prompt(options?: AlertDialogPromptOptions): Promise<PromptResult>;
91
+ destroy(reason?: 'unmount' | 'abort' | 'programmatic'): void;
92
+ private _enqueue;
93
+ private _open;
94
+ private _validatePrompt;
95
+ private _settle;
96
+ private _cleanupRequest;
97
+ private _drainQueue;
98
+ private _buildConfig;
99
+ private _ensureContainer;
100
+ private _updateStackZIndex;
101
+ }
102
+ export declare function createAlertDialogManager(options?: {
103
+ container?: HTMLElement | null;
104
+ }): AlertDialogManager;
105
+ export declare function alert(options?: AlertDialogAlertOptions): Promise<AlertResult>;
106
+ export declare function confirm(options?: AlertDialogConfirmOptions): Promise<ConfirmResult>;
107
+ export declare function prompt(options?: AlertDialogPromptOptions): Promise<PromptResult>;
108
+ export declare function dismissAllAlertDialogs(reason?: 'unmount' | 'abort' | 'programmatic'): void;
109
+ //# sourceMappingURL=alert-dialog-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog-manager.d.ts","sourceRoot":"","sources":["../src/alert-dialog-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAId,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAA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AC,OAAO;IAkCf,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,YAAY;IA2CpB,OAAO,CAAC,gBAAgB;IAoBxB,OAAO,CAAC,kBAAkB;CAQ3B;AAID,wBAAgB,wBAAwB,CAAC,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CAAO,GAAG,kBAAkB,CAE7G;AASD,wBAAgB,KAAK,CAAC,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,WAAW,CAAC,CAEjF;AAED,wBAAgB,OAAO,CAAC,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,aAAa,CAAC,CAEvF;AAED,wBAAgB,MAAM,CAAC,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,YAAY,CAAC,CAEpF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,SAAS,GAAG,OAAO,GAAG,cAA+B,QAInG"}
@@ -0,0 +1,31 @@
1
+ export type RGBA = {
2
+ r: number;
3
+ g: number;
4
+ b: number;
5
+ a: number;
6
+ };
7
+ export type HSVA = {
8
+ h: number;
9
+ s: number;
10
+ v: number;
11
+ a: number;
12
+ };
13
+ export type HSLA = {
14
+ h: number;
15
+ s: number;
16
+ l: number;
17
+ a: number;
18
+ };
19
+ export declare function normalizeRgba(value: RGBA): RGBA;
20
+ export declare function parseColor(raw: string): RGBA | null;
21
+ export declare function rgbaToHex(rgba: RGBA, includeAlpha?: boolean): string;
22
+ export declare function rgbaToCss(rgba: RGBA, includeAlpha?: boolean): string;
23
+ export declare function hslaToCss(hsla: HSLA, includeAlpha?: boolean): string;
24
+ export declare function rgbaToHsva(rgba: RGBA): HSVA;
25
+ export declare function hsvaToRgba(hsva: HSVA): RGBA;
26
+ export declare function rgbaToHsla(rgba: RGBA): HSLA;
27
+ export declare function hslaToRgba(hsla: HSLA): RGBA;
28
+ export declare function formatHexDisplay(rgba: RGBA, withAlpha: boolean): string;
29
+ export declare function formatRgbDisplay(rgba: RGBA, withAlpha: boolean): string;
30
+ export declare function formatHslDisplay(rgba: RGBA, withAlpha: boolean): string;
31
+ //# sourceMappingURL=color-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../src/components/color-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACjE,MAAM,MAAM,IAAI,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACjE,MAAM,MAAM,IAAI,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AA4JjE,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAO/C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOnD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,UAAQ,GAAG,MAAM,CAMlE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,UAAO,GAAG,MAAM,CAMjE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,UAAO,GAAG,MAAM,CAOjE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA4B3C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAsC3C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA6B3C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAuC3C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAEvE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,CAEvE"}
@@ -0,0 +1,49 @@
1
+ export type DateDisplayFormat = 'iso' | 'locale' | 'custom';
2
+ export type OverlayPlacement = 'top' | 'bottom';
3
+ export type OverlayPosition = {
4
+ top: number;
5
+ left: number;
6
+ placement: OverlayPlacement;
7
+ };
8
+ export type TimeParts = {
9
+ hours: number;
10
+ minutes: number;
11
+ seconds: number;
12
+ };
13
+ export type DateTimeParts = {
14
+ date: string;
15
+ time: string;
16
+ };
17
+ export declare function isTruthyAttr(raw: string | null, fallback?: boolean): boolean;
18
+ export declare function normalizeLocale(raw: string | null): string;
19
+ export declare function normalizeDateIso(raw: string | null | undefined): string | null;
20
+ export declare function splitDateTime(value: string | null | undefined): DateTimeParts | null;
21
+ export declare function combineDateTime(dateIso: string | null, time: string | null): string | null;
22
+ export declare function parseConstraintDate(raw: string | null | undefined): string | null;
23
+ export declare function parseConstraintDateTime(raw: string | null | undefined): DateTimeParts | null;
24
+ export declare function formatDateISOToLocale(iso: string, locale: string, options?: Intl.DateTimeFormatOptions): string;
25
+ export declare function formatDateForDisplay(iso: string | null, locale: string, format: DateDisplayFormat, displayFormat: string | null): string;
26
+ export declare function parseUserDateInput(raw: string, locale: string): string | null;
27
+ export declare function parseTimeInput(raw: string, allowSeconds: boolean): TimeParts | null;
28
+ export declare function formatTime(time: TimeParts | null, withSeconds?: boolean): string;
29
+ export declare function to12hDisplay(time24: string, locale: string): string;
30
+ export declare function compareTimes(a: string, b: string): number;
31
+ export declare function clampTime(time: string, min: string | null, max: string | null): string;
32
+ export declare function clampDateIso(value: string, minIso: string | null, maxIso: string | null): string;
33
+ export declare function compareDateTimes(a: string, b: string): number;
34
+ export declare function computeMonthRange(todayIso: string): {
35
+ start: string;
36
+ end: string;
37
+ };
38
+ export declare function computeLastDaysRange(todayIso: string, days: number): {
39
+ start: string;
40
+ end: string;
41
+ };
42
+ export declare function computePopoverPosition(anchorRect: DOMRect, panelRect: DOMRect, padding?: number, gap?: number): OverlayPosition;
43
+ export declare function rafThrottle(fn: () => void): {
44
+ run: () => void;
45
+ cancel: () => void;
46
+ };
47
+ export declare function shouldUseMobileSheet(mode: string | null): boolean;
48
+ export declare function lockBodyScroll(): () => void;
49
+ //# sourceMappingURL=date-time-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-time-utils.d.ts","sourceRoot":"","sources":["../../src/components/date-time-utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,gBAAgB,CAAA;CAAE,CAAC;AACzF,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5E,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAqD3D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,UAAQ,GAAG,OAAO,CAK1E;AAED,wBAAgB,eAAe,CAA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M,GAAG,MAAM,CAWnE;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOtF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAKhG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAO7D;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CASlF;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAMnG;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,SAAI,EAAE,GAAG,SAAI,GAAG,eAAe,CAiBrH;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,CAenF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAIjE;AAED,wBAAgB,cAAc,IAAI,MAAM,IAAI,CA0B3C"}
@@ -0,0 +1,27 @@
1
+ import { ElementBase } from '../ElementBase';
2
+ export declare class UIAccordion extends ElementBase {
3
+ static get observedAttributes(): string[];
4
+ private _uid;
5
+ private _observer;
6
+ private _syncingOpenAttr;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ disconnectedCallback(): void;
10
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
11
+ get multiple(): boolean;
12
+ set multiple(value: boolean);
13
+ get collapsible(): boolean;
14
+ set collapsible(value: boolean);
15
+ get open(): number | number[];
16
+ set open(value: number | number[]);
17
+ private _sourceItems;
18
+ private _normalizeOpen;
19
+ private _normalizeNext;
20
+ private _commitOpen;
21
+ private _applyOpenState;
22
+ private _toggleIndex;
23
+ private _onClick;
24
+ private _onKeyDown;
25
+ protected render(): void;
26
+ }
27
+ //# sourceMappingURL=ui-accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-accordion.d.ts","sourceRoot":"","sources":["../../src/components/ui-accordion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA8P7C,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,KAAK,kBAAkB,aAE5B;IAED,OAAO,CAAC,IAAI,CAA4D;IACxE,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,gBAAgB,CAAS;;IAQjC,iBAAiB;IAcjB,oBAAoB;IAUpB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IASvF,IAAI,QAAQ,IAIQ,OAAO,CAF1B;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAI1B;IAED,IAAI,WAAW,IAIQ,OAAO,CAF7B;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,MAAM,EAAE,CAG5B;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAGhC;IAED,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,UAAU;IA4BlB,SAAS,CAAC,MAAM;CA8DjB"}
@@ -0,0 +1,132 @@
1
+ import { ElementBase } from '../ElementBase';
2
+ type UIAlertDialogRole = 'alertdialog' | 'dialog';
3
+ type UIAlertDialogSize = 'sm' | 'md' | 'lg';
4
+ type UIAlertDialogState = 'idle' | 'loading' | 'error';
5
+ type UIAlertDialogAction = 'confirm' | 'cancel' | 'dismiss';
6
+ type UIAlertDialogDismissSource = 'esc' | 'backdrop' | 'close-icon' | 'abort' | 'unmount';
7
+ export interface UIAlertDialogTemplateOptions {
8
+ id?: string;
9
+ title?: string;
10
+ description?: string;
11
+ confirmText?: string;
12
+ cancelText?: string;
13
+ loadingText?: string;
14
+ errorMessage?: string;
15
+ input?: {
16
+ enabled?: boolean;
17
+ label?: string;
18
+ placeholder?: string;
19
+ value?: string;
20
+ required?: boolean;
21
+ };
22
+ checkbox?: {
23
+ enabled?: boolean;
24
+ label?: string;
25
+ checked?: boolean;
26
+ };
27
+ initialFocus?: string;
28
+ dismissible?: boolean;
29
+ closeOnEsc?: boolean;
30
+ closeOnBackdrop?: boolean;
31
+ lockWhileLoading?: boolean;
32
+ role?: UIAlertDialogRole;
33
+ size?: UIAlertDialogSize;
34
+ ariaLabel?: string;
35
+ ariaLabelledby?: string;
36
+ ariaDescribedby?: string;
37
+ headless?: boolean;
38
+ showCancel?: boolean;
39
+ showClose?: boolean;
40
+ }
41
+ export type UIAlertDialogOpenDetail = {
42
+ id: string;
43
+ };
44
+ export type UIAlertDialogConfirmDetail = {
45
+ id: string;
46
+ inputValue?: string;
47
+ checked?: boolean;
48
+ };
49
+ export type UIAlertDialogCancelDetail = {
50
+ id: string;
51
+ };
52
+ export type UIAlertDialogDismissDetail = {
53
+ id: string;
54
+ source: UIAlertDialogDismissSource;
55
+ reason?: string;
56
+ };
57
+ export type UIAlertDialogCloseDetail = {
58
+ id: string;
59
+ action: UIAlertDialogAction;
60
+ source?: UIAlertDialogDismissSource;
61
+ reason?: string;
62
+ };
63
+ export declare class UIAlertDialog extends ElementBase {
64
+ static get observedAttributes(): string[];
65
+ private static _openStack;
66
+ private _lastActive;
67
+ private _active;
68
+ private _terminalEmitted;
69
+ private _closeMeta;
70
+ private _uid;
71
+ private _dialogId;
72
+ private _config;
73
+ private _inputValue;
74
+ private _checked;
75
+ private _runtimeError;
76
+ constructor();
77
+ connectedCallback(): void;
78
+ disconnectedCallback(): void;
79
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
80
+ get open(): boolean;
81
+ set open(value: boolean);
82
+ get headless(): boolean;
83
+ set headless(value: boolean);
84
+ get dismissible(): boolean;
85
+ set dismissible(value: boolean);
86
+ get closeOnEsc(): boolean;
87
+ set closeOnEsc(value: boolean);
88
+ get closeOnBackdrop(): boolean;
89
+ set closeOnBackdrop(value: boolean);
90
+ get lockWhileLoading(): boolean;
91
+ set lockWhileLoading(value: boolean);
92
+ get roleType(): UIAlertDialogRole;
93
+ set roleType(value: UIAlertDialogRole);
94
+ get size(): UIAlertDialogSize;
95
+ set size(value: UIAlertDialogSize);
96
+ get state(): UIAlertDialogState;
97
+ set state(value: UIAlertDialogState);
98
+ get initialFocus(): string;
99
+ set initialFocus(value: string);
100
+ get dialogId(): string;
101
+ set dialogId(value: string);
102
+ get config(): UIAlertDialogTemplateOptions;
103
+ set config(value: UIAlertDialogTemplateOptions);
104
+ getInputValue(): string;
105
+ setInputValue(value: string): void;
106
+ getChecked(): boolean;
107
+ setChecked(checked: boolean): void;
108
+ setError(message: string): void;
109
+ clearError(): void;
110
+ close(action?: UIAlertDialogAction, source?: UIAlertDialogDismissSource, reason?: string): void;
111
+ private _syncFromAttributes;
112
+ private _syncOpenState;
113
+ private _activate;
114
+ private _deactivate;
115
+ private _dispatchWithLegacy;
116
+ private _isTopMost;
117
+ private _queryPanel;
118
+ private _collectFocusable;
119
+ private _focusInitial;
120
+ private _handleTab;
121
+ private _onFocusIn;
122
+ private _onInput;
123
+ private _isInteractionLocked;
124
+ private _requestDismiss;
125
+ private _handleConfirm;
126
+ private _handleCancel;
127
+ private _onClick;
128
+ private _onKeyDown;
129
+ protected render(): void;
130
+ }
131
+ export {};
132
+ //# sourceMappingURL=ui-alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/ui-alert-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAoT7C,KAAK,iBAAiB,GAAG,aAAa,GAAG,QAAQ,CAAC;AAClD,KAAK,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,KAAK,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AACvD,KAAK,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC5D,KAAK,0BAA0B,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AAE1F,MAAM,WAAW,4BAA4B;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAA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ase';
2
+ export declare class UIAlert extends ElementBase {
3
+ static get observedAttributes(): string[];
4
+ private _dismissBtn;
5
+ constructor();
6
+ disconnectedCallback(): void;
7
+ get open(): boolean;
8
+ set open(value: boolean);
9
+ private _onDismiss;
10
+ protected render(): void;
11
+ protected shouldRenderOnAttributeChange(_name: string, _oldValue: string | null, _newValue: string | null): boolean;
12
+ }
13
+ //# sourceMappingURL=ui-alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-alert.d.ts","sourceRoot":"","sources":["../../src/components/ui-alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA8L7C,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,KAAK,kBAAkB,aAE5B;IAED,OAAO,CAAC,WAAW,CAAkC;;IAOrD,oBAAoB;IAQpB,IAAI,IAAI,IAIQ,OAAO,CAFtB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,EAGtB;IAED,OAAO,CAAC,UAAU;IASlB,SAAS,CAAC,MAAM;cAiCG,6BAA6B,CAC9C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO;CAGX"}
@@ -0,0 +1,11 @@
1
+ import { ElementBase } from '../ElementBase';
2
+ export declare class UIAppHeader extends ElementBase {
3
+ static get observedAttributes(): string[];
4
+ constructor();
5
+ connectedCallback(): void;
6
+ disconnectedCallback(): void;
7
+ private _onRootClick;
8
+ protected render(): void;
9
+ protected shouldRenderOnAttributeChange(_name: string, _oldValue: string | null, _newValue: string | null): boolean;
10
+ }
11
+ //# sourceMappingURL=ui-app-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-app-header.d.ts","sourceRoot":"","sources":["../../src/components/ui-app-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAuH7C,qBAAa,WAAY,SAAQ,WAAW;IAC1C,MAAM,KAAK,kBAAkB,aAE5B;;IAOD,iBAAiB;IAKjB,oBAAoB;IAKpB,OAAO,CAAC,YAAY;IAYpB,SAAS,CAAC,MAAM;cA4BG,6BAA6B,CAC9C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,OAAO;CAGX"}