@deepfuture/dui-components 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/accordion/accordion-context.d.ts +15 -0
  2. package/accordion/accordion-context.js +3 -0
  3. package/accordion/accordion-item.d.ts +22 -0
  4. package/accordion/accordion-item.js +254 -0
  5. package/accordion/accordion.d.ts +20 -0
  6. package/accordion/accordion.js +185 -0
  7. package/accordion/index.d.ts +3 -0
  8. package/accordion/index.js +2 -0
  9. package/accordion/register.d.ts +1 -0
  10. package/accordion/register.js +8 -0
  11. package/alert-dialog/alert-dialog-close.d.ts +15 -0
  12. package/alert-dialog/alert-dialog-close.js +35 -0
  13. package/alert-dialog/alert-dialog-context.d.ts +13 -0
  14. package/alert-dialog/alert-dialog-context.js +3 -0
  15. package/alert-dialog/alert-dialog-popup.d.ts +34 -0
  16. package/alert-dialog/alert-dialog-popup.js +260 -0
  17. package/alert-dialog/alert-dialog-trigger.d.ts +15 -0
  18. package/alert-dialog/alert-dialog-trigger.js +52 -0
  19. package/alert-dialog/alert-dialog.d.ts +30 -0
  20. package/alert-dialog/alert-dialog.js +97 -0
  21. package/alert-dialog/index.d.ts +6 -0
  22. package/alert-dialog/index.js +4 -0
  23. package/alert-dialog/register.d.ts +1 -0
  24. package/alert-dialog/register.js +16 -0
  25. package/all.d.ts +86 -0
  26. package/all.js +191 -0
  27. package/avatar/avatar.d.ts +41 -0
  28. package/avatar/avatar.js +188 -0
  29. package/avatar/index.d.ts +2 -0
  30. package/avatar/index.js +1 -0
  31. package/avatar/register.d.ts +1 -0
  32. package/avatar/register.js +4 -0
  33. package/badge/badge.d.ts +14 -0
  34. package/badge/badge.js +43 -0
  35. package/badge/index.d.ts +2 -0
  36. package/badge/index.js +1 -0
  37. package/badge/register.d.ts +1 -0
  38. package/badge/register.js +4 -0
  39. package/breadcrumb/breadcrumb-ellipsis.d.ts +14 -0
  40. package/breadcrumb/breadcrumb-ellipsis.js +39 -0
  41. package/breadcrumb/breadcrumb-item.d.ts +13 -0
  42. package/breadcrumb/breadcrumb-item.js +31 -0
  43. package/breadcrumb/breadcrumb-link.d.ts +14 -0
  44. package/breadcrumb/breadcrumb-link.js +32 -0
  45. package/breadcrumb/breadcrumb-page.d.ts +13 -0
  46. package/breadcrumb/breadcrumb-page.js +36 -0
  47. package/breadcrumb/breadcrumb-separator.d.ts +14 -0
  48. package/breadcrumb/breadcrumb-separator.js +36 -0
  49. package/breadcrumb/breadcrumb.d.ts +14 -0
  50. package/breadcrumb/breadcrumb.js +38 -0
  51. package/breadcrumb/index.d.ts +6 -0
  52. package/breadcrumb/index.js +6 -0
  53. package/breadcrumb/register.d.ts +1 -0
  54. package/breadcrumb/register.js +14 -0
  55. package/button/button.d.ts +38 -0
  56. package/button/button.js +143 -0
  57. package/button/index.d.ts +2 -0
  58. package/button/index.js +1 -0
  59. package/button/register.d.ts +1 -0
  60. package/button/register.js +4 -0
  61. package/calendar/calendar.d.ts +33 -0
  62. package/calendar/calendar.js +428 -0
  63. package/calendar/index.d.ts +1 -0
  64. package/calendar/index.js +1 -0
  65. package/calendar/register.d.ts +1 -0
  66. package/calendar/register.js +4 -0
  67. package/center/center.d.ts +14 -0
  68. package/center/center.js +37 -0
  69. package/center/index.d.ts +1 -0
  70. package/center/index.js +1 -0
  71. package/center/register.d.ts +1 -0
  72. package/center/register.js +4 -0
  73. package/checkbox/checkbox-group-context.d.ts +11 -0
  74. package/checkbox/checkbox-group-context.js +3 -0
  75. package/checkbox/checkbox-group.d.ts +34 -0
  76. package/checkbox/checkbox-group.js +128 -0
  77. package/checkbox/checkbox.d.ts +46 -0
  78. package/checkbox/checkbox.js +314 -0
  79. package/checkbox/index.d.ts +3 -0
  80. package/checkbox/index.js +2 -0
  81. package/checkbox/register.d.ts +1 -0
  82. package/checkbox/register.js +8 -0
  83. package/collapsible/collapsible.d.ts +22 -0
  84. package/collapsible/collapsible.js +227 -0
  85. package/collapsible/index.d.ts +1 -0
  86. package/collapsible/index.js +1 -0
  87. package/collapsible/register.d.ts +1 -0
  88. package/collapsible/register.js +4 -0
  89. package/combobox/combobox.d.ts +46 -0
  90. package/combobox/combobox.js +524 -0
  91. package/combobox/index.d.ts +2 -0
  92. package/combobox/index.js +1 -0
  93. package/combobox/register.d.ts +1 -0
  94. package/combobox/register.js +4 -0
  95. package/command/command-context.d.ts +30 -0
  96. package/command/command-context.js +3 -0
  97. package/command/command-empty.d.ts +10 -0
  98. package/command/command-empty.js +50 -0
  99. package/command/command-group.d.ts +15 -0
  100. package/command/command-group.js +79 -0
  101. package/command/command-input.d.ts +13 -0
  102. package/command/command-input.js +106 -0
  103. package/command/command-item.d.ts +20 -0
  104. package/command/command-item.js +175 -0
  105. package/command/command-list.d.ts +9 -0
  106. package/command/command-list.js +43 -0
  107. package/command/command-score.d.ts +6 -0
  108. package/command/command-score.js +31 -0
  109. package/command/command-separator.d.ts +7 -0
  110. package/command/command-separator.js +15 -0
  111. package/command/command-shortcut.d.ts +7 -0
  112. package/command/command-shortcut.js +16 -0
  113. package/command/command.d.ts +25 -0
  114. package/command/command.js +278 -0
  115. package/command/index.d.ts +10 -0
  116. package/command/index.js +9 -0
  117. package/command/register.d.ts +1 -0
  118. package/command/register.js +22 -0
  119. package/data-table/data-table.d.ts +59 -0
  120. package/data-table/data-table.js +416 -0
  121. package/data-table/index.d.ts +2 -0
  122. package/data-table/index.js +1 -0
  123. package/data-table/register.d.ts +1 -0
  124. package/data-table/register.js +4 -0
  125. package/dialog/dialog-close.d.ts +15 -0
  126. package/dialog/dialog-close.js +35 -0
  127. package/dialog/dialog-context.d.ts +13 -0
  128. package/dialog/dialog-context.js +3 -0
  129. package/dialog/dialog-popup.d.ts +36 -0
  130. package/dialog/dialog-popup.js +277 -0
  131. package/dialog/dialog-trigger.d.ts +15 -0
  132. package/dialog/dialog-trigger.js +52 -0
  133. package/dialog/dialog.d.ts +30 -0
  134. package/dialog/dialog.js +97 -0
  135. package/dialog/index.d.ts +6 -0
  136. package/dialog/index.js +4 -0
  137. package/dialog/register.d.ts +1 -0
  138. package/dialog/register.js +16 -0
  139. package/dropzone/dropzone.d.ts +74 -0
  140. package/dropzone/dropzone.js +357 -0
  141. package/dropzone/index.d.ts +2 -0
  142. package/dropzone/index.js +1 -0
  143. package/dropzone/register.d.ts +1 -0
  144. package/dropzone/register.js +4 -0
  145. package/field/field-context.d.ts +20 -0
  146. package/field/field-context.js +2 -0
  147. package/field/index.d.ts +2 -0
  148. package/field/index.js +1 -0
  149. package/global.d.ts +189 -0
  150. package/hstack/hstack.d.ts +25 -0
  151. package/hstack/hstack.js +141 -0
  152. package/hstack/index.d.ts +2 -0
  153. package/hstack/index.js +1 -0
  154. package/hstack/register.d.ts +1 -0
  155. package/hstack/register.js +4 -0
  156. package/icon/icon.d.ts +16 -0
  157. package/icon/icon.js +34 -0
  158. package/icon/index.d.ts +1 -0
  159. package/icon/index.js +1 -0
  160. package/icon/register.d.ts +1 -0
  161. package/icon/register.js +4 -0
  162. package/input/index.d.ts +1 -0
  163. package/input/index.js +1 -0
  164. package/input/input.d.ts +47 -0
  165. package/input/input.js +205 -0
  166. package/input/register.d.ts +1 -0
  167. package/input/register.js +4 -0
  168. package/link/index.d.ts +1 -0
  169. package/link/index.js +1 -0
  170. package/link/link.d.ts +27 -0
  171. package/link/link.js +57 -0
  172. package/link/register.d.ts +1 -0
  173. package/link/register.js +4 -0
  174. package/menu/index.d.ts +2 -0
  175. package/menu/index.js +2 -0
  176. package/menu/menu-item.d.ts +17 -0
  177. package/menu/menu-item.js +62 -0
  178. package/menu/menu.d.ts +15 -0
  179. package/menu/menu.js +228 -0
  180. package/menu/register.d.ts +1 -0
  181. package/menu/register.js +8 -0
  182. package/menubar/index.d.ts +2 -0
  183. package/menubar/index.js +1 -0
  184. package/menubar/menubar-context.d.ts +9 -0
  185. package/menubar/menubar-context.js +2 -0
  186. package/menubar/menubar.d.ts +19 -0
  187. package/menubar/menubar.js +130 -0
  188. package/menubar/register.d.ts +1 -0
  189. package/menubar/register.js +4 -0
  190. package/number-field/index.d.ts +1 -0
  191. package/number-field/index.js +1 -0
  192. package/number-field/number-field.d.ts +34 -0
  193. package/number-field/number-field.js +326 -0
  194. package/number-field/register.d.ts +1 -0
  195. package/number-field/register.js +4 -0
  196. package/package.json +217 -0
  197. package/page-inset/index.d.ts +1 -0
  198. package/page-inset/index.js +1 -0
  199. package/page-inset/page-inset.d.ts +28 -0
  200. package/page-inset/page-inset.js +103 -0
  201. package/page-inset/register.d.ts +1 -0
  202. package/page-inset/register.js +4 -0
  203. package/popover/index.d.ts +6 -0
  204. package/popover/index.js +4 -0
  205. package/popover/popover-close.d.ts +13 -0
  206. package/popover/popover-close.js +33 -0
  207. package/popover/popover-context.d.ts +17 -0
  208. package/popover/popover-context.js +3 -0
  209. package/popover/popover-popup.d.ts +20 -0
  210. package/popover/popover-popup.js +176 -0
  211. package/popover/popover-trigger.d.ts +13 -0
  212. package/popover/popover-trigger.js +57 -0
  213. package/popover/popover.d.ts +30 -0
  214. package/popover/popover.js +140 -0
  215. package/popover/register.d.ts +1 -0
  216. package/popover/register.js +16 -0
  217. package/portal/index.d.ts +2 -0
  218. package/portal/index.js +1 -0
  219. package/portal/portal.d.ts +29 -0
  220. package/portal/portal.js +115 -0
  221. package/portal/register.d.ts +1 -0
  222. package/portal/register.js +4 -0
  223. package/preview-card/index.d.ts +5 -0
  224. package/preview-card/index.js +3 -0
  225. package/preview-card/preview-card-context.d.ts +16 -0
  226. package/preview-card/preview-card-context.js +3 -0
  227. package/preview-card/preview-card-popup.d.ts +16 -0
  228. package/preview-card/preview-card-popup.js +167 -0
  229. package/preview-card/preview-card-trigger.d.ts +13 -0
  230. package/preview-card/preview-card-trigger.js +75 -0
  231. package/preview-card/preview-card.d.ts +34 -0
  232. package/preview-card/preview-card.js +164 -0
  233. package/preview-card/register.d.ts +1 -0
  234. package/preview-card/register.js +12 -0
  235. package/progress/index.d.ts +1 -0
  236. package/progress/index.js +1 -0
  237. package/progress/progress.d.ts +19 -0
  238. package/progress/progress.js +94 -0
  239. package/progress/register.d.ts +1 -0
  240. package/progress/register.js +4 -0
  241. package/radio/index.d.ts +3 -0
  242. package/radio/index.js +2 -0
  243. package/radio/radio-group-context.d.ts +11 -0
  244. package/radio/radio-group-context.js +2 -0
  245. package/radio/radio-group.d.ts +37 -0
  246. package/radio/radio-group.js +135 -0
  247. package/radio/radio.d.ts +27 -0
  248. package/radio/radio.js +204 -0
  249. package/radio/register.d.ts +1 -0
  250. package/radio/register.js +8 -0
  251. package/scroll-area/index.d.ts +1 -0
  252. package/scroll-area/index.js +1 -0
  253. package/scroll-area/register.d.ts +1 -0
  254. package/scroll-area/register.js +4 -0
  255. package/scroll-area/scroll-area.d.ts +38 -0
  256. package/scroll-area/scroll-area.js +453 -0
  257. package/select/index.d.ts +2 -0
  258. package/select/index.js +1 -0
  259. package/select/register.d.ts +1 -0
  260. package/select/register.js +4 -0
  261. package/select/select.d.ts +36 -0
  262. package/select/select.js +404 -0
  263. package/separator/index.d.ts +1 -0
  264. package/separator/index.js +1 -0
  265. package/separator/register.d.ts +1 -0
  266. package/separator/register.js +4 -0
  267. package/separator/separator.d.ts +12 -0
  268. package/separator/separator.js +50 -0
  269. package/sidebar/index.d.ts +16 -0
  270. package/sidebar/index.js +13 -0
  271. package/sidebar/register.d.ts +1 -0
  272. package/sidebar/register.js +52 -0
  273. package/sidebar/sidebar-content.d.ts +14 -0
  274. package/sidebar/sidebar-content.js +30 -0
  275. package/sidebar/sidebar-context.d.ts +15 -0
  276. package/sidebar/sidebar-context.js +3 -0
  277. package/sidebar/sidebar-footer.d.ts +12 -0
  278. package/sidebar/sidebar-footer.js +21 -0
  279. package/sidebar/sidebar-group-label.d.ts +17 -0
  280. package/sidebar/sidebar-group-label.js +49 -0
  281. package/sidebar/sidebar-group.d.ts +15 -0
  282. package/sidebar/sidebar-group.js +29 -0
  283. package/sidebar/sidebar-header.d.ts +12 -0
  284. package/sidebar/sidebar-header.js +21 -0
  285. package/sidebar/sidebar-inset.d.ts +15 -0
  286. package/sidebar/sidebar-inset.js +29 -0
  287. package/sidebar/sidebar-menu-button.d.ts +31 -0
  288. package/sidebar/sidebar-menu-button.js +201 -0
  289. package/sidebar/sidebar-menu-item.d.ts +12 -0
  290. package/sidebar/sidebar-menu-item.js +20 -0
  291. package/sidebar/sidebar-menu.d.ts +14 -0
  292. package/sidebar/sidebar-menu.js +30 -0
  293. package/sidebar/sidebar-provider.d.ts +34 -0
  294. package/sidebar/sidebar-provider.js +157 -0
  295. package/sidebar/sidebar-separator.d.ts +12 -0
  296. package/sidebar/sidebar-separator.js +24 -0
  297. package/sidebar/sidebar-trigger.d.ts +16 -0
  298. package/sidebar/sidebar-trigger.js +50 -0
  299. package/sidebar/sidebar.d.ts +21 -0
  300. package/sidebar/sidebar.js +228 -0
  301. package/slider/index.d.ts +1 -0
  302. package/slider/index.js +1 -0
  303. package/slider/register.d.ts +1 -0
  304. package/slider/register.js +4 -0
  305. package/slider/slider.d.ts +37 -0
  306. package/slider/slider.js +268 -0
  307. package/spinner/index.d.ts +1 -0
  308. package/spinner/index.js +1 -0
  309. package/spinner/register.d.ts +1 -0
  310. package/spinner/register.js +4 -0
  311. package/spinner/spinner.d.ts +18 -0
  312. package/spinner/spinner.js +138 -0
  313. package/switch/index.d.ts +1 -0
  314. package/switch/index.js +1 -0
  315. package/switch/register.d.ts +1 -0
  316. package/switch/register.js +4 -0
  317. package/switch/switch.d.ts +29 -0
  318. package/switch/switch.js +201 -0
  319. package/tabs/index.d.ts +6 -0
  320. package/tabs/index.js +5 -0
  321. package/tabs/register.d.ts +1 -0
  322. package/tabs/register.js +10 -0
  323. package/tabs/tab.d.ts +16 -0
  324. package/tabs/tab.js +98 -0
  325. package/tabs/tabs-context.d.ts +8 -0
  326. package/tabs/tabs-context.js +2 -0
  327. package/tabs/tabs-indicator.d.ts +11 -0
  328. package/tabs/tabs-indicator.js +27 -0
  329. package/tabs/tabs-list.d.ts +17 -0
  330. package/tabs/tabs-list.js +85 -0
  331. package/tabs/tabs-panel.d.ts +18 -0
  332. package/tabs/tabs-panel.js +85 -0
  333. package/tabs/tabs.d.ts +24 -0
  334. package/tabs/tabs.js +111 -0
  335. package/textarea/index.d.ts +2 -0
  336. package/textarea/index.js +1 -0
  337. package/textarea/register.d.ts +1 -0
  338. package/textarea/register.js +4 -0
  339. package/textarea/textarea.d.ts +37 -0
  340. package/textarea/textarea.js +170 -0
  341. package/toggle/index.d.ts +3 -0
  342. package/toggle/index.js +2 -0
  343. package/toggle/register.d.ts +1 -0
  344. package/toggle/register.js +8 -0
  345. package/toggle/toggle-group-context.d.ts +9 -0
  346. package/toggle/toggle-group-context.js +2 -0
  347. package/toggle/toggle-group.d.ts +27 -0
  348. package/toggle/toggle-group.js +163 -0
  349. package/toggle/toggle.d.ts +25 -0
  350. package/toggle/toggle.js +124 -0
  351. package/toolbar/index.d.ts +1 -0
  352. package/toolbar/index.js +1 -0
  353. package/toolbar/register.d.ts +1 -0
  354. package/toolbar/register.js +4 -0
  355. package/toolbar/toolbar.d.ts +15 -0
  356. package/toolbar/toolbar.js +89 -0
  357. package/tooltip/index.d.ts +5 -0
  358. package/tooltip/index.js +3 -0
  359. package/tooltip/register.d.ts +1 -0
  360. package/tooltip/register.js +12 -0
  361. package/tooltip/tooltip-context.d.ts +17 -0
  362. package/tooltip/tooltip-context.js +3 -0
  363. package/tooltip/tooltip-popup.d.ts +16 -0
  364. package/tooltip/tooltip-popup.js +162 -0
  365. package/tooltip/tooltip-trigger.d.ts +15 -0
  366. package/tooltip/tooltip-trigger.js +110 -0
  367. package/tooltip/tooltip.d.ts +36 -0
  368. package/tooltip/tooltip.js +176 -0
  369. package/trunc/index.d.ts +1 -0
  370. package/trunc/index.js +1 -0
  371. package/trunc/register.d.ts +1 -0
  372. package/trunc/register.js +4 -0
  373. package/trunc/trunc.d.ts +19 -0
  374. package/trunc/trunc.js +68 -0
  375. package/vstack/index.d.ts +1 -0
  376. package/vstack/index.js +1 -0
  377. package/vstack/register.d.ts +1 -0
  378. package/vstack/register.js +4 -0
  379. package/vstack/vstack.d.ts +17 -0
  380. package/vstack/vstack.js +83 -0
@@ -0,0 +1,357 @@
1
+ /** Ported from original DUI: deep-future-app/app/client/components/dui/dropzone */
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var _a;
9
+ import { css, html, LitElement } from "lit";
10
+ import { property } from "lit/decorators.js";
11
+ import { base } from "@deepfuture/dui-core/base";
12
+ import { customEvent } from "@deepfuture/dui-core/event";
13
+ // Event Factories
14
+ export const dropzoneDropEvent = customEvent("drop", {
15
+ bubbles: true,
16
+ composed: true,
17
+ });
18
+ export const dropAcceptedEvent = customEvent("drop-accepted", { bubbles: true, composed: true });
19
+ export const dropRejectedEvent = customEvent("drop-rejected", { bubbles: true, composed: true });
20
+ export const dropzoneDragEnterEvent = customEvent("dragenter", {
21
+ bubbles: true,
22
+ composed: true,
23
+ });
24
+ export const dropzoneDragOverEvent = customEvent("dragover", {
25
+ bubbles: true,
26
+ composed: true,
27
+ });
28
+ export const dropzoneDragLeaveEvent = customEvent("dragleave", {
29
+ bubbles: true,
30
+ composed: true,
31
+ });
32
+ export const dropzoneErrorEvent = customEvent("dropzone-error", { bubbles: true, composed: true });
33
+ /** Structural styles only — layout CSS. */
34
+ const styles = css `
35
+ :host {
36
+ display: block;
37
+ }
38
+
39
+ :host([disabled]) {
40
+ pointer-events: none;
41
+ }
42
+
43
+ :host([no-style]) [part="root"] {
44
+ all: unset;
45
+ }
46
+
47
+ [part="root"] {
48
+ text-align: center;
49
+ cursor: pointer;
50
+ transition-property: border-color, background, color, box-shadow, filter, transform;
51
+ }
52
+
53
+ input[type="file"] {
54
+ display: none;
55
+ }
56
+ `;
57
+ /**
58
+ * `<dui-dropzone>` — A drag-and-drop file upload area.
59
+ *
60
+ * @slot - Custom content for the dropzone area.
61
+ * @csspart root - The dropzone container.
62
+ *
63
+ * @fires drop - Files dropped or selected (valid or invalid).
64
+ * @fires drop-accepted - Files that passed validation.
65
+ * @fires drop-rejected - Files that failed validation.
66
+ * @fires dragenter - File dragged over the dropzone.
67
+ * @fires dragover - File hovering over the dropzone.
68
+ * @fires dragleave - File dragged away from the dropzone.
69
+ * @fires dropzone-error - Internal error (e.g. file dialog failure).
70
+ */
71
+ export class DuiDropzone extends LitElement {
72
+ static { this.tagName = "dui-dropzone"; }
73
+ static { this.styles = [base, styles]; }
74
+ static { this.ERROR_CODES = {
75
+ FILE_DIALOG_OPEN_FAILED: "FILE_DIALOG_OPEN_FAILED",
76
+ FILE_PROCESSING_FAILED: "FILE_PROCESSING_FAILED",
77
+ }; }
78
+ static { this.REJECTION_CODES = {
79
+ TOO_MANY_FILES: "TOO_MANY_FILES",
80
+ FILE_TOO_LARGE: "FILE_TOO_LARGE",
81
+ FILE_TOO_SMALL: "FILE_TOO_SMALL",
82
+ FILE_INVALID_TYPE: "FILE_INVALID_TYPE",
83
+ }; }
84
+ #accept_accessor_storage;
85
+ /** Accepted file types (e.g. "image/*,.pdf"). */
86
+ get accept() { return this.#accept_accessor_storage; }
87
+ set accept(value) { this.#accept_accessor_storage = value; }
88
+ #multiple_accessor_storage = false;
89
+ /** Allow multiple files. */
90
+ get multiple() { return this.#multiple_accessor_storage; }
91
+ set multiple(value) { this.#multiple_accessor_storage = value; }
92
+ #disabled_accessor_storage = false;
93
+ /** Disable the dropzone. */
94
+ get disabled() { return this.#disabled_accessor_storage; }
95
+ set disabled(value) { this.#disabled_accessor_storage = value; }
96
+ #maxFiles_accessor_storage = Infinity;
97
+ /** Maximum number of files allowed. */
98
+ get maxFiles() { return this.#maxFiles_accessor_storage; }
99
+ set maxFiles(value) { this.#maxFiles_accessor_storage = value; }
100
+ #maxSize_accessor_storage = Infinity;
101
+ /** Maximum file size in bytes. */
102
+ get maxSize() { return this.#maxSize_accessor_storage; }
103
+ set maxSize(value) { this.#maxSize_accessor_storage = value; }
104
+ #minSize_accessor_storage = 0;
105
+ /** Minimum file size in bytes. */
106
+ get minSize() { return this.#minSize_accessor_storage; }
107
+ set minSize(value) { this.#minSize_accessor_storage = value; }
108
+ #autoFocus_accessor_storage = false;
109
+ /** Auto-focus the dropzone on mount. */
110
+ get autoFocus() { return this.#autoFocus_accessor_storage; }
111
+ set autoFocus(value) { this.#autoFocus_accessor_storage = value; }
112
+ #noStyle_accessor_storage = false;
113
+ /** Disable default dropzone styling. */
114
+ get noStyle() { return this.#noStyle_accessor_storage; }
115
+ set noStyle(value) { this.#noStyle_accessor_storage = value; }
116
+ #isDragOver_accessor_storage = false;
117
+ get #isDragOver() { return this.#isDragOver_accessor_storage; }
118
+ set #isDragOver(value) { this.#isDragOver_accessor_storage = value; }
119
+ connectedCallback() {
120
+ super.connectedCallback();
121
+ if (this.autoFocus && !this.disabled) {
122
+ this.updateComplete.then(() => {
123
+ this.shadowRoot?.querySelector("[part='root']")?.focus();
124
+ });
125
+ }
126
+ }
127
+ /** Opens the native file dialog programmatically. */
128
+ openFileDialog() {
129
+ if (this.disabled)
130
+ return;
131
+ const input = this.shadowRoot?.querySelector('input[type="file"]');
132
+ if (!input)
133
+ return;
134
+ try {
135
+ input.click();
136
+ }
137
+ catch (error) {
138
+ this.dispatchEvent(dropzoneErrorEvent({
139
+ error,
140
+ code: _a.ERROR_CODES.FILE_DIALOG_OPEN_FAILED,
141
+ }));
142
+ }
143
+ }
144
+ #handleDragEnter = (e) => {
145
+ e.preventDefault();
146
+ e.stopPropagation();
147
+ if (this.disabled)
148
+ return;
149
+ this.#isDragOver = true;
150
+ this.dispatchEvent(dropzoneDragEnterEvent());
151
+ };
152
+ #handleDragOver = (e) => {
153
+ e.preventDefault();
154
+ e.stopPropagation();
155
+ if (this.disabled)
156
+ return;
157
+ if (e.dataTransfer) {
158
+ e.dataTransfer.dropEffect = "copy";
159
+ }
160
+ this.dispatchEvent(dropzoneDragOverEvent());
161
+ };
162
+ #handleDragLeave = (e) => {
163
+ e.preventDefault();
164
+ e.stopPropagation();
165
+ if (this.disabled)
166
+ return;
167
+ this.#isDragOver = false;
168
+ this.dispatchEvent(dropzoneDragLeaveEvent());
169
+ };
170
+ #handleDrop = (e) => {
171
+ e.preventDefault();
172
+ e.stopPropagation();
173
+ if (this.disabled)
174
+ return;
175
+ this.#isDragOver = false;
176
+ try {
177
+ const files = Array.from(e.dataTransfer?.files ?? []);
178
+ this.#processFiles(files);
179
+ }
180
+ catch (error) {
181
+ this.dispatchEvent(dropzoneErrorEvent({
182
+ error,
183
+ code: _a.ERROR_CODES.FILE_PROCESSING_FAILED,
184
+ }));
185
+ }
186
+ };
187
+ #handleClick = () => {
188
+ if (this.disabled)
189
+ return;
190
+ this.openFileDialog();
191
+ };
192
+ #handleKeyDown = (e) => {
193
+ if (this.disabled)
194
+ return;
195
+ if (e.key === "Enter" || e.key === " ") {
196
+ e.preventDefault();
197
+ this.openFileDialog();
198
+ }
199
+ };
200
+ #handleInputChange = (e) => {
201
+ if (this.disabled)
202
+ return;
203
+ const input = e.target;
204
+ const files = Array.from(input.files ?? []);
205
+ try {
206
+ this.#processFiles(files);
207
+ }
208
+ catch (error) {
209
+ this.dispatchEvent(dropzoneErrorEvent({
210
+ error,
211
+ code: _a.ERROR_CODES.FILE_PROCESSING_FAILED,
212
+ }));
213
+ }
214
+ finally {
215
+ input.value = "";
216
+ }
217
+ };
218
+ #processFiles(files) {
219
+ const { acceptedFiles, rejectedFiles } = this.#validateFiles(files);
220
+ this.dispatchEvent(dropzoneDropEvent({ acceptedFiles, rejectedFiles }));
221
+ if (acceptedFiles.length > 0) {
222
+ this.dispatchEvent(dropAcceptedEvent({ acceptedFiles }));
223
+ }
224
+ if (rejectedFiles.length > 0) {
225
+ this.dispatchEvent(dropRejectedEvent({ rejectedFiles }));
226
+ }
227
+ }
228
+ #validateFiles(files) {
229
+ const acceptedFiles = [];
230
+ const rejectedFiles = [];
231
+ const maxAllowed = this.multiple ? this.maxFiles : 1;
232
+ if (files.length > maxAllowed) {
233
+ for (const file of files) {
234
+ rejectedFiles.push({
235
+ file,
236
+ errors: [
237
+ {
238
+ code: _a.REJECTION_CODES.TOO_MANY_FILES,
239
+ message: this.multiple
240
+ ? `Too many files. Maximum allowed is ${this.maxFiles}.`
241
+ : "Multiple files not allowed.",
242
+ },
243
+ ],
244
+ });
245
+ }
246
+ return { acceptedFiles, rejectedFiles };
247
+ }
248
+ for (const file of files) {
249
+ const errors = [];
250
+ if (file.size > this.maxSize) {
251
+ errors.push({
252
+ code: _a.REJECTION_CODES.FILE_TOO_LARGE,
253
+ message: `File is too large. Maximum size is ${this.maxSize} bytes.`,
254
+ });
255
+ }
256
+ if (file.size < this.minSize) {
257
+ errors.push({
258
+ code: _a.REJECTION_CODES.FILE_TOO_SMALL,
259
+ message: `File is too small. Minimum size is ${this.minSize} bytes.`,
260
+ });
261
+ }
262
+ if (this.accept && !this.#isValidFileType(file)) {
263
+ errors.push({
264
+ code: _a.REJECTION_CODES.FILE_INVALID_TYPE,
265
+ message: `File type not accepted. Allowed types: ${this.accept}`,
266
+ });
267
+ }
268
+ if (errors.length > 0) {
269
+ rejectedFiles.push({ file, errors });
270
+ }
271
+ else {
272
+ acceptedFiles.push(file);
273
+ }
274
+ }
275
+ return { acceptedFiles, rejectedFiles };
276
+ }
277
+ #isValidFileType(file) {
278
+ if (!this.accept)
279
+ return true;
280
+ const acceptedTypes = this.accept
281
+ .split(",")
282
+ .map((type) => type.trim().toLowerCase());
283
+ for (const acceptedType of acceptedTypes) {
284
+ if (acceptedType.startsWith(".")) {
285
+ if (file.name.toLowerCase().endsWith(acceptedType)) {
286
+ return true;
287
+ }
288
+ }
289
+ else if (acceptedType.endsWith("/*")) {
290
+ const baseType = acceptedType.slice(0, -2);
291
+ if (file.type.toLowerCase().startsWith(baseType)) {
292
+ return true;
293
+ }
294
+ }
295
+ else {
296
+ if (file.type.toLowerCase() === acceptedType) {
297
+ return true;
298
+ }
299
+ }
300
+ }
301
+ return false;
302
+ }
303
+ render() {
304
+ return html `
305
+ <div
306
+ part="root"
307
+ tabindex="${this.disabled ? -1 : 0}"
308
+ ?data-dragover="${this.#isDragOver}"
309
+ @dragenter="${this.#handleDragEnter}"
310
+ @dragover="${this.#handleDragOver}"
311
+ @dragleave="${this.#handleDragLeave}"
312
+ @drop="${this.#handleDrop}"
313
+ @click="${this.#handleClick}"
314
+ @keydown="${this.#handleKeyDown}"
315
+ >
316
+ <slot>
317
+ <span>Drag and drop files here or click to select</span>
318
+ </slot>
319
+ </div>
320
+ <input
321
+ type="file"
322
+ ?multiple="${this.multiple}"
323
+ accept="${this.accept || ""}"
324
+ ?disabled="${this.disabled}"
325
+ @change="${this.#handleInputChange}"
326
+ tabindex="-1"
327
+ aria-hidden="true"
328
+ hidden
329
+ />
330
+ `;
331
+ }
332
+ }
333
+ _a = DuiDropzone;
334
+ __decorate([
335
+ property({ type: String, reflect: true })
336
+ ], DuiDropzone.prototype, "accept", null);
337
+ __decorate([
338
+ property({ type: Boolean, reflect: true })
339
+ ], DuiDropzone.prototype, "multiple", null);
340
+ __decorate([
341
+ property({ type: Boolean, reflect: true })
342
+ ], DuiDropzone.prototype, "disabled", null);
343
+ __decorate([
344
+ property({ type: Number, reflect: true, attribute: "max-files" })
345
+ ], DuiDropzone.prototype, "maxFiles", null);
346
+ __decorate([
347
+ property({ type: Number, reflect: true, attribute: "max-size" })
348
+ ], DuiDropzone.prototype, "maxSize", null);
349
+ __decorate([
350
+ property({ type: Number, reflect: true, attribute: "min-size" })
351
+ ], DuiDropzone.prototype, "minSize", null);
352
+ __decorate([
353
+ property({ type: Boolean, reflect: true, attribute: "auto-focus" })
354
+ ], DuiDropzone.prototype, "autoFocus", null);
355
+ __decorate([
356
+ property({ type: Boolean, reflect: true, attribute: "no-style" })
357
+ ], DuiDropzone.prototype, "noStyle", null);
@@ -0,0 +1,2 @@
1
+ export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
2
+ export type { DropzoneErrorCode, DropzoneRejectionCode, FileRejectionError, RejectedFile, DropzoneDropDetail, DropzoneAcceptedDetail, DropzoneRejectedDetail, DropzoneErrorDetail, } from "./dropzone.js";
@@ -0,0 +1 @@
1
+ export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiDropzone } from "./index.js";
2
+ if (!customElements.get(DuiDropzone.tagName)) {
3
+ customElements.define(DuiDropzone.tagName, DuiDropzone);
4
+ }
@@ -0,0 +1,20 @@
1
+ export type FieldContext = {
2
+ readonly fieldId: string;
3
+ readonly labelId: string;
4
+ readonly controlId: string;
5
+ readonly descriptionId: string;
6
+ readonly errorId: string;
7
+ readonly disabled: boolean;
8
+ readonly invalid: boolean;
9
+ readonly dirty: boolean;
10
+ readonly touched: boolean;
11
+ readonly filled: boolean;
12
+ readonly focused: boolean;
13
+ readonly markTouched: () => void;
14
+ readonly markDirty: () => void;
15
+ readonly setFocused: (focused: boolean) => void;
16
+ readonly setFilled: (filled: boolean) => void;
17
+ };
18
+ export declare const fieldContext: {
19
+ __context__: FieldContext;
20
+ };
@@ -0,0 +1,2 @@
1
+ import { createContext } from "@lit/context";
2
+ export const fieldContext = createContext(Symbol("dui-field"));
@@ -0,0 +1,2 @@
1
+ export { fieldContext } from "./field-context.js";
2
+ export type { FieldContext } from "./field-context.js";
package/field/index.js ADDED
@@ -0,0 +1 @@
1
+ export { fieldContext } from "./field-context.js";
package/global.d.ts ADDED
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Global HTMLElementTagNameMap declarations for DUI components.
3
+ * Provides type-safe `document.querySelector("dui-button")` etc.
4
+ *
5
+ * These declarations are automatically available when consuming
6
+ * @deepfuture/dui-components via TypeScript.
7
+ */
8
+
9
+ import type { DuiAccordion } from "./accordion/accordion.js";
10
+ import type { DuiAccordionItem } from "./accordion/accordion-item.js";
11
+ import type { DuiAlertDialog } from "./alert-dialog/alert-dialog.js";
12
+ import type { DuiAlertDialogTrigger } from "./alert-dialog/alert-dialog-trigger.js";
13
+ import type { DuiAlertDialogPopup } from "./alert-dialog/alert-dialog-popup.js";
14
+ import type { DuiAlertDialogClose } from "./alert-dialog/alert-dialog-close.js";
15
+ import type { DuiAvatar } from "./avatar/avatar.js";
16
+ import type { DuiBadge } from "./badge/badge.js";
17
+ import type { DuiBreadcrumb } from "./breadcrumb/breadcrumb.js";
18
+ import type { DuiBreadcrumbItem } from "./breadcrumb/breadcrumb-item.js";
19
+ import type { DuiBreadcrumbLink } from "./breadcrumb/breadcrumb-link.js";
20
+ import type { DuiBreadcrumbPage } from "./breadcrumb/breadcrumb-page.js";
21
+ import type { DuiBreadcrumbSeparator } from "./breadcrumb/breadcrumb-separator.js";
22
+ import type { DuiBreadcrumbEllipsis } from "./breadcrumb/breadcrumb-ellipsis.js";
23
+ import type { DuiButton } from "./button/button.js";
24
+ import type { DuiCalendar } from "./calendar/calendar.js";
25
+ import type { DuiCenter } from "./center/center.js";
26
+ import type { DuiCheckbox } from "./checkbox/checkbox.js";
27
+ import type { DuiCheckboxGroup } from "./checkbox/checkbox-group.js";
28
+ import type { DuiCollapsible } from "./collapsible/collapsible.js";
29
+ import type { DuiCombobox } from "./combobox/combobox.js";
30
+ import type { DuiCommand } from "./command/command.js";
31
+ import type { DuiCommandInput } from "./command/command-input.js";
32
+ import type { DuiCommandList } from "./command/command-list.js";
33
+ import type { DuiCommandGroup } from "./command/command-group.js";
34
+ import type { DuiCommandItem } from "./command/command-item.js";
35
+ import type { DuiCommandEmpty } from "./command/command-empty.js";
36
+ import type { DuiCommandSeparator } from "./command/command-separator.js";
37
+ import type { DuiCommandShortcut } from "./command/command-shortcut.js";
38
+ import type { DuiDataTable } from "./data-table/data-table.js";
39
+ import type { DuiDialog } from "./dialog/dialog.js";
40
+ import type { DuiDialogTrigger } from "./dialog/dialog-trigger.js";
41
+ import type { DuiDialogPopup } from "./dialog/dialog-popup.js";
42
+ import type { DuiDialogClose } from "./dialog/dialog-close.js";
43
+ import type { DuiDropzone } from "./dropzone/dropzone.js";
44
+ import type { DuiHstack } from "./hstack/hstack.js";
45
+ import type { DuiIcon } from "./icon/icon.js";
46
+ import type { DuiInput } from "./input/input.js";
47
+ import type { DuiLink } from "./link/link.js";
48
+ import type { DuiMenu } from "./menu/menu.js";
49
+ import type { DuiMenuItem } from "./menu/menu-item.js";
50
+ import type { DuiMenubar } from "./menubar/menubar.js";
51
+ import type { DuiNumberField } from "./number-field/number-field.js";
52
+ import type { DuiPageInset } from "./page-inset/page-inset.js";
53
+ import type { DuiPopover } from "./popover/popover.js";
54
+ import type { DuiPopoverTrigger } from "./popover/popover-trigger.js";
55
+ import type { DuiPopoverPopup } from "./popover/popover-popup.js";
56
+ import type { DuiPopoverClose } from "./popover/popover-close.js";
57
+ import type { DuiPortal } from "./portal/portal.js";
58
+ import type { DuiPreviewCard } from "./preview-card/preview-card.js";
59
+ import type { DuiPreviewCardTrigger } from "./preview-card/preview-card-trigger.js";
60
+ import type { DuiPreviewCardPopup } from "./preview-card/preview-card-popup.js";
61
+ import type { DuiProgress } from "./progress/progress.js";
62
+ import type { DuiRadio } from "./radio/radio.js";
63
+ import type { DuiRadioGroup } from "./radio/radio-group.js";
64
+ import type { DuiScrollArea } from "./scroll-area/scroll-area.js";
65
+ import type { DuiSelect } from "./select/select.js";
66
+ import type { DuiSeparator } from "./separator/separator.js";
67
+ import type { DuiSidebarProvider } from "./sidebar/sidebar-provider.js";
68
+ import type { DuiSidebar } from "./sidebar/sidebar.js";
69
+ import type { DuiSidebarTrigger } from "./sidebar/sidebar-trigger.js";
70
+ import type { DuiSidebarContent } from "./sidebar/sidebar-content.js";
71
+ import type { DuiSidebarHeader } from "./sidebar/sidebar-header.js";
72
+ import type { DuiSidebarFooter } from "./sidebar/sidebar-footer.js";
73
+ import type { DuiSidebarGroup } from "./sidebar/sidebar-group.js";
74
+ import type { DuiSidebarGroupLabel } from "./sidebar/sidebar-group-label.js";
75
+ import type { DuiSidebarMenu } from "./sidebar/sidebar-menu.js";
76
+ import type { DuiSidebarMenuItem } from "./sidebar/sidebar-menu-item.js";
77
+ import type { DuiSidebarMenuButton } from "./sidebar/sidebar-menu-button.js";
78
+ import type { DuiSidebarSeparator } from "./sidebar/sidebar-separator.js";
79
+ import type { DuiSidebarInset } from "./sidebar/sidebar-inset.js";
80
+ import type { DuiSlider } from "./slider/slider.js";
81
+ import type { DuiSpinner } from "./spinner/spinner.js";
82
+ import type { DuiSwitch } from "./switch/switch.js";
83
+ import type { DuiTabs } from "./tabs/tabs.js";
84
+ import type { DuiTabsList } from "./tabs/tabs-list.js";
85
+ import type { DuiTab } from "./tabs/tab.js";
86
+ import type { DuiTabsPanel } from "./tabs/tabs-panel.js";
87
+ import type { DuiTabsIndicator } from "./tabs/tabs-indicator.js";
88
+ import type { DuiTextarea } from "./textarea/textarea.js";
89
+ import type { DuiToggle } from "./toggle/toggle.js";
90
+ import type { DuiToggleGroup } from "./toggle/toggle-group.js";
91
+ import type { DuiToolbar } from "./toolbar/toolbar.js";
92
+ import type { DuiTooltip } from "./tooltip/tooltip.js";
93
+ import type { DuiTooltipTrigger } from "./tooltip/tooltip-trigger.js";
94
+ import type { DuiTooltipPopup } from "./tooltip/tooltip-popup.js";
95
+ import type { DuiTrunc } from "./trunc/trunc.js";
96
+ import type { DuiVstack } from "./vstack/vstack.js";
97
+
98
+ declare global {
99
+ interface HTMLElementTagNameMap {
100
+ "dui-accordion": DuiAccordion;
101
+ "dui-accordion-item": DuiAccordionItem;
102
+ "dui-alert-dialog": DuiAlertDialog;
103
+ "dui-alert-dialog-trigger": DuiAlertDialogTrigger;
104
+ "dui-alert-dialog-popup": DuiAlertDialogPopup;
105
+ "dui-alert-dialog-close": DuiAlertDialogClose;
106
+ "dui-avatar": DuiAvatar;
107
+ "dui-badge": DuiBadge;
108
+ "dui-breadcrumb": DuiBreadcrumb;
109
+ "dui-breadcrumb-item": DuiBreadcrumbItem;
110
+ "dui-breadcrumb-link": DuiBreadcrumbLink;
111
+ "dui-breadcrumb-page": DuiBreadcrumbPage;
112
+ "dui-breadcrumb-separator": DuiBreadcrumbSeparator;
113
+ "dui-breadcrumb-ellipsis": DuiBreadcrumbEllipsis;
114
+ "dui-button": DuiButton;
115
+ "dui-calendar": DuiCalendar;
116
+ "dui-center": DuiCenter;
117
+ "dui-checkbox": DuiCheckbox;
118
+ "dui-checkbox-group": DuiCheckboxGroup;
119
+ "dui-collapsible": DuiCollapsible;
120
+ "dui-combobox": DuiCombobox;
121
+ "dui-command": DuiCommand;
122
+ "dui-command-input": DuiCommandInput;
123
+ "dui-command-list": DuiCommandList;
124
+ "dui-command-group": DuiCommandGroup;
125
+ "dui-command-item": DuiCommandItem;
126
+ "dui-command-empty": DuiCommandEmpty;
127
+ "dui-command-separator": DuiCommandSeparator;
128
+ "dui-command-shortcut": DuiCommandShortcut;
129
+ "dui-data-table": DuiDataTable;
130
+ "dui-dialog": DuiDialog;
131
+ "dui-dialog-trigger": DuiDialogTrigger;
132
+ "dui-dialog-popup": DuiDialogPopup;
133
+ "dui-dialog-close": DuiDialogClose;
134
+ "dui-dropzone": DuiDropzone;
135
+ "dui-hstack": DuiHstack;
136
+ "dui-icon": DuiIcon;
137
+ "dui-input": DuiInput;
138
+ "dui-link": DuiLink;
139
+ "dui-menu": DuiMenu;
140
+ "dui-menu-item": DuiMenuItem;
141
+ "dui-menubar": DuiMenubar;
142
+ "dui-number-field": DuiNumberField;
143
+ "dui-page-inset": DuiPageInset;
144
+ "dui-popover": DuiPopover;
145
+ "dui-popover-trigger": DuiPopoverTrigger;
146
+ "dui-popover-popup": DuiPopoverPopup;
147
+ "dui-popover-close": DuiPopoverClose;
148
+ "dui-portal": DuiPortal;
149
+ "dui-preview-card": DuiPreviewCard;
150
+ "dui-preview-card-trigger": DuiPreviewCardTrigger;
151
+ "dui-preview-card-popup": DuiPreviewCardPopup;
152
+ "dui-progress": DuiProgress;
153
+ "dui-radio": DuiRadio;
154
+ "dui-radio-group": DuiRadioGroup;
155
+ "dui-scroll-area": DuiScrollArea;
156
+ "dui-select": DuiSelect;
157
+ "dui-separator": DuiSeparator;
158
+ "dui-sidebar-provider": DuiSidebarProvider;
159
+ "dui-sidebar": DuiSidebar;
160
+ "dui-sidebar-trigger": DuiSidebarTrigger;
161
+ "dui-sidebar-content": DuiSidebarContent;
162
+ "dui-sidebar-header": DuiSidebarHeader;
163
+ "dui-sidebar-footer": DuiSidebarFooter;
164
+ "dui-sidebar-group": DuiSidebarGroup;
165
+ "dui-sidebar-group-label": DuiSidebarGroupLabel;
166
+ "dui-sidebar-menu": DuiSidebarMenu;
167
+ "dui-sidebar-menu-item": DuiSidebarMenuItem;
168
+ "dui-sidebar-menu-button": DuiSidebarMenuButton;
169
+ "dui-sidebar-separator": DuiSidebarSeparator;
170
+ "dui-sidebar-inset": DuiSidebarInset;
171
+ "dui-slider": DuiSlider;
172
+ "dui-spinner": DuiSpinner;
173
+ "dui-switch": DuiSwitch;
174
+ "dui-tabs": DuiTabs;
175
+ "dui-tabs-list": DuiTabsList;
176
+ "dui-tab": DuiTab;
177
+ "dui-tabs-panel": DuiTabsPanel;
178
+ "dui-tabs-indicator": DuiTabsIndicator;
179
+ "dui-textarea": DuiTextarea;
180
+ "dui-toggle": DuiToggle;
181
+ "dui-toggle-group": DuiToggleGroup;
182
+ "dui-toolbar": DuiToolbar;
183
+ "dui-tooltip": DuiTooltip;
184
+ "dui-tooltip-trigger": DuiTooltipTrigger;
185
+ "dui-tooltip-popup": DuiTooltipPopup;
186
+ "dui-trunc": DuiTrunc;
187
+ "dui-vstack": DuiVstack;
188
+ }
189
+ }
@@ -0,0 +1,25 @@
1
+ /** Ported from original DUI: deep-future-app/app/client/components/dui/hstack */
2
+ import { LitElement, type TemplateResult } from "lit";
3
+ import { type StackGap } from "@deepfuture/dui-core/layout-types";
4
+ export type HstackAlignment = "start" | "center" | "end" | "stretch" | "baseline";
5
+ export type HstackJustify = "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch";
6
+ /**
7
+ * `<dui-hstack>` — A horizontal stack layout component.
8
+ *
9
+ * @slot - Stack content.
10
+ * @csspart root - The stack container.
11
+ * @cssprop --hstack-gap - Override gap between items.
12
+ * @cssprop --hstack-align - Override align-items.
13
+ * @cssprop --hstack-justify - Override justify-content.
14
+ */
15
+ export declare class DuiHstack extends LitElement {
16
+ static tagName: "dui-hstack";
17
+ static styles: import("lit").CSSResult[];
18
+ /** Gap between stack items. Maps to space tokens. */
19
+ accessor gap: StackGap;
20
+ /** Alignment of items on the cross axis. */
21
+ accessor align: HstackAlignment;
22
+ /** Justification of items on the main axis. */
23
+ accessor justify: HstackJustify;
24
+ render(): TemplateResult;
25
+ }