@rfdtech/components 1.4.0 → 1.7.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/README.md +457 -153
- package/dist/components/app-switcher/AppSwitcher.d.ts +1 -1
- package/dist/components/app-switcher/AppSwitcher.d.ts.map +1 -1
- package/dist/components/app-switcher/index.d.ts +1 -5
- package/dist/components/app-switcher/index.d.ts.map +1 -1
- package/dist/components/badge/Badge.d.ts +4 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.test.d.ts +2 -0
- package/dist/components/badge/Badge.test.d.ts.map +1 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/components/breadcrumb/Breadcrumb.test.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/bulk-import-modal/BulkImportModal.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/hooks/useBulkImportFlow.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/internal/FieldMappingSelect.d.ts +0 -1
- package/dist/components/bulk-import-modal/internal/FieldMappingSelect.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/steps/ValidateDataStep.d.ts +2 -1
- package/dist/components/bulk-import-modal/steps/ValidateDataStep.d.ts.map +1 -1
- package/dist/components/button/Button.d.ts +4 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.test.d.ts +2 -0
- package/dist/components/button/Button.test.d.ts.map +1 -0
- package/dist/components/button/Spinner.d.ts +8 -0
- package/dist/components/button/Spinner.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +4 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.test.d.ts +2 -0
- package/dist/components/checkbox/Checkbox.test.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/command/Command.d.ts +18 -0
- package/dist/components/command/Command.d.ts.map +1 -0
- package/dist/components/command/Command.test.d.ts +2 -0
- package/dist/components/command/Command.test.d.ts.map +1 -0
- package/dist/components/command/CommandDialogContext.d.ts +10 -0
- package/dist/components/command/CommandDialogContext.d.ts.map +1 -0
- package/dist/components/command/hooks/parseCommandShortcut.d.ts +11 -0
- package/dist/components/command/hooks/parseCommandShortcut.d.ts.map +1 -0
- package/dist/components/command/hooks/useCommandShortcut.d.ts +8 -0
- package/dist/components/command/hooks/useCommandShortcut.d.ts.map +1 -0
- package/dist/components/command/index.d.ts +6 -0
- package/dist/components/command/index.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +12 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.test.d.ts +2 -0
- package/dist/components/dialog/Dialog.test.d.ts.map +1 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +4 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.test.d.ts +2 -0
- package/dist/components/dropdown/Dropdown.test.d.ts.map +1 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/modal/Modal.d.ts +15 -0
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/modal/Modal.test.d.ts +2 -0
- package/dist/components/modal/Modal.test.d.ts.map +1 -0
- package/dist/components/modal/index.d.ts +3 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/popover/Popover.d.ts +10 -0
- package/dist/components/popover/Popover.d.ts.map +1 -0
- package/dist/components/popover/Popover.test.d.ts +2 -0
- package/dist/components/popover/Popover.test.d.ts.map +1 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +4 -0
- package/dist/components/progress-bar/ProgressBar.d.ts.map +1 -0
- package/dist/components/progress-bar/ProgressBar.test.d.ts +2 -0
- package/dist/components/progress-bar/ProgressBar.test.d.ts.map +1 -0
- package/dist/components/progress-bar/index.d.ts +3 -0
- package/dist/components/progress-bar/index.d.ts.map +1 -0
- package/dist/components/radio-group/Radio.d.ts +3 -0
- package/dist/components/radio-group/Radio.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts +4 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.test.d.ts +2 -0
- package/dist/components/radio-group/RadioGroup.test.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroupContext.d.ts +12 -0
- package/dist/components/radio-group/RadioGroupContext.d.ts.map +1 -0
- package/dist/components/radio-group/index.d.ts +4 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.d.ts +15 -0
- package/dist/components/sheet/Sheet.d.ts.map +1 -0
- package/dist/components/sheet/Sheet.test.d.ts +2 -0
- package/dist/components/sheet/Sheet.test.d.ts.map +1 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.d.ts +17 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/sidebar/Sidebar.test.d.ts +2 -0
- package/dist/components/sidebar/Sidebar.test.d.ts.map +1 -0
- package/dist/components/sidebar/SidebarContext.d.ts +15 -0
- package/dist/components/sidebar/SidebarContext.d.ts.map +1 -0
- package/dist/components/sidebar/hooks/useSidebarMedia.d.ts +2 -0
- package/dist/components/sidebar/hooks/useSidebarMedia.d.ts.map +1 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +7 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.test.d.ts +2 -0
- package/dist/components/tabs/Tabs.test.d.ts.map +1 -0
- package/dist/components/tabs/TabsContext.d.ts +12 -0
- package/dist/components/tabs/TabsContext.d.ts.map +1 -0
- package/dist/components/tabs/hooks/useTabsLineIndicator.d.ts +8 -0
- package/dist/components/tabs/hooks/useTabsLineIndicator.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/hooks/createBrowserSearchParamAdapter.d.ts +3 -0
- package/dist/hooks/createBrowserSearchParamAdapter.d.ts.map +1 -0
- package/dist/hooks/createSearchParamAdapter.d.ts +10 -0
- package/dist/hooks/createSearchParamAdapter.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/overlaySearchParamData.d.ts +6 -0
- package/dist/hooks/overlaySearchParamData.d.ts.map +1 -0
- package/dist/hooks/overlaySearchParamData.test.d.ts +2 -0
- package/dist/hooks/overlaySearchParamData.test.d.ts.map +1 -0
- package/dist/hooks/useDialogSearchParam.d.ts +3 -0
- package/dist/hooks/useDialogSearchParam.d.ts.map +1 -0
- package/dist/hooks/useModalSearchParam.d.ts +3 -0
- package/dist/hooks/useModalSearchParam.d.ts.map +1 -0
- package/dist/hooks/useSearchParamOverlay.d.ts +3 -0
- package/dist/hooks/useSearchParamOverlay.d.ts.map +1 -0
- package/dist/hooks/useSearchParamOverlay.test.d.ts +2 -0
- package/dist/hooks/useSearchParamOverlay.test.d.ts.map +1 -0
- package/dist/index.cjs +112 -32
- package/dist/index.css +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8469 -6331
- package/dist/types/app-switcher.d.ts +7 -46
- package/dist/types/app-switcher.d.ts.map +1 -1
- package/dist/types/badge.d.ts +14 -0
- package/dist/types/badge.d.ts.map +1 -0
- package/dist/types/breadcrumb.d.ts +61 -0
- package/dist/types/breadcrumb.d.ts.map +1 -0
- package/dist/types/bulk-import-modal.d.ts +1 -0
- package/dist/types/bulk-import-modal.d.ts.map +1 -1
- package/dist/types/button.d.ts +17 -0
- package/dist/types/button.d.ts.map +1 -0
- package/dist/types/checkbox.d.ts +23 -0
- package/dist/types/checkbox.d.ts.map +1 -0
- package/dist/types/command.d.ts +88 -0
- package/dist/types/command.d.ts.map +1 -0
- package/dist/types/dialog.d.ts +28 -0
- package/dist/types/dialog.d.ts.map +1 -0
- package/dist/types/dropdown.d.ts +24 -0
- package/dist/types/dropdown.d.ts.map +1 -0
- package/dist/types/modal.d.ts +47 -0
- package/dist/types/modal.d.ts.map +1 -0
- package/dist/types/popover.d.ts +8 -0
- package/dist/types/popover.d.ts.map +1 -0
- package/dist/types/progress-bar.d.ts +20 -0
- package/dist/types/progress-bar.d.ts.map +1 -0
- package/dist/types/radio-group.d.ts +37 -0
- package/dist/types/radio-group.d.ts.map +1 -0
- package/dist/types/search-param-overlay.d.ts +27 -0
- package/dist/types/search-param-overlay.d.ts.map +1 -0
- package/dist/types/sheet.d.ts +49 -0
- package/dist/types/sheet.d.ts.map +1 -0
- package/dist/types/sidebar.d.ts +122 -0
- package/dist/types/sidebar.d.ts.map +1 -0
- package/dist/types/tabs.d.ts +35 -0
- package/dist/types/tabs.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/package.json +5 -1
- package/dist/components/app-switcher/api/fetchMeApps.d.ts +0 -6
- package/dist/components/app-switcher/api/fetchMeApps.d.ts.map +0 -1
- package/dist/components/app-switcher/api/fetchMeApps.test.d.ts +0 -2
- package/dist/components/app-switcher/api/fetchMeApps.test.d.ts.map +0 -1
- package/dist/components/app-switcher/api/mapMeAppToAppItem.d.ts +0 -4
- package/dist/components/app-switcher/api/mapMeAppToAppItem.d.ts.map +0 -1
- package/dist/components/app-switcher/api/mapMeAppToAppItem.test.d.ts +0 -2
- package/dist/components/app-switcher/api/mapMeAppToAppItem.test.d.ts.map +0 -1
- package/dist/components/app-switcher/api/meAppsClient.d.ts +0 -3
- package/dist/components/app-switcher/api/meAppsClient.d.ts.map +0 -1
- package/dist/components/app-switcher/api/meAppsClient.test.d.ts +0 -2
- package/dist/components/app-switcher/api/meAppsClient.test.d.ts.map +0 -1
- package/dist/components/app-switcher/hooks/useMeApps.d.ts +0 -3
- package/dist/components/app-switcher/hooks/useMeApps.d.ts.map +0 -1
- package/dist/components/app-switcher/hooks/useMeApps.test.d.ts +0 -2
- package/dist/components/app-switcher/hooks/useMeApps.test.d.ts.map +0 -1
- package/dist/test/fixtures.d.ts +0 -4
- package/dist/test/fixtures.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -65,194 +65,106 @@ npm install @rfdtech/components
|
|
|
65
65
|
|
|
66
66
|
Requires React 18+. npm 7+ auto-installs `react` and `react-dom` as peer dependencies. Radix UI and other runtime packages are included as dependencies of `@rfdtech/components`.
|
|
67
67
|
|
|
68
|
-
## AppSwitcher
|
|
69
|
-
|
|
70
|
-
Google Apps–style 9-dot launcher for switching between GSL systems. Drop it into your header to let users jump between products.
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
## Hooks
|
|
73
70
|
|
|
74
|
-
|
|
71
|
+
Shared hooks for URL-driven overlay state and router integration. See the [Hooks](/docs/hooks) docs page for full API reference.
|
|
75
72
|
|
|
76
73
|
```tsx
|
|
77
|
-
import {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
accessToken={accessToken}
|
|
84
|
-
title="System directory"
|
|
85
|
-
onAppSelect={(app) => console.log(app.name, app.metadata)}
|
|
86
|
-
/>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Expected API response:
|
|
92
|
-
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"success": true,
|
|
96
|
-
"message": "Available systems retrieved.",
|
|
97
|
-
"data": {
|
|
98
|
-
"apps": [
|
|
99
|
-
{
|
|
100
|
-
"system_id": "gov-portal",
|
|
101
|
-
"system_name": "Governance Portal",
|
|
102
|
-
"system_code": "GOV-123456",
|
|
103
|
-
"frontend_url": "http://178.105.154.224:3001",
|
|
104
|
-
"role": "registrar",
|
|
105
|
-
"permissions": ["cases:review"]
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
"meta": { "count": 1 }
|
|
110
|
-
}
|
|
111
|
-
```
|
|
74
|
+
import {
|
|
75
|
+
Dialog,
|
|
76
|
+
DialogContent,
|
|
77
|
+
useDialogSearchParam,
|
|
78
|
+
useModalSearchParam,
|
|
79
|
+
} from "@rfdtech/components";
|
|
112
80
|
|
|
113
|
-
|
|
81
|
+
const { open, data, onOpenChange, openWith } = useDialogSearchParam<{
|
|
82
|
+
userId: string;
|
|
83
|
+
}>("edit-profile");
|
|
114
84
|
|
|
115
|
-
|
|
116
|
-
const apps = [
|
|
117
|
-
{
|
|
118
|
-
id: "mail",
|
|
119
|
-
name: "Mail",
|
|
120
|
-
icon: "https://example.com/mail.png",
|
|
121
|
-
href: "https://mail.example.com",
|
|
122
|
-
},
|
|
123
|
-
];
|
|
85
|
+
openWith({ userId: "42" });
|
|
124
86
|
|
|
125
|
-
<
|
|
87
|
+
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
88
|
+
<DialogContent>Edit user {data?.userId}</DialogContent>
|
|
89
|
+
</Dialog>
|
|
126
90
|
```
|
|
127
91
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
| Prop | Type | Default | Description |
|
|
131
|
-
|------|------|---------|-------------|
|
|
132
|
-
| `apps` | `AppItem[]` | — | Static apps to show in the grid |
|
|
133
|
-
| `baseUrl` | `string` | required* | API base URL, e.g. `https://api.example.com` |
|
|
134
|
-
| `accessToken` | `string` | required* | Bearer access token |
|
|
135
|
-
| `columns` | `number` | `3` | Number of grid columns |
|
|
136
|
-
| `open` | `boolean` | — | Controlled open state |
|
|
137
|
-
| `onOpenChange` | `(open: boolean) => void` | — | Open state callback |
|
|
138
|
-
| `onAppSelect` | `(app: AppItem) => void` | — | Called when an app is selected |
|
|
139
|
-
| `triggerLabel` | `string` | `"Open app switcher"` | Accessible label for trigger |
|
|
140
|
-
| `trigger` | `ReactNode` | 9-dot icon | Custom trigger element |
|
|
141
|
-
| `title` | `string` | — | Panel header title |
|
|
142
|
-
| `footer` | `ReactNode` | — | Footer content below the grid |
|
|
143
|
-
| `placement` | `"bottom-end" \| "bottom-start" \| "bottom"` | `"bottom-end"` | Panel position |
|
|
144
|
-
| `closeOnSelect` | `boolean` | `true` | Close panel after selection |
|
|
145
|
-
| `className` | `string` | — | Root CSS class |
|
|
146
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
92
|
+
Exports: `useSearchParamOverlay`, `useDialogSearchParam`, `useModalSearchParam`, `createSearchParamAdapter`, `createBrowserSearchParamAdapter`, `readOverlayData`, `writeOverlayData`, `clearOverlayData`, `getDataPrefix`. Types: `SearchParamOverlayState`, `SearchParamOverlayData`, `SearchParamAdapter`, `UseSearchParamOverlayOptions`, `UseSearchParamOverlayReturn`.
|
|
147
93
|
|
|
148
|
-
\* Required when `apps` is not provided.
|
|
149
94
|
|
|
150
|
-
|
|
95
|
+
## AppSwitcher
|
|
151
96
|
|
|
152
|
-
|
|
97
|
+
Google Apps–style 9-dot launcher for switching between GSL systems. Drop it into your header to let users jump between products. Pass `apps` directly from your own data layer; use `loading` while data is being fetched.
|
|
153
98
|
|
|
154
|
-
|
|
155
|
-
interface AppItem {
|
|
156
|
-
id: string;
|
|
157
|
-
name: string;
|
|
158
|
-
icon: ReactNode | string;
|
|
159
|
-
href?: string;
|
|
160
|
-
onClick?: (app: AppItem) => void;
|
|
161
|
-
disabled?: boolean;
|
|
162
|
-
badge?: string;
|
|
163
|
-
metadata?: MeApp;
|
|
164
|
-
}
|
|
99
|
+
See the [AppSwitcher](/docs/app-switcher) docs page for props and exported types.
|
|
165
100
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
system_name: string;
|
|
169
|
-
system_code: string;
|
|
170
|
-
frontend_url: string;
|
|
171
|
-
role: string;
|
|
172
|
-
permissions: string[];
|
|
173
|
-
}
|
|
101
|
+
```tsx
|
|
102
|
+
import { AppSwitcher, type AppItem } from "@rfdtech/components";
|
|
174
103
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
104
|
+
function Header({ apps, loading }: { apps: AppItem[]; loading: boolean }) {
|
|
105
|
+
return (
|
|
106
|
+
<AppSwitcher
|
|
107
|
+
apps={apps}
|
|
108
|
+
loading={loading}
|
|
109
|
+
title="System directory"
|
|
110
|
+
onAppSelect={(app) => console.log(app.name)}
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
180
113
|
}
|
|
181
114
|
```
|
|
182
115
|
|
|
183
|
-
|
|
116
|
+
Props: `apps`, `loading`, `loadingLabel`, `columns`, `open`, `onOpenChange`, `onAppSelect`, `triggerLabel`, `trigger`, `title`, `footer`, `placement`, `closeOnSelect`, `className`, `style`. Exported types: `AppSwitcherProps`, `AppItem`, `UseAppSwitcherOptions`, `UseAppSwitcherReturn`.
|
|
184
117
|
|
|
185
|
-
|
|
118
|
+
Also exported: `AppSwitcherItem`, `GridIcon`, `SystemAppIcon`, `useAppSwitcher`.
|
|
186
119
|
|
|
187
|
-
**`useMeApps`** — fetch and map systems from `/v1/me/apps`:
|
|
188
120
|
|
|
189
|
-
|
|
190
|
-
|
|
121
|
+
## Badge
|
|
122
|
+
|
|
123
|
+
Compact inline label for status, counts, and metadata with semantic color variants. See the [Badge](/docs/badge) docs page for props and exported types.
|
|
191
124
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
125
|
+
```tsx
|
|
126
|
+
import { Badge } from "@rfdtech/components";
|
|
127
|
+
|
|
128
|
+
<Badge variant="success">Active</Badge>
|
|
129
|
+
<Badge variant="warning">Pending</Badge>
|
|
130
|
+
<Badge variant="error">Failed</Badge>
|
|
131
|
+
<Badge variant="outline" size="md">
|
|
132
|
+
Draft
|
|
133
|
+
</Badge>
|
|
196
134
|
```
|
|
197
135
|
|
|
198
|
-
|
|
136
|
+
Props: `variant`, `size`, `classNames`, `className`, and standard `span` attributes. Exported types: `BadgeProps`, `BadgeClassNames`, `BadgeVariant`, `BadgeSize`.
|
|
199
137
|
|
|
200
|
-
```tsx
|
|
201
|
-
import { useAppSwitcher } from "@rfdtech/components";
|
|
202
138
|
|
|
203
|
-
|
|
204
|
-
```
|
|
139
|
+
## Breadcrumb
|
|
205
140
|
|
|
206
|
-
|
|
141
|
+
Compound breadcrumb primitives for hierarchical page trails. See the [Breadcrumb](/docs/breadcrumb) docs page for props and exported types.
|
|
207
142
|
|
|
208
143
|
```tsx
|
|
209
144
|
import {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
145
|
+
Breadcrumb,
|
|
146
|
+
BreadcrumbItem,
|
|
147
|
+
BreadcrumbLink,
|
|
148
|
+
BreadcrumbList,
|
|
149
|
+
BreadcrumbPage,
|
|
150
|
+
BreadcrumbSeparator,
|
|
216
151
|
} from "@rfdtech/components";
|
|
217
152
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
153
|
+
<Breadcrumb>
|
|
154
|
+
<BreadcrumbList>
|
|
155
|
+
<BreadcrumbItem>
|
|
156
|
+
<BreadcrumbLink href="/">Home</BreadcrumbLink>
|
|
157
|
+
</BreadcrumbItem>
|
|
158
|
+
<BreadcrumbSeparator />
|
|
159
|
+
<BreadcrumbItem>
|
|
160
|
+
<BreadcrumbPage>Profile</BreadcrumbPage>
|
|
161
|
+
</BreadcrumbItem>
|
|
162
|
+
</BreadcrumbList>
|
|
163
|
+
</Breadcrumb>
|
|
222
164
|
```
|
|
223
165
|
|
|
224
|
-
|
|
225
|
-
|--------|-------------|
|
|
226
|
-
| `buildMeAppsUrl(baseUrl)` | Builds `{baseUrl}/v1/me/apps`, or `/v1/me/apps` when `baseUrl` is empty |
|
|
227
|
-
| `createMeAppsRequestInit(accessToken)` | Returns fetch options with `Authorization: Bearer ...` |
|
|
228
|
-
| `fetchMeApps(url, init?)` | Fetches and validates the API response; throws `MeAppsFetchError` on failure |
|
|
229
|
-
| `mapMeAppToAppItem(app)` | Maps one `MeApp` to an `AppItem` |
|
|
230
|
-
| `mapMeAppsToAppItems(apps)` | Maps an array of `MeApp` values to `AppItem[]` |
|
|
231
|
-
| `MeAppsFetchError` | Error thrown when the HTTP request fails or `success` is `false` |
|
|
166
|
+
Exported parts: `Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbPage`, `BreadcrumbSeparator`, `BreadcrumbEllipsis`. Exported types: `BreadcrumbProps`, `BreadcrumbLinkProps`, `BreadcrumbPageProps`, and related `*ClassNames` interfaces.
|
|
232
167
|
|
|
233
|
-
### Subcomponents
|
|
234
|
-
|
|
235
|
-
Also exported for custom layouts:
|
|
236
|
-
|
|
237
|
-
- `AppSwitcherItem` — single app grid cell
|
|
238
|
-
- `GridIcon` — default 9-dot trigger icon
|
|
239
|
-
- `SystemAppIcon` — initials avatar for API-fetched apps
|
|
240
|
-
|
|
241
|
-
### Theming
|
|
242
|
-
|
|
243
|
-
Override shared tokens on `.gsl-app-switcher` (see [Shared theming](#shared-theming)). `--gsl-focus` aliases to `--gsl-primary`.
|
|
244
|
-
|
|
245
|
-
```css
|
|
246
|
-
.my-switcher {
|
|
247
|
-
--gsl-primary: #dc2626;
|
|
248
|
-
--gsl-hover: #f1f3f4;
|
|
249
|
-
--gsl-columns: 4;
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### CORS
|
|
254
|
-
|
|
255
|
-
When fetching from a remote `baseUrl` in the browser, the API must allow the host application's origin. Configure CORS on your backend or proxy `/v1` through your dev server during local development.
|
|
256
168
|
|
|
257
169
|
## BulkImportModal
|
|
258
170
|
|
|
@@ -402,6 +314,398 @@ To change the gutter size, override `--gsl-bulk-import-gutter` on `.gsl-bulk-imp
|
|
|
402
314
|
}
|
|
403
315
|
```
|
|
404
316
|
|
|
317
|
+
|
|
318
|
+
## Button
|
|
319
|
+
|
|
320
|
+
Shared button with primary, secondary, outline, and ghost variants, plus loading and disabled states. See the [Button](/docs/button) docs page for props and exported types.
|
|
321
|
+
|
|
322
|
+
```tsx
|
|
323
|
+
import { Button } from "@rfdtech/components";
|
|
324
|
+
|
|
325
|
+
<Button variant="primary" onClick={() => save()}>
|
|
326
|
+
Save
|
|
327
|
+
</Button>
|
|
328
|
+
|
|
329
|
+
<Button loading loadingLabel="Saving">
|
|
330
|
+
Save
|
|
331
|
+
</Button>
|
|
332
|
+
|
|
333
|
+
<Button disabled>Unavailable</Button>
|
|
334
|
+
|
|
335
|
+
<Button
|
|
336
|
+
variant="outline"
|
|
337
|
+
classNames={{ root: "min-w-32", label: "font-semibold" }}
|
|
338
|
+
>
|
|
339
|
+
Custom
|
|
340
|
+
</Button>
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Props: `variant`, `size`, `loading`, `loadingLabel`, `classNames`, and standard `button` attributes. Exported types: `ButtonProps`, `ButtonClassNames`, `ButtonVariant`, `ButtonSize`.
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
## Checkbox
|
|
347
|
+
|
|
348
|
+
Accessible checkbox with optional label and part-level `classNames`. See the [Checkbox](/docs/checkbox) docs page for props and exported types.
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
import { Checkbox } from "@rfdtech/components";
|
|
352
|
+
|
|
353
|
+
<Checkbox
|
|
354
|
+
label="Accept terms and conditions"
|
|
355
|
+
checked={accepted}
|
|
356
|
+
onCheckedChange={setAccepted}
|
|
357
|
+
/>
|
|
358
|
+
|
|
359
|
+
<Checkbox
|
|
360
|
+
aria-label="Select row"
|
|
361
|
+
checked={selected}
|
|
362
|
+
onCheckedChange={setSelected}
|
|
363
|
+
/>
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Props: `checked`, `defaultChecked`, `onCheckedChange`, `label`, `disabled`, `required`, `name`, `value`, `id`, `aria-label`, `classNames`, `className`. Exported types: `CheckboxProps`, `CheckboxClassNames`.
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
## Command
|
|
370
|
+
|
|
371
|
+
Compound command menu primitives for searchable, keyboard-navigable action lists. Supports inline pickers and modal palettes via `CommandDialog`. See the [Command](/docs/command) docs page for props and exported types.
|
|
372
|
+
|
|
373
|
+
```tsx
|
|
374
|
+
import {
|
|
375
|
+
Command,
|
|
376
|
+
CommandDialog,
|
|
377
|
+
CommandEmpty,
|
|
378
|
+
CommandGroup,
|
|
379
|
+
CommandInput,
|
|
380
|
+
CommandItem,
|
|
381
|
+
CommandList,
|
|
382
|
+
CommandShortcut,
|
|
383
|
+
useCommandShortcut,
|
|
384
|
+
} from "@rfdtech/components";
|
|
385
|
+
|
|
386
|
+
<Command label="Field picker">
|
|
387
|
+
<CommandInput placeholder="Search fields..." />
|
|
388
|
+
<CommandList>
|
|
389
|
+
<CommandEmpty>No results.</CommandEmpty>
|
|
390
|
+
<CommandGroup heading="Fields">
|
|
391
|
+
<CommandItem value="email" onSelect={() => setField("email")}>
|
|
392
|
+
Email
|
|
393
|
+
</CommandItem>
|
|
394
|
+
</CommandGroup>
|
|
395
|
+
</CommandList>
|
|
396
|
+
</Command>
|
|
397
|
+
|
|
398
|
+
<CommandDialog open={open} onOpenChange={setOpen} shortcut label="Command menu">
|
|
399
|
+
<CommandInput placeholder="Type a command..." />
|
|
400
|
+
<CommandList>
|
|
401
|
+
<CommandItem onSelect={() => go("/dashboard")}>Dashboard</CommandItem>
|
|
402
|
+
<CommandItem onSelect={signOut}>
|
|
403
|
+
Sign out
|
|
404
|
+
<CommandShortcut><span>⌘</span><span>Q</span></CommandShortcut>
|
|
405
|
+
</CommandItem>
|
|
406
|
+
</CommandList>
|
|
407
|
+
</CommandDialog>
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Exports: `Command`, `CommandDialog`, `CommandInput`, `CommandList`, `CommandEmpty`, `CommandGroup`, `CommandItem`, `CommandSeparator`, `CommandLoading`, `CommandShortcut`, `useCommandShortcut`. Exported types: `CommandProps`, `CommandDialogProps`, `CommandItemProps`, `CommandShortcutProps`, `UseCommandShortcutOptions`, and related `*ClassNames` types.
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
## RadioGroup
|
|
414
|
+
|
|
415
|
+
Single-choice radio group with optional labels and descriptions on each `Radio` item. Use `variant="card"` for bordered choice cards. See the [RadioGroup](/docs/radio-group) docs page for props and exported types.
|
|
416
|
+
|
|
417
|
+
```tsx
|
|
418
|
+
import { Radio, RadioGroup } from "@rfdtech/components";
|
|
419
|
+
|
|
420
|
+
<RadioGroup variant="card" value={plan} onValueChange={setPlan}>
|
|
421
|
+
<Radio
|
|
422
|
+
value="starter"
|
|
423
|
+
label="Starter"
|
|
424
|
+
description="For individuals getting started."
|
|
425
|
+
/>
|
|
426
|
+
<Radio
|
|
427
|
+
value="team"
|
|
428
|
+
label="Team"
|
|
429
|
+
description="Collaborate with up to 10 members."
|
|
430
|
+
/>
|
|
431
|
+
</RadioGroup>
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Props: `RadioGroup` — `value`, `defaultValue`, `onValueChange`, `name`, `disabled`, `required`, `orientation`, `variant`, `classNames`, `className`, `children`. `Radio` — `value`, `label`, `description`, `disabled`, `id`, `aria-label`, `classNames`, `className`. Exported types: `RadioGroupProps`, `RadioProps`, `RadioGroupClassNames`, `RadioClassNames`, `RadioGroupVariant`.
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
## Dropdown
|
|
438
|
+
|
|
439
|
+
Select-style dropdown for choosing one option from a list. See the [Dropdown](/docs/dropdown) docs page for props and exported types.
|
|
440
|
+
|
|
441
|
+
```tsx
|
|
442
|
+
import { Dropdown } from "@rfdtech/components";
|
|
443
|
+
|
|
444
|
+
<Dropdown
|
|
445
|
+
aria-label="Field"
|
|
446
|
+
value={value}
|
|
447
|
+
onValueChange={setValue}
|
|
448
|
+
options={[
|
|
449
|
+
{ value: "email", label: "Email" },
|
|
450
|
+
{ value: "name", label: "Full name" },
|
|
451
|
+
]}
|
|
452
|
+
placeholder="Select..."
|
|
453
|
+
clearable
|
|
454
|
+
/>
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Props: `value`, `onValueChange`, `options`, `placeholder`, `clearable`, `disabled`, `aria-label`, `classNames`, `className`. Exported types: `DropdownProps`, `DropdownOption`, `DropdownClassNames`.
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
## Dialog
|
|
461
|
+
|
|
462
|
+
Compound dialog primitives for modal overlays. See the [Dialog](/docs/dialog) docs page for props and exported types.
|
|
463
|
+
|
|
464
|
+
```tsx
|
|
465
|
+
import {
|
|
466
|
+
Button,
|
|
467
|
+
Dialog,
|
|
468
|
+
DialogContent,
|
|
469
|
+
DialogDescription,
|
|
470
|
+
DialogOverlay,
|
|
471
|
+
DialogPortal,
|
|
472
|
+
DialogTitle,
|
|
473
|
+
DialogTrigger,
|
|
474
|
+
} from "@rfdtech/components";
|
|
475
|
+
|
|
476
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
477
|
+
<DialogTrigger asChild>
|
|
478
|
+
<Button variant="secondary">Edit profile</Button>
|
|
479
|
+
</DialogTrigger>
|
|
480
|
+
<DialogPortal>
|
|
481
|
+
<DialogOverlay />
|
|
482
|
+
<DialogContent showCloseButton>
|
|
483
|
+
<DialogTitle>Edit profile</DialogTitle>
|
|
484
|
+
<DialogDescription>Make changes here.</DialogDescription>
|
|
485
|
+
</DialogContent>
|
|
486
|
+
</DialogPortal>
|
|
487
|
+
</Dialog>
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Props: `Dialog` — `open`, `defaultOpen`, `onOpenChange`. `DialogContent` — `showCloseButton`, `classNames`, `className`. Styled parts also support part-level `classNames`. Exported types: `DialogOverlayProps`, `DialogContentProps`, `DialogTitleProps`, `DialogDescriptionProps`, and related `*ClassNames` interfaces.
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
## Modal
|
|
494
|
+
|
|
495
|
+
Compound modal primitives for near full-viewport overlays with header, body, and footer slots. See the [Modal](/docs/modal) docs page for props and exported types.
|
|
496
|
+
|
|
497
|
+
```tsx
|
|
498
|
+
import {
|
|
499
|
+
Button,
|
|
500
|
+
Modal,
|
|
501
|
+
ModalBody,
|
|
502
|
+
ModalContent,
|
|
503
|
+
ModalDescription,
|
|
504
|
+
ModalFooter,
|
|
505
|
+
ModalHeader,
|
|
506
|
+
ModalOverlay,
|
|
507
|
+
ModalPortal,
|
|
508
|
+
ModalTitle,
|
|
509
|
+
ModalTrigger,
|
|
510
|
+
} from "@rfdtech/components";
|
|
511
|
+
|
|
512
|
+
<Modal open={open} onOpenChange={setOpen}>
|
|
513
|
+
<ModalTrigger asChild>
|
|
514
|
+
<Button variant="secondary">Review changes</Button>
|
|
515
|
+
</ModalTrigger>
|
|
516
|
+
<ModalPortal>
|
|
517
|
+
<ModalOverlay />
|
|
518
|
+
<ModalContent showCloseButton>
|
|
519
|
+
<ModalHeader>
|
|
520
|
+
<ModalTitle>Review changes</ModalTitle>
|
|
521
|
+
<ModalDescription>Confirm before publishing.</ModalDescription>
|
|
522
|
+
</ModalHeader>
|
|
523
|
+
<ModalBody>{children}</ModalBody>
|
|
524
|
+
<ModalFooter>
|
|
525
|
+
<Button variant="ghost" onClick={() => setOpen(false)}>Cancel</Button>
|
|
526
|
+
<Button onClick={() => setOpen(false)}>Publish</Button>
|
|
527
|
+
</ModalFooter>
|
|
528
|
+
</ModalContent>
|
|
529
|
+
</ModalPortal>
|
|
530
|
+
</Modal>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Props: `Modal` — `open`, `defaultOpen`, `onOpenChange`. `ModalContent` — `showCloseButton`, `classNames`, `className`. Layout parts (`ModalHeader`, `ModalBody`, `ModalFooter`) support part-level `classNames`. Exported types: `ModalOverlayProps`, `ModalContentProps`, `ModalHeaderProps`, `ModalTitleProps`, `ModalDescriptionProps`, `ModalBodyProps`, `ModalFooterProps`, and related `*ClassNames` interfaces.
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
## Popover
|
|
537
|
+
|
|
538
|
+
Compound popover primitives for floating panels. See the [Popover](/docs/popover) docs page for props and exported types.
|
|
539
|
+
|
|
540
|
+
```tsx
|
|
541
|
+
import {
|
|
542
|
+
Button,
|
|
543
|
+
Popover,
|
|
544
|
+
PopoverClose,
|
|
545
|
+
PopoverContent,
|
|
546
|
+
PopoverTrigger,
|
|
547
|
+
} from "@rfdtech/components";
|
|
548
|
+
|
|
549
|
+
<Popover>
|
|
550
|
+
<PopoverTrigger asChild>
|
|
551
|
+
<Button variant="secondary">Actions</Button>
|
|
552
|
+
</PopoverTrigger>
|
|
553
|
+
<PopoverContent
|
|
554
|
+
side="bottom"
|
|
555
|
+
align="end"
|
|
556
|
+
sideOffset={4}
|
|
557
|
+
className="gsl-popover--menu"
|
|
558
|
+
>
|
|
559
|
+
<div className="gsl-popover__menu" role="menu">
|
|
560
|
+
<PopoverClose asChild>
|
|
561
|
+
<button type="button" className="gsl-popover__menu-item" role="menuitem">
|
|
562
|
+
Edit
|
|
563
|
+
</button>
|
|
564
|
+
</PopoverClose>
|
|
565
|
+
<PopoverClose asChild>
|
|
566
|
+
<button
|
|
567
|
+
type="button"
|
|
568
|
+
className="gsl-popover__menu-item gsl-popover__menu-item--destructive"
|
|
569
|
+
role="menuitem"
|
|
570
|
+
>
|
|
571
|
+
Delete
|
|
572
|
+
</button>
|
|
573
|
+
</PopoverClose>
|
|
574
|
+
</div>
|
|
575
|
+
</PopoverContent>
|
|
576
|
+
</Popover>
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
Exports: `Popover`, `PopoverTrigger`, `PopoverContent`, `PopoverPortal`, `PopoverAnchor`, `PopoverClose`. Exported types: `PopoverContentProps`, `PopoverContentClassNames`.
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
## ProgressBar
|
|
583
|
+
|
|
584
|
+
Accessible progress indicator for task completion and loading states. See the [ProgressBar](/docs/progress-bar) docs page for props and exported types.
|
|
585
|
+
|
|
586
|
+
```tsx
|
|
587
|
+
import { ProgressBar } from "@rfdtech/components";
|
|
588
|
+
|
|
589
|
+
<ProgressBar value={60} label="Upload progress" showValue />
|
|
590
|
+
<ProgressBar value={100} variant="success" />
|
|
591
|
+
<ProgressBar indeterminate label="Loading" size="md" />
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Props: `value`, `max`, `variant`, `size`, `indeterminate`, `label`, `showValue`, `classNames`, `className`, and standard `div` attributes. Exported types: `ProgressBarProps`, `ProgressBarClassNames`, `ProgressBarVariant`, `ProgressBarSize`.
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
## Sidebar
|
|
598
|
+
|
|
599
|
+
Compound sidebar primitives for app shells and section navigation. Desktop uses a sticky card-style rail with optional collapse; mobile uses an offcanvas drawer with trigger and overlay. See the [Sidebar](/docs/sidebar) docs page for props and exported types.
|
|
600
|
+
|
|
601
|
+
```tsx
|
|
602
|
+
import {
|
|
603
|
+
Sidebar,
|
|
604
|
+
SidebarCollapse,
|
|
605
|
+
SidebarContent,
|
|
606
|
+
SidebarGroup,
|
|
607
|
+
SidebarGroupLabel,
|
|
608
|
+
SidebarHeader,
|
|
609
|
+
SidebarItem,
|
|
610
|
+
SidebarLink,
|
|
611
|
+
SidebarNav,
|
|
612
|
+
SidebarOverlay,
|
|
613
|
+
SidebarProvider,
|
|
614
|
+
SidebarTrigger,
|
|
615
|
+
} from "@rfdtech/components";
|
|
616
|
+
|
|
617
|
+
<SidebarProvider>
|
|
618
|
+
<SidebarTrigger>Open menu</SidebarTrigger>
|
|
619
|
+
<SidebarOverlay />
|
|
620
|
+
<Sidebar>
|
|
621
|
+
<SidebarHeader>
|
|
622
|
+
<div className="gsl-sidebar__header-brand">
|
|
623
|
+
<span className="gsl-sidebar__header-title">GSL Admin</span>
|
|
624
|
+
</div>
|
|
625
|
+
<SidebarCollapse />
|
|
626
|
+
</SidebarHeader>
|
|
627
|
+
<SidebarContent>
|
|
628
|
+
<SidebarNav aria-label="Main">
|
|
629
|
+
<SidebarGroup>
|
|
630
|
+
<SidebarGroupLabel>General</SidebarGroupLabel>
|
|
631
|
+
<SidebarItem>
|
|
632
|
+
<SidebarLink href="/dashboard" icon={<DashboardIcon />} active={path === "/dashboard"}>
|
|
633
|
+
Dashboard
|
|
634
|
+
</SidebarLink>
|
|
635
|
+
</SidebarItem>
|
|
636
|
+
</SidebarGroup>
|
|
637
|
+
</SidebarNav>
|
|
638
|
+
</SidebarContent>
|
|
639
|
+
</Sidebar>
|
|
640
|
+
<main>{children}</main>
|
|
641
|
+
</SidebarProvider>
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
Exports: `SidebarProvider`, `useSidebar`, `Sidebar`, `SidebarBadge`, `SidebarCollapse`, `SidebarTrigger`, `SidebarOverlay`, `SidebarHeader`, `SidebarContent`, `SidebarFooter`, `SidebarNav`, `SidebarGroup`, `SidebarGroupLabel`, `SidebarItem`, `SidebarLink`. Exported types: `SidebarProviderProps`, `SidebarProps`, `SidebarLinkProps`, `SidebarBadgeProps`, `SidebarCollapseProps`, and related `*ClassNames` types.
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
## Sheet
|
|
648
|
+
|
|
649
|
+
Compound sheet primitives for edge-sliding panels. See the [Sheet](/docs/sheet) docs page for props and exported types.
|
|
650
|
+
|
|
651
|
+
```tsx
|
|
652
|
+
import {
|
|
653
|
+
Button,
|
|
654
|
+
Sheet,
|
|
655
|
+
SheetBody,
|
|
656
|
+
SheetContent,
|
|
657
|
+
SheetDescription,
|
|
658
|
+
SheetFooter,
|
|
659
|
+
SheetHeader,
|
|
660
|
+
SheetOverlay,
|
|
661
|
+
SheetPortal,
|
|
662
|
+
SheetTitle,
|
|
663
|
+
SheetTrigger,
|
|
664
|
+
} from "@rfdtech/components";
|
|
665
|
+
|
|
666
|
+
<Sheet open={open} onOpenChange={setOpen}>
|
|
667
|
+
<SheetTrigger asChild>
|
|
668
|
+
<Button variant="secondary">Open filters</Button>
|
|
669
|
+
</SheetTrigger>
|
|
670
|
+
<SheetPortal>
|
|
671
|
+
<SheetOverlay />
|
|
672
|
+
<SheetContent side="right" showCloseButton>
|
|
673
|
+
<SheetHeader>
|
|
674
|
+
<SheetTitle>Filters</SheetTitle>
|
|
675
|
+
<SheetDescription>Refine the results below.</SheetDescription>
|
|
676
|
+
</SheetHeader>
|
|
677
|
+
<SheetBody>{children}</SheetBody>
|
|
678
|
+
<SheetFooter>
|
|
679
|
+
<Button variant="ghost" onClick={() => setOpen(false)}>Reset</Button>
|
|
680
|
+
<Button onClick={() => setOpen(false)}>Apply</Button>
|
|
681
|
+
</SheetFooter>
|
|
682
|
+
</SheetContent>
|
|
683
|
+
</SheetPortal>
|
|
684
|
+
</Sheet>
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
Props: `Sheet` — `open`, `defaultOpen`, `onOpenChange`. `SheetContent` — `side`, `showCloseButton`, `classNames`, `className`. Layout parts support part-level `classNames`. Exported types: `SheetSide`, `SheetOverlayProps`, `SheetContentProps`, `SheetHeaderProps`, `SheetTitleProps`, `SheetDescriptionProps`, `SheetBodyProps`, `SheetFooterProps`, and related `*ClassNames` interfaces.
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
## Tabs
|
|
691
|
+
|
|
692
|
+
Compound tabs primitives for switching between related panels. See the [Tabs](/docs/tabs) docs page for props and exported types.
|
|
693
|
+
|
|
694
|
+
```tsx
|
|
695
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@rfdtech/components";
|
|
696
|
+
|
|
697
|
+
<Tabs defaultValue="account" variant="line">
|
|
698
|
+
<TabsList>
|
|
699
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
700
|
+
<TabsTrigger value="security">Security</TabsTrigger>
|
|
701
|
+
</TabsList>
|
|
702
|
+
<TabsContent value="account">Account settings</TabsContent>
|
|
703
|
+
<TabsContent value="security">Security settings</TabsContent>
|
|
704
|
+
</Tabs>
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Exports: `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent`. Props: `Tabs` — `value`, `defaultValue`, `onValueChange`, `orientation`, `activationMode`, `variant`, `classNames`, `className`, `children`. `TabsTrigger` — `value`, `disabled`, `classNames`, `className`. Exported types: `TabsProps`, `TabsListProps`, `TabsTriggerProps`, `TabsContentProps`, `TabsVariant`, `TabsClassNames`, `TabsListClassNames`, `TabsTriggerClassNames`, `TabsContentClassNames`.
|
|
708
|
+
|
|
405
709
|
## Development
|
|
406
710
|
|
|
407
711
|
```bash
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AppSwitcherProps } from "../../types/app-switcher";
|
|
2
2
|
import "./styles/app-switcher.css";
|
|
3
|
-
export declare function AppSwitcher({ apps
|
|
3
|
+
export declare function AppSwitcher({ apps, loading, loadingLabel, open: controlledOpen, onOpenChange, onAppSelect, columns, triggerLabel, trigger, title, footer, className, style, placement, closeOnSelect, }: AppSwitcherProps): import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=AppSwitcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/app-switcher/AppSwitcher.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,2BAA2B,CAAC;AAcnC,wBAAgB,WAAW,CAAC,EAC1B,IAAI,
|
|
1
|
+
{"version":3,"file":"AppSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/app-switcher/AppSwitcher.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,2BAA2B,CAAC;AAcnC,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,OAAe,EACf,YAAmC,EACnC,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,WAAW,EACX,OAAW,EACX,YAAkC,EAClC,OAAO,EACP,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,SAAwB,EACxB,aAAoB,GACrB,EAAE,gBAAgB,+BAoGlB"}
|
|
@@ -2,10 +2,6 @@ export { AppSwitcher } from "./AppSwitcher";
|
|
|
2
2
|
export { AppSwitcherItem } from "./AppSwitcherItem";
|
|
3
3
|
export { GridIcon } from "./GridIcon";
|
|
4
4
|
export { SystemAppIcon } from "./SystemAppIcon";
|
|
5
|
-
export { fetchMeApps, MeAppsFetchError } from "./api/fetchMeApps";
|
|
6
|
-
export { buildMeAppsUrl, createMeAppsRequestInit, } from "./api/meAppsClient";
|
|
7
|
-
export { mapMeAppToAppItem, mapMeAppsToAppItems, } from "./api/mapMeAppToAppItem";
|
|
8
5
|
export { useAppSwitcher } from "./hooks/useAppSwitcher";
|
|
9
|
-
export {
|
|
10
|
-
export type { AppItem, AppSwitcherProps, MeApp, MeAppsResponse, UseMeAppsOptions, UseMeAppsReturn, UseAppSwitcherOptions, UseAppSwitcherReturn, } from "../../types/app-switcher";
|
|
6
|
+
export type { AppItem, AppSwitcherProps, UseAppSwitcherOptions, UseAppSwitcherReturn, } from "../../types/app-switcher";
|
|
11
7
|
//# sourceMappingURL=index.d.ts.map
|