@dreamtree-org/twreact-ui 1.3.9 → 1.3.11
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 +32 -0
- package/ai-skills/dreamtree-ui.md +12 -7
- package/dist/ai-schema.json +156 -29
- package/dist/charts/index.js +195 -66
- package/dist/components/blocks/AppShell.d.ts.map +1 -1
- package/dist/components/charts/CartesianChart.d.ts.map +1 -1
- package/dist/components/charts/ChartFrame.d.ts.map +1 -1
- package/dist/components/charts/useChartLayout.d.ts +25 -0
- package/dist/components/charts/useChartLayout.d.ts.map +1 -0
- package/dist/components/core/Accordion.d.ts.map +1 -1
- package/dist/components/core/Button.d.ts.map +1 -1
- package/dist/components/core/Checkbox.d.ts.map +1 -1
- package/dist/components/core/ColorPicker.d.ts.map +1 -1
- package/dist/components/core/DatePicker.d.ts.map +1 -1
- package/dist/components/core/Form.d.ts.map +1 -1
- package/dist/components/core/Input.d.ts.map +1 -1
- package/dist/components/core/Loader.d.ts.map +1 -1
- package/dist/components/core/LocationPicker.d.ts.map +1 -1
- package/dist/components/core/PriceRangePicker.d.ts +0 -29
- package/dist/components/core/PriceRangePicker.d.ts.map +1 -1
- package/dist/components/core/ProgressBar.d.ts.map +1 -1
- package/dist/components/core/Radio.d.ts.map +1 -1
- package/dist/components/core/Rate.d.ts.map +1 -1
- package/dist/components/core/RoundedTag.d.ts.map +1 -1
- package/dist/components/core/Skeleton.d.ts.map +1 -1
- package/dist/components/core/Slider.d.ts.map +1 -1
- package/dist/components/core/SpeechToText.d.ts.map +1 -1
- package/dist/components/core/Switch.d.ts.map +1 -1
- package/dist/components/core/Table/ColumnMenu.d.ts.map +1 -1
- package/dist/components/core/Table/Pagination.d.ts.map +1 -1
- package/dist/components/core/Table/TableRow.d.ts.map +1 -1
- package/dist/components/core/Table/helpers.d.ts +2 -0
- package/dist/components/core/Table/helpers.d.ts.map +1 -1
- package/dist/components/core/Tabs.d.ts +2 -5
- package/dist/components/core/Tabs.d.ts.map +1 -1
- package/dist/components/core/TextToSpeech.d.ts +2 -7
- package/dist/components/core/TextToSpeech.d.ts.map +1 -1
- package/dist/components/core/Textarea.d.ts.map +1 -1
- package/dist/components/core/Tooltip.d.ts.map +1 -1
- package/dist/components/feedback/Alert.d.ts.map +1 -1
- package/dist/components/feedback/Dialog.d.ts.map +1 -1
- package/dist/components/feedback/Toast.d.ts.map +1 -1
- package/dist/components/navigation/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/FootNav.d.ts.map +1 -1
- package/dist/components/navigation/Sidebar.d.ts.map +1 -1
- package/dist/components/utility/Avatar.d.ts +8 -0
- package/dist/components/utility/Avatar.d.ts.map +1 -1
- package/dist/components/utility/AvatarGroup.d.ts +4 -0
- package/dist/components/utility/AvatarGroup.d.ts.map +1 -0
- package/dist/components/utility/Badge.d.ts.map +1 -1
- package/dist/components/utility/Card.d.ts.map +1 -1
- package/dist/components/utility/Carousel.d.ts.map +1 -1
- package/dist/components/utility/FileUpload.d.ts.map +1 -1
- package/dist/components/utility/Pagination.d.ts.map +1 -1
- package/dist/components/utility/Sortable.d.ts.map +1 -1
- package/dist/components/utility/Stepper.d.ts.map +1 -1
- package/dist/esm/components/blocks/AppShell.js +24 -18
- package/dist/esm/components/blocks/EmptyState.js +1 -1
- package/dist/esm/components/blocks/ErrorState.js +1 -1
- package/dist/esm/components/blocks/LoadingState.js +4 -4
- package/dist/esm/components/blocks/StatCard.js +6 -6
- package/dist/esm/components/blocks/StatusPill.js +5 -8
- package/dist/esm/components/charts/CartesianChart.js +85 -62
- package/dist/esm/components/charts/ChartFrame.js +12 -5
- package/dist/esm/components/charts/useChartLayout.js +105 -0
- package/dist/esm/components/core/Accordion.js +40 -9
- package/dist/esm/components/core/Button.js +49 -25
- package/dist/esm/components/core/Checkbox.js +71 -45
- package/dist/esm/components/core/ColorPicker.js +49 -48
- package/dist/esm/components/core/DatePicker.js +97 -58
- package/dist/esm/components/core/Form.js +35 -8
- package/dist/esm/components/core/Input.js +89 -20
- package/dist/esm/components/core/Loader.js +30 -44
- package/dist/esm/components/core/LocationPicker.js +82 -16
- package/dist/esm/components/core/PriceRangePicker.js +205 -218
- package/dist/esm/components/core/ProgressBar.js +8 -12
- package/dist/esm/components/core/Radio.js +43 -15
- package/dist/esm/components/core/Rate.js +109 -50
- package/dist/esm/components/core/RoundedTag.js +27 -10
- package/dist/esm/components/core/Skeleton.js +13 -14
- package/dist/esm/components/core/Slider.js +24 -6
- package/dist/esm/components/core/SpeechToText.js +68 -16
- package/dist/esm/components/core/Switch.js +88 -16
- package/dist/esm/components/core/Table/ColumnMenu.js +2 -4
- package/dist/esm/components/core/Table/Pagination.js +15 -18
- package/dist/esm/components/core/Table/TableRow.js +2 -2
- package/dist/esm/components/core/Table/helpers.js +33 -1
- package/dist/esm/components/core/Tabs.js +185 -37
- package/dist/esm/components/core/TextToSpeech.js +121 -28
- package/dist/esm/components/core/Textarea.js +10 -2
- package/dist/esm/components/core/Tooltip.js +100 -28
- package/dist/esm/components/feedback/Alert.js +21 -11
- package/dist/esm/components/feedback/Dialog.js +44 -100
- package/dist/esm/components/feedback/Toast.js +24 -5
- package/dist/esm/components/navigation/Breadcrumbs.js +97 -35
- package/dist/esm/components/navigation/FootNav.js +102 -13
- package/dist/esm/components/navigation/Sidebar.js +13 -61
- package/dist/esm/components/utility/Avatar.js +37 -22
- package/dist/esm/components/utility/AvatarGroup.js +56 -0
- package/dist/esm/components/utility/Badge.js +43 -23
- package/dist/esm/components/utility/Card.js +32 -8
- package/dist/esm/components/utility/Carousel.js +165 -38
- package/dist/esm/components/utility/FileUpload.js +106 -31
- package/dist/esm/components/utility/Pagination.js +33 -15
- package/dist/esm/components/utility/Sortable.js +6 -2
- package/dist/esm/components/utility/Stepper.js +110 -47
- package/dist/esm/hooks/useFocusTrap.js +10 -2
- package/dist/esm/hooks/useSliderValues.js +8 -2
- package/dist/esm/hooks/useSortable.js +107 -5
- package/dist/esm/index.js +1 -0
- package/dist/esm/utils/touchTarget.js +4 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useSliderValues.d.ts +6 -2
- package/dist/hooks/useSliderValues.d.ts.map +1 -1
- package/dist/hooks/useSortable.d.ts +11 -1
- package/dist/hooks/useSortable.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +3734 -2174
- package/dist/index.js +3732 -2171
- package/dist/types/charts.d.ts +3 -1
- package/dist/types/charts.d.ts.map +1 -1
- package/dist/types/index.d.ts +64 -9
- package/dist/types/index.d.ts.map +1 -1
- package/doc/README.md +1 -0
- package/mcp/catalog.snapshot.json +350 -121
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -669,6 +669,22 @@ User profile images with fallbacks and status indicators.
|
|
|
669
669
|
/>
|
|
670
670
|
```
|
|
671
671
|
|
|
672
|
+
#### AvatarGroup
|
|
673
|
+
Overlapping stack of avatars with a "+N" overflow tile.
|
|
674
|
+
|
|
675
|
+
**Props:**
|
|
676
|
+
- `max`: number. Avatars past `max` collapse into a "+N" tile
|
|
677
|
+
- `size`: Avatar size passed to every child that doesn't set its own (default: 'md')
|
|
678
|
+
|
|
679
|
+
```jsx
|
|
680
|
+
<AvatarGroup max={3} size="sm">
|
|
681
|
+
<Avatar name="Ana" />
|
|
682
|
+
<Avatar name="Ben" />
|
|
683
|
+
<Avatar name="Cy" />
|
|
684
|
+
<Avatar name="Dee" />
|
|
685
|
+
</AvatarGroup>
|
|
686
|
+
```
|
|
687
|
+
|
|
672
688
|
#### Badge
|
|
673
689
|
Status indicators and labels with different variants.
|
|
674
690
|
|
|
@@ -677,6 +693,9 @@ Status indicators and labels with different variants.
|
|
|
677
693
|
- `variant`: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'outline' (default: 'default')
|
|
678
694
|
- `size`: 'sm' | 'md' | 'lg' (default: 'md')
|
|
679
695
|
- `rounded`: boolean (default: true)
|
|
696
|
+
- `dot`: boolean. A status dot before the label (default: false)
|
|
697
|
+
- `icon`: ReactNode. A leading icon
|
|
698
|
+
- `max`: number. A number child above `max` shows `${max}+`
|
|
680
699
|
|
|
681
700
|
```jsx
|
|
682
701
|
<Badge variant="success" size="sm">
|
|
@@ -893,6 +912,17 @@ The palettes are `primary`, `secondary`, `success`, `warning`, `error`, `info` a
|
|
|
893
912
|
|
|
894
913
|
The stylesheet ships a phone baseline: no tap highlight, no iOS zoom when a field is focused (text fields are 16px on touch screens; add `dt-keep-font-size` to opt one out), `color-scheme` that follows the theme, and no rubber-band overscroll on `body` (add `dt-overscroll-auto` to `<html>` to keep pull-to-refresh). Pad edge bars with `pt-safe` / `pb-safe` / `px-safe` / `inset-safe` — they need `<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">` — and size full-height layouts with `min-h-dvh` instead of `100vh`. Touch targets grow to 44px on coarse pointers.
|
|
895
914
|
|
|
915
|
+
**Touch-friendly components (1.6–1.8).**
|
|
916
|
+
- **Controls:** `Input`/`Textarea` take `size`, `Input` adds `floatingLabel` and `otp`, and sets mobile keyboard hints for `tel`/`email`/`url`/`search`.
|
|
917
|
+
- **Buttons:** square `size="icon"` sizes, press feedback, and a loading state that keeps the button's width.
|
|
918
|
+
- **FootNav:** a native tab bar with safe area, links (`href` + `linkAs`), `hideOnScroll` and `FootNav.Spacer`.
|
|
919
|
+
- **Tabs:** scroll with snap, plus a `segmented` variant and `swipeable`.
|
|
920
|
+
- **Navigation:** `Pagination` goes compact on phones, `Stepper` can stack (`orientation="auto"`), and `Breadcrumbs` collapses (`maxItems`).
|
|
921
|
+
- **Carousel:** a native scroll-snap swiper.
|
|
922
|
+
- **Sortable:** drags after a long-press on touch.
|
|
923
|
+
- **FileUpload:** shows "Choose file" / "Take photo" buttons on touch (`capture`).
|
|
924
|
+
- **Charts:** take `aspectRatio` and pin the tooltip on tap.
|
|
925
|
+
|
|
896
926
|
## Dark Mode
|
|
897
927
|
|
|
898
928
|
Enable dark mode with the built-in theme provider:
|
|
@@ -913,6 +943,8 @@ function App() {
|
|
|
913
943
|
|
|
914
944
|
Surfaces such as `Card`, `Sidebar`, `Navbar`, `Table`, `FootNav` and `Dropdown` use the semantic `bg-surface` / `bg-background` / `border-line` / `text-foreground` / `text-muted` tokens, which switch under `.dark` (or `[data-theme="dark"]`). Re-theme them by overriding the `--dt-surface`, `--dt-background`, `--dt-line`, … variables.
|
|
915
945
|
|
|
946
|
+
> **Accessibility fixes (1.4.x):** Radio groups keep a single selection when uncontrolled, Rate and DatePicker use one tab stop with arrow-key focus, Dialog/Sidebar/AppShell drawers share one focus trap and scroll lock, Toast announces via `role="status"`, Alert's dismiss button is labelled, and Input shows a visible focus ring in its default state. No props changed.
|
|
947
|
+
|
|
916
948
|
## Examples
|
|
917
949
|
|
|
918
950
|
### Complete Form Example
|
|
@@ -121,7 +121,7 @@ The library exports four kinds of things from `@dreamtree-org/twreact-ui`:
|
|
|
121
121
|
| **Core** | `Input`, `Button`, `Select`, `Table`, `Form`, `Accordion`, `Checkbox`, `ColorPicker`, `DatePicker`, `DateRangePicker`, `Loader`, `LocationPicker`, `PriceRangePicker`, `ProgressBar`, `Radio`, `Rate`, `RoundedTag`, `Skeleton`, `Switch`, `Tabs`, `ThreeDotPopover`, `Tooltip`, `SpeechToText`, `TextToSpeech`, `Textarea`, `Slider`, `Popover` |
|
|
122
122
|
| **Navigation** | `Sidebar`, `Navbar`, `FootNav`, `Breadcrumbs` |
|
|
123
123
|
| **Feedback** | `Dialog`, `Toast` (+ `ToastProvider`, `ToastContainer`, `useToast`), `Alert`, `Drawer` (side sheet; `isOpen`/`onClose` like Dialog), `Tour` (onboarding spotlight) |
|
|
124
|
-
| **Utility** | `Badge`, `Avatar`, `Card`, `Pagination`, `Stepper`, `FileUpload`, `Condition`, `Carousel`, `Sortable` (drag + keyboard reorder) |
|
|
124
|
+
| **Utility** | `Badge`, `Avatar`, `AvatarGroup` (overlapping stack + `max` "+N"), `Card`, `Pagination`, `Stepper`, `FileUpload`, `Condition`, `Carousel`, `Sortable` (drag + keyboard reorder) |
|
|
125
125
|
| **Blocks** | `AppShell`, `PageHeader`, `StatCard`, `StatusPill`, `EmptyState`, `ErrorState`, `LoadingState`, `ConfirmDialog` — page-level patterns; build pages from these before composing layouts by hand |
|
|
126
126
|
| **Charts** (`@dreamtree-org/twreact-ui/charts`, peer `recharts`) | `LineChart`, `BarChart`, `AreaChart`, `DonutChart`, `Sparkline` — NOT exported from the root |
|
|
127
127
|
| **Rich text** (`@dreamtree-org/twreact-ui/rich-text`, peers `@tiptap/react @tiptap/pm @tiptap/starter-kit`) | `RichTextEditor` — NOT exported from the root |
|
|
@@ -172,7 +172,8 @@ Components use a **shared variant/size/focus vocabulary**:
|
|
|
172
172
|
(component-specific extras like `Badge: info` and `Alert: neutral` are documented per-component).
|
|
173
173
|
- **Sizes:** `xs | sm | md | lg | xl | 2xl` mapping to heights `h-7 / h-8 / h-10 / h-12 / h-14 / h-16`
|
|
174
174
|
and padding `px-2 / px-3 / px-4 / px-6 / px-8 / px-10` (`Button` implements all six;
|
|
175
|
-
other components MAY support a subset and fall back to `md`).
|
|
175
|
+
other components MAY support a subset and fall back to `md`). `Button` also has square
|
|
176
|
+
icon-only sizes `icon-sm | icon | icon-lg` (always with `aria-label`).
|
|
176
177
|
- **Focus ring:** `focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500`
|
|
177
178
|
(the color token swaps for destructive / etc.).
|
|
178
179
|
- **Dark mode:** Tailwind `darkMode: 'class'`. Every color choice has a `dark:` counterpart.
|
|
@@ -194,13 +195,17 @@ When suggesting a component or new variant value, use this exact vocabulary.
|
|
|
194
195
|
**Interaction primitives** — reach for these before hand-rolling the pattern:
|
|
195
196
|
|
|
196
197
|
- `Drawer` — side/edge sheet for record peeks and editors (`isOpen`, `onClose`, `title`, `placement`, `size`, `footer`); don't fake one with `Dialog size="lg"`. On phones use `placement="bottom"` (+ `swipeToClose`) as the bottom sheet: it already has a grab `handle`, rounded top and safe-area padding — don't add them with `className`.
|
|
197
|
-
- `FootNav` — phone tab bar. A centre "+" is an item with `variant: 'action'` (raised primary circle); give it `'aria-haspopup': 'dialog'` and `'aria-expanded'` when it opens a sheet.
|
|
198
|
+
- `FootNav` — phone tab bar. A centre "+" is an item with `variant: 'action'` (raised primary circle); give it `'aria-haspopup': 'dialog'` and `'aria-expanded'` when it opens a sheet. Navigation tabs take `href`/`to` (+ `linkAs={Link}`) so they render as links with `aria-current="page"`; `hideOnScroll` slides it away on scroll down; put `<FootNav.Spacer />` after the page content instead of a hand-tuned `pb-20`. It already pads the safe area and caps badges at `99+` (`badgeMax`).
|
|
198
199
|
- `Button` as a link — `<Button href="tel:…">` or `<Button as={Link} to="/x">`; never copy Button's class string onto an `<a>`.
|
|
200
|
+
- Icon-only `Button` — `<Button size="icon" aria-label="Add"><Plus /></Button>` (`icon-sm`/`icon-lg` too); never a raw `<button>` with an icon. `loading` keeps the button's width.
|
|
201
|
+
- `Badge` — `dot` (live/status dot), `icon` (leading icon slot), `max={99}` with a numeric child renders `99+`.
|
|
202
|
+
- `AvatarGroup` — `<AvatarGroup max={3} size="sm">{people.map(p => <Avatar name={p.name} />)}</AvatarGroup>`; don't hand-roll `-space-x` stacks or a fake `<Avatar name="+5" />`.
|
|
199
203
|
- `Select size="lg"` — 44px trigger for phone forms (`md` already grows to 44px on touch screens).
|
|
200
|
-
- `
|
|
204
|
+
- `Input` — same `size` (`sm`/`md`/`lg`; `md` is 44px on touch screens); `floatingLabel` puts the label inside the field; `otp` for one-time codes. `type="tel|email|url|search"` already sets `inputMode`/`autoComplete` — don't add them by hand.
|
|
205
|
+
- `Stepper` steps take `title` (or its alias `label`); on phones use `orientation="auto"` (vertical below `sm`) or `variant="dots"` for compact progress. `Tabs variant="segmented"` is the iOS segmented control (2–4 short options); add `swipeable` for swiping between panels on touch. Many tabs scroll sideways on their own, so don't wrap `Tabs.List` in an `overflow-x-auto` div. `Breadcrumbs maxItems={3}` collapses deep trails into "…". `Pagination` collapses to "‹ Page 3 of 10 ›" below `sm` by itself. `Radio` follows the primary token by default — don't pass `radioColor` to match the brand.
|
|
201
206
|
- `Popover` — click-triggered panel with controls (`trigger={<Button>…</Button>}`, children or `({ close }) => …`); `Tooltip` is for read-only hover text only.
|
|
202
207
|
- `Textarea` — same API as `Input` plus `autoResize`/`maxRows`; never a raw `<textarea>`.
|
|
203
|
-
- `Slider` — `defaultValue={40}` for one thumb, `[low, high]` for a range; `onChangeEnd` to save after a drag.
|
|
208
|
+
- `Slider` — `defaultValue={40}` for one thumb, `[low, high]` for a range; `onChangeEnd` to save after a drag. A value bubble shows while dragging (`showBubble={false}` to hide).
|
|
204
209
|
- `Sortable` — `items` + `onReorder(newItems)` + `renderItem`; keyboard reordering and announcements are built in. Pass `handle` and spread `handleProps` on a grip for touch screens.
|
|
205
210
|
- Charts (`/charts`) — `<LineChart data={rows} index="month" categories={['revenue', 'costs']} />`; same shape for `BarChart` (`stacked`, `horizontal`) and `AreaChart` (`stacked`); `DonutChart` takes `index` (name key) + `category` (value key) + `centerLabel`; `Sparkline` takes `category` + `color`. Colours are tokens (`colors={['primary', 'success-600']}`), never hex. Always pass `title` (accessible name) and, for key charts, a `description` with the takeaway. `valueFormatter` formats tooltip/axis/table values.
|
|
206
211
|
- `RichTextEditor` (`/rich-text`) — `label`/`error`/`helperText` like `Input`; `value` + `onChange(html)` (or `outputFormat="json"`); `toolbar={['bold', 'italic', 'link']}` to trim. Tell the user to **sanitize the HTML server-side**; never render it with `dangerouslySetInnerHTML` unsanitized.
|
|
@@ -235,8 +240,8 @@ import { Button } from '@dreamtree-org/twreact-ui';
|
|
|
235
240
|
<Button variant="outline" leftIcon={<Plus className="h-4 w-4" />}>Add item</Button>
|
|
236
241
|
```
|
|
237
242
|
|
|
238
|
-
Props: `variant`, `size
|
|
239
|
-
`fullWidth`, `className`, plus all native `<button>` props.
|
|
243
|
+
Props: `variant`, `size` (incl. `icon-sm`/`icon`/`icon-lg`), `disabled`, `loading`, `leftIcon`, `rightIcon`,
|
|
244
|
+
`fullWidth`, `as`, `href`, `className`, plus all native `<button>` props.
|
|
240
245
|
|
|
241
246
|
### Input + Form
|
|
242
247
|
|
package/dist/ai-schema.json
CHANGED
|
@@ -203,7 +203,11 @@
|
|
|
203
203
|
"yAxisWidth": {
|
|
204
204
|
"type": "number",
|
|
205
205
|
"required": false,
|
|
206
|
-
"default": "48"
|
|
206
|
+
"default": "48 (36 when the chart is narrower than 400 px)"
|
|
207
|
+
},
|
|
208
|
+
"aspectRatio": {
|
|
209
|
+
"type": "number",
|
|
210
|
+
"required": false
|
|
207
211
|
},
|
|
208
212
|
"curveType": {
|
|
209
213
|
"type": "enum",
|
|
@@ -285,6 +289,34 @@
|
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
291
|
},
|
|
292
|
+
"AvatarGroup": {
|
|
293
|
+
"group": "utility",
|
|
294
|
+
"import": "@dreamtree-org/twreact-ui",
|
|
295
|
+
"forwardRef": true,
|
|
296
|
+
"props": {
|
|
297
|
+
"children": {
|
|
298
|
+
"type": "ReactNode",
|
|
299
|
+
"required": false
|
|
300
|
+
},
|
|
301
|
+
"max": {
|
|
302
|
+
"type": "number",
|
|
303
|
+
"required": false
|
|
304
|
+
},
|
|
305
|
+
"size": {
|
|
306
|
+
"type": "enum",
|
|
307
|
+
"required": false,
|
|
308
|
+
"values": [
|
|
309
|
+
"xs",
|
|
310
|
+
"sm",
|
|
311
|
+
"md",
|
|
312
|
+
"lg",
|
|
313
|
+
"xl",
|
|
314
|
+
"2xl"
|
|
315
|
+
],
|
|
316
|
+
"default": "\"md\""
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
288
320
|
"Badge": {
|
|
289
321
|
"group": "utility",
|
|
290
322
|
"import": "@dreamtree-org/twreact-ui",
|
|
@@ -326,6 +358,19 @@
|
|
|
326
358
|
"type": "boolean",
|
|
327
359
|
"required": false,
|
|
328
360
|
"default": "true"
|
|
361
|
+
},
|
|
362
|
+
"dot": {
|
|
363
|
+
"type": "boolean",
|
|
364
|
+
"required": false,
|
|
365
|
+
"default": "false"
|
|
366
|
+
},
|
|
367
|
+
"icon": {
|
|
368
|
+
"type": "ReactNode",
|
|
369
|
+
"required": false
|
|
370
|
+
},
|
|
371
|
+
"max": {
|
|
372
|
+
"type": "number",
|
|
373
|
+
"required": false
|
|
329
374
|
}
|
|
330
375
|
}
|
|
331
376
|
},
|
|
@@ -416,7 +461,11 @@
|
|
|
416
461
|
"yAxisWidth": {
|
|
417
462
|
"type": "number",
|
|
418
463
|
"required": false,
|
|
419
|
-
"default": "48"
|
|
464
|
+
"default": "48 (36 when the chart is narrower than 400 px)"
|
|
465
|
+
},
|
|
466
|
+
"aspectRatio": {
|
|
467
|
+
"type": "number",
|
|
468
|
+
"required": false
|
|
420
469
|
},
|
|
421
470
|
"stacked": {
|
|
422
471
|
"type": "boolean",
|
|
@@ -457,6 +506,11 @@
|
|
|
457
506
|
"onHomeClick": {
|
|
458
507
|
"type": "(item: BreadcrumbItem) => void",
|
|
459
508
|
"required": false
|
|
509
|
+
},
|
|
510
|
+
"maxItems": {
|
|
511
|
+
"type": "number",
|
|
512
|
+
"required": false,
|
|
513
|
+
"default": "— (no collapse)"
|
|
460
514
|
}
|
|
461
515
|
}
|
|
462
516
|
},
|
|
@@ -480,16 +534,8 @@
|
|
|
480
534
|
"default": "\"primary\""
|
|
481
535
|
},
|
|
482
536
|
"size": {
|
|
483
|
-
"type": "
|
|
537
|
+
"type": "Size | ButtonIconSize",
|
|
484
538
|
"required": false,
|
|
485
|
-
"values": [
|
|
486
|
-
"xs",
|
|
487
|
-
"sm",
|
|
488
|
-
"md",
|
|
489
|
-
"lg",
|
|
490
|
-
"xl",
|
|
491
|
-
"2xl"
|
|
492
|
-
],
|
|
493
539
|
"default": "\"md\""
|
|
494
540
|
},
|
|
495
541
|
"disabled": {
|
|
@@ -565,6 +611,11 @@
|
|
|
565
611
|
"type": "boolean",
|
|
566
612
|
"required": false,
|
|
567
613
|
"default": "false"
|
|
614
|
+
},
|
|
615
|
+
"interactive": {
|
|
616
|
+
"type": "boolean",
|
|
617
|
+
"required": false,
|
|
618
|
+
"default": "false"
|
|
568
619
|
}
|
|
569
620
|
}
|
|
570
621
|
},
|
|
@@ -728,7 +779,8 @@
|
|
|
728
779
|
},
|
|
729
780
|
"label": {
|
|
730
781
|
"type": "string",
|
|
731
|
-
"required": false
|
|
782
|
+
"required": false,
|
|
783
|
+
"default": "\"Pick a color\""
|
|
732
784
|
}
|
|
733
785
|
}
|
|
734
786
|
},
|
|
@@ -1168,6 +1220,11 @@
|
|
|
1168
1220
|
"type": "boolean",
|
|
1169
1221
|
"required": false,
|
|
1170
1222
|
"default": "false"
|
|
1223
|
+
},
|
|
1224
|
+
"capture": {
|
|
1225
|
+
"type": "boolean | 'user' | 'environment'",
|
|
1226
|
+
"required": false,
|
|
1227
|
+
"default": "\"user\""
|
|
1171
1228
|
}
|
|
1172
1229
|
}
|
|
1173
1230
|
},
|
|
@@ -1180,6 +1237,26 @@
|
|
|
1180
1237
|
"type": "FootNavItem[]",
|
|
1181
1238
|
"required": true,
|
|
1182
1239
|
"default": "[]"
|
|
1240
|
+
},
|
|
1241
|
+
"linkAs": {
|
|
1242
|
+
"type": "ElementType",
|
|
1243
|
+
"required": false,
|
|
1244
|
+
"default": "\"a\""
|
|
1245
|
+
},
|
|
1246
|
+
"hideOnScroll": {
|
|
1247
|
+
"type": "boolean",
|
|
1248
|
+
"required": false,
|
|
1249
|
+
"default": "false"
|
|
1250
|
+
},
|
|
1251
|
+
"badgeMax": {
|
|
1252
|
+
"type": "number",
|
|
1253
|
+
"required": false,
|
|
1254
|
+
"default": "99"
|
|
1255
|
+
},
|
|
1256
|
+
"aria-label": {
|
|
1257
|
+
"type": "string",
|
|
1258
|
+
"required": false,
|
|
1259
|
+
"default": "\"Primary\""
|
|
1183
1260
|
}
|
|
1184
1261
|
}
|
|
1185
1262
|
},
|
|
@@ -1195,7 +1272,8 @@
|
|
|
1195
1272
|
},
|
|
1196
1273
|
"onSubmit": {
|
|
1197
1274
|
"type": "(data: any) => void",
|
|
1198
|
-
"required": false
|
|
1275
|
+
"required": false,
|
|
1276
|
+
"default": "Promise<void>"
|
|
1199
1277
|
},
|
|
1200
1278
|
"defaultValues": {
|
|
1201
1279
|
"type": "Record",
|
|
@@ -1332,6 +1410,21 @@
|
|
|
1332
1410
|
"onChange": {
|
|
1333
1411
|
"type": "(event: React.ChangeEvent<HTMLInputElement>) => void",
|
|
1334
1412
|
"required": false
|
|
1413
|
+
},
|
|
1414
|
+
"size": {
|
|
1415
|
+
"type": "'sm' | 'md' | 'lg' | number",
|
|
1416
|
+
"required": false,
|
|
1417
|
+
"default": "\"md\""
|
|
1418
|
+
},
|
|
1419
|
+
"floatingLabel": {
|
|
1420
|
+
"type": "boolean",
|
|
1421
|
+
"required": false,
|
|
1422
|
+
"default": "false"
|
|
1423
|
+
},
|
|
1424
|
+
"otp": {
|
|
1425
|
+
"type": "boolean",
|
|
1426
|
+
"required": false,
|
|
1427
|
+
"default": "false"
|
|
1335
1428
|
}
|
|
1336
1429
|
}
|
|
1337
1430
|
},
|
|
@@ -1422,7 +1515,11 @@
|
|
|
1422
1515
|
"yAxisWidth": {
|
|
1423
1516
|
"type": "number",
|
|
1424
1517
|
"required": false,
|
|
1425
|
-
"default": "48"
|
|
1518
|
+
"default": "48 (36 when the chart is narrower than 400 px)"
|
|
1519
|
+
},
|
|
1520
|
+
"aspectRatio": {
|
|
1521
|
+
"type": "number",
|
|
1522
|
+
"required": false
|
|
1426
1523
|
},
|
|
1427
1524
|
"curveType": {
|
|
1428
1525
|
"type": "enum",
|
|
@@ -1474,8 +1571,7 @@
|
|
|
1474
1571
|
},
|
|
1475
1572
|
"secondaryColor": {
|
|
1476
1573
|
"type": "string",
|
|
1477
|
-
"required": false
|
|
1478
|
-
"default": "\"rgba(0,0,0,0.08)\""
|
|
1574
|
+
"required": false
|
|
1479
1575
|
},
|
|
1480
1576
|
"variant": {
|
|
1481
1577
|
"type": "string",
|
|
@@ -1546,6 +1642,11 @@
|
|
|
1546
1642
|
"type": "string",
|
|
1547
1643
|
"required": false,
|
|
1548
1644
|
"default": "\"lat, lng\""
|
|
1645
|
+
},
|
|
1646
|
+
"fullWidth": {
|
|
1647
|
+
"type": "boolean",
|
|
1648
|
+
"required": false,
|
|
1649
|
+
"default": "false"
|
|
1549
1650
|
}
|
|
1550
1651
|
}
|
|
1551
1652
|
},
|
|
@@ -1800,7 +1901,7 @@
|
|
|
1800
1901
|
"colorClass": {
|
|
1801
1902
|
"type": "string",
|
|
1802
1903
|
"required": false,
|
|
1803
|
-
"default": "\"bg-
|
|
1904
|
+
"default": "\"bg-primary-600\""
|
|
1804
1905
|
},
|
|
1805
1906
|
"ariaLabel": {
|
|
1806
1907
|
"type": "string",
|
|
@@ -2164,8 +2265,7 @@
|
|
|
2164
2265
|
},
|
|
2165
2266
|
"ariaLabel": {
|
|
2166
2267
|
"type": "string",
|
|
2167
|
-
"required": false
|
|
2168
|
-
"default": "\"tag\""
|
|
2268
|
+
"required": false
|
|
2169
2269
|
},
|
|
2170
2270
|
"avatarPosition": {
|
|
2171
2271
|
"type": "enum",
|
|
@@ -2512,6 +2612,11 @@
|
|
|
2512
2612
|
"required": false,
|
|
2513
2613
|
"default": "false"
|
|
2514
2614
|
},
|
|
2615
|
+
"showBubble": {
|
|
2616
|
+
"type": "boolean",
|
|
2617
|
+
"required": false,
|
|
2618
|
+
"default": "true"
|
|
2619
|
+
},
|
|
2515
2620
|
"formatValue": {
|
|
2516
2621
|
"type": "(value: number) => string",
|
|
2517
2622
|
"required": false,
|
|
@@ -2748,18 +2853,14 @@
|
|
|
2748
2853
|
"required": false
|
|
2749
2854
|
},
|
|
2750
2855
|
"orientation": {
|
|
2751
|
-
"type": "
|
|
2856
|
+
"type": "Orientation | 'auto'",
|
|
2752
2857
|
"required": false,
|
|
2753
|
-
"values": [
|
|
2754
|
-
"horizontal",
|
|
2755
|
-
"vertical"
|
|
2756
|
-
],
|
|
2757
2858
|
"default": "\"vertical\""
|
|
2758
2859
|
},
|
|
2759
2860
|
"variant": {
|
|
2760
|
-
"type": "string",
|
|
2861
|
+
"type": "'default' | 'dots' | (string & {})",
|
|
2761
2862
|
"required": false,
|
|
2762
|
-
"default": "\"
|
|
2863
|
+
"default": "\"dots\""
|
|
2763
2864
|
}
|
|
2764
2865
|
}
|
|
2765
2866
|
},
|
|
@@ -3104,6 +3205,7 @@
|
|
|
3104
3205
|
"values": [
|
|
3105
3206
|
"line",
|
|
3106
3207
|
"pills",
|
|
3208
|
+
"segmented",
|
|
3107
3209
|
"unstyled"
|
|
3108
3210
|
],
|
|
3109
3211
|
"default": "\"pills\""
|
|
@@ -3112,13 +3214,18 @@
|
|
|
3112
3214
|
"type": "boolean",
|
|
3113
3215
|
"required": false,
|
|
3114
3216
|
"default": "true"
|
|
3217
|
+
},
|
|
3218
|
+
"swipeable": {
|
|
3219
|
+
"type": "boolean",
|
|
3220
|
+
"required": false,
|
|
3221
|
+
"default": "false"
|
|
3115
3222
|
}
|
|
3116
3223
|
}
|
|
3117
3224
|
},
|
|
3118
3225
|
"TextToSpeech": {
|
|
3119
3226
|
"group": "core",
|
|
3120
3227
|
"import": "@dreamtree-org/twreact-ui",
|
|
3121
|
-
"forwardRef":
|
|
3228
|
+
"forwardRef": true,
|
|
3122
3229
|
"props": {
|
|
3123
3230
|
"text": {
|
|
3124
3231
|
"type": "string",
|
|
@@ -3140,6 +3247,16 @@
|
|
|
3140
3247
|
"required": false,
|
|
3141
3248
|
"default": "() => {}"
|
|
3142
3249
|
},
|
|
3250
|
+
"onError": {
|
|
3251
|
+
"type": "(error: Error) => void",
|
|
3252
|
+
"required": false,
|
|
3253
|
+
"default": "() => {}"
|
|
3254
|
+
},
|
|
3255
|
+
"disabled": {
|
|
3256
|
+
"type": "boolean",
|
|
3257
|
+
"required": false,
|
|
3258
|
+
"default": "false"
|
|
3259
|
+
},
|
|
3143
3260
|
"renderButton": {
|
|
3144
3261
|
"type": "(state: TextToSpeechState) => ReactNode",
|
|
3145
3262
|
"required": false
|
|
@@ -3195,6 +3312,16 @@
|
|
|
3195
3312
|
"maxRows": {
|
|
3196
3313
|
"type": "number",
|
|
3197
3314
|
"required": false
|
|
3315
|
+
},
|
|
3316
|
+
"size": {
|
|
3317
|
+
"type": "enum",
|
|
3318
|
+
"required": false,
|
|
3319
|
+
"values": [
|
|
3320
|
+
"sm",
|
|
3321
|
+
"md",
|
|
3322
|
+
"lg"
|
|
3323
|
+
],
|
|
3324
|
+
"default": "\"md\""
|
|
3198
3325
|
}
|
|
3199
3326
|
}
|
|
3200
3327
|
},
|
|
@@ -3347,12 +3474,12 @@
|
|
|
3347
3474
|
"textClass": {
|
|
3348
3475
|
"type": "string",
|
|
3349
3476
|
"required": false,
|
|
3350
|
-
"default": "\"text-
|
|
3477
|
+
"default": "\"text-foreground\""
|
|
3351
3478
|
},
|
|
3352
3479
|
"bgClass": {
|
|
3353
3480
|
"type": "string",
|
|
3354
3481
|
"required": false,
|
|
3355
|
-
"default": "\"bg-
|
|
3482
|
+
"default": "\"bg-surface\""
|
|
3356
3483
|
},
|
|
3357
3484
|
"portal": {
|
|
3358
3485
|
"type": "boolean",
|