@jonmilner/ui 0.21.2 → 0.22.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 (97) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/AlertDialog/index.d.mts +1 -1
  3. package/dist/Avatar/index.d.mts +1 -1
  4. package/dist/Avatar/index.mjs +5 -5
  5. package/dist/Badge/index.d.mts +1 -1
  6. package/dist/Badge/index.mjs +12 -12
  7. package/dist/Box/index.mjs +1 -1
  8. package/dist/Button/index.d.mts +1 -1
  9. package/dist/Button/index.mjs +22 -22
  10. package/dist/Checkbox/index.mjs +7 -7
  11. package/dist/Chip/index.mjs +35 -35
  12. package/dist/Clickable/index.d.mts +1 -1
  13. package/dist/Clickable/index.mjs +4 -4
  14. package/dist/ColorField/client.mjs +6 -6
  15. package/dist/ColorField/index.mjs +14 -14
  16. package/dist/Combobox/Combobox.css +1 -1
  17. package/dist/Combobox/client.mjs +26 -26
  18. package/dist/Combobox/index.mjs +20 -20
  19. package/dist/Dialog/client.mjs +26 -26
  20. package/dist/Dialog/index.d.mts +1 -1
  21. package/dist/Dialog/index.mjs +19 -19
  22. package/dist/Field/client.mjs +6 -6
  23. package/dist/Field/index.mjs +29 -29
  24. package/dist/IconButton/IconButton.css +1 -1
  25. package/dist/IconButton/IconButton.css.mjs +2 -2
  26. package/dist/IconButton/index.d.mts +5 -2
  27. package/dist/IconButton/index.mjs +60 -21
  28. package/dist/Inline/index.d.mts +2 -2
  29. package/dist/Inline/index.mjs +4 -4
  30. package/dist/Menu/Menu.css +1 -1
  31. package/dist/Menu/Menu.css.mjs +2 -2
  32. package/dist/Menu/client.d.mts +1 -0
  33. package/dist/Menu/client.mjs +95 -53
  34. package/dist/Menu/index.d.mts +8 -0
  35. package/dist/Menu/index.mjs +123 -87
  36. package/dist/MultiSelect/MultiSelect.css +1 -1
  37. package/dist/MultiSelect/client.mjs +4 -4
  38. package/dist/MultiSelect/index.mjs +8 -8
  39. package/dist/NavList/NavList.css +1 -1
  40. package/dist/NavList/client.mjs +3 -3
  41. package/dist/NavList/index.d.mts +3 -3
  42. package/dist/NavList/index.mjs +67 -65
  43. package/dist/NumberField/index.mjs +17 -17
  44. package/dist/RadioGroup/index.mjs +23 -23
  45. package/dist/SearchField/client.mjs +13 -13
  46. package/dist/SearchField/index.mjs +16 -16
  47. package/dist/Select/Select.css +1 -1
  48. package/dist/Select/client.mjs +11 -11
  49. package/dist/Select/index.mjs +8 -8
  50. package/dist/Sidebar/index.d.mts +1 -1
  51. package/dist/Sidebar/index.mjs +21 -21
  52. package/dist/SidebarLayout/index.d.mts +1 -1
  53. package/dist/SidebarLayout/index.mjs +8 -8
  54. package/dist/Stack/index.d.mts +2 -2
  55. package/dist/Stack/index.mjs +4 -4
  56. package/dist/Switch/index.mjs +13 -13
  57. package/dist/Table/index.d.mts +1 -1
  58. package/dist/Table/index.mjs +59 -59
  59. package/dist/Tabs/index.mjs +26 -26
  60. package/dist/Tag/index.d.mts +1 -1
  61. package/dist/Tag/index.mjs +16 -16
  62. package/dist/Text/index.d.mts +2 -2
  63. package/dist/Text/index.mjs +4 -4
  64. package/dist/TextField/index.mjs +16 -16
  65. package/dist/Textarea/index.mjs +9 -9
  66. package/dist/Toast/client.d.mts +2 -1
  67. package/dist/Toast/client.mjs +62 -55
  68. package/dist/Tooltip/base.mjs +13 -13
  69. package/dist/contrast/contrast.d.mts +1 -1
  70. package/dist/contrast/contrast.mjs +9 -9
  71. package/dist/contrast/mixes.mjs +27 -27
  72. package/dist/docs/Combobox.md +1 -0
  73. package/dist/docs/IconButton.md +9 -1
  74. package/dist/docs/Menu.md +51 -3
  75. package/dist/docs/MultiSelect.md +1 -0
  76. package/dist/docs/NavList.md +2 -2
  77. package/dist/docs/Select.md +1 -0
  78. package/dist/docs/Toast.md +7 -0
  79. package/dist/docs/llms.txt +1 -1
  80. package/dist/docs/manifest.json +118 -1
  81. package/dist/docs/migrations/0.22.0.md +35 -0
  82. package/dist/icons/index.d.mts +3 -3
  83. package/dist/icons/index.mjs +33 -33
  84. package/dist/index.d.mts +16 -16
  85. package/dist/index.mjs +39 -39
  86. package/dist/lint/index.mjs +1 -0
  87. package/dist/popup/client.d.mts +1 -1
  88. package/dist/popup/client.mjs +49 -32
  89. package/dist/popup/direction.d.mts +1 -0
  90. package/dist/popup/direction.mjs +23 -0
  91. package/dist/popup/listbox-base.mjs +24 -24
  92. package/dist/popup/listbox-options.mjs +4 -4
  93. package/dist/popup/listbox-row.mjs +1 -0
  94. package/dist/popup/tooltip.d.mts +1 -0
  95. package/dist/popup/tooltip.mjs +48 -42
  96. package/dist/theme/define-theme.mjs +42 -42
  97. package/package.json +2 -2
@@ -1,21 +1,21 @@
1
- import { controlText as e } from "../styles/control-size.mjs";
2
- import { Text as t } from "../Text/index.mjs";
3
- import { Field as n } from "../Field/index.mjs";
4
- import { ListboxLabel as r, ListboxScope as i } from "../popup/listbox-base.mjs";
5
- import { empty as a, hiddenLabel as o, input as s } from "./Combobox.css.mjs";
6
- import { ComboboxList as c, ComboboxPopup as l, ComboboxPortal as u, ComboboxPositioner as d, ComboboxRoot as f, ComboboxTrigger as p } from "./client.mjs";
1
+ import { Field as e } from "../Field/index.mjs";
2
+ import { ListboxLabel as t, ListboxScope as n } from "../popup/listbox-base.mjs";
3
+ import { controlText as r } from "../styles/control-size.mjs";
4
+ import { Text as i } from "../Text/index.mjs";
5
+ import { ComboboxList as a, ComboboxPopup as o, ComboboxPortal as s, ComboboxPositioner as c, ComboboxRoot as l, ComboboxTrigger as u } from "./client.mjs";
6
+ import { empty as d, hiddenLabel as f, input as p } from "./Combobox.css.mjs";
7
7
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
8
  import { Combobox as g } from "@base-ui/react/combobox";
9
9
  // src/Combobox/index.tsx
10
10
  function _({ options: _, multiple: v = !1, value: y, defaultValue: b, onValueChange: x, label: S, hideLabel: C = !1, description: w, error: T, placeholder: E = "Select", filterLabel: D = "Filter", emptyLabel: O = "No matches", countLabel: k = "{count} selected", disabled: A = !1, required: j = !1, size: M = "med", name: N, className: P, style: F, ...I }) {
11
- return /* @__PURE__ */ h(n, {
11
+ return /* @__PURE__ */ h(e, {
12
12
  ...I,
13
13
  className: P,
14
14
  disabled: A,
15
15
  invalid: T != null && T !== !1 && T !== "",
16
16
  style: F,
17
17
  children: [
18
- /* @__PURE__ */ m(i, { children: /* @__PURE__ */ h(f, {
18
+ /* @__PURE__ */ m(n, { children: /* @__PURE__ */ h(l, {
19
19
  defaultValue: b,
20
20
  disabled: A,
21
21
  multiple: v,
@@ -25,40 +25,40 @@ function _({ options: _, multiple: v = !1, value: y, defaultValue: b, onValueCha
25
25
  required: j,
26
26
  value: y,
27
27
  children: [
28
- /* @__PURE__ */ m(r, {
29
- className: C ? o : void 0,
28
+ /* @__PURE__ */ m(t, {
29
+ className: C ? f : void 0,
30
30
  children: S
31
31
  }),
32
- /* @__PURE__ */ m(p, {
32
+ /* @__PURE__ */ m(u, {
33
33
  countLabel: k,
34
34
  disabled: A,
35
35
  placeholder: E,
36
36
  size: M
37
37
  }),
38
- /* @__PURE__ */ m(u, { children: /* @__PURE__ */ m(d, { children: /* @__PURE__ */ h(l, { children: [
38
+ /* @__PURE__ */ m(s, { children: /* @__PURE__ */ m(c, { children: /* @__PURE__ */ h(o, { children: [
39
39
  /* @__PURE__ */ m(g.Input, {
40
40
  "aria-label": D,
41
41
  "aria-labelledby": void 0,
42
- render: /* @__PURE__ */ m(t, {
42
+ render: /* @__PURE__ */ m(i, {
43
43
  as: "input",
44
- className: s({ size: M }),
45
- size: e[M]
44
+ className: p({ size: M }),
45
+ size: r[M]
46
46
  })
47
47
  }),
48
48
  /* @__PURE__ */ m(g.Empty, {
49
- render: /* @__PURE__ */ m(t, {
50
- className: a,
49
+ render: /* @__PURE__ */ m(i, {
50
+ className: d,
51
51
  color: "fgMuted",
52
52
  size: "sm"
53
53
  }),
54
54
  children: O
55
55
  }),
56
- /* @__PURE__ */ m(c, {})
56
+ /* @__PURE__ */ m(a, {})
57
57
  ] }) }) })
58
58
  ]
59
59
  }) }),
60
- w != null && /* @__PURE__ */ m(n.Description, { children: w }),
61
- /* @__PURE__ */ m(n.Error, { children: T })
60
+ w != null && /* @__PURE__ */ m(e.Description, { children: w }),
61
+ /* @__PURE__ */ m(e.Error, { children: T })
62
62
  ]
63
63
  });
64
64
  }
@@ -1,69 +1,69 @@
1
1
  "use client";
2
- import { join as e } from "../styles/join.mjs";
3
- import { splitStyleProps as t } from "../styles/split-style-props.mjs";
4
- import { Box as n } from "../Box/base.mjs";
5
- import { PopupScope as r, triggerElement as i, useClosingRule as a, usePopupScope as o, useRecordOpenChange as s } from "../popup/client.mjs";
2
+ import { Box as e } from "../Box/base.mjs";
3
+ import { PopupScope as t, triggerElement as n, useClosingRule as r, usePopupScope as i, useRecordOpenChange as a } from "../popup/client.mjs";
4
+ import { join as o } from "../styles/join.mjs";
5
+ import { splitStyleProps as s } from "../styles/split-style-props.mjs";
6
6
  import { jsx as c } from "react/jsx-runtime";
7
7
  import { Dialog as l } from "@base-ui/react/dialog";
8
8
  // src/Dialog/client.tsx
9
- function u({ disabled: e = !1, handle: t, payload: n, id: r, ...a }) {
10
- let { ref: s } = o();
9
+ function u({ disabled: e = !1, handle: t, payload: r, id: a, ...o }) {
10
+ let { ref: s } = i();
11
11
  return /* @__PURE__ */ c(l.Trigger, {
12
12
  disabled: e,
13
13
  handle: t,
14
- payload: n,
15
- id: r,
14
+ payload: r,
15
+ id: a,
16
16
  ref: s,
17
- render: i(a)
17
+ render: n(o)
18
18
  });
19
19
  }
20
20
  function d({ disabled: e = !1, ...t }) {
21
21
  return /* @__PURE__ */ c(l.Close, {
22
22
  disabled: e,
23
- render: i(t)
23
+ render: n(t)
24
24
  });
25
25
  }
26
26
  function f({ children: e }) {
27
- let { container: t } = o();
27
+ let { container: t } = i();
28
28
  return /* @__PURE__ */ c(l.Portal, {
29
29
  container: t,
30
30
  children: e
31
31
  });
32
32
  }
33
33
  function p(e) {
34
- return /* @__PURE__ */ c(r, { children: /* @__PURE__ */ c(m, { ...e }) });
34
+ return /* @__PURE__ */ c(t, { children: /* @__PURE__ */ c(m, { ...e }) });
35
35
  }
36
36
  function m({ onOpenChange: e, ...t }) {
37
37
  return /* @__PURE__ */ c(l.Root, {
38
38
  ...t,
39
- onOpenChange: s(e)
39
+ onOpenChange: a(e)
40
40
  });
41
41
  }
42
- function h({ frame: e, ...n }) {
43
- let r = n.finalFocus !== void 0 && n.finalFocus !== !0;
42
+ function h({ frame: e, ...t }) {
43
+ let n = t.finalFocus !== void 0 && t.finalFocus !== !0;
44
44
  return /* @__PURE__ */ c(l.Popup, {
45
- ...n,
46
- render: (n, { open: i }) => {
47
- let [, a] = t(n);
45
+ ...t,
46
+ render: (t, { open: r }) => {
47
+ let [, i] = s(t);
48
48
  return /* @__PURE__ */ c(g, {
49
- ...a,
50
- finalFocus: r,
49
+ ...i,
50
+ finalFocus: n,
51
51
  frame: e,
52
- open: i
52
+ open: r
53
53
  });
54
54
  }
55
55
  });
56
56
  }
57
- function g({ open: t, finalFocus: r, frame: i, ref: o, className: s, style: l, ...u }) {
58
- return /* @__PURE__ */ c(n, {
57
+ function g({ open: t, finalFocus: n, frame: i, ref: a, className: s, style: l, ...u }) {
58
+ return /* @__PURE__ */ c(e, {
59
59
  ...u,
60
60
  ...i,
61
- ...a(o, {
62
- finalFocus: r,
61
+ ...r(a, {
62
+ finalFocus: n,
63
63
  modal: !0,
64
64
  open: t
65
65
  }),
66
- className: e(s, i.className),
66
+ className: o(s, i.className),
67
67
  style: {
68
68
  ...l,
69
69
  ...i.style
@@ -1,7 +1,7 @@
1
1
  import { BoxProps } from "../Box/base.mjs";
2
2
  import { PartProps } from "../styles/part-props.mjs";
3
- import { size as size$1 } from "./Dialog.css.mjs";
4
3
  import { DialogClose, DialogCloseProps, DialogTrigger, DialogTriggerProps } from "./client.mjs";
4
+ import { size as size$1 } from "./Dialog.css.mjs";
5
5
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
6
6
  import { ReactNode } from "react";
7
7
  export type DialogProps = Pick<Dialog$1.Root.Props, "open" | "defaultOpen" | "onOpenChange" | "onOpenChangeComplete"> & {
@@ -1,8 +1,8 @@
1
- import { join as e } from "../styles/join.mjs";
2
- import { splitStyleProps as t } from "../styles/split-style-props.mjs";
3
- import { Box as n } from "../Box/base.mjs";
4
- import { Text as r } from "../Text/index.mjs";
5
- import { Heading as i } from "../Heading/index.mjs";
1
+ import { Box as e } from "../Box/base.mjs";
2
+ import { Heading as t } from "../Heading/index.mjs";
3
+ import { join as n } from "../styles/join.mjs";
4
+ import { splitStyleProps as r } from "../styles/split-style-props.mjs";
5
+ import { Text as i } from "../Text/index.mjs";
6
6
  import { DialogClose as a, DialogPopupFrame as o, DialogPortal as s, DialogRootScope as c, DialogTrigger as l } from "./client.mjs";
7
7
  import { backdrop as u, popup as d, size as f } from "./Dialog.css.mjs";
8
8
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
@@ -12,8 +12,8 @@ function g(e) {
12
12
  return /* @__PURE__ */ p(c, { ...e });
13
13
  }
14
14
  function _({ title: a, description: c, size: l = "med", position: g = "fixed", margin: _ = "auto", blockSize: v = "fit", display: y = "flex", flexDirection: b = "column", gap: x = "16", padding: S = "24", backgroundColor: C = "bgRaised", borderRadius: w = "lg", boxShadow: T = "lg", overflow: E = "auto", className: D, style: O, children: k, ...A }) {
15
- let [j, M] = t(A);
16
- return /* @__PURE__ */ m(s, { children: [/* @__PURE__ */ p(h.Backdrop, { render: /* @__PURE__ */ p(n, {
15
+ let [j, M] = r(A);
16
+ return /* @__PURE__ */ m(s, { children: [/* @__PURE__ */ p(h.Backdrop, { render: /* @__PURE__ */ p(e, {
17
17
  className: u,
18
18
  position: "fixed",
19
19
  zIndex: "modal"
@@ -34,38 +34,38 @@ function _({ title: a, description: c, size: l = "med", position: g = "fixed", m
34
34
  boxShadow: T,
35
35
  overflow: E,
36
36
  ...j,
37
- className: e(d, f[l], D),
37
+ className: n(d, f[l], D),
38
38
  style: O
39
39
  },
40
- children: [/* @__PURE__ */ m(n, {
40
+ children: [/* @__PURE__ */ m(e, {
41
41
  display: "flex",
42
42
  flexDirection: "column",
43
43
  gap: "8",
44
44
  children: [/* @__PURE__ */ p(h.Title, {
45
- render: /* @__PURE__ */ p(i, {
45
+ render: /* @__PURE__ */ p(t, {
46
46
  as: "h2",
47
47
  size: "lg"
48
48
  }),
49
49
  children: a
50
50
  }), c == null ? null : /* @__PURE__ */ p(h.Description, {
51
- render: /* @__PURE__ */ p(r, { color: "fgMuted" }),
51
+ render: /* @__PURE__ */ p(i, { color: "fgMuted" }),
52
52
  children: c
53
53
  })]
54
54
  }), k]
55
55
  })] });
56
56
  }
57
- function v({ display: e = "flex", flexDirection: t = "column", gap: r = "12", ...i }) {
58
- return /* @__PURE__ */ p(n, {
59
- display: e,
60
- flexDirection: t,
57
+ function v({ display: t = "flex", flexDirection: n = "column", gap: r = "12", ...i }) {
58
+ return /* @__PURE__ */ p(e, {
59
+ display: t,
60
+ flexDirection: n,
61
61
  gap: r,
62
62
  ...i
63
63
  });
64
64
  }
65
- function y({ display: e = "flex", flexWrap: t = "wrap", justifyContent: r = "end", gap: i = "8", ...a }) {
66
- return /* @__PURE__ */ p(n, {
67
- display: e,
68
- flexWrap: t,
65
+ function y({ display: t = "flex", flexWrap: n = "wrap", justifyContent: r = "end", gap: i = "8", ...a }) {
66
+ return /* @__PURE__ */ p(e, {
67
+ display: t,
68
+ flexWrap: n,
69
69
  justifyContent: r,
70
70
  gap: i,
71
71
  ...a
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { splitStyleProps as e } from "../styles/split-style-props.mjs";
3
- import { Box as t } from "../Box/base.mjs";
4
- import { CircleAlertIcon as n } from "../icons/CircleAlertIcon.mjs";
2
+ import { Box as e } from "../Box/base.mjs";
3
+ import { CircleAlertIcon as t } from "../icons/CircleAlertIcon.mjs";
4
+ import { splitStyleProps as n } from "../styles/split-style-props.mjs";
5
5
  import { icon as r } from "./Field.css.mjs";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  import { Field as o } from "@base-ui/react/field";
@@ -10,11 +10,11 @@ function s({ size: s, ...c }) {
10
10
  return /* @__PURE__ */ i(o.Error, {
11
11
  ...c,
12
12
  render: (o) => {
13
- let [, c] = e(o);
14
- return /* @__PURE__ */ a(t, {
13
+ let [, c] = n(o);
14
+ return /* @__PURE__ */ a(e, {
15
15
  as: "span",
16
16
  ...c,
17
- children: [/* @__PURE__ */ i(n, {
17
+ children: [/* @__PURE__ */ i(t, {
18
18
  className: r,
19
19
  size: s
20
20
  }), o.children]
@@ -1,20 +1,20 @@
1
- import { join as e } from "../styles/join.mjs";
2
- import { splitStyleProps as t } from "../styles/split-style-props.mjs";
3
- import { Box as n } from "../Box/base.mjs";
4
- import { Text as r } from "../Text/index.mjs";
5
- import { splitTextProps as i } from "../styles/split-text-props.mjs";
6
- import { error as a, label as o } from "./Field.css.mjs";
7
- import { FieldErrorMessage as s } from "./client.mjs";
1
+ import { Box as e } from "../Box/base.mjs";
2
+ import { join as t } from "../styles/join.mjs";
3
+ import { splitStyleProps as n } from "../styles/split-style-props.mjs";
4
+ import { splitTextProps as r } from "../styles/split-text-props.mjs";
5
+ import { Text as i } from "../Text/index.mjs";
6
+ import { FieldErrorMessage as a } from "./client.mjs";
7
+ import { error as o, label as s } from "./Field.css.mjs";
8
8
  import { Children as c } from "react";
9
9
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
10
  import { Field as d } from "@base-ui/react/field";
11
11
  // src/Field/index.tsx
12
- function f({ display: e = "flex", flexDirection: r = "column", gap: i = "8", className: a, style: o, ...s }) {
13
- let [c, u] = t(s);
12
+ function f({ display: t = "flex", flexDirection: r = "column", gap: i = "8", className: a, style: o, ...s }) {
13
+ let [c, u] = n(s);
14
14
  return /* @__PURE__ */ l(d.Root, {
15
15
  ...u,
16
- render: /* @__PURE__ */ l(n, {
17
- display: e,
16
+ render: /* @__PURE__ */ l(e, {
17
+ display: t,
18
18
  flexDirection: r,
19
19
  gap: i,
20
20
  ...c,
@@ -23,29 +23,29 @@ function f({ display: e = "flex", flexDirection: r = "column", gap: i = "8", cla
23
23
  })
24
24
  });
25
25
  }
26
- function p({ nativeLabel: n = !0, size: a = "sm", font: s = "label", weight: c = "medium", className: u, style: f, ...p }) {
27
- let [m, h] = i(p), [g, _] = t(h);
26
+ function p({ nativeLabel: e = !0, size: a = "sm", font: o = "label", weight: c = "medium", className: u, style: f, ...p }) {
27
+ let [m, h] = r(p), [g, _] = n(h);
28
28
  return /* @__PURE__ */ l(d.Label, {
29
29
  ..._,
30
- nativeLabel: n,
31
- render: /* @__PURE__ */ l(r, {
32
- as: n ? "label" : "span",
33
- font: s,
30
+ nativeLabel: e,
31
+ render: /* @__PURE__ */ l(i, {
32
+ as: e ? "label" : "span",
33
+ font: o,
34
34
  size: a,
35
35
  weight: c,
36
36
  ...m,
37
37
  ...g,
38
- className: e(o, u),
38
+ className: t(s, u),
39
39
  style: f
40
40
  })
41
41
  });
42
42
  }
43
- function m({ size: e = "sm", color: n = "fgMuted", className: a, style: o, ...s }) {
44
- let [c, u] = i(s), [f, p] = t(u);
43
+ function m({ size: e = "sm", color: t = "fgMuted", className: a, style: o, ...s }) {
44
+ let [c, u] = r(s), [f, p] = n(u);
45
45
  return /* @__PURE__ */ l(d.Description, {
46
46
  ...p,
47
- render: /* @__PURE__ */ l(r, {
48
- color: n,
47
+ render: /* @__PURE__ */ l(i, {
48
+ color: t,
49
49
  size: e,
50
50
  ...c,
51
51
  ...f,
@@ -54,9 +54,9 @@ function m({ size: e = "sm", color: n = "fgMuted", className: a, style: o, ...s
54
54
  })
55
55
  });
56
56
  }
57
- function h({ children: n, match: o, size: d = "sm", color: f = "danger", className: p, style: m, ...h }) {
58
- let [g, _] = i(h), [v, y] = t(_), b = c.toArray(n).some((e) => e !== "");
59
- return /* @__PURE__ */ u(r, {
57
+ function h({ children: e, match: s, size: d = "sm", color: f = "danger", className: p, style: m, ...h }) {
58
+ let [g, _] = r(h), [v, y] = n(_), b = c.toArray(e).some((e) => e !== "");
59
+ return /* @__PURE__ */ u(i, {
60
60
  "aria-atomic": !0,
61
61
  "aria-live": "assertive",
62
62
  as: "div",
@@ -64,12 +64,12 @@ function h({ children: n, match: o, size: d = "sm", color: f = "danger", classNa
64
64
  size: d,
65
65
  ...g,
66
66
  ...v,
67
- className: e(a, p),
67
+ className: t(o, p),
68
68
  style: m,
69
- children: [/* @__PURE__ */ l(s, {
69
+ children: [/* @__PURE__ */ l(a, {
70
70
  ...y,
71
- ...b && { children: n },
72
- match: o ?? (b || void 0),
71
+ ...b && { children: e },
72
+ match: s ?? (b || void 0),
73
73
  size: d
74
74
  }), "​"]
75
75
  });
@@ -1,2 +1,2 @@
1
1
  @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.number-field, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table;
2
- @layer components.icon-button{.n2fy8x0{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.n2fy8x0[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.n2fy8x2{--_5qoq940:var(--color-accent-fill);border-color:#0000}.n2fy8x3{border-color:var(--color-border)}.n2fy8x4{border-color:#0000}.n2fy8x8{color:var(--color-fg-muted)}.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true]):focus-visible,.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{color:var(--color-fg)}@media (hover:hover){.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true]):hover{color:var(--color-fg)}}@media (forced-colors:active){.n2fy8x0{forced-color-adjust:none}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.n2fy8x0[aria-disabled=true]{color:graytext;border-color:graytext}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{box-shadow:inset 0 0 0 var(--space-1) currentColor;background-image:none}.n2fy8x3{--color-fg:ButtonText}.n2fy8x4{border-color:var(--color-border-strong)}}}@layer reset{.n2fy8x0{box-shadow:0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0[aria-disabled=true]{box-shadow:none}@media (forced-colors:active){.n2fy8x0{box-shadow:none}}}
2
+ @keyframes n2fy8xa{to{opacity:.25}}@layer components.icon-button{.n2fy8x0{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.n2fy8x0[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.n2fy8x2{--_5qoq940:var(--color-accent-fill);border-color:#0000}.n2fy8x3{border-color:var(--color-border)}.n2fy8x4{border-color:#0000}.n2fy8x8{justify-items:center}.n2fy8x9{grid-area:1/1}.n2fy8x0[aria-busy=true] .n2fy8x9{opacity:0}.n2fy8xb{grid-area:1/1}.n2fy8xc{animation-name:n2fy8xa;animation-duration:var(--duration-slow);animation-timing-function:var(--easing-standard);animation-iteration-count:infinite;animation-direction:alternate}.n2fy8xc:nth-child(2){animation-delay:calc(var(--duration-slow) / 3)}.n2fy8xc:nth-child(3){animation-delay:calc(var(--duration-slow) * 2 / 3)}.n2fy8xd{color:var(--color-fg-muted)}.n2fy8xd:not([aria-disabled=true])[aria-busy=true],.n2fy8xd:not([aria-disabled=true]):not([aria-busy=true]):focus-visible,.n2fy8xd:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{color:var(--color-fg)}@media (hover:hover){.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}.n2fy8xd:not([aria-disabled=true]):not([aria-busy=true]):hover{color:var(--color-fg)}}@media (forced-colors:active){.n2fy8x0{forced-color-adjust:none}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.n2fy8x0[aria-disabled=true]{color:graytext;border-color:graytext}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{box-shadow:inset 0 0 0 var(--space-1) currentColor;background-image:none}.n2fy8x3{--color-fg:ButtonText}.n2fy8x4{border-color:var(--color-border-strong)}}@media (prefers-reduced-motion:reduce){.n2fy8xc{animation-name:none}}}@layer reset{.n2fy8x0{box-shadow:0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0[aria-disabled=true]{box-shadow:none}@media (forced-colors:active){.n2fy8x0{box-shadow:none}}}
@@ -20,5 +20,5 @@ var t = "n2fy8x0", n = e({
20
20
  },
21
21
  defaultVariants: {},
22
22
  compoundVariants: []
23
- }), r = "n2fy8x8";
24
- export { n as iconButton, r as muted, t as root };
23
+ }), r = "n2fy8x8", i = "n2fy8x9", a = "n2fy8xb", o = "n2fy8xc", s = "n2fy8xd";
24
+ export { i as content, o as dot, n as iconButton, s as muted, t as root, a as spinner, r as stack };
@@ -1,13 +1,16 @@
1
- import { PolymorphicProps } from "../types.mjs";
2
1
  import { StyleProps } from "../Box/base.mjs";
3
2
  import { ClickableOwnProps } from "../Clickable/index.mjs";
4
3
  import { IconProps } from "../Icon/index.mjs";
4
+ import { PolymorphicProps } from "../types.mjs";
5
5
  import { ComponentType, ElementType } from "react";
6
6
  export type IconButtonOwnProps = {
7
7
  icon: ComponentType<IconProps>;
8
8
  label: string;
9
+ loading?: boolean;
9
10
  size?: "sm" | "med" | "lg";
10
11
  variant?: "primary" | "secondary" | "ghost";
11
12
  };
12
13
  export type IconButtonProps<T extends ElementType = "button"> = PolymorphicProps<T, StyleProps & IconButtonOwnProps & Omit<ClickableOwnProps, "busy">, "busy" | "aria-disabled" | "aria-busy" | "aria-label" | "aria-labelledby" | "children">;
13
- export declare function IconButton<T extends ElementType = "button">({ label, icon: IconComponent, variant, size, minInlineSize, minBlockSize, borderRadius, backgroundColor, color: colorProp, className, ...props }: IconButtonProps<T>): import("react").JSX.Element;
14
+ export declare function IconButton<T extends ElementType = "button">({ label, icon: IconComponent, variant, size, loading: loadingProp, minInlineSize, minBlockSize, borderRadius, backgroundColor, color: colorProp, className, "aria-busy": ariaBusy, ...props }: IconButtonProps<T> & {
15
+ "aria-busy"?: boolean | "true" | "false";
16
+ }): import("react").JSX.Element;
@@ -1,26 +1,65 @@
1
- import { join as e } from "../styles/join.mjs";
1
+ import { Box as e } from "../Box/base.mjs";
2
2
  import { Clickable as t } from "../Clickable/index.mjs";
3
- import { fills as n } from "../styles/button-fills.mjs";
4
- import { controlHeight as r, controlText as i } from "../styles/control-size.mjs";
5
- import { iconButton as a, root as o } from "./IconButton.css.mjs";
6
- import { jsx as s } from "react/jsx-runtime";
3
+ import { Icon as n } from "../Icon/index.mjs";
4
+ import { fills as r } from "../styles/button-fills.mjs";
5
+ import { controlHeight as i, controlText as a } from "../styles/control-size.mjs";
6
+ import { join as o } from "../styles/join.mjs";
7
+ import { content as s, iconButton as c, root as l, stack as u } from "./IconButton.css.mjs";
8
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
9
  // src/IconButton/index.tsx
8
- function c({ label: c, icon: l, variant: u = "ghost", size: d = "med", minInlineSize: f = r[d], minBlockSize: p = r[d], borderRadius: m = "sm", backgroundColor: h = n[u].backgroundColor, color: g, className: _, ...v }) {
9
- let y = v, b = u === "ghost" && g === void 0, x = b ? void 0 : g ?? n[u].color;
10
- return /* @__PURE__ */ s(t, {
11
- ...y,
12
- "aria-label": c,
10
+ function p({ label: p, icon: m, variant: h = "ghost", size: g = "med", loading: _ = !1, minInlineSize: v = i[g], minBlockSize: y = i[g], borderRadius: b = "sm", backgroundColor: x = r[h].backgroundColor, color: S, className: C, "aria-busy": w, ...T }) {
11
+ let E = _ || String(w) === "true", D = T, O = h === "ghost" && S === void 0, k = O ? void 0 : S ?? r[h].color;
12
+ return /* @__PURE__ */ d(t, {
13
+ ...D,
14
+ "aria-label": p,
13
15
  "aria-labelledby": void 0,
14
- backgroundColor: h,
15
- borderRadius: m,
16
- className: e(o, a({
17
- variant: u,
18
- size: d
19
- }), b && "n2fy8x8", _),
20
- color: x,
21
- minBlockSize: p,
22
- minInlineSize: f,
23
- children: /* @__PURE__ */ s(l, { size: i[d] })
16
+ backgroundColor: x,
17
+ borderRadius: b,
18
+ busy: E,
19
+ className: o(l, c({
20
+ variant: h,
21
+ size: g
22
+ }), O && "n2fy8xd", C),
23
+ color: k,
24
+ minBlockSize: y,
25
+ minInlineSize: v,
26
+ children: /* @__PURE__ */ f(e, {
27
+ alignItems: "center",
28
+ as: "span",
29
+ className: u,
30
+ display: "grid",
31
+ children: [/* @__PURE__ */ d(e, {
32
+ as: "span",
33
+ className: s,
34
+ display: "flex",
35
+ children: /* @__PURE__ */ d(m, { size: a[g] })
36
+ }), E && /* @__PURE__ */ f(n, {
37
+ className: "n2fy8xb",
38
+ fill: "currentColor",
39
+ size: a[g],
40
+ stroke: "none",
41
+ children: [
42
+ /* @__PURE__ */ d("circle", {
43
+ className: "n2fy8xc",
44
+ cx: "5",
45
+ cy: "12",
46
+ r: "2"
47
+ }),
48
+ /* @__PURE__ */ d("circle", {
49
+ className: "n2fy8xc",
50
+ cx: "12",
51
+ cy: "12",
52
+ r: "2"
53
+ }),
54
+ /* @__PURE__ */ d("circle", {
55
+ className: "n2fy8xc",
56
+ cx: "19",
57
+ cy: "12",
58
+ r: "2"
59
+ })
60
+ ]
61
+ })]
62
+ })
24
63
  });
25
64
  }
26
- export { c as IconButton };
65
+ export { p as IconButton };
@@ -1,6 +1,6 @@
1
- import { PolymorphicProps } from "../types.mjs";
2
- import { StyleProps } from "../Box/base.mjs";
3
1
  import "../Box/index.mjs";
2
+ import { StyleProps } from "../Box/base.mjs";
3
+ import { PolymorphicProps } from "../types.mjs";
4
4
  import { ElementType } from "react";
5
5
  type Gap = StyleProps["gap"];
6
6
  type Token = Extract<Gap, string>;
@@ -1,16 +1,16 @@
1
- import { join as e } from "../styles/join.mjs";
2
- import { Box as t } from "../Box/index.mjs";
1
+ import { Box as e } from "../Box/index.mjs";
2
+ import { join as t } from "../styles/join.mjs";
3
3
  import { root as n } from "./Inline.css.mjs";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  // src/Inline/index.tsx
6
6
  function i({ display: i = "flex", flexDirection: a = "row", flexWrap: o = "wrap", alignItems: s = "center", className: c, ...l }) {
7
- return /* @__PURE__ */ r(t, {
7
+ return /* @__PURE__ */ r(e, {
8
8
  alignItems: s,
9
9
  display: i,
10
10
  flexDirection: a,
11
11
  flexWrap: o,
12
12
  ...l,
13
- className: e(n, c)
13
+ className: t(n, c)
14
14
  });
15
15
  }
16
16
  export { i as Inline };
@@ -1,2 +1,2 @@
1
1
  @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.number-field, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table;
2
- @layer components.menu{._393eil1{border:var(--space-1) solid var(--color-border);max-inline-size:var(--available-width);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter)}._393eil1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._393eil1[data-starting-style],._393eil1[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._393eil2{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._393eil2:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}._393eil2[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._393eil2[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._393eil3{color:var(--color-fg-muted)}._393eil4{margin-block:calc(-1 * var(--font-size-sm));flex-shrink:0}._393eil5{text-decoration:none}._393eil6{border-block-start-color:var(--color-border)}._393eil6:before{content:"";border-block-start:var(--space-1) solid;border-block-start-color:inherit;display:block}@media (forced-colors:active){._393eil2[data-highlighted]:not([aria-disabled=true]){forced-color-adjust:none;color:highlighttext;background-color:highlight}._393eil2[data-highlighted]:not([aria-disabled=true]):focus-visible{color:canvastext;background-color:canvas}._393eil2[aria-disabled=true]{color:graytext}._393eil3{color:inherit}}}
2
+ @layer components.menu{._393eil1{border:var(--space-1) solid var(--color-border);max-inline-size:var(--available-width);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter)}._393eil1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._393eil1[data-starting-style],._393eil1[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._393eil2{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._393eil2:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}._393eil2[data-highlighted],._393eil2[data-popup-open]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._393eil2[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._393eil3{color:var(--color-fg-muted)}._393eil4{margin-block:calc(-1 * var(--font-size-sm));flex-shrink:0}._393eil5{scale:var(--dir) 1;margin-inline-start:auto}._393eil6{text-decoration:none}._393eil7{border-block-start-color:var(--color-border)}._393eil7:before{content:"";border-block-start:var(--space-1) solid;border-block-start-color:inherit;display:block}@media (forced-colors:active){._393eil2[data-highlighted]:not([aria-disabled=true]),._393eil2[data-popup-open]:not([aria-disabled=true]){forced-color-adjust:none;color:highlighttext;background-color:highlight}._393eil2[data-highlighted]:not([aria-disabled=true]):focus-visible{color:canvastext;background-color:canvas}._393eil2[aria-disabled=true]{color:graytext}._393eil3{color:inherit}}}
@@ -3,5 +3,5 @@ import "./Menu.css";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  // src/Menu/Menu.css.ts
6
- var e = "_393eil0", t = "_393eil1", n = "_393eil2", r = "_393eil3", i = "_393eil4", a = "_393eil5", o = "_393eil6";
7
- export { r as description, i as icon, n as item, a as linkItem, t as popup, e as positioner, o as separator };
6
+ var e = "_393eil0", t = "_393eil1", n = "_393eil2", r = "_393eil3", i = "_393eil4", a = "_393eil5", o = "_393eil6", s = "_393eil7";
7
+ export { r as description, i as icon, n as item, o as linkItem, t as popup, e as positioner, s as separator, a as submenuChevron };
@@ -1,5 +1,6 @@
1
1
  import { IconProps } from "../Icon/index.mjs";
2
2
  import { TriggerElementProps, TriggerLookProps } from "../popup/client.mjs";
3
+ import "../popup/direction.mjs";
3
4
  import "./index.mjs";
4
5
  import { ComponentType, ReactNode } from "react";
5
6
  import { Menu } from "@base-ui/react/menu";