@gemologic/sheen 0.2.0 → 0.3.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 (214) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/ai.d.ts +8 -0
  4. package/dist/ai.js +5 -0
  5. package/dist/core.d.ts +11 -4
  6. package/dist/core.js +32 -28
  7. package/dist/formisch.js +1 -2
  8. package/dist/forms.d.ts +2 -0
  9. package/dist/forms.js +16 -15
  10. package/dist/index.d.ts +25 -5
  11. package/dist/index.js +86 -76
  12. package/dist/layout/Layout.js +1 -2
  13. package/dist/metadata.js +1 -2
  14. package/dist/navigation.d.ts +2 -1
  15. package/dist/navigation.js +16 -16
  16. package/dist/primitives/Accordion.js +9 -9
  17. package/dist/primitives/ActivityTimeline.js +57 -49
  18. package/dist/primitives/AlertDialog.js +1 -2
  19. package/dist/primitives/Avatar.js +16 -17
  20. package/dist/primitives/Board.d.ts +39 -0
  21. package/dist/primitives/Board.js +471 -0
  22. package/dist/primitives/Breadcrumb.js +1 -2
  23. package/dist/primitives/Button.js +38 -27
  24. package/dist/primitives/ButtonGroup.js +1 -2
  25. package/dist/primitives/Checkbox.js +1 -2
  26. package/dist/primitives/CheckboxGroup.js +11 -12
  27. package/dist/primitives/Collapsible.js +6 -6
  28. package/dist/primitives/Combobox.js +203 -201
  29. package/dist/primitives/CommandPalette.js +2 -4
  30. package/dist/primitives/ConfirmDialog.js +5 -6
  31. package/dist/primitives/ContextMenu.js +7 -8
  32. package/dist/primitives/Conversation.d.ts +17 -0
  33. package/dist/primitives/Conversation.js +107 -0
  34. package/dist/primitives/DescriptionList.js +1 -2
  35. package/dist/primitives/Dialog.js +101 -68
  36. package/dist/primitives/Drawer.js +12 -13
  37. package/dist/primitives/DropdownMenu.js +163 -157
  38. package/dist/primitives/EditableTextField.js +3 -8
  39. package/dist/primitives/EmptyState.js +1 -2
  40. package/dist/primitives/Field.js +1 -2
  41. package/dist/primitives/FileDropzone.js +19 -18
  42. package/dist/primitives/Form.d.ts +23 -0
  43. package/dist/primitives/Form.js +76 -0
  44. package/dist/primitives/Glyph.d.ts +40 -0
  45. package/dist/primitives/Glyph.js +65 -0
  46. package/dist/primitives/IconButton.js +5 -6
  47. package/dist/primitives/Input.js +1 -2
  48. package/dist/primitives/InputGroup.js +8 -9
  49. package/dist/primitives/Link.d.ts +9 -1
  50. package/dist/primitives/Link.js +23 -17
  51. package/dist/primitives/LinkTooltip.js +6 -7
  52. package/dist/primitives/List.d.ts +34 -0
  53. package/dist/primitives/List.js +135 -0
  54. package/dist/primitives/Message.d.ts +13 -0
  55. package/dist/primitives/Message.js +75 -0
  56. package/dist/primitives/NavList.js +15 -16
  57. package/dist/primitives/Notice.d.ts +15 -1
  58. package/dist/primitives/Notice.js +91 -43
  59. package/dist/primitives/NumberField.js +81 -81
  60. package/dist/primitives/NumberText.d.ts +4 -0
  61. package/dist/primitives/NumberText.js +50 -25
  62. package/dist/primitives/Pagination.js +81 -60
  63. package/dist/primitives/Popover.js +57 -57
  64. package/dist/primitives/Progress.js +1 -2
  65. package/dist/primitives/PromptInput.d.ts +23 -0
  66. package/dist/primitives/PromptInput.js +135 -0
  67. package/dist/primitives/RadioGroup.js +12 -17
  68. package/dist/primitives/Resizable.js +1 -2
  69. package/dist/primitives/ScrollArea.js +1 -2
  70. package/dist/primitives/SearchInput.js +45 -38
  71. package/dist/primitives/SegmentedControl.d.ts +2 -0
  72. package/dist/primitives/SegmentedControl.js +92 -78
  73. package/dist/primitives/Select.js +105 -100
  74. package/dist/primitives/Separator.js +1 -2
  75. package/dist/primitives/ShortcutPending.js +11 -12
  76. package/dist/primitives/ShortcutProvider.d.ts +5 -0
  77. package/dist/primitives/ShortcutProvider.js +71 -65
  78. package/dist/primitives/ShortcutScope.js +8 -9
  79. package/dist/primitives/ShortcutSheet.js +30 -24
  80. package/dist/primitives/Skeleton.js +1 -2
  81. package/dist/primitives/Slider.js +1 -2
  82. package/dist/primitives/SortableList.d.ts +19 -0
  83. package/dist/primitives/SortableList.js +235 -0
  84. package/dist/primitives/Spinner.js +1 -2
  85. package/dist/primitives/Status.js +14 -14
  86. package/dist/primitives/Stepper.js +54 -52
  87. package/dist/primitives/StreamingText.d.ts +12 -0
  88. package/dist/primitives/StreamingText.js +42 -0
  89. package/dist/primitives/Surface.js +1 -2
  90. package/dist/primitives/Switch.js +1 -2
  91. package/dist/primitives/Table.js +1 -2
  92. package/dist/primitives/Tabs.js +20 -17
  93. package/dist/primitives/TagInput.js +6 -9
  94. package/dist/primitives/Textarea.js +37 -63
  95. package/dist/primitives/Toast.js +42 -41
  96. package/dist/primitives/Toaster.js +27 -28
  97. package/dist/primitives/Tooltip.js +32 -32
  98. package/dist/primitives/Tree.js +1 -2
  99. package/dist/primitives/Typography.d.ts +6 -2
  100. package/dist/primitives/Typography.js +20 -12
  101. package/dist/primitives/boolean-input-state.js +3 -8
  102. package/dist/primitives/button-variants.js +2 -3
  103. package/dist/primitives/choice-options.js +1 -2
  104. package/dist/primitives/create-confirm.js +1 -2
  105. package/dist/primitives/create-toaster.js +1 -2
  106. package/dist/primitives/link-focus.js +1 -2
  107. package/dist/primitives/menu-focus.js +1 -2
  108. package/dist/primitives/sortable-core.d.ts +70 -0
  109. package/dist/primitives/sortable-core.js +109 -0
  110. package/dist/primitives/sortable-drag.d.ts +29 -0
  111. package/dist/primitives/sortable-drag.js +50 -0
  112. package/dist/primitives/tooltip-layer.js +26 -27
  113. package/dist/sortable.d.ts +6 -0
  114. package/dist/sortable.js +4 -0
  115. package/dist/theme/ThemeProvider.d.ts +6 -1
  116. package/dist/theme/ThemeProvider.js +65 -58
  117. package/dist/theme/intl.js +1 -2
  118. package/dist/theme/keyboard-script.js +1 -2
  119. package/dist/theme/layers.js +1 -2
  120. package/dist/theme/messages.d.ts +26 -0
  121. package/dist/theme/messages.js +9 -2
  122. package/dist/theme/number-format-cache.js +1 -2
  123. package/dist/theme/script.d.ts +1 -0
  124. package/dist/theme/script.js +3 -3
  125. package/dist/theme/state.d.ts +4 -4
  126. package/dist/theme/state.js +12 -13
  127. package/dist/utils/auto-resize.d.ts +6 -0
  128. package/dist/utils/auto-resize.js +31 -0
  129. package/dist/utils/browser-status.js +1 -2
  130. package/dist/utils/change-motion.d.ts +8 -0
  131. package/dist/utils/change-motion.js +19 -0
  132. package/dist/utils/cn.js +1 -2
  133. package/dist/utils/media-query.d.ts +10 -0
  134. package/dist/utils/media-query.js +16 -0
  135. package/dist/utils/optimistic.js +1 -2
  136. package/dist/utils/shortcut-platform.js +1 -2
  137. package/dist/utils/shortcut-registry.d.ts +5 -0
  138. package/dist/utils/shortcut-registry.js +61 -51
  139. package/dist/vite.js +3 -4
  140. package/package.json +23 -5
  141. package/src/ai.ts +8 -0
  142. package/src/core.ts +11 -4
  143. package/src/forms.ts +2 -0
  144. package/src/index.ts +25 -5
  145. package/src/navigation.ts +2 -1
  146. package/src/primitives/Accordion.tsx +1 -1
  147. package/src/primitives/ActivityTimeline.tsx +12 -7
  148. package/src/primitives/Board.tsx +406 -0
  149. package/src/primitives/Button.tsx +15 -4
  150. package/src/primitives/Collapsible.tsx +1 -1
  151. package/src/primitives/Combobox.tsx +2 -1
  152. package/src/primitives/CommandPalette.tsx +2 -2
  153. package/src/primitives/Conversation.tsx +108 -0
  154. package/src/primitives/Dialog.tsx +5 -1
  155. package/src/primitives/DropdownMenu.tsx +12 -6
  156. package/src/primitives/FileDropzone.tsx +2 -2
  157. package/src/primitives/Form.tsx +58 -0
  158. package/src/primitives/Glyph.tsx +55 -0
  159. package/src/primitives/Link.tsx +15 -6
  160. package/src/primitives/List.tsx +68 -0
  161. package/src/primitives/Message.tsx +40 -0
  162. package/src/primitives/Notice.tsx +45 -12
  163. package/src/primitives/NumberField.tsx +3 -2
  164. package/src/primitives/NumberText.tsx +31 -4
  165. package/src/primitives/Pagination.tsx +6 -5
  166. package/src/primitives/Popover.tsx +2 -1
  167. package/src/primitives/PromptInput.tsx +116 -0
  168. package/src/primitives/SearchInput.tsx +4 -3
  169. package/src/primitives/SegmentedControl.tsx +29 -4
  170. package/src/primitives/Select.tsx +3 -2
  171. package/src/primitives/ShortcutProvider.tsx +14 -1
  172. package/src/primitives/ShortcutSheet.tsx +1 -1
  173. package/src/primitives/SortableList.tsx +208 -0
  174. package/src/primitives/Status.tsx +1 -1
  175. package/src/primitives/Stepper.tsx +7 -7
  176. package/src/primitives/StreamingText.tsx +32 -0
  177. package/src/primitives/Tabs.tsx +2 -1
  178. package/src/primitives/TagInput.tsx +1 -1
  179. package/src/primitives/Textarea.tsx +3 -47
  180. package/src/primitives/Toast.tsx +2 -1
  181. package/src/primitives/Tooltip.tsx +4 -2
  182. package/src/primitives/Typography.tsx +11 -2
  183. package/src/primitives/button-variants.ts +1 -1
  184. package/src/primitives/sortable-core.ts +139 -0
  185. package/src/primitives/sortable-drag.ts +75 -0
  186. package/src/sortable.ts +6 -0
  187. package/src/styles/ai.css +57 -0
  188. package/src/styles/core.css +321 -0
  189. package/src/styles/forms.css +261 -0
  190. package/src/styles/navigation.css +137 -0
  191. package/src/styles/overlays.css +104 -0
  192. package/src/styles/sortable.css +87 -0
  193. package/src/styles.css +5 -658
  194. package/src/theme/ThemeProvider.tsx +20 -8
  195. package/src/theme/messages.ts +20 -1
  196. package/src/theme/script.ts +2 -2
  197. package/src/theme/state.ts +5 -5
  198. package/src/utils/auto-resize.ts +58 -0
  199. package/src/utils/change-motion.ts +28 -0
  200. package/src/utils/media-query.ts +26 -0
  201. package/src/utils/shortcut-registry.ts +19 -2
  202. package/src/vite.ts +3 -3
  203. package/vendor/integrity.json +13 -13
  204. package/vendor/kobalte-core/chunk/3D6FM2PJ.js +7 -1
  205. package/vendor/kobalte-core/chunk/G3KI2B4X.js +2 -1
  206. package/vendor/kobalte-core/chunk/KEL2LLJM.jsx +2 -1
  207. package/vendor/kobalte-core/chunk/RFN6X5VH.jsx +7 -1
  208. package/vendor/origins.json +4 -4
  209. package/vendor/solid-web/dev.cjs +21 -17
  210. package/vendor/solid-web/dev.js +21 -17
  211. package/vendor/solid-web/server.cjs +1 -1
  212. package/vendor/solid-web/server.js +1 -1
  213. package/vendor/solid-web/web.cjs +21 -17
  214. package/vendor/solid-web/web.js +21 -17
@@ -1,69 +1,71 @@
1
- import { useTheme as e } from "../theme/ThemeProvider.js";
2
- import { cn as t } from "../utils/cn.js";
3
- import { Button as n } from "./Button.js";
4
- import { className as r, createComponent as i, effect as a, insert as o, memo as s, setAttribute as c, template as l } from "solid-js/web";
5
- import { Show as u, createUniqueId as d } from "solid-js";
6
- //#region src/primitives/Toast.tsx
7
- var f = /*#__PURE__*/ l("<p class=sheen-toast-description>"), p = /*#__PURE__*/ l("<p class=sheen-toast-error>"), m = /*#__PURE__*/ l("<div role=group><strong class=sheen-toast-title>"), h = /*#__PURE__*/ l("<span class=sheen-toast-pending>"), g = /*#__PURE__*/ l("<div class=sheen-toast-actions>");
8
- function _(l) {
9
- let _ = e(), v = d(), y = () => l.notification.options, b = () => l.notification.state === "pending", x = () => l.notification.state === "failed", S = () => [y().description ? `${v}-description` : "", x() && y().action ? `${v}-error` : ""].filter(Boolean).join(" ") || void 0;
1
+ import { Button as e } from "./Button.js";
2
+ import { useTheme as t } from "../theme/ThemeProvider.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { Glyph as r } from "./Glyph.js";
5
+ import { className as i, createComponent as a, effect as o, insert as s, memo as c, setAttribute as l, template as u } from "solid-js/web";
6
+ import { Show as d, createUniqueId as f } from "solid-js";
7
+ // src/primitives/Toast.tsx
8
+ var p = /*#__PURE__*/ u("<p class=sheen-toast-description>"), m = /*#__PURE__*/ u("<p class=sheen-toast-error>"), h = /*#__PURE__*/ u("<div role=group><strong class=sheen-toast-title>"), g = /*#__PURE__*/ u("<span class=sheen-toast-pending>"), _ = /*#__PURE__*/ u("<div class=sheen-toast-actions>");
9
+ function v(u) {
10
+ let v = t(), y = f(), b = () => u.notification.options, x = () => u.notification.state === "pending", S = () => u.notification.state === "failed", C = () => [b().description ? `${y}-description` : "", S() && b().action ? `${y}-error` : ""].filter(Boolean).join(" ") || void 0;
10
11
  return (() => {
11
- var e = m(), d = e.firstChild;
12
- return c(e, "aria-labelledby", `${v}-title`), c(d, "id", `${v}-title`), o(d, () => y().title), o(e, i(n, {
12
+ var t = h(), f = t.firstChild;
13
+ return l(t, "aria-labelledby", `${y}-title`), l(f, "id", `${y}-title`), s(f, () => b().title), s(t, a(e, {
14
+ variant: "ghost",
13
15
  class: "sheen-toast-close",
14
16
  size: "sm",
15
17
  get "aria-label"() {
16
- return _.messages().close;
18
+ return v.messages().close;
17
19
  },
18
- onClick: () => l.onDismiss(),
20
+ onClick: () => u.onDismiss(),
19
21
  get children() {
20
- return _.messages().close;
22
+ return a(r, { name: "close" });
21
23
  }
22
- }), null), o(e, i(u, {
24
+ }), null), s(t, a(d, {
23
25
  get when() {
24
- return y().description;
26
+ return b().description;
25
27
  },
26
28
  get children() {
27
- var e = f();
28
- return c(e, "id", `${v}-description`), o(e, () => y().description), e;
29
+ var e = p();
30
+ return l(e, "id", `${y}-description`), s(e, () => b().description), e;
29
31
  }
30
- }), null), o(e, i(u, {
32
+ }), null), s(t, a(d, {
31
33
  get when() {
32
- return s(() => !!x())() && y().action;
34
+ return c(() => !!S())() && b().action;
33
35
  },
34
36
  get children() {
35
- var e = p();
36
- return c(e, "id", `${v}-error`), o(e, () => y().action?.errorMessage), e;
37
+ var e = m();
38
+ return l(e, "id", `${y}-error`), s(e, () => b().action?.errorMessage), e;
37
39
  }
38
- }), null), o(e, i(u, {
40
+ }), null), s(t, a(d, {
39
41
  get when() {
40
- return y().action;
42
+ return b().action;
41
43
  },
42
- children: (e) => (() => {
43
- var t = g();
44
- return o(t, i(n, {
44
+ children: (t) => (() => {
45
+ var n = _();
46
+ return s(n, a(e, {
45
47
  variant: "outline",
46
48
  size: "sm",
47
49
  get loading() {
48
- return b();
50
+ return x();
49
51
  },
50
- onClick: () => l.onAction(),
52
+ onClick: () => u.onAction(),
51
53
  get children() {
52
- return s(() => !!x())() ? e().retryLabel ?? _.messages().retry : e().label;
54
+ return c(() => !!S())() ? t().retryLabel ?? v.messages().retry : t().label;
53
55
  }
54
- }), null), o(t, i(u, {
56
+ }), null), s(n, a(d, {
55
57
  get when() {
56
- return b();
58
+ return x();
57
59
  },
58
60
  get children() {
59
- var e = h();
60
- return o(e, () => _.messages().loading), e;
61
+ var e = g();
62
+ return s(e, () => v.messages().loading), e;
61
63
  }
62
- }), null), t;
64
+ }), null), n;
63
65
  })()
64
- }), null), a((n) => {
65
- var i = t("sheen-toast", l.class), a = S(), o = b() || void 0, s = b() || void 0, u = x() || void 0, d = x() ? "danger" : y().tone;
66
- return i !== n.e && r(e, n.e = i), a !== n.t && c(e, "aria-describedby", n.t = a), o !== n.a && c(e, "aria-busy", n.a = o), s !== n.o && c(e, "data-pending", n.o = s), u !== n.i && c(e, "data-invalid", n.i = u), d !== n.n && c(e, "data-tone", n.n = d), n;
66
+ }), null), o((e) => {
67
+ var r = n("sheen-toast", u.class), a = C(), o = x() || void 0, s = x() || void 0, c = S() || void 0, d = S() ? "danger" : b().tone;
68
+ return r !== e.e && i(t, e.e = r), a !== e.t && l(t, "aria-describedby", e.t = a), o !== e.a && l(t, "aria-busy", e.a = o), s !== e.o && l(t, "data-pending", e.o = s), c !== e.i && l(t, "data-invalid", e.i = c), d !== e.n && l(t, "data-tone", e.n = d), e;
67
69
  }, {
68
70
  e: void 0,
69
71
  t: void 0,
@@ -71,8 +73,7 @@ function _(l) {
71
73
  o: void 0,
72
74
  i: void 0,
73
75
  n: void 0
74
- }), e;
76
+ }), t;
75
77
  })();
76
78
  }
77
- //#endregion
78
- export { _ as Toast };
79
+ export { v as Toast };
@@ -1,13 +1,13 @@
1
1
  import { useTheme as e } from "../theme/ThemeProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
- import { toasterPresenter as n } from "./create-toaster.js";
4
- import { Toast as r } from "./Toast.js";
3
+ import { Toast as n } from "./Toast.js";
4
+ import { toasterPresenter as r } from "./create-toaster.js";
5
5
  import { Portal as i, className as a, createComponent as o, delegateEvents as s, effect as c, insert as l, setAttribute as u, setStyleProperty as d, template as f, use as p } from "solid-js/web";
6
6
  import { For as m, Show as h, createEffect as g, createMemo as _, createSignal as v, onCleanup as y, onMount as b } from "solid-js";
7
- //#region src/primitives/Toaster.tsx
7
+ // src/primitives/Toaster.tsx
8
8
  var x = /*#__PURE__*/ f("<li class=sheen-toast-entry>"), S = /*#__PURE__*/ f("<div role=region tabindex=-1 data-kb-top-layer=true><div class=sheen-toast-announcer role=status aria-live=polite aria-atomic=true></div><div class=sheen-toast-announcer role=alert aria-atomic=true></div><ol class=sheen-toast-list>");
9
9
  function C(e) {
10
- let t, n = e.entry.lifetime, i = () => {
10
+ let t, r = e.entry.lifetime, i = () => {
11
11
  if (t?.contains(t.ownerDocument.activeElement)) {
12
12
  let t = e.entry.opener;
13
13
  if (t?.isConnected && !t.closest("[inert]") && (t.focus({ preventScroll: !0 }), t.ownerDocument.activeElement === t)) return;
@@ -20,10 +20,10 @@ function C(e) {
20
20
  };
21
21
  return g(() => {
22
22
  let t = e.entry.notification.options;
23
- if (t !== n.options && (n.options = t, n.remaining = t.duration ?? 0), !e.entry.open || e.paused || e.entry.notification.state !== "idle" || n.options.duration === null) return;
24
- let r = performance.now(), i = window.setTimeout(a, n.remaining);
23
+ if (t !== r.options && (r.options = t, r.remaining = t.duration ?? 0), !e.entry.open || e.paused || e.entry.notification.state !== "idle" || r.options.duration === null) return;
24
+ let n = performance.now(), i = window.setTimeout(a, r.remaining);
25
25
  y(() => {
26
- window.clearTimeout(i), n.remaining = Math.max(0, n.remaining - (performance.now() - r));
26
+ window.clearTimeout(i), r.remaining = Math.max(0, r.remaining - (performance.now() - n));
27
27
  });
28
28
  }), g(() => {
29
29
  if (e.entry.open || !t) return;
@@ -35,41 +35,41 @@ function C(e) {
35
35
  n = !0;
36
36
  });
37
37
  }), (() => {
38
- var n = x();
39
- n.$$keydown = (e) => {
38
+ var r = x();
39
+ r.$$keydown = (e) => {
40
40
  e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), a());
41
- }, n.addEventListener("animationend", (t) => {
41
+ }, r.addEventListener("animationend", (t) => {
42
42
  t.target === t.currentTarget && !e.entry.open && e.onExit();
43
43
  });
44
44
  var i = t;
45
- return typeof i == "function" ? p(i, n) : t = n, l(n, o(r, {
45
+ return typeof i == "function" ? p(i, r) : t = r, l(r, o(n, {
46
46
  get notification() {
47
47
  return e.entry.notification;
48
48
  },
49
49
  onDismiss: a,
50
50
  onAction: s
51
51
  })), c((t) => {
52
- var r = e.entry.open, i = !e.entry.open || void 0, a = !e.entry.open;
53
- return r !== t.e && u(n, "data-open", t.e = r), i !== t.t && u(n, "aria-hidden", t.t = i), a !== t.a && (n.inert = t.a = a), t;
52
+ var n = e.entry.open, i = !e.entry.open || void 0, a = !e.entry.open;
53
+ return n !== t.e && u(r, "data-open", t.e = n), i !== t.t && u(r, "aria-hidden", t.t = i), a !== t.a && (r.inert = t.a = a), t;
54
54
  }, {
55
55
  e: void 0,
56
56
  t: void 0,
57
57
  a: void 0
58
- }), n;
58
+ }), r;
59
59
  })();
60
60
  }
61
- function w(r) {
61
+ function w(n) {
62
62
  let s = e();
63
- _(() => (y(r.controller[n]()), r.controller));
63
+ _(() => (y(n.controller[r]()), n.controller));
64
64
  let [f, x] = v(), [w, T] = v([]), [E, D] = v(!1), [O, k] = v(!1), [A, j] = v(!1), [M, N] = v(""), [P, F] = v(""), I = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), z, B = !1, V = _(() => {
65
- let e = r.limit ?? 3;
65
+ let e = n.limit ?? 3;
66
66
  if (!Number.isSafeInteger(e) || e < 1) throw Error("Toaster: limit must be a positive integer");
67
67
  return e;
68
68
  });
69
69
  g(() => {
70
- let e = r.controller.notifications(), t = new Map(e.map((e) => [e.id, e]));
70
+ let e = n.controller.notifications(), t = new Map(e.map((e) => [e.id, e]));
71
71
  for (let e of L.keys()) t.has(e) || L.delete(e);
72
- let n = w(), i = n.map((e, n) => {
72
+ let r = w(), i = r.map((e, n) => {
73
73
  let r = t.get(e.notification.id), i = r !== void 0 && n < V(), a = r ?? e.notification;
74
74
  return a === e.notification && i === e.open ? e : {
75
75
  ...e,
@@ -91,7 +91,7 @@ function w(r) {
91
91
  opener: n
92
92
  });
93
93
  }
94
- (i.length !== n.length || i.some((e, t) => e !== n[t])) && T(i);
94
+ (i.length !== r.length || i.some((e, t) => e !== r[t])) && T(i);
95
95
  }), g(() => {
96
96
  if (!f()) return;
97
97
  let e = new Set(w().filter((e) => e.open).map((e) => e.notification.id));
@@ -137,10 +137,10 @@ function w(r) {
137
137
  return e();
138
138
  },
139
139
  get children() {
140
- var e = S(), n = e.firstChild, i = n.nextSibling, g = i.nextSibling;
140
+ var e = S(), r = e.firstChild, i = r.nextSibling, g = i.nextSibling;
141
141
  return e.$$focusout = (e) => {
142
- (!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) && k(!1);
143
- }, e.$$focusin = () => k(!0), e.addEventListener("pointerleave", () => D(!1)), e.addEventListener("pointerenter", () => D(!0)), p(x, e), l(n, M), l(i, P), l(g, o(m, {
142
+ e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget) || k(!1);
143
+ }, e.$$focusin = () => k(!0), e.addEventListener("pointerleave", () => D(!1)), e.addEventListener("pointerenter", () => D(!0)), p(x, e), l(r, M), l(i, P), l(g, o(m, {
144
144
  get each() {
145
145
  return [...H().keys()];
146
146
  },
@@ -153,7 +153,7 @@ function w(r) {
153
153
  return t();
154
154
  },
155
155
  get controller() {
156
- return r.controller;
156
+ return n.controller;
157
157
  },
158
158
  get paused() {
159
159
  return E() || O() || A();
@@ -162,9 +162,9 @@ function w(r) {
162
162
  fallback: () => f()?.focus({ preventScroll: !0 })
163
163
  })
164
164
  })
165
- })), c((n) => {
166
- var i = r.label ?? s.messages().notifications, o = t("sheen-toaster", r.class), c = s.layers.aboveAll();
167
- return i !== n.e && u(e, "aria-label", n.e = i), o !== n.t && a(e, n.t = o), c !== n.a && d(e, "z-index", n.a = c), n;
165
+ })), c((r) => {
166
+ var i = n.label ?? s.messages().notifications, o = t("sheen-toaster", n.class), c = s.layers.aboveAll();
167
+ return i !== r.e && u(e, "aria-label", r.e = i), o !== r.t && a(e, r.t = o), c !== r.a && d(e, "z-index", r.a = c), r;
168
168
  }, {
169
169
  e: void 0,
170
170
  t: void 0,
@@ -179,5 +179,4 @@ s([
179
179
  "focusin",
180
180
  "focusout"
181
181
  ]);
182
- //#endregion
183
182
  export { w as Toaster };
@@ -1,11 +1,12 @@
1
1
  import { Button as e } from "./Button.js";
2
2
  import { TooltipLayer as t, createTooltipLayer as n } from "./tooltip-layer.js";
3
- import { createComponent as r, mergeProps as i } from "solid-js/web";
4
- import { splitProps as a } from "solid-js";
5
- import * as o from "#sheen-kobalte/tooltip";
6
- //#region src/primitives/Tooltip.tsx
7
- function s(s) {
8
- let [c, l] = a(s, [
3
+ import { useShortcutLabel as r } from "./ShortcutProvider.js";
4
+ import { createComponent as i, mergeProps as a } from "solid-js/web";
5
+ import { splitProps as o } from "solid-js";
6
+ import * as s from "#sheen-kobalte/tooltip";
7
+ // src/primitives/Tooltip.tsx
8
+ function c(c) {
9
+ let [l, u] = o(c, [
9
10
  "content",
10
11
  "shortcut",
11
12
  "placement",
@@ -14,71 +15,70 @@ function s(s) {
14
15
  "ref",
15
16
  "children",
16
17
  "aria-describedby"
17
- ]), u, d = () => l.disabled || l.loading || !1, f = n(() => u, d), p = () => typeof c.shortcut == "string" ? void 0 : c.shortcut, m = () => (f.open(), typeof c.shortcut == "string" ? c.shortcut : u?.getAttribute("data-sheen-shortcut") ?? c.shortcut?.keys);
18
- return r(o.Root, {
18
+ ]), d, f = () => u.disabled || u.loading || !1, p = n(() => d, f), m = () => typeof l.shortcut == "string" ? void 0 : l.shortcut, h = r(() => typeof l.shortcut == "string" ? l.shortcut : l.shortcut?.keys), g = () => (p.open(), typeof l.shortcut == "string" ? h() : d?.getAttribute("data-sheen-shortcut") ?? h());
19
+ return i(s.Root, {
19
20
  get open() {
20
- return f.open();
21
+ return p.open();
21
22
  },
22
23
  get onOpenChange() {
23
- return f.change;
24
+ return p.change;
24
25
  },
25
26
  get disabled() {
26
- return d();
27
+ return f();
27
28
  },
28
29
  get placement() {
29
- return c.placement ?? "top";
30
+ return l.placement ?? "top";
30
31
  },
31
32
  get openDelay() {
32
- return c.openDelay ?? 500;
33
+ return l.openDelay ?? 500;
33
34
  },
34
35
  get closeDelay() {
35
- return c.closeDelay ?? 100;
36
+ return l.closeDelay ?? 100;
36
37
  },
37
38
  gutter: 6,
38
39
  get children() {
39
- return [r(o.Trigger, i({ as: e }, l, {
40
+ return [i(s.Trigger, a({ as: e }, u, {
40
41
  get shortcut() {
41
- return p();
42
+ return m();
42
43
  },
43
44
  get type() {
44
- return l.type ?? "button";
45
+ return u.type ?? "button";
45
46
  },
46
47
  get "aria-describedby"() {
47
- return [c["aria-describedby"], f.open() ? `${f.id}-content` : void 0].filter(Boolean).join(" ") || void 0;
48
+ return [l["aria-describedby"], p.open() ? `${p.id}-content` : void 0].filter(Boolean).join(" ") || void 0;
48
49
  },
49
50
  get onClick() {
50
- return l.onClick ?? (() => {});
51
+ return u.onClick ?? (() => {});
51
52
  },
52
53
  get onFocus() {
53
- return l.onFocus ?? (() => {});
54
+ return u.onFocus ?? (() => {});
54
55
  },
55
56
  get onBlur() {
56
- return l.onBlur ?? (() => {});
57
+ return u.onBlur ?? (() => {});
57
58
  },
58
59
  get onPointerDown() {
59
- return l.onPointerDown ?? (() => {});
60
+ return u.onPointerDown ?? (() => {});
60
61
  },
61
62
  get onPointerEnter() {
62
- return l.onPointerEnter ?? (() => {});
63
+ return u.onPointerEnter ?? (() => {});
63
64
  },
64
65
  get onPointerLeave() {
65
- return l.onPointerLeave ?? (() => {});
66
+ return u.onPointerLeave ?? (() => {});
66
67
  },
67
68
  ref: (e) => {
68
- u = e, typeof c.ref == "function" && c.ref(e);
69
+ d = e, typeof l.ref == "function" && l.ref(e);
69
70
  },
70
71
  get children() {
71
- return c.children;
72
+ return l.children;
72
73
  }
73
- })), r(t, {
74
- state: f,
74
+ })), i(t, {
75
+ state: p,
75
76
  get content() {
76
- return c.content;
77
+ return l.content;
77
78
  },
78
- shortcut: m
79
+ shortcut: g
79
80
  })];
80
81
  }
81
82
  });
82
83
  }
83
- //#endregion
84
- export { s as Tooltip };
84
+ export { c as Tooltip };
@@ -2,7 +2,7 @@ import { useTheme as e } from "../theme/ThemeProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { createComponent as n, delegateEvents as r, effect as i, insert as a, memo as o, mergeProps as s, setAttribute as c, spread as l, template as u, use as d } from "solid-js/web";
4
4
  import { createContext as f, createEffect as p, createMemo as m, createSignal as h, createUniqueId as g, onCleanup as _, onMount as v, splitProps as y, useContext as b } from "solid-js";
5
- //#region src/primitives/Tree.tsx
5
+ // src/primitives/Tree.tsx
6
6
  var x = /*#__PURE__*/ u("<ul>"), S = /*#__PURE__*/ u("<li><div class=sheen-tree-item-row><span class=sheen-tree-item-label>"), C = /*#__PURE__*/ u("<button type=button tabindex=-1 class=sheen-tree-expander><span aria-hidden=true>"), w = /*#__PURE__*/ u("<span class=sheen-tree-leaf aria-hidden=true>"), T = /*#__PURE__*/ u("<ul role=group class=sheen-tree-group>"), E = f();
7
7
  function D(e, t) {
8
8
  if (t.some((e) => !e.trim())) throw Error(`Tree ${e} values must be nonempty`);
@@ -271,5 +271,4 @@ function M(n) {
271
271
  })();
272
272
  }
273
273
  r(["click"]);
274
- //#endregion
275
274
  export { j as Tree, M as TreeItem };
@@ -1,16 +1,20 @@
1
1
  import type { JSX } from "solid-js";
2
2
  export interface TextProps extends JSX.HTMLAttributes<HTMLSpanElement> {
3
- size?: "caption" | "ui-sm" | "ui" | "body";
3
+ size?: "caption" | "ui-sm" | "ui" | "body" | "lead";
4
4
  tone?: "default" | "muted";
5
5
  numeric?: boolean;
6
6
  }
7
7
  export declare function Text(props: TextProps): JSX.Element;
8
8
  export interface HeadingProps extends JSX.HTMLAttributes<HTMLHeadingElement> {
9
9
  level: 1 | 2 | 3 | 4 | 5 | 6;
10
- size?: "h1" | "h2" | "h3" | "h4";
10
+ /** Visual size, independent of the outline level. Display sizes are for marketing and empty-state hero titles. */
11
+ size?: "display-1" | "display-2" | "h1" | "h2" | "h3" | "h4";
11
12
  }
12
13
  export declare function Heading(props: HeadingProps): JSX.Element;
13
14
  export type CodeProps = JSX.HTMLAttributes<HTMLElement>;
14
15
  export declare function Code(props: CodeProps): JSX.Element;
15
16
  export type KbdProps = JSX.HTMLAttributes<HTMLElement>;
16
17
  export declare function Kbd(props: KbdProps): JSX.Element;
18
+ export type ProseProps = JSX.HTMLAttributes<HTMLDivElement>;
19
+ /** Long-form reading typography for rendered Markdown, help articles, and legal text. Styles native descendants only. */
20
+ export declare function Prose(props: ProseProps): JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { Dynamic as t, createComponent as n, mergeProps as r, spread as i, template as a } from "solid-js/web";
3
3
  import { splitProps as o } from "solid-js";
4
- //#region src/primitives/Typography.tsx
5
- var s = /*#__PURE__*/ a("<span>"), c = /*#__PURE__*/ a("<code>"), l = /*#__PURE__*/ a("<kbd>");
6
- function u(t) {
4
+ // src/primitives/Typography.tsx
5
+ var s = /*#__PURE__*/ a("<span>"), c = /*#__PURE__*/ a("<code>"), l = /*#__PURE__*/ a("<kbd>"), u = /*#__PURE__*/ a("<div>");
6
+ function d(t) {
7
7
  let [n, a] = o(t, [
8
8
  "class",
9
9
  "size",
@@ -28,14 +28,14 @@ function u(t) {
28
28
  }), !1, !1), t;
29
29
  })();
30
30
  }
31
- var d = {
31
+ var f = {
32
32
  1: "h1",
33
33
  2: "h2",
34
34
  3: "h3",
35
35
  4: "h4",
36
36
  5: "h5",
37
37
  6: "h6"
38
- }, f = {
38
+ }, p = {
39
39
  1: "h1",
40
40
  2: "h2",
41
41
  3: "h3",
@@ -43,24 +43,24 @@ var d = {
43
43
  5: "h4",
44
44
  6: "h4"
45
45
  };
46
- function p(i) {
46
+ function m(i) {
47
47
  let [a, s] = o(i, [
48
48
  "class",
49
49
  "level",
50
50
  "size"
51
51
  ]);
52
52
  return n(t, r({ get component() {
53
- return d[a.level];
53
+ return f[a.level];
54
54
  } }, s, {
55
55
  get class() {
56
56
  return e("sheen-heading", a.class);
57
57
  },
58
58
  get "data-size"() {
59
- return a.size ?? f[a.level];
59
+ return a.size ?? p[a.level];
60
60
  }
61
61
  }));
62
62
  }
63
- function m(t) {
63
+ function h(t) {
64
64
  let [n, a] = o(t, ["class"]);
65
65
  return (() => {
66
66
  var t = c();
@@ -69,7 +69,7 @@ function m(t) {
69
69
  } }), !1, !1), t;
70
70
  })();
71
71
  }
72
- function h(t) {
72
+ function g(t) {
73
73
  let [n, a] = o(t, ["class"]);
74
74
  return (() => {
75
75
  var t = l();
@@ -78,5 +78,13 @@ function h(t) {
78
78
  } }), !1, !1), t;
79
79
  })();
80
80
  }
81
- //#endregion
82
- export { m as Code, p as Heading, h as Kbd, u as Text };
81
+ function _(t) {
82
+ let [n, a] = o(t, ["class"]);
83
+ return (() => {
84
+ var t = u();
85
+ return i(t, r(a, { get class() {
86
+ return e("sheen-prose", n.class);
87
+ } }), !1, !1), t;
88
+ })();
89
+ }
90
+ export { h as Code, m as Heading, g as Kbd, _ as Prose, d as Text };
@@ -1,5 +1,5 @@
1
1
  import { createEffect as e, createMemo as t, createSignal as n, onCleanup as r, onMount as i } from "solid-js";
2
- //#region src/primitives/boolean-input-state.ts
2
+ // src/primitives/boolean-input-state.ts
3
3
  function a(a, o) {
4
4
  let s = a.defaultChecked ?? !1, [c, l] = n(s), u = t(() => a.checked), d = () => u() ?? c(), [f, p] = n(!1), m, h = (e) => {
5
5
  e !== d() && (u() === void 0 && l(e), o(e));
@@ -11,7 +11,7 @@ function a(a, o) {
11
11
  let n = /* @__PURE__ */ new Set(), i = (r) => {
12
12
  if (r.target !== e.form) return;
13
13
  let i = t.setTimeout(() => {
14
- n.delete(i), !r.defaultPrevented && (u() === void 0 && h(s), e.checked = d(), e.indeterminate = a.indeterminate ?? !1);
14
+ n.delete(i), r.defaultPrevented || (u() === void 0 && h(s), e.checked = d(), e.indeterminate = a.indeterminate ?? !1);
15
15
  }, 0);
16
16
  n.add(i);
17
17
  };
@@ -24,16 +24,11 @@ function a(a, o) {
24
24
  }), {
25
25
  checked: d,
26
26
  requestChange: (e) => {
27
- if (a.disabled || a.readOnly) {
28
- e.checked = d();
29
- return;
30
- }
31
- h(e.checked), e.checked = d();
27
+ a.disabled || a.readOnly || h(e.checked), e.checked = d();
32
28
  },
33
29
  setInput: (e) => {
34
30
  m = e;
35
31
  }
36
32
  };
37
33
  }
38
- //#endregion
39
34
  export { a as createBooleanInputState };
@@ -1,7 +1,6 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
- //#region src/primitives/button-variants.ts
2
+ // src/primitives/button-variants.ts
3
3
  function t(t = {}) {
4
- return e("sheen-button", `sheen-button-${t.variant ?? "ghost"}`, `sheen-button-${t.tone ?? "neutral"}`, `sheen-button-${t.size ?? "md"}`, t.class);
4
+ return e("sheen-button", `sheen-button-${t.variant ?? "outline"}`, `sheen-button-${t.tone ?? "neutral"}`, `sheen-button-${t.size ?? "md"}`, t.class);
5
5
  }
6
- //#endregion
7
6
  export { t as buttonVariants };
@@ -1,5 +1,5 @@
1
1
  import { createMemo as e, onCleanup as t } from "solid-js";
2
- //#region src/primitives/choice-options.ts
2
+ // src/primitives/choice-options.ts
3
3
  function n(n, r, i) {
4
4
  let a = !1;
5
5
  t(() => {
@@ -31,5 +31,4 @@ function n(n, r, i) {
31
31
  })
32
32
  };
33
33
  }
34
- //#endregion
35
34
  export { n as createChoiceOptions };
@@ -1,7 +1,7 @@
1
1
  import { ConfirmDialog as e } from "./ConfirmDialog.js";
2
2
  import { createComponent as t, mergeProps as n } from "solid-js/web";
3
3
  import { Show as r, createSignal as i, getOwner as a, onCleanup as o } from "solid-js";
4
- //#region src/primitives/create-confirm.tsx
4
+ // src/primitives/create-confirm.tsx
5
5
  function s() {
6
6
  if (!a()) throw Error("createConfirm requires a Solid owner");
7
7
  let s = !1, [c, l] = i();
@@ -45,5 +45,4 @@ function s() {
45
45
  Dialog: d
46
46
  };
47
47
  }
48
- //#endregion
49
48
  export { s as createConfirm };
@@ -1,5 +1,5 @@
1
1
  import { createSignal as e, getOwner as t, onCleanup as n } from "solid-js";
2
- //#region src/primitives/create-toaster.ts
2
+ // src/primitives/create-toaster.ts
3
3
  var r = Symbol("sheen toaster presenter");
4
4
  function i(e) {
5
5
  if (!e.title.trim()) throw Error("Toast: title must be nonempty");
@@ -83,5 +83,4 @@ function a() {
83
83
  runAction: m
84
84
  });
85
85
  }
86
- //#endregion
87
86
  export { a as createToaster, r as toasterPresenter };
@@ -1,5 +1,5 @@
1
1
  import { onCleanup as e, onMount as t } from "solid-js";
2
- //#region src/primitives/link-focus.ts
2
+ // src/primitives/link-focus.ts
3
3
  function n(n) {
4
4
  t(() => {
5
5
  let t = n();
@@ -34,5 +34,4 @@ function n(n) {
34
34
  });
35
35
  });
36
36
  }
37
- //#endregion
38
37
  export { n as createLinkFocusRecovery };
@@ -1,5 +1,5 @@
1
1
  import { createEffect as e, onCleanup as t } from "solid-js";
2
- //#region src/primitives/menu-focus.ts
2
+ // src/primitives/menu-focus.ts
3
3
  function n(n, r) {
4
4
  e(() => {
5
5
  let e = n();
@@ -28,5 +28,4 @@ function n(n, r) {
28
28
  });
29
29
  });
30
30
  }
31
- //#endregion
32
31
  export { n as createMenuFocusRecovery };