shelving 1.282.2 → 1.284.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 (240) hide show
  1. package/package.json +2 -2
  2. package/ui/README.md +2 -1
  3. package/ui/block/Address.d.ts +7 -7
  4. package/ui/block/Address.js +6 -6
  5. package/ui/block/Address.tsx +10 -9
  6. package/ui/block/Block.d.ts +3 -3
  7. package/ui/block/Block.js +3 -2
  8. package/ui/block/Block.tsx +5 -4
  9. package/ui/block/Blockquote.d.ts +3 -3
  10. package/ui/block/Blockquote.js +2 -2
  11. package/ui/block/Blockquote.tsx +4 -3
  12. package/ui/block/Caption.d.ts +3 -3
  13. package/ui/block/Caption.js +3 -3
  14. package/ui/block/Caption.tsx +5 -4
  15. package/ui/block/Card.d.ts +3 -2
  16. package/ui/block/Card.js +2 -2
  17. package/ui/block/Card.tsx +4 -2
  18. package/ui/block/Column.d.ts +3 -3
  19. package/ui/block/Column.js +2 -2
  20. package/ui/block/Column.tsx +4 -3
  21. package/ui/block/Definitions.d.ts +3 -3
  22. package/ui/block/Definitions.js +2 -2
  23. package/ui/block/Definitions.tsx +4 -3
  24. package/ui/block/Details.d.ts +3 -2
  25. package/ui/block/Details.js +2 -2
  26. package/ui/block/Details.tsx +4 -3
  27. package/ui/block/Divider.d.ts +3 -2
  28. package/ui/block/Divider.js +2 -2
  29. package/ui/block/Divider.tsx +4 -2
  30. package/ui/block/Heading.d.ts +3 -3
  31. package/ui/block/Heading.js +2 -2
  32. package/ui/block/Heading.tsx +4 -3
  33. package/ui/block/Image.d.ts +3 -2
  34. package/ui/block/Image.js +2 -2
  35. package/ui/block/Image.tsx +4 -2
  36. package/ui/block/Label.d.ts +1 -1
  37. package/ui/block/Label.js +2 -2
  38. package/ui/block/Label.tsx +2 -1
  39. package/ui/block/List.d.ts +3 -2
  40. package/ui/block/List.js +4 -4
  41. package/ui/block/List.tsx +6 -4
  42. package/ui/block/Panel.d.ts +3 -3
  43. package/ui/block/Panel.js +2 -2
  44. package/ui/block/Panel.tsx +4 -3
  45. package/ui/block/Paragraph.d.ts +3 -3
  46. package/ui/block/Paragraph.js +2 -2
  47. package/ui/block/Paragraph.tsx +4 -3
  48. package/ui/block/Preformatted.d.ts +3 -3
  49. package/ui/block/Preformatted.js +2 -2
  50. package/ui/block/Preformatted.tsx +4 -3
  51. package/ui/block/Row.d.ts +3 -3
  52. package/ui/block/Row.js +2 -2
  53. package/ui/block/Row.tsx +4 -3
  54. package/ui/block/Section.js +1 -1
  55. package/ui/block/Section.tsx +1 -0
  56. package/ui/block/Subheading.d.ts +1 -1
  57. package/ui/block/Subheading.js +2 -2
  58. package/ui/block/Subheading.tsx +2 -1
  59. package/ui/block/Title.d.ts +1 -1
  60. package/ui/block/Title.js +2 -2
  61. package/ui/block/Title.tsx +2 -1
  62. package/ui/block/Video.d.ts +3 -3
  63. package/ui/block/Video.js +2 -2
  64. package/ui/block/Video.tsx +4 -3
  65. package/ui/button/Button.d.ts +3 -2
  66. package/ui/button/Button.js +2 -2
  67. package/ui/button/Button.md +28 -0
  68. package/ui/button/Button.module.css +23 -5
  69. package/ui/button/Button.tsx +4 -3
  70. package/ui/button/Clickable.d.ts +3 -3
  71. package/ui/button/Clickable.js +6 -4
  72. package/ui/button/Clickable.tsx +9 -9
  73. package/ui/button/FullscreenButton.d.ts +3 -5
  74. package/ui/button/FullscreenButton.tsx +3 -2
  75. package/ui/button/RetryButton.d.ts +2 -2
  76. package/ui/button/RetryButton.tsx +2 -2
  77. package/ui/button/SubmitButton.d.ts +3 -3
  78. package/ui/button/SubmitButton.js +3 -2
  79. package/ui/button/SubmitButton.tsx +5 -3
  80. package/ui/dialog/Dialog.d.ts +6 -4
  81. package/ui/dialog/Dialog.js +7 -4
  82. package/ui/dialog/Dialog.tsx +19 -7
  83. package/ui/dialog/Modal.d.ts +3 -3
  84. package/ui/dialog/Modal.js +3 -3
  85. package/ui/dialog/Modal.tsx +5 -5
  86. package/ui/docs/DocumentationButtons.d.ts +3 -2
  87. package/ui/docs/DocumentationButtons.js +2 -2
  88. package/ui/docs/DocumentationButtons.tsx +4 -1
  89. package/ui/form/Field.d.ts +3 -3
  90. package/ui/form/Field.js +2 -2
  91. package/ui/form/Field.tsx +4 -3
  92. package/ui/form/Form.d.ts +2 -2
  93. package/ui/form/Form.js +3 -2
  94. package/ui/form/Form.tsx +5 -3
  95. package/ui/form/FormFields.d.ts +1 -1
  96. package/ui/form/FormFields.js +2 -2
  97. package/ui/form/FormFields.tsx +2 -2
  98. package/ui/form/FormFooter.d.ts +3 -3
  99. package/ui/form/FormFooter.js +2 -2
  100. package/ui/form/FormFooter.tsx +4 -4
  101. package/ui/form/FormMessage.d.ts +2 -2
  102. package/ui/form/FormMessage.tsx +2 -3
  103. package/ui/form/Progress.d.ts +3 -2
  104. package/ui/form/Progress.js +2 -2
  105. package/ui/form/Progress.tsx +4 -2
  106. package/ui/inline/Code.d.ts +3 -3
  107. package/ui/inline/Code.js +2 -2
  108. package/ui/inline/Code.tsx +4 -3
  109. package/ui/inline/Deleted.d.ts +3 -3
  110. package/ui/inline/Deleted.js +2 -2
  111. package/ui/inline/Deleted.tsx +4 -3
  112. package/ui/inline/Emphasis.d.ts +3 -3
  113. package/ui/inline/Emphasis.js +2 -2
  114. package/ui/inline/Emphasis.tsx +4 -3
  115. package/ui/inline/Inserted.d.ts +3 -3
  116. package/ui/inline/Inserted.js +2 -2
  117. package/ui/inline/Inserted.tsx +4 -3
  118. package/ui/inline/Link.d.ts +3 -2
  119. package/ui/inline/Link.js +2 -2
  120. package/ui/inline/Link.tsx +4 -2
  121. package/ui/inline/Mark.d.ts +3 -3
  122. package/ui/inline/Mark.js +2 -2
  123. package/ui/inline/Mark.tsx +4 -3
  124. package/ui/inline/Small.d.ts +3 -3
  125. package/ui/inline/Small.js +2 -2
  126. package/ui/inline/Small.tsx +4 -3
  127. package/ui/inline/Span.d.ts +3 -3
  128. package/ui/inline/Span.js +3 -2
  129. package/ui/inline/Span.tsx +5 -4
  130. package/ui/inline/Strong.d.ts +3 -3
  131. package/ui/inline/Strong.js +2 -2
  132. package/ui/inline/Strong.tsx +4 -3
  133. package/ui/inline/Subscript.d.ts +3 -3
  134. package/ui/inline/Subscript.js +3 -3
  135. package/ui/inline/Subscript.tsx +5 -5
  136. package/ui/inline/Superscript.d.ts +3 -3
  137. package/ui/inline/Superscript.js +3 -3
  138. package/ui/inline/Superscript.tsx +5 -5
  139. package/ui/input/ArrayInput.js +2 -2
  140. package/ui/input/ArrayInput.tsx +2 -1
  141. package/ui/input/ArrayRadioInputs.d.ts +1 -1
  142. package/ui/input/ArrayRadioInputs.js +2 -2
  143. package/ui/input/ArrayRadioInputs.tsx +2 -1
  144. package/ui/input/ButtonInput.d.ts +1 -1
  145. package/ui/input/ButtonInput.js +2 -2
  146. package/ui/input/ButtonInput.tsx +2 -1
  147. package/ui/input/CheckboxInput.d.ts +1 -1
  148. package/ui/input/CheckboxInput.js +2 -2
  149. package/ui/input/CheckboxInput.tsx +2 -0
  150. package/ui/input/ChoiceRadioInputs.js +2 -2
  151. package/ui/input/ChoiceRadioInputs.tsx +2 -1
  152. package/ui/input/DataInput.js +2 -2
  153. package/ui/input/DataInput.tsx +2 -1
  154. package/ui/input/DateInput.d.ts +1 -1
  155. package/ui/input/DateInput.js +2 -2
  156. package/ui/input/DateInput.tsx +2 -1
  157. package/ui/input/DictionaryInput.js +2 -2
  158. package/ui/input/DictionaryInput.tsx +2 -1
  159. package/ui/input/FileInput.d.ts +1 -1
  160. package/ui/input/FileInput.js +3 -2
  161. package/ui/input/FileInput.tsx +3 -1
  162. package/ui/input/Input.d.ts +10 -3
  163. package/ui/input/Input.js +2 -2
  164. package/ui/input/Input.tsx +11 -4
  165. package/ui/input/NumberInput.d.ts +1 -1
  166. package/ui/input/NumberInput.js +2 -2
  167. package/ui/input/NumberInput.tsx +2 -1
  168. package/ui/input/OutputInput.d.ts +1 -1
  169. package/ui/input/OutputInput.js +2 -2
  170. package/ui/input/OutputInput.tsx +2 -2
  171. package/ui/input/Popover.d.ts +4 -2
  172. package/ui/input/Popover.js +4 -3
  173. package/ui/input/Popover.tsx +6 -3
  174. package/ui/input/PopoverButton.d.ts +28 -0
  175. package/ui/input/{ButtonPopover.js → PopoverButton.js} +10 -8
  176. package/ui/input/PopoverButton.tsx +44 -0
  177. package/ui/input/PopoverButtonInput.d.ts +27 -0
  178. package/ui/input/{ButtonInputPopover.js → PopoverButtonInput.js} +10 -8
  179. package/ui/input/PopoverButtonInput.tsx +44 -0
  180. package/ui/input/QueryInput.d.ts +1 -1
  181. package/ui/input/QueryInput.js +2 -2
  182. package/ui/input/QueryInput.tsx +2 -0
  183. package/ui/input/RadioInput.d.ts +1 -1
  184. package/ui/input/RadioInput.js +2 -2
  185. package/ui/input/RadioInput.tsx +2 -0
  186. package/ui/input/SchemaInput.d.ts +1 -1
  187. package/ui/input/SchemaInput.js +2 -2
  188. package/ui/input/SchemaInput.tsx +2 -2
  189. package/ui/input/SelectInput.js +2 -2
  190. package/ui/input/SelectInput.tsx +2 -1
  191. package/ui/input/TextInput.d.ts +1 -1
  192. package/ui/input/TextInput.js +3 -3
  193. package/ui/input/TextInput.tsx +3 -2
  194. package/ui/input/index.d.ts +2 -2
  195. package/ui/input/index.js +2 -2
  196. package/ui/input/index.ts +2 -2
  197. package/ui/menu/Menu.d.ts +5 -5
  198. package/ui/menu/Menu.js +4 -4
  199. package/ui/menu/Menu.tsx +7 -6
  200. package/ui/misc/Icon.d.ts +2 -1
  201. package/ui/misc/Icon.js +2 -1
  202. package/ui/misc/Icon.tsx +3 -1
  203. package/ui/misc/Loading.d.ts +2 -3
  204. package/ui/misc/Loading.js +2 -2
  205. package/ui/misc/Loading.tsx +10 -3
  206. package/ui/misc/Tag.d.ts +3 -2
  207. package/ui/misc/Tag.js +2 -2
  208. package/ui/misc/Tag.tsx +4 -3
  209. package/ui/notice/Message.d.ts +3 -3
  210. package/ui/notice/Message.js +2 -2
  211. package/ui/notice/Message.tsx +4 -3
  212. package/ui/notice/Notice.d.ts +3 -3
  213. package/ui/notice/Notice.js +2 -2
  214. package/ui/notice/Notice.tsx +4 -2
  215. package/ui/notice/Notices.d.ts +3 -2
  216. package/ui/notice/Notices.js +2 -2
  217. package/ui/notice/Notices.tsx +4 -3
  218. package/ui/table/Cell.d.ts +3 -3
  219. package/ui/table/Cell.js +2 -2
  220. package/ui/table/Cell.tsx +4 -3
  221. package/ui/table/Table.d.ts +3 -3
  222. package/ui/table/Table.js +2 -2
  223. package/ui/table/Table.tsx +4 -3
  224. package/ui/tree/TreeBreadcrumbs.d.ts +3 -2
  225. package/ui/tree/TreeBreadcrumbs.js +2 -2
  226. package/ui/tree/TreeBreadcrumbs.tsx +4 -2
  227. package/ui/tree/TreeButton.d.ts +2 -1
  228. package/ui/tree/TreeButton.tsx +2 -1
  229. package/ui/util/ClassProps.md +56 -0
  230. package/ui/util/css.d.ts +1 -1
  231. package/ui/util/css.js +2 -2
  232. package/ui/util/css.test.ts +29 -0
  233. package/ui/util/css.ts +2 -2
  234. package/ui/util/props.d.ts +12 -0
  235. package/ui/util/props.test.tsx +100 -0
  236. package/ui/util/props.ts +13 -0
  237. package/ui/input/ButtonInputPopover.d.ts +0 -25
  238. package/ui/input/ButtonInputPopover.tsx +0 -41
  239. package/ui/input/ButtonPopover.d.ts +0 -25
  240. package/ui/input/ButtonPopover.tsx +0 -40
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { XMarkIcon } from "@heroicons/react/24/solid";
3
3
  import { memo, Suspense, useEffect, useRef } from "react";
4
- import { getModuleClass } from "../util/css.js";
4
+ import { getButtonClass } from "../button/Button.js";
5
+ import { getClass, getModuleClass } from "../util/css.js";
5
6
  import styles from "./Dialog.module.css";
6
7
  /**
7
8
  * Modal `<dialog>` element that opens on mount and includes a close button.
@@ -17,7 +18,7 @@ export const Dialog = memo(({ children, onClose, ...props }) => {
17
18
  useEffect(() => {
18
19
  ref.current?.showModal();
19
20
  }, []);
20
- return (_jsx(Suspense, { fallback: null, children: _jsxs("dialog", { ref: ref, className: getModuleClass(styles, "dialog"), onClick: _closeOnBackdropClick, onClose: onClose, ...props, children: [children, _jsx("div", { className: getModuleClass(styles, "close"), children: _jsx(DialogCloseButton, { plain: true }) })] }) }));
21
+ return (_jsx(Suspense, { fallback: null, children: _jsxs("dialog", { ref: ref, className: getModuleClass(styles, "dialog"), onClick: _closeOnBackdropClick, onClose: onClose, ...props, children: [children, _jsx("div", { className: getModuleClass(styles, "close"), children: _jsx(DialogCloseButton, {}) })] }) }));
21
22
  });
22
23
  /** When the user clicks anywhere on a `<dialog>` element (and the click isn't on a link etc), then close the dialog. */
23
24
  function _closeOnBackdropClick({ currentTarget, target }) {
@@ -30,12 +31,14 @@ function _closeOnBackdropClick({ currentTarget, target }) {
30
31
  }
31
32
  /**
32
33
  * Button that closes its wrapping `<dialog>`, showing an X icon by default.
34
+ * - Styled with the shared `Button` classes (positioning comes from the `<Dialog>`'s own `.close` wrapper rules).
35
+ * - `plain` by default so only the icon shows until hover or focus — pass `plain={false}` for a solid button.
33
36
  *
34
37
  * @kind component
35
38
  * @see https://shelving.cc/ui/DialogCloseButton
36
39
  */
37
- export function DialogCloseButton({ children = _jsx(XMarkIcon, {}), ...variants }) {
38
- return (_jsx("button", { type: "button", title: "Close", className: getModuleClass(styles, "button", variants), onClick: _closeOnButtonClick, children: children }));
40
+ export function DialogCloseButton({ children = _jsx(XMarkIcon, {}), plain = true, className, ...variants }) {
41
+ return (_jsx("button", { type: "button", title: "Close", className: getClass(getButtonClass({ plain, ...variants }), className), onClick: _closeOnButtonClick, children: children }));
39
42
  }
40
43
  function _closeOnButtonClick({ currentTarget }) {
41
44
  currentTarget.closest("dialog")?.close();
@@ -1,9 +1,9 @@
1
1
  import { XMarkIcon } from "@heroicons/react/24/solid";
2
2
  import { type MouseEvent, memo, type ReactElement, Suspense, useEffect, useRef } from "react";
3
3
  import type { Callback } from "../../util/function.js";
4
- import type { ButtonVariants } from "../button/Button.js";
5
- import { getModuleClass } from "../util/css.js";
6
- import type { OptionalChildProps } from "../util/props.js";
4
+ import { type ButtonVariants, getButtonClass } from "../button/Button.js";
5
+ import { getClass, getModuleClass } from "../util/css.js";
6
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
7
7
  import styles from "./Dialog.module.css";
8
8
 
9
9
  /**
@@ -37,7 +37,7 @@ export const Dialog = memo(({ children, onClose, ...props }: DialogProps) => {
37
37
  <dialog ref={ref} className={getModuleClass(styles, "dialog")} onClick={_closeOnBackdropClick} onClose={onClose} {...props}>
38
38
  {children}
39
39
  <div className={getModuleClass(styles, "close")}>
40
- <DialogCloseButton plain />
40
+ <DialogCloseButton />
41
41
  </div>
42
42
  </dialog>
43
43
  </Suspense>
@@ -58,17 +58,29 @@ function _closeOnBackdropClick({ currentTarget, target }: MouseEvent<HTMLDialogE
58
58
  *
59
59
  * @see https://shelving.cc/ui/DialogCloseButtonProps
60
60
  */
61
- export interface DialogCloseButtonProps extends ButtonVariants, OptionalChildProps {}
61
+ export interface DialogCloseButtonProps extends ButtonVariants, OptionalChildProps, ClassProps {}
62
62
 
63
63
  /**
64
64
  * Button that closes its wrapping `<dialog>`, showing an X icon by default.
65
+ * - Styled with the shared `Button` classes (positioning comes from the `<Dialog>`'s own `.close` wrapper rules).
66
+ * - `plain` by default so only the icon shows until hover or focus — pass `plain={false}` for a solid button.
65
67
  *
66
68
  * @kind component
67
69
  * @see https://shelving.cc/ui/DialogCloseButton
68
70
  */
69
- export function DialogCloseButton({ children = <XMarkIcon />, ...variants }: DialogCloseButtonProps): ReactElement {
71
+ export function DialogCloseButton({
72
+ children = <XMarkIcon />,
73
+ plain = true,
74
+ className,
75
+ ...variants
76
+ }: DialogCloseButtonProps): ReactElement {
70
77
  return (
71
- <button type="button" title="Close" className={getModuleClass(styles, "button", variants)} onClick={_closeOnButtonClick}>
78
+ <button
79
+ type="button"
80
+ title="Close"
81
+ className={getClass(getButtonClass({ plain, ...variants }), className)}
82
+ onClick={_closeOnButtonClick}
83
+ >
72
84
  {children}
73
85
  </button>
74
86
  );
@@ -1,11 +1,11 @@
1
1
  import type { ReactElement } from "react";
2
- import type { OptionalChildProps } from "../util/props.js";
2
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
3
3
  /**
4
4
  * Props for `<Modal>` — optional `children` content.
5
5
  *
6
6
  * @see https://shelving.cc/ui/ModalProps
7
7
  */
8
- export interface ModalProps extends OptionalChildProps {
8
+ export interface ModalProps extends OptionalChildProps, ClassProps {
9
9
  }
10
10
  /**
11
11
  * Styled `<aside>` overlay container for modal content.
@@ -13,4 +13,4 @@ export interface ModalProps extends OptionalChildProps {
13
13
  * @kind component
14
14
  * @see https://shelving.cc/ui/Modal
15
15
  */
16
- export declare function Modal({ children }: ModalProps): ReactElement;
16
+ export declare function Modal({ children, className }: ModalProps): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getModuleClass } from "../util/css.js";
2
+ import { getClass, getModuleClass } from "../util/css.js";
3
3
  import styles from "./Modal.module.css";
4
4
  /**
5
5
  * Styled `<aside>` overlay container for modal content.
@@ -7,6 +7,6 @@ import styles from "./Modal.module.css";
7
7
  * @kind component
8
8
  * @see https://shelving.cc/ui/Modal
9
9
  */
10
- export function Modal({ children }) {
11
- return _jsx("aside", { className: getModuleClass(styles, "modal"), children: children });
10
+ export function Modal({ children, className }) {
11
+ return _jsx("aside", { className: getClass(getModuleClass(styles, "modal"), className), children: children });
12
12
  }
@@ -1,6 +1,6 @@
1
1
  import type { ReactElement } from "react";
2
- import { getModuleClass } from "../util/css.js";
3
- import type { OptionalChildProps } from "../util/props.js";
2
+ import { getClass, getModuleClass } from "../util/css.js";
3
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
4
4
  import styles from "./Modal.module.css";
5
5
 
6
6
  /**
@@ -8,7 +8,7 @@ import styles from "./Modal.module.css";
8
8
  *
9
9
  * @see https://shelving.cc/ui/ModalProps
10
10
  */
11
- export interface ModalProps extends OptionalChildProps {}
11
+ export interface ModalProps extends OptionalChildProps, ClassProps {}
12
12
 
13
13
  /**
14
14
  * Styled `<aside>` overlay container for modal content.
@@ -16,6 +16,6 @@ export interface ModalProps extends OptionalChildProps {}
16
16
  * @kind component
17
17
  * @see https://shelving.cc/ui/Modal
18
18
  */
19
- export function Modal({ children }: ModalProps): ReactElement {
20
- return <aside className={getModuleClass(styles, "modal")}>{children}</aside>;
19
+ export function Modal({ children, className }: ModalProps): ReactElement {
20
+ return <aside className={getClass(getModuleClass(styles, "modal"), className)}>{children}</aside>;
21
21
  }
@@ -2,12 +2,13 @@ import type { ReactElement } from "react";
2
2
  import type { ImmutableArray } from "../../util/array.js";
3
3
  import { type BlockVariants } from "../style/Block.js";
4
4
  import { type FlexVariants } from "../style/Flex.js";
5
+ import type { ClassProps } from "../util/props.js";
5
6
  /**
6
7
  * Props for `DocumentationButtons` — the relational metadata of a documented symbol (`class`, `extends`, `implements`), plus block-space and flex overrides.
7
8
  *
8
9
  * @see https://shelving.cc/ui/DocumentationButtonsProps
9
10
  */
10
- export interface DocumentationButtonsProps extends BlockVariants, FlexVariants {
11
+ export interface DocumentationButtonsProps extends BlockVariants, FlexVariants, ClassProps {
11
12
  /** Name of the class/interface this member belongs to (e.g. `"Store"` for `Store.get()`). Set only on methods and properties. */
12
13
  readonly class?: string | undefined;
13
14
  /** Full type text of the class/interface this extends, including any generic arguments (e.g. `"AbstractStore<string>"`, `"Omit<StringSchemaOptions, 'value'>"`). Resolved to a link at render time, trimming generics to the bare name; builtins/wrappers that don't resolve stay as text. */
@@ -24,4 +25,4 @@ export interface DocumentationButtonsProps extends BlockVariants, FlexVariants {
24
25
  *
25
26
  * @kind component
26
27
  */
27
- export declare function DocumentationButtons({ space, wrap, left, gap, ...props }: DocumentationButtonsProps): ReactElement | null;
28
+ export declare function DocumentationButtons({ space, wrap, left, gap, className, ...props }: DocumentationButtonsProps): ReactElement | null;
@@ -22,11 +22,11 @@ function* _relations({ class: className, extends: extendsName, implements: imple
22
22
  *
23
23
  * @kind component
24
24
  */
25
- export function DocumentationButtons({ space = "paragraph", wrap = true, left = true, gap = "none", ...props }) {
25
+ export function DocumentationButtons({ space = "paragraph", wrap = true, left = true, gap = "none", className, ...props }) {
26
26
  const relations = Array.from(_relations(props));
27
27
  if (!relations.length)
28
28
  return null;
29
29
  const variants = { space, wrap, left, gap, ...props };
30
30
  return (_jsx("nav", { className: getClass(getBlockClass(variants), //
31
- getFlexClass(variants)), children: relations.map(([label, to]) => (_jsxs(TreeButton, { name: to, children: [label, " ", to] }, `${label}-${to}`))) }));
31
+ getFlexClass(variants), className), children: relations.map(([label, to]) => (_jsxs(TreeButton, { name: to, children: [label, " ", to] }, `${label}-${to}`))) }));
32
32
  }
@@ -4,12 +4,13 @@ import { type BlockVariants, getBlockClass } from "../style/Block.js";
4
4
  import { type FlexVariants, getFlexClass } from "../style/Flex.js";
5
5
  import { TreeButton } from "../tree/TreeButton.js";
6
6
  import { getClass } from "../util/css.js";
7
+ import type { ClassProps } from "../util/props.js";
7
8
  /**
8
9
  * Props for `DocumentationButtons` — the relational metadata of a documented symbol (`class`, `extends`, `implements`), plus block-space and flex overrides.
9
10
  *
10
11
  * @see https://shelving.cc/ui/DocumentationButtonsProps
11
12
  */
12
- export interface DocumentationButtonsProps extends BlockVariants, FlexVariants {
13
+ export interface DocumentationButtonsProps extends BlockVariants, FlexVariants, ClassProps {
13
14
  /** Name of the class/interface this member belongs to (e.g. `"Store"` for `Store.get()`). Set only on methods and properties. */
14
15
  readonly class?: string | undefined;
15
16
  /** Full type text of the class/interface this extends, including any generic arguments (e.g. `"AbstractStore<string>"`, `"Omit<StringSchemaOptions, 'value'>"`). Resolved to a link at render time, trimming generics to the bare name; builtins/wrappers that don't resolve stay as text. */
@@ -44,6 +45,7 @@ export function DocumentationButtons({
44
45
  wrap = true,
45
46
  left = true,
46
47
  gap = "none",
48
+ className,
47
49
  ...props
48
50
  }: DocumentationButtonsProps): ReactElement | null {
49
51
  const relations = Array.from(_relations(props));
@@ -54,6 +56,7 @@ export function DocumentationButtons({
54
56
  className={getClass(
55
57
  getBlockClass(variants), //
56
58
  getFlexClass(variants),
59
+ className,
57
60
  )}
58
61
  >
59
62
  {relations.map(([label, to]) => (
@@ -1,12 +1,12 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
2
  import { type BlockVariants } from "../style/Block.js";
3
- import type { ChildProps } from "../util/index.js";
3
+ import type { ChildProps, ClassProps } from "../util/index.js";
4
4
  /**
5
5
  * Props for `Field`, a labelled wrapper around a form control.
6
6
  *
7
7
  * @see https://shelving.cc/ui/FieldProps
8
8
  */
9
- export interface FieldProps extends BlockVariants, ChildProps {
9
+ export interface FieldProps extends BlockVariants, ChildProps, ClassProps {
10
10
  title?: ReactNode | undefined;
11
11
  description?: ReactNode | undefined;
12
12
  message?: ReactNode | undefined;
@@ -18,4 +18,4 @@ export interface FieldProps extends BlockVariants, ChildProps {
18
18
  * @kind component
19
19
  * @see https://shelving.cc/ui/Field
20
20
  */
21
- export declare function Field({ title, description, message, children, ...props }: FieldProps): ReactElement;
21
+ export declare function Field({ title, description, message, children, className, ...props }: FieldProps): ReactElement;
package/ui/form/Field.js CHANGED
@@ -12,7 +12,7 @@ const FIELD_DESCRIPTION_CLASS = getModuleClass(FIELD_CSS, "description");
12
12
  * @kind component
13
13
  * @see https://shelving.cc/ui/Field
14
14
  */
15
- export function Field({ title, description, message, children, ...props }) {
15
+ export function Field({ title, description, message, children, className, ...props }) {
16
16
  return (_jsxs("label", { className: getClass(FIELD_CLASS, //
17
- getBlockClass(props)), children: [(title || description) && (_jsxs("div", { children: [title ? _jsx("div", { className: FIELD_TITLE_CLASS, children: title }) : null, description && _jsx("div", { className: FIELD_DESCRIPTION_CLASS, children: description })] })), children, message && (_jsx(Message, { status: "error", right: true, children: message }))] }));
17
+ getBlockClass(props), className), children: [(title || description) && (_jsxs("div", { children: [title ? _jsx("div", { className: FIELD_TITLE_CLASS, children: title }) : null, description && _jsx("div", { className: FIELD_DESCRIPTION_CLASS, children: description })] })), children, message && (_jsx(Message, { status: "error", right: true, children: message }))] }));
18
18
  }
package/ui/form/Field.tsx CHANGED
@@ -2,7 +2,7 @@ import type { ReactElement, ReactNode } from "react";
2
2
  import { Message } from "../notice/Message.js";
3
3
  import { type BlockVariants, getBlockClass } from "../style/Block.js";
4
4
  import { getClass, getModuleClass } from "../util/css.js";
5
- import type { ChildProps } from "../util/index.js";
5
+ import type { ChildProps, ClassProps } from "../util/index.js";
6
6
  import FIELD_CSS from "./Field.module.css";
7
7
 
8
8
  const FIELD_CLASS = getModuleClass(FIELD_CSS, "field");
@@ -14,7 +14,7 @@ const FIELD_DESCRIPTION_CLASS = getModuleClass(FIELD_CSS, "description");
14
14
  *
15
15
  * @see https://shelving.cc/ui/FieldProps
16
16
  */
17
- export interface FieldProps extends BlockVariants, ChildProps {
17
+ export interface FieldProps extends BlockVariants, ChildProps, ClassProps {
18
18
  title?: ReactNode | undefined;
19
19
  description?: ReactNode | undefined;
20
20
  message?: ReactNode | undefined;
@@ -27,13 +27,14 @@ export interface FieldProps extends BlockVariants, ChildProps {
27
27
  * @kind component
28
28
  * @see https://shelving.cc/ui/Field
29
29
  */
30
- export function Field({ title, description, message, children, ...props }: FieldProps): ReactElement {
30
+ export function Field({ title, description, message, children, className, ...props }: FieldProps): ReactElement {
31
31
  return (
32
32
  // biome-ignore lint/a11y/noLabelWithoutControl: Generally `children` will contain a field.
33
33
  <label
34
34
  className={getClass(
35
35
  FIELD_CLASS, //
36
36
  getBlockClass(props),
37
+ className,
37
38
  )}
38
39
  >
39
40
  {(title || description) && (
package/ui/form/Form.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { ImmutableDictionary } from "../../util/dictionary.js";
5
5
  import type { Arguments } from "../../util/function.js";
6
6
  import { type BlockVariants } from "../style/Block.js";
7
7
  import { type NoticeCallback } from "../util/notice.js";
8
- import type { OptionalChildProps } from "../util/props.js";
8
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
9
9
  import { FormStore } from "./FormStore.js";
10
10
  /**
11
11
  * Callback invoked when a `Form` is submitted with its validated data.
@@ -20,7 +20,7 @@ export type FormCallback<T extends Data> = (data: T, event: SubmitEvent<HTMLForm
20
20
  *
21
21
  * @see https://shelving.cc/ui/FormProps
22
22
  */
23
- export interface FormProps<T extends Data> extends BlockVariants, OptionalChildProps {
23
+ export interface FormProps<T extends Data> extends BlockVariants, OptionalChildProps, ClassProps {
24
24
  /** Schema for the form. */
25
25
  schema: DataSchema<T>;
26
26
  /** Initial data for the form. */
package/ui/form/Form.js CHANGED
@@ -3,12 +3,13 @@ import { useInstance } from "../../react/useInstance.js";
3
3
  import { useStore } from "../../react/useStore.js";
4
4
  import { isAsync } from "../../util/async.js";
5
5
  import { getBlockClass } from "../style/Block.js";
6
+ import { getClass } from "../util/css.js";
6
7
  import { notifySuccess, notifyThrown } from "../util/notice.js";
7
8
  import { FormContext } from "./FormContext.js";
8
9
  import { FormFields } from "./FormFields.js";
9
10
  import { FormFooter } from "./FormFooter.js";
10
11
  import { FormStore } from "./FormStore.js";
11
- export function Form({ schema, data: initialData, onSubmit, submit, messages, children = (_jsxs(_Fragment, { children: [_jsx(FormFields, {}), _jsx(FormFooter, { submit: submit })] })), ...props }) {
12
+ export function Form({ schema, data: initialData, onSubmit, submit, messages, className, children = (_jsxs(_Fragment, { children: [_jsx(FormFields, {}), _jsx(FormFooter, { submit: submit })] })), ...props }) {
12
13
  // Create a form store instance and subscribe to changes in it.
13
14
  const store = useStore(useInstance(FormStore, schema, initialData, messages));
14
15
  const busy = useStore(store.busy).value;
@@ -23,7 +24,7 @@ export function Form({ schema, data: initialData, onSubmit, submit, messages, ch
23
24
  // Close the parent dialog on successful submit.
24
25
  if (result)
25
26
  dialog?.close();
26
- }, className: getBlockClass(props), noValidate: true, children: _jsx("fieldset", { className: getBlockClass({}), disabled: busy, children: _jsx(FormContext, { value: store, children: children }) }) }, store.key));
27
+ }, className: getClass(getBlockClass(props), className), noValidate: true, children: _jsx("fieldset", { className: getBlockClass({}), disabled: busy, children: _jsx(FormContext, { value: store, children: children }) }) }, store.key));
27
28
  }
28
29
  /**
29
30
  * Run a form submit callback and publish success/error notices based on its return or thrown value.
package/ui/form/Form.tsx CHANGED
@@ -7,8 +7,9 @@ import type { Data, PartialData } from "../../util/data.js";
7
7
  import type { ImmutableDictionary } from "../../util/dictionary.js";
8
8
  import type { Arguments } from "../../util/function.js";
9
9
  import { type BlockVariants, getBlockClass } from "../style/Block.js";
10
+ import { getClass } from "../util/css.js";
10
11
  import { type NoticeCallback, notifySuccess, notifyThrown } from "../util/notice.js";
11
- import type { OptionalChildProps } from "../util/props.js";
12
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
12
13
  import { FormContext } from "./FormContext.js";
13
14
  import { FormFields } from "./FormFields.js";
14
15
  import { FormFooter } from "./FormFooter.js";
@@ -31,7 +32,7 @@ export type FormCallback<T extends Data> = (
31
32
  *
32
33
  * @see https://shelving.cc/ui/FormProps
33
34
  */
34
- export interface FormProps<T extends Data> extends BlockVariants, OptionalChildProps {
35
+ export interface FormProps<T extends Data> extends BlockVariants, OptionalChildProps, ClassProps {
35
36
  /** Schema for the form. */
36
37
  schema: DataSchema<T>;
37
38
  /** Initial data for the form. */
@@ -60,6 +61,7 @@ export function Form({
60
61
  onSubmit,
61
62
  submit,
62
63
  messages,
64
+ className,
63
65
  children = (
64
66
  <>
65
67
  <FormFields />
@@ -90,7 +92,7 @@ export function Form({
90
92
  // Close the parent dialog on successful submit.
91
93
  if (result) dialog?.close();
92
94
  }}
93
- className={getBlockClass(props)}
95
+ className={getClass(getBlockClass(props), className)}
94
96
  noValidate={true}
95
97
  >
96
98
  <fieldset className={getBlockClass({})} disabled={busy}>
@@ -8,7 +8,7 @@ import type { InputProps } from "../input/Input.js";
8
8
  * @example <FormField name="email" />
9
9
  * @see https://shelving.cc/ui/FormField
10
10
  */
11
- export declare function FormField({ name, ...props }: InputProps): ReactElement;
11
+ export declare function FormField({ name, className, ...props }: InputProps): ReactElement;
12
12
  /**
13
13
  * Show a `<Field>` for every property in the current form's schema.
14
14
  *
@@ -11,10 +11,10 @@ import { requireForm, useField } from "./FormContext.js";
11
11
  * @example <FormField name="email" />
12
12
  * @see https://shelving.cc/ui/FormField
13
13
  */
14
- export function FormField({ name, ...props }) {
14
+ export function FormField({ name, className, ...props }) {
15
15
  const field = useField(name);
16
16
  const { schema, message } = field;
17
- return (_jsx(Field, { ...schema, message: message, required: props.required, children: _jsx(SchemaInput, { ...field, ...props }) }));
17
+ return (_jsx(Field, { ...schema, message: message, required: props.required, className: className, children: _jsx(SchemaInput, { ...field, ...props }) }));
18
18
  }
19
19
  /**
20
20
  * Show a `<Field>` for every property in the current form's schema.
@@ -13,12 +13,12 @@ import { requireForm, useField } from "./FormContext.js";
13
13
  * @example <FormField name="email" />
14
14
  * @see https://shelving.cc/ui/FormField
15
15
  */
16
- export function FormField({ name, ...props }: InputProps): ReactElement {
16
+ export function FormField({ name, className, ...props }: InputProps): ReactElement {
17
17
  const field = useField(name);
18
18
  const { schema, message } = field;
19
19
 
20
20
  return (
21
- <Field {...schema} message={message} required={props.required}>
21
+ <Field {...schema} message={message} required={props.required} className={className}>
22
22
  <SchemaInput {...field} {...props} />
23
23
  </Field>
24
24
  );
@@ -1,11 +1,11 @@
1
1
  import type { ReactElement, ReactNode } from "react";
2
- import type { OptionalChildProps } from "../util/props.js";
2
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
3
3
  /**
4
4
  * Props for `FormFooter`, the submit-button-and-message footer for a form.
5
5
  *
6
6
  * @see https://shelving.cc/ui/FormFooterProps
7
7
  */
8
- export interface FormFooterProps extends OptionalChildProps {
8
+ export interface FormFooterProps extends OptionalChildProps, ClassProps {
9
9
  submit?: ReactNode | undefined;
10
10
  }
11
11
  /**
@@ -18,4 +18,4 @@ export interface FormFooterProps extends OptionalChildProps {
18
18
  * @example <FormFooter submit="Save" />
19
19
  * @see https://shelving.cc/ui/FormFooter
20
20
  */
21
- export declare function FormFooter({ children, submit }: FormFooterProps): ReactElement;
21
+ export declare function FormFooter({ children, submit, className }: FormFooterProps): ReactElement;
@@ -13,6 +13,6 @@ import { FormMessage } from "./FormMessage.js";
13
13
  * @example <FormFooter submit="Save" />
14
14
  * @see https://shelving.cc/ui/FormFooter
15
15
  */
16
- export function FormFooter({ children, submit }) {
17
- return (_jsxs(Footer, { children: [_jsxs(Row, { reverse: true, children: [_jsx(SubmitButton, { children: submit }), children] }), _jsx(FormMessage, {})] }));
16
+ export function FormFooter({ children, submit, className }) {
17
+ return (_jsxs(Footer, { className: className, children: [_jsxs(Row, { reverse: true, children: [_jsx(SubmitButton, { children: submit }), children] }), _jsx(FormMessage, {})] }));
18
18
  }
@@ -2,7 +2,7 @@ import type { ReactElement, ReactNode } from "react";
2
2
  import { Row } from "../block/Row.js";
3
3
  import { Footer } from "../block/Section.js";
4
4
  import { SubmitButton } from "../button/SubmitButton.js";
5
- import type { OptionalChildProps } from "../util/props.js";
5
+ import type { ClassProps, OptionalChildProps } from "../util/props.js";
6
6
  import { FormMessage } from "./FormMessage.js";
7
7
 
8
8
  /**
@@ -10,7 +10,7 @@ import { FormMessage } from "./FormMessage.js";
10
10
  *
11
11
  * @see https://shelving.cc/ui/FormFooterProps
12
12
  */
13
- export interface FormFooterProps extends OptionalChildProps {
13
+ export interface FormFooterProps extends OptionalChildProps, ClassProps {
14
14
  submit?: ReactNode | undefined;
15
15
  }
16
16
 
@@ -24,9 +24,9 @@ export interface FormFooterProps extends OptionalChildProps {
24
24
  * @example <FormFooter submit="Save" />
25
25
  * @see https://shelving.cc/ui/FormFooter
26
26
  */
27
- export function FormFooter({ children, submit }: FormFooterProps): ReactElement {
27
+ export function FormFooter({ children, submit, className }: FormFooterProps): ReactElement {
28
28
  return (
29
- <Footer>
29
+ <Footer className={className}>
30
30
  <Row reverse>
31
31
  <SubmitButton>{submit}</SubmitButton>
32
32
  {children}
@@ -1,5 +1,5 @@
1
1
  import type { ReactElement } from "react";
2
- import type { BlockVariants } from "../style/Block.js";
2
+ import { type MessageProps } from "../notice/Message.js";
3
3
  /**
4
4
  * Show the current form's "main" (unnamed) message as a `<Message>`, or render nothing when there is no message.
5
5
  *
@@ -8,4 +8,4 @@ import type { BlockVariants } from "../style/Block.js";
8
8
  * @example <FormMessage />
9
9
  * @see https://shelving.cc/ui/FormMessage
10
10
  */
11
- export declare function FormMessage(props: BlockVariants): ReactElement | null;
11
+ export declare function FormMessage(props: Omit<MessageProps, "children">): ReactElement | null;
@@ -1,7 +1,6 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { useStore } from "../../react/useStore.js";
3
- import { Message } from "../notice/Message.js";
4
- import type { BlockVariants } from "../style/Block.js";
3
+ import { Message, type MessageProps } from "../notice/Message.js";
5
4
  import { requireForm } from "./FormContext.js";
6
5
 
7
6
  /**
@@ -12,7 +11,7 @@ import { requireForm } from "./FormContext.js";
12
11
  * @example <FormMessage />
13
12
  * @see https://shelving.cc/ui/FormMessage
14
13
  */
15
- export function FormMessage(props: BlockVariants): ReactElement | null {
14
+ export function FormMessage(props: Omit<MessageProps, "children">): ReactElement | null {
16
15
  const message = useStore(requireForm().messages).get("");
17
16
  if (!message) return null;
18
17
  return (
@@ -2,13 +2,14 @@ import type { ReactElement } from "react";
2
2
  import { type Nullish } from "../../util/null.js";
3
3
  import { type ColorVariants } from "../style/Color.js";
4
4
  import { type StatusVariants } from "../style/Status.js";
5
+ import type { ClassProps } from "../util/props.js";
5
6
  import "./Progress.css";
6
7
  /**
7
8
  * Props for `Progress`, a continuous horizontal progress bar.
8
9
  *
9
10
  * @see https://shelving.cc/ui/ProgressProps
10
11
  */
11
- export interface ProgressProps extends ColorVariants, StatusVariants {
12
+ export interface ProgressProps extends ColorVariants, StatusVariants, ClassProps {
12
13
  /** Position within the `min`–`max` range, or `null`/`undefined`/omitted for an indeterminate bar. */
13
14
  value?: Nullish<number>;
14
15
  min?: number;
@@ -29,4 +30,4 @@ export interface ProgressProps extends ColorVariants, StatusVariants {
29
30
  * @example <Progress />
30
31
  * @see https://shelving.cc/ui/Progress
31
32
  */
32
- export declare function Progress({ value, min, max, ...props }: ProgressProps): ReactElement;
33
+ export declare function Progress({ value, min, max, className, ...props }: ProgressProps): ReactElement;
@@ -21,11 +21,11 @@ import styles from "./Progress.module.css";
21
21
  * @example <Progress />
22
22
  * @see https://shelving.cc/ui/Progress
23
23
  */
24
- export function Progress({ value, min = 0, max = 100, ...props }) {
24
+ export function Progress({ value, min = 0, max = 100, className, ...props }) {
25
25
  // `<progress>` has no `min`, so shift the range to a `0`-based one. A non-positive span would make `<progress>` indeterminate, so fall back to an empty determinate bar.
26
26
  const span = max - min;
27
27
  return (_jsx("progress", { className: getClass(getModuleClass(styles, "progress"), //
28
- getColorClass(props), getStatusClass(props)),
28
+ getColorClass(props), getStatusClass(props), className),
29
29
  // A nullish `value` drops the attribute (and its announced text) so the element is natively `:indeterminate` and the flowing animation styled off that pseudo-class takes over.
30
30
  value: notNullish(value) ? (span > 0 ? value - min : 0) : undefined, max: span > 0 ? span : 1, "aria-valuetext": notNullish(value) ? formatPercent(value - min, max - min) : undefined }));
31
31
  }
@@ -4,6 +4,7 @@ import { type Nullish, notNullish } from "../../util/null.js";
4
4
  import { type ColorVariants, getColorClass } from "../style/Color.js";
5
5
  import { getStatusClass, type StatusVariants } from "../style/Status.js";
6
6
  import { getClass, getModuleClass } from "../util/css.js";
7
+ import type { ClassProps } from "../util/props.js";
7
8
  import "./Progress.css";
8
9
  import styles from "./Progress.module.css";
9
10
 
@@ -12,7 +13,7 @@ import styles from "./Progress.module.css";
12
13
  *
13
14
  * @see https://shelving.cc/ui/ProgressProps
14
15
  */
15
- export interface ProgressProps extends ColorVariants, StatusVariants {
16
+ export interface ProgressProps extends ColorVariants, StatusVariants, ClassProps {
16
17
  /** Position within the `min`–`max` range, or `null`/`undefined`/omitted for an indeterminate bar. */
17
18
  value?: Nullish<number>;
18
19
  min?: number;
@@ -34,7 +35,7 @@ export interface ProgressProps extends ColorVariants, StatusVariants {
34
35
  * @example <Progress />
35
36
  * @see https://shelving.cc/ui/Progress
36
37
  */
37
- export function Progress({ value, min = 0, max = 100, ...props }: ProgressProps): ReactElement {
38
+ export function Progress({ value, min = 0, max = 100, className, ...props }: ProgressProps): ReactElement {
38
39
  // `<progress>` has no `min`, so shift the range to a `0`-based one. A non-positive span would make `<progress>` indeterminate, so fall back to an empty determinate bar.
39
40
  const span = max - min;
40
41
 
@@ -44,6 +45,7 @@ export function Progress({ value, min = 0, max = 100, ...props }: ProgressProps)
44
45
  getModuleClass(styles, "progress"), //
45
46
  getColorClass(props),
46
47
  getStatusClass(props),
48
+ className,
47
49
  )}
48
50
  // A nullish `value` drops the attribute (and its announced text) so the element is natively `:indeterminate` and the flowing animation styled off that pseudo-class takes over.
49
51
  value={notNullish(value) ? (span > 0 ? value - min : 0) : undefined}
@@ -1,12 +1,12 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { type TypographyVariants } from "../style/Typography.js";
3
- import type { OptionalChildProps } from "../util/index.js";
3
+ import type { ClassProps, OptionalChildProps } from "../util/index.js";
4
4
  /**
5
5
  * Props for `Code` — colour and typography variants, optional `children`, plus a `plain` toggle.
6
6
  *
7
7
  * @see https://shelving.cc/ui/CodeProps
8
8
  */
9
- export interface CodeProps extends TypographyVariants, OptionalChildProps {
9
+ export interface CodeProps extends TypographyVariants, OptionalChildProps, ClassProps {
10
10
  plain?: boolean | undefined;
11
11
  }
12
12
  /**
@@ -16,4 +16,4 @@ export interface CodeProps extends TypographyVariants, OptionalChildProps {
16
16
  * @kind component
17
17
  * @see https://shelving.cc/ui/Code
18
18
  */
19
- export declare function Code({ children, plain, ...props }: CodeProps): ReactElement;
19
+ export declare function Code({ children, plain, className, ...props }: CodeProps): ReactElement;
package/ui/inline/Code.js CHANGED
@@ -11,7 +11,7 @@ const CODE_PLAIN_CLASS = getModuleClass(CODE_CSS, "plain");
11
11
  * @kind component
12
12
  * @see https://shelving.cc/ui/Code
13
13
  */
14
- export function Code({ children, plain, ...props }) {
14
+ export function Code({ children, plain, className, ...props }) {
15
15
  return (_jsx("code", { className: getClass(CODE_CLASS, //
16
- plain && CODE_PLAIN_CLASS, getTypographyClass(props)), children: children }));
16
+ plain && CODE_PLAIN_CLASS, getTypographyClass(props), className), children: children }));
17
17
  }