@knkcs/anker 1.8.0 → 1.9.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.
- package/CLAUDE-ANKER.md +27 -1
- package/README.md +165 -27
- package/dist/atoms/index.js +1 -1
- package/dist/chunk-D5ICTOCW.js +206 -0
- package/dist/chunk-D5ICTOCW.js.map +1 -0
- package/dist/components/index.d.ts +2 -48
- package/dist/components/index.js +69 -253
- package/dist/components/index.js.map +1 -1
- package/dist/feedback/index.js +1 -1
- package/dist/page-header-D-kxNn-f.d.ts +51 -0
- package/dist/templates/index.d.ts +296 -0
- package/dist/templates/index.js +529 -0
- package/dist/templates/index.js.map +1 -0
- package/package.json +5 -1
package/CLAUDE-ANKER.md
CHANGED
|
@@ -65,10 +65,36 @@ The full human-facing spec lives at the anker GitHub Pages docs site (linked fro
|
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
+
## Page templates
|
|
69
|
+
|
|
70
|
+
anker ships canonical page-level templates under `@knkcs/anker/templates`. **Use templates before composing primitives manually.** They guarantee visual parity across knkCMS solutions — module federation will assemble multiple solutions into one browser frame, and inconsistent page chrome will look broken.
|
|
71
|
+
|
|
72
|
+
Available templates:
|
|
73
|
+
|
|
74
|
+
| Template | Use for |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `<AppShell>` | Authenticated chrome (sidebar · main · rail). Provides `usePageActions(node)` and `usePageRail(node)` hooks. |
|
|
77
|
+
| `<IndexPageTemplate>` | List pages — header + optional tabs + toolbar + DataTable |
|
|
78
|
+
| `<DetailPageTemplate>` | Single-entity pages — header + optional tabs + body |
|
|
79
|
+
| `<SettingsPageTemplate>` | Tabbed settings pages with form Cards |
|
|
80
|
+
| `<DashboardPageTemplate>` | Widget-grid overview pages |
|
|
81
|
+
| `<AuthPageTemplate>` | Login, register, MFA, verify — centered card, no shell |
|
|
82
|
+
| `<MarketingPageTemplate>` | Unauthenticated landing pages |
|
|
83
|
+
| `<ErrorPage>` | 404 / 500 / 403 |
|
|
84
|
+
| `<LoadingPage>` | Initial app boot |
|
|
85
|
+
| `<MaintenancePage>` | Service-down screens |
|
|
86
|
+
|
|
87
|
+
**Rule:** if a template doesn't fit your page, file an issue — don't reinvent the layout.
|
|
88
|
+
|
|
89
|
+
Full spec with composition diagrams, slot tables, and authoring rules: `docs/page-patterns.md` in the anker repo (linked from the GitHub Pages docs site).
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
68
93
|
## Pointers
|
|
69
94
|
|
|
70
|
-
- Full spec: anker GitHub Pages docs site (`/design-system`)
|
|
95
|
+
- Full spec: anker GitHub Pages docs site (`/design-system`, `/page-patterns`)
|
|
71
96
|
- Components: `node_modules/@knkcs/anker/dist/{primitives,components,atoms,forms,feedback}`
|
|
97
|
+
- Templates: `import { AppShell, IndexPageTemplate, … } from "@knkcs/anker/templates"`
|
|
72
98
|
- Theme entry: `import system from "@knkcs/anker/theme"`
|
|
73
99
|
- Provider entry: `import { Provider } from "@knkcs/anker/primitives"`
|
|
74
100
|
- Anker development rules (for working *on* anker, not consuming it): `node_modules/@knkcs/anker/CLAUDE.md` is **not** included in the package; see the anker GitHub repo
|
package/README.md
CHANGED
|
@@ -10,29 +10,180 @@ The UI component library for the knk software group. Provides a shared design sy
|
|
|
10
10
|
- Lucide React (icons)
|
|
11
11
|
- Storybook (documentation)
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Setup for consumers
|
|
14
|
+
|
|
15
|
+
This is the canonical setup for any knkCMS solution adopting `@knkcs/anker`. Follow it in order — the rest of the README assumes you've done these steps.
|
|
16
|
+
|
|
17
|
+
### 1. Install
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
20
|
npm install @knkcs/anker
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
Install the peer dependencies (your project may already have them):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install react react-dom @chakra-ui/react react-hook-form @hookform/resolvers zod react-router-dom react-i18next next-themes lucide-react
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`next-themes` powers light/dark mode. `lucide-react` provides icons (anker uses lucide exclusively — never FontAwesome).
|
|
30
|
+
|
|
31
|
+
### 2. Provider tree
|
|
32
|
+
|
|
33
|
+
Mount providers at the root of the React tree:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { Provider } from "@knkcs/anker/primitives";
|
|
37
|
+
import { ConfirmModalProvider } from "@knkcs/anker/feedback";
|
|
38
|
+
import { I18nextProvider } from "react-i18next";
|
|
39
|
+
import i18n from "./i18n";
|
|
40
|
+
|
|
41
|
+
export function Root({ children }) {
|
|
42
|
+
return (
|
|
43
|
+
<Provider>
|
|
44
|
+
<I18nextProvider i18n={i18n}>
|
|
45
|
+
<ConfirmModalProvider>
|
|
46
|
+
{children}
|
|
47
|
+
</ConfirmModalProvider>
|
|
48
|
+
</I18nextProvider>
|
|
49
|
+
</Provider>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `<Provider>` from `@knkcs/anker/primitives` mounts Chakra UI v3 with anker's theme system and wires up `next-themes` for light/dark mode.
|
|
55
|
+
- `<ConfirmModalProvider>` from `@knkcs/anker/feedback` enables `useConfirmModal()` for destructive-action confirmations.
|
|
56
|
+
- `<I18nextProvider>` is the consumer's choice — anker doesn't ship i18n. All anker user-facing strings are props with English defaults; consumers translate them at call sites.
|
|
57
|
+
|
|
58
|
+
### 3. Fonts
|
|
59
|
+
|
|
60
|
+
anker's theme assumes **Inter Tight** (UI) and **JetBrains Mono** (code, IDs, API keys). Load both via Google Fonts in your HTML:
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
64
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
65
|
+
<link
|
|
66
|
+
href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
|
|
67
|
+
rel="stylesheet"
|
|
68
|
+
>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The theme falls back to `system-ui` and `ui-monospace` if the fonts aren't loaded, but the visual character of anker depends on Inter Tight — install it.
|
|
72
|
+
|
|
73
|
+
### 4. Theme
|
|
74
|
+
|
|
75
|
+
anker exports a default theme system that needs no configuration:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import system from "@knkcs/anker/theme";
|
|
79
|
+
import { Provider } from "@knkcs/anker/primitives";
|
|
80
|
+
|
|
81
|
+
<Provider system={system}>{children}</Provider>
|
|
82
|
+
// or simply (uses the default automatically):
|
|
83
|
+
<Provider>{children}</Provider>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
To customize tokens (fonts, radii, brand colors), use `createAnkerTheme(preset)`:
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import { createAnkerTheme, type ThemePreset } from "@knkcs/anker/theme";
|
|
90
|
+
import { Provider } from "@knkcs/anker/primitives";
|
|
91
|
+
|
|
92
|
+
const editorial: ThemePreset = {
|
|
93
|
+
name: "editorial",
|
|
94
|
+
fonts: { heading: "Georgia, serif" },
|
|
95
|
+
radii: { sm: "0", md: "0", lg: "0", xl: "0", "2xl": "0" },
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
<Provider system={createAnkerTheme(editorial)}>{children}</Provider>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Presets override token layers (colors, semanticTokens, textStyles, fonts, radii, durations, easings) while preserving every component recipe and structural default. See `docs/design-system.md` for the full preset reference.
|
|
102
|
+
|
|
103
|
+
### 5. CLAUDE-ANKER.md (Claude Code consumers)
|
|
104
|
+
|
|
105
|
+
If your project uses Claude Code, `@`-import anker's design-system rules into your root `CLAUDE.md`:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
@node_modules/@knkcs/anker/CLAUDE-ANKER.md
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Claude will then follow anker's design principles, token rules, page templates, and component conventions when assisting with your code. The file is included in the npm tarball (no separate install).
|
|
112
|
+
|
|
113
|
+
### 6. Disabling parts of the system
|
|
114
|
+
|
|
115
|
+
You can opt out of anker subsystems if you don't need them:
|
|
116
|
+
|
|
117
|
+
- **Opt out of the sidebar / app shell** — use `<AuthPageTemplate>`, `<MarketingPageTemplate>`, or `<ErrorPage>` from `@knkcs/anker/templates`. They render no sidebar at all.
|
|
118
|
+
- **Opt out of the rail column** — pass `rail={null}` (or omit) to `<AppShell>`. The grid drops to two columns and the main column expands.
|
|
119
|
+
- **Opt out of dark mode** — don't wire `next-themes`. anker's tokens are defined for both modes, but if you never toggle the mode, only light renders.
|
|
120
|
+
- **Opt out of the confirm modal** — don't mount `<ConfirmModalProvider>`. This is only safe if your code never calls `useConfirmModal()` and you don't use any anker components that depend on it (currently none do — it's a consumer-only API).
|
|
121
|
+
- **Opt out of i18n** — use anker components without wrapping them in `<I18nextProvider>`. They'll fall back to English defaults.
|
|
122
|
+
|
|
123
|
+
### 7. Hello world
|
|
124
|
+
|
|
125
|
+
Minimal consumer app — sidebar, page-header, table.
|
|
20
126
|
|
|
21
127
|
```tsx
|
|
22
128
|
import { Provider } from "@knkcs/anker/primitives";
|
|
129
|
+
import { ConfirmModalProvider } from "@knkcs/anker/feedback";
|
|
130
|
+
import {
|
|
131
|
+
AppShell,
|
|
132
|
+
IndexPageTemplate,
|
|
133
|
+
} from "@knkcs/anker/templates";
|
|
134
|
+
import { Sidebar, Toolbar } from "@knkcs/anker/components";
|
|
135
|
+
import { Button } from "@knkcs/anker/atoms";
|
|
136
|
+
import { Users, Plus } from "lucide-react";
|
|
23
137
|
|
|
24
138
|
function App() {
|
|
25
139
|
return (
|
|
26
140
|
<Provider>
|
|
27
|
-
<
|
|
141
|
+
<ConfirmModalProvider>
|
|
142
|
+
<AppShell
|
|
143
|
+
sidebar={
|
|
144
|
+
<Sidebar storageKey="myapp-sidebar">
|
|
145
|
+
<Sidebar.Header>
|
|
146
|
+
<Sidebar.Logo wordmark="MyApp" />
|
|
147
|
+
</Sidebar.Header>
|
|
148
|
+
<Sidebar.Body>
|
|
149
|
+
<Sidebar.Section label="Identity">
|
|
150
|
+
<Sidebar.Item icon={<Users size={16} />} active>
|
|
151
|
+
Users
|
|
152
|
+
</Sidebar.Item>
|
|
153
|
+
</Sidebar.Section>
|
|
154
|
+
</Sidebar.Body>
|
|
155
|
+
</Sidebar>
|
|
156
|
+
}
|
|
157
|
+
>
|
|
158
|
+
<IndexPageTemplate
|
|
159
|
+
title="Users"
|
|
160
|
+
subtitle="People with access to this workspace."
|
|
161
|
+
actions={
|
|
162
|
+
<Button colorPalette="primary" size="sm">
|
|
163
|
+
<Plus size={14} /> Add user
|
|
164
|
+
</Button>
|
|
165
|
+
}
|
|
166
|
+
toolbar={
|
|
167
|
+
<Toolbar>
|
|
168
|
+
<Toolbar.Search placeholder="Search…" value="" onChange={() => {}} />
|
|
169
|
+
<Toolbar.Right>
|
|
170
|
+
<Toolbar.Count>0 users</Toolbar.Count>
|
|
171
|
+
</Toolbar.Right>
|
|
172
|
+
</Toolbar>
|
|
173
|
+
}
|
|
174
|
+
>
|
|
175
|
+
{/* DataTable goes here */}
|
|
176
|
+
</IndexPageTemplate>
|
|
177
|
+
</AppShell>
|
|
178
|
+
</ConfirmModalProvider>
|
|
28
179
|
</Provider>
|
|
29
180
|
);
|
|
30
181
|
}
|
|
31
182
|
```
|
|
32
183
|
|
|
33
|
-
|
|
184
|
+
This is the canonical wiring. Every list page in every knkCMS solution looks like this — that's the contract.
|
|
34
185
|
|
|
35
|
-
|
|
186
|
+
## Imports by layer
|
|
36
187
|
|
|
37
188
|
```tsx
|
|
38
189
|
// Design tokens and Chakra system
|
|
@@ -52,17 +203,10 @@ import { InputField, ArrayField, FormField } from "@knkcs/anker/forms";
|
|
|
52
203
|
|
|
53
204
|
// Feedback patterns (confirm modal)
|
|
54
205
|
import { ConfirmModalProvider, useConfirmModal } from "@knkcs/anker/feedback";
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Using with Claude Code
|
|
58
|
-
|
|
59
|
-
If your consumer project uses Claude Code, add this line to your root `CLAUDE.md` to import anker's design-system rules automatically:
|
|
60
206
|
|
|
207
|
+
// Page-level templates (AppShell, IndexPageTemplate, …)
|
|
208
|
+
import { AppShell, IndexPageTemplate, DetailPageTemplate } from "@knkcs/anker/templates";
|
|
61
209
|
```
|
|
62
|
-
@node_modules/@knkcs/anker/CLAUDE-ANKER.md
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Claude will then follow anker's design principles, token rules, and component conventions when assisting with your code.
|
|
66
210
|
|
|
67
211
|
## Brand Colors
|
|
68
212
|
|
|
@@ -95,19 +239,7 @@ The UI primary anchor (`primary.700` = `#134788`) is intentionally one step ligh
|
|
|
95
239
|
|
|
96
240
|
## Font
|
|
97
241
|
|
|
98
|
-
The theme uses
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
npm install @fontsource-variable/inter
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Then import it in your app entry point:
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import "@fontsource-variable/inter";
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
If Inter is not installed, the theme gracefully falls back to the system font stack (`-apple-system, system-ui, sans-serif`).
|
|
242
|
+
The theme uses **Inter Tight** (UI) and **JetBrains Mono** (code, IDs, API keys). See the "Setup for consumers → Fonts" section above for installation instructions. The theme falls back to `system-ui` and `ui-monospace` if the fonts aren't loaded, but Inter Tight is the visual character anker is designed around — install it.
|
|
111
243
|
|
|
112
244
|
## Accessibility
|
|
113
245
|
|
|
@@ -135,6 +267,12 @@ npm run typecheck # tsc --noEmit
|
|
|
135
267
|
|
|
136
268
|
Interactive component docs are available at [https://knkcs.github.io/anker/](https://knkcs.github.io/anker/)
|
|
137
269
|
|
|
270
|
+
Reference documents in this repo:
|
|
271
|
+
|
|
272
|
+
- [`docs/design-system.md`](docs/design-system.md) — visual language: tokens, typography, motion. Read first.
|
|
273
|
+
- [`docs/page-patterns.md`](docs/page-patterns.md) — page-level contract: app shell, templates, slot mechanism, authoring rules.
|
|
274
|
+
- [`CLAUDE-ANKER.md`](CLAUDE-ANKER.md) — design-system rules consumers `@`-import into their `CLAUDE.md`.
|
|
275
|
+
|
|
138
276
|
## License
|
|
139
277
|
|
|
140
278
|
Proprietary - knk Gruppe. See [LICENSE](LICENSE) for details.
|
package/dist/atoms/index.js
CHANGED
|
@@ -6,9 +6,9 @@ export { SearchInput } from '../chunk-E7KRPPCQ.js';
|
|
|
6
6
|
import { Textarea } from '../chunk-NFZMG6ZL.js';
|
|
7
7
|
import { text_input_default } from '../chunk-OU6H3KU4.js';
|
|
8
8
|
export { text_input_default as TextInput } from '../chunk-OU6H3KU4.js';
|
|
9
|
-
import { Spinner } from '../chunk-5YDCDC4B.js';
|
|
10
9
|
import { IconButton, Button } from '../chunk-JS7ZEZV3.js';
|
|
11
10
|
export { Button, IconButton } from '../chunk-JS7ZEZV3.js';
|
|
11
|
+
import { Spinner } from '../chunk-5YDCDC4B.js';
|
|
12
12
|
import { Text, Box, Stack as Stack$1, Flex, HStack, Heading } from '../chunk-G4QMIXLC.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
import { DataList as DataList$1, Icon, Circle, useCheckboxGroup, Stack, Box as Box$1, Clipboard, IconButton as IconButton$1, Input, chakra, ButtonGroup, Button as Button$1, Square } from '@chakra-ui/react';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { Box, Flex, Text, Heading, Link } from './chunk-G4QMIXLC.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var SIZE_TO_WIDTH = {
|
|
5
|
+
md: "440px",
|
|
6
|
+
lg: "480px"
|
|
7
|
+
};
|
|
8
|
+
var DOT_PATTERN_BG = "radial-gradient(var(--chakra-colors-primary-200) 1px, transparent 1px)";
|
|
9
|
+
var AuthCard = ({
|
|
10
|
+
logo,
|
|
11
|
+
topBarRight,
|
|
12
|
+
hideTopBar = false,
|
|
13
|
+
hideBackground = false,
|
|
14
|
+
eyebrow,
|
|
15
|
+
title,
|
|
16
|
+
subtitle,
|
|
17
|
+
size = "md",
|
|
18
|
+
footer,
|
|
19
|
+
children
|
|
20
|
+
}) => {
|
|
21
|
+
return /* @__PURE__ */ jsx(Box, { "data-testid": "auth-card", "data-size": size, minH: "100vh", bg: "bg-canvas", children: /* @__PURE__ */ jsxs(
|
|
22
|
+
Box,
|
|
23
|
+
{
|
|
24
|
+
"data-testid": "auth-card-canvas",
|
|
25
|
+
"data-background": hideBackground ? "hidden" : "visible",
|
|
26
|
+
minH: "100vh",
|
|
27
|
+
bgImage: hideBackground ? void 0 : DOT_PATTERN_BG,
|
|
28
|
+
bgSize: "24px 24px",
|
|
29
|
+
children: [
|
|
30
|
+
!hideTopBar && /* @__PURE__ */ jsxs(
|
|
31
|
+
Flex,
|
|
32
|
+
{
|
|
33
|
+
align: "center",
|
|
34
|
+
justify: "space-between",
|
|
35
|
+
px: "8",
|
|
36
|
+
py: "4",
|
|
37
|
+
bg: "bg-surface/85",
|
|
38
|
+
backdropFilter: "blur(4px)",
|
|
39
|
+
borderBottom: "1px solid",
|
|
40
|
+
borderColor: "border",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx(Box, { children: logo }),
|
|
43
|
+
/* @__PURE__ */ jsx(Flex, { gap: "4", fontSize: "xs", color: "muted", children: topBarRight })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx(Flex, { justify: "center", pt: "16", px: "4", children: /* @__PURE__ */ jsxs(
|
|
48
|
+
Box,
|
|
49
|
+
{
|
|
50
|
+
w: "full",
|
|
51
|
+
maxW: SIZE_TO_WIDTH[size],
|
|
52
|
+
bg: "bg-surface",
|
|
53
|
+
borderRadius: "lg",
|
|
54
|
+
shadow: "md",
|
|
55
|
+
p: "8",
|
|
56
|
+
children: [
|
|
57
|
+
eyebrow && /* @__PURE__ */ jsx(
|
|
58
|
+
Text,
|
|
59
|
+
{
|
|
60
|
+
textStyle: "overline",
|
|
61
|
+
color: "muted",
|
|
62
|
+
textAlign: "center",
|
|
63
|
+
mb: "2",
|
|
64
|
+
children: eyebrow
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
title && /* @__PURE__ */ jsx(
|
|
68
|
+
Heading,
|
|
69
|
+
{
|
|
70
|
+
as: "h3",
|
|
71
|
+
size: "2xl",
|
|
72
|
+
fontWeight: "semibold",
|
|
73
|
+
color: "default",
|
|
74
|
+
textAlign: "center",
|
|
75
|
+
mb: "2",
|
|
76
|
+
letterSpacing: "-0.02em",
|
|
77
|
+
children: title
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
subtitle && /* @__PURE__ */ jsx(Text, { color: "muted", textAlign: "center", fontSize: "sm", mb: "6", children: subtitle }),
|
|
81
|
+
children,
|
|
82
|
+
footer && /* @__PURE__ */ jsx(
|
|
83
|
+
Box,
|
|
84
|
+
{
|
|
85
|
+
"data-testid": "auth-card-footer",
|
|
86
|
+
mt: "6",
|
|
87
|
+
pt: "4",
|
|
88
|
+
borderTop: "1px solid",
|
|
89
|
+
borderColor: "border",
|
|
90
|
+
textAlign: "center",
|
|
91
|
+
fontSize: "xs",
|
|
92
|
+
color: "emphasized",
|
|
93
|
+
children: footer
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
) })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
) });
|
|
102
|
+
};
|
|
103
|
+
AuthCard.displayName = "AuthCard";
|
|
104
|
+
var PageHeader = ({
|
|
105
|
+
breadcrumbs,
|
|
106
|
+
title,
|
|
107
|
+
subtitle,
|
|
108
|
+
actions,
|
|
109
|
+
eyebrow
|
|
110
|
+
}) => {
|
|
111
|
+
const hasCrumbs = !!breadcrumbs && breadcrumbs.length > 0;
|
|
112
|
+
const hasActions = !!actions;
|
|
113
|
+
return /* @__PURE__ */ jsxs(
|
|
114
|
+
Box,
|
|
115
|
+
{
|
|
116
|
+
py: "4",
|
|
117
|
+
px: "8",
|
|
118
|
+
borderBottomWidth: "1px",
|
|
119
|
+
borderBottomColor: "border",
|
|
120
|
+
bg: "bg-surface",
|
|
121
|
+
children: [
|
|
122
|
+
eyebrow && /* @__PURE__ */ jsx(
|
|
123
|
+
Text,
|
|
124
|
+
{
|
|
125
|
+
fontSize: "2xs",
|
|
126
|
+
fontWeight: "semibold",
|
|
127
|
+
letterSpacing: "wider",
|
|
128
|
+
textTransform: "uppercase",
|
|
129
|
+
color: "muted",
|
|
130
|
+
mb: "1",
|
|
131
|
+
children: eyebrow
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
hasCrumbs && /* @__PURE__ */ jsx(
|
|
135
|
+
Flex,
|
|
136
|
+
{
|
|
137
|
+
"data-testid": "page-header-breadcrumbs",
|
|
138
|
+
align: "center",
|
|
139
|
+
gap: "1",
|
|
140
|
+
mb: "1",
|
|
141
|
+
fontSize: "xs",
|
|
142
|
+
color: "muted",
|
|
143
|
+
children: breadcrumbs.map((c, idx) => {
|
|
144
|
+
const isLast = idx === breadcrumbs.length - 1;
|
|
145
|
+
const sep = !isLast ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: " \u203A " }) : null;
|
|
146
|
+
const node = c.to ? /* @__PURE__ */ jsx(
|
|
147
|
+
Link,
|
|
148
|
+
{
|
|
149
|
+
href: c.to,
|
|
150
|
+
color: "muted",
|
|
151
|
+
_hover: { color: "default" },
|
|
152
|
+
children: c.label
|
|
153
|
+
},
|
|
154
|
+
`crumb-link-${c.label}`
|
|
155
|
+
) : /* @__PURE__ */ jsx(
|
|
156
|
+
Text,
|
|
157
|
+
{
|
|
158
|
+
as: "span",
|
|
159
|
+
color: isLast ? "default" : "muted",
|
|
160
|
+
fontWeight: isLast ? "medium" : "normal",
|
|
161
|
+
children: c.label
|
|
162
|
+
},
|
|
163
|
+
`crumb-text-${c.label}`
|
|
164
|
+
);
|
|
165
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "1", children: [
|
|
166
|
+
node,
|
|
167
|
+
sep
|
|
168
|
+
] }, `crumb-wrap-${c.label}`);
|
|
169
|
+
})
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", justify: "space-between", gap: "4", children: [
|
|
173
|
+
/* @__PURE__ */ jsxs(Box, { flex: "1", minW: "0", children: [
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
Heading,
|
|
176
|
+
{
|
|
177
|
+
as: "h1",
|
|
178
|
+
fontSize: "2xl",
|
|
179
|
+
fontWeight: "semibold",
|
|
180
|
+
color: "default",
|
|
181
|
+
letterSpacing: "-0.02em",
|
|
182
|
+
children: title
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
subtitle && /* @__PURE__ */ jsx(
|
|
186
|
+
Text,
|
|
187
|
+
{
|
|
188
|
+
"data-testid": "page-header-subtitle",
|
|
189
|
+
fontSize: "sm",
|
|
190
|
+
color: "muted",
|
|
191
|
+
mt: "1",
|
|
192
|
+
children: subtitle
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
] }),
|
|
196
|
+
hasActions && /* @__PURE__ */ jsx(Flex, { align: "center", gap: "2", flexShrink: 0, children: actions })
|
|
197
|
+
] })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
PageHeader.displayName = "PageHeader";
|
|
203
|
+
|
|
204
|
+
export { AuthCard, PageHeader };
|
|
205
|
+
//# sourceMappingURL=chunk-D5ICTOCW.js.map
|
|
206
|
+
//# sourceMappingURL=chunk-D5ICTOCW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/auth-card.tsx","../src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AA,WAAA,EAAc,CAAA,CAAE,KAAK,CAAA,CAGhC,CAAA;AAAA,YAEF,CAAC;AAAA;AAAA,SACF;AAAA,wBAGDA,KAAC,IAAA,EAAA,EAAK,KAAA,EAAM,UAAS,OAAA,EAAQ,eAAA,EAAgB,KAAI,GAAA,EAChD,QAAA,EAAA;AAAA,0BAAAA,IAAAA,CAAC,GAAA,EAAA,EAAI,IAAA,EAAK,GAAA,EAAI,MAAK,GAAA,EAClB,QAAA,EAAA;AAAA,4BAAAC,GAAAA;AAAA,cAAC,OAAA;AAAA,cAAA;AAAA,gBACA,EAAA,EAAG,IAAA;AAAA,gBACH,QAAA,EAAS,KAAA;AAAA,gBACT,UAAA,EAAW,UAAA;AAAA,gBACX,KAAA,EAAM,SAAA;AAAA,gBACN,aAAA,EAAc,SAAA;AAAA,gBAEb,QAAA,EAAA;AAAA;AAAA,aACF;AAAA,YACC,4BACAA,GAAAA;AAAA,cAAC,IAAA;AAAA,cAAA;AAAA,gBACA,aAAA,EAAY,sBAAA;AAAA,gBACZ,QAAA,EAAS,IAAA;AAAA,gBACT,KAAA,EAAM,OAAA;AAAA,gBACN,EAAA,EAAG,GAAA;AAAA,gBAEF,QAAA,EAAA;AAAA;AAAA;AACF,WAAA,EAEF,CAAA;AAAA,UACC,UAAA,oBACAA,GAAAA,CAAC,IAAA,EAAA,EAAK,KAAA,EAAM,UAAS,GAAA,EAAI,GAAA,EAAI,UAAA,EAAY,CAAA,EACvC,QAAA,EAAA,OAAA,EACF;AAAA,SAAA,EAEF;AAAA;AAAA;AAAA,GACD;AAEF;AACA,UAAA,CAAW,WAAA,GAAc,YAAA","file":"chunk-D5ICTOCW.js","sourcesContent":["// src/components/auth-card.tsx\nimport type React from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Text } from \"../primitives/typography\";\n\nexport interface AuthCardProps {\n\t/** Logo or wordmark, far-left of the topbar. */\n\tlogo?: React.ReactNode;\n\t/** Right-side topbar content (help link, locale switcher, etc.). */\n\ttopBarRight?: React.ReactNode;\n\t/** Hide the topbar entirely (rare — e.g. embedded preview). */\n\thideTopBar?: boolean;\n\t/** Hide the dot-grid background (rare — e.g. printable). */\n\thideBackground?: boolean;\n\t/** Small uppercase eyebrow above the title. */\n\teyebrow?: React.ReactNode;\n\t/**\n\t * Card title. Accepts a string or inline element — the component wraps\n\t * it in an `<h3>` (semantic heading, 24px, semibold, default color).\n\t * Avoid passing block elements (e.g. `<div>`) or pre-built headings.\n\t */\n\ttitle?: React.ReactNode;\n\t/** Subtitle below title (14px, muted color, centered). */\n\tsubtitle?: React.ReactNode;\n\t/** Card width preset. md = 440px (default), lg = 480px. */\n\tsize?: \"md\" | \"lg\";\n\t/** Card footer slot. Bottom-bordered inside the card. */\n\tfooter?: React.ReactNode;\n\t/** Page content inside the card body. */\n\tchildren: React.ReactNode;\n}\n\nconst SIZE_TO_WIDTH: Record<NonNullable<AuthCardProps[\"size\"]>, string> = {\n\tmd: \"440px\",\n\tlg: \"480px\",\n};\n\nconst DOT_PATTERN_BG =\n\t\"radial-gradient(var(--chakra-colors-primary-200) 1px, transparent 1px)\";\n\nexport const AuthCard = ({\n\tlogo,\n\ttopBarRight,\n\thideTopBar = false,\n\thideBackground = false,\n\teyebrow,\n\ttitle,\n\tsubtitle,\n\tsize = \"md\",\n\tfooter,\n\tchildren,\n}: AuthCardProps) => {\n\treturn (\n\t\t<Box data-testid=\"auth-card\" data-size={size} minH=\"100vh\" bg=\"bg-canvas\">\n\t\t\t<Box\n\t\t\t\tdata-testid=\"auth-card-canvas\"\n\t\t\t\tdata-background={hideBackground ? \"hidden\" : \"visible\"}\n\t\t\t\tminH=\"100vh\"\n\t\t\t\tbgImage={hideBackground ? undefined : DOT_PATTERN_BG}\n\t\t\t\tbgSize=\"24px 24px\"\n\t\t\t>\n\t\t\t\t{!hideTopBar && (\n\t\t\t\t\t<Flex\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t\t\tpx=\"8\"\n\t\t\t\t\t\tpy=\"4\"\n\t\t\t\t\t\tbg=\"bg-surface/85\"\n\t\t\t\t\t\tbackdropFilter=\"blur(4px)\"\n\t\t\t\t\t\tborderBottom=\"1px solid\"\n\t\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Box>{logo}</Box>\n\t\t\t\t\t\t<Flex gap=\"4\" fontSize=\"xs\" color=\"muted\">\n\t\t\t\t\t\t\t{topBarRight}\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</Flex>\n\t\t\t\t)}\n\n\t\t\t\t<Flex justify=\"center\" pt=\"16\" px=\"4\">\n\t\t\t\t\t<Box\n\t\t\t\t\t\tw=\"full\"\n\t\t\t\t\t\tmaxW={SIZE_TO_WIDTH[size]}\n\t\t\t\t\t\tbg=\"bg-surface\"\n\t\t\t\t\t\tborderRadius=\"lg\"\n\t\t\t\t\t\tshadow=\"md\"\n\t\t\t\t\t\tp=\"8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{eyebrow && (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\ttextStyle=\"overline\"\n\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t\tmb=\"2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{eyebrow}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{title && (\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tas=\"h3\"\n\t\t\t\t\t\t\t\tsize=\"2xl\"\n\t\t\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t\tmb=\"2\"\n\t\t\t\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{subtitle && (\n\t\t\t\t\t\t\t<Text color=\"muted\" textAlign=\"center\" fontSize=\"sm\" mb=\"6\">\n\t\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{children}\n\n\t\t\t\t\t\t{footer && (\n\t\t\t\t\t\t\t<Box\n\t\t\t\t\t\t\t\tdata-testid=\"auth-card-footer\"\n\t\t\t\t\t\t\t\tmt=\"6\"\n\t\t\t\t\t\t\t\tpt=\"4\"\n\t\t\t\t\t\t\t\tborderTop=\"1px solid\"\n\t\t\t\t\t\t\t\tborderColor=\"border\"\n\t\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t\tfontSize=\"xs\"\n\t\t\t\t\t\t\t\tcolor=\"emphasized\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{footer}\n\t\t\t\t\t\t\t</Box>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Box>\n\t\t\t\t</Flex>\n\t\t\t</Box>\n\t\t</Box>\n\t);\n};\nAuthCard.displayName = \"AuthCard\";\n","// src/components/page-header.tsx\nimport type React from \"react\";\nimport { Box, Flex } from \"../primitives/layout\";\nimport { Heading, Link, Text } from \"../primitives/typography\";\n\nexport interface PageHeaderBreadcrumb {\n\tlabel: string;\n\tto?: string;\n}\n\nexport interface PageHeaderProps {\n\tbreadcrumbs?: PageHeaderBreadcrumb[];\n\ttitle: React.ReactNode;\n\tsubtitle?: React.ReactNode;\n\tactions?: React.ReactNode;\n\teyebrow?: React.ReactNode;\n}\n\nexport const PageHeader = ({\n\tbreadcrumbs,\n\ttitle,\n\tsubtitle,\n\tactions,\n\teyebrow,\n}: PageHeaderProps) => {\n\tconst hasCrumbs = !!breadcrumbs && breadcrumbs.length > 0;\n\tconst hasActions = !!actions;\n\n\treturn (\n\t\t<Box\n\t\t\tpy=\"4\"\n\t\t\tpx=\"8\"\n\t\t\tborderBottomWidth=\"1px\"\n\t\t\tborderBottomColor=\"border\"\n\t\t\tbg=\"bg-surface\"\n\t\t>\n\t\t\t{eyebrow && (\n\t\t\t\t<Text\n\t\t\t\t\tfontSize=\"2xs\"\n\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\tletterSpacing=\"wider\"\n\t\t\t\t\ttextTransform=\"uppercase\"\n\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\tmb=\"1\"\n\t\t\t\t>\n\t\t\t\t\t{eyebrow}\n\t\t\t\t</Text>\n\t\t\t)}\n\n\t\t\t{hasCrumbs && (\n\t\t\t\t<Flex\n\t\t\t\t\tdata-testid=\"page-header-breadcrumbs\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap=\"1\"\n\t\t\t\t\tmb=\"1\"\n\t\t\t\t\tfontSize=\"xs\"\n\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t>\n\t\t\t\t\t{breadcrumbs.map((c, idx) => {\n\t\t\t\t\t\tconst isLast = idx === breadcrumbs.length - 1;\n\t\t\t\t\t\tconst sep = !isLast ? <span aria-hidden> › </span> : null;\n\t\t\t\t\t\tconst node = c.to ? (\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tkey={`crumb-link-${c.label}`}\n\t\t\t\t\t\t\t\thref={c.to}\n\t\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\t\t_hover={{ color: \"default\" }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{c.label}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tkey={`crumb-text-${c.label}`}\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tcolor={isLast ? \"default\" : \"muted\"}\n\t\t\t\t\t\t\t\tfontWeight={isLast ? \"medium\" : \"normal\"}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{c.label}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Flex key={`crumb-wrap-${c.label}`} align=\"center\" gap=\"1\">\n\t\t\t\t\t\t\t\t{node}\n\t\t\t\t\t\t\t\t{sep}\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Flex>\n\t\t\t)}\n\n\t\t\t<Flex align=\"center\" justify=\"space-between\" gap=\"4\">\n\t\t\t\t<Box flex=\"1\" minW=\"0\">\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tas=\"h1\"\n\t\t\t\t\t\tfontSize=\"2xl\"\n\t\t\t\t\t\tfontWeight=\"semibold\"\n\t\t\t\t\t\tcolor=\"default\"\n\t\t\t\t\t\tletterSpacing=\"-0.02em\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{subtitle && (\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tdata-testid=\"page-header-subtitle\"\n\t\t\t\t\t\t\tfontSize=\"sm\"\n\t\t\t\t\t\t\tcolor=\"muted\"\n\t\t\t\t\t\t\tmt=\"1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t)}\n\t\t\t\t</Box>\n\t\t\t\t{hasActions && (\n\t\t\t\t\t<Flex align=\"center\" gap=\"2\" flexShrink={0}>\n\t\t\t\t\t\t{actions}\n\t\t\t\t\t</Flex>\n\t\t\t\t)}\n\t\t\t</Flex>\n\t\t</Box>\n\t);\n};\nPageHeader.displayName = \"PageHeader\";\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { A as AuthCard, a as AuthCardProps, P as PageHeader, b as PageHeaderBreadcrumb, c as PageHeaderProps } from '../page-header-D-kxNn-f.js';
|
|
1
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import * as React$1 from 'react';
|
|
3
4
|
import React__default, { MouseEventHandler } from 'react';
|
|
@@ -6,37 +7,6 @@ export { TreeCollection, createTreeCollection } from '@chakra-ui/react';
|
|
|
6
7
|
import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, Row } from '@tanstack/react-table';
|
|
7
8
|
import { a as SwitchProps } from '../switch-B0o6G2XE.js';
|
|
8
9
|
|
|
9
|
-
interface AuthCardProps {
|
|
10
|
-
/** Logo or wordmark, far-left of the topbar. */
|
|
11
|
-
logo?: React__default.ReactNode;
|
|
12
|
-
/** Right-side topbar content (help link, locale switcher, etc.). */
|
|
13
|
-
topBarRight?: React__default.ReactNode;
|
|
14
|
-
/** Hide the topbar entirely (rare — e.g. embedded preview). */
|
|
15
|
-
hideTopBar?: boolean;
|
|
16
|
-
/** Hide the dot-grid background (rare — e.g. printable). */
|
|
17
|
-
hideBackground?: boolean;
|
|
18
|
-
/** Small uppercase eyebrow above the title. */
|
|
19
|
-
eyebrow?: React__default.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Card title. Accepts a string or inline element — the component wraps
|
|
22
|
-
* it in an `<h3>` (semantic heading, 24px, semibold, default color).
|
|
23
|
-
* Avoid passing block elements (e.g. `<div>`) or pre-built headings.
|
|
24
|
-
*/
|
|
25
|
-
title?: React__default.ReactNode;
|
|
26
|
-
/** Subtitle below title (14px, muted color, centered). */
|
|
27
|
-
subtitle?: React__default.ReactNode;
|
|
28
|
-
/** Card width preset. md = 440px (default), lg = 480px. */
|
|
29
|
-
size?: "md" | "lg";
|
|
30
|
-
/** Card footer slot. Bottom-bordered inside the card. */
|
|
31
|
-
footer?: React__default.ReactNode;
|
|
32
|
-
/** Page content inside the card body. */
|
|
33
|
-
children: React__default.ReactNode;
|
|
34
|
-
}
|
|
35
|
-
declare const AuthCard: {
|
|
36
|
-
({ logo, topBarRight, hideTopBar, hideBackground, eyebrow, title, subtitle, size, footer, children, }: AuthCardProps): react_jsx_runtime.JSX.Element;
|
|
37
|
-
displayName: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
10
|
interface BulkActionBarProps {
|
|
41
11
|
/** Number of currently selected items. */
|
|
42
12
|
selectedCount: number;
|
|
@@ -500,22 +470,6 @@ interface ModalProps extends Omit<DialogRootProps, "open" | "onOpenChange"> {
|
|
|
500
470
|
}
|
|
501
471
|
declare const Modal: React.FC<ModalProps>;
|
|
502
472
|
|
|
503
|
-
interface PageHeaderBreadcrumb {
|
|
504
|
-
label: string;
|
|
505
|
-
to?: string;
|
|
506
|
-
}
|
|
507
|
-
interface PageHeaderProps {
|
|
508
|
-
breadcrumbs?: PageHeaderBreadcrumb[];
|
|
509
|
-
title: React__default.ReactNode;
|
|
510
|
-
subtitle?: React__default.ReactNode;
|
|
511
|
-
actions?: React__default.ReactNode;
|
|
512
|
-
eyebrow?: React__default.ReactNode;
|
|
513
|
-
}
|
|
514
|
-
declare const PageHeader: {
|
|
515
|
-
({ breadcrumbs, title, subtitle, actions, eyebrow, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
516
|
-
displayName: string;
|
|
517
|
-
};
|
|
518
|
-
|
|
519
473
|
interface PaginationProps {
|
|
520
474
|
/** Current page (1-based). */
|
|
521
475
|
page: number;
|
|
@@ -943,4 +897,4 @@ interface WidgetProps {
|
|
|
943
897
|
}
|
|
944
898
|
declare const Widget: React__default.FC<WidgetProps>;
|
|
945
899
|
|
|
946
|
-
export { ActionCell, type ActionCellAction, type ActionCellProps,
|
|
900
|
+
export { ActionCell, type ActionCellAction, type ActionCellProps, BooleanCell, type BooleanCellProps, BulkActionBar, type BulkActionBarProps, type BulkActionProps, type BulkPopoverActionProps, Card, CardList, CardListData, type CardListDataProps, CardListItem, type CardListItemProps, type CardListMenuItem, type CardListProps, type CardProps, ChipPicker, type ChipPickerProps, CodeCell, type CodeCellProps, ColorSwatchCell, type ColorSwatchCellProps, ContextRail, type ContextRailHeaderProps, type ContextRailProps, type ContextRailSectionProps, CountCell, type CountCellProps, DataTable, type DataTableProps, DateCell, type DateCellProps, type DrawerProps, DrawerRoot, FactBox, type FactBoxAction, type FactBoxProps, InlineCreatableList, type InlineCreatableListProps, LabeledSwitch, type LabeledSwitchProps, LinkCell, type LinkCellProps, MenuCell, type MenuCellAction, type MenuCellProps, Modal, type ModalProps, NumberCell, type NumberCellProps, Pagination, type PaginationProps, SelectableCard, type SelectableCardBodyProps, type SelectableCardFooterProps, type SelectableCardProps, type SelectableCardThumbnailProps, Sidebar, type SidebarItemProps, type SidebarLogoProps, type SidebarSectionProps$1 as SidebarNavSectionProps, type SidebarProps, SidebarSection, type SidebarSectionProps, type SidebarUserMenuItemProps, type SidebarUserMenuProps, SlugCell, type SlugCellProps, StatusBadgeCell, type StatusBadgeCellProps, Stepper, StepperCompleted, StepperContainer, StepperContent, type StepperContentProps, StepperIcon, type StepperIconProps, type StepperProps, StepperProvider, StepperSeparator, type StepperSeparatorProps, StepperStep, type StepperStepProps, StepperStepTitle, StepperSteps, type StepperStepsProps, SwitchCell, type SwitchCellProps, CardList as Table, CardListData as TableData, type CardListDataProps as TableDataProps, CardListItem as TableItem, type CardListItemProps as TableItemProps, type CardListMenuItem as TableMenuItem, type CardListProps as TableProps, TimelineConnector, TimelineContent, TimelineDescription, TimelineIndicator, TimelineItem, type TimelineItemProps, TimelineRoot, type TimelineRootProps, TimelineSeparator, TimelineTitle, Toolbar, type ToolbarFilterChipProps, type ToolbarSearchProps, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, type TreeViewBranchProps, TreeViewBranchText, TreeViewBranchTrigger, TreeViewItem, TreeViewItemIndicator, type TreeViewItemProps, TreeViewItemText, TreeViewLabel, TreeViewNode, TreeViewRoot, type TreeViewRootProps, TreeViewTree, TruncatedTextCell, type TruncatedTextCellProps, UploadDropZone, type UploadDropZoneProps, UrlCell, type UrlCellProps, type UseStepProps, type UseStepperProps, type UseStepperReturn, Widget, type WidgetProps, emptyCellValue, pluralize, truncateText, useSidebarContext, useStep, useStepper, useStepperContext, useStepperNextButton, useStepperPrevButton };
|