@deepfuture/dui-components 0.0.10 → 0.0.11

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 (224) hide show
  1. package/_deprecated/center/index.d.ts +1 -0
  2. package/_deprecated/center/index.js +1 -0
  3. package/_deprecated/center/register.d.ts +1 -0
  4. package/_deprecated/center/register.js +4 -0
  5. package/_deprecated/hstack/index.d.ts +2 -0
  6. package/_deprecated/hstack/index.js +1 -0
  7. package/_deprecated/hstack/register.d.ts +1 -0
  8. package/_deprecated/hstack/register.js +4 -0
  9. package/_deprecated/page-inset/index.d.ts +1 -0
  10. package/_deprecated/page-inset/index.js +1 -0
  11. package/_deprecated/page-inset/register.d.ts +1 -0
  12. package/_deprecated/page-inset/register.js +4 -0
  13. package/_deprecated/vstack/index.d.ts +1 -0
  14. package/_deprecated/vstack/index.js +1 -0
  15. package/_deprecated/vstack/register.d.ts +1 -0
  16. package/_deprecated/vstack/register.js +4 -0
  17. package/accordion/index.d.ts +2 -5
  18. package/accordion/index.js +2 -5
  19. package/accordion/register.d.ts +1 -0
  20. package/accordion/register.js +8 -0
  21. package/alert-dialog/alert-dialog.d.ts +2 -0
  22. package/alert-dialog/alert-dialog.js +12 -6
  23. package/alert-dialog/index.d.ts +4 -9
  24. package/alert-dialog/index.js +4 -9
  25. package/alert-dialog/register.d.ts +1 -0
  26. package/alert-dialog/register.js +16 -0
  27. package/all.d.ts +16 -64
  28. package/all.js +132 -144
  29. package/avatar/index.d.ts +1 -3
  30. package/avatar/index.js +1 -3
  31. package/avatar/register.d.ts +1 -0
  32. package/avatar/register.js +4 -0
  33. package/badge/index.d.ts +1 -3
  34. package/badge/index.js +1 -3
  35. package/badge/register.d.ts +1 -0
  36. package/badge/register.js +4 -0
  37. package/breadcrumb/index.d.ts +6 -13
  38. package/breadcrumb/index.js +6 -13
  39. package/breadcrumb/register.d.ts +1 -0
  40. package/breadcrumb/register.js +14 -0
  41. package/button/index.d.ts +1 -3
  42. package/button/index.js +1 -3
  43. package/button/register.d.ts +1 -0
  44. package/button/register.js +4 -0
  45. package/calendar/index.d.ts +1 -3
  46. package/calendar/index.js +1 -3
  47. package/calendar/register.d.ts +1 -0
  48. package/calendar/register.js +4 -0
  49. package/checkbox/checkbox-group.d.ts +2 -0
  50. package/checkbox/checkbox-group.js +12 -6
  51. package/checkbox/checkbox.d.ts +2 -0
  52. package/checkbox/checkbox.js +17 -11
  53. package/checkbox/index.d.ts +2 -5
  54. package/checkbox/index.js +2 -5
  55. package/checkbox/register.d.ts +1 -0
  56. package/checkbox/register.js +8 -0
  57. package/collapsible/index.d.ts +1 -3
  58. package/collapsible/index.js +1 -3
  59. package/collapsible/register.d.ts +1 -0
  60. package/collapsible/register.js +4 -0
  61. package/combobox/index.d.ts +1 -3
  62. package/combobox/index.js +1 -3
  63. package/combobox/register.d.ts +1 -0
  64. package/combobox/register.js +4 -0
  65. package/command/index.d.ts +8 -17
  66. package/command/index.js +8 -17
  67. package/command/register.d.ts +1 -0
  68. package/command/register.js +22 -0
  69. package/data-table/index.d.ts +1 -3
  70. package/data-table/index.js +1 -3
  71. package/data-table/register.d.ts +1 -0
  72. package/data-table/register.js +4 -0
  73. package/dialog/dialog.d.ts +2 -0
  74. package/dialog/dialog.js +12 -6
  75. package/dialog/index.d.ts +4 -9
  76. package/dialog/index.js +4 -9
  77. package/dialog/register.d.ts +1 -0
  78. package/dialog/register.js +16 -0
  79. package/dropzone/index.d.ts +1 -3
  80. package/dropzone/index.js +1 -3
  81. package/dropzone/register.d.ts +1 -0
  82. package/dropzone/register.js +4 -0
  83. package/global.d.ts +0 -8
  84. package/icon/index.d.ts +1 -3
  85. package/icon/index.js +1 -3
  86. package/icon/register.d.ts +1 -0
  87. package/icon/register.js +4 -0
  88. package/input/index.d.ts +1 -3
  89. package/input/index.js +1 -3
  90. package/input/input.d.ts +2 -0
  91. package/input/input.js +24 -18
  92. package/input/register.d.ts +1 -0
  93. package/input/register.js +4 -0
  94. package/link/index.d.ts +1 -3
  95. package/link/index.js +1 -3
  96. package/link/register.d.ts +1 -0
  97. package/link/register.js +4 -0
  98. package/menu/index.d.ts +2 -5
  99. package/menu/index.js +2 -5
  100. package/menu/register.d.ts +1 -0
  101. package/menu/register.js +8 -0
  102. package/menubar/index.d.ts +1 -3
  103. package/menubar/index.js +1 -3
  104. package/menubar/menubar.d.ts +2 -0
  105. package/menubar/menubar.js +11 -5
  106. package/menubar/register.d.ts +1 -0
  107. package/menubar/register.js +4 -0
  108. package/number-field/index.d.ts +1 -3
  109. package/number-field/index.js +1 -3
  110. package/number-field/number-field.d.ts +2 -0
  111. package/number-field/number-field.js +18 -12
  112. package/number-field/register.d.ts +1 -0
  113. package/number-field/register.js +4 -0
  114. package/package.json +4 -21
  115. package/popover/index.d.ts +4 -9
  116. package/popover/index.js +4 -9
  117. package/popover/popover.d.ts +2 -1
  118. package/popover/popover.js +14 -8
  119. package/popover/register.d.ts +1 -0
  120. package/popover/register.js +16 -0
  121. package/portal/index.d.ts +1 -3
  122. package/portal/index.js +1 -3
  123. package/portal/register.d.ts +1 -0
  124. package/portal/register.js +4 -0
  125. package/preview-card/index.d.ts +3 -7
  126. package/preview-card/index.js +3 -7
  127. package/preview-card/preview-card.d.ts +2 -1
  128. package/preview-card/preview-card.js +14 -8
  129. package/preview-card/register.d.ts +1 -0
  130. package/preview-card/register.js +12 -0
  131. package/progress/index.d.ts +1 -3
  132. package/progress/index.js +1 -3
  133. package/progress/register.d.ts +1 -0
  134. package/progress/register.js +4 -0
  135. package/radio/index.d.ts +2 -5
  136. package/radio/index.js +2 -5
  137. package/radio/radio-group.d.ts +2 -0
  138. package/radio/radio-group.js +12 -6
  139. package/radio/radio.d.ts +2 -0
  140. package/radio/radio.js +15 -9
  141. package/radio/register.d.ts +1 -0
  142. package/radio/register.js +8 -0
  143. package/scroll-area/index.d.ts +1 -3
  144. package/scroll-area/index.js +1 -3
  145. package/scroll-area/register.d.ts +1 -0
  146. package/scroll-area/register.js +4 -0
  147. package/scroll-area/scroll-area.js +0 -7
  148. package/select/index.d.ts +1 -3
  149. package/select/index.js +1 -3
  150. package/select/register.d.ts +1 -0
  151. package/select/register.js +4 -0
  152. package/select/select.d.ts +2 -0
  153. package/select/select.js +19 -13
  154. package/separator/index.d.ts +1 -3
  155. package/separator/index.js +1 -3
  156. package/separator/register.d.ts +1 -0
  157. package/separator/register.js +4 -0
  158. package/sidebar/index.d.ts +13 -27
  159. package/sidebar/index.js +13 -32
  160. package/sidebar/register.d.ts +1 -0
  161. package/sidebar/register.js +52 -0
  162. package/sidebar/sidebar-provider.d.ts +2 -0
  163. package/sidebar/sidebar-provider.js +12 -6
  164. package/slider/index.d.ts +1 -3
  165. package/slider/index.js +1 -3
  166. package/slider/register.d.ts +1 -0
  167. package/slider/register.js +4 -0
  168. package/spinner/index.d.ts +1 -3
  169. package/spinner/index.js +1 -3
  170. package/spinner/register.d.ts +1 -0
  171. package/spinner/register.js +4 -0
  172. package/switch/index.d.ts +1 -3
  173. package/switch/index.js +1 -3
  174. package/switch/register.d.ts +1 -0
  175. package/switch/register.js +4 -0
  176. package/switch/switch.d.ts +2 -0
  177. package/switch/switch.js +15 -9
  178. package/tabs/index.d.ts +5 -11
  179. package/tabs/index.js +5 -11
  180. package/tabs/register.d.ts +1 -0
  181. package/tabs/register.js +10 -0
  182. package/textarea/index.d.ts +1 -3
  183. package/textarea/index.js +1 -3
  184. package/textarea/register.d.ts +1 -0
  185. package/textarea/register.js +4 -0
  186. package/toggle/index.d.ts +2 -5
  187. package/toggle/index.js +2 -5
  188. package/toggle/register.d.ts +1 -0
  189. package/toggle/register.js +8 -0
  190. package/toggle/toggle-group.d.ts +2 -0
  191. package/toggle/toggle-group.js +12 -6
  192. package/toggle/toggle.d.ts +2 -0
  193. package/toggle/toggle.js +15 -9
  194. package/toolbar/index.d.ts +1 -3
  195. package/toolbar/index.js +1 -3
  196. package/toolbar/register.d.ts +1 -0
  197. package/toolbar/register.js +4 -0
  198. package/tooltip/index.d.ts +3 -7
  199. package/tooltip/index.js +3 -7
  200. package/tooltip/register.d.ts +1 -0
  201. package/tooltip/register.js +12 -0
  202. package/tooltip/tooltip.d.ts +2 -1
  203. package/tooltip/tooltip.js +14 -8
  204. package/trunc/index.d.ts +1 -3
  205. package/trunc/index.js +1 -3
  206. package/trunc/register.d.ts +1 -0
  207. package/trunc/register.js +4 -0
  208. package/README.md +0 -191
  209. package/center/index.d.ts +0 -3
  210. package/center/index.js +0 -3
  211. package/hstack/index.d.ts +0 -4
  212. package/hstack/index.js +0 -3
  213. package/page-inset/index.d.ts +0 -3
  214. package/page-inset/index.js +0 -3
  215. package/vstack/index.d.ts +0 -3
  216. package/vstack/index.js +0 -3
  217. /package/{center → _deprecated/center}/center.d.ts +0 -0
  218. /package/{center → _deprecated/center}/center.js +0 -0
  219. /package/{hstack → _deprecated/hstack}/hstack.d.ts +0 -0
  220. /package/{hstack → _deprecated/hstack}/hstack.js +0 -0
  221. /package/{page-inset → _deprecated/page-inset}/page-inset.d.ts +0 -0
  222. /package/{page-inset → _deprecated/page-inset}/page-inset.js +0 -0
  223. /package/{vstack → _deprecated/vstack}/vstack.d.ts +0 -0
  224. /package/{vstack → _deprecated/vstack}/vstack.js +0 -0
@@ -0,0 +1,8 @@
1
+ import { DuiCheckbox } from "./checkbox.js";
2
+ import { DuiCheckboxGroup } from "./checkbox-group.js";
3
+ if (!customElements.get(DuiCheckbox.tagName)) {
4
+ customElements.define(DuiCheckbox.tagName, DuiCheckbox);
5
+ }
6
+ if (!customElements.get(DuiCheckboxGroup.tagName)) {
7
+ customElements.define(DuiCheckboxGroup.tagName, DuiCheckboxGroup);
8
+ }
@@ -1,3 +1 @@
1
- import { DuiCollapsible, openChangeEvent } from "./collapsible.js";
2
- export { DuiCollapsible, openChangeEvent };
3
- export declare const collapsibleFamily: (typeof DuiCollapsible)[];
1
+ export { DuiCollapsible, openChangeEvent } from "./collapsible.js";
@@ -1,3 +1 @@
1
- import { DuiCollapsible, openChangeEvent } from "./collapsible.js";
2
- export { DuiCollapsible, openChangeEvent };
3
- export const collapsibleFamily = [DuiCollapsible];
1
+ export { DuiCollapsible, openChangeEvent } from "./collapsible.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiCollapsible } from "./collapsible.js";
2
+ if (!customElements.get(DuiCollapsible.tagName)) {
3
+ customElements.define(DuiCollapsible.tagName, DuiCollapsible);
4
+ }
@@ -1,4 +1,2 @@
1
- import { DuiCombobox, valueChangeEvent, valuesChangeEvent } from "./combobox.js";
2
- export { DuiCombobox, valueChangeEvent, valuesChangeEvent, };
3
- export declare const comboboxFamily: (typeof DuiCombobox)[];
1
+ export { DuiCombobox, valueChangeEvent, valuesChangeEvent, } from "./combobox.js";
4
2
  export type { SelectOption, ComboboxValueChangeDetail, ComboboxValuesChangeDetail, } from "./combobox.js";
package/combobox/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiCombobox, valueChangeEvent, valuesChangeEvent, } from "./combobox.js";
2
- export { DuiCombobox, valueChangeEvent, valuesChangeEvent, };
3
- export const comboboxFamily = [DuiCombobox];
1
+ export { DuiCombobox, valueChangeEvent, valuesChangeEvent, } from "./combobox.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiCombobox } from "./combobox.js";
2
+ if (!customElements.get(DuiCombobox.tagName)) {
3
+ customElements.define(DuiCombobox.tagName, DuiCombobox);
4
+ }
@@ -1,19 +1,10 @@
1
- import { DuiCommand } from "./command.js";
2
- export { DuiCommand };
3
- import { DuiCommandInput } from "./command-input.js";
4
- export { DuiCommandInput };
5
- import { DuiCommandList } from "./command-list.js";
6
- export { DuiCommandList };
7
- import { DuiCommandGroup } from "./command-group.js";
8
- export { DuiCommandGroup };
9
- import { DuiCommandItem } from "./command-item.js";
10
- export { DuiCommandItem };
11
- import { DuiCommandEmpty } from "./command-empty.js";
12
- export { DuiCommandEmpty };
13
- import { DuiCommandSeparator } from "./command-separator.js";
14
- export { DuiCommandSeparator };
15
- import { DuiCommandShortcut } from "./command-shortcut.js";
16
- export { DuiCommandShortcut };
1
+ export { DuiCommand } from "./command.js";
2
+ export { DuiCommandInput } from "./command-input.js";
3
+ export { DuiCommandList } from "./command-list.js";
4
+ export { DuiCommandGroup } from "./command-group.js";
5
+ export { DuiCommandItem } from "./command-item.js";
6
+ export { DuiCommandEmpty } from "./command-empty.js";
7
+ export { DuiCommandSeparator } from "./command-separator.js";
8
+ export { DuiCommandShortcut } from "./command-shortcut.js";
17
9
  export type { CommandContext, CommandItemEntry } from "./command-context.js";
18
10
  export { commandScore } from "./command-score.js";
19
- export declare const commandFamily: (typeof DuiCommand | typeof DuiCommandInput | typeof DuiCommandList | typeof DuiCommandGroup | typeof DuiCommandItem | typeof DuiCommandEmpty | typeof DuiCommandSeparator | typeof DuiCommandShortcut)[];
package/command/index.js CHANGED
@@ -1,18 +1,9 @@
1
- import { DuiCommand } from "./command.js";
2
- export { DuiCommand };
3
- import { DuiCommandInput } from "./command-input.js";
4
- export { DuiCommandInput };
5
- import { DuiCommandList } from "./command-list.js";
6
- export { DuiCommandList };
7
- import { DuiCommandGroup } from "./command-group.js";
8
- export { DuiCommandGroup };
9
- import { DuiCommandItem } from "./command-item.js";
10
- export { DuiCommandItem };
11
- import { DuiCommandEmpty } from "./command-empty.js";
12
- export { DuiCommandEmpty };
13
- import { DuiCommandSeparator } from "./command-separator.js";
14
- export { DuiCommandSeparator };
15
- import { DuiCommandShortcut } from "./command-shortcut.js";
16
- export { DuiCommandShortcut };
1
+ export { DuiCommand } from "./command.js";
2
+ export { DuiCommandInput } from "./command-input.js";
3
+ export { DuiCommandList } from "./command-list.js";
4
+ export { DuiCommandGroup } from "./command-group.js";
5
+ export { DuiCommandItem } from "./command-item.js";
6
+ export { DuiCommandEmpty } from "./command-empty.js";
7
+ export { DuiCommandSeparator } from "./command-separator.js";
8
+ export { DuiCommandShortcut } from "./command-shortcut.js";
17
9
  export { commandScore } from "./command-score.js";
18
- export const commandFamily = [DuiCommand, DuiCommandInput, DuiCommandList, DuiCommandGroup, DuiCommandItem, DuiCommandEmpty, DuiCommandSeparator, DuiCommandShortcut];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import { DuiCommand } from "./command.js";
2
+ import { DuiCommandInput } from "./command-input.js";
3
+ import { DuiCommandList } from "./command-list.js";
4
+ import { DuiCommandGroup } from "./command-group.js";
5
+ import { DuiCommandItem } from "./command-item.js";
6
+ import { DuiCommandEmpty } from "./command-empty.js";
7
+ import { DuiCommandSeparator } from "./command-separator.js";
8
+ import { DuiCommandShortcut } from "./command-shortcut.js";
9
+ for (const C of [
10
+ DuiCommand,
11
+ DuiCommandInput,
12
+ DuiCommandList,
13
+ DuiCommandGroup,
14
+ DuiCommandItem,
15
+ DuiCommandEmpty,
16
+ DuiCommandSeparator,
17
+ DuiCommandShortcut,
18
+ ]) {
19
+ if (!customElements.get(C.tagName)) {
20
+ customElements.define(C.tagName, C);
21
+ }
22
+ }
@@ -1,4 +1,2 @@
1
- import { DuiDataTable } from "./data-table.js";
2
- export { DuiDataTable };
1
+ export { DuiDataTable } from "./data-table.js";
3
2
  export type { ColumnDef, SortDirection, SortState, PageState } from "./data-table.js";
4
- export declare const dataTableFamily: (typeof DuiDataTable)[];
@@ -1,3 +1 @@
1
- import { DuiDataTable } from "./data-table.js";
2
- export { DuiDataTable };
3
- export const dataTableFamily = [DuiDataTable];
1
+ export { DuiDataTable } from "./data-table.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiDataTable } from "./data-table.js";
2
+ if (!customElements.get(DuiDataTable.tagName)) {
3
+ customElements.define(DuiDataTable.tagName, DuiDataTable);
4
+ }
@@ -1,5 +1,6 @@
1
1
  /** Ported from original DUI: deep-future-app/app/client/components/dui/dialog */
2
2
  import { LitElement, type TemplateResult } from "lit";
3
+ import { type DialogContext } from "./dialog-context.js";
3
4
  export type DialogOpenChangeDetail = {
4
5
  open: boolean;
5
6
  };
@@ -24,6 +25,7 @@ export declare class DuiDialog extends LitElement {
24
25
  accessor open: boolean | undefined;
25
26
  /** Initial open state for uncontrolled mode. */
26
27
  accessor defaultOpen: boolean;
28
+ accessor _ctx: DialogContext;
27
29
  connectedCallback(): void;
28
30
  willUpdate(): void;
29
31
  render(): TemplateResult;
package/dialog/dialog.js CHANGED
@@ -6,9 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  import { css, html, LitElement } from "lit";
9
- import { property } from "lit/decorators.js";
9
+ import { property, state } from "lit/decorators.js";
10
+ import { provide } from "@lit/context";
10
11
  import { base } from "@deepfuture/dui-core/base";
11
12
  import { customEvent } from "@deepfuture/dui-core/event";
13
+ import { dialogContext } from "./dialog-context.js";
12
14
  export const openChangeEvent = customEvent("open-change", { bubbles: true, composed: true });
13
15
  const hostStyles = css `
14
16
  :host {
@@ -61,9 +63,9 @@ export class DuiDialog extends LitElement {
61
63
  }
62
64
  this.dispatchEvent(openChangeEvent({ open: false }));
63
65
  };
64
- #ctx_accessor_storage = this.#buildContext();
65
- get #ctx() { return this.#ctx_accessor_storage; }
66
- set #ctx(value) { this.#ctx_accessor_storage = value; }
66
+ #_ctx_accessor_storage = this.#buildContext();
67
+ get _ctx() { return this.#_ctx_accessor_storage; }
68
+ set _ctx(value) { this.#_ctx_accessor_storage = value; }
67
69
  #buildContext() {
68
70
  return {
69
71
  open: this.#isOpen,
@@ -80,10 +82,10 @@ export class DuiDialog extends LitElement {
80
82
  if (this.open === undefined && this.defaultOpen) {
81
83
  this.#internalOpen = true;
82
84
  }
83
- this.#ctx = this.#buildContext();
85
+ this._ctx = this.#buildContext();
84
86
  }
85
87
  willUpdate() {
86
- this.#ctx = this.#buildContext();
88
+ this._ctx = this.#buildContext();
87
89
  }
88
90
  render() {
89
91
  return html `<slot></slot>`;
@@ -95,3 +97,7 @@ __decorate([
95
97
  __decorate([
96
98
  property({ type: Boolean, attribute: "default-open" })
97
99
  ], DuiDialog.prototype, "defaultOpen", null);
100
+ __decorate([
101
+ provide({ context: dialogContext }),
102
+ state()
103
+ ], DuiDialog.prototype, "_ctx", null);
package/dialog/index.d.ts CHANGED
@@ -1,11 +1,6 @@
1
- import { DuiDialog, openChangeEvent } from "./dialog.js";
2
- export { DuiDialog, openChangeEvent };
1
+ export { DuiDialog, openChangeEvent } from "./dialog.js";
3
2
  export type { DialogOpenChangeDetail } from "./dialog.js";
4
- import { DuiDialogTrigger } from "./dialog-trigger.js";
5
- export { DuiDialogTrigger };
6
- import { DuiDialogPopup } from "./dialog-popup.js";
7
- export { DuiDialogPopup };
8
- import { DuiDialogClose } from "./dialog-close.js";
9
- export { DuiDialogClose };
3
+ export { DuiDialogTrigger } from "./dialog-trigger.js";
4
+ export { DuiDialogPopup } from "./dialog-popup.js";
5
+ export { DuiDialogClose } from "./dialog-close.js";
10
6
  export type { DialogContext } from "./dialog-context.js";
11
- export declare const dialogFamily: (typeof DuiDialog | typeof DuiDialogTrigger | typeof DuiDialogPopup | typeof DuiDialogClose)[];
package/dialog/index.js CHANGED
@@ -1,9 +1,4 @@
1
- import { DuiDialog, openChangeEvent } from "./dialog.js";
2
- export { DuiDialog, openChangeEvent };
3
- import { DuiDialogTrigger } from "./dialog-trigger.js";
4
- export { DuiDialogTrigger };
5
- import { DuiDialogPopup } from "./dialog-popup.js";
6
- export { DuiDialogPopup };
7
- import { DuiDialogClose } from "./dialog-close.js";
8
- export { DuiDialogClose };
9
- export const dialogFamily = [DuiDialog, DuiDialogTrigger, DuiDialogPopup, DuiDialogClose];
1
+ export { DuiDialog, openChangeEvent } from "./dialog.js";
2
+ export { DuiDialogTrigger } from "./dialog-trigger.js";
3
+ export { DuiDialogPopup } from "./dialog-popup.js";
4
+ export { DuiDialogClose } from "./dialog-close.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { DuiDialog } from "./dialog.js";
2
+ import { DuiDialogTrigger } from "./dialog-trigger.js";
3
+ import { DuiDialogPopup } from "./dialog-popup.js";
4
+ import { DuiDialogClose } from "./dialog-close.js";
5
+ if (!customElements.get(DuiDialog.tagName)) {
6
+ customElements.define(DuiDialog.tagName, DuiDialog);
7
+ }
8
+ if (!customElements.get(DuiDialogTrigger.tagName)) {
9
+ customElements.define(DuiDialogTrigger.tagName, DuiDialogTrigger);
10
+ }
11
+ if (!customElements.get(DuiDialogPopup.tagName)) {
12
+ customElements.define(DuiDialogPopup.tagName, DuiDialogPopup);
13
+ }
14
+ if (!customElements.get(DuiDialogClose.tagName)) {
15
+ customElements.define(DuiDialogClose.tagName, DuiDialogClose);
16
+ }
@@ -1,4 +1,2 @@
1
- import { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
2
- export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent };
1
+ export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
3
2
  export type { DropzoneErrorCode, DropzoneRejectionCode, FileRejectionError, RejectedFile, DropzoneDropDetail, DropzoneAcceptedDetail, DropzoneRejectedDetail, DropzoneErrorDetail, } from "./dropzone.js";
4
- export declare const dropzoneFamily: (typeof DuiDropzone)[];
package/dropzone/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent } from "./dropzone.js";
2
- export { DuiDropzone, dropzoneDropEvent, dropAcceptedEvent, dropRejectedEvent, dropzoneErrorEvent };
3
- export const dropzoneFamily = [DuiDropzone];
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
+ }
package/global.d.ts CHANGED
@@ -22,7 +22,6 @@ import type { DuiBreadcrumbSeparator } from "./breadcrumb/breadcrumb-separator.j
22
22
  import type { DuiBreadcrumbEllipsis } from "./breadcrumb/breadcrumb-ellipsis.js";
23
23
  import type { DuiButton } from "./button/button.js";
24
24
  import type { DuiCalendar } from "./calendar/calendar.js";
25
- import type { DuiCenter } from "./center/center.js";
26
25
  import type { DuiCheckbox } from "./checkbox/checkbox.js";
27
26
  import type { DuiCheckboxGroup } from "./checkbox/checkbox-group.js";
28
27
  import type { DuiCollapsible } from "./collapsible/collapsible.js";
@@ -41,7 +40,6 @@ import type { DuiDialogTrigger } from "./dialog/dialog-trigger.js";
41
40
  import type { DuiDialogPopup } from "./dialog/dialog-popup.js";
42
41
  import type { DuiDialogClose } from "./dialog/dialog-close.js";
43
42
  import type { DuiDropzone } from "./dropzone/dropzone.js";
44
- import type { DuiHstack } from "./hstack/hstack.js";
45
43
  import type { DuiIcon } from "./icon/icon.js";
46
44
  import type { DuiInput } from "./input/input.js";
47
45
  import type { DuiLink } from "./link/link.js";
@@ -49,7 +47,6 @@ import type { DuiMenu } from "./menu/menu.js";
49
47
  import type { DuiMenuItem } from "./menu/menu-item.js";
50
48
  import type { DuiMenubar } from "./menubar/menubar.js";
51
49
  import type { DuiNumberField } from "./number-field/number-field.js";
52
- import type { DuiPageInset } from "./page-inset/page-inset.js";
53
50
  import type { DuiPopover } from "./popover/popover.js";
54
51
  import type { DuiPopoverTrigger } from "./popover/popover-trigger.js";
55
52
  import type { DuiPopoverPopup } from "./popover/popover-popup.js";
@@ -93,7 +90,6 @@ import type { DuiTooltip } from "./tooltip/tooltip.js";
93
90
  import type { DuiTooltipTrigger } from "./tooltip/tooltip-trigger.js";
94
91
  import type { DuiTooltipPopup } from "./tooltip/tooltip-popup.js";
95
92
  import type { DuiTrunc } from "./trunc/trunc.js";
96
- import type { DuiVstack } from "./vstack/vstack.js";
97
93
 
98
94
  declare global {
99
95
  interface HTMLElementTagNameMap {
@@ -113,7 +109,6 @@ declare global {
113
109
  "dui-breadcrumb-ellipsis": DuiBreadcrumbEllipsis;
114
110
  "dui-button": DuiButton;
115
111
  "dui-calendar": DuiCalendar;
116
- "dui-center": DuiCenter;
117
112
  "dui-checkbox": DuiCheckbox;
118
113
  "dui-checkbox-group": DuiCheckboxGroup;
119
114
  "dui-collapsible": DuiCollapsible;
@@ -132,7 +127,6 @@ declare global {
132
127
  "dui-dialog-popup": DuiDialogPopup;
133
128
  "dui-dialog-close": DuiDialogClose;
134
129
  "dui-dropzone": DuiDropzone;
135
- "dui-hstack": DuiHstack;
136
130
  "dui-icon": DuiIcon;
137
131
  "dui-input": DuiInput;
138
132
  "dui-link": DuiLink;
@@ -140,7 +134,6 @@ declare global {
140
134
  "dui-menu-item": DuiMenuItem;
141
135
  "dui-menubar": DuiMenubar;
142
136
  "dui-number-field": DuiNumberField;
143
- "dui-page-inset": DuiPageInset;
144
137
  "dui-popover": DuiPopover;
145
138
  "dui-popover-trigger": DuiPopoverTrigger;
146
139
  "dui-popover-popup": DuiPopoverPopup;
@@ -184,6 +177,5 @@ declare global {
184
177
  "dui-tooltip-trigger": DuiTooltipTrigger;
185
178
  "dui-tooltip-popup": DuiTooltipPopup;
186
179
  "dui-trunc": DuiTrunc;
187
- "dui-vstack": DuiVstack;
188
180
  }
189
181
  }
package/icon/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- import { DuiIcon } from "./icon.js";
2
- export { DuiIcon };
3
- export declare const iconFamily: (typeof DuiIcon)[];
1
+ export { DuiIcon } from "./icon.js";
package/icon/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiIcon } from "./icon.js";
2
- export { DuiIcon };
3
- export const iconFamily = [DuiIcon];
1
+ export { DuiIcon } from "./icon.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiIcon } from "./icon.js";
2
+ if (!customElements.get(DuiIcon.tagName)) {
3
+ customElements.define(DuiIcon.tagName, DuiIcon);
4
+ }
package/input/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- import { DuiInput, inputChangeEvent } from "./input.js";
2
- export { DuiInput, inputChangeEvent };
3
- export declare const inputFamily: (typeof DuiInput)[];
1
+ export { DuiInput, inputChangeEvent } from "./input.js";
package/input/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiInput, inputChangeEvent } from "./input.js";
2
- export { DuiInput, inputChangeEvent };
3
- export const inputFamily = [DuiInput];
1
+ export { DuiInput, inputChangeEvent } from "./input.js";
package/input/input.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /** Ported from original DUI: deep-future-app/app/client/components/dui/input */
2
2
  import { LitElement, type TemplateResult } from "lit";
3
+ import { type FieldContext } from "@deepfuture/dui-components/field";
3
4
  export declare const inputChangeEvent: (detail: {
4
5
  value: string;
5
6
  }) => CustomEvent<{
@@ -42,6 +43,7 @@ export declare class DuiInput extends LitElement {
42
43
  accessor autocomplete: string | undefined;
43
44
  /** Whether the input should receive focus on mount. */
44
45
  accessor autofocus: boolean;
46
+ accessor _fieldCtx: FieldContext;
45
47
  firstUpdated(): void;
46
48
  render(): TemplateResult;
47
49
  }
package/input/input.js CHANGED
@@ -6,10 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  import { css, html, LitElement } from "lit";
9
- import { property } from "lit/decorators.js";
9
+ import { property, state } from "lit/decorators.js";
10
+ import { consume } from "@lit/context";
10
11
  import { ifDefined } from "lit/directives/if-defined.js";
11
12
  import { live } from "lit/directives/live.js";
12
13
  import { base } from "@deepfuture/dui-core/base";
14
+ import { fieldContext } from "@deepfuture/dui-components/field";
13
15
  import { customEvent } from "@deepfuture/dui-core/event";
14
16
  export const inputChangeEvent = customEvent("input-change", {
15
17
  bubbles: true,
@@ -94,23 +96,23 @@ export class DuiInput extends LitElement {
94
96
  /** Whether the input should receive focus on mount. */
95
97
  get autofocus() { return this.#autofocus_accessor_storage; }
96
98
  set autofocus(value) { this.#autofocus_accessor_storage = value; }
97
- #ctx_accessor_storage;
98
- get #ctx() { return this.#ctx_accessor_storage; }
99
- set #ctx(value) { this.#ctx_accessor_storage = value; }
99
+ #_fieldCtx_accessor_storage;
100
+ get _fieldCtx() { return this.#_fieldCtx_accessor_storage; }
101
+ set _fieldCtx(value) { this.#_fieldCtx_accessor_storage = value; }
100
102
  get #controlId() {
101
- return this.#ctx?.controlId ?? "";
103
+ return this._fieldCtx?.controlId ?? "";
102
104
  }
103
105
  get #descriptionId() {
104
- return this.#ctx?.descriptionId;
106
+ return this._fieldCtx?.descriptionId;
105
107
  }
106
108
  get #errorId() {
107
- return this.#ctx?.errorId;
109
+ return this._fieldCtx?.errorId;
108
110
  }
109
111
  get #isDisabled() {
110
- return this.disabled || (this.#ctx?.disabled ?? false);
112
+ return this.disabled || (this._fieldCtx?.disabled ?? false);
111
113
  }
112
114
  get #isInvalid() {
113
- return this.#ctx?.invalid ?? false;
115
+ return this._fieldCtx?.invalid ?? false;
114
116
  }
115
117
  firstUpdated() {
116
118
  if (this.autofocus) {
@@ -120,16 +122,16 @@ export class DuiInput extends LitElement {
120
122
  #onInput = (event) => {
121
123
  const target = event.target;
122
124
  this.value = target.value;
123
- this.#ctx?.markDirty();
124
- this.#ctx?.setFilled(this.value.length > 0);
125
+ this._fieldCtx?.markDirty();
126
+ this._fieldCtx?.setFilled(this.value.length > 0);
125
127
  this.dispatchEvent(inputChangeEvent({ value: this.value }));
126
128
  };
127
129
  #onFocus = () => {
128
- this.#ctx?.setFocused(true);
130
+ this._fieldCtx?.setFocused(true);
129
131
  };
130
132
  #onBlur = () => {
131
- this.#ctx?.setFocused(false);
132
- this.#ctx?.markTouched();
133
+ this._fieldCtx?.setFocused(false);
134
+ this._fieldCtx?.markTouched();
133
135
  };
134
136
  render() {
135
137
  const describedBy = [this.#descriptionId, this.#isInvalid ? this.#errorId : undefined]
@@ -155,10 +157,10 @@ export class DuiInput extends LitElement {
155
157
  ?data-disabled="${this.#isDisabled}"
156
158
  ?data-invalid="${this.#isInvalid}"
157
159
  ?data-valid="${!this.#isInvalid}"
158
- ?data-dirty="${this.#ctx?.dirty}"
159
- ?data-touched="${this.#ctx?.touched}"
160
- ?data-filled="${this.#ctx?.filled}"
161
- ?data-focused="${this.#ctx?.focused}"
160
+ ?data-dirty="${this._fieldCtx?.dirty}"
161
+ ?data-touched="${this._fieldCtx?.touched}"
162
+ ?data-filled="${this._fieldCtx?.filled}"
163
+ ?data-focused="${this._fieldCtx?.focused}"
162
164
  @input="${this.#onInput}"
163
165
  @focus="${this.#onFocus}"
164
166
  @blur="${this.#onBlur}"
@@ -202,3 +204,7 @@ __decorate([
202
204
  __decorate([
203
205
  property({ type: Boolean })
204
206
  ], DuiInput.prototype, "autofocus", null);
207
+ __decorate([
208
+ consume({ context: fieldContext, subscribe: true }),
209
+ state()
210
+ ], DuiInput.prototype, "_fieldCtx", null);
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiInput } from "./index.js";
2
+ if (!customElements.get(DuiInput.tagName)) {
3
+ customElements.define(DuiInput.tagName, DuiInput);
4
+ }
package/link/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- import { DuiLink, spaNavigateEvent } from "./link.js";
2
- export { DuiLink, spaNavigateEvent };
3
- export declare const linkFamily: (typeof DuiLink)[];
1
+ export { DuiLink, spaNavigateEvent } from "./link.js";
package/link/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiLink, spaNavigateEvent } from "./link.js";
2
- export { DuiLink, spaNavigateEvent };
3
- export const linkFamily = [DuiLink];
1
+ export { DuiLink, spaNavigateEvent } from "./link.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { DuiLink } from "./index.js";
2
+ if (!customElements.get(DuiLink.tagName)) {
3
+ customElements.define(DuiLink.tagName, DuiLink);
4
+ }
package/menu/index.d.ts CHANGED
@@ -1,5 +1,2 @@
1
- import { DuiMenu } from "./menu.js";
2
- export { DuiMenu };
3
- import { DuiMenuItem } from "./menu-item.js";
4
- export { DuiMenuItem };
5
- export declare const menuFamily: (typeof DuiMenuItem | typeof DuiMenu)[];
1
+ export { DuiMenu } from "./menu.js";
2
+ export { DuiMenuItem } from "./menu-item.js";
package/menu/index.js CHANGED
@@ -1,5 +1,2 @@
1
- import { DuiMenu } from "./menu.js";
2
- export { DuiMenu };
3
- import { DuiMenuItem } from "./menu-item.js";
4
- export { DuiMenuItem };
5
- export const menuFamily = [DuiMenu, DuiMenuItem];
1
+ export { DuiMenu } from "./menu.js";
2
+ export { DuiMenuItem } from "./menu-item.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { DuiMenu } from "./menu.js";
2
+ import { DuiMenuItem } from "./menu-item.js";
3
+ if (!customElements.get(DuiMenu.tagName)) {
4
+ customElements.define(DuiMenu.tagName, DuiMenu);
5
+ }
6
+ if (!customElements.get(DuiMenuItem.tagName)) {
7
+ customElements.define(DuiMenuItem.tagName, DuiMenuItem);
8
+ }
@@ -1,4 +1,2 @@
1
- import { DuiMenubar } from "./menubar.js";
2
- export { DuiMenubar };
1
+ export { DuiMenubar } from "./menubar.js";
3
2
  export type { MenubarContext } from "./menubar-context.js";
4
- export declare const menubarFamily: (typeof DuiMenubar)[];
package/menubar/index.js CHANGED
@@ -1,3 +1 @@
1
- import { DuiMenubar } from "./menubar.js";
2
- export { DuiMenubar };
3
- export const menubarFamily = [DuiMenubar];
1
+ export { DuiMenubar } from "./menubar.js";
@@ -1,4 +1,5 @@
1
1
  import { LitElement, type TemplateResult } from "lit";
2
+ import { type MenubarContext } from "./menubar-context.js";
2
3
  /**
3
4
  * `<dui-menubar>` — A horizontal bar of menus with coordinated open/close.
4
5
  *
@@ -14,6 +15,7 @@ export declare class DuiMenubar extends LitElement {
14
15
  static styles: import("lit").CSSResult[];
15
16
  accessor loop: boolean;
16
17
  accessor orientation: "horizontal" | "vertical";
18
+ accessor _ctx: MenubarContext;
17
19
  willUpdate(): void;
18
20
  render(): TemplateResult;
19
21
  }