@deepfuture/dui-components 0.0.21 → 1.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 (333) hide show
  1. package/README.md +56 -65
  2. package/_install.js +11 -0
  3. package/accordion/accordion-item.d.ts +3 -20
  4. package/accordion/accordion-item.js +92 -292
  5. package/accordion/accordion.d.ts +3 -18
  6. package/accordion/accordion.js +9 -247
  7. package/accordion/index.d.ts +6 -6
  8. package/accordion/index.js +5 -5
  9. package/alert-dialog/alert-dialog-close.d.ts +3 -14
  10. package/alert-dialog/alert-dialog-close.js +4 -34
  11. package/alert-dialog/alert-dialog-popup.d.ts +3 -32
  12. package/alert-dialog/alert-dialog-popup.js +68 -317
  13. package/alert-dialog/alert-dialog-trigger.d.ts +3 -14
  14. package/alert-dialog/alert-dialog-trigger.js +4 -51
  15. package/alert-dialog/alert-dialog.d.ts +3 -30
  16. package/alert-dialog/alert-dialog.js +8 -158
  17. package/alert-dialog/index.d.ts +11 -11
  18. package/alert-dialog/index.js +9 -9
  19. package/all.d.ts +159 -123
  20. package/all.js +134 -231
  21. package/avatar/avatar.d.ts +3 -39
  22. package/avatar/avatar.js +18 -238
  23. package/avatar/index.d.ts +4 -4
  24. package/avatar/index.js +3 -3
  25. package/badge/badge.d.ts +3 -10
  26. package/badge/badge.js +87 -22
  27. package/badge/index.d.ts +2 -3
  28. package/badge/index.js +2 -3
  29. package/breadcrumb/breadcrumb-ellipsis.d.ts +3 -12
  30. package/breadcrumb/breadcrumb-ellipsis.js +8 -34
  31. package/breadcrumb/breadcrumb-item.d.ts +3 -11
  32. package/breadcrumb/breadcrumb-item.js +7 -26
  33. package/breadcrumb/breadcrumb-link.d.ts +3 -12
  34. package/breadcrumb/breadcrumb-link.js +16 -26
  35. package/breadcrumb/breadcrumb-page.d.ts +3 -11
  36. package/breadcrumb/breadcrumb-page.js +8 -31
  37. package/breadcrumb/breadcrumb-separator.d.ts +3 -12
  38. package/breadcrumb/breadcrumb-separator.js +8 -31
  39. package/breadcrumb/breadcrumb.d.ts +3 -12
  40. package/breadcrumb/breadcrumb.js +10 -33
  41. package/breadcrumb/index.d.ts +12 -13
  42. package/breadcrumb/index.js +12 -13
  43. package/button/button.d.ts +3 -32
  44. package/button/button.js +220 -165
  45. package/button/index.d.ts +3 -3
  46. package/button/index.js +3 -3
  47. package/calendar/calendar.d.ts +3 -31
  48. package/calendar/calendar.js +71 -481
  49. package/calendar/index.d.ts +3 -3
  50. package/calendar/index.js +3 -3
  51. package/card/card.d.ts +3 -27
  52. package/card/card.js +80 -163
  53. package/card/index.d.ts +2 -3
  54. package/card/index.js +2 -3
  55. package/card-grid/card-grid.d.ts +3 -15
  56. package/card-grid/card-grid.js +8 -106
  57. package/card-grid/index.d.ts +2 -3
  58. package/card-grid/index.js +2 -3
  59. package/checkbox/checkbox-group.d.ts +3 -34
  60. package/checkbox/checkbox-group.js +11 -188
  61. package/checkbox/checkbox.d.ts +3 -47
  62. package/checkbox/checkbox.js +43 -341
  63. package/checkbox/index.d.ts +6 -6
  64. package/checkbox/index.js +5 -5
  65. package/collapsible/collapsible.d.ts +3 -20
  66. package/collapsible/collapsible.js +82 -277
  67. package/collapsible/index.d.ts +3 -3
  68. package/collapsible/index.js +3 -3
  69. package/combobox/combobox.d.ts +3 -47
  70. package/combobox/combobox.js +136 -538
  71. package/combobox/index.d.ts +4 -4
  72. package/combobox/index.js +3 -3
  73. package/command/command-empty.d.ts +3 -8
  74. package/command/command-empty.js +10 -88
  75. package/command/command-group.d.ts +3 -13
  76. package/command/command-group.js +14 -114
  77. package/command/command-input.d.ts +3 -11
  78. package/command/command-input.js +20 -136
  79. package/command/command-item.d.ts +3 -18
  80. package/command/command-item.js +23 -212
  81. package/command/command-list.d.ts +3 -7
  82. package/command/command-list.js +11 -79
  83. package/command/command-separator.d.ts +3 -5
  84. package/command/command-separator.js +10 -11
  85. package/command/command-shortcut.d.ts +3 -5
  86. package/command/command-shortcut.js +9 -12
  87. package/command/command.d.ts +3 -23
  88. package/command/command.js +10 -339
  89. package/command/index.d.ts +17 -19
  90. package/command/index.js +16 -18
  91. package/data-table/data-table.d.ts +3 -57
  92. package/data-table/data-table.js +85 -449
  93. package/data-table/index.d.ts +3 -4
  94. package/data-table/index.js +2 -3
  95. package/dialog/dialog-close.d.ts +3 -14
  96. package/dialog/dialog-close.js +4 -34
  97. package/dialog/dialog-popup.d.ts +3 -34
  98. package/dialog/dialog-popup.js +70 -336
  99. package/dialog/dialog-trigger.d.ts +3 -14
  100. package/dialog/dialog-trigger.js +4 -51
  101. package/dialog/dialog.d.ts +3 -30
  102. package/dialog/dialog.js +8 -158
  103. package/dialog/index.d.ts +11 -11
  104. package/dialog/index.js +9 -9
  105. package/dropzone/dropzone.d.ts +3 -72
  106. package/dropzone/dropzone.js +29 -407
  107. package/dropzone/index.d.ts +4 -4
  108. package/dropzone/index.js +3 -3
  109. package/field/field.d.ts +3 -30
  110. package/field/field.js +34 -353
  111. package/field/index.d.ts +1 -0
  112. package/field/index.js +1 -0
  113. package/fieldset/fieldset.d.ts +3 -18
  114. package/fieldset/fieldset.js +21 -110
  115. package/fieldset/index.d.ts +1 -0
  116. package/fieldset/index.js +1 -0
  117. package/icon/icon.d.ts +3 -15
  118. package/icon/icon.js +4 -33
  119. package/icon/index.d.ts +2 -3
  120. package/icon/index.js +2 -3
  121. package/input/index.d.ts +3 -3
  122. package/input/index.js +3 -3
  123. package/input/input.d.ts +3 -49
  124. package/input/input.js +57 -238
  125. package/menu/index.d.ts +4 -5
  126. package/menu/index.js +4 -5
  127. package/menu/menu-item.d.ts +3 -13
  128. package/menu/menu-item.js +40 -91
  129. package/menu/menu.d.ts +3 -15
  130. package/menu/menu.js +27 -277
  131. package/menubar/index.d.ts +3 -4
  132. package/menubar/index.js +2 -3
  133. package/menubar/menubar.d.ts +3 -19
  134. package/menubar/menubar.js +12 -183
  135. package/number-field/index.d.ts +3 -3
  136. package/number-field/index.js +3 -3
  137. package/number-field/number-field.d.ts +3 -55
  138. package/number-field/number-field.js +205 -698
  139. package/package.json +125 -113
  140. package/popover/index.d.ts +11 -11
  141. package/popover/index.js +9 -9
  142. package/popover/popover-close.d.ts +3 -12
  143. package/popover/popover-close.js +4 -32
  144. package/popover/popover-popup.d.ts +3 -18
  145. package/popover/popover-popup.js +28 -205
  146. package/popover/popover-trigger.d.ts +3 -13
  147. package/popover/popover-trigger.js +4 -73
  148. package/popover/popover.d.ts +3 -29
  149. package/popover/popover.js +8 -207
  150. package/portal/index.d.ts +3 -4
  151. package/portal/index.js +2 -3
  152. package/portal/portal.d.ts +3 -27
  153. package/portal/portal.js +8 -157
  154. package/preview-card/index.d.ts +9 -9
  155. package/preview-card/index.js +7 -7
  156. package/preview-card/preview-card-popup.d.ts +3 -14
  157. package/preview-card/preview-card-popup.js +29 -194
  158. package/preview-card/preview-card-trigger.d.ts +3 -12
  159. package/preview-card/preview-card-trigger.js +4 -74
  160. package/preview-card/preview-card.d.ts +3 -33
  161. package/preview-card/preview-card.js +8 -239
  162. package/progress/index.d.ts +2 -3
  163. package/progress/index.js +2 -3
  164. package/progress/progress.d.ts +3 -17
  165. package/progress/progress.js +28 -130
  166. package/radio/index.d.ts +6 -6
  167. package/radio/index.js +5 -5
  168. package/radio/radio-group.d.ts +3 -37
  169. package/radio/radio-group.js +8 -200
  170. package/radio/radio.d.ts +3 -28
  171. package/radio/radio.js +38 -213
  172. package/scroll-area/index.d.ts +2 -3
  173. package/scroll-area/index.js +2 -3
  174. package/scroll-area/scroll-area.d.ts +3 -36
  175. package/scroll-area/scroll-area.js +25 -535
  176. package/select/index.d.ts +3 -4
  177. package/select/index.js +2 -3
  178. package/select/select.d.ts +3 -39
  179. package/select/select.js +115 -425
  180. package/separator/index.d.ts +2 -3
  181. package/separator/index.js +2 -3
  182. package/separator/separator.d.ts +3 -10
  183. package/separator/separator.js +23 -85
  184. package/sidebar/index.d.ts +29 -29
  185. package/sidebar/index.js +27 -32
  186. package/sidebar/sidebar-content.d.ts +3 -12
  187. package/sidebar/sidebar-content.js +7 -29
  188. package/sidebar/sidebar-footer.d.ts +3 -10
  189. package/sidebar/sidebar-footer.js +7 -20
  190. package/sidebar/sidebar-group-label.d.ts +3 -15
  191. package/sidebar/sidebar-group-label.js +16 -41
  192. package/sidebar/sidebar-group.d.ts +3 -13
  193. package/sidebar/sidebar-group.js +7 -24
  194. package/sidebar/sidebar-header.d.ts +3 -10
  195. package/sidebar/sidebar-header.js +7 -16
  196. package/sidebar/sidebar-inset.d.ts +3 -13
  197. package/sidebar/sidebar-inset.js +7 -28
  198. package/sidebar/sidebar-menu-button.d.ts +3 -26
  199. package/sidebar/sidebar-menu-button.js +59 -217
  200. package/sidebar/sidebar-menu-item.d.ts +3 -10
  201. package/sidebar/sidebar-menu-item.js +7 -19
  202. package/sidebar/sidebar-menu.d.ts +3 -12
  203. package/sidebar/sidebar-menu.js +7 -25
  204. package/sidebar/sidebar-provider.d.ts +3 -34
  205. package/sidebar/sidebar-provider.js +22 -232
  206. package/sidebar/sidebar-separator.d.ts +3 -10
  207. package/sidebar/sidebar-separator.js +9 -19
  208. package/sidebar/sidebar-trigger.d.ts +3 -14
  209. package/sidebar/sidebar-trigger.js +10 -46
  210. package/sidebar/sidebar.d.ts +3 -19
  211. package/sidebar/sidebar.js +65 -262
  212. package/slider/index.d.ts +3 -3
  213. package/slider/index.js +3 -3
  214. package/slider/slider.d.ts +3 -45
  215. package/slider/slider.js +97 -382
  216. package/spinner/index.d.ts +2 -3
  217. package/spinner/index.js +2 -3
  218. package/spinner/spinner.d.ts +3 -11
  219. package/spinner/spinner.js +20 -163
  220. package/split-button/index.d.ts +3 -1
  221. package/split-button/index.js +3 -1
  222. package/split-button/split-button.d.ts +3 -33
  223. package/split-button/split-button.js +306 -394
  224. package/stepper/index.d.ts +3 -3
  225. package/stepper/index.js +3 -3
  226. package/stepper/stepper.d.ts +3 -41
  227. package/stepper/stepper.js +57 -381
  228. package/switch/index.d.ts +3 -3
  229. package/switch/index.js +3 -3
  230. package/switch/switch.d.ts +3 -30
  231. package/switch/switch.js +63 -228
  232. package/tabs/index.d.ts +12 -12
  233. package/tabs/index.js +11 -11
  234. package/tabs/tab.d.ts +3 -14
  235. package/tabs/tab.js +32 -131
  236. package/tabs/tabs-indicator.d.ts +3 -9
  237. package/tabs/tabs-indicator.js +17 -22
  238. package/tabs/tabs-list.d.ts +3 -15
  239. package/tabs/tabs-list.js +14 -113
  240. package/tabs/tabs-panel.d.ts +3 -16
  241. package/tabs/tabs-panel.js +32 -114
  242. package/tabs/tabs.d.ts +3 -22
  243. package/tabs/tabs.js +8 -170
  244. package/textarea/index.d.ts +4 -4
  245. package/textarea/index.js +3 -3
  246. package/textarea/textarea.d.ts +3 -36
  247. package/textarea/textarea.js +63 -220
  248. package/toggle/index.d.ts +6 -6
  249. package/toggle/index.js +5 -5
  250. package/toggle/toggle-group.d.ts +3 -27
  251. package/toggle/toggle-group.js +9 -224
  252. package/toggle/toggle.d.ts +3 -26
  253. package/toggle/toggle.js +93 -178
  254. package/tokens/properties.css +361 -0
  255. package/tokens/prose.css +250 -0
  256. package/tokens/prose.d.ts +2 -0
  257. package/tokens/prose.js +4 -0
  258. package/tokens/tokens-raw.d.ts +2 -0
  259. package/tokens/tokens-raw.js +2 -0
  260. package/tokens/tokens.css +409 -0
  261. package/tokens/tokens.d.ts +2 -0
  262. package/tokens/tokens.js +5 -0
  263. package/toolbar/index.d.ts +2 -3
  264. package/toolbar/index.js +2 -3
  265. package/toolbar/toolbar.d.ts +3 -11
  266. package/toolbar/toolbar.js +25 -116
  267. package/tooltip/index.d.ts +9 -9
  268. package/tooltip/index.js +7 -7
  269. package/tooltip/tooltip-popup.d.ts +3 -14
  270. package/tooltip/tooltip-popup.js +31 -185
  271. package/tooltip/tooltip-trigger.d.ts +3 -14
  272. package/tooltip/tooltip-trigger.js +5 -148
  273. package/tooltip/tooltip.d.ts +3 -35
  274. package/tooltip/tooltip.js +8 -253
  275. package/trunc/index.d.ts +2 -3
  276. package/trunc/index.js +2 -3
  277. package/trunc/trunc.d.ts +3 -17
  278. package/trunc/trunc.js +10 -108
  279. package/_deprecated/center/center.d.ts +0 -14
  280. package/_deprecated/center/center.js +0 -37
  281. package/_deprecated/center/index.d.ts +0 -3
  282. package/_deprecated/center/index.js +0 -3
  283. package/_deprecated/center/register.js +0 -4
  284. package/_deprecated/hstack/hstack.d.ts +0 -25
  285. package/_deprecated/hstack/hstack.js +0 -187
  286. package/_deprecated/hstack/index.d.ts +0 -4
  287. package/_deprecated/hstack/index.js +0 -3
  288. package/_deprecated/hstack/register.d.ts +0 -1
  289. package/_deprecated/hstack/register.js +0 -4
  290. package/_deprecated/page-inset/index.d.ts +0 -3
  291. package/_deprecated/page-inset/index.js +0 -3
  292. package/_deprecated/page-inset/page-inset.d.ts +0 -28
  293. package/_deprecated/page-inset/page-inset.js +0 -151
  294. package/_deprecated/page-inset/register.d.ts +0 -1
  295. package/_deprecated/page-inset/register.js +0 -4
  296. package/_deprecated/vstack/index.d.ts +0 -3
  297. package/_deprecated/vstack/index.js +0 -3
  298. package/_deprecated/vstack/register.d.ts +0 -1
  299. package/_deprecated/vstack/register.js +0 -4
  300. package/_deprecated/vstack/vstack.d.ts +0 -17
  301. package/_deprecated/vstack/vstack.js +0 -125
  302. package/accordion/accordion-context.d.ts +0 -15
  303. package/accordion/accordion-context.js +0 -3
  304. package/alert-dialog/alert-dialog-context.d.ts +0 -13
  305. package/alert-dialog/alert-dialog-context.js +0 -3
  306. package/checkbox/checkbox-group-context.d.ts +0 -11
  307. package/checkbox/checkbox-group-context.js +0 -3
  308. package/command/command-context.d.ts +0 -30
  309. package/command/command-context.js +0 -3
  310. package/command/command-score.d.ts +0 -6
  311. package/command/command-score.js +0 -31
  312. package/dialog/dialog-context.d.ts +0 -13
  313. package/dialog/dialog-context.js +0 -3
  314. package/global.d.ts +0 -179
  315. package/menubar/menubar-context.d.ts +0 -9
  316. package/menubar/menubar-context.js +0 -2
  317. package/popover/popover-context.d.ts +0 -17
  318. package/popover/popover-context.js +0 -3
  319. package/preview-card/preview-card-context.d.ts +0 -16
  320. package/preview-card/preview-card-context.js +0 -3
  321. package/radio/radio-group-context.d.ts +0 -11
  322. package/radio/radio-group-context.js +0 -2
  323. package/sidebar/sidebar-context.d.ts +0 -15
  324. package/sidebar/sidebar-context.js +0 -3
  325. package/split-button/register.d.ts +0 -1
  326. package/split-button/register.js +0 -4
  327. package/tabs/tabs-context.d.ts +0 -8
  328. package/tabs/tabs-context.js +0 -2
  329. package/toggle/toggle-group-context.d.ts +0 -9
  330. package/toggle/toggle-group-context.js +0 -2
  331. package/tooltip/tooltip-context.d.ts +0 -17
  332. package/tooltip/tooltip-context.js +0 -3
  333. /package/{_deprecated/center/register.d.ts → _install.d.ts} +0 -0
@@ -1,407 +1,319 @@
1
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
- var _, done = false;
7
- for (var i = decorators.length - 1; i >= 0; i--) {
8
- var context = {};
9
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
- if (kind === "accessor") {
14
- if (result === void 0) continue;
15
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
- if (_ = accept(result.get)) descriptor.get = _;
17
- if (_ = accept(result.set)) descriptor.set = _;
18
- if (_ = accept(result.init)) initializers.unshift(_);
19
- }
20
- else if (_ = accept(result)) {
21
- if (kind === "field") initializers.unshift(_);
22
- else descriptor[key] = _;
23
- }
24
- }
25
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
- done = true;
27
- };
28
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
- var useValue = arguments.length > 2;
30
- for (var i = 0; i < initializers.length; i++) {
31
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
- }
33
- return useValue ? value : void 0;
34
- };
35
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
36
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
37
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
38
- };
39
- import { css, html, LitElement, nothing } from "lit";
40
- import { property, state } from "lit/decorators.js";
41
- import { base } from "@deepfuture/dui-core/base";
42
- import { customEvent } from "@deepfuture/dui-core/event";
43
- import { FloatingPortalController } from "@deepfuture/dui-core/floating-portal-controller";
44
- import { DuiMenuItem } from "../menu/menu-item.js";
45
- /** Fired when the action (left) button is clicked. */
46
- export const actionEvent = customEvent("dui-action", { bubbles: true, composed: true });
47
- /** Structural styles only — layout and behavioral CSS. */
48
- const hostStyles = css `
1
+ import { css } from "lit";
2
+ import { DuiSplitButtonPrimitive } from "@deepfuture/dui-primitives/split-button";
3
+ import "../_install.js";
4
+ const styles = css `
5
+ /* =================================================================
6
+ * Reuses the button's two-axis variant system:
7
+ * variant → semantic intent (neutral, primary, danger)
8
+ * appearance visual treatment (filled, outline, ghost)
9
+ *
10
+ * The whole .Root renders as one unified button shape. The action
11
+ * and trigger zones share the same background/border/radius.
12
+ * ================================================================= */
13
+
14
+ /* ---------------------------------------------------------------
15
+ * Layer 1 Intent (sets --_intent-* private tokens)
16
+ * --------------------------------------------------------------- */
17
+
18
+ :host,
19
+ :host([variant=""]),
20
+ :host([variant="neutral"]) {
21
+ --_intent-base: var(--foreground);
22
+ --_intent-base-fg: var(--background);
23
+ --_intent-subtle: oklch(from var(--foreground) l c h / 0.08);
24
+ --_intent-subtle-fg: var(--text-1);
25
+ --_intent-border: var(--border);
26
+ }
27
+
28
+ :host([variant="primary"]) {
29
+ --_intent-base: var(--accent);
30
+ --_intent-base-fg: oklch(from var(--accent) 0.98 0.01 h);
31
+ --_intent-subtle: var(--accent-subtle);
32
+ --_intent-subtle-fg: var(--accent-text);
33
+ --_intent-border: oklch(from var(--accent) l c h / 0.5);
34
+ }
35
+
36
+ :host([variant="danger"]) {
37
+ --_intent-base: var(--destructive);
38
+ --_intent-base-fg: oklch(from var(--destructive) 0.98 0.01 h);
39
+ --_intent-subtle: var(--destructive-subtle);
40
+ --_intent-subtle-fg: var(--destructive-text);
41
+ --_intent-border: oklch(from var(--destructive) l c h / 0.5);
42
+ }
43
+
44
+ /* ---------------------------------------------------------------
45
+ * Layer 2 Appearance (maps --_intent-* to --sb-*)
46
+ * --------------------------------------------------------------- */
47
+
48
+ :host,
49
+ :host([appearance=""]),
50
+ :host([appearance="filled"]) {
51
+ --sb-bg: var(--_intent-base);
52
+ --sb-fg: var(--_intent-base-fg);
53
+ --sb-border: transparent;
54
+ --sb-divider: oklch(from var(--_intent-base-fg) l c h / 0.25);
55
+ }
56
+
57
+ :host([appearance="outline"]) {
58
+ --sb-bg: transparent;
59
+ --sb-fg: var(--_intent-subtle-fg);
60
+ --sb-border: var(--border);
61
+ --sb-divider: var(--border);
62
+ }
63
+
64
+ :host([appearance="ghost"]) {
65
+ --sb-bg: transparent;
66
+ --sb-fg: var(--_intent-subtle-fg);
67
+ --sb-border: transparent;
68
+ --sb-divider: var(--border);
69
+ }
70
+
71
+ :host([appearance="soft"]) {
72
+ --sb-bg: var(--_intent-subtle);
73
+ --sb-fg: var(--_intent-subtle-fg);
74
+ --sb-border: transparent;
75
+ --sb-divider: oklch(from var(--_intent-base) l c h / 0.15);
76
+ }
77
+
78
+ /* ---------------------------------------------------------------
79
+ * Sizes
80
+ * --------------------------------------------------------------- */
81
+
49
82
  :host {
50
- display: inline-block;
83
+ --sb-height: var(--component-height-md);
84
+ --sb-action-padding-y: var(--space-2);
85
+ --sb-action-padding-x: var(--space-2_5);
86
+ --sb-trigger-padding-x: var(--space-1_5);
87
+ --sb-gap: var(--space-1_5);
88
+ --sb-radius: var(--radius-md);
89
+ --sb-font-size: var(--text-sm);
90
+ --sb-icon-size: var(--space-4_5);
91
+ --sb-trigger-icon-size: var(--space-4);
51
92
  }
52
- `;
53
- const componentStyles = css `
93
+
94
+ :host([size="xs"]) {
95
+ --sb-height: var(--component-height-xs);
96
+ --sb-action-padding-y: var(--space-1);
97
+ --sb-action-padding-x: var(--space-1_5);
98
+ --sb-trigger-padding-x: var(--space-1);
99
+ --sb-gap: var(--space-1);
100
+ --sb-font-size: var(--text-xs);
101
+ --sb-icon-size: var(--space-3_5);
102
+ --sb-trigger-icon-size: var(--space-3);
103
+ }
104
+
105
+ :host([size="sm"]) {
106
+ --sb-height: var(--component-height-sm);
107
+ --sb-action-padding-y: var(--space-1_5);
108
+ --sb-action-padding-x: var(--space-2);
109
+ --sb-trigger-padding-x: var(--space-1_5);
110
+ --sb-gap: var(--space-1);
111
+ --sb-font-size: var(--text-xs);
112
+ --sb-icon-size: var(--space-4);
113
+ --sb-trigger-icon-size: var(--space-3_5);
114
+ }
115
+
116
+ :host([size="lg"]) {
117
+ --sb-height: var(--component-height-lg);
118
+ --sb-action-padding-y: var(--space-2_5);
119
+ --sb-action-padding-x: var(--space-3);
120
+ --sb-trigger-padding-x: var(--space-2);
121
+ --sb-gap: var(--space-1_5);
122
+ --sb-font-size: var(--text-sm);
123
+ --sb-icon-size: var(--space-4_5);
124
+ --sb-trigger-icon-size: var(--space-4);
125
+ }
126
+
127
+ /* ---------------------------------------------------------------
128
+ * Root container — unified button shape
129
+ * --------------------------------------------------------------- */
130
+
54
131
  .Root {
55
- display: inline-flex;
56
- align-items: stretch;
57
- box-sizing: border-box;
58
- }
59
-
60
- .Action,
61
- .Trigger {
62
- appearance: none;
63
- background: none;
64
- border: none;
65
- padding: 0;
66
- margin: 0;
132
+ height: var(--sb-height);
133
+ border: var(--border-width-thin) solid var(--sb-border);
134
+ border-radius: var(--sb-radius);
135
+ background: var(--sb-bg);
136
+ color: var(--sb-fg);
137
+ font-family: var(--font-sans);
138
+ font-weight: var(--font-weight-medium);
139
+ font-size: var(--sb-font-size);
140
+ letter-spacing: var(--letter-spacing-tight);
141
+ line-height: var(--line-height-snug);
142
+ white-space: nowrap;
143
+ overflow: hidden;
144
+ }
145
+
146
+ /* ---------------------------------------------------------------
147
+ * Action button (left)
148
+ * --------------------------------------------------------------- */
149
+
150
+ [part="action"] {
151
+ --icon-size: var(--sb-icon-size);
152
+ --icon-color: var(--sb-fg);
153
+ gap: var(--sb-gap);
154
+ padding: var(--sb-action-padding-y) var(--sb-action-padding-x);
155
+ height: 100%;
156
+ color: inherit;
67
157
  font: inherit;
158
+ letter-spacing: inherit;
159
+ line-height: inherit;
160
+ transition-property: background, filter;
161
+ transition-duration: var(--duration-faster);
162
+ transition-timing-function: var(--ease-out-3);
163
+ }
164
+
165
+ /* ---------------------------------------------------------------
166
+ * Divider
167
+ * --------------------------------------------------------------- */
168
+
169
+ [part="divider"] {
170
+ border-left: var(--border-width-thin) solid var(--sb-divider);
171
+ }
172
+
173
+ /* ---------------------------------------------------------------
174
+ * Trigger button (right)
175
+ * --------------------------------------------------------------- */
176
+
177
+ [part="trigger"] {
178
+ --icon-size: var(--sb-trigger-icon-size);
179
+ --icon-color: var(--sb-fg);
180
+ padding: 0 var(--sb-trigger-padding-x);
181
+ height: 100%;
182
+ background: var(--sb-trigger-bg, var(--sb-bg));
68
183
  color: inherit;
69
- cursor: pointer;
70
- user-select: none;
71
- -webkit-tap-highlight-color: transparent;
72
- box-sizing: border-box;
184
+ transition-property: background, filter;
185
+ transition-duration: var(--duration-faster);
186
+ transition-timing-function: var(--ease-out-3);
73
187
  }
74
188
 
75
- .Action {
76
- display: inline-flex;
77
- align-items: center;
78
- justify-content: center;
189
+ /* ---------------------------------------------------------------
190
+ * Interactive states — filled uses filter, outline/ghost use alpha
191
+ * --------------------------------------------------------------- */
192
+
193
+ /* Filled hover */
194
+ :host(:not([appearance="outline"]):not([appearance="ghost"]):not([appearance="soft"]))
195
+ [part="action"]:hover:not(:disabled) {
196
+ filter: brightness(0.88);
197
+ }
198
+
199
+ :host(:not([appearance="outline"]):not([appearance="ghost"]):not([appearance="soft"]))
200
+ [part="trigger"]:hover:not(:disabled) {
201
+ filter: brightness(0.88);
202
+ }
203
+
204
+ /* Filled active */
205
+ :host(:not([appearance="outline"]):not([appearance="ghost"]):not([appearance="soft"]))
206
+ [part="action"]:active:not(:disabled) {
207
+ filter: brightness(0.80);
208
+ }
209
+
210
+ :host(:not([appearance="outline"]):not([appearance="ghost"]):not([appearance="soft"]))
211
+ [part="trigger"]:active:not(:disabled) {
212
+ filter: brightness(0.80);
213
+ }
214
+
215
+ /* Filled trigger open state */
216
+ :host(:not([appearance="outline"]):not([appearance="ghost"]):not([appearance="soft"]))
217
+ [part="trigger"][data-open]:not(:disabled) {
218
+ filter: brightness(0.80);
219
+ }
220
+
221
+ /* Ghost / outline hover */
222
+ :host([appearance="ghost"]) [part="action"]:hover:not(:disabled),
223
+ :host([appearance="outline"]) [part="action"]:hover:not(:disabled) {
224
+ background: oklch(from var(--_intent-base) l c h / 0.05);
225
+ }
226
+
227
+ :host([appearance="ghost"]) [part="trigger"]:hover:not(:disabled),
228
+ :host([appearance="outline"]) [part="trigger"]:hover:not(:disabled) {
229
+ background: oklch(from var(--_intent-base) l c h / 0.05);
230
+ }
231
+
232
+ /* Ghost / outline active */
233
+ :host([appearance="ghost"]) [part="action"]:active:not(:disabled),
234
+ :host([appearance="outline"]) [part="action"]:active:not(:disabled) {
235
+ background: oklch(from var(--_intent-base) l c h / 0.10);
236
+ }
237
+
238
+ :host([appearance="ghost"]) [part="trigger"]:active:not(:disabled),
239
+ :host([appearance="outline"]) [part="trigger"]:active:not(:disabled) {
240
+ background: oklch(from var(--_intent-base) l c h / 0.10);
241
+ }
242
+
243
+ /* Ghost / outline trigger open state */
244
+ :host([appearance="ghost"]) [part="trigger"][data-open]:not(:disabled),
245
+ :host([appearance="outline"]) [part="trigger"][data-open]:not(:disabled) {
246
+ background: oklch(from var(--_intent-base) l c h / 0.10);
247
+ }
248
+
249
+ /* Soft hover */
250
+ :host([appearance="soft"]) [part="action"]:hover:not(:disabled) {
251
+ background: oklch(from var(--_intent-base) l c h / 0.12);
252
+ }
253
+
254
+ :host([appearance="soft"]) [part="trigger"]:hover:not(:disabled) {
255
+ background: oklch(from var(--_intent-base) l c h / 0.12);
256
+ }
257
+
258
+ /* Soft active */
259
+ :host([appearance="soft"]) [part="action"]:active:not(:disabled) {
260
+ background: oklch(from var(--_intent-base) l c h / 0.18);
261
+ }
262
+
263
+ :host([appearance="soft"]) [part="trigger"]:active:not(:disabled) {
264
+ background: oklch(from var(--_intent-base) l c h / 0.18);
265
+ }
266
+
267
+ /* Soft trigger open state */
268
+ :host([appearance="soft"]) [part="trigger"][data-open]:not(:disabled) {
269
+ background: oklch(from var(--_intent-base) l c h / 0.18);
270
+ }
271
+
272
+ /* Focus visible */
273
+ [part="action"]:focus-visible,
274
+ [part="trigger"]:focus-visible {
275
+ outline: none;
276
+ box-shadow:
277
+ 0 0 0 var(--focus-ring-offset) var(--background),
278
+ 0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
279
+ z-index: 1;
280
+ position: relative;
281
+ }
282
+
283
+ /* Disabled */
284
+ :host([disabled]) .Root {
285
+ opacity: 0.4;
286
+ cursor: not-allowed;
287
+ }
288
+
289
+ [part="action"]:disabled,
290
+ [part="trigger"]:disabled {
291
+ cursor: not-allowed;
292
+ }
293
+
294
+ /* ---------------------------------------------------------------
295
+ * Popup (rendered in portal shadow root)
296
+ * --------------------------------------------------------------- */
297
+
298
+ .Popup {
299
+ background: var(--surface-3);
300
+ border: var(--border-width-thin) solid var(--border);
301
+ border-radius: var(--radius-md);
302
+ box-shadow: var(--shadow-md);
303
+ transition-duration: var(--duration-fast);
304
+ transition-timing-function: var(--ease-out-3);
79
305
  }
80
306
 
81
- .Divider {
82
- display: block;
83
- width: 0;
84
- align-self: stretch;
307
+ .Popup[data-starting-style],
308
+ .Popup[data-ending-style] {
309
+ transform: translateY(calc(var(--space-1) * -1));
85
310
  }
86
311
 
87
- .Trigger {
88
- display: inline-flex;
89
- align-items: center;
90
- justify-content: center;
91
- flex-shrink: 0;
312
+ .Menu {
313
+ padding: var(--space-1);
92
314
  }
93
315
  `;
94
- /** Structural styles injected into the portal positioner. */
95
- const portalPopupStyles = [
96
- css `
97
- .Popup {
98
- max-height: 240px;
99
- overflow-y: auto;
100
- overscroll-behavior: contain;
101
- opacity: 1;
102
- transform: translateY(0);
103
- transition-property: opacity, transform;
104
- pointer-events: auto;
105
- }
106
-
107
- .Popup[data-starting-style],
108
- .Popup[data-ending-style] {
109
- opacity: 0;
110
- }
111
- `,
112
- ];
113
- /**
114
- * `<dui-split-button>` — A button with an attached dropdown menu trigger.
115
- *
116
- * The action zone (left) performs a primary action. The menu trigger (right)
117
- * opens a dropdown of `dui-menu-item` children for secondary actions.
118
- *
119
- * @slot - Action button label / content.
120
- * @slot icon - Custom icon for the dropdown trigger (defaults to chevron-down).
121
- * @slot menu - `dui-menu-item` elements rendered inside the dropdown popup.
122
- * @csspart root - The outer container wrapping both zones.
123
- * @csspart action - The left action button element.
124
- * @csspart divider - The vertical separator between action and trigger.
125
- * @csspart trigger - The right dropdown trigger button element.
126
- * @fires dui-action - Fired when the action button is clicked. Detail: {}
127
- */
128
- let DuiSplitButton = (() => {
129
- let _classSuper = LitElement;
130
- let _variant_decorators;
131
- let _variant_initializers = [];
132
- let _variant_extraInitializers = [];
133
- let _appearance_decorators;
134
- let _appearance_initializers = [];
135
- let _appearance_extraInitializers = [];
136
- let _size_decorators;
137
- let _size_initializers = [];
138
- let _size_extraInitializers = [];
139
- let _popupMinWidth_decorators;
140
- let _popupMinWidth_initializers = [];
141
- let _popupMinWidth_extraInitializers = [];
142
- let _disabled_decorators;
143
- let _disabled_initializers = [];
144
- let _disabled_extraInitializers = [];
145
- let _private_highlightedIndex_decorators;
146
- let _private_highlightedIndex_initializers = [];
147
- let _private_highlightedIndex_extraInitializers = [];
148
- let _private_highlightedIndex_descriptor;
149
- return class DuiSplitButton extends _classSuper {
150
- static {
151
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
152
- _variant_decorators = [property({ reflect: true })];
153
- _appearance_decorators = [property({ reflect: true })];
154
- _size_decorators = [property({ reflect: true })];
155
- _popupMinWidth_decorators = [property({ attribute: "popup-min-width" })];
156
- _disabled_decorators = [property({ type: Boolean, reflect: true })];
157
- _private_highlightedIndex_decorators = [state()];
158
- __esDecorate(this, null, _variant_decorators, { kind: "accessor", name: "variant", static: false, private: false, access: { has: obj => "variant" in obj, get: obj => obj.variant, set: (obj, value) => { obj.variant = value; } }, metadata: _metadata }, _variant_initializers, _variant_extraInitializers);
159
- __esDecorate(this, null, _appearance_decorators, { kind: "accessor", name: "appearance", static: false, private: false, access: { has: obj => "appearance" in obj, get: obj => obj.appearance, set: (obj, value) => { obj.appearance = value; } }, metadata: _metadata }, _appearance_initializers, _appearance_extraInitializers);
160
- __esDecorate(this, null, _size_decorators, { kind: "accessor", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
161
- __esDecorate(this, null, _popupMinWidth_decorators, { kind: "accessor", name: "popupMinWidth", static: false, private: false, access: { has: obj => "popupMinWidth" in obj, get: obj => obj.popupMinWidth, set: (obj, value) => { obj.popupMinWidth = value; } }, metadata: _metadata }, _popupMinWidth_initializers, _popupMinWidth_extraInitializers);
162
- __esDecorate(this, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
163
- __esDecorate(this, _private_highlightedIndex_descriptor = { get: __setFunctionName(function () { return this.#highlightedIndex_accessor_storage; }, "#highlightedIndex", "get"), set: __setFunctionName(function (value) { this.#highlightedIndex_accessor_storage = value; }, "#highlightedIndex", "set") }, _private_highlightedIndex_decorators, { kind: "accessor", name: "#highlightedIndex", static: false, private: true, access: { has: obj => #highlightedIndex in obj, get: obj => obj.#highlightedIndex, set: (obj, value) => { obj.#highlightedIndex = value; } }, metadata: _metadata }, _private_highlightedIndex_initializers, _private_highlightedIndex_extraInitializers);
164
- if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
165
- }
166
- static tagName = "dui-split-button";
167
- static styles = [base, hostStyles, componentStyles];
168
- #variant_accessor_storage = __runInitializers(this, _variant_initializers, "");
169
- /** Visual variant — mapped to theme styles (e.g. neutral, primary, danger). */
170
- get variant() { return this.#variant_accessor_storage; }
171
- set variant(value) { this.#variant_accessor_storage = value; }
172
- #appearance_accessor_storage = (__runInitializers(this, _variant_extraInitializers), __runInitializers(this, _appearance_initializers, ""));
173
- /** Visual appearance — mapped to theme styles (e.g. filled, outline, ghost). */
174
- get appearance() { return this.#appearance_accessor_storage; }
175
- set appearance(value) { this.#appearance_accessor_storage = value; }
176
- #size_accessor_storage = (__runInitializers(this, _appearance_extraInitializers), __runInitializers(this, _size_initializers, ""));
177
- /** Size — mapped to theme styles (e.g. xs, sm, md, lg). */
178
- get size() { return this.#size_accessor_storage; }
179
- set size(value) { this.#size_accessor_storage = value; }
180
- #popupMinWidth_accessor_storage = (__runInitializers(this, _size_extraInitializers), __runInitializers(this, _popupMinWidth_initializers, "var(--space-28)"));
181
- /** Sets `min-width` on the popup panel (e.g. `"200px"`). Defaults to `"var(--space-28)"`. */
182
- get popupMinWidth() { return this.#popupMinWidth_accessor_storage; }
183
- set popupMinWidth(value) { this.#popupMinWidth_accessor_storage = value; }
184
- #disabled_accessor_storage = (__runInitializers(this, _popupMinWidth_extraInitializers), __runInitializers(this, _disabled_initializers, false));
185
- /** Whether the entire split button is disabled. */
186
- get disabled() { return this.#disabled_accessor_storage; }
187
- set disabled(value) { this.#disabled_accessor_storage = value; }
188
- #highlightedIndex_accessor_storage = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _private_highlightedIndex_initializers, -1));
189
- get #highlightedIndex() { return _private_highlightedIndex_descriptor.get.call(this); }
190
- set #highlightedIndex(value) { return _private_highlightedIndex_descriptor.set.call(this, value); }
191
- #menuId = (__runInitializers(this, _private_highlightedIndex_extraInitializers), `split-menu-${crypto.randomUUID().slice(0, 8)}`);
192
- #popup = new FloatingPortalController(this, {
193
- getAnchor: () => this.shadowRoot?.querySelector(".Root"),
194
- matchWidth: false,
195
- styles: portalPopupStyles,
196
- contentContainer: ".Menu",
197
- contentSelector: "dui-menu-item",
198
- onOpen: () => {
199
- this.#highlightedIndex = -1;
200
- },
201
- onClose: () => {
202
- this.#highlightedIndex = -1;
203
- },
204
- renderPopup: (portal) => html `
205
- <div
206
- class="Popup"
207
- style="${this.popupMinWidth ? `min-width:${this.popupMinWidth}` : ""}"
208
- ?data-starting-style="${portal.isStarting}"
209
- ?data-ending-style="${portal.isEnding}"
210
- >
211
- <div
212
- class="Menu"
213
- id="${this.#menuId}"
214
- role="menu"
215
- @click="${this.#onItemSlotClick}"
216
- @mousemove="${this.#onMenuMouseMove}"
217
- ></div>
218
- </div>
219
- `,
220
- });
221
- get #items() {
222
- const container = this.#popup.renderRoot?.querySelector(".Menu") ?? this;
223
- return [...container.querySelectorAll("dui-menu-item")];
224
- }
225
- updated() {
226
- const items = this.#items;
227
- for (let i = 0; i < items.length; i++) {
228
- if (i === this.#highlightedIndex) {
229
- items[i].setAttribute("data-highlighted", "");
230
- }
231
- else {
232
- items[i].removeAttribute("data-highlighted");
233
- }
234
- }
235
- }
236
- // ---- Action zone handlers ----
237
- #onActionClick = (e) => {
238
- e.stopPropagation();
239
- if (this.disabled)
240
- return;
241
- this.dispatchEvent(actionEvent({}));
242
- };
243
- #onActionKeyDown = (e) => {
244
- if (this.disabled)
245
- return;
246
- if (e.key === "Enter" || e.key === " ") {
247
- e.preventDefault();
248
- this.dispatchEvent(actionEvent({}));
249
- }
250
- };
251
- // ---- Trigger zone handlers ----
252
- #onTriggerClick = (e) => {
253
- e.stopPropagation();
254
- if (this.disabled)
255
- return;
256
- if (this.#popup.isOpen) {
257
- this.#popup.close();
258
- }
259
- else {
260
- this.#popup.open();
261
- }
262
- };
263
- #onTriggerKeyDown = (e) => {
264
- if (this.disabled)
265
- return;
266
- const items = this.#items;
267
- switch (e.key) {
268
- case "Enter":
269
- case " ": {
270
- if (this.#popup.isOpen && this.#highlightedIndex >= 0) {
271
- e.preventDefault();
272
- const item = items[this.#highlightedIndex];
273
- if (item && !item.disabled) {
274
- item.click();
275
- this.#popup.close();
276
- }
277
- }
278
- else if (!this.#popup.isOpen) {
279
- e.preventDefault();
280
- this.#popup.open();
281
- }
282
- break;
283
- }
284
- case "ArrowDown": {
285
- e.preventDefault();
286
- if (!this.#popup.isOpen) {
287
- this.#popup.open();
288
- }
289
- else {
290
- let next = this.#highlightedIndex + 1;
291
- while (next < items.length && items[next]?.disabled)
292
- next++;
293
- if (next < items.length)
294
- this.#highlightedIndex = next;
295
- }
296
- break;
297
- }
298
- case "ArrowUp": {
299
- e.preventDefault();
300
- if (!this.#popup.isOpen) {
301
- this.#popup.open();
302
- }
303
- else {
304
- let prev = this.#highlightedIndex - 1;
305
- while (prev >= 0 && items[prev]?.disabled)
306
- prev--;
307
- if (prev >= 0)
308
- this.#highlightedIndex = prev;
309
- }
310
- break;
311
- }
312
- case "Home": {
313
- if (this.#popup.isOpen) {
314
- e.preventDefault();
315
- const firstEnabled = items.findIndex((item) => !item.disabled);
316
- if (firstEnabled >= 0)
317
- this.#highlightedIndex = firstEnabled;
318
- }
319
- break;
320
- }
321
- case "End": {
322
- if (this.#popup.isOpen) {
323
- e.preventDefault();
324
- for (let i = items.length - 1; i >= 0; i--) {
325
- if (!items[i]?.disabled) {
326
- this.#highlightedIndex = i;
327
- break;
328
- }
329
- }
330
- }
331
- break;
332
- }
333
- case "Escape": {
334
- if (this.#popup.isOpen) {
335
- e.preventDefault();
336
- this.#popup.close();
337
- this.#focusTrigger();
338
- }
339
- break;
340
- }
341
- case "Tab": {
342
- if (this.#popup.isOpen) {
343
- this.#popup.close();
344
- }
345
- break;
346
- }
347
- }
348
- };
349
- // ---- Menu handlers ----
350
- #onItemSlotClick = (e) => {
351
- const item = e
352
- .composedPath()
353
- .find((el) => el instanceof HTMLElement && el.matches(DuiMenuItem.tagName));
354
- if (item && !item.disabled) {
355
- this.#popup.close();
356
- }
357
- };
358
- #onMenuMouseMove = () => {
359
- if (this.#highlightedIndex >= 0) {
360
- this.#highlightedIndex = -1;
361
- }
362
- };
363
- #focusTrigger() {
364
- this.shadowRoot?.querySelector(".Trigger")?.focus();
365
- }
366
- render() {
367
- return html `
368
- <div class="Root" part="root">
369
- <button
370
- class="Action"
371
- part="action"
372
- type="button"
373
- ?disabled="${this.disabled}"
374
- @click="${this.#onActionClick}"
375
- @keydown="${this.#onActionKeyDown}"
376
- >
377
- <slot></slot>
378
- </button>
379
-
380
- <span part="divider" class="Divider"></span>
381
-
382
- <button
383
- class="Trigger"
384
- part="trigger"
385
- type="button"
386
- ?disabled="${this.disabled}"
387
- aria-haspopup="menu"
388
- aria-expanded="${this.#popup.isOpen}"
389
- aria-controls="${this.#menuId}"
390
- ?data-open="${this.#popup.isOpen || nothing}"
391
- @click="${this.#onTriggerClick}"
392
- @keydown="${this.#onTriggerKeyDown}"
393
- >
394
- <slot name="icon">
395
- <dui-icon>
396
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
397
- stroke="currentColor" stroke-width="2" stroke-linecap="round"
398
- stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
399
- </dui-icon>
400
- </slot>
401
- </button>
402
- </div>
403
- `;
404
- }
405
- };
406
- })();
407
- export { DuiSplitButton };
316
+ export class DuiSplitButton extends DuiSplitButtonPrimitive {
317
+ static styles = [...DuiSplitButtonPrimitive.styles, styles];
318
+ }
319
+ customElements.define(DuiSplitButton.tagName, DuiSplitButton);