@eschoolbase/client-ui 0.2.0 → 0.3.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 +113 -18
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +3 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.types.d.ts +21 -0
- package/dist/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.d.ts +10 -0
- package/dist/components/DataTable/DataTable.types.d.ts +154 -0
- package/dist/components/DataTable/SelectionBar.d.ts +18 -0
- package/dist/components/DataTable/dataTableUtils.d.ts +13 -0
- package/dist/components/DataTable/dataTableUtils.test.d.ts +1 -0
- package/dist/components/DataTable/index.d.ts +6 -0
- package/dist/components/DataTable/remote.d.ts +36 -0
- package/dist/components/DataTable/remote.test.d.ts +1 -0
- package/dist/components/DataTable/useDebouncedValue.d.ts +2 -0
- package/dist/components/DatePicker/Calendar.d.ts +15 -0
- package/dist/components/DatePicker/DatePicker.d.ts +3 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +45 -0
- package/dist/components/DatePicker/MonthCalendar.d.ts +12 -0
- package/dist/components/DatePicker/PickerField.d.ts +40 -0
- package/dist/components/DatePicker/TimeColumns.d.ts +12 -0
- package/dist/components/DatePicker/createDisabledPredicate.test.d.ts +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts +70 -0
- package/dist/components/DatePicker/dateUtils.test.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/monthDateTimeUtils.test.d.ts +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +3 -0
- package/dist/components/DateTimePicker/DateTimePicker.types.d.ts +50 -0
- package/dist/components/DateTimePicker/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -0
- package/dist/components/Drawer/Drawer.types.d.ts +10 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +7 -0
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +21 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/FileInput/FileInput.d.ts +6 -0
- package/dist/components/FileInput/FileInput.types.d.ts +55 -0
- package/dist/components/FileInput/ImageCropper.d.ts +21 -0
- package/dist/components/FileInput/fileUtils.d.ts +8 -0
- package/dist/components/FileInput/index.d.ts +3 -0
- package/dist/components/Input/Input.types.d.ts +16 -0
- package/dist/components/Input/PickerTypeInput.d.ts +14 -0
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +6 -0
- package/dist/components/Modal/Modal.types.d.ts +39 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/MonthPicker/MonthPicker.d.ts +3 -0
- package/dist/components/MonthPicker/MonthPicker.types.d.ts +37 -0
- package/dist/components/MonthPicker/index.d.ts +2 -0
- package/dist/components/Overlay/Overlay.d.ts +25 -0
- package/dist/components/Overlay/OverlayContent.d.ts +14 -0
- package/dist/components/PageHeader/PageHeader.d.ts +12 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +6 -0
- package/dist/components/Pagination/Pagination.types.d.ts +29 -0
- package/dist/components/Pagination/index.d.ts +4 -0
- package/dist/components/Pagination/paginationUtils.d.ts +7 -0
- package/dist/components/Pagination/paginationUtils.test.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +7 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts +7 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/StatusPill/StatusPill.d.ts +10 -0
- package/dist/components/StatusPill/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +16 -0
- package/dist/components/Table/Table.types.d.ts +31 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/TableFilters/DynamicFilterRows.d.ts +24 -0
- package/dist/components/TableFilters/FilterValueControl.d.ts +14 -0
- package/dist/components/TableFilters/TableFilters.d.ts +6 -0
- package/dist/components/TableFilters/TableFilters.types.d.ts +32 -0
- package/dist/components/TableFilters/filterUtils.d.ts +5 -0
- package/dist/components/TableFilters/index.d.ts +2 -0
- package/dist/components/Textarea/RichTextControl.d.ts +3 -0
- package/dist/components/Textarea/Textarea.d.ts +4 -1
- package/dist/components/Textarea/Textarea.types.d.ts +9 -0
- package/dist/components/Textarea/index.d.ts +1 -1
- package/dist/components/Textarea/sanitizeHtml.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +34 -2
- package/dist/index.js +4174 -750
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/ThemeProvider.d.ts +2 -0
- package/dist/theme/index.d.ts +1 -1
- package/dist/utils/portalHost.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,88 @@ const { theme, setTheme } = useTheme();
|
|
|
64
64
|
<Button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>Toggle</Button>;
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
### Date, date-time and month inputs
|
|
68
|
+
|
|
69
|
+
`<Input type="date">`, `type="datetime-local"` and `type="month"` show the package's own pickers (the browser's can't be themed). They keep the `Input` API: `onChange` gets an event whose `target.value` is in the native format (`YYYY-MM-DD`, `YYYY-MM-DDTHH:mm`, `YYYY-MM`), and `name` and `ref` work with forms. Use `DatePicker`, `DateTimePicker` or `MonthPicker` directly for a plain string `onChange`. Options go in `dateOptions` (below). `type="time"` stays the browser's time field.
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
<DatePicker label="Appointment" disablePast /> {/* no past days (today stays) */}
|
|
73
|
+
<DatePicker label="Date of birth" disableFuture /> {/* no future days */}
|
|
74
|
+
<DatePicker label="Visit" disabledDaysOfWeek={[0, 6]} /> {/* no weekends */}
|
|
75
|
+
<DatePicker
|
|
76
|
+
label="Admission"
|
|
77
|
+
min="2026-06-01"
|
|
78
|
+
max="2027-03-31"
|
|
79
|
+
disabledDates={['2026-10-02']} {/* holidays, booked days */}
|
|
80
|
+
disabledRanges={[{ from: '2026-12-24', to: '2027-01-02' }]} {/* breaks, both ends included */}
|
|
81
|
+
isDateDisabled={(date) => date.getDate() === 13} {/* any custom rule */}
|
|
82
|
+
/>
|
|
83
|
+
|
|
84
|
+
<Input type="date" label="Appointment" dateOptions={{ disablePast: true, disabledDaysOfWeek: [0] }} />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Disabled days are struck through and cannot be chosen, but stay reachable with the arrow keys. The calendar opens on the nearest enabled day.
|
|
88
|
+
|
|
89
|
+
### Tables
|
|
90
|
+
|
|
91
|
+
`DataTable` looks and behaves like the tables in the school app. Column and prop names follow it (`accessorKey`, `header`, `render`, `sortable`, `filterable`, `filterType`, `filterOptions`, `actions`, `emptyMessage`, `searchPlaceholder`, `pagination`, `additionalFilter`, `refreshTrigger`, `registerApi`).
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
const columns: DataTableColumn<Student>[] = [
|
|
95
|
+
{ accessorKey: 'name', header: 'Student', sortable: true },
|
|
96
|
+
{
|
|
97
|
+
accessorKey: 'status',
|
|
98
|
+
header: 'Status',
|
|
99
|
+
filterable: true,
|
|
100
|
+
filterType: 'select',
|
|
101
|
+
filterOptions: [
|
|
102
|
+
{ label: 'Active', value: 'Active' },
|
|
103
|
+
{ label: 'Left', value: 'Left' },
|
|
104
|
+
],
|
|
105
|
+
render: (value) => <Badge>{String(value)}</Badge>,
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
{
|
|
110
|
+
/* Rows you already have: searched, filtered, sorted and paged in the browser. */
|
|
111
|
+
}
|
|
112
|
+
<DataTable columns={columns} data={students} aria-label="Students" />;
|
|
113
|
+
|
|
114
|
+
{
|
|
115
|
+
/* Rows from a server: it does the searching, sorting and paging. */
|
|
116
|
+
}
|
|
117
|
+
<DataTable
|
|
118
|
+
columns={columns}
|
|
119
|
+
fetchUrl="/students/list"
|
|
120
|
+
apiBaseUrl={API_URL}
|
|
121
|
+
callApi={callApi} // your authenticated GET; defaults to fetch(url).then(r => r.json())
|
|
122
|
+
additionalFilter={`classId:${classId}`}
|
|
123
|
+
refreshTrigger={refreshCount} // change it to reload
|
|
124
|
+
registerApi={(api) => (tableApi.current = api)} // api.updateRow(id, patch) edits a loaded row, no refetch
|
|
125
|
+
actions={[
|
|
126
|
+
{ label: 'Edit', onClick: edit },
|
|
127
|
+
{ label: 'Delete', variant: 'danger', onClick: remove },
|
|
128
|
+
]}
|
|
129
|
+
/>;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**With `fetchUrl`** the table requests `?pageNo=1&pageSize=10&filter=searchText:aryan;<additionalFilter>;orderByColumn:name;orderBy:asc;status:Active` (search and column filters are debounced by `debounceMs`, 500 by default) and reads `{ status, message, data: { items, totalPage, totalData } }`. A response with `status: false` shows its `message` in the table. `pagination={false}` loads every page, 100 rows at a time. Stale responses are ignored. The package makes no request on its own unless you pass `fetchUrl`.
|
|
133
|
+
|
|
134
|
+
**Look.** One look, the school app's: it fills its container with no outer border, a sticky header with upper-case labels, a "Filters" button with a side panel where the user adds the filters they want (Apply / Reset, chips for the active ones), and the pagination bar pinned to the bottom (rows per page, joined page buttons, "Showing 1-10 of 120 Rows"). Put it in a flex column with a fixed height.
|
|
135
|
+
|
|
136
|
+
**Selection.** `selection` adds checkboxes; while rows are selected a banner shows "N selected", your `bulkActions` (`{ label, icon, onClick(selectedIds), variant }`) and "Clear selection" (also exported as `SelectionBar`). Use `StatusPill` for status columns.
|
|
137
|
+
|
|
138
|
+
**Other.** `selection`, `onRowClick` and the `belowToolbar` slot, and every piece of state (`search`, `filters`, `sort`, `page`, `pageSize`) can be controlled with its `on…Change`. Changing the search, filters or page size returns to page 1. Use `manualFiltering`, `manualSorting` and `manualPagination` (with `totalItems`) if you load rows yourself.
|
|
139
|
+
|
|
140
|
+
### Profile photos and image cropping
|
|
141
|
+
|
|
142
|
+
```tsx
|
|
143
|
+
<FileInput label="Profile photo" variant="image" shape="circle" onFilesChange={([photo]) => upload(photo)} />
|
|
144
|
+
<FileInput label="Cover" variant="image" shape="rectangle" aspectRatio={16 / 9} cropOutputWidth={1280} />
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
With `variant="image"`, picking a picture opens a cropper: drag the photo (or use the arrow keys), zoom with the slider (or `+` / `-`), then **Apply**. The cropped image replaces the picked one in `onFilesChange` and in the form; **Cancel** keeps the previous photo. `shape="circle"` shows a round frame; the saved file is still the full square around it, so display it with `border-radius: 50%`. The result is a new `File` of `cropOutputWidth` px (default 512, or 800 for rectangles) in the original's format (`cropOutputType` / `cropOutputQuality` to change it). SVG files are used as they are. Set `crop={false}` to skip the cropper.
|
|
148
|
+
|
|
67
149
|
### System theme and remembering the choice
|
|
68
150
|
|
|
69
151
|
```tsx
|
|
@@ -122,24 +204,37 @@ Keys are matched as hashes, so the plain keys are not in the bundle. This is a d
|
|
|
122
204
|
|
|
123
205
|
## Components
|
|
124
206
|
|
|
125
|
-
| Component
|
|
126
|
-
|
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
142
|
-
| `
|
|
207
|
+
| Component | Highlights |
|
|
208
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
209
|
+
| `Modal` | Dialog with title, description, body and footer: `open`/`onClose`, `size` (sm to full), focus trap, scroll lock, Escape / backdrop / close button, returns focus. `data-autofocus` picks the first focus. |
|
|
210
|
+
| `Drawer` | Same API as `Modal`, sliding in from the `right` or `left` (`size` sm, md, lg). |
|
|
211
|
+
| `ConfirmDialog` | "Are you sure?" dialog: `onConfirm`, `tone="danger"` (focus on Cancel), `loading`, `requireText` to type to confirm. |
|
|
212
|
+
| `Pagination` | Previous / next, numbered pages with ellipses, optional first / last, "Showing 1-10 of 120" and a rows-per-page select. |
|
|
213
|
+
| `Table` | Styled semantic table (`TableHead`, `TableBody`, `TableRow`, `TableHeaderCell`, `TableCell`, `TableFoot`, `TableCaption`): `stickyHeader`, sortable headers with `aria-sort`. |
|
|
214
|
+
| `DataTable` | The school app's data table: search, a Filters side panel, sorting, row selection, row actions (one = icon button, several = menu), loading / error / empty states and a pinned pagination bar. Give it `data`, or a `fetchUrl` and the server searches, sorts and pages. |
|
|
215
|
+
| `DropdownMenu` | "More actions" button with a keyboard-accessible menu (`items` with icon, `variant="danger"`, `disabled`). |
|
|
216
|
+
| `Button` | `variant`: primary, secondary, outline, ghost, danger, link · `size`: sm/md/lg · `loading` · `disabled` · `fullWidth`. Defaults to `type="button"`. |
|
|
217
|
+
| `Input` | `label`, `helperText`, `error`, `required`, `prefix`, `suffix`, `size`; forwards `ref`; all native input props. |
|
|
218
|
+
| `Select` | Custom dropdown (like the app's AdvancedSelect): popover list, type-to-search, `multiple`, clear button, `onSearch` + `loading` for server-side search, `name` for forms. `onChange` receives the value (`string`, or `string[]` when `multiple`). Ref points at the trigger button. |
|
|
219
|
+
| `DatePicker` | Date field with a calendar popover (days / months / years views, keyboard navigation): `value`/`defaultValue` as `YYYY-MM-DD`, `weekStartsOn`, `locale`, `name`. Disable days with `min`/`max`, `disablePast`, `disableFuture`, `disabledDates`, `disabledRanges`, `disabledDaysOfWeek`, `isDateDisabled`. `<Input type="date">` uses it. |
|
|
220
|
+
| `MonthPicker` | Month and year chooser (`YYYY-MM`): `min`, `max`, `disablePast`, `disableFuture`, `disabledMonths`, `isMonthDisabled`. `<Input type="month">` uses it. |
|
|
221
|
+
| `DateTimePicker` | Calendar plus hour/minute lists (`YYYY-MM-DDTHH:mm`): the `DatePicker` disabling options, `min`/`max` with times, `minuteStep`, `use12Hours`, `defaultTime`. `<Input type="datetime-local">` uses it. |
|
|
222
|
+
| `FileInput` | File picker with five looks (`variant`): `dropzone` (default), `button`, `field`, `image` (single image tile; `shape` is `circle`, `square` or `rectangle` with `aspectRatio`; after picking, a cropper lets the user move and zoom the photo, turn it off with `crop={false}`) and `gallery` (image thumbnails). `accept`, `maxSize`, `maxFiles`, `multiple`, `preview`, `onFilesChange`; rejects bad files with a message. |
|
|
223
|
+
| `PasswordInput` | `Input` with a show / hide toggle. |
|
|
224
|
+
| `SearchInput` | `Input` with a search icon and a clear button. |
|
|
225
|
+
| `Textarea` | Multi-line input with the same `label`, `helperText`, `error`, `required` handling as `Input`; `rows`, `resize`. |
|
|
226
|
+
| `Checkbox` | Themed native checkbox: `label`, `helperText`, `error`, `indeterminate`. |
|
|
227
|
+
| `Switch` | On/off toggle (`role="switch"`): `label`, `helperText`, `error`. |
|
|
228
|
+
| `Badge` | Status pill: `color` (neutral, primary, success, warning, danger, info), `dot`. |
|
|
229
|
+
| `Skeleton` | Loading placeholder: `variant` (text, rect, circle), `width`, `height`. |
|
|
230
|
+
| `Tabs` | Accessible underlined tabs: `items`, `value`/`defaultValue`, `onValueChange`; arrow-key navigation. |
|
|
231
|
+
| `FormField` | Wraps any control: label, required marker, helper text, error, and `aria-describedby` / `aria-invalid` wiring. |
|
|
232
|
+
| `FormSection` | Titled group of fields: heading, subtitle, divider and a responsive grid (`columns` 1-3, `headingLevel`). Renders a labelled `<section>`. |
|
|
233
|
+
| `Typography` | Themed text: `variant` (h1-h4, body, body-sm, caption, label), `as` to change the element, `color`, `weight`, `align`, `truncate`. |
|
|
234
|
+
| `AccountPanel` | Logged-in user button (header avatar or sidebar row) that opens a panel: greeting, role, detail rows, action pills, an app launcher grid and a log out action. Ported from the Engage portal; router-agnostic via `renderLink`. |
|
|
235
|
+
| `Avatar` | Photo or name initials with a stable color; sizes xs-xl. |
|
|
236
|
+
| `ThemeToggle` | Light / Dark / System picker (radio group) for `useTheme()`; `modes` for custom themes, `compact` for icons only. |
|
|
237
|
+
| `ThemeProvider` | Applies `data-theme`; `useTheme()` for reading/changing it. |
|
|
143
238
|
|
|
144
239
|
```tsx
|
|
145
240
|
<Input label="Amount" prefix="₹" helperText="Excluding tax" />
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ConfirmDialogProps } from './ConfirmDialog.types';
|
|
2
|
+
/** "Are you sure?" dialog with Cancel and Confirm, a danger tone and an optional type-to-confirm field. */
|
|
3
|
+
export declare function ConfirmDialog({ open, onClose, onConfirm, title, message, confirmLabel, cancelLabel, tone, loading, requireText, }: ConfirmDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ConfirmDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
/** Called on Cancel, Escape, the close button or a backdrop click. */
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/** Called when the user confirms. The dialog does not close itself: close it (or show `loading`) in here. */
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** What will happen. */
|
|
10
|
+
message?: ReactNode;
|
|
11
|
+
/** Label of the confirm button. Defaults to "Confirm". */
|
|
12
|
+
confirmLabel?: string;
|
|
13
|
+
/** Label of the cancel button. Defaults to "Cancel". */
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
/** `danger` styles the confirm button red and puts focus on Cancel. Defaults to `default`. */
|
|
16
|
+
tone?: 'default' | 'danger';
|
|
17
|
+
/** Disables both buttons and shows a spinner on the confirm button. */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** The user must type this text before the confirm button is enabled, e.g. `DELETE`. */
|
|
20
|
+
requireText?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DataTableProps } from './DataTable.types';
|
|
2
|
+
/**
|
|
3
|
+
* Data table with search, column filters, sorting, row selection, row actions, loading / error / empty
|
|
4
|
+
* states and pagination, in the look of the school app's tables.
|
|
5
|
+
*
|
|
6
|
+
* Give it rows with `data` (filtered, sorted and paged here), or a `fetchUrl` to load them from a server that
|
|
7
|
+
* does the searching, sorting and paging (see `callApi`, `additionalFilter`, `refreshTrigger`, `registerApi`).
|
|
8
|
+
* Each piece of state can be controlled (`search`, `filters`, `sort`, `page`, `pageSize`) or left to the table.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DataTable<T>({ columns, data, fetchUrl, apiBaseUrl, callApi, additionalFilter, refreshTrigger, debounceMs, registerApi, getRowId, loading: loadingProp, loadingRows, emptyMessage, emptyState, searchable, searchPlaceholder, search: searchProp, defaultSearch, onSearchChange, filters: filtersProp, defaultFilters, onFiltersChange, manualFiltering, sort: sortProp, defaultSort, onSortChange, manualSorting, pagination: paginationProp, page: pageProp, defaultPage, onPageChange, pageSize: pageSizeProp, defaultPageSize, onPageSizeChange, pageSizeOptions, manualPagination, totalItems, selection, onRowClick, actions, actionsClassName, belowToolbar, bulkActions, caption, stickyHeader, className, tableClassName, containerClassName, 'aria-label': ariaLabel, }: DataTableProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SortDirection, TableAlign } from '../Table';
|
|
3
|
+
import type { TableFilterOption } from '../TableFilters';
|
|
4
|
+
export interface DataTableColumn<T> {
|
|
5
|
+
/** Unique id of the column. Also the property read from each row, unless `accessor` is given. */
|
|
6
|
+
accessorKey: keyof T | (string & {});
|
|
7
|
+
header: ReactNode;
|
|
8
|
+
/** Reads the value for this column from a row. Defaults to `row[accessorKey]`. */
|
|
9
|
+
accessor?: (row: T) => unknown;
|
|
10
|
+
/** Custom cell content. Receives the value and the row. Without it the value is shown as text, or "-" when empty. */
|
|
11
|
+
render?: (value: any, row: T) => ReactNode;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
/** Value used to compare rows when sorting locally. Defaults to the accessor value. */
|
|
14
|
+
sortValue?: (row: T) => string | number | null | undefined;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
/** `left` / `right` are accepted as aliases of `start` / `end`. */
|
|
17
|
+
align?: TableAlign | 'left' | 'right';
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Adds a filter for this column next to the search box. */
|
|
20
|
+
filterable?: boolean;
|
|
21
|
+
/** Kind of filter. Defaults to `text`. */
|
|
22
|
+
filterType?: 'text' | 'select' | 'date';
|
|
23
|
+
filterOptions?: TableFilterOption[];
|
|
24
|
+
/** Custom match for this column's filter (local data only). Defaults to "contains" (text), "equals" (select, date). */
|
|
25
|
+
filterFn?: (row: T, filterValue: string) => boolean;
|
|
26
|
+
/** Text for the column in the global search (local data only). Defaults to the value as text. */
|
|
27
|
+
searchValue?: (row: T) => string;
|
|
28
|
+
}
|
|
29
|
+
export interface DataTableAction<T> {
|
|
30
|
+
label: string;
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
onClick: (row: T) => void;
|
|
33
|
+
/** `danger` styles the action red. */
|
|
34
|
+
variant?: 'default' | 'danger';
|
|
35
|
+
/** Return true to hide the action for a row. */
|
|
36
|
+
hidden?: (row: T) => boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface DataTableSort {
|
|
39
|
+
/** `accessorKey` of the sorted column. */
|
|
40
|
+
key: string;
|
|
41
|
+
direction: SortDirection;
|
|
42
|
+
}
|
|
43
|
+
export interface DataTableSelection {
|
|
44
|
+
/** Ids of the selected rows. */
|
|
45
|
+
selected: string[];
|
|
46
|
+
onChange: (ids: string[]) => void;
|
|
47
|
+
}
|
|
48
|
+
export interface DataTableBulkAction {
|
|
49
|
+
label: string;
|
|
50
|
+
icon?: ReactNode;
|
|
51
|
+
/** Receives the ids of the selected rows. */
|
|
52
|
+
onClick: (selectedIds: string[]) => void;
|
|
53
|
+
variant?: 'default' | 'danger';
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Imperative handle (see `registerApi`) for changing loaded rows in place without a refetch. */
|
|
57
|
+
export interface DataTableApi<T> {
|
|
58
|
+
updateRow: (id: string | number, patch: Partial<T>) => void;
|
|
59
|
+
}
|
|
60
|
+
/** What a server answers: `{ status, message, data: { items, totalPage, totalData } }` (or the items directly). */
|
|
61
|
+
export interface DataTableApiResponse {
|
|
62
|
+
status?: boolean;
|
|
63
|
+
message?: string;
|
|
64
|
+
data?: unknown;
|
|
65
|
+
}
|
|
66
|
+
/** Performs the GET request for `fetchUrl` and returns the parsed JSON. Pass your own to add auth, base URLs, etc. */
|
|
67
|
+
export type DataTableCallApi = (url: string, init: {
|
|
68
|
+
method: 'GET';
|
|
69
|
+
}) => Promise<DataTableApiResponse>;
|
|
70
|
+
export interface DataTableProps<T> {
|
|
71
|
+
columns: DataTableColumn<T>[];
|
|
72
|
+
/** Rows to show (filtered, sorted and paged here unless you set the `manual…` props). Not needed with `fetchUrl`. */
|
|
73
|
+
data?: T[];
|
|
74
|
+
/**
|
|
75
|
+
* Load rows from a URL instead of `data`. Search, filters, sorting and paging are then done by the server, with
|
|
76
|
+
* `pageNo`, `pageSize` and `filter` (`searchText:abc;orderByColumn:name;orderBy:asc;status:Active;…`) in the query.
|
|
77
|
+
* Requests are debounced by `debounceMs`.
|
|
78
|
+
*/
|
|
79
|
+
fetchUrl?: string;
|
|
80
|
+
/** Put in front of `fetchUrl` when it does not start with `http`. */
|
|
81
|
+
apiBaseUrl?: string;
|
|
82
|
+
/** How to perform the request. Defaults to `fetch(url).then(res => res.json())`. */
|
|
83
|
+
callApi?: DataTableCallApi;
|
|
84
|
+
/** Extra `filter` entries for `fetchUrl`, e.g. `classId:1;sectionId:2`. */
|
|
85
|
+
additionalFilter?: string;
|
|
86
|
+
/** Change this value to reload `fetchUrl` data. */
|
|
87
|
+
refreshTrigger?: number | string | boolean;
|
|
88
|
+
/** Milliseconds to wait after typing before a request is made. Defaults to 500 with `fetchUrl`, 0 otherwise. */
|
|
89
|
+
debounceMs?: number;
|
|
90
|
+
/** Receives a handle to patch loaded rows in place (e.g. after toggling a status). */
|
|
91
|
+
registerApi?: (api: DataTableApi<T>) => void;
|
|
92
|
+
/** Id of a row. Defaults to `row.id`. */
|
|
93
|
+
getRowId?: (row: T, index: number) => string | number;
|
|
94
|
+
/** Shows placeholder rows instead of the data (local data only; `fetchUrl` shows them while loading). */
|
|
95
|
+
loading?: boolean;
|
|
96
|
+
/** Number of placeholder rows while loading. Defaults to 5. */
|
|
97
|
+
loadingRows?: number;
|
|
98
|
+
/** Text when there are no rows. Defaults to "No data available". */
|
|
99
|
+
emptyMessage?: ReactNode;
|
|
100
|
+
/** Whole empty-state content instead of `emptyMessage`. */
|
|
101
|
+
emptyState?: ReactNode;
|
|
102
|
+
/** Show the search box. Defaults to true. */
|
|
103
|
+
searchable?: boolean;
|
|
104
|
+
searchPlaceholder?: string;
|
|
105
|
+
search?: string;
|
|
106
|
+
defaultSearch?: string;
|
|
107
|
+
onSearchChange?: (search: string) => void;
|
|
108
|
+
/** Filter values by `accessorKey`, for columns marked `filterable`. */
|
|
109
|
+
filters?: Record<string, string>;
|
|
110
|
+
defaultFilters?: Record<string, string>;
|
|
111
|
+
onFiltersChange?: (filters: Record<string, string>) => void;
|
|
112
|
+
/** You filter on the server: `data` is already filtered, and no filtering happens here. */
|
|
113
|
+
manualFiltering?: boolean;
|
|
114
|
+
sort?: DataTableSort | null;
|
|
115
|
+
defaultSort?: DataTableSort | null;
|
|
116
|
+
onSortChange?: (sort: DataTableSort | null) => void;
|
|
117
|
+
/** You sort on the server: `data` is already sorted, and no sorting happens here. */
|
|
118
|
+
manualSorting?: boolean;
|
|
119
|
+
/** Show pagination. Defaults to true. With `fetchUrl`, `false` loads every page (100 rows at a time). */
|
|
120
|
+
pagination?: boolean;
|
|
121
|
+
/** Current page, starting at 1. */
|
|
122
|
+
page?: number;
|
|
123
|
+
defaultPage?: number;
|
|
124
|
+
onPageChange?: (page: number) => void;
|
|
125
|
+
pageSize?: number;
|
|
126
|
+
defaultPageSize?: number;
|
|
127
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
128
|
+
/** Rows-per-page choices. Defaults to 10, 15, 20, 50 and 100. */
|
|
129
|
+
pageSizeOptions?: number[];
|
|
130
|
+
/** You page on the server: `data` is the current page only, and `totalItems` is required. */
|
|
131
|
+
manualPagination?: boolean;
|
|
132
|
+
totalItems?: number;
|
|
133
|
+
/** Adds a checkbox column. */
|
|
134
|
+
selection?: DataTableSelection;
|
|
135
|
+
/** Buttons in the banner that appears above the table while rows are selected (needs `selection`). */
|
|
136
|
+
bulkActions?: DataTableBulkAction[];
|
|
137
|
+
onRowClick?: (row: T) => void;
|
|
138
|
+
/** Row actions: one visible action is an icon button, several open a "more" menu. */
|
|
139
|
+
actions?: DataTableAction<T>[];
|
|
140
|
+
/** Class for the actions column, e.g. to set its width. Defaults to as narrow as possible. */
|
|
141
|
+
actionsClassName?: string;
|
|
142
|
+
/** Shown between the filter bar and the table, e.g. a bulk-action bar. */
|
|
143
|
+
belowToolbar?: ReactNode;
|
|
144
|
+
caption?: ReactNode;
|
|
145
|
+
/** Keep the header visible while scrolling. Defaults to true. */
|
|
146
|
+
stickyHeader?: boolean;
|
|
147
|
+
className?: string;
|
|
148
|
+
/** Class for the `<table>` element. */
|
|
149
|
+
tableClassName?: string;
|
|
150
|
+
/** Class for the scrolling table container, e.g. to give a sticky header a fixed height. */
|
|
151
|
+
containerClassName?: string;
|
|
152
|
+
/** Accessible name of the table. */
|
|
153
|
+
'aria-label'?: string;
|
|
154
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface SelectionBarAction {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** `danger` styles the button red. */
|
|
8
|
+
variant?: 'default' | 'danger';
|
|
9
|
+
}
|
|
10
|
+
export interface SelectionBarProps {
|
|
11
|
+
/** Number of selected rows. Nothing is rendered for 0. */
|
|
12
|
+
count: number;
|
|
13
|
+
actions?: SelectionBarAction[];
|
|
14
|
+
onClear: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Banner shown above a table while rows are selected: "N selected", bulk actions and "Clear selection". */
|
|
18
|
+
export declare function SelectionBar({ count, actions, onClear, className }: SelectionBarProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DataTableColumn, DataTableSort } from './DataTable.types';
|
|
2
|
+
/** The value of a column for a row. */
|
|
3
|
+
export declare function getValue<T>(column: DataTableColumn<T>, row: T): unknown;
|
|
4
|
+
/** Rows whose text contains `query` (case-insensitive) in any column. */
|
|
5
|
+
export declare function searchRows<T>(rows: T[], columns: DataTableColumn<T>[], query: string): T[];
|
|
6
|
+
/** Rows matching every column filter. Empty filter values are ignored. */
|
|
7
|
+
export declare function filterRows<T>(rows: T[], columns: DataTableColumn<T>[], filters: Record<string, string>): T[];
|
|
8
|
+
/** Rows sorted by a column. Empty values go last in either direction; the sort is stable. */
|
|
9
|
+
export declare function sortRows<T>(rows: T[], columns: DataTableColumn<T>[], sort: DataTableSort | null): T[];
|
|
10
|
+
/** The rows of one page (pages start at 1). */
|
|
11
|
+
export declare function paginateRows<T>(rows: T[], page: number, pageSize: number): T[];
|
|
12
|
+
/** Next sort when a header is clicked: ascending, then descending, then none. */
|
|
13
|
+
export declare function nextSort(current: DataTableSort | null, key: string): DataTableSort | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DataTable } from './DataTable';
|
|
2
|
+
export { SelectionBar } from './SelectionBar';
|
|
3
|
+
export type { SelectionBarAction, SelectionBarProps } from './SelectionBar';
|
|
4
|
+
export { filterRows, nextSort, paginateRows, searchRows, sortRows } from './dataTableUtils';
|
|
5
|
+
export { buildRequestUrl, defaultCallApi, parseResponse } from './remote';
|
|
6
|
+
export type { DataTableAction, DataTableBulkAction, DataTableApi, DataTableApiResponse, DataTableCallApi, DataTableColumn, DataTableProps, DataTableSelection, DataTableSort, } from './DataTable.types';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DataTableApiResponse, DataTableCallApi, DataTableSort } from './DataTable.types';
|
|
2
|
+
export declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
3
|
+
/** Rows per request when `pagination` is off and every page is loaded. */
|
|
4
|
+
export declare const ALL_ROWS_PAGE_SIZE = 100;
|
|
5
|
+
/** Never request more than this many pages when loading everything. */
|
|
6
|
+
export declare const MAX_PAGES = 100;
|
|
7
|
+
export declare const defaultCallApi: DataTableCallApi;
|
|
8
|
+
export interface RequestQuery {
|
|
9
|
+
fetchUrl: string;
|
|
10
|
+
apiBaseUrl?: string;
|
|
11
|
+
pageNo: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
search: string;
|
|
14
|
+
additionalFilter?: string;
|
|
15
|
+
sort: DataTableSort | null;
|
|
16
|
+
/** Column filters by `accessorKey`. Empty values are left out. */
|
|
17
|
+
filters: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The request URL: `pageNo` and `pageSize`, plus one `filter` parameter that joins the search text, extra filter,
|
|
21
|
+
* sort and column filters with `;` (`searchText:abc;orderByColumn:name;orderBy:asc;status:Active`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildRequestUrl(query: RequestQuery): string;
|
|
24
|
+
export interface ParsedPage<T> {
|
|
25
|
+
rows: T[];
|
|
26
|
+
totalPages: number;
|
|
27
|
+
totalItems: number;
|
|
28
|
+
}
|
|
29
|
+
/** Reads a response: `data.items` (or `data` itself) as rows, `data.totalPage` and `data.totalData` as the totals. */
|
|
30
|
+
export declare function parseResponse<T>(response: DataTableApiResponse): ParsedPage<T>;
|
|
31
|
+
export declare class DataTableRequestError extends Error {
|
|
32
|
+
}
|
|
33
|
+
/** One page, or an error: a response with `status: false` becomes an error carrying the server's message. */
|
|
34
|
+
export declare function fetchPage<T>(url: string, callApi: DataTableCallApi): Promise<ParsedPage<T>>;
|
|
35
|
+
/** Every page of a query, 100 rows at a time (at most 100 pages). */
|
|
36
|
+
export declare function fetchAllPages<T>(queryFor: (pageNo: number, pageSize: number) => string, callApi: DataTableCallApi): Promise<T[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CalendarProps {
|
|
2
|
+
selected: Date | null;
|
|
3
|
+
/** True for days that cannot be chosen. Disabled days stay focusable so keyboard navigation can pass over them. */
|
|
4
|
+
isDisabled: (date: Date) => boolean;
|
|
5
|
+
weekStartsOn: 0 | 1;
|
|
6
|
+
locale?: string;
|
|
7
|
+
/** Called with the chosen date, or null when "Clear" is pressed. */
|
|
8
|
+
onSelect: (date: Date | null) => void;
|
|
9
|
+
/** Hide the Clear button (when the picker is not clearable). */
|
|
10
|
+
allowClear: boolean;
|
|
11
|
+
/** Show the Clear / Today footer. Defaults to true. */
|
|
12
|
+
showFooter?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** The calendar shown inside the DatePicker popover: days, months and years views with full keyboard support. */
|
|
15
|
+
export declare function Calendar({ selected, isDisabled, weekStartsOn, locale, onSelect, allowClear, showFooter, }: CalendarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DatePickerProps } from './DatePicker.types';
|
|
2
|
+
/** Date field with a calendar popover (days, months and years views, keyboard navigation). */
|
|
3
|
+
export declare const DatePicker: import("react").ForwardRefExoticComponent<DatePickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { ComponentSize } from '../../types';
|
|
3
|
+
import type { DateRange } from './dateUtils';
|
|
4
|
+
export type { DateRange };
|
|
5
|
+
export interface DatePickerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onChange' | 'children' | 'placeholder' | 'min' | 'max'> {
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
helperText?: ReactNode;
|
|
8
|
+
/** Error message. When set, the picker is marked invalid. */
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
/** Selected date as `YYYY-MM-DD` (controlled). Use `""` for no date. */
|
|
12
|
+
value?: string;
|
|
13
|
+
/** Initial date as `YYYY-MM-DD` (uncontrolled). */
|
|
14
|
+
defaultValue?: string;
|
|
15
|
+
/** Called with `YYYY-MM-DD`, or `""` when the date is cleared. */
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
/** Earliest selectable date, `YYYY-MM-DD`. Earlier days are disabled. */
|
|
18
|
+
min?: string;
|
|
19
|
+
/** Latest selectable date, `YYYY-MM-DD`. Later days are disabled. */
|
|
20
|
+
max?: string;
|
|
21
|
+
/** Disable every day before today. Today stays selectable. */
|
|
22
|
+
disablePast?: boolean;
|
|
23
|
+
/** Disable every day after today. Today stays selectable. */
|
|
24
|
+
disableFuture?: boolean;
|
|
25
|
+
/** Individual days to disable, as `YYYY-MM-DD` strings or Date objects (holidays, booked days). */
|
|
26
|
+
disabledDates?: (string | Date)[];
|
|
27
|
+
/** Ranges to disable, both ends included (e.g. a term break). */
|
|
28
|
+
disabledRanges?: DateRange[];
|
|
29
|
+
/** Weekdays to disable: 0 = Sunday ... 6 = Saturday (e.g. `[0, 6]` for weekends). */
|
|
30
|
+
disabledDaysOfWeek?: number[];
|
|
31
|
+
/** Your own rule. Return true to disable the day. Runs in addition to the options above. */
|
|
32
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
33
|
+
/** Text shown while no date is chosen. Defaults to "Select a date". */
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/** Defaults to `md`. */
|
|
36
|
+
size?: ComponentSize;
|
|
37
|
+
/** Submitted with a surrounding `<form>` as `YYYY-MM-DD`. */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** Show a button to clear the date. Defaults to `true`. */
|
|
40
|
+
clearable?: boolean;
|
|
41
|
+
/** First day of the week: 0 = Sunday (default), 1 = Monday. */
|
|
42
|
+
weekStartsOn?: 0 | 1;
|
|
43
|
+
/** BCP 47 locale for month and weekday names and the shown date, e.g. `en-GB`. Defaults to the browser's. */
|
|
44
|
+
locale?: string;
|
|
45
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface MonthCalendarProps {
|
|
2
|
+
/** Selected month as the first day of that month. */
|
|
3
|
+
selected: Date | null;
|
|
4
|
+
/** True for months that cannot be chosen (called with the first day of the month). */
|
|
5
|
+
isDisabled: (month: Date) => boolean;
|
|
6
|
+
locale?: string;
|
|
7
|
+
/** Called with the first day of the chosen month, or null when Clear is pressed. */
|
|
8
|
+
onSelect: (month: Date | null) => void;
|
|
9
|
+
allowClear: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Month and year chooser shown inside the MonthPicker popover. */
|
|
12
|
+
export declare function MonthCalendar({ selected, isDisabled, locale, onSelect, allowClear, }: MonthCalendarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { ComponentSize } from '../../types';
|
|
3
|
+
export interface PickerPanelContext {
|
|
4
|
+
/** Close the popover. Focus returns to the field unless `restoreFocus` is false. */
|
|
5
|
+
close: (restoreFocus?: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface PickerFieldProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'placeholder' | 'value' | 'defaultValue' | 'onChange'> {
|
|
8
|
+
required?: boolean;
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
size?: ComponentSize;
|
|
11
|
+
/** Text for the chosen value, or null to show the placeholder. */
|
|
12
|
+
displayText: string | null;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
/** Submitted with a surrounding form under `name`. */
|
|
15
|
+
name?: string;
|
|
16
|
+
hiddenValue: string;
|
|
17
|
+
/** Show the clear button (only while a value is chosen). */
|
|
18
|
+
clearable: boolean;
|
|
19
|
+
onClear: () => void;
|
|
20
|
+
clearLabel: string;
|
|
21
|
+
/** Accessible name of the popover. */
|
|
22
|
+
panelLabel: string;
|
|
23
|
+
/** Approximate width of the popover in px, used to keep it on screen. */
|
|
24
|
+
panelWidth?: number;
|
|
25
|
+
icon?: 'calendar' | 'clock';
|
|
26
|
+
/** The popover content. */
|
|
27
|
+
children: (context: PickerPanelContext) => ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export interface PickerShellProps {
|
|
30
|
+
label?: ReactNode;
|
|
31
|
+
helperText?: ReactNode;
|
|
32
|
+
error?: ReactNode;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
id?: string;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/** Adds the label, helper text and error around a picker, unless an enclosing FormField provides them. */
|
|
39
|
+
export declare function PickerShell({ label, helperText, error, required, disabled, id, children, }: PickerShellProps): import("react").JSX.Element;
|
|
40
|
+
export declare const PickerField: import("react").ForwardRefExoticComponent<PickerFieldProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TimeColumnsProps {
|
|
2
|
+
/** Hour 0-23, or null while no time is chosen. */
|
|
3
|
+
hours: number | null;
|
|
4
|
+
minutes: number | null;
|
|
5
|
+
onChange: (hours: number, minutes: number) => void;
|
|
6
|
+
minuteStep: number;
|
|
7
|
+
use12Hours: boolean;
|
|
8
|
+
/** True for times that cannot be chosen. */
|
|
9
|
+
isTimeDisabled: (hours: number, minutes: number) => boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Hour, minute (and AM/PM) lists used inside the DateTimePicker popover. */
|
|
12
|
+
export declare function TimeColumns({ hours, minutes, onChange, minuteStep, use12Hours, isTimeDisabled, }: TimeColumnsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|