@gemologic/sheen 0.2.1 → 0.4.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 (226) 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 +27 -5
  11. package/dist/index.js +87 -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/overlays.d.ts +2 -0
  17. package/dist/overlays.js +9 -8
  18. package/dist/primitives/Accordion.js +9 -9
  19. package/dist/primitives/ActivityTimeline.js +57 -49
  20. package/dist/primitives/AlertDialog.js +1 -2
  21. package/dist/primitives/Avatar.js +16 -17
  22. package/dist/primitives/Board.d.ts +39 -0
  23. package/dist/primitives/Board.js +471 -0
  24. package/dist/primitives/Breadcrumb.js +1 -2
  25. package/dist/primitives/Button.js +38 -27
  26. package/dist/primitives/ButtonGroup.js +1 -2
  27. package/dist/primitives/Checkbox.d.ts +16 -2
  28. package/dist/primitives/Checkbox.js +46 -36
  29. package/dist/primitives/CheckboxGroup.js +11 -12
  30. package/dist/primitives/Collapsible.js +6 -6
  31. package/dist/primitives/Combobox.js +203 -201
  32. package/dist/primitives/CommandPalette.d.ts +4 -0
  33. package/dist/primitives/CommandPalette.js +138 -116
  34. package/dist/primitives/ConfirmDialog.js +5 -6
  35. package/dist/primitives/ContextMenu.js +7 -8
  36. package/dist/primitives/Conversation.d.ts +17 -0
  37. package/dist/primitives/Conversation.js +107 -0
  38. package/dist/primitives/DescriptionList.js +1 -2
  39. package/dist/primitives/Dialog.js +101 -68
  40. package/dist/primitives/Drawer.js +12 -13
  41. package/dist/primitives/DropdownMenu.js +163 -157
  42. package/dist/primitives/EditableTextField.js +3 -8
  43. package/dist/primitives/EmptyState.js +1 -2
  44. package/dist/primitives/Field.js +1 -2
  45. package/dist/primitives/FileDropzone.js +19 -18
  46. package/dist/primitives/Form.d.ts +23 -0
  47. package/dist/primitives/Form.js +76 -0
  48. package/dist/primitives/Glyph.d.ts +40 -0
  49. package/dist/primitives/Glyph.js +65 -0
  50. package/dist/primitives/IconButton.js +5 -6
  51. package/dist/primitives/Input.js +1 -2
  52. package/dist/primitives/InputGroup.js +8 -9
  53. package/dist/primitives/Link.d.ts +9 -1
  54. package/dist/primitives/Link.js +23 -17
  55. package/dist/primitives/LinkTooltip.js +6 -7
  56. package/dist/primitives/List.d.ts +34 -0
  57. package/dist/primitives/List.js +135 -0
  58. package/dist/primitives/Message.d.ts +13 -0
  59. package/dist/primitives/Message.js +75 -0
  60. package/dist/primitives/NavList.js +15 -16
  61. package/dist/primitives/Notice.d.ts +15 -1
  62. package/dist/primitives/Notice.js +91 -43
  63. package/dist/primitives/NumberField.js +81 -81
  64. package/dist/primitives/NumberText.d.ts +4 -0
  65. package/dist/primitives/NumberText.js +50 -25
  66. package/dist/primitives/Pagination.js +81 -60
  67. package/dist/primitives/Popover.d.ts +1 -0
  68. package/dist/primitives/Popover.js +65 -57
  69. package/dist/primitives/Progress.js +1 -2
  70. package/dist/primitives/PromptInput.d.ts +23 -0
  71. package/dist/primitives/PromptInput.js +135 -0
  72. package/dist/primitives/RadioGroup.js +12 -17
  73. package/dist/primitives/Resizable.js +1 -2
  74. package/dist/primitives/ScrollArea.js +1 -2
  75. package/dist/primitives/SearchInput.js +45 -38
  76. package/dist/primitives/SegmentedControl.d.ts +2 -0
  77. package/dist/primitives/SegmentedControl.js +92 -78
  78. package/dist/primitives/Select.js +105 -100
  79. package/dist/primitives/Separator.js +1 -2
  80. package/dist/primitives/ShortcutPending.js +11 -12
  81. package/dist/primitives/ShortcutProvider.d.ts +5 -0
  82. package/dist/primitives/ShortcutProvider.js +71 -65
  83. package/dist/primitives/ShortcutScope.js +8 -9
  84. package/dist/primitives/ShortcutSheet.js +30 -24
  85. package/dist/primitives/Skeleton.js +1 -2
  86. package/dist/primitives/Slider.js +1 -2
  87. package/dist/primitives/SortableList.d.ts +19 -0
  88. package/dist/primitives/SortableList.js +235 -0
  89. package/dist/primitives/Spinner.js +1 -2
  90. package/dist/primitives/Status.js +14 -14
  91. package/dist/primitives/Stepper.js +54 -52
  92. package/dist/primitives/StreamingText.d.ts +12 -0
  93. package/dist/primitives/StreamingText.js +42 -0
  94. package/dist/primitives/Surface.js +1 -2
  95. package/dist/primitives/Switch.d.ts +2 -2
  96. package/dist/primitives/Switch.js +1 -2
  97. package/dist/primitives/Table.js +1 -2
  98. package/dist/primitives/Tabs.js +20 -17
  99. package/dist/primitives/TagInput.js +6 -9
  100. package/dist/primitives/Textarea.js +37 -63
  101. package/dist/primitives/Toast.js +42 -41
  102. package/dist/primitives/Toaster.js +27 -28
  103. package/dist/primitives/Tooltip.js +32 -32
  104. package/dist/primitives/TooltipTrigger.d.ts +18 -0
  105. package/dist/primitives/TooltipTrigger.js +76 -0
  106. package/dist/primitives/Tree.js +1 -2
  107. package/dist/primitives/Typography.d.ts +6 -2
  108. package/dist/primitives/Typography.js +20 -12
  109. package/dist/primitives/boolean-input-state.js +3 -8
  110. package/dist/primitives/button-variants.js +2 -3
  111. package/dist/primitives/choice-options.js +1 -2
  112. package/dist/primitives/create-confirm.js +1 -2
  113. package/dist/primitives/create-toaster.js +1 -2
  114. package/dist/primitives/link-focus.js +1 -2
  115. package/dist/primitives/menu-focus.js +1 -2
  116. package/dist/primitives/sortable-core.d.ts +70 -0
  117. package/dist/primitives/sortable-core.js +109 -0
  118. package/dist/primitives/sortable-drag.d.ts +29 -0
  119. package/dist/primitives/sortable-drag.js +50 -0
  120. package/dist/primitives/tooltip-layer.js +26 -27
  121. package/dist/sortable.d.ts +6 -0
  122. package/dist/sortable.js +4 -0
  123. package/dist/theme/ThemeProvider.d.ts +6 -1
  124. package/dist/theme/ThemeProvider.js +65 -58
  125. package/dist/theme/intl.js +1 -2
  126. package/dist/theme/keyboard-script.js +1 -2
  127. package/dist/theme/layers.js +1 -2
  128. package/dist/theme/messages.d.ts +26 -0
  129. package/dist/theme/messages.js +9 -2
  130. package/dist/theme/number-format-cache.js +1 -2
  131. package/dist/theme/script.d.ts +1 -0
  132. package/dist/theme/script.js +3 -3
  133. package/dist/theme/state.d.ts +4 -4
  134. package/dist/theme/state.js +12 -13
  135. package/dist/utils/auto-resize.d.ts +6 -0
  136. package/dist/utils/auto-resize.js +31 -0
  137. package/dist/utils/browser-status.js +1 -2
  138. package/dist/utils/change-motion.d.ts +8 -0
  139. package/dist/utils/change-motion.js +19 -0
  140. package/dist/utils/cn.js +1 -2
  141. package/dist/utils/media-query.d.ts +10 -0
  142. package/dist/utils/media-query.js +16 -0
  143. package/dist/utils/optimistic.js +1 -2
  144. package/dist/utils/shortcut-platform.js +1 -2
  145. package/dist/utils/shortcut-registry.d.ts +5 -0
  146. package/dist/utils/shortcut-registry.js +61 -51
  147. package/dist/vite.js +3 -4
  148. package/package.json +23 -5
  149. package/src/ai.ts +8 -0
  150. package/src/core.ts +11 -4
  151. package/src/forms.ts +2 -0
  152. package/src/index.ts +27 -5
  153. package/src/navigation.ts +2 -1
  154. package/src/overlays.ts +2 -0
  155. package/src/primitives/Accordion.tsx +1 -1
  156. package/src/primitives/ActivityTimeline.tsx +12 -7
  157. package/src/primitives/Board.tsx +406 -0
  158. package/src/primitives/Button.tsx +15 -4
  159. package/src/primitives/Checkbox.tsx +14 -7
  160. package/src/primitives/Collapsible.tsx +1 -1
  161. package/src/primitives/Combobox.tsx +2 -1
  162. package/src/primitives/CommandPalette.tsx +13 -4
  163. package/src/primitives/Conversation.tsx +108 -0
  164. package/src/primitives/Dialog.tsx +5 -1
  165. package/src/primitives/DropdownMenu.tsx +12 -6
  166. package/src/primitives/FileDropzone.tsx +2 -2
  167. package/src/primitives/Form.tsx +58 -0
  168. package/src/primitives/Glyph.tsx +55 -0
  169. package/src/primitives/Link.tsx +15 -6
  170. package/src/primitives/List.tsx +68 -0
  171. package/src/primitives/Message.tsx +40 -0
  172. package/src/primitives/Notice.tsx +45 -12
  173. package/src/primitives/NumberField.tsx +3 -2
  174. package/src/primitives/NumberText.tsx +31 -4
  175. package/src/primitives/Pagination.tsx +6 -5
  176. package/src/primitives/Popover.tsx +7 -5
  177. package/src/primitives/PromptInput.tsx +116 -0
  178. package/src/primitives/SearchInput.tsx +4 -3
  179. package/src/primitives/SegmentedControl.tsx +29 -4
  180. package/src/primitives/Select.tsx +3 -2
  181. package/src/primitives/ShortcutProvider.tsx +14 -1
  182. package/src/primitives/ShortcutSheet.tsx +1 -1
  183. package/src/primitives/SortableList.tsx +208 -0
  184. package/src/primitives/Status.tsx +1 -1
  185. package/src/primitives/Stepper.tsx +7 -7
  186. package/src/primitives/StreamingText.tsx +32 -0
  187. package/src/primitives/Switch.tsx +2 -2
  188. package/src/primitives/Tabs.tsx +2 -1
  189. package/src/primitives/TagInput.tsx +1 -1
  190. package/src/primitives/Textarea.tsx +3 -47
  191. package/src/primitives/Toast.tsx +2 -1
  192. package/src/primitives/Tooltip.tsx +4 -2
  193. package/src/primitives/TooltipTrigger.tsx +60 -0
  194. package/src/primitives/Typography.tsx +11 -2
  195. package/src/primitives/button-variants.ts +1 -1
  196. package/src/primitives/sortable-core.ts +139 -0
  197. package/src/primitives/sortable-drag.ts +75 -0
  198. package/src/sortable.ts +6 -0
  199. package/src/styles/ai.css +57 -0
  200. package/src/styles/core.css +321 -0
  201. package/src/styles/forms.css +263 -0
  202. package/src/styles/navigation.css +137 -0
  203. package/src/styles/overlays.css +107 -0
  204. package/src/styles/sortable.css +87 -0
  205. package/src/styles.css +5 -658
  206. package/src/theme/ThemeProvider.tsx +20 -8
  207. package/src/theme/messages.ts +20 -1
  208. package/src/theme/script.ts +2 -2
  209. package/src/theme/state.ts +5 -5
  210. package/src/utils/auto-resize.ts +58 -0
  211. package/src/utils/change-motion.ts +28 -0
  212. package/src/utils/media-query.ts +26 -0
  213. package/src/utils/shortcut-registry.ts +19 -2
  214. package/src/vite.ts +3 -3
  215. package/vendor/integrity.json +13 -13
  216. package/vendor/kobalte-core/chunk/3D6FM2PJ.js +7 -1
  217. package/vendor/kobalte-core/chunk/G3KI2B4X.js +2 -1
  218. package/vendor/kobalte-core/chunk/KEL2LLJM.jsx +2 -1
  219. package/vendor/kobalte-core/chunk/RFN6X5VH.jsx +7 -1
  220. package/vendor/origins.json +4 -4
  221. package/vendor/solid-web/dev.cjs +21 -17
  222. package/vendor/solid-web/dev.js +21 -17
  223. package/vendor/solid-web/server.cjs +1 -1
  224. package/vendor/solid-web/server.js +1 -1
  225. package/vendor/solid-web/web.cjs +21 -17
  226. package/vendor/solid-web/web.js +21 -17
@@ -1,11 +1,11 @@
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 { useNumberFormatter as r } from "../theme/intl.js";
1
+ import { useNumberFormatter as e } from "../theme/intl.js";
2
+ import { useTheme as t } from "../theme/ThemeProvider.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { Button as r } from "./Button.js";
5
5
  import { Progress as i } from "./Progress.js";
6
6
  import { createComponent as a, effect as o, insert as s, memo as c, mergeProps as l, setAttribute as u, spread as d, template as f, use as p } from "solid-js/web";
7
7
  import { For as m, Show as h, createMemo as g, createSignal as _, createUniqueId as v, onMount as y, splitProps as b } from "solid-js";
8
- //#region src/primitives/FileDropzone.tsx
8
+ // src/primitives/FileDropzone.tsx
9
9
  var x = /*#__PURE__*/ f("<span class=sheen-field-description>"), S = /*#__PURE__*/ f("<div class=sheen-file-dropzone-errors role=alert><ul>"), C = /*#__PURE__*/ f("<ul class=sheen-file-dropzone-items>"), w = /*#__PURE__*/ f("<div><span class=sheen-field-label></span><div class=sheen-file-dropzone-target><input class=sheen-file-dropzone-input type=file><label class=sheen-file-dropzone-picker><span class=sheen-file-dropzone-picker-action dir=auto></span><span class=sheen-file-dropzone-prompt dir=auto></span></label></div><span class=sheen-file-dropzone-announcer role=status aria-live=polite aria-atomic=true>"), T = /*#__PURE__*/ f("<li>"), E = /*#__PURE__*/ f("<li class=sheen-file-dropzone-item><div class=sheen-file-dropzone-item-copy dir=auto><strong></strong><span></span></div><span class=sheen-file-dropzone-status dir=auto></span><div class=sheen-file-dropzone-actions>");
10
10
  function D(e) {
11
11
  return (e ?? "").split(",").map((e) => e.trim().toLocaleLowerCase("en-US")).filter(Boolean);
@@ -19,7 +19,7 @@ function k(e) {
19
19
  return [...e.dataTransfer?.types ?? []].includes("Files");
20
20
  }
21
21
  function A(f) {
22
- let A = e(), j = r({ maximumFractionDigits: 1 }), M = v(), [N, P] = b(f, [
22
+ let A = t(), j = e({ maximumFractionDigits: 1 }), M = v(), [N, P] = b(f, [
23
23
  "id",
24
24
  "ref",
25
25
  "inputRef",
@@ -96,7 +96,7 @@ function A(f) {
96
96
  !N.disabled && !N.readOnly && e?.(t);
97
97
  };
98
98
  return (() => {
99
- var e = w(), r = e.firstChild, f = r.nextSibling, g = f.firstChild, _ = g.nextSibling, v = _.firstChild, y = v.nextSibling, b = f.nextSibling;
99
+ var e = w(), t = e.firstChild, f = t.nextSibling, g = f.firstChild, _ = g.nextSibling, v = _.firstChild, y = v.nextSibling, b = f.nextSibling;
100
100
  return p((e) => {
101
101
  typeof N.ref == "function" && N.ref(e);
102
102
  }, e), d(e, l(P, {
@@ -104,7 +104,7 @@ function A(f) {
104
104
  return N.id ?? M;
105
105
  },
106
106
  get class() {
107
- return t("sheen-field sheen-file-dropzone", N.class);
107
+ return n("sheen-field sheen-file-dropzone", N.class);
108
108
  },
109
109
  get "data-drag-active"() {
110
110
  return K() || void 0;
@@ -119,7 +119,7 @@ function A(f) {
119
119
  onDragLeave: J,
120
120
  onDragOver: Y,
121
121
  onDrop: X
122
- }), !1, !0), u(r, "id", `${M}-label`), s(r, () => N.label), g.addEventListener("change", (e) => G([...e.currentTarget.files ?? []])), p((e) => {
122
+ }), !1, !0), u(t, "id", `${M}-label`), s(t, () => N.label), g.addEventListener("change", (e) => G([...e.currentTarget.files ?? []])), p((e) => {
123
123
  z = e, typeof N.inputRef == "function" && N.inputRef(e);
124
124
  }, g), u(g, "id", `${M}-input`), u(_, "for", `${M}-input`), s(v, () => N.chooseLabel ?? A.messages().chooseFiles), s(y, (() => {
125
125
  var e = c(() => !!K());
@@ -165,15 +165,15 @@ function A(f) {
165
165
  return t();
166
166
  },
167
167
  children: (t) => (() => {
168
- var r = E(), d = r.firstChild, f = d.firstChild, p = f.nextSibling, m = d.nextSibling, g = m.nextSibling;
169
- return u(r, "data-file-id", e), s(f, () => t().name), s(p, () => W(t().size), null), s(p, a(h, {
168
+ var n = E(), d = n.firstChild, f = d.firstChild, p = f.nextSibling, m = d.nextSibling, g = m.nextSibling;
169
+ return u(n, "data-file-id", e), s(f, () => t().name), s(p, () => W(t().size), null), s(p, a(h, {
170
170
  get when() {
171
171
  return t().type;
172
172
  },
173
173
  get children() {
174
174
  return [" · ", c(() => t().type)];
175
175
  }
176
- }), null), s(m, () => t().statusLabel), s(r, a(h, {
176
+ }), null), s(m, () => t().statusLabel), s(n, a(h, {
177
177
  get when() {
178
178
  return t().status === "uploading";
179
179
  },
@@ -187,7 +187,8 @@ function A(f) {
187
187
  return c(() => t().status === "error")() && N.onRetry;
188
188
  },
189
189
  get children() {
190
- return a(n, {
190
+ return a(r, {
191
+ variant: "ghost",
191
192
  size: "xs",
192
193
  get disabled() {
193
194
  return N.disabled;
@@ -209,7 +210,8 @@ function A(f) {
209
210
  return N.onRemove;
210
211
  },
211
212
  get children() {
212
- return a(n, {
213
+ return a(r, {
214
+ variant: "ghost",
213
215
  size: "xs",
214
216
  get disabled() {
215
217
  return N.disabled;
@@ -227,13 +229,13 @@ function A(f) {
227
229
  });
228
230
  }
229
231
  }), null), o((e) => {
230
- var n = t().status, i = t().status === "uploading" || void 0, a = t().status;
231
- return n !== e.e && u(r, "data-status", e.e = n), i !== e.t && u(r, "aria-busy", e.t = i), a !== e.a && u(m, "data-status", e.a = a), e;
232
+ var r = t().status, i = t().status === "uploading" || void 0, a = t().status;
233
+ return r !== e.e && u(n, "data-status", e.e = r), i !== e.t && u(n, "aria-busy", e.t = i), a !== e.a && u(m, "data-status", e.a = a), e;
232
234
  }, {
233
235
  e: void 0,
234
236
  t: void 0,
235
237
  a: void 0
236
- }), r;
238
+ }), n;
237
239
  })()
238
240
  });
239
241
  }
@@ -257,5 +259,4 @@ function A(f) {
257
259
  }), e;
258
260
  })();
259
261
  }
260
- //#endregion
261
262
  export { A as FileDropzone };
@@ -0,0 +1,23 @@
1
+ import type { JSX } from "solid-js";
2
+ export interface FormProps extends Omit<JSX.FormHTMLAttributes<HTMLFormElement>, "onSubmit"> {
3
+ /**
4
+ * Receives the native form data. The default submission is prevented; return a promise to mark
5
+ * the form busy until it settles. Native constraint validation runs first.
6
+ */
7
+ onSubmit?: (data: FormData, event: SubmitEvent) => void | Promise<void>;
8
+ }
9
+ /** A native form that stacks sections and fields on the token rhythm and reports pending submissions. */
10
+ export declare function Form(props: FormProps): JSX.Element;
11
+ export interface FormSectionProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "title"> {
12
+ title: string;
13
+ description?: JSX.Element;
14
+ }
15
+ /** A titled group of related fields. Wide containers put the title beside the fields. */
16
+ export declare function FormSection(props: FormSectionProps): JSX.Element;
17
+ export interface FormActionsProps extends JSX.HTMLAttributes<HTMLDivElement> {
18
+ /** Keep the actions visible at the bottom of the scrolling container. */
19
+ sticky?: boolean;
20
+ align?: "start" | "end" | "between";
21
+ }
22
+ /** The submit/cancel row that ends a form. Put the primary action last. */
23
+ export declare function FormActions(props: FormActionsProps): JSX.Element;
@@ -0,0 +1,76 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { createComponent as t, insert as n, mergeProps as r, spread as i, template as a } from "solid-js/web";
3
+ import { Show as o, children as s, createSignal as c, splitProps as l } from "solid-js";
4
+ // src/primitives/Form.tsx
5
+ var u = /*#__PURE__*/ a("<form>"), d = /*#__PURE__*/ a("<p class=sheen-form-section-description>"), f = /*#__PURE__*/ a("<section><header class=sheen-form-section-header><h2 class=sheen-form-section-title></h2></header><div class=sheen-form-section-fields>"), p = /*#__PURE__*/ a("<div>");
6
+ function m(t) {
7
+ let [a, o] = l(t, [
8
+ "onSubmit",
9
+ "class",
10
+ "children"
11
+ ]), [s, d] = c(!1), f = (e) => {
12
+ if (!a.onSubmit || (e.preventDefault(), s())) return;
13
+ let t = a.onSubmit(new FormData(e.currentTarget), e);
14
+ t instanceof Promise && (d(!0), t.finally(() => d(!1)));
15
+ };
16
+ return (() => {
17
+ var t = u();
18
+ return i(t, r(o, {
19
+ get class() {
20
+ return e("sheen-form", a.class);
21
+ },
22
+ get "aria-busy"() {
23
+ return s() || void 0;
24
+ },
25
+ get "data-pending"() {
26
+ return s() || void 0;
27
+ },
28
+ onSubmit: f
29
+ }), !1, !0), n(t, () => a.children), t;
30
+ })();
31
+ }
32
+ function h(a) {
33
+ let [c, u] = l(a, [
34
+ "title",
35
+ "description",
36
+ "class",
37
+ "children"
38
+ ]), p = s(() => c.description);
39
+ return (() => {
40
+ var a = f(), s = a.firstChild, l = s.firstChild, m = s.nextSibling;
41
+ return i(a, r(u, { get class() {
42
+ return e("sheen-form-section", c.class);
43
+ } }), !1, !0), n(l, () => c.title), n(s, t(o, {
44
+ get when() {
45
+ return p();
46
+ },
47
+ get children() {
48
+ var e = d();
49
+ return n(e, p), e;
50
+ }
51
+ }), null), n(m, () => c.children), a;
52
+ })();
53
+ }
54
+ function g(t) {
55
+ let [a, o] = l(t, [
56
+ "sticky",
57
+ "align",
58
+ "class",
59
+ "children"
60
+ ]);
61
+ return (() => {
62
+ var t = p();
63
+ return i(t, r(o, {
64
+ get class() {
65
+ return e("sheen-form-actions", a.class);
66
+ },
67
+ get "data-sticky"() {
68
+ return a.sticky || void 0;
69
+ },
70
+ get "data-align"() {
71
+ return a.align ?? "end";
72
+ }
73
+ }), !1, !0), n(t, () => a.children), t;
74
+ })();
75
+ }
76
+ export { m as Form, g as FormActions, h as FormSection };
@@ -0,0 +1,40 @@
1
+ import type { JSX } from "solid-js";
2
+ declare const paths: {
3
+ "chevron-down": string;
4
+ "chevron-up": string;
5
+ "chevron-left": string;
6
+ "chevron-right": string;
7
+ "chevrons-left": string;
8
+ "chevrons-right": string;
9
+ close: string;
10
+ check: string;
11
+ plus: string;
12
+ minus: string;
13
+ dot: string;
14
+ alert: string;
15
+ calendar: string;
16
+ search: string;
17
+ bell: string;
18
+ "trend-up": string;
19
+ "trend-down": string;
20
+ "trend-flat": string;
21
+ more: string;
22
+ grip: string;
23
+ "status-info": string;
24
+ "status-success": string;
25
+ "status-warning": string;
26
+ "status-danger": string;
27
+ };
28
+ export type GlyphName = keyof typeof paths;
29
+ export declare const glyphNames: readonly GlyphName[];
30
+ export interface GlyphProps extends Omit<JSX.SvgSVGAttributes<SVGSVGElement>, "children"> {
31
+ /** One of the closed set of component-chrome glyphs. */
32
+ readonly name: GlyphName;
33
+ }
34
+ /**
35
+ * Small decorative stroke glyphs for component chrome (chevrons, close, check, steppers, trends).
36
+ * They inherit the current text color and are always hidden from assistive technology; name the
37
+ * owning control instead. Applications use `@gemologic/sheen-icons` for content imagery.
38
+ */
39
+ export declare function Glyph(props: GlyphProps): JSX.Element;
40
+ export {};
@@ -0,0 +1,65 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { effect as t, mergeProps as n, setAttribute as r, spread as i, template as a } from "solid-js/web";
3
+ import { splitProps as o } from "solid-js";
4
+ // src/primitives/Glyph.tsx
5
+ var s = /*#__PURE__*/ a("<svg><path stroke=currentColor stroke-linecap=round stroke-linejoin=round>"), c = {
6
+ "chevron-down": "M4 6l4 4 4-4",
7
+ "chevron-up": "M4 10l4-4 4 4",
8
+ "chevron-left": "M10 4 6 8l4 4",
9
+ "chevron-right": "M6 4l4 4-4 4",
10
+ "chevrons-left": "M8.5 4 4.5 8l4 4M12.5 4l-4 4 4 4",
11
+ "chevrons-right": "M3.5 4l4 4-4 4M7.5 4l4 4-4 4",
12
+ close: "M4.5 4.5l7 7M11.5 4.5l-7 7",
13
+ check: "M3.5 8.5l3 3 6-7",
14
+ plus: "M8 3.5v9M3.5 8h9",
15
+ minus: "M3.5 8h9",
16
+ dot: "M8 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z",
17
+ alert: "M8 4.5v4.25M8 11.25v.25",
18
+ calendar: "M3 4.5h10v8.5H3zM3 7h10M5.5 3v3M10.5 3v3",
19
+ search: "M7 3a4 4 0 1 1 0 8 4 4 0 0 1 0-8zM10 10l3 3",
20
+ bell: "M4.5 11V7.5a3.5 3.5 0 0 1 7 0V11l1 1.25h-9zM6.75 13.5h2.5",
21
+ "trend-up": "M3 11l3.5-3.5 2.5 2.5L13 6M10 6h3v3",
22
+ "trend-down": "M3 5l3.5 3.5L9 6l4 4M10 10h3V7",
23
+ "trend-flat": "M3 8h10M10 5l3 3-3 3",
24
+ more: "M3.5 8h.01M8 8h.01M12.5 8h.01",
25
+ grip: "M6 4h.01M10 4h.01M6 8h.01M10 8h.01M6 12h.01M10 12h.01",
26
+ "status-info": "M14.25 8A6.25 6.25 0 1 1 1.75 8a6.25 6.25 0 0 1 12.5 0zM8 7.25v3.5M8 5v.01",
27
+ "status-success": "M14.25 8A6.25 6.25 0 1 1 1.75 8a6.25 6.25 0 0 1 12.5 0zM5.25 8.25l1.75 1.75 3.75-4",
28
+ "status-warning": "M8 2.25 14.25 13.25H1.75zM8 6.25v3M8 11.25v.01",
29
+ "status-danger": "M14.25 8A6.25 6.25 0 1 1 1.75 8a6.25 6.25 0 0 1 12.5 0zM8 4.75v3.75M8 11v.01"
30
+ }, l = Object.freeze(Object.keys(c).filter((e) => Object.hasOwn(c, e))), u = /* @__PURE__ */ new Set([
31
+ "chevron-left",
32
+ "chevron-right",
33
+ "chevrons-left",
34
+ "chevrons-right",
35
+ "trend-up",
36
+ "trend-down",
37
+ "trend-flat"
38
+ ]), d = /* @__PURE__ */ new Set(["dot"]);
39
+ function f(a) {
40
+ let [l, f] = o(a, ["name", "class"]);
41
+ return (() => {
42
+ var a = s(), o = a.firstChild;
43
+ return i(a, n(f, {
44
+ get class() {
45
+ return e("sheen-glyph", l.class);
46
+ },
47
+ get "data-glyph"() {
48
+ return l.name;
49
+ },
50
+ get "data-mirror"() {
51
+ return u.has(l.name) || void 0;
52
+ },
53
+ viewBox: "0 0 16 16",
54
+ "aria-hidden": "true"
55
+ }), !0, !0), t((e) => {
56
+ var t = c[l.name], n = d.has(l.name) ? "currentColor" : "none", i = l.name === "more" || l.name === "grip" ? "2.25" : "1.5";
57
+ return t !== e.e && r(o, "d", e.e = t), n !== e.t && r(o, "fill", e.t = n), i !== e.a && r(o, "stroke-width", e.a = i), e;
58
+ }, {
59
+ e: void 0,
60
+ t: void 0,
61
+ a: void 0
62
+ }), a;
63
+ })();
64
+ }
65
+ export { f as Glyph, l as glyphNames };
@@ -1,8 +1,8 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { Tooltip as t } from "./Tooltip.js";
1
+ import { Tooltip as e } from "./Tooltip.js";
2
+ import { cn as t } from "../utils/cn.js";
3
3
  import { createComponent as n, insert as r, mergeProps as i, template as a } from "solid-js/web";
4
4
  import { createMemo as o, splitProps as s } from "solid-js";
5
- //#region src/primitives/IconButton.tsx
5
+ // src/primitives/IconButton.tsx
6
6
  var c = /*#__PURE__*/ a("<span class=sheen-icon-button-glyph aria-hidden=true>");
7
7
  function l(a) {
8
8
  let [l, u] = s(a, [
@@ -13,7 +13,7 @@ function l(a) {
13
13
  if (!l.label.trim()) throw Error("IconButton requires a nonempty accessible label");
14
14
  return l.label;
15
15
  });
16
- return n(t, i(u, {
16
+ return n(e, i(u, {
17
17
  get content() {
18
18
  return d();
19
19
  },
@@ -22,7 +22,7 @@ function l(a) {
22
22
  },
23
23
  "aria-labelledby": void 0,
24
24
  get class() {
25
- return e("sheen-icon-button", l.class);
25
+ return t("sheen-icon-button", l.class);
26
26
  },
27
27
  get children() {
28
28
  var e = c();
@@ -30,5 +30,4 @@ function l(a) {
30
30
  }
31
31
  }));
32
32
  }
33
- //#endregion
34
33
  export { l as IconButton };
@@ -2,7 +2,7 @@ import { cn as e } from "../utils/cn.js";
2
2
  import { Field as t } from "./Field.js";
3
3
  import { createComponent as n, memo as r, mergeProps as i, spread as a, template as o } from "solid-js/web";
4
4
  import { splitProps as s } from "solid-js";
5
- //#region src/primitives/Input.tsx
5
+ // src/primitives/Input.tsx
6
6
  var c = /*#__PURE__*/ o("<input>");
7
7
  function l(o) {
8
8
  let [l, u] = s(o, [
@@ -51,5 +51,4 @@ function l(o) {
51
51
  })()
52
52
  });
53
53
  }
54
- //#endregion
55
54
  export { l as Input };
@@ -1,8 +1,8 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { Field as t } from "./Field.js";
1
+ import { Field as e } from "./Field.js";
2
+ import { cn as t } from "../utils/cn.js";
3
3
  import { createComponent as n, insert as r, memo as i, mergeProps as a, spread as o, template as s } from "solid-js/web";
4
4
  import { Show as c, children as l, splitProps as u } from "solid-js";
5
- //#region src/primitives/InputGroup.tsx
5
+ // src/primitives/InputGroup.tsx
6
6
  var d = /*#__PURE__*/ s("<span class=sheen-input-addon>"), f = /*#__PURE__*/ s("<div class=sheen-input-group><input>");
7
7
  function p(s) {
8
8
  let [p, m] = u(s, [
@@ -18,7 +18,7 @@ function p(s) {
18
18
  "startContent",
19
19
  "endContent"
20
20
  ]), h = l(() => p.startContent), g = l(() => p.endContent);
21
- return n(t, {
21
+ return n(e, {
22
22
  get label() {
23
23
  return p.label;
24
24
  },
@@ -37,7 +37,7 @@ function p(s) {
37
37
  get disabled() {
38
38
  return p.disabled;
39
39
  },
40
- children: (t) => (() => {
40
+ children: (e) => (() => {
41
41
  var s = f(), l = s.firstChild;
42
42
  return r(s, n(c, {
43
43
  get when() {
@@ -47,15 +47,15 @@ function p(s) {
47
47
  var e = d();
48
48
  return r(e, h), e;
49
49
  }
50
- }), l), o(l, a(m, t, {
50
+ }), l), o(l, a(m, e, {
51
51
  get "aria-describedby"() {
52
- return [t["aria-describedby"], p["aria-describedby"]].filter(Boolean).join(" ") || void 0;
52
+ return [e["aria-describedby"], p["aria-describedby"]].filter(Boolean).join(" ") || void 0;
53
53
  },
54
54
  get "aria-invalid"() {
55
55
  return i(() => !!p.error)() ? !0 : p["aria-invalid"];
56
56
  },
57
57
  get class() {
58
- return e("sheen-input", p.class);
58
+ return t("sheen-input", p.class);
59
59
  }
60
60
  }), !1, !1), r(s, n(c, {
61
61
  get when() {
@@ -69,5 +69,4 @@ function p(s) {
69
69
  })()
70
70
  });
71
71
  }
72
- //#endregion
73
72
  export { p as InputGroup };
@@ -1,7 +1,15 @@
1
1
  import type { JSX } from "solid-js";
2
+ import type { ButtonVariantProps } from "./button-variants.ts";
2
3
  export interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
3
4
  href: string;
4
- variant?: "text" | "button";
5
+ /** `quiet` drops the resting underline; use it only where position already marks links, such as table cells and lists. */
6
+ variant?: "text" | "quiet" | "button";
7
+ /** Button treatment when `variant="button"`; matches Button's `variant`. */
8
+ appearance?: NonNullable<ButtonVariantProps["variant"]>;
9
+ /** Button tone when `variant="button"`. */
10
+ tone?: NonNullable<ButtonVariantProps["tone"]>;
11
+ /** Button size when `variant="button"`. */
12
+ size?: NonNullable<ButtonVariantProps["size"]>;
5
13
  }
6
14
  /** A destination, even when styled like an action. Browser navigation stays native. */
7
15
  export declare function Link(props: LinkProps): JSX.Element;
@@ -1,35 +1,41 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { buttonVariants as t } from "./button-variants.js";
3
- import { insert as n, mergeProps as r, spread as i, template as a } from "solid-js/web";
4
- import { splitProps as o } from "solid-js";
5
- //#region src/primitives/Link.tsx
6
- var s = /*#__PURE__*/ a("<a>");
7
- function c(a) {
8
- let [c, l] = o(a, [
3
+ import { insert as n, memo as r, mergeProps as i, spread as a, template as o } from "solid-js/web";
4
+ import { splitProps as s } from "solid-js";
5
+ // src/primitives/Link.tsx
6
+ var c = /*#__PURE__*/ o("<a>");
7
+ function l(o) {
8
+ let [l, u] = s(o, [
9
9
  "variant",
10
+ "appearance",
11
+ "tone",
12
+ "size",
10
13
  "class",
11
14
  "children"
12
- ]);
15
+ ]), d = () => l.variant === "button";
13
16
  return (() => {
14
- var a = s();
15
- return i(a, r(l, {
17
+ var o = c();
18
+ return a(o, i(u, {
16
19
  get class() {
17
- return e("sheen-link", c.variant === "button" && t(), c.class);
20
+ return e("sheen-link", d() && t({
21
+ variant: l.appearance,
22
+ tone: l.tone,
23
+ size: l.size
24
+ }), l.class);
18
25
  },
19
26
  get "data-link-variant"() {
20
- return c.variant ?? "text";
27
+ return l.variant ?? "text";
21
28
  },
22
29
  get "data-variant"() {
23
- return c.variant === "button" ? "ghost" : void 0;
30
+ return r(() => !!d())() ? l.appearance ?? "outline" : void 0;
24
31
  },
25
32
  get "data-tone"() {
26
- return c.variant === "button" ? "neutral" : void 0;
33
+ return r(() => !!d())() ? l.tone ?? "neutral" : void 0;
27
34
  },
28
35
  get "data-size"() {
29
- return c.variant === "button" ? "md" : void 0;
36
+ return r(() => !!d())() ? l.size ?? "md" : void 0;
30
37
  }
31
- }), !1, !0), n(a, () => c.children), a;
38
+ }), !1, !0), n(o, () => l.children), o;
32
39
  })();
33
40
  }
34
- //#endregion
35
- export { c as Link };
41
+ export { l as Link };
@@ -1,9 +1,9 @@
1
- import { cn as e } from "../utils/cn.js";
2
- import { TooltipLayer as t, createTooltipLayer as n } from "./tooltip-layer.js";
1
+ import { TooltipLayer as e, createTooltipLayer as t } from "./tooltip-layer.js";
2
+ import { cn as n } from "../utils/cn.js";
3
3
  import { createComponent as r, mergeProps as i, spread as a, template as o } from "solid-js/web";
4
4
  import { splitProps as s } from "solid-js";
5
5
  import * as c from "#sheen-kobalte/tooltip";
6
- //#region src/primitives/LinkTooltip.tsx
6
+ // src/primitives/LinkTooltip.tsx
7
7
  var l = /*#__PURE__*/ o("<a>");
8
8
  function u(o) {
9
9
  let [u, d] = s(o, [
@@ -22,7 +22,7 @@ function u(o) {
22
22
  return a(t, i(e, { get type() {
23
23
  return u.type;
24
24
  } }), !1, !1), t;
25
- })(), p, m = n(() => p, () => u.tooltipDisabled ?? !1);
25
+ })(), p, m = t(() => p, () => u.tooltipDisabled ?? !1);
26
26
  return r(c.Root, {
27
27
  get open() {
28
28
  return m.open();
@@ -46,7 +46,7 @@ function u(o) {
46
46
  get children() {
47
47
  return [r(c.Trigger, i({ as: f }, d, {
48
48
  get class() {
49
- return e("sheen-link-tooltip", u.class);
49
+ return n("sheen-link-tooltip", u.class);
50
50
  },
51
51
  get "aria-describedby"() {
52
52
  return [u["aria-describedby"], m.open() ? `${m.id}-content` : void 0].filter(Boolean).join(" ") || void 0;
@@ -75,7 +75,7 @@ function u(o) {
75
75
  get children() {
76
76
  return u.children;
77
77
  }
78
- })), r(t, {
78
+ })), r(e, {
79
79
  state: m,
80
80
  get content() {
81
81
  return u.content;
@@ -84,5 +84,4 @@ function u(o) {
84
84
  }
85
85
  });
86
86
  }
87
- //#endregion
88
87
  export { u as LinkTooltip };
@@ -0,0 +1,34 @@
1
+ import type { JSX } from "solid-js";
2
+ export interface ListProps extends JSX.HTMLAttributes<HTMLUListElement> {
3
+ /** Accessible name when the surrounding heading does not already name the list. */
4
+ label?: string;
5
+ /** Draw separators between rows. */
6
+ dividers?: boolean;
7
+ /** Row padding. */
8
+ density?: "compact" | "default" | "comfortable";
9
+ /** Wrap the rows in a raised, bordered surface. */
10
+ inset?: boolean;
11
+ }
12
+ /** A vertical list of rows. Rows are links, actions, or static content; it is not a selection widget. */
13
+ export declare function List(props: ListProps): JSX.Element;
14
+ export interface ListItemProps extends Omit<JSX.LiHTMLAttributes<HTMLLIElement>, "title" | "onSelect"> {
15
+ /** Primary row text. */
16
+ title: JSX.Element;
17
+ /** Secondary text under the title. */
18
+ description?: JSX.Element;
19
+ /** Leading visual such as an icon or Avatar; decorative unless it carries its own name. */
20
+ leading?: JSX.Element;
21
+ /** Trailing content such as a Badge, metadata, or a count. */
22
+ trailing?: JSX.Element;
23
+ /** Makes the row a link. */
24
+ href?: string;
25
+ /** Makes the row a button. Ignored when `href` is set. */
26
+ onSelect?: () => void;
27
+ /** Marks a link row as the current page. */
28
+ current?: boolean;
29
+ /** Visual selected state for rows that drive a detail view. */
30
+ selected?: boolean;
31
+ disabled?: boolean;
32
+ }
33
+ /** One row of a List with leading, title, description, and trailing slots. */
34
+ export declare function ListItem(props: ListItemProps): JSX.Element;