@manakind/ui-core 0.18.0 → 0.20.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 (159) hide show
  1. package/README.md +30 -2
  2. package/dist/avatar/avatar.css +42 -0
  3. package/dist/avatar/avatar.css.d.ts +2 -0
  4. package/dist/avatar/avatar.d.ts +55 -0
  5. package/dist/avatar/avatar.d.ts.map +1 -0
  6. package/dist/avatar/avatar.js +41 -0
  7. package/dist/avatar/avatar.js.map +1 -0
  8. package/dist/avatar/index.d.ts +3 -0
  9. package/dist/avatar/index.d.ts.map +1 -0
  10. package/dist/avatar/index.js +2 -0
  11. package/dist/avatar/index.js.map +1 -0
  12. package/dist/centered-layout/centered-layout.css +36 -0
  13. package/dist/centered-layout/centered-layout.css.d.ts +2 -0
  14. package/dist/centered-layout/centered-layout.d.ts +18 -0
  15. package/dist/centered-layout/centered-layout.d.ts.map +1 -0
  16. package/dist/centered-layout/centered-layout.js +16 -0
  17. package/dist/centered-layout/centered-layout.js.map +1 -0
  18. package/dist/centered-layout/index.d.ts +3 -0
  19. package/dist/centered-layout/index.d.ts.map +1 -0
  20. package/dist/centered-layout/index.js +2 -0
  21. package/dist/centered-layout/index.js.map +1 -0
  22. package/dist/divider/divider.css +18 -0
  23. package/dist/divider/divider.css.d.ts +2 -0
  24. package/dist/divider/divider.d.ts +26 -0
  25. package/dist/divider/divider.d.ts.map +1 -0
  26. package/dist/divider/divider.js +15 -0
  27. package/dist/divider/divider.js.map +1 -0
  28. package/dist/divider/index.d.ts +3 -0
  29. package/dist/divider/index.d.ts.map +1 -0
  30. package/dist/divider/index.js +2 -0
  31. package/dist/divider/index.js.map +1 -0
  32. package/dist/empty-state/empty-state.css +37 -0
  33. package/dist/empty-state/empty-state.css.d.ts +2 -0
  34. package/dist/empty-state/empty-state.d.ts +26 -0
  35. package/dist/empty-state/empty-state.d.ts.map +1 -0
  36. package/dist/empty-state/empty-state.js +16 -0
  37. package/dist/empty-state/empty-state.js.map +1 -0
  38. package/dist/empty-state/index.d.ts +3 -0
  39. package/dist/empty-state/index.d.ts.map +1 -0
  40. package/dist/empty-state/index.js +2 -0
  41. package/dist/empty-state/index.js.map +1 -0
  42. package/dist/form-layout/form-layout.css +18 -0
  43. package/dist/form-layout/form-layout.css.d.ts +2 -0
  44. package/dist/form-layout/form-layout.d.ts +21 -0
  45. package/dist/form-layout/form-layout.d.ts.map +1 -0
  46. package/dist/form-layout/form-layout.js +24 -0
  47. package/dist/form-layout/form-layout.js.map +1 -0
  48. package/dist/form-layout/index.d.ts +3 -0
  49. package/dist/form-layout/index.d.ts.map +1 -0
  50. package/dist/form-layout/index.js +2 -0
  51. package/dist/form-layout/index.js.map +1 -0
  52. package/dist/index.d.ts +14 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +14 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/layout/index.d.ts +3 -0
  57. package/dist/layout/index.d.ts.map +1 -0
  58. package/dist/layout/index.js +2 -0
  59. package/dist/layout/index.js.map +1 -0
  60. package/dist/layout/layout.css +185 -0
  61. package/dist/layout/layout.css.d.ts +2 -0
  62. package/dist/layout/layout.d.ts +105 -0
  63. package/dist/layout/layout.d.ts.map +1 -0
  64. package/dist/layout/layout.js +77 -0
  65. package/dist/layout/layout.js.map +1 -0
  66. package/dist/menu/action-menu.d.ts +120 -0
  67. package/dist/menu/action-menu.d.ts.map +1 -0
  68. package/dist/menu/action-menu.js +80 -0
  69. package/dist/menu/action-menu.js.map +1 -0
  70. package/dist/menu/index.d.ts +2 -0
  71. package/dist/menu/index.d.ts.map +1 -1
  72. package/dist/menu/index.js +1 -0
  73. package/dist/menu/index.js.map +1 -1
  74. package/dist/menu/menu.css +62 -8
  75. package/dist/menu/menu.d.ts +1 -1
  76. package/dist/menu/menu.d.ts.map +1 -1
  77. package/dist/menu/menu.js +1 -1
  78. package/dist/menu/menu.js.map +1 -1
  79. package/dist/page-layout/index.d.ts +3 -0
  80. package/dist/page-layout/index.d.ts.map +1 -0
  81. package/dist/page-layout/index.js +2 -0
  82. package/dist/page-layout/index.js.map +1 -0
  83. package/dist/page-layout/page-layout.css +81 -0
  84. package/dist/page-layout/page-layout.css.d.ts +2 -0
  85. package/dist/page-layout/page-layout.d.ts +43 -0
  86. package/dist/page-layout/page-layout.d.ts.map +1 -0
  87. package/dist/page-layout/page-layout.js +42 -0
  88. package/dist/page-layout/page-layout.js.map +1 -0
  89. package/dist/section/index.d.ts +3 -0
  90. package/dist/section/index.d.ts.map +1 -0
  91. package/dist/section/index.js +2 -0
  92. package/dist/section/index.js.map +1 -0
  93. package/dist/section/section.css +31 -0
  94. package/dist/section/section.css.d.ts +2 -0
  95. package/dist/section/section.d.ts +31 -0
  96. package/dist/section/section.d.ts.map +1 -0
  97. package/dist/section/section.js +19 -0
  98. package/dist/section/section.js.map +1 -0
  99. package/dist/show/index.d.ts +3 -0
  100. package/dist/show/index.d.ts.map +1 -0
  101. package/dist/show/index.js +2 -0
  102. package/dist/show/index.js.map +1 -0
  103. package/dist/show/show.css +67 -0
  104. package/dist/show/show.css.d.ts +2 -0
  105. package/dist/show/show.d.ts +36 -0
  106. package/dist/show/show.d.ts.map +1 -0
  107. package/dist/show/show.js +23 -0
  108. package/dist/show/show.js.map +1 -0
  109. package/dist/skeleton/index.d.ts +3 -0
  110. package/dist/skeleton/index.d.ts.map +1 -0
  111. package/dist/skeleton/index.js +2 -0
  112. package/dist/skeleton/index.js.map +1 -0
  113. package/dist/skeleton/skeleton.css +36 -0
  114. package/dist/skeleton/skeleton.css.d.ts +2 -0
  115. package/dist/skeleton/skeleton.d.ts +26 -0
  116. package/dist/skeleton/skeleton.d.ts.map +1 -0
  117. package/dist/skeleton/skeleton.js +21 -0
  118. package/dist/skeleton/skeleton.js.map +1 -0
  119. package/dist/split-layout/index.d.ts +3 -0
  120. package/dist/split-layout/index.d.ts.map +1 -0
  121. package/dist/split-layout/index.js +2 -0
  122. package/dist/split-layout/index.js.map +1 -0
  123. package/dist/split-layout/split-layout.css +71 -0
  124. package/dist/split-layout/split-layout.css.d.ts +2 -0
  125. package/dist/split-layout/split-layout.d.ts +32 -0
  126. package/dist/split-layout/split-layout.d.ts.map +1 -0
  127. package/dist/split-layout/split-layout.js +25 -0
  128. package/dist/split-layout/split-layout.js.map +1 -0
  129. package/dist/text/index.d.ts +3 -0
  130. package/dist/text/index.d.ts.map +1 -0
  131. package/dist/text/index.js +2 -0
  132. package/dist/text/index.js.map +1 -0
  133. package/dist/text/text.css +128 -0
  134. package/dist/text/text.css.d.ts +2 -0
  135. package/dist/text/text.d.ts +78 -0
  136. package/dist/text/text.d.ts.map +1 -0
  137. package/dist/text/text.js +56 -0
  138. package/dist/text/text.js.map +1 -0
  139. package/dist/visually-hidden/index.d.ts +3 -0
  140. package/dist/visually-hidden/index.d.ts.map +1 -0
  141. package/dist/visually-hidden/index.js +2 -0
  142. package/dist/visually-hidden/index.js.map +1 -0
  143. package/dist/visually-hidden/visually-hidden.css +19 -0
  144. package/dist/visually-hidden/visually-hidden.css.d.ts +2 -0
  145. package/dist/visually-hidden/visually-hidden.d.ts +15 -0
  146. package/dist/visually-hidden/visually-hidden.d.ts.map +1 -0
  147. package/dist/visually-hidden/visually-hidden.js +17 -0
  148. package/dist/visually-hidden/visually-hidden.js.map +1 -0
  149. package/dist/wizard-layout/index.d.ts +3 -0
  150. package/dist/wizard-layout/index.d.ts.map +1 -0
  151. package/dist/wizard-layout/index.js +2 -0
  152. package/dist/wizard-layout/index.js.map +1 -0
  153. package/dist/wizard-layout/wizard-layout.css +52 -0
  154. package/dist/wizard-layout/wizard-layout.css.d.ts +2 -0
  155. package/dist/wizard-layout/wizard-layout.d.ts +50 -0
  156. package/dist/wizard-layout/wizard-layout.d.ts.map +1 -0
  157. package/dist/wizard-layout/wizard-layout.js +38 -0
  158. package/dist/wizard-layout/wizard-layout.js.map +1 -0
  159. package/package.json +114 -2
package/README.md CHANGED
@@ -58,6 +58,7 @@ separately, so an app can load only what it renders.
58
58
  |---|---|
59
59
  | `@manakind/ui-core` | Everything below, plus every prop type, the `cx` helper, and the built-in fallback glyphs (`FallbackChevronLeft`, `FallbackChevronRight`, `FallbackCheck`, `FallbackCross`) for compositions that want the same defaults |
60
60
  | `@manakind/ui-core/alert` | `Alert` |
61
+ | `@manakind/ui-core/avatar` | `Avatar` + `initialsOf` |
61
62
  | `@manakind/ui-core/badge` | `Badge` |
62
63
  | `@manakind/ui-core/button` | `Button` + `IconButton` |
63
64
  | `@manakind/ui-core/calendar` | `Calendar` |
@@ -65,7 +66,7 @@ separately, so an app can load only what it renders.
65
66
  | `@manakind/ui-core/dialog` | `Dialog` + `DialogClose` |
66
67
  | `@manakind/ui-core/icon` | `Icon` |
67
68
  | `@manakind/ui-core/illustration` | `Illustration` + `illustrationPaint` |
68
- | `@manakind/ui-core/menu` | `Menu`, `MenuTrigger` |
69
+ | `@manakind/ui-core/menu` | `Menu`, `MenuTrigger`, `ActionMenu` |
69
70
  | `@manakind/ui-core/popover` | `Popover` |
70
71
  | `@manakind/ui-core/checkbox` | `Checkbox` |
71
72
  | `@manakind/ui-core/combobox` | `Combobox` |
@@ -77,7 +78,21 @@ separately, so an app can load only what it renders.
77
78
  | `@manakind/ui-core/switch` | `Switch` |
78
79
  | `@manakind/ui-core/field` | `Field`, `Input`, `Textarea`, `useFieldControl` |
79
80
  | `@manakind/ui-core/tabs` | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` |
81
+ | `@manakind/ui-core/layout` | `Stack`, `Inline`, `Grid`, `Container` and the layout step types |
82
+ | `@manakind/ui-core/text` | `Text` + `Heading` |
83
+ | `@manakind/ui-core/divider` | `Divider` |
84
+ | `@manakind/ui-core/show` | `Show` |
85
+ | `@manakind/ui-core/visually-hidden` | `VisuallyHidden` |
86
+ | `@manakind/ui-core/skeleton` | `Skeleton` |
87
+ | `@manakind/ui-core/empty-state` | `EmptyState` |
88
+ | `@manakind/ui-core/page-layout` | `PageLayout`, `PageHeader`, `PageTitle`, `PageDescription`, `PageActions` |
89
+ | `@manakind/ui-core/section` | `Section` |
90
+ | `@manakind/ui-core/split-layout` | `SplitLayout`, `SplitMain`, `SplitAside` |
91
+ | `@manakind/ui-core/form-layout` | `FormLayout`, `FormActions` |
92
+ | `@manakind/ui-core/wizard-layout` | `WizardLayout`, `WizardHeader`, `WizardContent`, `WizardFooter` |
93
+ | `@manakind/ui-core/centered-layout` | `CenteredLayout` |
80
94
  | `@manakind/ui-core/css/alert` | Alert structural CSS; its icon also needs `css/icon` |
95
+ | `@manakind/ui-core/css/avatar` | Avatar structural CSS; its fallback glyph also needs `css/icon` |
81
96
  | `@manakind/ui-core/css/badge` | Badge structural CSS |
82
97
  | `@manakind/ui-core/css/button` | Button + IconButton structural CSS |
83
98
  | `@manakind/ui-core/css/calendar` | Calendar structural CSS; its paging buttons also need `css/button` and `css/icon` |
@@ -85,7 +100,7 @@ separately, so an app can load only what it renders.
85
100
  | `@manakind/ui-core/css/dialog` | Dialog structural CSS; its close button also needs `css/button` and `css/icon` |
86
101
  | `@manakind/ui-core/css/icon` | Icon structural CSS |
87
102
  | `@manakind/ui-core/css/illustration` | Illustration structural CSS, including the paint roles |
88
- | `@manakind/ui-core/css/menu` | Menu structural CSS |
103
+ | `@manakind/ui-core/css/menu` | Menu and ActionMenu structural CSS; an ActionMenu's glyphs also need `css/icon` |
89
104
  | `@manakind/ui-core/css/popover` | Popover structural CSS |
90
105
  | `@manakind/ui-core/css/checkbox` | Checkbox structural CSS |
91
106
  | `@manakind/ui-core/css/combobox` | Combobox structural CSS |
@@ -97,6 +112,19 @@ separately, so an app can load only what it renders.
97
112
  | `@manakind/ui-core/css/switch` | Switch structural CSS |
98
113
  | `@manakind/ui-core/css/field` | Field, Input and Textarea structural CSS |
99
114
  | `@manakind/ui-core/css/tabs` | Tabs structural CSS |
115
+ | `@manakind/ui-core/css/layout` | Stack, Inline, Grid and Container structural CSS |
116
+ | `@manakind/ui-core/css/text` | Text and Heading structural CSS |
117
+ | `@manakind/ui-core/css/divider` | Divider structural CSS |
118
+ | `@manakind/ui-core/css/show` | Show structural CSS |
119
+ | `@manakind/ui-core/css/visually-hidden` | VisuallyHidden structural CSS |
120
+ | `@manakind/ui-core/css/skeleton` | Skeleton structural CSS |
121
+ | `@manakind/ui-core/css/empty-state` | EmptyState structural CSS; its glyph also needs `css/icon` |
122
+ | `@manakind/ui-core/css/page-layout` | PageLayout structural CSS; its title and description also need `css/text` |
123
+ | `@manakind/ui-core/css/section` | Section structural CSS; its title and description also need `css/text` |
124
+ | `@manakind/ui-core/css/split-layout` | SplitLayout structural CSS |
125
+ | `@manakind/ui-core/css/form-layout` | FormLayout structural CSS |
126
+ | `@manakind/ui-core/css/wizard-layout` | WizardLayout structural CSS; its header also needs `css/progress` and `css/text` |
127
+ | `@manakind/ui-core/css/centered-layout` | CenteredLayout structural CSS |
100
128
 
101
129
  Structural CSS is only half of what a component needs — it consumes `--ds-*` custom
102
130
  properties that a product's theme supplies. See
@@ -0,0 +1,42 @@
1
+ @layer components {
2
+ .ds-avatar {
3
+ /*
4
+ * Explicit, as Badge's is: the size keys measure the whole disc, border
5
+ * included, or the border stacks on top and the disc outgrows its token.
6
+ */
7
+ box-sizing: border-box;
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ /*
12
+ * A disc beside a name in a flex row. It never gives: a long name wraps
13
+ * or truncates on its own terms, and the disc keeps its diameter.
14
+ */
15
+ flex-shrink: 0;
16
+ inline-size: var(--ds-avatar-size-md);
17
+ block-size: var(--ds-avatar-size-md);
18
+ border: 1px solid var(--ds-avatar-border);
19
+ border-radius: var(--ds-avatar-radius);
20
+ background-color: var(--ds-avatar-bg);
21
+ color: var(--ds-avatar-text);
22
+ font-size: var(--ds-avatar-font-size-md);
23
+ font-weight: var(--ds-avatar-font-weight);
24
+ line-height: inherit;
25
+ /* Two letters, never a word: nothing here can wrap, so the box clips instead. */
26
+ overflow: hidden;
27
+ overflow-wrap: anywhere;
28
+ user-select: none;
29
+
30
+ &.ds-avatar--sm {
31
+ inline-size: var(--ds-avatar-size-sm);
32
+ block-size: var(--ds-avatar-size-sm);
33
+ font-size: var(--ds-avatar-font-size-sm);
34
+ }
35
+
36
+ &.ds-avatar--lg {
37
+ inline-size: var(--ds-avatar-size-lg);
38
+ block-size: var(--ds-avatar-size-lg);
39
+ font-size: var(--ds-avatar-font-size-lg);
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,55 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { type IconSource } from '../icon/icon';
3
+ import './avatar.css';
4
+ export type AvatarSize = 'sm' | 'md' | 'lg';
5
+ /**
6
+ * An avatar beside the name it stands for is decorative; one standing alone,
7
+ * such as the content of a menu trigger whose button has no name of its
8
+ * own, needs a label. The pairing is a compile error rather than a
9
+ * convention, mirroring `IconProps`.
10
+ */
11
+ type AvatarA11y = {
12
+ label: string;
13
+ decorative?: never;
14
+ } | {
15
+ decorative: true;
16
+ label?: never;
17
+ };
18
+ export type AvatarProps = Omit<ComponentProps<'span'>, 'children' | 'aria-label' | 'aria-hidden' | 'role'> & AvatarA11y & {
19
+ /**
20
+ * The person's name. The avatar shows its initials: the first letter of
21
+ * the first and last words, or the first two letters of a single word.
22
+ */
23
+ name: string;
24
+ /**
25
+ * Glyph shown when the name yields no initials, such as a person glyph for
26
+ * an account without a name. Decorative; without it the avatar is a bare
27
+ * disc.
28
+ */
29
+ icon?: IconSource;
30
+ /** `sm` fits a toolbar, `md` a row, `lg` a profile heading. */
31
+ size?: AvatarSize;
32
+ };
33
+ /**
34
+ * The letters an `Avatar` shows for a name: the first letter of the first
35
+ * and last words ("Pål Taule Brentebråten" → "PB"), the first two letters of
36
+ * a single word ("Manuia" → "MA"), nothing for an empty name. Upper-cased
37
+ * with the runtime's locale rules, so an initial that changes case by
38
+ * length comes out right.
39
+ */
40
+ export declare function initialsOf(name: string): string;
41
+ /**
42
+ * A person, as initials in a disc.
43
+ *
44
+ * Renders a `span`. Labelled, it is `role="img"` named by `label`; decorative,
45
+ * it is hidden from assistive technology and the text beside it carries the
46
+ * name. The look comes from the `--ds-avatar-*` keys.
47
+ *
48
+ * ```tsx
49
+ * <Avatar name={user.name} icon={PersonGlyph} decorative />
50
+ * <span>{user.name}</span>
51
+ * ```
52
+ */
53
+ export declare function Avatar({ name, icon, size, label, decorative, className, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
54
+ export {};
55
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;GAKG;AACH,KAAK,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,cAAc,CAAC,MAAM,CAAC,EACtB,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,MAAM,CACnD,GACC,UAAU,GAAG;IACX;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEJ;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,IAAI,EACJ,IAAW,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,2CAUb"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cx } from '../cx';
3
+ import { Icon } from '../icon/icon';
4
+ import './avatar.css';
5
+ /**
6
+ * The letters an `Avatar` shows for a name: the first letter of the first
7
+ * and last words ("Pål Taule Brentebråten" → "PB"), the first two letters of
8
+ * a single word ("Manuia" → "MA"), nothing for an empty name. Upper-cased
9
+ * with the runtime's locale rules, so an initial that changes case by
10
+ * length comes out right.
11
+ */
12
+ export function initialsOf(name) {
13
+ const words = name.trim().split(/\s+/).filter(Boolean);
14
+ const first = words[0];
15
+ if (first === undefined)
16
+ return '';
17
+ const last = words.length > 1 ? words[words.length - 1] : undefined;
18
+ const letters = last === undefined
19
+ ? Array.from(first).slice(0, 2)
20
+ : [Array.from(first)[0], Array.from(last)[0]];
21
+ return letters.join('').toLocaleUpperCase();
22
+ }
23
+ /**
24
+ * A person, as initials in a disc.
25
+ *
26
+ * Renders a `span`. Labelled, it is `role="img"` named by `label`; decorative,
27
+ * it is hidden from assistive technology and the text beside it carries the
28
+ * name. The look comes from the `--ds-avatar-*` keys.
29
+ *
30
+ * ```tsx
31
+ * <Avatar name={user.name} icon={PersonGlyph} decorative />
32
+ * <span>{user.name}</span>
33
+ * ```
34
+ */
35
+ export function Avatar({ name, icon, size = 'md', label, decorative, className, ...props }) {
36
+ const initials = initialsOf(name);
37
+ const fallback = icon ? _jsx(Icon, { source: icon, size: size, decorative: true }) : null;
38
+ const a11y = decorative ? { 'aria-hidden': true } : { role: 'img', 'aria-label': label };
39
+ return (_jsx("span", { className: cx('ds-avatar', `ds-avatar--${size}`, className), ...a11y, ...props, children: initials || fallback }));
40
+ }
41
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/avatar/avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AACrD,OAAO,cAAc,CAAC;AAgCtB;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,OAAO,GACX,IAAI,KAAK,SAAS;QAChB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,OAAO,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC;AAC9C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,IAAI,EACJ,IAAI,EACJ,IAAI,GAAG,IAAI,EACX,KAAK,EACL,UAAU,EACV,SAAS,EACT,GAAG,KAAK,EACI;IACZ,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;IAEzF,OAAO,CACL,eAAM,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,cAAc,IAAI,EAAE,EAAE,SAAS,CAAC,KAAM,IAAI,KAAM,KAAK,YACnF,QAAQ,IAAI,QAAQ,GAChB,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { AvatarProps, AvatarSize } from './avatar';
2
+ export { Avatar, initialsOf } from './avatar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/avatar/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Avatar, initialsOf } from './avatar';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/avatar/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,36 @@
1
+ @layer components {
2
+ /*
3
+ * Grid, not flex: `align-content` centres the children as a group in the
4
+ * viewport's height while `justify-items` centres each across, with no
5
+ * wrapper element between the layout and its children.
6
+ */
7
+ .ds-centered-layout {
8
+ box-sizing: border-box;
9
+ display: grid;
10
+ align-content: center;
11
+ justify-items: center;
12
+ gap: var(--ds-centered-layout-gap);
13
+ min-height: 100dvh;
14
+ padding: var(--ds-centered-layout-padding);
15
+ background-color: var(--ds-centered-layout-bg);
16
+ overflow-wrap: anywhere;
17
+
18
+ & > * {
19
+ box-sizing: border-box;
20
+ width: 100%;
21
+ min-width: 0;
22
+ }
23
+
24
+ &.ds-centered-layout--sm > * {
25
+ max-width: var(--ds-layout-content-sm);
26
+ }
27
+
28
+ &.ds-centered-layout--md > * {
29
+ max-width: var(--ds-layout-content-md);
30
+ }
31
+
32
+ &.ds-centered-layout--lg > * {
33
+ max-width: var(--ds-layout-content-lg);
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import type { ComponentProps } from 'react';
3
+ import './centered-layout.css';
4
+ import type { ContentWidth } from '../layout/layout';
5
+ export interface CenteredLayoutProps extends ComponentProps<typeof ark.div> {
6
+ /** Where the centred column stops growing. Defaults to `md`, a card's width. */
7
+ size?: Exclude<ContentWidth, 'xl'>;
8
+ }
9
+ /**
10
+ * One column centred on the canvas, for the pages that stand outside the
11
+ * app's shell: sign-in, a consent prompt, an error, a loading screen.
12
+ *
13
+ * Fills the viewport's height, paints the canvas colour, and centres its
14
+ * children both ways, each no wider than `size`. There is no inner wrapper,
15
+ * so `asChild` can make the page's `main` the layout itself.
16
+ */
17
+ export declare function CenteredLayout({ size, className, children, ...props }: CenteredLayoutProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=centered-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"centered-layout.d.ts","sourceRoot":"","sources":["../../src/centered-layout/centered-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;IACzE,gFAAgF;IAChF,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,mBAAmB,2CASrB"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ark } from '@ark-ui/react/factory';
3
+ import './centered-layout.css';
4
+ import { cx } from '../cx';
5
+ /**
6
+ * One column centred on the canvas, for the pages that stand outside the
7
+ * app's shell: sign-in, a consent prompt, an error, a loading screen.
8
+ *
9
+ * Fills the viewport's height, paints the canvas colour, and centres its
10
+ * children both ways, each no wider than `size`. There is no inner wrapper,
11
+ * so `asChild` can make the page's `main` the layout itself.
12
+ */
13
+ export function CenteredLayout({ size = 'md', className, children, ...props }) {
14
+ return (_jsx(ark.div, { className: cx('ds-centered-layout', `ds-centered-layout--${size}`, className), ...props, children: children }));
15
+ }
16
+ //# sourceMappingURL=centered-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"centered-layout.js","sourceRoot":"","sources":["../../src/centered-layout/centered-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3B;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACY;IACpB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,IAAI,EAAE,EAAE,SAAS,CAAC,KACzE,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { CenteredLayoutProps } from './centered-layout';
2
+ export { CenteredLayout } from './centered-layout';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/centered-layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { CenteredLayout } from './centered-layout';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/centered-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ @layer components {
2
+ .ds-divider {
3
+ flex-shrink: 0;
4
+ border: none;
5
+ background-color: var(--ds-divider-color);
6
+
7
+ &.ds-divider--horizontal {
8
+ width: 100%;
9
+ height: 1px;
10
+ }
11
+
12
+ &.ds-divider--vertical {
13
+ width: 1px;
14
+ align-self: stretch;
15
+ min-height: 1em;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,26 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import type { ComponentProps } from 'react';
3
+ import './divider.css';
4
+ export type DividerOrientation = 'horizontal' | 'vertical';
5
+ export interface DividerProps extends ComponentProps<typeof ark.div> {
6
+ /**
7
+ * `horizontal` (the default) rules across its container; `vertical` rules
8
+ * between the children of a row and stretches to the row's height.
9
+ */
10
+ orientation?: DividerOrientation;
11
+ /**
12
+ * Hide the rule from assistive technology. A divider that only tidies the
13
+ * eye, between two buttons say, is decorative; one that separates the
14
+ * sections of a document is not and announces as a separator.
15
+ */
16
+ decorative?: boolean;
17
+ }
18
+ /**
19
+ * A hairline between two things.
20
+ *
21
+ * Renders a `div` with `role="separator"`, since an `hr` cannot be vertical.
22
+ * The colour is `--ds-divider-color`; the thickness is one pixel in either
23
+ * orientation.
24
+ */
25
+ export declare function Divider({ orientation, decorative, className, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=divider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../src/divider/divider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,eAAe,CAAC;AAGvB,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE3D,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;IAClE;;;OAGG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,EACtB,WAA0B,EAC1B,UAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,YAAY,2CAUd"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ark } from '@ark-ui/react/factory';
3
+ import './divider.css';
4
+ import { cx } from '../cx';
5
+ /**
6
+ * A hairline between two things.
7
+ *
8
+ * Renders a `div` with `role="separator"`, since an `hr` cannot be vertical.
9
+ * The colour is `--ds-divider-color`; the thickness is one pixel in either
10
+ * orientation.
11
+ */
12
+ export function Divider({ orientation = 'horizontal', decorative = false, className, ...props }) {
13
+ return (_jsx(ark.div, { role: decorative ? 'none' : 'separator', "aria-orientation": decorative || orientation === 'horizontal' ? undefined : orientation, "aria-hidden": decorative || undefined, className: cx('ds-divider', `ds-divider--${orientation}`, className), ...props }));
14
+ }
15
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../src/divider/divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAkB3B;;;;;;GAMG;AACH,MAAM,UAAU,OAAO,CAAC,EACtB,WAAW,GAAG,YAAY,EAC1B,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,GAAG,KAAK,EACK;IACb,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,sBACrB,UAAU,IAAI,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,iBACzE,UAAU,IAAI,SAAS,EACpC,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,eAAe,WAAW,EAAE,EAAE,SAAS,CAAC,KAChE,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { DividerOrientation, DividerProps } from './divider';
2
+ export { Divider } from './divider';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/divider/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Divider } from './divider';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/divider/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,37 @@
1
+ @layer components {
2
+ .ds-empty-state {
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ justify-content: center;
7
+ gap: var(--ds-empty-state-gap);
8
+ padding-block: var(--ds-empty-state-padding-block);
9
+ text-align: center;
10
+ color: var(--ds-empty-state-text);
11
+ overflow-wrap: anywhere;
12
+
13
+ & .ds-empty-state__title {
14
+ margin: 0;
15
+ font-family: inherit;
16
+ font-size: var(--ds-text-size-lg-font-size);
17
+ line-height: var(--ds-text-size-lg-line-height);
18
+ font-weight: var(--ds-text-weight-medium);
19
+ }
20
+
21
+ & .ds-empty-state__description {
22
+ margin: 0;
23
+ max-width: var(--ds-layout-content-sm);
24
+ font-family: inherit;
25
+ font-size: var(--ds-text-size-md-font-size);
26
+ line-height: var(--ds-text-size-md-line-height);
27
+ color: var(--ds-empty-state-text-muted);
28
+ }
29
+
30
+ & .ds-empty-state__actions {
31
+ display: flex;
32
+ flex-wrap: wrap;
33
+ justify-content: center;
34
+ gap: var(--ds-layout-gap);
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,26 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import './empty-state.css';
3
+ import { type IconSource } from '../icon/icon';
4
+ export interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
5
+ /** The one line that says what is missing: "No goals yet". */
6
+ title: ReactNode;
7
+ /** What to do about it, or why it is empty. Muted, under the title. */
8
+ description?: ReactNode;
9
+ /**
10
+ * A glyph above the title, decorative: the title says the same thing. An
11
+ * `IconSource`, since `ui-core` ships no icons of its own.
12
+ */
13
+ icon?: IconSource;
14
+ /** The way out, typically one button, rendered under the text. */
15
+ children?: ReactNode;
16
+ }
17
+ /**
18
+ * The centred column a region shows when it has nothing to list.
19
+ *
20
+ * A title, an optional description and an optional action, centred in a
21
+ * block of inset so the emptiness reads as intended rather than as a failed
22
+ * render. Styled by the `--ds-empty-state-*` keys; the type comes from the
23
+ * text contract.
24
+ */
25
+ export declare function EmptyState({ title, description, icon, className, children, ...props }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAC3E,8DAA8D;IAC9D,KAAK,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CASjB"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './empty-state.css';
3
+ import { cx } from '../cx';
4
+ import { Icon } from '../icon/icon';
5
+ /**
6
+ * The centred column a region shows when it has nothing to list.
7
+ *
8
+ * A title, an optional description and an optional action, centred in a
9
+ * block of inset so the emptiness reads as intended rather than as a failed
10
+ * render. Styled by the `--ds-empty-state-*` keys; the type comes from the
11
+ * text contract.
12
+ */
13
+ export function EmptyState({ title, description, icon, className, children, ...props }) {
14
+ return (_jsxs("div", { className: cx('ds-empty-state', className), ...props, children: [icon ? _jsx(Icon, { source: icon, size: "lg", tone: "muted", decorative: true }) : null, _jsx("p", { className: "ds-empty-state__title", children: title }), description ? _jsx("p", { className: "ds-empty-state__description", children: description }) : null, children ? _jsx("div", { className: "ds-empty-state__actions", children: children }) : null] }));
15
+ }
16
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgBrD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,aACvD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,EACvE,YAAG,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAK,EAC/C,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,6BAA6B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EACjF,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { EmptyStateProps } from './empty-state';
2
+ export { EmptyState } from './empty-state';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/empty-state/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EmptyState } from './empty-state';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/empty-state/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,18 @@
1
+ @layer components {
2
+ .ds-form-layout {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--ds-form-layout-gap);
6
+ min-width: 0;
7
+ overflow-wrap: anywhere;
8
+ }
9
+
10
+ .ds-form-layout__actions {
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ align-items: center;
14
+ justify-content: flex-end;
15
+ gap: var(--ds-form-layout-actions-gap);
16
+ padding-block-start: var(--ds-form-layout-actions-padding-block);
17
+ }
18
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ark } from '@ark-ui/react/factory';
2
+ import type { ComponentProps } from 'react';
3
+ import './form-layout.css';
4
+ export type FormLayoutProps = ComponentProps<typeof ark.form>;
5
+ /**
6
+ * The template a form composes: its fields in a column at the form's own
7
+ * rhythm, then its {@link FormActions}.
8
+ *
9
+ * Renders a `form`, so `onSubmit`, `noValidate` and the rest land where they
10
+ * belong; pass `asChild` when a form library renders the element. The
11
+ * rhythm between fields is `--ds-form-layout-gap`, wider than a stack's so
12
+ * each field's label, control and message read as one group.
13
+ */
14
+ export declare function FormLayout({ className, children, ...props }: FormLayoutProps): import("react/jsx-runtime").JSX.Element;
15
+ export type FormActionsProps = ComponentProps<typeof ark.div>;
16
+ /**
17
+ * The form's buttons: a row aligned to the end, with the primary action last
18
+ * in reading order. Set apart from the fields by its own block padding.
19
+ */
20
+ export declare function FormActions({ className, children, ...props }: FormActionsProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=form-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-layout.d.ts","sourceRoot":"","sources":["../../src/form-layout/form-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,mBAAmB,CAAC;AAG3B,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9D;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAM9E"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ark } from '@ark-ui/react/factory';
3
+ import './form-layout.css';
4
+ import { cx } from '../cx';
5
+ /**
6
+ * The template a form composes: its fields in a column at the form's own
7
+ * rhythm, then its {@link FormActions}.
8
+ *
9
+ * Renders a `form`, so `onSubmit`, `noValidate` and the rest land where they
10
+ * belong; pass `asChild` when a form library renders the element. The
11
+ * rhythm between fields is `--ds-form-layout-gap`, wider than a stack's so
12
+ * each field's label, control and message read as one group.
13
+ */
14
+ export function FormLayout({ className, children, ...props }) {
15
+ return (_jsx(ark.form, { className: cx('ds-form-layout', className), ...props, children: children }));
16
+ }
17
+ /**
18
+ * The form's buttons: a row aligned to the end, with the primary action last
19
+ * in reading order. Set apart from the fields by its own block padding.
20
+ */
21
+ export function FormActions({ className, children, ...props }) {
22
+ return (_jsx(ark.div, { className: cx('ds-form-layout__actions', className), ...props, children: children }));
23
+ }
24
+ //# sourceMappingURL=form-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-layout.js","sourceRoot":"","sources":["../../src/form-layout/form-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,YAC5D,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC;AAID;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB;IAC7E,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,KAAM,KAAK,YACpE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC"}