@rfdtech/components 1.1.0 → 1.4.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 +18 -275
- package/dist/components/app-switcher/AppSwitcher.d.ts +0 -1
- package/dist/components/app-switcher/AppSwitcher.d.ts.map +1 -1
- package/dist/components/app-switcher/AppSwitcherItem.d.ts.map +1 -1
- package/dist/components/app-switcher/hooks/useAppSwitcher.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/BulkImportModal.d.ts +1 -2
- package/dist/components/bulk-import-modal/BulkImportModal.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/internal/FieldMappingSelect.d.ts +15 -0
- package/dist/components/bulk-import-modal/internal/FieldMappingSelect.d.ts.map +1 -0
- package/dist/components/bulk-import-modal/steps/MatchColumnsStep.d.ts.map +1 -1
- package/dist/components/bulk-import-modal/steps/SelectHeaderRowStep.d.ts.map +1 -1
- package/dist/components/theme/ThemeContext.d.ts +3 -0
- package/dist/components/theme/ThemeContext.d.ts.map +1 -0
- package/dist/components/theme/ThemeProvider.d.ts +3 -0
- package/dist/components/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/components/theme/ThemeProvider.test.d.ts +2 -0
- package/dist/components/theme/ThemeProvider.test.d.ts.map +1 -0
- package/dist/components/theme/index.d.ts +4 -0
- package/dist/components/theme/index.d.ts.map +1 -0
- package/dist/components/theme/resolveTheme.d.ts +3 -0
- package/dist/components/theme/resolveTheme.d.ts.map +1 -0
- package/dist/components/theme/useTheme.d.ts +3 -0
- package/dist/components/theme/useTheme.d.ts.map +1 -0
- package/dist/index.cjs +31 -31
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6402 -7270
- package/dist/types/theme.d.ts +18 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/package.json +10 -3
- package/dist/components/data-table/DataTable.d.ts +0 -5
- package/dist/components/data-table/DataTable.d.ts.map +0 -1
- package/dist/components/data-table/DataTable.test.d.ts +0 -2
- package/dist/components/data-table/DataTable.test.d.ts.map +0 -1
- package/dist/components/data-table/hooks/useDataTable.d.ts +0 -3
- package/dist/components/data-table/hooks/useDataTable.d.ts.map +0 -1
- package/dist/components/data-table/index.d.ts +0 -3
- package/dist/components/data-table/index.d.ts.map +0 -1
- package/dist/components/data-table/utils/dataTableClient.d.ts +0 -4
- package/dist/components/data-table/utils/dataTableClient.d.ts.map +0 -1
- package/dist/components/data-table/utils/dataTableClient.test.d.ts +0 -2
- package/dist/components/data-table/utils/dataTableClient.test.d.ts.map +0 -1
- package/dist/components/dropdown/Combobox.d.ts +0 -5
- package/dist/components/dropdown/Combobox.d.ts.map +0 -1
- package/dist/components/dropdown/Combobox.test.d.ts +0 -2
- package/dist/components/dropdown/Combobox.test.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.d.ts +0 -5
- package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.test.d.ts +0 -2
- package/dist/components/dropdown/Dropdown.test.d.ts.map +0 -1
- package/dist/components/dropdown/DropdownMenu.d.ts +0 -5
- package/dist/components/dropdown/DropdownMenu.d.ts.map +0 -1
- package/dist/components/dropdown/DropdownMenu.test.d.ts +0 -2
- package/dist/components/dropdown/DropdownMenu.test.d.ts.map +0 -1
- package/dist/components/dropdown/hooks/useComboboxSearch.d.ts +0 -3
- package/dist/components/dropdown/hooks/useComboboxSearch.d.ts.map +0 -1
- package/dist/components/dropdown/hooks/useDropdown.d.ts +0 -4
- package/dist/components/dropdown/hooks/useDropdown.d.ts.map +0 -1
- package/dist/components/dropdown/hooks/useDropdownPosition.d.ts +0 -4
- package/dist/components/dropdown/hooks/useDropdownPosition.d.ts.map +0 -1
- package/dist/components/dropdown/index.d.ts +0 -5
- package/dist/components/dropdown/index.d.ts.map +0 -1
- package/dist/components/input-mask/InputMask.d.ts +0 -5
- package/dist/components/input-mask/InputMask.d.ts.map +0 -1
- package/dist/components/input-mask/InputMask.test.d.ts +0 -2
- package/dist/components/input-mask/InputMask.test.d.ts.map +0 -1
- package/dist/components/input-mask/hooks/useInputMask.d.ts +0 -18
- package/dist/components/input-mask/hooks/useInputMask.d.ts.map +0 -1
- package/dist/components/input-mask/index.d.ts +0 -5
- package/dist/components/input-mask/index.d.ts.map +0 -1
- package/dist/components/input-mask/presets.d.ts +0 -8
- package/dist/components/input-mask/presets.d.ts.map +0 -1
- package/dist/components/input-mask/utils/maskUtils.d.ts +0 -13
- package/dist/components/input-mask/utils/maskUtils.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.d.ts +0 -5
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.test.d.ts +0 -2
- package/dist/components/pagination/Pagination.test.d.ts.map +0 -1
- package/dist/components/pagination/index.d.ts +0 -4
- package/dist/components/pagination/index.d.ts.map +0 -1
- package/dist/components/pagination/utils.d.ts +0 -6
- package/dist/components/pagination/utils.d.ts.map +0 -1
- package/dist/components/pagination/utils.test.d.ts +0 -2
- package/dist/components/pagination/utils.test.d.ts.map +0 -1
- package/dist/types/data-table.d.ts +0 -41
- package/dist/types/data-table.d.ts.map +0 -1
- package/dist/types/dropdown.d.ts +0 -91
- package/dist/types/dropdown.d.ts.map +0 -1
- package/dist/types/input-mask.d.ts +0 -17
- package/dist/types/input-mask.d.ts.map +0 -1
- package/dist/types/pagination.d.ts +0 -14
- package/dist/types/pagination.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -20,10 +20,21 @@ After upgrading the package, clear Vite's dependency cache if styles look stale:
|
|
|
20
20
|
|
|
21
21
|
## Shared theming
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Wrap your app in `ThemeProvider` for light, dark, and system themes. Design tokens live in [`src/styles/theme.css`](src/styles/theme.css) and apply to `.gsl-theme`, `document.documentElement`, and all components (including portaled modals and popovers).
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
```tsx
|
|
26
|
+
import { ThemeProvider } from "@rfdtech/components";
|
|
27
|
+
import "@rfdtech/components/style.css";
|
|
28
|
+
|
|
29
|
+
<ThemeProvider defaultTheme="system">
|
|
30
|
+
<App />
|
|
31
|
+
</ThemeProvider>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use `useTheme()` to read or change the active theme at runtime. See the [Theme](/docs/theme) docs page for token reference and controlled mode.
|
|
35
|
+
|
|
36
|
+
| Token | Light default | Use |
|
|
37
|
+
|-------|---------------|-----|
|
|
27
38
|
| `--gsl-primary` | `#dc2626` | Buttons, focus rings, accents |
|
|
28
39
|
| `--gsl-primary-light` | `#fef2f2` | Selected rows, hover fills |
|
|
29
40
|
| `--gsl-bg` | `#ffffff` | Surfaces |
|
|
@@ -35,7 +46,7 @@ All components share design tokens defined in [`src/styles/theme.css`](src/style
|
|
|
35
46
|
| `--gsl-success` | `#16a34a` | Success states |
|
|
36
47
|
| `--gsl-warning` | `#eab308` | Warnings |
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
You can still override tokens on any ancestor without `ThemeProvider`:
|
|
39
50
|
|
|
40
51
|
```css
|
|
41
52
|
.my-app {
|
|
@@ -49,9 +60,11 @@ Override on a component root or any ancestor:
|
|
|
49
60
|
## Install
|
|
50
61
|
|
|
51
62
|
```bash
|
|
52
|
-
npm install @rfdtech/components
|
|
63
|
+
npm install @rfdtech/components
|
|
53
64
|
```
|
|
54
65
|
|
|
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
|
+
|
|
55
68
|
## AppSwitcher
|
|
56
69
|
|
|
57
70
|
Google Apps–style 9-dot launcher for switching between GSL systems. Drop it into your header to let users jump between products.
|
|
@@ -241,276 +254,6 @@ Override shared tokens on `.gsl-app-switcher` (see [Shared theming](#shared-them
|
|
|
241
254
|
|
|
242
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.
|
|
243
256
|
|
|
244
|
-
## Dropdown
|
|
245
|
-
|
|
246
|
-
Single-value select with a combobox trigger and portaled listbox. Use for forms and filters where the user picks one option from a list.
|
|
247
|
-
|
|
248
|
-
### Usage
|
|
249
|
-
|
|
250
|
-
```tsx
|
|
251
|
-
import { Dropdown } from "@rfdtech/components";
|
|
252
|
-
|
|
253
|
-
function DepartmentFilter() {
|
|
254
|
-
const [department, setDepartment] = useState<string | null>(null);
|
|
255
|
-
|
|
256
|
-
return (
|
|
257
|
-
<Dropdown
|
|
258
|
-
ariaLabel="Department"
|
|
259
|
-
value={department}
|
|
260
|
-
onChange={setDepartment}
|
|
261
|
-
placeholder="Choose department..."
|
|
262
|
-
clearable
|
|
263
|
-
options={[
|
|
264
|
-
{ value: "finance", label: "Finance" },
|
|
265
|
-
{ value: "hr", label: "Human Resources" },
|
|
266
|
-
]}
|
|
267
|
-
/>
|
|
268
|
-
);
|
|
269
|
-
}
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
### Props
|
|
273
|
-
|
|
274
|
-
| Prop | Type | Default | Description |
|
|
275
|
-
|------|------|---------|-------------|
|
|
276
|
-
| `ariaLabel` | `string` | required | Accessible label for the combobox |
|
|
277
|
-
| `value` | `string \| null` | required | Selected option value |
|
|
278
|
-
| `onChange` | `(value: string \| null) => void` | required | Called when selection changes |
|
|
279
|
-
| `options` | `DropdownOption[]` | required | `{ value, label, disabled? }` items |
|
|
280
|
-
| `placeholder` | `string` | `"Select..."` | Text shown when no value is selected |
|
|
281
|
-
| `clearable` | `boolean` | `false` | Show placeholder as a clear option |
|
|
282
|
-
| `disabled` | `boolean` | `false` | Disable the trigger |
|
|
283
|
-
| `open` | `boolean` | — | Controlled open state |
|
|
284
|
-
| `onOpenChange` | `(open: boolean) => void` | — | Open state callback |
|
|
285
|
-
| `className` | `string` | — | Root CSS class |
|
|
286
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
287
|
-
|
|
288
|
-
## Combobox
|
|
289
|
-
|
|
290
|
-
Text-input combobox with debounced async search. Use when options are loaded from an API based on what the user types.
|
|
291
|
-
|
|
292
|
-
### Usage
|
|
293
|
-
|
|
294
|
-
```tsx
|
|
295
|
-
import { Combobox } from "@rfdtech/components";
|
|
296
|
-
import type { DropdownOption } from "@rfdtech/components";
|
|
297
|
-
|
|
298
|
-
const loadUsers = (query: string): Promise<DropdownOption[]> =>
|
|
299
|
-
fetch(`/api/users?q=${encodeURIComponent(query)}`).then((r) => r.json());
|
|
300
|
-
|
|
301
|
-
function UserPicker() {
|
|
302
|
-
const [userId, setUserId] = useState<string | null>(null);
|
|
303
|
-
|
|
304
|
-
return (
|
|
305
|
-
<Combobox
|
|
306
|
-
ariaLabel="User"
|
|
307
|
-
value={userId}
|
|
308
|
-
onChange={setUserId}
|
|
309
|
-
loadOptions={loadUsers}
|
|
310
|
-
placeholder="Search users..."
|
|
311
|
-
clearable
|
|
312
|
-
getOptionLabel={(id) => cachedUsers.get(id)}
|
|
313
|
-
/>
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
The component caches the selected option label internally. Pass `getOptionLabel` when the value may be set before options are loaded (e.g. editing an existing record).
|
|
319
|
-
|
|
320
|
-
### Props
|
|
321
|
-
|
|
322
|
-
| Prop | Type | Default | Description |
|
|
323
|
-
|------|------|---------|-------------|
|
|
324
|
-
| `ariaLabel` | `string` | required | Accessible label for the combobox input |
|
|
325
|
-
| `value` | `string \| null` | required | Selected option value |
|
|
326
|
-
| `onChange` | `(value: string \| null) => void` | required | Called when selection changes |
|
|
327
|
-
| `loadOptions` | `(query: string) => Promise<DropdownOption[]>` | required | Async search function |
|
|
328
|
-
| `placeholder` | `string` | `"Search..."` | Input placeholder |
|
|
329
|
-
| `debounceMs` | `number` | `300` | Debounce delay before calling `loadOptions` |
|
|
330
|
-
| `minSearchLength` | `number` | `0` | Minimum query length before searching |
|
|
331
|
-
| `getOptionLabel` | `(value: string) => string \| undefined` | — | Resolve label for a value not in current results |
|
|
332
|
-
| `noResultsText` | `string` | `"No results"` | Text when search returns no options |
|
|
333
|
-
| `loadingText` | `string` | `"Loading..."` | Accessible label for the loading spinner |
|
|
334
|
-
| `clearable` | `boolean` | `false` | Show a clear button when a value is selected |
|
|
335
|
-
| `disabled` | `boolean` | `false` | Disable the input |
|
|
336
|
-
| `open` | `boolean` | — | Controlled open state |
|
|
337
|
-
| `onOpenChange` | `(open: boolean) => void` | — | Open state callback |
|
|
338
|
-
| `className` | `string` | — | Root CSS class |
|
|
339
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
340
|
-
|
|
341
|
-
## InputMask
|
|
342
|
-
|
|
343
|
-
Pattern-based masked text input for phone numbers, dates, and other formatted fields.
|
|
344
|
-
|
|
345
|
-
### Mask syntax
|
|
346
|
-
|
|
347
|
-
| Token | Accepts |
|
|
348
|
-
|-------|---------|
|
|
349
|
-
| `#` | Digit (`0-9`) |
|
|
350
|
-
| `A` | Letter (`a-z`, `A-Z`) |
|
|
351
|
-
| `*` | Alphanumeric |
|
|
352
|
-
| Other characters | Literals inserted automatically |
|
|
353
|
-
|
|
354
|
-
### Usage
|
|
355
|
-
|
|
356
|
-
```tsx
|
|
357
|
-
import { INPUT_MASK_PRESETS, InputMask } from "@rfdtech/components";
|
|
358
|
-
|
|
359
|
-
function ContactForm() {
|
|
360
|
-
const [phone, setPhone] = useState("");
|
|
361
|
-
const [rawPhone, setRawPhone] = useState("");
|
|
362
|
-
|
|
363
|
-
return (
|
|
364
|
-
<InputMask
|
|
365
|
-
ariaLabel="Phone number"
|
|
366
|
-
mask={INPUT_MASK_PRESETS.phoneGh}
|
|
367
|
-
value={phone}
|
|
368
|
-
onChange={setPhone}
|
|
369
|
-
onValueChange={setRawPhone}
|
|
370
|
-
placeholder="0XX XXX XXXX"
|
|
371
|
-
inputMode="tel"
|
|
372
|
-
/>
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
`onChange` receives the masked display value (e.g. `024 123 4567`). `onValueChange` receives only the slot characters (e.g. `0241234567`).
|
|
378
|
-
|
|
379
|
-
### Presets
|
|
380
|
-
|
|
381
|
-
`INPUT_MASK_PRESETS` includes `phoneGh`, `phoneIntlGh`, `date`, and `time`. Pass any custom pattern string to `mask`.
|
|
382
|
-
|
|
383
|
-
### Props
|
|
384
|
-
|
|
385
|
-
| Prop | Type | Default | Description |
|
|
386
|
-
|------|------|---------|-------------|
|
|
387
|
-
| `mask` | `string` | required | Pattern string (`#`, `A`, `*`, literals) |
|
|
388
|
-
| `ariaLabel` | `string` | required | Accessible label for the input |
|
|
389
|
-
| `value` | `string` | — | Masked display value (controlled) |
|
|
390
|
-
| `defaultValue` | `string` | `""` | Initial value (uncontrolled) |
|
|
391
|
-
| `onChange` | `(masked: string) => void` | — | Called with masked display value |
|
|
392
|
-
| `onValueChange` | `(unmasked: string) => void` | — | Called with raw slot characters |
|
|
393
|
-
| `placeholder` | `string` | — | Placeholder text |
|
|
394
|
-
| `disabled` | `boolean` | `false` | Disable the input |
|
|
395
|
-
| `id` | `string` | — | Input `id` attribute |
|
|
396
|
-
| `name` | `string` | — | Input `name` attribute |
|
|
397
|
-
| `inputMode` | `string` | `"text"` | Mobile keyboard hint |
|
|
398
|
-
| `className` | `string` | — | Root CSS class |
|
|
399
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
400
|
-
|
|
401
|
-
## DataTable
|
|
402
|
-
|
|
403
|
-
Read-focused data table with column sorting and pagination. Pass `data` for client-side sorting and pagination; use `loading` when data is fetched by the parent.
|
|
404
|
-
|
|
405
|
-
`DataTable` composes the standalone [`Pagination`](#pagination) component for its footer.
|
|
406
|
-
|
|
407
|
-
### Usage
|
|
408
|
-
|
|
409
|
-
```tsx
|
|
410
|
-
import { DataTable } from "@rfdtech/components";
|
|
411
|
-
|
|
412
|
-
const columns = [
|
|
413
|
-
{ key: "name", label: "Name", sortable: true },
|
|
414
|
-
{ key: "department", label: "Department", sortable: true },
|
|
415
|
-
];
|
|
416
|
-
|
|
417
|
-
const { data, loading } = useStaff();
|
|
418
|
-
|
|
419
|
-
<DataTable
|
|
420
|
-
columns={columns}
|
|
421
|
-
data={data}
|
|
422
|
-
loading={loading}
|
|
423
|
-
emptyText="No staff found."
|
|
424
|
-
pageSize={10}
|
|
425
|
-
onRowClick={(row) => console.log(row.name)}
|
|
426
|
-
/>
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
Sorting and pagination run in the browser against the `data` array you provide.
|
|
430
|
-
|
|
431
|
-
### Props
|
|
432
|
-
|
|
433
|
-
| Prop | Type | Default | Description |
|
|
434
|
-
|------|------|---------|-------------|
|
|
435
|
-
| `columns` | `DataTableColumn[]` | required | Column definitions |
|
|
436
|
-
| `data` | `T[]` | required | Rows to display |
|
|
437
|
-
| `loading` | `boolean` | `false` | Show loading spinner and disable controls |
|
|
438
|
-
| `getRowId` | `(row, index) => string \| number` | index | Stable row key |
|
|
439
|
-
| `pageSize` | `number` | `10` | Initial rows per page |
|
|
440
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50]` | Page size choices |
|
|
441
|
-
| `emptyText` | `string` | `"No results found."` | Empty state message |
|
|
442
|
-
| `loadingLabel` | `string` | `"Loading data"` | Accessible label for loading spinner |
|
|
443
|
-
| `onRowClick` | `(row: T) => void` | — | Row click handler |
|
|
444
|
-
| `className` | `string` | — | Root CSS class |
|
|
445
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
446
|
-
|
|
447
|
-
## Pagination
|
|
448
|
-
|
|
449
|
-
Standalone pagination footer with result summary, rows-per-page dropdown, and previous/next controls. Used by `DataTable` but can be composed independently.
|
|
450
|
-
|
|
451
|
-
### Usage
|
|
452
|
-
|
|
453
|
-
```tsx
|
|
454
|
-
import { Pagination } from "@rfdtech/components";
|
|
455
|
-
|
|
456
|
-
<Pagination
|
|
457
|
-
page={page}
|
|
458
|
-
pageSize={pageSize}
|
|
459
|
-
total={total}
|
|
460
|
-
onPageChange={setPage}
|
|
461
|
-
onPageSizeChange={setPageSize}
|
|
462
|
-
/>
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
### Props
|
|
466
|
-
|
|
467
|
-
| Prop | Type | Default | Description |
|
|
468
|
-
|------|------|---------|-------------|
|
|
469
|
-
| `page` | `number` | required | Current page (1-based) |
|
|
470
|
-
| `pageSize` | `number` | required | Rows per page |
|
|
471
|
-
| `total` | `number` | required | Total row count |
|
|
472
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50]` | Page size choices |
|
|
473
|
-
| `loading` | `boolean` | `false` | Disable controls while loading |
|
|
474
|
-
| `emptySummaryText` | `string` | `"Showing 0 results"` | Summary when `total` is 0 |
|
|
475
|
-
| `onPageChange` | `(page: number) => void` | required | Page change callback |
|
|
476
|
-
| `onPageSizeChange` | `(pageSize: number) => void` | required | Page size change callback |
|
|
477
|
-
| `className` | `string` | — | Root CSS class |
|
|
478
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
479
|
-
|
|
480
|
-
## DropdownMenu
|
|
481
|
-
|
|
482
|
-
Action menu triggered by a custom button. Use for row actions, overflow menus, and navigation shortcuts.
|
|
483
|
-
|
|
484
|
-
### Usage
|
|
485
|
-
|
|
486
|
-
```tsx
|
|
487
|
-
import { DropdownMenu } from "@rfdtech/components";
|
|
488
|
-
|
|
489
|
-
<DropdownMenu
|
|
490
|
-
ariaLabel="Row actions"
|
|
491
|
-
trigger={<span>⋮</span>}
|
|
492
|
-
items={[
|
|
493
|
-
{ id: "edit", label: "Edit", onSelect: () => console.log("edit") },
|
|
494
|
-
{ id: "docs", label: "Docs", href: "https://example.com/docs" },
|
|
495
|
-
{ id: "delete", label: "Delete", onSelect: () => {}, destructive: true },
|
|
496
|
-
]}
|
|
497
|
-
/>
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
### Props
|
|
501
|
-
|
|
502
|
-
| Prop | Type | Default | Description |
|
|
503
|
-
|------|------|---------|-------------|
|
|
504
|
-
| `trigger` | `ReactNode \| (state) => ReactNode` | required | Button content or render prop |
|
|
505
|
-
| `items` | `DropdownMenuItem[]` | required | Menu entries |
|
|
506
|
-
| `ariaLabel` | `string` | required | Accessible label for trigger and menu |
|
|
507
|
-
| `placement` | `"bottom-start" \| "bottom-end" \| "bottom"` | `"bottom-end"` | Panel position |
|
|
508
|
-
| `closeOnSelect` | `boolean` | `true` | Close after an item is chosen |
|
|
509
|
-
| `open` | `boolean` | — | Controlled open state |
|
|
510
|
-
| `onOpenChange` | `(open: boolean) => void` | — | Open state callback |
|
|
511
|
-
| `className` | `string` | — | Root CSS class |
|
|
512
|
-
| `style` | `CSSProperties` | — | Root inline styles |
|
|
513
|
-
|
|
514
257
|
## BulkImportModal
|
|
515
258
|
|
|
516
259
|
Four-step modal wizard for importing spreadsheet data (.xlsx, .xls, .csv). Parsing and validation run entirely in the browser.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AppSwitcherProps } from "../../types/app-switcher";
|
|
2
|
-
import "../../styles/theme.css";
|
|
3
2
|
import "./styles/app-switcher.css";
|
|
4
3
|
export declare function AppSwitcher({ apps: appsProp, baseUrl, accessToken, open: controlledOpen, onOpenChange, onAppSelect, columns, triggerLabel, trigger, title, footer, className, style, placement, closeOnSelect, }: AppSwitcherProps): import("react").JSX.Element;
|
|
5
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":"
|
|
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,EAAE,QAAQ,EACd,OAAO,EACP,WAAW,EACX,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,+BAwGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSwitcherItem.d.ts","sourceRoot":"","sources":["../../../src/components/app-switcher/AppSwitcherItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,UAAU,oBAAoB;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAYD,wBAAgB,eAAe,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+
|
|
1
|
+
{"version":3,"file":"AppSwitcherItem.d.ts","sourceRoot":"","sources":["../../../src/components/app-switcher/AppSwitcherItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,UAAU,oBAAoB;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAYD,wBAAgB,eAAe,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BA0DtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/components/app-switcher/hooks/useAppSwitcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useAppSwitcher.d.ts","sourceRoot":"","sources":["../../../../src/components/app-switcher/hooks/useAppSwitcher.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,cAAc,CAC5B,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CA+BtB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { BulkImportModalProps } from "../../types/bulk-import-modal";
|
|
2
|
-
import "../../styles/theme.css";
|
|
3
2
|
import "./styles/bulk-import-modal.css";
|
|
4
|
-
export declare function BulkImportModal({ open, onOpenChange, fields, onComplete, title, maxFileSizeBytes, allowImportWithWarnings, className, }: BulkImportModalProps): import("react").
|
|
3
|
+
export declare function BulkImportModal({ open, onOpenChange, fields, onComplete, title, maxFileSizeBytes, allowImportWithWarnings, className, }: BulkImportModalProps): import("react").JSX.Element;
|
|
5
4
|
//# sourceMappingURL=BulkImportModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BulkImportModal.d.ts","sourceRoot":"","sources":["../../../src/components/bulk-import-modal/BulkImportModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BulkImportModal.d.ts","sourceRoot":"","sources":["../../../src/components/bulk-import-modal/BulkImportModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAO1E,OAAO,gCAAgC,CAAC;AAgCxC,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,UAAU,EACV,KAAqB,EACrB,gBAAwC,EACxC,uBAA+B,EAC/B,SAAS,GACV,EAAE,oBAAoB,+BA6RtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./field-mapping-select.css";
|
|
2
|
+
export interface FieldMappingSelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FieldMappingSelectProps {
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
value: string | null;
|
|
9
|
+
onChange: (value: string | null) => void;
|
|
10
|
+
options: FieldMappingSelectOption[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function FieldMappingSelect({ ariaLabel, value, onChange, options, placeholder, clearable, }: FieldMappingSelectProps): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=FieldMappingSelect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldMappingSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/bulk-import-modal/internal/FieldMappingSelect.tsx"],"names":[],"mappings":"AACA,OAAO,4BAA4B,CAAC;AAIpC,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,EAAE,wBAAwB,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAyB,EACzB,SAAiB,GAClB,EAAE,uBAAuB,+BA2DzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MatchColumnsStep.d.ts","sourceRoot":"","sources":["../../../../src/components/bulk-import-modal/steps/MatchColumnsStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MatchColumnsStep.d.ts","sourceRoot":"","sources":["../../../../src/components/bulk-import-modal/steps/MatchColumnsStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAG1C,UAAU,qBAAqB;IAC7B,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC;IACxB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,qBAAqB,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9E,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAwCD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,EAAE,qBAAqB,+BAwFvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectHeaderRowStep.d.ts","sourceRoot":"","sources":["../../../../src/components/bulk-import-modal/steps/SelectHeaderRowStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectHeaderRowStep.d.ts","sourceRoot":"","sources":["../../../../src/components/bulk-import-modal/steps/SelectHeaderRowStep.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,cAAc,EACd,iBAAiB,GAClB,EAAE,wBAAwB,+BAyD1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/components/theme/ThemeContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,YAAY,mDAAgD,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ThemeProviderProps } from "../../types/theme";
|
|
2
|
+
export declare function ThemeProvider({ theme: controlledTheme, defaultTheme, onThemeChange, className, style, children, }: ThemeProviderProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/components/theme/ThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAItE,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EAAE,eAAe,EACtB,YAAuB,EACvB,aAAa,EACb,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE,kBAAkB,+BAwEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.test.d.ts","sourceRoot":"","sources":["../../../src/components/theme/ThemeProvider.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveTheme.d.ts","sourceRoot":"","sources":["../../../src/components/theme/resolveTheme.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,IAAI,OAAO,GAAG,MAAM,CAQjD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAMjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/components/theme/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,wBAAgB,QAAQ,IAAI,cAAc,CAQzC"}
|