@ratio-ui/core 0.1.1 → 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 +2 -0
  2. package/dist/catalogue.json +2829 -72
  3. package/dist/components/alert/Alert.d.ts +18 -0
  4. package/dist/components/alert/Alert.js +67 -0
  5. package/dist/components/alert/index.d.ts +2 -0
  6. package/dist/components/alert/index.js +1 -0
  7. package/dist/components/alert-dialog/AlertDialog.d.ts +48 -0
  8. package/dist/components/alert-dialog/AlertDialog.js +76 -0
  9. package/dist/components/alert-dialog/index.d.ts +2 -0
  10. package/dist/components/alert-dialog/index.js +1 -0
  11. package/dist/components/app-shell/AppShell.d.ts +22 -0
  12. package/dist/components/app-shell/AppShell.js +39 -0
  13. package/dist/components/app-shell/context.js +5 -0
  14. package/dist/components/app-shell/index.d.ts +2 -0
  15. package/dist/components/app-shell/index.js +1 -0
  16. package/dist/components/avatar/Avatar.d.ts +22 -0
  17. package/dist/components/avatar/Avatar.js +38 -0
  18. package/dist/components/avatar/index.d.ts +2 -0
  19. package/dist/components/avatar/index.js +1 -0
  20. package/dist/components/button/Button.d.ts +37 -0
  21. package/dist/components/button/Button.js +41 -0
  22. package/dist/components/button/index.d.ts +2 -0
  23. package/dist/components/button/index.js +1 -0
  24. package/dist/components/calendar/Calendar.d.ts +20 -0
  25. package/dist/components/calendar/Calendar.js +119 -0
  26. package/dist/components/calendar/index.d.ts +2 -0
  27. package/dist/components/calendar/index.js +1 -0
  28. package/dist/components/card/Card.d.ts +33 -0
  29. package/dist/components/card/Card.js +53 -0
  30. package/dist/components/card/index.d.ts +2 -0
  31. package/dist/components/card/index.js +1 -0
  32. package/dist/components/checkbox/Checkbox.d.ts +10 -0
  33. package/dist/components/checkbox/Checkbox.js +28 -0
  34. package/dist/components/checkbox/index.d.ts +2 -0
  35. package/dist/components/checkbox/index.js +1 -0
  36. package/dist/components/checkbox-list/CheckboxList.d.ts +36 -0
  37. package/dist/components/checkbox-list/CheckboxList.js +93 -0
  38. package/dist/components/checkbox-list/index.d.ts +2 -0
  39. package/dist/components/checkbox-list/index.js +1 -0
  40. package/dist/components/collapsible/Collapsible.d.ts +24 -0
  41. package/dist/components/collapsible/Collapsible.js +58 -0
  42. package/dist/components/collapsible/index.d.ts +2 -0
  43. package/dist/components/collapsible/index.js +1 -0
  44. package/dist/components/data-table/DataTable.d.ts +65 -0
  45. package/dist/components/data-table/DataTable.js +141 -0
  46. package/dist/components/data-table/index.d.ts +2 -0
  47. package/dist/components/data-table/index.js +1 -0
  48. package/dist/components/date-picker/DatePicker.d.ts +33 -0
  49. package/dist/components/date-picker/DatePicker.js +104 -0
  50. package/dist/components/date-picker/index.d.ts +2 -0
  51. package/dist/components/date-picker/index.js +1 -0
  52. package/dist/components/date-range-picker/DateRangePicker.d.ts +39 -0
  53. package/dist/components/date-range-picker/DateRangePicker.js +142 -0
  54. package/dist/components/date-range-picker/index.d.ts +2 -0
  55. package/dist/components/date-range-picker/index.js +1 -0
  56. package/dist/components/definition/Definition.d.ts +14 -0
  57. package/dist/components/definition/Definition.js +29 -0
  58. package/dist/components/definition/index.d.ts +2 -0
  59. package/dist/components/definition/index.js +1 -0
  60. package/dist/components/dialog/Dialog.d.ts +44 -0
  61. package/dist/components/dialog/Dialog.js +79 -0
  62. package/dist/components/dialog/index.d.ts +2 -0
  63. package/dist/components/dialog/index.js +1 -0
  64. package/dist/components/dropdown-menu/DropdownMenu.d.ts +73 -0
  65. package/dist/components/dropdown-menu/DropdownMenu.js +116 -0
  66. package/dist/components/dropdown-menu/index.d.ts +2 -0
  67. package/dist/components/dropdown-menu/index.js +1 -0
  68. package/dist/components/empty-state/EmptyState.d.ts +15 -0
  69. package/dist/components/empty-state/EmptyState.js +30 -0
  70. package/dist/components/empty-state/index.d.ts +2 -0
  71. package/dist/components/empty-state/index.js +1 -0
  72. package/dist/components/field/Field.d.ts +35 -0
  73. package/dist/components/field/Field.js +67 -0
  74. package/dist/components/field/Label.d.ts +8 -0
  75. package/dist/components/field/Label.js +13 -0
  76. package/dist/components/field/index.d.ts +3 -0
  77. package/dist/components/field/index.js +3 -0
  78. package/dist/components/filter-tabs/FilterTabs.d.ts +28 -0
  79. package/dist/components/filter-tabs/FilterTabs.js +37 -0
  80. package/dist/components/filter-tabs/index.d.ts +2 -0
  81. package/dist/components/filter-tabs/index.js +1 -0
  82. package/dist/components/global-search/GlobalSearch.d.ts +51 -0
  83. package/dist/components/global-search/GlobalSearch.js +144 -0
  84. package/dist/components/global-search/index.d.ts +2 -0
  85. package/dist/components/global-search/index.js +1 -0
  86. package/dist/components/icon/registry.d.ts +3 -2
  87. package/dist/components/icon/registry.js +57 -1
  88. package/dist/components/input/Input.d.ts +19 -0
  89. package/dist/components/input/Input.js +26 -0
  90. package/dist/components/input/index.d.ts +2 -0
  91. package/dist/components/input/index.js +1 -0
  92. package/dist/components/input-group/InputGroup.d.ts +42 -0
  93. package/dist/components/input-group/InputGroup.js +83 -0
  94. package/dist/components/input-group/index.d.ts +2 -0
  95. package/dist/components/input-group/index.js +1 -0
  96. package/dist/components/kbd/Kbd.d.ts +17 -0
  97. package/dist/components/kbd/Kbd.js +21 -0
  98. package/dist/components/kbd/index.d.ts +2 -0
  99. package/dist/components/kbd/index.js +1 -0
  100. package/dist/components/link/Link.d.ts +22 -0
  101. package/dist/components/link/Link.js +31 -0
  102. package/dist/components/link/index.d.ts +2 -0
  103. package/dist/components/link/index.js +1 -0
  104. package/dist/components/link-provider/LinkProvider.d.ts +29 -0
  105. package/dist/components/link-provider/LinkProvider.js +15 -0
  106. package/dist/components/link-provider/RatioLink.js +18 -0
  107. package/dist/components/link-provider/context.js +4 -0
  108. package/dist/components/link-provider/index.d.ts +2 -0
  109. package/dist/components/link-provider/index.js +1 -0
  110. package/dist/components/media-grid/MediaGrid.d.ts +49 -0
  111. package/dist/components/media-grid/MediaGrid.js +303 -0
  112. package/dist/components/media-grid/index.d.ts +2 -0
  113. package/dist/components/media-grid/index.js +1 -0
  114. package/dist/components/metric-strip/MetricStrip.d.ts +23 -0
  115. package/dist/components/metric-strip/MetricStrip.js +39 -0
  116. package/dist/components/metric-strip/index.d.ts +2 -0
  117. package/dist/components/metric-strip/index.js +1 -0
  118. package/dist/components/money-input/MoneyInput.d.ts +30 -0
  119. package/dist/components/money-input/MoneyInput.js +72 -0
  120. package/dist/components/money-input/index.d.ts +2 -0
  121. package/dist/components/money-input/index.js +1 -0
  122. package/dist/components/page-header/PageHeader.d.ts +37 -0
  123. package/dist/components/page-header/PageHeader.js +62 -0
  124. package/dist/components/page-header/index.d.ts +2 -0
  125. package/dist/components/page-header/index.js +1 -0
  126. package/dist/components/pagination/Pagination.d.ts +18 -0
  127. package/dist/components/pagination/Pagination.js +59 -0
  128. package/dist/components/pagination/index.d.ts +2 -0
  129. package/dist/components/pagination/index.js +1 -0
  130. package/dist/components/popover/Popover.d.ts +27 -0
  131. package/dist/components/popover/Popover.js +47 -0
  132. package/dist/components/popover/index.d.ts +2 -0
  133. package/dist/components/popover/index.js +1 -0
  134. package/dist/components/save-bar/SaveBar.d.ts +27 -0
  135. package/dist/components/save-bar/SaveBar.js +37 -0
  136. package/dist/components/save-bar/index.d.ts +2 -0
  137. package/dist/components/save-bar/index.js +1 -0
  138. package/dist/components/search-field/SearchField.d.ts +23 -0
  139. package/dist/components/search-field/SearchField.js +66 -0
  140. package/dist/components/search-field/index.d.ts +2 -0
  141. package/dist/components/search-field/index.js +1 -0
  142. package/dist/components/select/Select.d.ts +40 -0
  143. package/dist/components/select/Select.js +84 -0
  144. package/dist/components/select/index.d.ts +2 -0
  145. package/dist/components/select/index.js +1 -0
  146. package/dist/components/side-nav/SideNav.d.ts +64 -0
  147. package/dist/components/side-nav/SideNav.js +194 -0
  148. package/dist/components/side-nav/index.d.ts +2 -0
  149. package/dist/components/side-nav/index.js +1 -0
  150. package/dist/components/skeleton/Skeleton.d.ts +13 -0
  151. package/dist/components/skeleton/Skeleton.js +21 -0
  152. package/dist/components/skeleton/index.d.ts +2 -0
  153. package/dist/components/skeleton/index.js +1 -0
  154. package/dist/components/spinner/Spinner.d.ts +11 -0
  155. package/dist/components/spinner/Spinner.js +16 -0
  156. package/dist/components/spinner/index.d.ts +2 -0
  157. package/dist/components/spinner/index.js +1 -0
  158. package/dist/components/status-pill/StatusPill.d.ts +14 -0
  159. package/dist/components/status-pill/StatusPill.js +19 -0
  160. package/dist/components/status-pill/index.d.ts +2 -0
  161. package/dist/components/status-pill/index.js +1 -0
  162. package/dist/components/summary-chips/SummaryChips.d.ts +17 -0
  163. package/dist/components/summary-chips/SummaryChips.js +19 -0
  164. package/dist/components/summary-chips/index.d.ts +2 -0
  165. package/dist/components/summary-chips/index.js +1 -0
  166. package/dist/components/switch/Switch.d.ts +10 -0
  167. package/dist/components/switch/Switch.js +20 -0
  168. package/dist/components/switch/index.d.ts +2 -0
  169. package/dist/components/switch/index.js +1 -0
  170. package/dist/components/table/Table.d.ts +46 -0
  171. package/dist/components/table/Table.js +87 -0
  172. package/dist/components/table/index.d.ts +2 -0
  173. package/dist/components/table/index.js +1 -0
  174. package/dist/components/table-loader/TableLoader.d.ts +31 -0
  175. package/dist/components/table-loader/TableLoader.js +35 -0
  176. package/dist/components/table-loader/index.d.ts +2 -0
  177. package/dist/components/table-loader/index.js +1 -0
  178. package/dist/components/tabs/Tabs.d.ts +23 -0
  179. package/dist/components/tabs/Tabs.js +41 -0
  180. package/dist/components/tabs/index.d.ts +2 -0
  181. package/dist/components/tabs/index.js +1 -0
  182. package/dist/components/tag-input/TagInput.d.ts +44 -0
  183. package/dist/components/tag-input/TagInput.js +102 -0
  184. package/dist/components/tag-input/index.d.ts +2 -0
  185. package/dist/components/tag-input/index.js +1 -0
  186. package/dist/components/textarea/Textarea.d.ts +15 -0
  187. package/dist/components/textarea/Textarea.js +21 -0
  188. package/dist/components/textarea/index.d.ts +2 -0
  189. package/dist/components/textarea/index.js +1 -0
  190. package/dist/components/toaster/Toaster.d.ts +32 -0
  191. package/dist/components/toaster/Toaster.js +89 -0
  192. package/dist/components/toaster/index.d.ts +2 -0
  193. package/dist/components/toaster/index.js +1 -0
  194. package/dist/components/tooltip/Tooltip.d.ts +18 -0
  195. package/dist/components/tooltip/Tooltip.js +35 -0
  196. package/dist/components/tooltip/index.d.ts +2 -0
  197. package/dist/components/tooltip/index.js +1 -0
  198. package/dist/components/top-bar/StoreSwitcher.d.ts +26 -0
  199. package/dist/components/top-bar/StoreSwitcher.js +48 -0
  200. package/dist/components/top-bar/TopBar.d.ts +24 -0
  201. package/dist/components/top-bar/TopBar.js +53 -0
  202. package/dist/components/top-bar/index.d.ts +3 -0
  203. package/dist/components/top-bar/index.js +3 -0
  204. package/dist/components/unit-input/UnitInput.d.ts +33 -0
  205. package/dist/components/unit-input/UnitInput.js +47 -0
  206. package/dist/components/unit-input/index.d.ts +2 -0
  207. package/dist/components/unit-input/index.js +1 -0
  208. package/dist/index.d.ts +102 -1
  209. package/dist/index.js +54 -2
  210. package/dist/lib/cn.js +38 -27
  211. package/dist/lib/format.d.ts +92 -0
  212. package/dist/lib/format.js +222 -0
  213. package/dist/styles.css +1 -1
  214. package/package.json +205 -3
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, JSX, ReactNode, Ref } from "react";
2
+ /** The tone of an alert. Critical uses the question 1 tokens. */
3
+ export type AlertTone = 'info' | 'success' | 'warning' | 'critical';
4
+ /** The props of Alert: the HTML attributes of its div, except className, style, children and title. */
5
+ export type AlertProps = Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children' | 'title'> & {
6
+ /** The tone. Defaults to info. */
7
+ tone?: AlertTone;
8
+ /** An optional bold first line. */
9
+ title?: ReactNode;
10
+ /** An optional second line. */
11
+ description?: ReactNode;
12
+ /** An optional action on the right, usually one Button. */
13
+ action?: ReactNode;
14
+ /** Receives the rendered div. */
15
+ ref?: Ref<HTMLDivElement>;
16
+ };
17
+ /** A message that stays in the page: a tone glyph, an optional title and description, and an optional action. */
18
+ export declare function Alert({ tone, title, description, action, ref, ...rest }: AlertProps): JSX.Element;
@@ -0,0 +1,67 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { Icon } from "../icon/Icon.js";
3
+ import { Text } from "../text/Text.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ // src/components/alert/Alert.tsx
6
+ const TONES = {
7
+ info: {
8
+ box: "rt:bg-primary-tint rt:border-primary-tint",
9
+ glyph: "rt:text-primary",
10
+ icon: "info-circle"
11
+ },
12
+ success: {
13
+ box: "rt:bg-success-tint rt:border-success-border",
14
+ glyph: "rt:text-success",
15
+ icon: "check"
16
+ },
17
+ warning: {
18
+ box: "rt:bg-warning-tint rt:border-warning-border",
19
+ glyph: "rt:text-warning",
20
+ icon: "alert-triangle"
21
+ },
22
+ critical: {
23
+ box: "rt:bg-alert-critical-background rt:border-alert-critical-border rt:text-alert-critical-foreground",
24
+ glyph: "rt:text-error-icon",
25
+ icon: "alert-triangle"
26
+ }
27
+ };
28
+ /** A message that stays in the page: a tone glyph, an optional title and description, and an optional action. */
29
+ function Alert({ tone = "info", title, description, action, ref, ...rest }) {
30
+ const t = TONES[tone];
31
+ return /* @__PURE__ */ jsxs("div", {
32
+ role: tone === "warning" || tone === "critical" ? "alert" : "status",
33
+ "data-slot": "alert",
34
+ ...rest,
35
+ ref,
36
+ "data-tone": tone,
37
+ className: cn("rt:flex rt:w-full rt:min-w-0 rt:items-start rt:gap-2 rt:rounded-lg rt:border rt:px-3 rt:py-2 rt:text-left rt:text-foreground", t.box),
38
+ children: [
39
+ /* @__PURE__ */ jsx("span", {
40
+ className: cn("rt:mt-0.5 rt:shrink-0", t.glyph),
41
+ children: /* @__PURE__ */ jsx(Icon, {
42
+ name: t.icon,
43
+ size: 16
44
+ })
45
+ }),
46
+ /* @__PURE__ */ jsxs("div", {
47
+ className: "rt:flex rt:min-w-0 rt:flex-1 rt:flex-col rt:gap-0.5",
48
+ children: [title ? /* @__PURE__ */ jsx(Text, {
49
+ as: "p",
50
+ variant: "b4",
51
+ tone: tone === "critical" ? "inherit" : "default",
52
+ children: title
53
+ }) : null, description ? /* @__PURE__ */ jsx(Text, {
54
+ as: "p",
55
+ tone: tone === "critical" ? "inherit" : "subdued",
56
+ children: description
57
+ }) : null]
58
+ }),
59
+ action ? /* @__PURE__ */ jsx("div", {
60
+ "data-slot": "alert-action",
61
+ className: "rt:shrink-0",
62
+ children: action
63
+ }) : null
64
+ ]
65
+ });
66
+ }
67
+ export { Alert };
@@ -0,0 +1,2 @@
1
+ import { Alert, AlertProps, AlertTone } from "./Alert.js";
2
+ export { Alert, type AlertProps, type AlertTone };
@@ -0,0 +1 @@
1
+ export { Alert } from "./Alert.js";
@@ -0,0 +1,48 @@
1
+ import { ButtonVariant } from "../button/Button.js";
2
+ import "../button/index.js";
3
+ import { ComponentProps, JSX } from "react";
4
+ import { AlertDialog } from "@base-ui/react/alert-dialog";
5
+ /**
6
+ * The root of a confirmation. It holds the open state and renders nothing itself. Pass `open` and `onOpenChange` to
7
+ * control it, or `defaultOpen` to leave it uncontrolled. Escape closes it; a click outside does not.
8
+ */
9
+ declare function AlertDialog$1(props: AlertDialog.Root.Props): JSX.Element;
10
+ /** Props of AlertDialogTrigger. */
11
+ export type AlertDialogTriggerProps = Omit<AlertDialog.Trigger.Props, 'className' | 'style'>;
12
+ /** The button that opens the confirmation. */
13
+ export declare function AlertDialogTrigger(props: AlertDialogTriggerProps): JSX.Element;
14
+ /** Props of AlertDialogContent. */
15
+ export type AlertDialogContentProps = Omit<AlertDialog.Popup.Props, 'className' | 'style'>;
16
+ /**
17
+ * The panel: 480px wide, white, drawn with the ring outline and no shadow, with no scrim behind it. Put
18
+ * AlertDialogHeader and AlertDialogFooter inside.
19
+ */
20
+ export declare function AlertDialogContent(props: AlertDialogContentProps): JSX.Element;
21
+ /** Props of AlertDialogHeader. */
22
+ export type AlertDialogHeaderProps = Omit<ComponentProps<'div'>, 'className' | 'style'>;
23
+ /** The title and description, stacked. */
24
+ export declare function AlertDialogHeader(props: AlertDialogHeaderProps): JSX.Element;
25
+ /** Props of AlertDialogFooter. */
26
+ export type AlertDialogFooterProps = Omit<ComponentProps<'div'>, 'className' | 'style'>;
27
+ /** The row of actions at the bottom, aligned to the end. */
28
+ export declare function AlertDialogFooter(props: AlertDialogFooterProps): JSX.Element;
29
+ /** Props of AlertDialogTitle. */
30
+ export type AlertDialogTitleProps = Omit<AlertDialog.Title.Props, 'className' | 'style'>;
31
+ /** The question, in the b4 style. It names the dialog for assistive technology. */
32
+ export declare function AlertDialogTitle(props: AlertDialogTitleProps): JSX.Element;
33
+ /** Props of AlertDialogDescription. */
34
+ export type AlertDialogDescriptionProps = Omit<AlertDialog.Description.Props, 'className' | 'style'>;
35
+ /** What will happen, in subdued body text. */
36
+ export declare function AlertDialogDescription(props: AlertDialogDescriptionProps): JSX.Element;
37
+ /** Props of AlertDialogAction. */
38
+ export interface AlertDialogActionProps extends Omit<AlertDialog.Close.Props, 'className' | 'style' | 'render'> {
39
+ /** The Button look. Defaults to destructive; use main for a confirmation that deletes nothing. */
40
+ variant?: Extract<ButtonVariant, 'destructive' | 'main'>;
41
+ }
42
+ /** The confirming button. It is the Button's destructive variant and closes the dialog after its onClick runs. */
43
+ export declare function AlertDialogAction({ variant, ...props }: AlertDialogActionProps): JSX.Element;
44
+ /** Props of AlertDialogCancel. */
45
+ export type AlertDialogCancelProps = Omit<AlertDialog.Close.Props, 'className' | 'style' | 'render'>;
46
+ /** The secondary button that closes the dialog without doing anything. */
47
+ export declare function AlertDialogCancel(props: AlertDialogCancelProps): JSX.Element;
48
+ export { AlertDialog$1 as AlertDialog };
@@ -0,0 +1,76 @@
1
+ import { Button } from "../button/Button.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { AlertDialog } from "@base-ui/react/alert-dialog";
4
+ // src/components/alert-dialog/AlertDialog.tsx
5
+ /**
6
+ * The root of a confirmation. It holds the open state and renders nothing itself. Pass `open` and `onOpenChange` to
7
+ * control it, or `defaultOpen` to leave it uncontrolled. Escape closes it; a click outside does not.
8
+ */
9
+ function AlertDialog$1(props) {
10
+ return /* @__PURE__ */ jsx(AlertDialog.Root, { ...props });
11
+ }
12
+ /** The button that opens the confirmation. */
13
+ function AlertDialogTrigger(props) {
14
+ return /* @__PURE__ */ jsx(AlertDialog.Trigger, {
15
+ "data-slot": "alert-dialog-trigger",
16
+ ...props
17
+ });
18
+ }
19
+ /**
20
+ * The panel: 480px wide, white, drawn with the ring outline and no shadow, with no scrim behind it. Put
21
+ * AlertDialogHeader and AlertDialogFooter inside.
22
+ */
23
+ function AlertDialogContent(props) {
24
+ return /* @__PURE__ */ jsx(AlertDialog.Portal, { children: /* @__PURE__ */ jsx(AlertDialog.Popup, {
25
+ "data-slot": "alert-dialog-content",
26
+ className: "rt:fixed rt:inset-0 rt:z-50 rt:m-auto rt:flex rt:h-fit rt:max-h-full rt:w-120 rt:max-w-full rt:overflow-y-auto rt:flex-col rt:gap-6 rt:rounded-lg rt:bg-popover rt:p-6 rt:text-b3 rt:text-popover-foreground rt:shadow-ring-strong rt:forced-outline rt:focus-visible:focus-ring",
27
+ ...props
28
+ }) });
29
+ }
30
+ /** The title and description, stacked. */
31
+ function AlertDialogHeader(props) {
32
+ return /* @__PURE__ */ jsx("div", {
33
+ "data-slot": "alert-dialog-header",
34
+ className: "rt:flex rt:flex-col rt:gap-1",
35
+ ...props
36
+ });
37
+ }
38
+ /** The row of actions at the bottom, aligned to the end. */
39
+ function AlertDialogFooter(props) {
40
+ return /* @__PURE__ */ jsx("div", {
41
+ "data-slot": "alert-dialog-footer",
42
+ className: "rt:flex rt:items-center rt:justify-end rt:gap-2",
43
+ ...props
44
+ });
45
+ }
46
+ /** The question, in the b4 style. It names the dialog for assistive technology. */
47
+ function AlertDialogTitle(props) {
48
+ return /* @__PURE__ */ jsx(AlertDialog.Title, {
49
+ "data-slot": "alert-dialog-title",
50
+ className: "rt:text-b4 rt:text-foreground-strong",
51
+ ...props
52
+ });
53
+ }
54
+ /** What will happen, in subdued body text. */
55
+ function AlertDialogDescription(props) {
56
+ return /* @__PURE__ */ jsx(AlertDialog.Description, {
57
+ "data-slot": "alert-dialog-description",
58
+ className: "rt:text-b3 rt:text-foreground-subdued",
59
+ ...props
60
+ });
61
+ }
62
+ /** The confirming button. It is the Button's destructive variant and closes the dialog after its onClick runs. */
63
+ function AlertDialogAction({ variant = "destructive", ...props }) {
64
+ return /* @__PURE__ */ jsx(AlertDialog.Close, {
65
+ render: /* @__PURE__ */ jsx(Button, { variant }),
66
+ ...props
67
+ });
68
+ }
69
+ /** The secondary button that closes the dialog without doing anything. */
70
+ function AlertDialogCancel(props) {
71
+ return /* @__PURE__ */ jsx(AlertDialog.Close, {
72
+ render: /* @__PURE__ */ jsx(Button, { variant: "secondary" }),
73
+ ...props
74
+ });
75
+ }
76
+ export { AlertDialog$1 as AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };
@@ -0,0 +1,2 @@
1
+ import { AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps } from "./AlertDialog.js";
2
+ export { AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps };
@@ -0,0 +1 @@
1
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "./AlertDialog.js";
@@ -0,0 +1,22 @@
1
+ import { JSX, ReactNode } from "react";
2
+ /** The props of AppShell. */
3
+ export type AppShellProps = {
4
+ /** The side navigation, for example SideNav. It sits at the left of the top bar and the content. */
5
+ sideNav?: ReactNode;
6
+ /** The top bar, for example TopBar. It spans the width beside the side nav. */
7
+ topBar?: ReactNode;
8
+ /** Whether the side navigation drawer is open on a phone. Set it with onNavOpenChange to control the drawer. */
9
+ navOpen?: boolean;
10
+ /** Whether the drawer starts open on a phone when navOpen is not set. Defaults to false. */
11
+ defaultNavOpen?: boolean;
12
+ /** Called when the drawer asks to open or close on a phone: the menu button in TopBar, Escape, or choosing a row. */
13
+ onNavOpenChange?: (open: boolean) => void;
14
+ /** The page content, centred in a column that is 1152px wide at most. */
15
+ children?: ReactNode;
16
+ };
17
+ /**
18
+ * The frame of every page: the side nav at the left, the top bar above and the content below it. It fills the height of its
19
+ * container, so the app gives it a height and the content scrolls beside the side nav and under the top bar. The parts are slots, so the shell does not depend on their components.
20
+ * On a phone the side nav is a drawer: the menu button in TopBar opens it, and Escape or choosing a row closes it.
21
+ */
22
+ export declare function AppShell({ sideNav, topBar, navOpen, defaultNavOpen, onNavOpenChange, children }: AppShellProps): JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { ShellNavContext } from "./context.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useId, useState } from "react";
4
+ // src/components/app-shell/AppShell.tsx
5
+ /**
6
+ * The frame of every page: the side nav at the left, the top bar above and the content below it. It fills the height of its
7
+ * container, so the app gives it a height and the content scrolls beside the side nav and under the top bar. The parts are slots, so the shell does not depend on their components.
8
+ * On a phone the side nav is a drawer: the menu button in TopBar opens it, and Escape or choosing a row closes it.
9
+ */
10
+ function AppShell({ sideNav, topBar, navOpen, defaultNavOpen = false, onNavOpenChange, children }) {
11
+ const [inner, setInner] = useState(defaultNavOpen);
12
+ const id = useId();
13
+ const open = navOpen ?? inner;
14
+ const setOpen = (next) => {
15
+ if (navOpen === void 0) setInner(next);
16
+ onNavOpenChange?.(next);
17
+ };
18
+ return /* @__PURE__ */ jsx(ShellNavContext, {
19
+ value: sideNav ? {
20
+ open,
21
+ setOpen,
22
+ id
23
+ } : void 0,
24
+ children: /* @__PURE__ */ jsxs("div", {
25
+ className: "rt:flex rt:h-full rt:bg-page rt:font-sans rt:text-foreground",
26
+ children: [sideNav, /* @__PURE__ */ jsxs("div", {
27
+ className: "rt:flex rt:min-w-0 rt:flex-1 rt:flex-col",
28
+ children: [topBar, /* @__PURE__ */ jsx("main", {
29
+ className: "rt:min-h-0 rt:flex-1 rt:overflow-y-auto rt:px-3 rt:py-6 rt:md:px-6",
30
+ children: /* @__PURE__ */ jsx("div", {
31
+ className: "rt:mx-auto rt:w-full rt:max-w-content",
32
+ children
33
+ })
34
+ })]
35
+ })]
36
+ })
37
+ });
38
+ }
39
+ export { AppShell };
@@ -0,0 +1,5 @@
1
+ import { createContext } from "react";
2
+ // src/components/app-shell/context.ts
3
+ /** The drawer state of the nearest AppShell that has a side nav, or undefined outside one. */
4
+ const ShellNavContext = createContext(void 0);
5
+ export { ShellNavContext };
@@ -0,0 +1,2 @@
1
+ import { AppShell, AppShellProps } from "./AppShell.js";
2
+ export { AppShell, type AppShellProps };
@@ -0,0 +1 @@
1
+ export { AppShell } from "./AppShell.js";
@@ -0,0 +1,22 @@
1
+ import { JSX, Ref } from "react";
2
+ /** The size of an avatar: sm is 24px, default 32px and lg 40px. */
3
+ export type AvatarSize = 'sm' | 'default' | 'lg';
4
+ /** The shape of an avatar: round for a person, square for a store. */
5
+ export type AvatarShape = 'round' | 'square';
6
+ /** The props of Avatar. */
7
+ export type AvatarProps = {
8
+ /** The full name of the person or store. It is the accessible label, and its first letters are the initials. */
9
+ name: string;
10
+ /** The address of a picture. The initials show until it loads and when it fails. */
11
+ src?: string;
12
+ /** Round for a person, square for a store. Defaults to round. */
13
+ shape?: AvatarShape;
14
+ /** Defaults to default, which is 32px. */
15
+ size?: AvatarSize;
16
+ /** Receives the rendered element. */
17
+ ref?: Ref<HTMLSpanElement>;
18
+ };
19
+ /** The first letters of the first two words of a name, in capitals: "My Store" gives MS, and an empty name gives nothing. */
20
+ export declare function getInitials(name: string): string;
21
+ /** A picture or the initials of a person or a store: round for people, square for stores. */
22
+ export declare function Avatar({ name, src, shape, size, ref }: AvatarProps): JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Avatar } from "@base-ui/react/avatar";
4
+ // src/components/avatar/Avatar.tsx
5
+ /** The first letters of the first two words of a name, in capitals: "My Store" gives MS, and an empty name gives nothing. */
6
+ function getInitials(name) {
7
+ return name.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((word) => Array.from(word)[0]?.toUpperCase() ?? "").join("");
8
+ }
9
+ const SIZE_CLASSES = {
10
+ sm: "rt:size-6 rt:text-c2",
11
+ default: "rt:size-8 rt:text-c2",
12
+ lg: "rt:size-10 rt:text-b2"
13
+ };
14
+ const SHAPE_CLASSES = {
15
+ round: "rt:rounded-3xl",
16
+ square: "rt:rounded-md"
17
+ };
18
+ /** A picture or the initials of a person or a store: round for people, square for stores. */
19
+ function Avatar$1({ name, src, shape = "round", size = "default", ref }) {
20
+ const radius = SHAPE_CLASSES[shape];
21
+ return /* @__PURE__ */ jsxs(Avatar.Root, {
22
+ ref,
23
+ role: "img",
24
+ "aria-label": name,
25
+ "data-shape": shape,
26
+ "data-size": size,
27
+ className: cn("rt:relative rt:inline-flex rt:shrink-0 rt:overflow-hidden rt:select-none", SIZE_CLASSES[size], radius),
28
+ children: [src !== void 0 && /* @__PURE__ */ jsx(Avatar.Image, {
29
+ src,
30
+ alt: "",
31
+ className: "rt:aspect-square rt:size-full rt:object-cover"
32
+ }), /* @__PURE__ */ jsx(Avatar.Fallback, {
33
+ className: cn("rt:flex rt:size-full rt:items-center rt:justify-center rt:bg-muted rt:text-foreground-subdued", radius),
34
+ children: getInitials(name)
35
+ })]
36
+ });
37
+ }
38
+ export { Avatar$1 as Avatar, getInitials };
@@ -0,0 +1,2 @@
1
+ import { Avatar, AvatarProps, AvatarShape, AvatarSize, getInitials } from "./Avatar.js";
2
+ export { Avatar, type AvatarProps, type AvatarShape, type AvatarSize, getInitials };
@@ -0,0 +1 @@
1
+ export { Avatar, getInitials } from "./Avatar.js";
@@ -0,0 +1,37 @@
1
+ import { JSX, Ref } from "react";
2
+ import { Button } from "@base-ui/react/button";
3
+ /**
4
+ * How a button looks. main is the filled accent action, one per view. secondary is a ring on a transparent fill. ghost is
5
+ * text only with a fill on hover, link is accent text with an underline on hover. destructive is for actions that delete
6
+ * or remove, and needs a confirm step after it.
7
+ */
8
+ export type ButtonVariant = 'main' | 'secondary' | 'ghost' | 'link' | 'destructive';
9
+ interface ButtonBaseProps extends Omit<Button.Props, 'focusableWhenDisabled' | 'className' | 'style' | 'render' | 'children' | 'aria-label'> {
10
+ /** The look of the button. Defaults to main. */
11
+ variant?: ButtonVariant;
12
+ /** Gives the button back to the caller's ref. */
13
+ ref?: Ref<HTMLButtonElement>;
14
+ }
15
+ interface LabelledButtonProps extends ButtonBaseProps {
16
+ /** Draws a 28px square for one icon. Needs aria-label, because there is no text to name the button. */
17
+ iconOnly?: false;
18
+ /** The label, optionally with an Icon beside it. */
19
+ children?: React.ReactNode;
20
+ }
21
+ interface IconButtonProps extends ButtonBaseProps {
22
+ /** Draws a 28px square for one icon. Needs aria-label, because there is no text to name the button. */
23
+ iconOnly: true;
24
+ /** The accessible name of an icon-only button. */
25
+ 'aria-label': string;
26
+ /** One Icon. */
27
+ children: React.ReactNode;
28
+ }
29
+ /** Props of Button: a labelled button, or an icon-only one that has to carry an aria-label. */
30
+ export type ButtonProps = LabelledButtonProps | IconButtonProps;
31
+ /**
32
+ * The design system's 28px button in five looks: main, secondary, ghost, link and destructive. Hover and pressed change
33
+ * the fill only, disabled is 50% opacity and the colours fade in 120ms. Put an Icon beside the label, or use iconOnly with
34
+ * an aria-label. It has no size prop: 28px is the only height.
35
+ */
36
+ declare function Button$1({ variant, iconOnly, type, ...props }: ButtonProps): JSX.Element;
37
+ export { Button$1 as Button };
@@ -0,0 +1,41 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Button } from "@base-ui/react/button";
4
+ import { cva } from "class-variance-authority";
5
+ // src/components/button/Button.tsx
6
+ const buttonVariants = cva("rt:inline-flex rt:h-7 rt:shrink-0 rt:items-center rt:justify-center rt:rounded-md rt:border-0 rt:text-btn rt:whitespace-nowrap rt:select-none rt:cursor-pointer rt:transition-colors rt:focus-visible:focus-ring rt:disabled:pointer-events-none rt:disabled:opacity-50 rt:data-disabled:pointer-events-none rt:data-disabled:opacity-50", {
7
+ variants: {
8
+ variant: {
9
+ main: "rt:gap-1.5 rt:bg-primary rt:text-primary-foreground rt:hover:bg-primary-hover rt:active:bg-primary-hover",
10
+ secondary: "rt:gap-1 rt:bg-secondary rt:text-secondary-foreground rt:shadow-ring-strong rt:forced-outline rt:hover:bg-primary-tint rt:active:bg-primary-tint",
11
+ ghost: "rt:gap-1 rt:bg-transparent rt:text-secondary-foreground rt:hover:bg-muted rt:active:bg-muted",
12
+ link: "rt:gap-1 rt:bg-transparent rt:text-primary rt:hover:underline rt:active:underline",
13
+ destructive: "rt:gap-1 rt:bg-destructive-fill rt:text-destructive-foreground rt:shadow-ring-destructive rt:forced-outline rt:hover:bg-destructive-hover rt:active:bg-destructive-hover"
14
+ },
15
+ iconOnly: {
16
+ false: "rt:px-2 rt:py-1",
17
+ true: "rt:w-7 rt:p-0"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "main",
22
+ iconOnly: false
23
+ }
24
+ });
25
+ /**
26
+ * The design system's 28px button in five looks: main, secondary, ghost, link and destructive. Hover and pressed change
27
+ * the fill only, disabled is 50% opacity and the colours fade in 120ms. Put an Icon beside the label, or use iconOnly with
28
+ * an aria-label. It has no size prop: 28px is the only height.
29
+ */
30
+ function Button$1({ variant = "main", iconOnly = false, type = "button", ...props }) {
31
+ return /* @__PURE__ */ jsx(Button, {
32
+ "data-slot": "button",
33
+ type,
34
+ className: cn(buttonVariants({
35
+ variant,
36
+ iconOnly
37
+ })),
38
+ ...props
39
+ });
40
+ }
41
+ export { Button$1 as Button };
@@ -0,0 +1,2 @@
1
+ import { Button, ButtonProps, ButtonVariant } from "./Button.js";
2
+ export { Button, type ButtonProps, type ButtonVariant };
@@ -0,0 +1 @@
1
+ export { Button } from "./Button.js";
@@ -0,0 +1,20 @@
1
+ import { JSX } from "react";
2
+ import { DayPickerProps } from "react-day-picker";
3
+ /** Omit for each member of a union, so the selection modes of DayPicker stay a discriminated union. */
4
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
5
+ /**
6
+ * Props of Calendar: DayPicker's props (mode, selected, onSelect, defaultMonth, month, today, disabled, startMonth,
7
+ * endMonth, numberOfMonths, showOutsideDays, locale, labels and the rest), without the ones that restyle it, replace its
8
+ * parts, change how a date is written or animate it: the calendar is drawn by the design system, dates are written by
9
+ * the format module and motion is a colour fade only.
10
+ */
11
+ export type CalendarProps = DistributiveOmit<DayPickerProps, 'className' | 'style' | 'classNames' | 'styles' | 'modifiersClassNames' | 'modifiersStyles' | 'components' | 'formatters' | 'captionLayout' | 'animate' | 'showWeekNumber'>;
12
+ /**
13
+ * A month grid to pick a day or a range of days, drawn by the design system: 28px days with a 6px radius, today in the
14
+ * accent ink, the selected day filled with the accent, a range as accent ends on a tinted band, disabled days at 50% and
15
+ * the days of the months around it in the muted ink. Every day is named in the format module's date order (28/10/2026).
16
+ * Arrow keys move between days and the previous and next buttons between months. It has no fill of its own, so it sits
17
+ * in a popover or a container as drawn.
18
+ */
19
+ export declare function Calendar({ showOutsideDays, labels, ...props }: CalendarProps): JSX.Element;
20
+ export {};
@@ -0,0 +1,119 @@
1
+ import { Icon } from "../icon/Icon.js";
2
+ import { Button } from "../button/Button.js";
3
+ import { FORMAT, formatDate } from "../../lib/format.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { useEffect, useRef } from "react";
6
+ import { cva } from "class-variance-authority";
7
+ import { DayPicker } from "react-day-picker";
8
+ // src/components/calendar/Calendar.tsx
9
+ const dayButtonVariants = cva("rt:flex rt:size-7 rt:items-center rt:justify-center rt:border-0 rt:p-0 rt:select-none rt:cursor-pointer rt:transition-colors rt:focus-visible:focus-ring rt:disabled:pointer-events-none rt:disabled:cursor-not-allowed rt:disabled:opacity-50", {
10
+ variants: { look: {
11
+ plain: "rt:rounded-md rt:bg-transparent rt:text-btn rt:text-foreground rt:hover:bg-muted rt:active:bg-muted",
12
+ today: "rt:rounded-md rt:bg-transparent rt:text-c3 rt:text-primary rt:hover:bg-muted rt:active:bg-muted",
13
+ outside: "rt:rounded-md rt:bg-transparent rt:text-btn rt:text-muted-foreground rt:hover:bg-muted rt:active:bg-muted",
14
+ selected: "rt:rounded-md rt:bg-primary rt:text-btn rt:text-primary-foreground rt:hover:bg-primary-hover rt:active:bg-primary-hover",
15
+ "range-middle": "rt:rounded-none rt:group-first:rounded-l-md rt:group-last:rounded-r-md rt:bg-primary-tint rt:text-btn rt:text-foreground"
16
+ } },
17
+ defaultVariants: { look: "plain" }
18
+ });
19
+ /** The look of a day from DayPicker's modifiers: a selection wins over outside, and outside over today. */
20
+ function dayLook(modifiers) {
21
+ if (modifiers.range_middle) return "range-middle";
22
+ if (modifiers.selected) return "selected";
23
+ if (modifiers.outside) return "outside";
24
+ if (modifiers.today) return "today";
25
+ return "plain";
26
+ }
27
+ /**
28
+ * The number in a day's button, written as the date pattern writes the day (two digits for DD), so the visible text is a
29
+ * word of the button's name (WCAG 2.5.3): 03 in 03/10/2026.
30
+ */
31
+ function formatDay(date) {
32
+ const day = String(date.getDate());
33
+ return FORMAT.datePattern.includes("DD") ? day.padStart(2, "0") : day;
34
+ }
35
+ /** A day as an accessible name, in the format module's date order: "Today, 28/10/2026, selected". */
36
+ function labelDay(date, modifiers) {
37
+ return `${modifiers?.today ? "Today, " : ""}${formatDate(date)}${modifiers?.selected ? ", selected" : ""}`;
38
+ }
39
+ /**
40
+ * The button of one day. DayPicker moves focus between days, so the button takes focus when its day is focused. Its look
41
+ * comes after DayPicker's props, so it replaces DayPicker's class name.
42
+ */
43
+ function CalendarDayButton({ day, modifiers, ...props }) {
44
+ const ref = useRef(null);
45
+ useEffect(() => {
46
+ if (modifiers.focused) ref.current?.focus();
47
+ }, [modifiers.focused]);
48
+ return /* @__PURE__ */ jsx("button", {
49
+ ref,
50
+ ...props,
51
+ "data-day": formatDate(day.date),
52
+ className: dayButtonVariants({ look: dayLook(modifiers) })
53
+ });
54
+ }
55
+ /** A month navigation button: the ghost Button with a chevron, disabled at the first or last allowed month. */
56
+ function navButton(icon) {
57
+ return function CalendarNavButton({ onClick, tabIndex, "aria-label": label, "aria-disabled": ariaDisabled }) {
58
+ return /* @__PURE__ */ jsx(Button, {
59
+ variant: "ghost",
60
+ iconOnly: true,
61
+ "aria-label": label ?? "",
62
+ disabled: ariaDisabled === true || ariaDisabled === "true",
63
+ tabIndex,
64
+ onClick,
65
+ children: /* @__PURE__ */ jsx(Icon, {
66
+ name: icon,
67
+ size: 12
68
+ })
69
+ });
70
+ };
71
+ }
72
+ const PreviousMonthButton = navButton("chevron-left");
73
+ const NextMonthButton = navButton("chevron-right");
74
+ const CLASS_NAMES = {
75
+ root: "rt:relative rt:w-fit rt:p-2 rt:text-foreground",
76
+ months: "rt:relative rt:flex rt:flex-col rt:gap-4 rt:md:flex-row",
77
+ month: "rt:flex rt:w-full rt:flex-col rt:gap-2",
78
+ nav: "rt:absolute rt:inset-x-0 rt:top-0 rt:z-10 rt:flex rt:w-full rt:items-center rt:justify-between rt:gap-1",
79
+ month_caption: "rt:flex rt:h-7 rt:w-full rt:items-center rt:justify-center rt:px-7",
80
+ caption_label: "rt:text-c3 rt:text-foreground rt:select-none",
81
+ month_grid: "rt:w-full rt:border-collapse",
82
+ weekdays: "rt:flex",
83
+ weekday: "rt:flex rt:w-7 rt:items-center rt:justify-center rt:text-c1 rt:text-muted-foreground rt:select-none",
84
+ week: "rt:mt-1 rt:flex rt:w-full",
85
+ day: "rt:relative rt:size-7 rt:p-0 rt:text-center rt:select-none rt:first:rounded-l-md rt:last:rounded-r-md rt:group",
86
+ range_start: "rt:rounded-l-md rt:bg-primary-tint",
87
+ range_end: "rt:rounded-r-md rt:bg-primary-tint",
88
+ hidden: "rt:invisible",
89
+ footer: "rt:pt-2 rt:text-c1 rt:text-muted-foreground"
90
+ };
91
+ /**
92
+ * A month grid to pick a day or a range of days, drawn by the design system: 28px days with a 6px radius, today in the
93
+ * accent ink, the selected day filled with the accent, a range as accent ends on a tinted band, disabled days at 50% and
94
+ * the days of the months around it in the muted ink. Every day is named in the format module's date order (28/10/2026).
95
+ * Arrow keys move between days and the previous and next buttons between months. It has no fill of its own, so it sits
96
+ * in a popover or a container as drawn.
97
+ */
98
+ function Calendar({ showOutsideDays = true, labels, ...props }) {
99
+ return /* @__PURE__ */ jsx(DayPicker, {
100
+ "data-slot": "calendar",
101
+ showOutsideDays,
102
+ classNames: CLASS_NAMES,
103
+ components: {
104
+ DayButton: CalendarDayButton,
105
+ PreviousMonthButton,
106
+ NextMonthButton
107
+ },
108
+ formatters: { formatDay },
109
+ labels: {
110
+ labelDayButton: labelDay,
111
+ labelGridcell: labelDay,
112
+ labelPrevious: () => "Previous month",
113
+ labelNext: () => "Next month",
114
+ ...labels
115
+ },
116
+ ...props
117
+ });
118
+ }
119
+ export { Calendar };
@@ -0,0 +1,2 @@
1
+ import { Calendar, CalendarProps } from "./Calendar.js";
2
+ export { Calendar, type CalendarProps };
@@ -0,0 +1 @@
1
+ export { Calendar } from "./Calendar.js";
@@ -0,0 +1,33 @@
1
+ import { HTMLAttributes, JSX } from "react";
2
+ type DivProps = Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>;
3
+ /** The props of Card: the HTML attributes of its div, except className and style. */
4
+ export type CardProps = DivProps;
5
+ /** The props of CardHeader: the HTML attributes of its div, except className and style. */
6
+ export type CardHeaderProps = DivProps;
7
+ /** The props of CardTitle: the HTML attributes of its heading, except className and style, with the heading level. */
8
+ export type CardTitleProps = Omit<HTMLAttributes<HTMLHeadingElement>, 'className' | 'style'> & {
9
+ /** The heading element. Defaults to h3. */
10
+ as?: 'h2' | 'h3' | 'h4' | 'div';
11
+ };
12
+ /** The props of CardDescription: the HTML attributes of its paragraph, except className and style. */
13
+ export type CardDescriptionProps = Omit<HTMLAttributes<HTMLParagraphElement>, 'className' | 'style'>;
14
+ /** The props of CardContent: the HTML attributes of its div, except className and style. */
15
+ export type CardContentProps = DivProps;
16
+ /** The props of CardFooter: the HTML attributes of its div, except className and style. */
17
+ export type CardFooterProps = DivProps;
18
+ /**
19
+ * A container for a panel of content: a 1px hairline border on white, no shadow and 24px of padding. The design system
20
+ * has no cards, so this is only the hairline container.
21
+ */
22
+ export declare function Card(props: CardProps): JSX.Element;
23
+ /** The top of a card: its title and description, stacked. */
24
+ export declare function CardHeader(props: CardHeaderProps): JSX.Element;
25
+ /** The title of a card, set in the B4 text style. */
26
+ export declare function CardTitle({ as: Tag, ...rest }: CardTitleProps): JSX.Element;
27
+ /** A line under the title that says what the card holds. */
28
+ export declare function CardDescription(props: CardDescriptionProps): JSX.Element;
29
+ /** The body of a card. */
30
+ export declare function CardContent(props: CardContentProps): JSX.Element;
31
+ /** The foot of a card, a row for its actions. */
32
+ export declare function CardFooter(props: CardFooterProps): JSX.Element;
33
+ export {};