@gears-frontx/ui-kit 0.4.1 → 0.4.3
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.
- package/README.md +6 -5
- package/dist/alert.js +35 -24
- package/dist/alert.js.map +1 -1
- package/dist/attachment.js +117 -76
- package/dist/attachment.js.map +1 -1
- package/dist/avatar.js +43 -43
- package/dist/badge.js +14 -14
- package/dist/card.js +81 -44
- package/dist/card.js.map +1 -1
- package/dist/chart.js +50 -50
- package/dist/chunks/alert.Csv2-ccF.css +1 -0
- package/dist/chunks/attachment.BRyIQq3F.css +1 -0
- package/dist/chunks/avatar.7EUG65-M.css +1 -0
- package/dist/chunks/badge.BwUxa9PB.css +1 -0
- package/dist/chunks/card.DSiUMxGK.css +1 -0
- package/dist/chunks/chart.B9cGEno8.css +1 -0
- package/dist/chunks/code-block.r7Cm0ncj.css +1 -0
- package/dist/chunks/description-list.Cx-vFGJL.css +1 -0
- package/dist/chunks/empty.DWqLrSfF.css +1 -0
- package/dist/chunks/heading.DQxQs5po.css +1 -0
- package/dist/chunks/item.BQ70Khqj.css +1 -0
- package/dist/chunks/link.BOE4f-aB.css +1 -0
- package/dist/chunks/message-scroller.CBjPcz8Y.css +1 -0
- package/dist/chunks/page-header.72nfJNkg.css +1 -0
- package/dist/chunks/sheet.BkZyzAbA.css +1 -0
- package/dist/chunks/sidebar.CIuN--7U.css +1 -0
- package/dist/chunks/slider.DY1XDCPw.css +1 -0
- package/dist/chunks/status-dot.39NKkKQF.css +1 -0
- package/dist/chunks/text.7frjnkUr.css +1 -0
- package/dist/chunks/visually-hidden.Bd2oAR5D.css +1 -0
- package/dist/code-block.d.ts +1 -0
- package/dist/code-block.js +152 -0
- package/dist/code-block.js.map +1 -0
- package/dist/command.js +63 -48
- package/dist/command.js.map +1 -1
- package/dist/components/alert/alert.d.ts +3 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/attachment/attachment.d.ts +10 -3
- package/dist/components/attachment/attachment.d.ts.map +1 -1
- package/dist/components/card/card.d.ts +6 -4
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/code-block/code-block.d.ts +57 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/public.d.ts +2 -0
- package/dist/components/code-block/public.d.ts.map +1 -0
- package/dist/components/command/command.d.ts +1 -1
- package/dist/components/command/command.d.ts.map +1 -1
- package/dist/components/description-list/description-list.d.ts +21 -0
- package/dist/components/description-list/description-list.d.ts.map +1 -0
- package/dist/components/description-list/public.d.ts +2 -0
- package/dist/components/description-list/public.d.ts.map +1 -0
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/heading/heading.d.ts +10 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/public.d.ts +2 -0
- package/dist/components/heading/public.d.ts.map +1 -0
- package/dist/components/input-otp/input-otp.d.ts +1 -1
- package/dist/components/input-otp/input-otp.d.ts.map +1 -1
- package/dist/components/item/item.d.ts +15 -6
- package/dist/components/item/item.d.ts.map +1 -1
- package/dist/components/link/link.d.ts +18 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/public.d.ts +2 -0
- package/dist/components/link/public.d.ts.map +1 -0
- package/dist/components/page-header/page-header.d.ts +50 -0
- package/dist/components/page-header/page-header.d.ts.map +1 -0
- package/dist/components/page-header/public.d.ts +2 -0
- package/dist/components/page-header/public.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -3
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/text/public.d.ts +2 -0
- package/dist/components/text/public.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +11 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/visually-hidden/public.d.ts +2 -0
- package/dist/components/visually-hidden/public.d.ts.map +1 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +4 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/description-list.d.ts +1 -0
- package/dist/description-list.js +78 -0
- package/dist/description-list.js.map +1 -0
- package/dist/docs/alert.md +8 -2
- package/dist/docs/attachment.md +20 -8
- package/dist/docs/avatar.md +8 -2
- package/dist/docs/badge.md +12 -11
- package/dist/docs/button.md +16 -4
- package/dist/docs/calendar.md +6 -0
- package/dist/docs/card.md +38 -6
- package/dist/docs/carousel.md +4 -2
- package/dist/docs/chart.md +23 -0
- package/dist/docs/code-block.md +114 -0
- package/dist/docs/description-list.md +53 -0
- package/dist/docs/empty.md +9 -3
- package/dist/docs/heading.md +60 -0
- package/dist/docs/item.md +70 -3
- package/dist/docs/link.md +48 -0
- package/dist/docs/message-scroller.md +5 -0
- package/dist/docs/page-header.md +266 -0
- package/dist/docs/sheet.md +20 -3
- package/dist/docs/sidebar.md +27 -0
- package/dist/docs/status-dot.md +2 -2
- package/dist/docs/switch.md +10 -4
- package/dist/docs/text.md +51 -0
- package/dist/docs/visually-hidden.md +44 -0
- package/dist/empty.js +47 -36
- package/dist/empty.js.map +1 -1
- package/dist/heading.d.ts +1 -0
- package/dist/heading.js +36 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +437 -402
- package/dist/index.js.map +1 -1
- package/dist/input-otp.js +34 -20
- package/dist/input-otp.js.map +1 -1
- package/dist/item.js +119 -71
- package/dist/item.js.map +1 -1
- package/dist/link.d.ts +1 -0
- package/dist/link.js +55 -0
- package/dist/link.js.map +1 -0
- package/dist/message-scroller.js +24 -24
- package/dist/page-header.d.ts +1 -0
- package/dist/page-header.js +88 -0
- package/dist/page-header.js.map +1 -0
- package/dist/sheet.js +41 -41
- package/dist/sidebar.js +220 -206
- package/dist/sidebar.js.map +1 -1
- package/dist/slider.js +34 -21
- package/dist/slider.js.map +1 -1
- package/dist/status-dot.js +25 -25
- package/dist/table.js +172 -157
- package/dist/table.js.map +1 -1
- package/dist/text.d.ts +1 -0
- package/dist/text.js +53 -0
- package/dist/text.js.map +1 -0
- package/dist/theme.css +29 -6
- package/dist/utilities.css +25 -2
- package/dist/visually-hidden.d.ts +1 -0
- package/dist/visually-hidden.js +18 -0
- package/dist/visually-hidden.js.map +1 -0
- package/llms.txt +82 -15
- package/package.json +1 -1
- package/dist/chunks/alert.DsgRIXLn.css +0 -1
- package/dist/chunks/attachment.CZuZdlXC.css +0 -1
- package/dist/chunks/avatar.BMm-Z9l5.css +0 -1
- package/dist/chunks/badge.BCreEn3O.css +0 -1
- package/dist/chunks/card.DdBl-usf.css +0 -1
- package/dist/chunks/chart.CeyctrXQ.css +0 -1
- package/dist/chunks/empty.DnAKlw2g.css +0 -1
- package/dist/chunks/item.BkcgydVc.css +0 -1
- package/dist/chunks/message-scroller.CbLooS7Q.css +0 -1
- package/dist/chunks/sheet.BWvXXyXk.css +0 -1
- package/dist/chunks/sidebar.DdEvMURX.css +0 -1
- package/dist/chunks/slider.inyNxx4y.css +0 -1
- package/dist/chunks/status-dot.DWa2qGKe.css +0 -1
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# PageHeader
|
|
2
|
+
|
|
3
|
+
The bar at the top of a page or of a section of one: its title, and what
|
|
4
|
+
sits around the title - a control before it, a line above it, content
|
|
5
|
+
beside it, a description under it and actions at the end. PageHeader has
|
|
6
|
+
no Base UI primitive and no shadcn/ui counterpart; it is the kit's own, and
|
|
7
|
+
nothing in it is tied to one product - what the slots hold is the
|
|
8
|
+
application's. Every part is a plain styled element with no interactive
|
|
9
|
+
behaviour of its own.
|
|
10
|
+
|
|
11
|
+
Composition: `PageHeader` (root) → `PageHeaderLeading` (a control before the
|
|
12
|
+
text), `PageHeaderContent` (→ `PageHeaderEyebrow`, `PageHeaderTitle`,
|
|
13
|
+
`PageHeaderMeta`, `PageHeaderDescription`) and `PageHeaderActions` (the row
|
|
14
|
+
at the end).
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- The header of the page of one object - a customer, an order, a
|
|
19
|
+
project, a document - with its name, and a badge, a status or a link
|
|
20
|
+
beside it.
|
|
21
|
+
- The header of a list or of a section inside a page: a list with its
|
|
22
|
+
"New …" button, a tab with its own section navigation and actions.
|
|
23
|
+
|
|
24
|
+
## When not to use
|
|
25
|
+
|
|
26
|
+
- The application's top bar - the product identity, the global navigation
|
|
27
|
+
and the account menu belong to the shell, not to a page.
|
|
28
|
+
- A heading inside a card or a panel - use `CardHeader`/`CardTitle`.
|
|
29
|
+
- Tabs that switch panels below the header - the tab list may sit in
|
|
30
|
+
`PageHeaderMeta`, but `Tabs` still owns the panels.
|
|
31
|
+
|
|
32
|
+
## Props (kit level)
|
|
33
|
+
|
|
34
|
+
`PageHeader`:
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Default |
|
|
37
|
+
|------|------|---------|
|
|
38
|
+
| `size` | `'sm' \| 'default' \| 'lg'` - the minimum height: `sm` 56, `default` 64, `lg` 80 | `'default'` |
|
|
39
|
+
| `border` | `boolean` - draws the rule under the header; `false` paints it transparent, so the height and the text position stay those of a header with the rule | `true` |
|
|
40
|
+
| `className` | `string` - merged after the kit classes | — |
|
|
41
|
+
|
|
42
|
+
`PageHeaderTitle`:
|
|
43
|
+
|
|
44
|
+
| Prop | Type | Default |
|
|
45
|
+
|------|------|---------|
|
|
46
|
+
| `typography` | `'heading' \| 'display'` - the ramp role: `heading` is Heading 1 (20/28), `display` is the Page Title role (26/32) | `'heading'` |
|
|
47
|
+
| `render` | an element or a render function - replaces the `h1`, such as `render={<h2 />}` for a section's header | — |
|
|
48
|
+
| `className` | `string` - merged after the kit classes | — |
|
|
49
|
+
|
|
50
|
+
`PageHeaderLeading`, `PageHeaderContent`, `PageHeaderEyebrow`,
|
|
51
|
+
`PageHeaderMeta`, `PageHeaderDescription` and `PageHeaderActions` take no
|
|
52
|
+
kit-specific props - every prop is the `div`'s own, forwarded as-is.
|
|
53
|
+
`PageHeader` forwards the `header` element's props the same way.
|
|
54
|
+
|
|
55
|
+
### CSS hook
|
|
56
|
+
|
|
57
|
+
| Variable | Default | What it sets |
|
|
58
|
+
|----------|---------|--------------|
|
|
59
|
+
| `--page-header-inset` | `var(--space-6)` (24) | The inset on both sides. Set `0` for a header inside a region that already has its own padding, `var(--space-4)` for a denser panel. |
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
import {
|
|
65
|
+
Badge,
|
|
66
|
+
Button,
|
|
67
|
+
PageHeader,
|
|
68
|
+
PageHeaderActions,
|
|
69
|
+
PageHeaderContent,
|
|
70
|
+
PageHeaderDescription,
|
|
71
|
+
PageHeaderEyebrow,
|
|
72
|
+
PageHeaderLeading,
|
|
73
|
+
PageHeaderMeta,
|
|
74
|
+
PageHeaderTitle,
|
|
75
|
+
Tabs,
|
|
76
|
+
TabsContent,
|
|
77
|
+
TabsList,
|
|
78
|
+
TabsTrigger,
|
|
79
|
+
} from '@gears-frontx/ui-kit';
|
|
80
|
+
import { ArrowLeftIcon, ArrowLeftRightIcon } from 'lucide-react';
|
|
81
|
+
|
|
82
|
+
// An object's page: the tall header with the Page Title role and a link to
|
|
83
|
+
// its parent, set above the page's main on the card surface
|
|
84
|
+
// (styles.surface: `background: var(--card);` in the page's own module)
|
|
85
|
+
<PageHeader size="lg" role="group" className={styles.surface}>
|
|
86
|
+
<PageHeaderContent>
|
|
87
|
+
<PageHeaderEyebrow>
|
|
88
|
+
<a href="/customers">Customers</a>
|
|
89
|
+
</PageHeaderEyebrow>
|
|
90
|
+
<PageHeaderTitle typography="display">Northwind Traders</PageHeaderTitle>
|
|
91
|
+
</PageHeaderContent>
|
|
92
|
+
</PageHeader>
|
|
93
|
+
|
|
94
|
+
// An account: a link beside the title
|
|
95
|
+
<PageHeader size="lg" role="group" className={styles.surface}>
|
|
96
|
+
<PageHeaderContent>
|
|
97
|
+
<PageHeaderTitle typography="display">Acme Corporation</PageHeaderTitle>
|
|
98
|
+
<PageHeaderMeta>
|
|
99
|
+
<Button
|
|
100
|
+
variant="ghost"
|
|
101
|
+
size="sm"
|
|
102
|
+
icon={<ArrowLeftRightIcon />}
|
|
103
|
+
render={<a href="/switch-account" />}
|
|
104
|
+
nativeButton={false}
|
|
105
|
+
>
|
|
106
|
+
Switch account
|
|
107
|
+
</Button>
|
|
108
|
+
</PageHeaderMeta>
|
|
109
|
+
</PageHeaderContent>
|
|
110
|
+
</PageHeader>
|
|
111
|
+
|
|
112
|
+
// The compact header: a back link and a badge beside the title
|
|
113
|
+
<PageHeader size="sm">
|
|
114
|
+
<PageHeaderLeading>
|
|
115
|
+
<Button
|
|
116
|
+
variant="ghost"
|
|
117
|
+
icon={<ArrowLeftIcon />}
|
|
118
|
+
aria-label="Back to orders"
|
|
119
|
+
render={<a href="/orders" />}
|
|
120
|
+
nativeButton={false}
|
|
121
|
+
/>
|
|
122
|
+
</PageHeaderLeading>
|
|
123
|
+
<PageHeaderContent>
|
|
124
|
+
<PageHeaderTitle>Order 1042</PageHeaderTitle>
|
|
125
|
+
<PageHeaderMeta>
|
|
126
|
+
<Badge variant="outline">Paid</Badge>
|
|
127
|
+
</PageHeaderMeta>
|
|
128
|
+
</PageHeaderContent>
|
|
129
|
+
</PageHeader>
|
|
130
|
+
|
|
131
|
+
// A section under the page's own header: an h2, tabs and actions. One Tabs
|
|
132
|
+
// holds the header and the panels: the list sits in the meta, and the panels
|
|
133
|
+
// it switches follow the header.
|
|
134
|
+
<Tabs defaultValue="summary">
|
|
135
|
+
<PageHeader>
|
|
136
|
+
<PageHeaderContent>
|
|
137
|
+
<PageHeaderTitle render={<h2 />}>Overview</PageHeaderTitle>
|
|
138
|
+
<PageHeaderMeta>
|
|
139
|
+
<TabsList variant="line" aria-label="Overview sections">
|
|
140
|
+
<TabsTrigger value="summary">Summary</TabsTrigger>
|
|
141
|
+
<TabsTrigger value="delivery">Delivery</TabsTrigger>
|
|
142
|
+
</TabsList>
|
|
143
|
+
</PageHeaderMeta>
|
|
144
|
+
</PageHeaderContent>
|
|
145
|
+
<PageHeaderActions>
|
|
146
|
+
<Button variant="outline">Edit dashboard</Button>
|
|
147
|
+
<Button>Export</Button>
|
|
148
|
+
</PageHeaderActions>
|
|
149
|
+
</PageHeader>
|
|
150
|
+
<TabsContent value="summary">…</TabsContent>
|
|
151
|
+
<TabsContent value="delivery">…</TabsContent>
|
|
152
|
+
</Tabs>
|
|
153
|
+
|
|
154
|
+
// A header set inside a region that already pads its content
|
|
155
|
+
// (styles.header: `--page-header-inset: 0;` in the screen's own module)
|
|
156
|
+
<PageHeader border={false} className={styles.header}>
|
|
157
|
+
<PageHeaderContent>
|
|
158
|
+
<PageHeaderTitle render={<h2 />}>Invoices</PageHeaderTitle>
|
|
159
|
+
<PageHeaderDescription>12 invoices · 3 overdue</PageHeaderDescription>
|
|
160
|
+
</PageHeaderContent>
|
|
161
|
+
<PageHeaderActions>
|
|
162
|
+
<Button>New invoice</Button>
|
|
163
|
+
</PageHeaderActions>
|
|
164
|
+
</PageHeader>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Parts and their spacing
|
|
168
|
+
|
|
169
|
+
The root is a row: 16 after the leading control, 24 before the actions,
|
|
170
|
+
centred on the drawn minimum height, with the rule under it. The heights
|
|
171
|
+
include the rule, and a header whose content outgrows them grows past them,
|
|
172
|
+
keeping 4 above and below its content so it does not touch its edges.
|
|
173
|
+
|
|
174
|
+
`PageHeaderContent` is a grid of named areas - the eyebrow above, the title
|
|
175
|
+
and the content beside it on one line, the description under them - so a
|
|
176
|
+
part lands in its place whichever of the others are present. Write them in
|
|
177
|
+
that order: eyebrow, title, meta, description. The title and the content
|
|
178
|
+
beside it are each as wide as their content, and the rest of the row is an
|
|
179
|
+
empty flexible column, so a long eyebrow or description does not move the
|
|
180
|
+
meta away from the title. When the row runs short, the title and the meta
|
|
181
|
+
share it: content beside the title that is narrower than its share keeps
|
|
182
|
+
its width and the title truncates with an ellipsis, and when both are long
|
|
183
|
+
each gets half.
|
|
184
|
+
|
|
185
|
+
The eyebrow and the description are on the meta role (12/16), muted, 4 from
|
|
186
|
+
the title. The eyebrow holds text or a plain link - a link takes its colour,
|
|
187
|
+
turns the link colour with an underline on hover, and draws its focus ring
|
|
188
|
+
inside its own box, since the eyebrow clips its overflow for the ellipsis.
|
|
189
|
+
A `Breadcrumb` trail does not go there.
|
|
190
|
+
|
|
191
|
+
`PageHeaderMeta` sets its children 20 apart, the same 20 that separates it
|
|
192
|
+
from the title. That 20 is the meta's own margin, not a gap of the grid,
|
|
193
|
+
so a header without a meta gives its title the whole row. `PageHeaderActions` sets its children 8 apart, does not
|
|
194
|
+
shrink, and wraps its controls onto further lines, 8 apart, when they do
|
|
195
|
+
not fit. Both take any content: buttons, menus, badges, a status, a toggle
|
|
196
|
+
group, section navigation.
|
|
197
|
+
|
|
198
|
+
`PageHeaderMeta` does not scroll or clip. A tab list or a set of links that
|
|
199
|
+
can outgrow the room beside the title goes in a block of its own with
|
|
200
|
+
`overflow-x: auto`, so it scrolls instead of running under the actions. A
|
|
201
|
+
scrolling block clips vertically too, so leave room in it for focus rings
|
|
202
|
+
and the tab indicator.
|
|
203
|
+
|
|
204
|
+
When the header's width inside its side insets is below 1024 - 1072
|
|
205
|
+
outside them at the default inset of 24 - the narrow layout applies. It is
|
|
206
|
+
a container query on the header itself, not the viewport. The content
|
|
207
|
+
beside the title moves under the description, the actions take a line of
|
|
208
|
+
their own, flush with the start, and the leading control stays on the
|
|
209
|
+
first line beside the text. Each line keeps 8 above and below it, on top
|
|
210
|
+
of the header's own 4, so wrapped lines touch neither the header's edges
|
|
211
|
+
nor each other.
|
|
212
|
+
|
|
213
|
+
## Surface and insets
|
|
214
|
+
|
|
215
|
+
The root paints no background: it takes the surface it is set on. A header
|
|
216
|
+
drawn on the card surface over a differently painted page - an object's
|
|
217
|
+
header above the content of its page, say - sets `background: var(--card)`
|
|
218
|
+
in a class of its own.
|
|
219
|
+
|
|
220
|
+
`--page-header-inset` sets both sides at once. A header that has to clear a
|
|
221
|
+
control of the shell at one edge, such as a panel toggle over its end,
|
|
222
|
+
sets `padding-inline-end` in its own class instead.
|
|
223
|
+
|
|
224
|
+
The header takes its width from its parent and does not size itself to its
|
|
225
|
+
content: the narrow layout measures the header, so the header cannot be
|
|
226
|
+
measured by what it holds. In normal flow, or as a stretched item of a grid
|
|
227
|
+
or a flex column, that is the full width. As an item of a flex row, give it
|
|
228
|
+
`flex: 1` or a width of its own - without one it collapses to its side
|
|
229
|
+
insets.
|
|
230
|
+
|
|
231
|
+
## Accessibility
|
|
232
|
+
|
|
233
|
+
- The title is an `h1`. A page has one: give every header below the page's
|
|
234
|
+
own an `h2` with `render={<h2 />}`.
|
|
235
|
+
- The root is a `header` element. Inside `main`, `article`, `aside`, `nav`
|
|
236
|
+
or `section` - or an element with role `main`, `article`,
|
|
237
|
+
`complementary`, `navigation` or `region` - it is not a landmark; outside
|
|
238
|
+
them it is a `banner`, a second one next to the application's top bar. A section's header goes
|
|
239
|
+
inside the page's `main`. A header the layout keeps above `main` - an
|
|
240
|
+
object's header over the tabs that switch between its pages, for one -
|
|
241
|
+
passes `role="group"`, which a `header` element allows, so it is not a
|
|
242
|
+
second banner.
|
|
243
|
+
- Navigation between pages in `PageHeaderMeta` is a `nav` with links and
|
|
244
|
+
`aria-current="page"` on the current one. `Tabs` belong there only when
|
|
245
|
+
they switch panels on the same page: a tab list is not a list of links.
|
|
246
|
+
The kit has no component that draws page links in the line-tabs look.
|
|
247
|
+
- Name an icon-only control in `PageHeaderLeading` or `PageHeaderActions`
|
|
248
|
+
with `aria-label`, as with any icon button.
|
|
249
|
+
|
|
250
|
+
## Anti-patterns
|
|
251
|
+
|
|
252
|
+
- Do not put the page's section navigation in `PageHeaderActions` - it goes
|
|
253
|
+
in `PageHeaderMeta`, beside the title it belongs to.
|
|
254
|
+
- Do not put a long text in `PageHeaderMeta` - a sentence about the page is
|
|
255
|
+
`PageHeaderDescription`.
|
|
256
|
+
- Do not leave every header an `h1` - a section's header under the page's
|
|
257
|
+
own is an `h2`.
|
|
258
|
+
- Do not drop the rule with `border-bottom: none` - `border={false}` keeps
|
|
259
|
+
the rule's width inside the header, so the text sits exactly where it
|
|
260
|
+
does with the rule. A border removed in CSS moves the text by half a
|
|
261
|
+
rule, and makes a header whose content outgrows the minimum height one
|
|
262
|
+
rule shorter.
|
|
263
|
+
- Do not place `PageHeader` in a flex row without `flex: 1` or a width of
|
|
264
|
+
its own - it collapses to its side insets.
|
|
265
|
+
- Do not render `Tabs` with links in them for navigation between pages -
|
|
266
|
+
that is a `nav` of links, whatever it is drawn like.
|
package/dist/docs/sheet.md
CHANGED
|
@@ -151,9 +151,26 @@ inset on the first, bottom inset on the last), so header and footer span
|
|
|
151
151
|
the panel's full width and reach its top and bottom edges. Padding on the
|
|
152
152
|
scroll container would have left strips that no sticky region can cover -
|
|
153
153
|
see `dialog.md`'s "Scrolling content" for the mechanism. Consequence when
|
|
154
|
-
styling children:
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
styling children: the inset rules read the `--sheet-inset` custom property
|
|
155
|
+
(default `var(--space-6)`, 24px). It sets a region's side inset and, on the
|
|
156
|
+
first and last regions, their top and bottom inset too. A region that should
|
|
157
|
+
run edge to edge (a navigation column, a full-width list with dividers, a
|
|
158
|
+
media header) sets `--sheet-inset: 0` on itself; as the first region it then
|
|
159
|
+
also starts at the panel's top edge, under the close button, so put it after
|
|
160
|
+
`SheetHeader` or give it its own top padding. Setting it on `SheetContent`
|
|
161
|
+
changes the inset of every region except `SheetHeader` and `SheetFooter`,
|
|
162
|
+
which keep their own 16px, and leaves the 24px gap between regions as it is. Use the property rather than a `padding` override:
|
|
163
|
+
a class that sets `padding` on a region has the same weight as the kit
|
|
164
|
+
rule, so it wins only when its stylesheet loads after the kit's.
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
<SheetContent>
|
|
168
|
+
<SheetHeader>
|
|
169
|
+
<SheetTitle>Navigation</SheetTitle>
|
|
170
|
+
</SheetHeader>
|
|
171
|
+
<nav style={{ '--sheet-inset': 0 } as React.CSSProperties}>{/* full-width rows */}</nav>
|
|
172
|
+
</SheetContent>
|
|
173
|
+
```
|
|
157
174
|
|
|
158
175
|
## Anti-patterns
|
|
159
176
|
|
package/dist/docs/sidebar.md
CHANGED
|
@@ -119,6 +119,7 @@ needed for the normal case, where the shell IS the page.
|
|
|
119
119
|
| `defaultOpen` | `boolean` — starting state AND an opt-out of the cookie | persisted cookie, else `true` |
|
|
120
120
|
| `open` | `boolean` — controlled desktop open state | — |
|
|
121
121
|
| `onOpenChange` | `(open: boolean) => void` | — |
|
|
122
|
+
| `contained` | `boolean` - lay the sidebar out inside a bounded container instead of against the viewport (see "Inside a container") | `false` |
|
|
122
123
|
|
|
123
124
|
Omit `defaultOpen` and the provider restores whatever was last persisted
|
|
124
125
|
(`sidebar_state`, 7 days). Pass it and it wins outright, cookie ignored.
|
|
@@ -220,6 +221,32 @@ inherited down to `Sidebar`/`SidebarInset` the same way `Card` shares
|
|
|
220
221
|
<SidebarProvider style={{ '--sidebar-width': '20rem' }}>
|
|
221
222
|
```
|
|
222
223
|
|
|
224
|
+
## Inside a container
|
|
225
|
+
|
|
226
|
+
A sidebar that belongs to a panel or a page section (a file list beside a
|
|
227
|
+
viewer, a settings section) rather than to the app shell: pass
|
|
228
|
+
`contained` to `SidebarProvider`, use `collapsible="none"` on `Sidebar`,
|
|
229
|
+
and render `SidebarInset` as a `div` so the page keeps its own main. The
|
|
230
|
+
wrapper then fills its parent instead of the screen height, the sidebar
|
|
231
|
+
sticks to the top of the container with a `--sidebar-border` line toward
|
|
232
|
+
the content, the content scrolls inside the container, and on a narrow
|
|
233
|
+
screen the sidebar stacks above the content with its list capped at 190px
|
|
234
|
+
and scrolling. A contained provider keeps its own state: it reads and
|
|
235
|
+
writes no `sidebar_state` cookie and does not answer Cmd/Ctrl+B, so it
|
|
236
|
+
never moves with the page's app sidebar. Set the width through
|
|
237
|
+
`--sidebar-width` as above (the drawn explorer uses `14rem`).
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
<Card variant="panel">
|
|
241
|
+
<SidebarProvider contained style={{ '--sidebar-width': '14rem' } as CSSProperties}>
|
|
242
|
+
<Sidebar collapsible="none">
|
|
243
|
+
<SidebarContent>{/* file list */}</SidebarContent>
|
|
244
|
+
</Sidebar>
|
|
245
|
+
<SidebarInset render={<div />}>{/* the file */}</SidebarInset>
|
|
246
|
+
</SidebarProvider>
|
|
247
|
+
</Card>
|
|
248
|
+
```
|
|
249
|
+
|
|
223
250
|
## Not reproduced from upstream
|
|
224
251
|
|
|
225
252
|
Row geometry is upstream's, not invented: the metrics come from
|
package/dist/docs/status-dot.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# StatusDot
|
|
2
2
|
|
|
3
3
|
An inline status indicator: a 6px round dot plus an optional 12/16 label,
|
|
4
|
-
both painted in the tone
|
|
4
|
+
both painted in the tone. No Base UI primitive and no
|
|
5
5
|
interactive behaviour - a pure styling translation over native spans, like
|
|
6
6
|
`Skeleton` and `Spinner`.
|
|
7
7
|
|
|
@@ -28,7 +28,7 @@ interactive behaviour - a pure styling translation over native spans, like
|
|
|
28
28
|
|
|
29
29
|
| Prop | Type | Default |
|
|
30
30
|
|------|------|---------|
|
|
31
|
-
| `tone` | `'neutral' \| 'success' \| 'warning' \| 'danger' \| 'info'` - paints the dot
|
|
31
|
+
| `tone` | `'neutral' \| 'success' \| 'warning' \| 'danger' \| 'info'` - paints the dot in the tone (`--muted-foreground` for neutral, `--success` / `--warning` / `--danger` / `--info` for the rest) and the label in the same tone, written in the tone's text token (`--success-foreground` / `--warning-foreground` / `--danger-foreground`) where the fill tone is too light for 12px text; the root also carries `data-tone` | `'neutral'` |
|
|
32
32
|
| `label` | `ReactNode` - the text beside the dot; omitted renders the dot on its own | - |
|
|
33
33
|
| `live` | `boolean` - the dot breathes on a 2s opacity cycle and the root carries `data-live`; off under `prefers-reduced-motion` | `false` |
|
|
34
34
|
| `render` | `ReactElement` - replaces the root `span`, e.g. with an `<li>` inside a status list | - |
|
package/dist/docs/switch.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Switch
|
|
2
2
|
|
|
3
3
|
An on/off toggle with immediate effect. Wraps the Base UI Switch primitive
|
|
4
|
-
(Root + Thumb): renders a `role="switch"`
|
|
5
|
-
for forms, state via `data-checked`/`data-unchecked`.
|
|
4
|
+
(Root + Thumb): renders a `span` with `role="switch"` and a hidden native
|
|
5
|
+
input for forms, state via `data-checked`/`data-unchecked`.
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
@@ -32,9 +32,11 @@ Other props follow Base UI Switch.Root (`disabled`, `readOnly`, ...).
|
|
|
32
32
|
```tsx
|
|
33
33
|
import { Label, Switch } from '@gears-frontx/ui-kit';
|
|
34
34
|
|
|
35
|
-
// Labelled toggle
|
|
35
|
+
// Labelled toggle: nesting gives one click target, and aria-labelledby
|
|
36
|
+
// names the switch (a wrapping label does not name its role="switch" span)
|
|
36
37
|
<Label>
|
|
37
|
-
<Switch checked={notify} onCheckedChange={setNotify} />
|
|
38
|
+
<Switch checked={notify} onCheckedChange={setNotify} aria-labelledby="notify-label" />
|
|
39
|
+
<span id="notify-label">Email notifications</span>
|
|
38
40
|
</Label>
|
|
39
41
|
|
|
40
42
|
// Compact rows
|
|
@@ -49,3 +51,7 @@ import { Label, Switch } from '@gears-frontx/ui-kit';
|
|
|
49
51
|
- Do not use a switch when the change needs a confirm/submit step — that is
|
|
50
52
|
`checkbox` semantics.
|
|
51
53
|
- Do not render one without a visible label or `aria-label`.
|
|
54
|
+
- Do not rely on a wrapping `Label` alone for the name: the switch is a
|
|
55
|
+
`span` with `role="switch"`, which a wrapping label does not name (axe
|
|
56
|
+
`aria-toggle-field-name`). Point `aria-labelledby` at the label text, or
|
|
57
|
+
pass `aria-label`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Text on the kit's type ramp: `typography` is the ramp role and `tone` the
|
|
4
|
+
colour. The default element is `p`; `render` swaps it. No Base UI
|
|
5
|
+
primitive; `render` comes from `useRender`/`mergeProps`.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A paragraph between kit components.
|
|
10
|
+
- A short muted line (an update time, a hint) on the meta role.
|
|
11
|
+
- A path or a name on the mono role, with `render={<code />}`.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- A heading: use `Heading`.
|
|
16
|
+
- A block of code with a copy action: use `CodeBlock`.
|
|
17
|
+
- A key or a shortcut: use `Kbd`.
|
|
18
|
+
- The description line of a card: use `CardDescription`.
|
|
19
|
+
|
|
20
|
+
## Props (kit level)
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Default |
|
|
23
|
+
|------|------|---------|
|
|
24
|
+
| `typography` | `'body' \| 'label' \| 'meta' \| 'mono' \| 'micro' \| 'kpi' \| 'kpi-lg'` - the ramp role; `mono` also sets `--font-mono`; `kpi` (32/32) and `kpi-lg` (48/48) are key figures on a dashboard card, with tabular figures | `'body'` |
|
|
25
|
+
| `tone` | `'default' \| 'muted'` - `--foreground` or `--muted-foreground` | `'default'` |
|
|
26
|
+
| `render` | `ReactElement` or callback - the element | `p` |
|
|
27
|
+
| `className` | `string` - merged after the role and tone classes | - |
|
|
28
|
+
|
|
29
|
+
All other props are native paragraph props. Margins are zero. No `lead`,
|
|
30
|
+
`overline` or uppercase roles: they are not ramp roles; a consumer that
|
|
31
|
+
wants one adds a class or brands a role.
|
|
32
|
+
|
|
33
|
+
## Accessibility
|
|
34
|
+
|
|
35
|
+
- Contrast of the two tones is a property of the theme's tokens.
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Text } from '@gears-frontx/ui-kit';
|
|
41
|
+
|
|
42
|
+
<Text>Invite people by email.</Text>
|
|
43
|
+
<Text typography="meta" tone="muted" render={<span />}>Updated 2 hours ago</Text>
|
|
44
|
+
<Text typography="mono" render={<code />}>src/app/main.tsx</Text>
|
|
45
|
+
<Text typography="kpi" render={<strong />}>41,302</Text>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
- Do not set font sizes or colours on it from outside: pick `typography`
|
|
51
|
+
and `tone`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# VisuallyHidden
|
|
2
|
+
|
|
3
|
+
Text a screen reader reads and the screen does not show. A `span` by default, with `render`. The same declarations the kit repeats
|
|
4
|
+
inside several component modules, as the one public copy; the `sr-only` class
|
|
5
|
+
in `utilities.css` is the same rule for markup that is not React.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- The name of an icon-only link or of a custom control without a label prop.
|
|
10
|
+
- A table caption the surrounding heading already shows.
|
|
11
|
+
- A live-region announcement.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- An icon-only `Button`: give it `icon` and `aria-label`.
|
|
16
|
+
- Text hidden from everyone: do not render it.
|
|
17
|
+
- A status dot without a label: give `StatusDot` an `aria-label`.
|
|
18
|
+
|
|
19
|
+
## Props (kit level)
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default |
|
|
22
|
+
|------|------|---------|
|
|
23
|
+
| `render` | `ReactElement` or callback - the element, such as `<caption />` | `span` |
|
|
24
|
+
| `className` | `string` - merged after the kit class | - |
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
- The box is absolutely positioned, 1x1px, clipped with
|
|
29
|
+
`clip-path: inset(50%)`, with no padding or border and no wrapping; its
|
|
30
|
+
text stays in the accessibility tree.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { VisuallyHidden } from '@gears-frontx/ui-kit';
|
|
36
|
+
|
|
37
|
+
<a href="/docs"><ExternalLink aria-hidden="true" /><VisuallyHidden>Open the docs</VisuallyHidden></a>
|
|
38
|
+
<VisuallyHidden render={<caption />}>Members</VisuallyHidden>
|
|
39
|
+
<span className="sr-only">Opens in a new tab</span>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Anti-patterns
|
|
43
|
+
|
|
44
|
+
- Do not hide a visible label: sighted users need it too.
|
package/dist/empty.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { mergeProps as r } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender as s } from "@base-ui/react/use-render";
|
|
2
5
|
import { cx as i, cva as m } from "class-variance-authority";
|
|
3
|
-
import './chunks/empty.
|
|
4
|
-
empty:
|
|
6
|
+
import './chunks/empty.DWqLrSfF.css';const o = "_empty_lrpps_7", c = "_emptyHeader_lrpps_27", l = "_emptyMedia_lrpps_35", y = "_variantDefault_lrpps_48", _ = "_variantIcon_lrpps_52", d = "_emptyTitle_lrpps_78", u = "_emptyDescription_lrpps_95", f = "_emptyDetail_lrpps_121", v = "_emptyActions_lrpps_150", D = "_emptyContent_lrpps_147", T = "_renderedTitle_lrpps_183", n = {
|
|
7
|
+
empty: o,
|
|
5
8
|
emptyHeader: c,
|
|
6
|
-
emptyMedia:
|
|
7
|
-
variantDefault:
|
|
8
|
-
variantIcon:
|
|
9
|
-
emptyTitle:
|
|
10
|
-
emptyDescription:
|
|
11
|
-
emptyDetail:
|
|
12
|
-
emptyActions:
|
|
13
|
-
emptyContent:
|
|
9
|
+
emptyMedia: l,
|
|
10
|
+
variantDefault: y,
|
|
11
|
+
variantIcon: _,
|
|
12
|
+
emptyTitle: d,
|
|
13
|
+
emptyDescription: u,
|
|
14
|
+
emptyDetail: f,
|
|
15
|
+
emptyActions: v,
|
|
16
|
+
emptyContent: D,
|
|
17
|
+
renderedTitle: T
|
|
14
18
|
};
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
19
|
+
function H({ className: e, ...t }) {
|
|
20
|
+
return /* @__PURE__ */ p("div", { className: i(n.empty, e), ...t });
|
|
17
21
|
}
|
|
18
|
-
function
|
|
19
|
-
return /* @__PURE__ */
|
|
22
|
+
function I({ className: e, ...t }) {
|
|
23
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyHeader, e), ...t });
|
|
20
24
|
}
|
|
21
|
-
const
|
|
25
|
+
const N = m(n.emptyMedia, {
|
|
22
26
|
variants: {
|
|
23
27
|
variant: {
|
|
24
28
|
default: n.variantDefault,
|
|
@@ -29,32 +33,39 @@ const f = m(n.emptyMedia, {
|
|
|
29
33
|
variant: "default"
|
|
30
34
|
}
|
|
31
35
|
});
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
36
|
+
function x({ className: e, variant: t, ...a }) {
|
|
37
|
+
return /* @__PURE__ */ p("div", { className: N({ variant: t, className: e }), ...a });
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
39
|
+
function g({ className: e, render: t, ...a }) {
|
|
40
|
+
return s({
|
|
41
|
+
defaultTagName: "div",
|
|
42
|
+
render: t,
|
|
43
|
+
props: r(
|
|
44
|
+
{ className: i(n.emptyTitle, t && n.renderedTitle, e) },
|
|
45
|
+
a
|
|
46
|
+
)
|
|
47
|
+
});
|
|
37
48
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */
|
|
49
|
+
function V({ className: e, ...t }) {
|
|
50
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyDescription, e), ...t });
|
|
40
51
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */
|
|
52
|
+
function j({ className: e, ...t }) {
|
|
53
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyContent, e), ...t });
|
|
43
54
|
}
|
|
44
|
-
function
|
|
45
|
-
return /* @__PURE__ */
|
|
55
|
+
function P({ className: e, ...t }) {
|
|
56
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyDetail, e), ...t });
|
|
46
57
|
}
|
|
47
|
-
function
|
|
48
|
-
return /* @__PURE__ */
|
|
58
|
+
function R({ className: e, ...t }) {
|
|
59
|
+
return /* @__PURE__ */ p("div", { className: i(n.emptyActions, e), ...t });
|
|
49
60
|
}
|
|
50
61
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
H as Empty,
|
|
63
|
+
R as EmptyActions,
|
|
64
|
+
j as EmptyContent,
|
|
65
|
+
V as EmptyDescription,
|
|
66
|
+
P as EmptyDetail,
|
|
67
|
+
I as EmptyHeader,
|
|
68
|
+
x as EmptyMedia,
|
|
69
|
+
g as EmptyTitle
|
|
59
70
|
};
|
|
60
71
|
//# sourceMappingURL=empty.js.map
|
package/dist/empty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.js","sources":["../src/components/empty/empty.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"empty.js","sources":["../src/components/empty/empty.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport styles from './empty.module.css';\n\n/*\n * Empty has no Base UI primitive (registry/bases/base/ui/empty.tsx ships\n * plain `div`s with data-slot markers) — a pure styling translation over\n * native elements, same shape as Card (see card.tsx). No `data-slot`\n * attributes, per the kit-wide convention.\n */\n\nexport type EmptyProps = ComponentProps<'div'>;\n\nexport function Empty({ className, ...props }: EmptyProps) {\n return <div className={cx(styles.empty, className)} {...props} />;\n}\n\nexport type EmptyHeaderProps = ComponentProps<'div'>;\n\nexport function EmptyHeader({ className, ...props }: EmptyHeaderProps) {\n return <div className={cx(styles.emptyHeader, className)} {...props} />;\n}\n\nconst emptyMediaVariants = cva(styles.emptyMedia, {\n variants: {\n variant: {\n default: styles.variantDefault,\n icon: styles.variantIcon,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface EmptyMediaProps\n extends ComponentProps<'div'>, VariantProps<typeof emptyMediaVariants> {}\n\n/** `variant=\"icon\"` draws the muted rounded square upstream's icon\n * treatment uses; `variant=\"default\"` (the default) stays transparent —\n * for an illustration or image that already carries its own chrome. */\nexport function EmptyMedia({ className, variant, ...props }: EmptyMediaProps) {\n return <div className={emptyMediaVariants({ variant, className })} {...props} />;\n}\n\nexport type EmptyTitleProps = useRender.ComponentProps<'div'>;\n\n/*\n * `render` swaps the element (a heading, typically) through Base UI's\n * `useRender`/`mergeProps`, which is why this module ships `'use client'`.\n * With `render` the element also takes `.renderedTitle`, which resets the\n * UA heading margins and font at zero specificity. Without it the markup is\n * the same `div` with the same class.\n */\nexport function EmptyTitle({ className, render, ...props }: EmptyTitleProps) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>(\n { className: cx(styles.emptyTitle, render && styles.renderedTitle, className) },\n props,\n ),\n });\n}\n\n/*\n * Deviation from upstream's own typing: source types this as\n * `React.ComponentProps<\"p\">` but renders a plain `<div>` regardless (the\n * same source/render mismatch as KbdGroup — see kbd.tsx). This port types\n * it `ComponentProps<'div'>`, matching the element actually rendered.\n */\nexport type EmptyDescriptionProps = ComponentProps<'div'>;\n\nexport function EmptyDescription({ className, ...props }: EmptyDescriptionProps) {\n return <div className={cx(styles.emptyDescription, className)} {...props} />;\n}\n\nexport type EmptyContentProps = ComponentProps<'div'>;\n\nexport function EmptyContent({ className, ...props }: EmptyContentProps) {\n return <div className={cx(styles.emptyContent, className)} {...props} />;\n}\n\nexport type EmptyDetailProps = ComponentProps<'div'>;\n\n/** A secondary line under the description - a count, a hint, the query\n * that came back empty. Goes last inside `EmptyHeader`, where the drawn\n * 16 above it comes out of the header's own gap plus this part's margin\n * (see empty.module.css). */\nexport function EmptyDetail({ className, ...props }: EmptyDetailProps) {\n return <div className={cx(styles.emptyDetail, className)} {...props} />;\n}\n\nexport type EmptyActionsProps = ComponentProps<'div'>;\n\n/** A row of actions at the foot of the placeholder. A row, not a column:\n * `EmptyContent` is the column that holds arbitrary content (a search\n * field, a form), this is the button strip beneath it. */\nexport function EmptyActions({ className, ...props }: EmptyActionsProps) {\n return <div className={cx(styles.emptyActions, className)} {...props} />;\n}\n"],"names":["Empty","className","props","jsx","cx","styles","EmptyHeader","emptyMediaVariants","cva","EmptyMedia","variant","EmptyTitle","render","useRender","mergeProps","EmptyDescription","EmptyContent","EmptyDetail","EmptyActions"],"mappings":";;;;;;;;;;;;;;;;;;AAkBO,SAASA,EAAM,EAAE,WAAAC,GAAW,GAAGC,KAAqB;AACzD,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,OAAOJ,CAAS,GAAI,GAAGC,GAAO;AACjE;AAIO,SAASI,EAAY,EAAE,WAAAL,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,aAAaJ,CAAS,GAAI,GAAGC,GAAO;AACvE;AAEA,MAAMK,IAAqBC,EAAIH,EAAO,YAAY;AAAA,EAChD,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,MAAMA,EAAO;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAQM,SAASI,EAAW,EAAE,WAAAR,GAAW,SAAAS,GAAS,GAAGR,KAA0B;AAC5E,SAAO,gBAAAC,EAAC,OAAA,EAAI,WAAWI,EAAmB,EAAE,SAAAG,GAAS,WAAAT,EAAA,CAAW,GAAI,GAAGC,GAAO;AAChF;AAWO,SAASS,EAAW,EAAE,WAAAV,GAAW,QAAAW,GAAQ,GAAGV,KAA0B;AAC3E,SAAOW,EAAU;AAAA,IACf,gBAAgB;AAAA,IAChB,QAAAD;AAAA,IACA,OAAOE;AAAA,MACL,EAAE,WAAWV,EAAGC,EAAO,YAAYO,KAAUP,EAAO,eAAeJ,CAAS,EAAA;AAAA,MAC5EC;AAAA,IAAA;AAAA,EACF,CACD;AACH;AAUO,SAASa,EAAiB,EAAE,WAAAd,GAAW,GAAGC,KAAgC;AAC/E,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,kBAAkBJ,CAAS,GAAI,GAAGC,GAAO;AAC5E;AAIO,SAASc,EAAa,EAAE,WAAAf,GAAW,GAAGC,KAA4B;AACvE,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,cAAcJ,CAAS,GAAI,GAAGC,GAAO;AACxE;AAQO,SAASe,EAAY,EAAE,WAAAhB,GAAW,GAAGC,KAA2B;AACrE,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,aAAaJ,CAAS,GAAI,GAAGC,GAAO;AACvE;AAOO,SAASgB,EAAa,EAAE,WAAAjB,GAAW,GAAGC,KAA4B;AACvE,SAAO,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,cAAcJ,CAAS,GAAI,GAAGC,GAAO;AACxE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/heading/public.js'
|