@adecore/ui 0.35.5 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/Button.d.ts +2 -3
  2. package/dist/Button.js +21 -46
  3. package/dist/Checkbox.js +1 -1
  4. package/dist/ChoiceCards.js +2 -2
  5. package/dist/IconPicker.d.ts +2 -1
  6. package/dist/IconPicker.js +504 -217
  7. package/dist/Input.d.ts +5 -3
  8. package/dist/Input.js +127 -112
  9. package/dist/Segmented.js +1 -1
  10. package/dist/SplitButton.d.ts +17 -0
  11. package/dist/SplitButton.js +237 -0
  12. package/dist/Stepper.js +1 -1
  13. package/dist/Switch.js +1 -1
  14. package/dist/Tile.js +2 -2
  15. package/dist/button-class.d.ts +6 -0
  16. package/dist/button-class.js +92 -0
  17. package/dist/file-tree/empty-lines.d.ts +11 -0
  18. package/dist/file-tree/empty-lines.js +89 -0
  19. package/dist/file-tree/highlight.d.ts +4 -0
  20. package/dist/file-tree/highlight.js +75 -0
  21. package/dist/file-tree/parts.d.ts +9 -1
  22. package/dist/file-tree/parts.js +297 -205
  23. package/dist/file-tree/style.js +13 -0
  24. package/dist/file-tree/use-empty-lines.d.ts +3 -0
  25. package/dist/file-tree/use-empty-lines.js +176 -0
  26. package/dist/file-tree/use-file-tree.js +5 -1
  27. package/dist/file-tree/use-slots.d.ts +16 -2
  28. package/dist/file-tree/use-slots.js +186 -43
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/locales/en.d.ts +1 -0
  32. package/dist/locales/en.js +1 -0
  33. package/dist/locales/nl.d.ts +1 -0
  34. package/dist/locales/nl.js +1 -0
  35. package/dist/select-shared.d.ts +1 -1
  36. package/dist/select-shared.js +1 -1
  37. package/dist/settings/SettingsDialog.js +1 -1
  38. package/dist/theme.css +33 -3
  39. package/package.json +1 -1
  40. package/src/Button.tsx +3 -36
  41. package/src/Checkbox.tsx +1 -1
  42. package/src/ChoiceCards.tsx +2 -2
  43. package/src/IconPicker.tsx +220 -136
  44. package/src/Input.tsx +19 -10
  45. package/src/Segmented.tsx +1 -1
  46. package/src/SplitButton.tsx +72 -0
  47. package/src/Stepper.tsx +6 -1
  48. package/src/Switch.tsx +1 -1
  49. package/src/Tile.tsx +2 -2
  50. package/src/button-class.ts +111 -0
  51. package/src/file-tree/empty-lines.ts +105 -0
  52. package/src/file-tree/highlight.ts +80 -0
  53. package/src/file-tree/parts.tsx +42 -11
  54. package/src/file-tree/style.ts +13 -0
  55. package/src/file-tree/use-empty-lines.ts +115 -0
  56. package/src/file-tree/use-file-tree.ts +2 -1
  57. package/src/file-tree/use-slots.ts +176 -17
  58. package/src/index.ts +1 -0
  59. package/src/locales/en.ts +1 -0
  60. package/src/locales/nl.ts +1 -0
  61. package/src/select-shared.ts +2 -1
  62. package/src/settings/SettingsDialog.tsx +1 -1
  63. package/src/theme.css +33 -3
package/dist/Input.d.ts CHANGED
@@ -1,14 +1,16 @@
1
- import type { ComponentProps } from 'react';
1
+ import type { ComponentProps, ReactNode } from 'react';
2
2
  import type { LucideIcon } from 'lucide-react';
3
3
  export interface InputProps extends Omit<ComponentProps<'input'>, 'size'> {
4
4
  size?: 'md' | 'sm';
5
5
  mono?: boolean;
6
6
  icon?: LucideIcon;
7
+ end?: ReactNode;
7
8
  }
8
- export declare function Input({ size, mono, icon, className, id, ...props }: InputProps): import("react").JSX.Element;
9
+ export declare function Input({ size, mono, icon, end, className, id, ...props }: InputProps): import("react").JSX.Element;
9
10
  export interface TextAreaProps extends ComponentProps<'textarea'> {
10
11
  size?: 'md' | 'sm';
11
12
  resize?: 'none' | 'vertical';
12
13
  mono?: boolean;
14
+ variant?: 'field' | 'bare';
13
15
  }
14
- export declare function TextArea({ size, resize, mono, className, id, ...props }: TextAreaProps): import("react").JSX.Element;
16
+ export declare function TextArea({ size, resize, mono, variant, className, id, ...props }: TextAreaProps): import("react").JSX.Element;
package/dist/Input.js CHANGED
@@ -5,8 +5,9 @@ import { Icon } from "./Icon.js";
5
5
  /* The one text input: one border and one focus ring at the one height or the compact one. */
6
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  export function Input(t0) {
8
- const $ = _c(39);
8
+ const $ = _c(42);
9
9
  let className;
10
+ let end;
10
11
  let icon;
11
12
  let id;
12
13
  let props;
@@ -17,164 +18,173 @@ export function Input(t0) {
17
18
  size: t1,
18
19
  mono: t2,
19
20
  icon,
21
+ end,
20
22
  className,
21
23
  id,
22
24
  ...props
23
25
  } = t0);
24
26
  $[0] = t0;
25
27
  $[1] = className;
26
- $[2] = icon;
27
- $[3] = id;
28
- $[4] = props;
29
- $[5] = t1;
30
- $[6] = t2;
28
+ $[2] = end;
29
+ $[3] = icon;
30
+ $[4] = id;
31
+ $[5] = props;
32
+ $[6] = t1;
33
+ $[7] = t2;
31
34
  } else {
32
35
  className = $[1];
33
- icon = $[2];
34
- id = $[3];
35
- props = $[4];
36
- t1 = $[5];
37
- t2 = $[6];
36
+ end = $[2];
37
+ icon = $[3];
38
+ id = $[4];
39
+ props = $[5];
40
+ t1 = $[6];
41
+ t2 = $[7];
38
42
  }
39
43
  const size = t1 === undefined ? "md" : t1;
40
44
  const mono = t2 === undefined ? false : t2;
41
45
  const field = useFieldControl();
42
46
  const small = size === "sm";
43
47
  let t3;
44
- if ($[7] !== field || $[8] !== id) {
48
+ if ($[8] !== field || $[9] !== id) {
45
49
  t3 = fieldControlProps(field, id);
46
- $[7] = field;
47
- $[8] = id;
48
- $[9] = t3;
50
+ $[8] = field;
51
+ $[9] = id;
52
+ $[10] = t3;
49
53
  } else {
50
- t3 = $[9];
54
+ t3 = $[10];
51
55
  }
52
56
  let t4;
53
- if ($[10] !== props || $[11] !== t3) {
57
+ if ($[11] !== props || $[12] !== t3) {
54
58
  t4 = {
55
59
  ...t3,
56
60
  ...props
57
61
  };
58
- $[10] = props;
59
- $[11] = t3;
60
- $[12] = t4;
62
+ $[11] = props;
63
+ $[12] = t3;
64
+ $[13] = t4;
61
65
  } else {
62
- t4 = $[12];
66
+ t4 = $[13];
63
67
  }
64
68
  const control = t4;
65
- if (icon === undefined) {
69
+ if (icon === undefined && end === undefined) {
66
70
  const t5 = small && "field-sm";
67
71
  const t6 = mono && "font-mono text-code";
68
72
  let t7;
69
- if ($[13] !== className || $[14] !== t5 || $[15] !== t6) {
73
+ if ($[14] !== className || $[15] !== t5 || $[16] !== t6) {
70
74
  t7 = clsx("field", t5, t6, className);
71
- $[13] = className;
72
- $[14] = t5;
73
- $[15] = t6;
74
- $[16] = t7;
75
+ $[14] = className;
76
+ $[15] = t5;
77
+ $[16] = t6;
78
+ $[17] = t7;
75
79
  } else {
76
- t7 = $[16];
80
+ t7 = $[17];
77
81
  }
78
82
  let t8;
79
- if ($[17] !== control || $[18] !== t7) {
83
+ if ($[18] !== control || $[19] !== t7) {
80
84
  t8 = /*#__PURE__*/_jsx("input", {
81
85
  ...control,
82
86
  className: t7
83
87
  });
84
- $[17] = control;
85
- $[18] = t7;
86
- $[19] = t8;
88
+ $[18] = control;
89
+ $[19] = t7;
90
+ $[20] = t8;
87
91
  } else {
88
- t8 = $[19];
92
+ t8 = $[20];
89
93
  }
90
94
  return t8;
91
95
  }
92
96
  const t5 = small && "field-sm";
93
97
  let t6;
94
- if ($[20] !== className || $[21] !== t5) {
98
+ if ($[21] !== className || $[22] !== t5) {
95
99
  t6 = clsx("field relative flex p-0", t5, className);
96
- $[20] = className;
97
- $[21] = t5;
98
- $[22] = t6;
100
+ $[21] = className;
101
+ $[22] = t5;
102
+ $[23] = t6;
99
103
  } else {
100
- t6 = $[22];
104
+ t6 = $[23];
101
105
  }
102
- const t7 = small ? 12 : 14;
103
- const t8 = small ? "left-2" : "left-2.5";
104
- let t9;
105
- if ($[23] !== t8) {
106
- t9 = clsx("pointer-events-none absolute top-1/2 -translate-y-1/2 text-text-faint", t8);
107
- $[23] = t8;
108
- $[24] = t9;
109
- } else {
110
- t9 = $[24];
111
- }
112
- let t10;
113
- if ($[25] !== icon || $[26] !== t7 || $[27] !== t9) {
114
- t10 = /*#__PURE__*/_jsx(Icon, {
106
+ let t7;
107
+ if ($[24] !== icon || $[25] !== small) {
108
+ t7 = icon !== undefined && /*#__PURE__*/_jsx(Icon, {
115
109
  icon: icon,
116
- size: t7,
117
- className: t9
110
+ size: small ? 12 : 14,
111
+ className: clsx("pointer-events-none absolute top-1/2 -translate-y-1/2 text-text-faint", small ? "left-2" : "left-2.5")
118
112
  });
119
- $[25] = icon;
113
+ $[24] = icon;
114
+ $[25] = small;
120
115
  $[26] = t7;
121
- $[27] = t9;
122
- $[28] = t10;
123
116
  } else {
124
- t10 = $[28];
117
+ t7 = $[26];
125
118
  }
126
- const t11 = small ? "pr-2 pl-7" : "pr-2.5 pl-8";
127
- const t12 = mono && "font-mono text-code";
128
- let t13;
129
- if ($[29] !== t11 || $[30] !== t12) {
130
- t13 = clsx("min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-faint", t11, t12);
131
- $[29] = t11;
132
- $[30] = t12;
133
- $[31] = t13;
119
+ const t8 = icon === undefined ? small ? "pl-2" : "pl-2.5" : small ? "pl-7" : "pl-8";
120
+ const t9 = end === undefined ? small ? "pr-2" : "pr-2.5" : "pr-1";
121
+ const t10 = mono && "font-mono text-code";
122
+ let t11;
123
+ if ($[27] !== t10 || $[28] !== t8 || $[29] !== t9) {
124
+ t11 = clsx("min-w-0 flex-1 bg-transparent outline-none placeholder:text-text-faint", t8, t9, t10);
125
+ $[27] = t10;
126
+ $[28] = t8;
127
+ $[29] = t9;
128
+ $[30] = t11;
134
129
  } else {
135
- t13 = $[31];
130
+ t11 = $[30];
136
131
  }
137
- let t14;
138
- if ($[32] !== control || $[33] !== t13) {
139
- t14 = /*#__PURE__*/_jsx("input", {
132
+ let t12;
133
+ if ($[31] !== control || $[32] !== t11) {
134
+ t12 = /*#__PURE__*/_jsx("input", {
140
135
  ...control,
141
- className: t13
136
+ className: t11
142
137
  });
143
- $[32] = control;
144
- $[33] = t13;
145
- $[34] = t14;
138
+ $[31] = control;
139
+ $[32] = t11;
140
+ $[33] = t12;
146
141
  } else {
147
- t14 = $[34];
142
+ t12 = $[33];
148
143
  }
149
- let t15;
150
- if ($[35] !== t10 || $[36] !== t14 || $[37] !== t6) {
151
- t15 = /*#__PURE__*/_jsxs("span", {
144
+ let t13;
145
+ if ($[34] !== end || $[35] !== small) {
146
+ t13 = end !== undefined && /*#__PURE__*/_jsx("span", {
147
+ className: clsx("flex shrink-0 items-center gap-1", small ? "pr-0.5" : "pr-1"),
148
+ children: end
149
+ });
150
+ $[34] = end;
151
+ $[35] = small;
152
+ $[36] = t13;
153
+ } else {
154
+ t13 = $[36];
155
+ }
156
+ let t14;
157
+ if ($[37] !== t12 || $[38] !== t13 || $[39] !== t6 || $[40] !== t7) {
158
+ t14 = /*#__PURE__*/_jsxs("span", {
152
159
  className: t6,
153
- children: [t10, t14]
160
+ children: [t7, t12, t13]
154
161
  });
155
- $[35] = t10;
156
- $[36] = t14;
157
- $[37] = t6;
158
- $[38] = t15;
162
+ $[37] = t12;
163
+ $[38] = t13;
164
+ $[39] = t6;
165
+ $[40] = t7;
166
+ $[41] = t14;
159
167
  } else {
160
- t15 = $[38];
168
+ t14 = $[41];
161
169
  }
162
- return t15;
170
+ return t14;
163
171
  }
164
172
  /* A field of a few lines: a commit message, the body of a pull request, a note. At least 64px tall; `rows` makes it taller. */
165
173
  export function TextArea(t0) {
166
- const $ = _c(19);
174
+ const $ = _c(21);
167
175
  let className;
168
176
  let id;
169
177
  let props;
170
178
  let t1;
171
179
  let t2;
172
180
  let t3;
181
+ let t4;
173
182
  if ($[0] !== t0) {
174
183
  ({
175
184
  size: t1,
176
185
  resize: t2,
177
186
  mono: t3,
187
+ variant: t4,
178
188
  className,
179
189
  id,
180
190
  ...props
@@ -186,6 +196,7 @@ export function TextArea(t0) {
186
196
  $[4] = t1;
187
197
  $[5] = t2;
188
198
  $[6] = t3;
199
+ $[7] = t4;
189
200
  } else {
190
201
  className = $[1];
191
202
  id = $[2];
@@ -193,47 +204,51 @@ export function TextArea(t0) {
193
204
  t1 = $[4];
194
205
  t2 = $[5];
195
206
  t3 = $[6];
207
+ t4 = $[7];
196
208
  }
197
209
  const size = t1 === undefined ? "md" : t1;
198
210
  const resize = t2 === undefined ? "none" : t2;
199
211
  const mono = t3 === undefined ? false : t3;
212
+ const variant = t4 === undefined ? "field" : t4;
200
213
  const field = useFieldControl();
201
- let t4;
202
- if ($[7] !== field || $[8] !== id) {
203
- t4 = fieldControlProps(field, id);
204
- $[7] = field;
205
- $[8] = id;
206
- $[9] = t4;
214
+ let t5;
215
+ if ($[8] !== field || $[9] !== id) {
216
+ t5 = fieldControlProps(field, id);
217
+ $[8] = field;
218
+ $[9] = id;
219
+ $[10] = t5;
207
220
  } else {
208
- t4 = $[9];
221
+ t5 = $[10];
209
222
  }
210
- const t5 = size === "sm" && "field-sm";
211
- const t6 = resize === "vertical" ? "resize-y" : "resize-none";
212
- const t7 = mono && "font-mono text-code";
213
- let t8;
214
- if ($[10] !== className || $[11] !== t5 || $[12] !== t6 || $[13] !== t7) {
215
- t8 = clsx("field h-auto min-h-16 py-1.5", t5, t6, t7, className);
216
- $[10] = className;
217
- $[11] = t5;
223
+ const t6 = size === "sm" && "field-sm";
224
+ const t7 = variant === "bare" && "field-bare";
225
+ const t8 = resize === "vertical" ? "resize-y" : "resize-none";
226
+ const t9 = mono && "font-mono text-code";
227
+ let t10;
228
+ if ($[11] !== className || $[12] !== t6 || $[13] !== t7 || $[14] !== t8 || $[15] !== t9) {
229
+ t10 = clsx("field h-auto min-h-16 py-1.5", t6, t7, t8, t9, className);
230
+ $[11] = className;
218
231
  $[12] = t6;
219
232
  $[13] = t7;
220
233
  $[14] = t8;
234
+ $[15] = t9;
235
+ $[16] = t10;
221
236
  } else {
222
- t8 = $[14];
237
+ t10 = $[16];
223
238
  }
224
- let t9;
225
- if ($[15] !== props || $[16] !== t4 || $[17] !== t8) {
226
- t9 = /*#__PURE__*/_jsx("textarea", {
227
- ...t4,
239
+ let t11;
240
+ if ($[17] !== props || $[18] !== t10 || $[19] !== t5) {
241
+ t11 = /*#__PURE__*/_jsx("textarea", {
242
+ ...t5,
228
243
  ...props,
229
- className: t8
244
+ className: t10
230
245
  });
231
- $[15] = props;
232
- $[16] = t4;
233
- $[17] = t8;
234
- $[18] = t9;
246
+ $[17] = props;
247
+ $[18] = t10;
248
+ $[19] = t5;
249
+ $[20] = t11;
235
250
  } else {
236
- t9 = $[18];
251
+ t11 = $[20];
237
252
  }
238
- return t9;
253
+ return t11;
239
254
  }
package/dist/Segmented.js CHANGED
@@ -73,7 +73,7 @@ export function Segmented(t0) {
73
73
  const move = t5;
74
74
  let t6;
75
75
  if ($[6] !== className || $[7] !== sizing.row || $[8] !== sizing.track || $[9] !== vertical) {
76
- t6 = clsx("flex bg-surface-sunken p-0.5 text-xs font-medium", sizing.track, vertical ? "w-full flex-col items-stretch gap-0.5" : clsx(sizing.row, "w-fit items-center"), className);
76
+ t6 = clsx("flex bg-surface-sunken p-0.5 text-xs font-medium dark:bg-surface-idle", sizing.track, vertical ? "w-full flex-col items-stretch gap-0.5" : clsx(sizing.row, "w-fit items-center"), className);
77
77
  $[6] = className;
78
78
  $[7] = sizing.row;
79
79
  $[8] = sizing.track;
@@ -0,0 +1,17 @@
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ import { type ButtonSize, type ButtonVariant } from './button-class.ts';
3
+ import { type MenuPopupProps } from './menu/parts.tsx';
4
+ export interface SplitButtonProps extends Omit<ComponentProps<'button'>, 'ref'> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ tooltip?: ReactNode;
8
+ menu: ReactNode;
9
+ menuLabel: string;
10
+ menuTooltip?: ReactNode;
11
+ menuDisabled?: boolean;
12
+ menuAlign?: MenuPopupProps['align'];
13
+ menuClassName?: string;
14
+ className?: string;
15
+ ref?: ComponentProps<'span'>['ref'];
16
+ }
17
+ export declare function SplitButton({ variant, size, tooltip, menu, menuLabel, menuTooltip, menuDisabled, menuAlign, menuClassName, className, ref, type, ...props }: SplitButtonProps): import("react").JSX.Element;
@@ -0,0 +1,237 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useState } from 'react';
3
+ import clsx from 'clsx';
4
+ import { ChevronDown } from 'lucide-react';
5
+ import { splitFrameClass, splitHalfClass } from './button-class.js';
6
+ import { Icon } from "./Icon.js";
7
+ import { MenuPopup, MenuRoot, MenuTrigger } from "./menu/parts.js";
8
+ import { mergeRefs } from './merge-refs.js';
9
+ import { Tooltip } from "./Tooltip.js";
10
+ /*
11
+ * A primary action and a chevron that opens a menu of related ones, drawn as one button with a short
12
+ * line between the halves. Each half is a button of its own, so each takes the focus, can be disabled
13
+ * and carries its own hint; the menu hangs under the whole control.
14
+ */
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ export function SplitButton(t0) {
17
+ const $ = _c(56);
18
+ let className;
19
+ let menu;
20
+ let menuClassName;
21
+ let menuLabel;
22
+ let menuTooltip;
23
+ let props;
24
+ let ref;
25
+ let t1;
26
+ let t2;
27
+ let t3;
28
+ let t4;
29
+ let t5;
30
+ let tooltip;
31
+ if ($[0] !== t0) {
32
+ ({
33
+ variant: t1,
34
+ size: t2,
35
+ tooltip,
36
+ menu,
37
+ menuLabel,
38
+ menuTooltip,
39
+ menuDisabled: t3,
40
+ menuAlign: t4,
41
+ menuClassName,
42
+ className,
43
+ ref,
44
+ type: t5,
45
+ ...props
46
+ } = t0);
47
+ $[0] = t0;
48
+ $[1] = className;
49
+ $[2] = menu;
50
+ $[3] = menuClassName;
51
+ $[4] = menuLabel;
52
+ $[5] = menuTooltip;
53
+ $[6] = props;
54
+ $[7] = ref;
55
+ $[8] = t1;
56
+ $[9] = t2;
57
+ $[10] = t3;
58
+ $[11] = t4;
59
+ $[12] = t5;
60
+ $[13] = tooltip;
61
+ } else {
62
+ className = $[1];
63
+ menu = $[2];
64
+ menuClassName = $[3];
65
+ menuLabel = $[4];
66
+ menuTooltip = $[5];
67
+ props = $[6];
68
+ ref = $[7];
69
+ t1 = $[8];
70
+ t2 = $[9];
71
+ t3 = $[10];
72
+ t4 = $[11];
73
+ t5 = $[12];
74
+ tooltip = $[13];
75
+ }
76
+ const variant = t1 === undefined ? "secondary" : t1;
77
+ const size = t2 === undefined ? "md" : t2;
78
+ const menuDisabled = t3 === undefined ? false : t3;
79
+ const menuAlign = t4 === undefined ? "end" : t4;
80
+ const type = t5 === undefined ? "button" : t5;
81
+ const [box, setBox] = useState(null);
82
+ let t6;
83
+ if ($[14] !== size || $[15] !== variant) {
84
+ t6 = splitHalfClass(variant, size, "action");
85
+ $[14] = size;
86
+ $[15] = variant;
87
+ $[16] = t6;
88
+ } else {
89
+ t6 = $[16];
90
+ }
91
+ let t7;
92
+ if ($[17] !== props || $[18] !== t6 || $[19] !== type) {
93
+ t7 = /*#__PURE__*/_jsx("button", {
94
+ type: type,
95
+ className: t6,
96
+ ...props
97
+ });
98
+ $[17] = props;
99
+ $[18] = t6;
100
+ $[19] = type;
101
+ $[20] = t7;
102
+ } else {
103
+ t7 = $[20];
104
+ }
105
+ const action = t7;
106
+ let t8;
107
+ if ($[21] !== ref) {
108
+ t8 = mergeRefs(ref, setBox);
109
+ $[21] = ref;
110
+ $[22] = t8;
111
+ } else {
112
+ t8 = $[22];
113
+ }
114
+ let t9;
115
+ if ($[23] !== className || $[24] !== size || $[25] !== variant) {
116
+ t9 = clsx(splitFrameClass(variant, size), className);
117
+ $[23] = className;
118
+ $[24] = size;
119
+ $[25] = variant;
120
+ $[26] = t9;
121
+ } else {
122
+ t9 = $[26];
123
+ }
124
+ let t10;
125
+ if ($[27] !== action || $[28] !== tooltip) {
126
+ t10 = tooltip === undefined ? action : /*#__PURE__*/_jsx(Tooltip, {
127
+ label: tooltip,
128
+ children: action
129
+ });
130
+ $[27] = action;
131
+ $[28] = tooltip;
132
+ $[29] = t10;
133
+ } else {
134
+ t10 = $[29];
135
+ }
136
+ const t11 = menuTooltip ?? menuLabel;
137
+ let t12;
138
+ if ($[30] !== size || $[31] !== variant) {
139
+ t12 = splitHalfClass(variant, size, "menu");
140
+ $[30] = size;
141
+ $[31] = variant;
142
+ $[32] = t12;
143
+ } else {
144
+ t12 = $[32];
145
+ }
146
+ let t13;
147
+ if ($[33] !== t12) {
148
+ t13 = /*#__PURE__*/_jsx("button", {
149
+ type: "button",
150
+ className: t12
151
+ });
152
+ $[33] = t12;
153
+ $[34] = t13;
154
+ } else {
155
+ t13 = $[34];
156
+ }
157
+ let t14;
158
+ if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
159
+ t14 = /*#__PURE__*/_jsx(Icon, {
160
+ icon: ChevronDown,
161
+ size: 14
162
+ });
163
+ $[35] = t14;
164
+ } else {
165
+ t14 = $[35];
166
+ }
167
+ let t15;
168
+ if ($[36] !== menuDisabled || $[37] !== menuLabel || $[38] !== t13) {
169
+ t15 = /*#__PURE__*/_jsx(MenuTrigger, {
170
+ render: t13,
171
+ "aria-label": menuLabel,
172
+ disabled: menuDisabled,
173
+ children: t14
174
+ });
175
+ $[36] = menuDisabled;
176
+ $[37] = menuLabel;
177
+ $[38] = t13;
178
+ $[39] = t15;
179
+ } else {
180
+ t15 = $[39];
181
+ }
182
+ let t16;
183
+ if ($[40] !== t11 || $[41] !== t15) {
184
+ t16 = /*#__PURE__*/_jsx(Tooltip, {
185
+ label: t11,
186
+ children: t15
187
+ });
188
+ $[40] = t11;
189
+ $[41] = t15;
190
+ $[42] = t16;
191
+ } else {
192
+ t16 = $[42];
193
+ }
194
+ let t17;
195
+ if ($[43] !== box || $[44] !== menu || $[45] !== menuAlign || $[46] !== menuClassName) {
196
+ t17 = /*#__PURE__*/_jsx(MenuPopup, {
197
+ anchor: box,
198
+ align: menuAlign,
199
+ className: menuClassName,
200
+ children: menu
201
+ });
202
+ $[43] = box;
203
+ $[44] = menu;
204
+ $[45] = menuAlign;
205
+ $[46] = menuClassName;
206
+ $[47] = t17;
207
+ } else {
208
+ t17 = $[47];
209
+ }
210
+ let t18;
211
+ if ($[48] !== t16 || $[49] !== t17) {
212
+ t18 = /*#__PURE__*/_jsxs(MenuRoot, {
213
+ children: [t16, t17]
214
+ });
215
+ $[48] = t16;
216
+ $[49] = t17;
217
+ $[50] = t18;
218
+ } else {
219
+ t18 = $[50];
220
+ }
221
+ let t19;
222
+ if ($[51] !== t10 || $[52] !== t18 || $[53] !== t8 || $[54] !== t9) {
223
+ t19 = /*#__PURE__*/_jsxs("span", {
224
+ ref: t8,
225
+ className: t9,
226
+ children: [t10, t18]
227
+ });
228
+ $[51] = t10;
229
+ $[52] = t18;
230
+ $[53] = t8;
231
+ $[54] = t9;
232
+ $[55] = t19;
233
+ } else {
234
+ t19 = $[55];
235
+ }
236
+ return t19;
237
+ }
package/dist/Stepper.js CHANGED
@@ -68,7 +68,7 @@ export function Stepper(t0) {
68
68
  const nudge = t4;
69
69
  let t5;
70
70
  if ($[12] !== className) {
71
- t5 = clsx("shrink-0 rounded-lg bg-surface-sunken p-0.5", className);
71
+ t5 = clsx("shrink-0 rounded-lg border border-field-border bg-field bg-clip-padding p-px", className);
72
72
  $[12] = className;
73
73
  $[13] = t5;
74
74
  } else {
package/dist/Switch.js CHANGED
@@ -23,7 +23,7 @@ export function Switch(t0) {
23
23
  }
24
24
  let t2;
25
25
  if ($[2] !== className) {
26
- t2 = clsx("relative inline-flex h-5 w-9 shrink-0 rounded-full bg-border-strong p-0.5 transition-colors data-checked:bg-accent data-disabled:opacity-50", className);
26
+ t2 = clsx("relative inline-flex h-5 w-9 shrink-0 rounded-full bg-border-strong p-0.5 transition-colors data-checked:bg-accent dark:not-data-checked:bg-field dark:not-data-checked:inset-ring dark:not-data-checked:inset-ring-field-border data-disabled:opacity-50", className);
27
27
  $[2] = className;
28
28
  $[3] = t2;
29
29
  } else {
package/dist/Tile.js CHANGED
@@ -57,7 +57,7 @@ export function Tile(t0) {
57
57
  const t5 = primary ? "border-accent" : "border-border";
58
58
  let t6;
59
59
  if ($[10] !== className || $[11] !== t4 || $[12] !== t5) {
60
- t6 = clsx("flex min-w-0 items-center border bg-surface text-left hover:bg-surface-hover disabled:opacity-50 disabled:hover:bg-surface", t4, t5, className);
60
+ t6 = clsx("flex min-w-0 items-center border bg-surface text-left hover:bg-surface-hover-edged disabled:opacity-50 disabled:hover:bg-surface", t4, t5, className);
61
61
  $[10] = className;
62
62
  $[11] = t4;
63
63
  $[12] = t5;
@@ -65,7 +65,7 @@ export function Tile(t0) {
65
65
  } else {
66
66
  t6 = $[13];
67
67
  }
68
- const t7 = primary ? "bg-accent text-accent-text" : "bg-surface-sunken text-text-muted";
68
+ const t7 = primary ? "bg-accent text-accent-text" : "bg-surface-sunken text-text-muted dark:bg-field dark:inset-ring dark:inset-ring-field-border";
69
69
  let t8;
70
70
  if ($[14] !== t7) {
71
71
  t8 = clsx("grid size-8 shrink-0 place-items-center rounded-lg", t7);
@@ -0,0 +1,6 @@
1
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'danger-outline' | 'positive' | 'inverse';
2
+ export type ButtonSize = 'xs' | 'sm' | 'md';
3
+ export type ButtonShape = 'default' | 'pill';
4
+ export declare function buttonClass(variant: ButtonVariant, size: ButtonSize, shape: ButtonShape): string;
5
+ export declare function splitFrameClass(variant: ButtonVariant, size: ButtonSize): string;
6
+ export declare function splitHalfClass(variant: ButtonVariant, size: ButtonSize, half: 'action' | 'menu'): string;