wimui 0.70.0 → 0.71.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/dist/components/_internal/useAnnounce.cjs +1 -1
- package/dist/components/_internal/useAnnounce.d.ts +22 -0
- package/dist/components/_internal/useAnnounce.js +36 -19
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.cjs +2 -2
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.js +106 -105
- package/dist/components/ai/StreamingText/StreamingText.cjs +1 -1
- package/dist/components/ai/StreamingText/StreamingText.d.ts +1 -1
- package/dist/components/ai/StreamingText/StreamingText.js +37 -23
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +41 -40
- package/dist/components/data-display/InfiniteScroll/InfiniteScroll.cjs +1 -1
- package/dist/components/data-display/InfiniteScroll/InfiniteScroll.d.ts +1 -1
- package/dist/components/data-display/InfiniteScroll/InfiniteScroll.js +37 -26
- package/dist/components/feedback/Spinner/Spinner.cjs +1 -1
- package/dist/components/feedback/Spinner/Spinner.js +53 -43
- package/dist/components/form/Combobox/Combobox.cjs +1 -1
- package/dist/components/form/Combobox/Combobox.js +48 -47
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.js +0 -1
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.js +111 -110
- package/dist/hooks/useBreakpoint.d.ts +1 -0
- package/dist/i18n/generated/data-display.cjs +1 -1
- package/dist/i18n/generated/data-display.d.ts +1 -1
- package/dist/i18n/generated/data-display.js +6 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +18 -18
- package/dist/llms/AIResponseFeedback.md +26 -0
- package/dist/llms/Accordion.md +47 -0
- package/dist/llms/Affix.md +25 -0
- package/dist/llms/AgentStatus.md +25 -0
- package/dist/llms/Alert.md +28 -0
- package/dist/llms/Anchor.md +30 -0
- package/dist/llms/AppShell.md +52 -0
- package/dist/llms/AreaChart.md +27 -0
- package/dist/llms/ArtifactsOverlay.md +27 -0
- package/dist/llms/AspectRatio.md +22 -0
- package/dist/llms/Audio.md +44 -0
- package/dist/llms/Autosave.md +23 -0
- package/dist/llms/Avatar.md +27 -0
- package/dist/llms/AvatarGroup.md +28 -0
- package/dist/llms/BackTop.md +32 -0
- package/dist/llms/Badge.md +28 -0
- package/dist/llms/Banner.md +28 -0
- package/dist/llms/BarChart.md +26 -0
- package/dist/llms/Barcode.md +26 -0
- package/dist/llms/BentoGrid.md +25 -0
- package/dist/llms/Blockquote.md +26 -0
- package/dist/llms/BottomSheet.md +26 -0
- package/dist/llms/Box.md +44 -0
- package/dist/llms/BoxPlot.md +25 -0
- package/dist/llms/Breadcrumb.md +31 -0
- package/dist/llms/Button.md +33 -0
- package/dist/llms/ButtonGroup.md +27 -0
- package/dist/llms/Calendar.md +34 -0
- package/dist/llms/CalendarHeatmap.md +33 -0
- package/dist/llms/CandlestickChart.md +25 -0
- package/dist/llms/Canvas.md +13 -0
- package/dist/llms/Card.md +41 -0
- package/dist/llms/Carousel.md +33 -0
- package/dist/llms/Cascader.md +40 -0
- package/dist/llms/Center.md +40 -0
- package/dist/llms/Charts.md +13 -0
- package/dist/llms/ChatUI.md +17 -0
- package/dist/llms/Checkbox.md +24 -0
- package/dist/llms/CheckboxGroup.md +32 -0
- package/dist/llms/Chip.md +36 -0
- package/dist/llms/Code.md +25 -0
- package/dist/llms/CodeBlock.md +27 -0
- package/dist/llms/CodeDiffViewer.md +30 -0
- package/dist/llms/ColorInput.md +48 -0
- package/dist/llms/ColorPicker.md +46 -0
- package/dist/llms/Combobox.md +37 -0
- package/dist/llms/CommandPalette.md +25 -0
- package/dist/llms/Comment.md +35 -0
- package/dist/llms/Container.md +45 -0
- package/dist/llms/ContextMenu.md +25 -0
- package/dist/llms/ContrastChecker.md +13 -0
- package/dist/llms/Controls.md +13 -0
- package/dist/llms/CopyButton.md +26 -0
- package/dist/llms/Countdown.md +31 -0
- package/dist/llms/CounterTextarea.md +32 -0
- package/dist/llms/CreditCardInput.md +42 -0
- package/dist/llms/Dashboard.md +31 -0
- package/dist/llms/DataGrid.md +43 -0
- package/dist/llms/DatePicker.md +39 -0
- package/dist/llms/DateRangePicker.md +30 -0
- package/dist/llms/DescriptionList.md +26 -0
- package/dist/llms/Dialog.md +57 -0
- package/dist/llms/Divider.md +24 -0
- package/dist/llms/Drawer.md +29 -0
- package/dist/llms/Dropdown.md +50 -0
- package/dist/llms/Dropzone.md +36 -0
- package/dist/llms/EmptyState.md +23 -0
- package/dist/llms/ErrorBoundary.md +25 -0
- package/dist/llms/FAQSection.md +24 -0
- package/dist/llms/FieldError.md +19 -0
- package/dist/llms/FieldTemplate.md +30 -0
- package/dist/llms/Fieldset.md +24 -0
- package/dist/llms/FileUpload.md +40 -0
- package/dist/llms/Flex.md +23 -0
- package/dist/llms/FloatButton.md +36 -0
- package/dist/llms/FocusTrap.md +20 -0
- package/dist/llms/Footer.md +32 -0
- package/dist/llms/FunnelChart.md +24 -0
- package/dist/llms/Gallery.md +30 -0
- package/dist/llms/GanttChart.md +29 -0
- package/dist/llms/GaugeChart.md +30 -0
- package/dist/llms/Grid.md +30 -0
- package/dist/llms/Group.md +22 -0
- package/dist/llms/HamburgerMenu.md +30 -0
- package/dist/llms/Header.md +30 -0
- package/dist/llms/Heatmap.md +25 -0
- package/dist/llms/Highlight.md +26 -0
- package/dist/llms/HoverCard.md +26 -0
- package/dist/llms/Icon.md +25 -0
- package/dist/llms/IconButton.md +30 -0
- package/dist/llms/Image.md +46 -0
- package/dist/llms/ImageCompare.md +35 -0
- package/dist/llms/ImageCropper.md +34 -0
- package/dist/llms/Indicator.md +28 -0
- package/dist/llms/InfiniteScroll.md +28 -0
- package/dist/llms/InlineEdit.md +32 -0
- package/dist/llms/Input.md +46 -0
- package/dist/llms/InputBase.md +39 -0
- package/dist/llms/InputGroup.md +23 -0
- package/dist/llms/InputMask.md +44 -0
- package/dist/llms/InteractiveArea.md +32 -0
- package/dist/llms/InteractiveGraph.md +28 -0
- package/dist/llms/JsonDiffViewer.md +24 -0
- package/dist/llms/JsonViewer.md +26 -0
- package/dist/llms/Kanban.md +25 -0
- package/dist/llms/Kbd.md +23 -0
- package/dist/llms/KeyboardShortcuts.md +25 -0
- package/dist/llms/Label.md +27 -0
- package/dist/llms/Leaderboard.md +24 -0
- package/dist/llms/Legend.md +27 -0
- package/dist/llms/Lightbox.md +47 -0
- package/dist/llms/LineChart.md +26 -0
- package/dist/llms/Link.md +28 -0
- package/dist/llms/LinkButton.md +23 -0
- package/dist/llms/List.md +35 -0
- package/dist/llms/Loader.md +23 -0
- package/dist/llms/LoadingOverlay.md +30 -0
- package/dist/llms/Markdown.md +24 -0
- package/dist/llms/MarkdownRenderer.md +24 -0
- package/dist/llms/Marquee.md +27 -0
- package/dist/llms/Masonry.md +18 -0
- package/dist/llms/Mentions.md +24 -0
- package/dist/llms/Menu.md +30 -0
- package/dist/llms/Menubar.md +50 -0
- package/dist/llms/Meta.md +13 -0
- package/dist/llms/ModelSelector.md +31 -0
- package/dist/llms/MultiSelect.md +38 -0
- package/dist/llms/Navbar.md +58 -0
- package/dist/llms/NodeGraph.md +38 -0
- package/dist/llms/Notification.md +30 -0
- package/dist/llms/NumberInput.md +23 -0
- package/dist/llms/OtpInput.md +33 -0
- package/dist/llms/OverflowList.md +31 -0
- package/dist/llms/Pagination.md +39 -0
- package/dist/llms/PasswordInput.md +39 -0
- package/dist/llms/PasswordStrength.md +34 -0
- package/dist/llms/PhoneInput.md +35 -0
- package/dist/llms/PieChart.md +23 -0
- package/dist/llms/PivotTable.md +41 -0
- package/dist/llms/PlatformIcons.md +13 -0
- package/dist/llms/Popconfirm.md +30 -0
- package/dist/llms/Popover.md +27 -0
- package/dist/llms/Portal.md +18 -0
- package/dist/llms/Presence.md +26 -0
- package/dist/llms/Progress.md +29 -0
- package/dist/llms/ProgressRing.md +27 -0
- package/dist/llms/PromptInput.md +37 -0
- package/dist/llms/PullToRefresh.md +26 -0
- package/dist/llms/QRCode.md +30 -0
- package/dist/llms/QueryBuilder.md +31 -0
- package/dist/llms/RadarChart.md +24 -0
- package/dist/llms/Radio.md +23 -0
- package/dist/llms/RadioGroup.md +32 -0
- package/dist/llms/RangeCalendar.md +26 -0
- package/dist/llms/RangeSlider.md +39 -0
- package/dist/llms/Rating.md +37 -0
- package/dist/llms/Reaction.md +26 -0
- package/dist/llms/RefTable.md +13 -0
- package/dist/llms/RelativeTime.md +24 -0
- package/dist/llms/Result.md +29 -0
- package/dist/llms/RichTextEditor.md +59 -0
- package/dist/llms/SankeyChart.md +26 -0
- package/dist/llms/ScatterChart.md +26 -0
- package/dist/llms/ScheduleView.md +35 -0
- package/dist/llms/ScrollArea.md +24 -0
- package/dist/llms/ScrollProgress.md +22 -0
- package/dist/llms/SearchInput.md +44 -0
- package/dist/llms/SegmentedControl.md +40 -0
- package/dist/llms/Select.md +44 -0
- package/dist/llms/SelectionBar.md +28 -0
- package/dist/llms/Sidebar.md +47 -0
- package/dist/llms/SignaturePad.md +36 -0
- package/dist/llms/SimpleGrid.md +24 -0
- package/dist/llms/Skeleton.md +26 -0
- package/dist/llms/Slider.md +36 -0
- package/dist/llms/SmartSearchInput.md +35 -0
- package/dist/llms/Snackbar.md +30 -0
- package/dist/llms/SortableList.md +33 -0
- package/dist/llms/SourceCitation.md +28 -0
- package/dist/llms/SourceCode.md +13 -0
- package/dist/llms/Span.md +29 -0
- package/dist/llms/Sparkline.md +27 -0
- package/dist/llms/SpeedDial.md +28 -0
- package/dist/llms/Spinner.md +26 -0
- package/dist/llms/SplitButton.md +29 -0
- package/dist/llms/Splitter.md +37 -0
- package/dist/llms/Spoiler.md +26 -0
- package/dist/llms/Stack.md +48 -0
- package/dist/llms/Stats.md +44 -0
- package/dist/llms/Stepper.md +32 -0
- package/dist/llms/StreamingText.md +24 -0
- package/dist/llms/SwipeAction.md +28 -0
- package/dist/llms/SwipeableList.md +21 -0
- package/dist/llms/Switch.md +27 -0
- package/dist/llms/SwitchGroup.md +31 -0
- package/dist/llms/T.md +13 -0
- package/dist/llms/TabBar.md +33 -0
- package/dist/llms/TabNavigation.md +30 -0
- package/dist/llms/Table.md +73 -0
- package/dist/llms/Tabs.md +40 -0
- package/dist/llms/Tag.md +30 -0
- package/dist/llms/TagInput.md +37 -0
- package/dist/llms/Terminal.md +29 -0
- package/dist/llms/Text.md +31 -0
- package/dist/llms/Textarea.md +30 -0
- package/dist/llms/ThemeToggle.md +31 -0
- package/dist/llms/ThoughtProcess.md +27 -0
- package/dist/llms/ThreadList.md +27 -0
- package/dist/llms/TimePicker.md +41 -0
- package/dist/llms/Timeline.md +24 -0
- package/dist/llms/Title.md +27 -0
- package/dist/llms/Toast.md +32 -0
- package/dist/llms/ToggleGroup.md +39 -0
- package/dist/llms/Toolbar.md +35 -0
- package/dist/llms/Tooltip.md +29 -0
- package/dist/llms/Tour.md +24 -0
- package/dist/llms/Transfer.md +35 -0
- package/dist/llms/Transition.md +34 -0
- package/dist/llms/TreeDiagram.md +33 -0
- package/dist/llms/TreeSelect.md +43 -0
- package/dist/llms/TreeView.md +50 -0
- package/dist/llms/Treemap.md +27 -0
- package/dist/llms/UsageMeter.md +31 -0
- package/dist/llms/Video.md +46 -0
- package/dist/llms/VirtualList.md +31 -0
- package/dist/llms/VisuallyHidden.md +19 -0
- package/dist/llms/VoiceVisualizer.md +30 -0
- package/dist/llms/WaterfallChart.md +25 -0
- package/dist/llms/Watermark.md +27 -0
- package/dist/llms/colorSwatch.md +13 -0
- package/dist/llms-full.txt +6 -3
- package/dist/llms.txt +4 -2
- package/dist/locales/en/data-display.json +3 -0
- package/dist/locales/ja/data-display.json +3 -0
- package/dist/locales/pt/data-display.json +3 -0
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +10 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# ContrastChecker — wimui
|
|
2
|
+
|
|
3
|
+
> WCAG contrast ratio checker
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ContrastChecker } from "wimui";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Controls — wimui
|
|
2
|
+
|
|
3
|
+
> Interactive property controls
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Controls } from "wimui";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# CopyButton — wimui
|
|
2
|
+
|
|
3
|
+
> Copy to clipboard
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CopyButton } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `value: string` (required) — Text copied to the clipboard
|
|
15
|
+
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
|
|
16
|
+
- `className: string` — Additional class names
|
|
17
|
+
- `aria-label: string` — Accessible label for the button
|
|
18
|
+
- `aria-labelledby: string` — ID of the element that labels the button. Takes precedence over `aria-label`.
|
|
19
|
+
- `aria-describedby: string` — ID of the element that describes the button.
|
|
20
|
+
- `copyLabel: string` — Tooltip label before copying
|
|
21
|
+
- `copiedLabel: string` — Tooltip label after copying
|
|
22
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
23
|
+
- `children: React.ReactNode` — Trigger content when `asChild` is true
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Countdown — wimui
|
|
2
|
+
|
|
3
|
+
> Display the remaining time until a target moment as a live ticking timer, for sale deadlines, OTP resend waits, and maintenance notices.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Countdown } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `target: Date | string | number` (required) — The moment the countdown ends, as a Date object, ISO 8601 string, or epoch milliseconds.
|
|
15
|
+
- `baseDate: Date | string | number` — Reference point used as "now". When set, the countdown is frozen at that instant (useful for snapshots and tests).
|
|
16
|
+
- `variant: "digital" | "units"` = "digital" — "digital" renders a compact colon-separated clock (04:12:33); "units" renders one labeled segment per unit (days / hours / min / sec). @default "digital"
|
|
17
|
+
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the numbers and labels. @default "md"
|
|
18
|
+
- `locale: string` — BCP 47 locale override for unit labels (e.g. "en", "ja", "pt-BR"). @default current i18next language
|
|
19
|
+
- `unitDisplay: "long" | "short" | "narrow"` = "short" — Length of the unit labels in the "units" variant. @default "short"
|
|
20
|
+
- `paused: boolean` = false — Pauses the countdown while true. It resumes from the real remaining time (the target moment does not shift). @default false
|
|
21
|
+
- `onComplete: () => void` — Called once when the remaining time reaches zero (also on mount if the target is already in the past). Not called when baseDate is set.
|
|
22
|
+
- `completedContent: React.ReactNode` — Content shown instead of the zeroed digits once the countdown ends.
|
|
23
|
+
- `fallback: React.ReactNode` — Content shown when the target cannot be parsed.
|
|
24
|
+
- `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
|
|
25
|
+
|
|
26
|
+
## Design tokens it reads
|
|
27
|
+
|
|
28
|
+
`--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-font-size-2xl`, `--wim-font-size-2xs`, `--wim-font-size-4xl`, `--wim-font-size-lg`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-bold`, `--wim-font-weight-semibold`, `--wim-line-height-tight`, `--wim-spacing-3xs`, `--wim-spacing-sm`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# CounterTextarea — wimui
|
|
2
|
+
|
|
3
|
+
> Textarea with character count display
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CounterTextarea } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `asChild: boolean` — If true, the textarea element will be rendered as its child, merging its props onto that child.
|
|
15
|
+
- `intent: FieldIntent` — Semantic intent of the field (e.g. error state)
|
|
16
|
+
- `variant: "outline" | "ghost"` — Visual style variant of the field
|
|
17
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
18
|
+
- `fieldSizing: "fixed" | "content"` — Sizing behavior: "fixed" keeps the height, "content" grows with the text
|
|
19
|
+
- `label: string` — Field label
|
|
20
|
+
- `error: string` — Error message
|
|
21
|
+
- `required: boolean` — Whether to show the required indicator
|
|
22
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
23
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
24
|
+
- `showCount: boolean` = true — Whether to show the character count. @default true
|
|
25
|
+
- `counterPosition: "bottom" | "overlay"` = "bottom" — Position of the counter. "bottom" (default) shows it below the textarea. "overlay" shows it inside the textarea (bottom-right). @default "bottom"
|
|
26
|
+
|
|
27
|
+
## Design tokens it reads
|
|
28
|
+
|
|
29
|
+
`--wim-blur-xs`, `--wim-border-width-thin`, `--wim-color-glass-bg`, `--wim-color-glass-border`, `--wim-radius-sm`, `--wim-spacing-3xs`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-width-md`
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# CreditCardInput — wimui
|
|
2
|
+
|
|
3
|
+
> Payment card input with brand detection
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CreditCardInput } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `onBrandChange: (brand: CreditCardBrand) => void` — Callback when the card brand is detected.
|
|
15
|
+
- `asChild: boolean` = false — Whether to render as a child component.
|
|
16
|
+
- `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
|
|
17
|
+
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
18
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
19
|
+
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
20
|
+
- `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
|
|
21
|
+
- `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
|
|
22
|
+
- `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
|
|
23
|
+
- `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
|
|
24
|
+
- `allowClear: boolean` = false — Whether to show a clear button when value is present
|
|
25
|
+
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
26
|
+
- `rightIconClassName: string` — Additional class name for the right icon
|
|
27
|
+
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
28
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
29
|
+
- `label: React.ReactNode` — Field label
|
|
30
|
+
- `error: string` — Error message
|
|
31
|
+
- `required: boolean` — Whether to show the required indicator
|
|
32
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
33
|
+
- `inputClassName: string` — Additional class name for the inner input element
|
|
34
|
+
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
35
|
+
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
36
|
+
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
37
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays clickable but leaves the tab order and is hidden from assistive technology. Use it when the field already does the same thing from the keyboard. @default false
|
|
38
|
+
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as `kg`, `%` or `円`. It is announced with the field via `aria-describedby`, so the unit does not have to be repeated in the label.
|
|
39
|
+
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Dashboard — wimui
|
|
2
|
+
|
|
3
|
+
> Arranges widgets in a configurable grid with an edit mode for adding, removing, and resizing them.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Dashboard } from "wimui/layout";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `widgets: DashboardWidget[]` — Widget definitions to render.
|
|
15
|
+
- `editable: boolean` — Whether the dashboard is in edit mode (controlled).
|
|
16
|
+
- `defaultEditable: boolean` = false — Initial edit mode state (uncontrolled). Default: false.
|
|
17
|
+
- `onEditChange: (editable: boolean) => void` — Called when edit mode changes.
|
|
18
|
+
- `onRemove: (widgetId: string) => void` — Called when a widget is removed.
|
|
19
|
+
- `onAdd: () => void` — Called when the "Add Widget" button is clicked.
|
|
20
|
+
- `columns: number` = 3 — Number of columns. Default: 3.
|
|
21
|
+
- `gap: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Gap between widgets. Default: "md".
|
|
22
|
+
- `showEditToggle: boolean` — Show the edit toggle button in the header. Default: true.
|
|
23
|
+
- `titleLevel: 2 | 3 | 4 | 5 | 6` = 3 — Heading level for the widget titles. Match it to the page: a dashboard under an `h1` needs `2`, one under an `h2` section keeps `3`. The `label` heading sits one level above the widget titles, and never above `h2`. @default 3
|
|
24
|
+
- `label: string` — Dashboard heading label. Rendered one level above `titleLevel` (`h2` by default, and `h2` at the highest).
|
|
25
|
+
|
|
26
|
+
## Design tokens it reads
|
|
27
|
+
|
|
28
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-primary`, `--wim-color-primary-subtle`, `--wim-color-text-accent`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-dashboard-widget-min`, `--wim-font-size-lg`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-bold`, `--wim-font-weight-medium`, `--wim-height-sm`, `--wim-radius-component`, `--wim-shadow-xs`, `--wim-spacing-2xs`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-transition-base`, `--wim-width-sm`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# DataGrid — wimui
|
|
2
|
+
|
|
3
|
+
> Advanced data table and manipulation
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { DataGrid } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `columns: DataGridColumn<T>[]` (required) — Column definitions
|
|
15
|
+
- `data: T[]` (required) — Row data
|
|
16
|
+
- `rowKey: string | ((record: T) => string)` = "id" — Row key: a field name or a function that derives the key from a record
|
|
17
|
+
- `loading: boolean | "blocking" | "refresh"` = false — Loading state. `true` / `"blocking"` fades the grid and blocks interaction (first load — the rows are not there yet, or are about to be replaced wholesale). `"refresh"` only announces `aria-busy`: the rows stay readable and usable while fresh data is fetched. It deliberately does not dim, because fading the content drops secondary text below the AA contrast floor.
|
|
18
|
+
- `striped: boolean` = false — Whether to show striped (zebra) rows
|
|
19
|
+
- `bordered: boolean` = false — Whether to show borders between cells
|
|
20
|
+
- `hoverable: boolean` = true — Whether rows highlight on hover
|
|
21
|
+
- `stickyHeader: boolean` = true — Whether the header sticks to the top while scrolling
|
|
22
|
+
- `height: string | number` — Height of the grid (enables vertical scrolling)
|
|
23
|
+
- `maxHeight: string | number` — Maximum height of the grid (enables vertical scrolling)
|
|
24
|
+
- `emptyMessage: React.ReactNode` — Message or element to display when data is empty
|
|
25
|
+
- `mobileCard: boolean | "sm" | "md"` = false — Enable the card layout below a container width (`true`/`"sm"` = 576px, `"md"` = 768px)
|
|
26
|
+
- `selection: boolean | SelectionConfig<T>` — Row selection: a boolean shorthand or a full configuration object
|
|
27
|
+
- `selectedRowKeys: string[]` — Selected row keys (used with boolean `selection`)
|
|
28
|
+
- `onSelectionChange: (keys: string[], records: T[]) => void` — Selection change callback (used with boolean `selection`)
|
|
29
|
+
- `sortConfig: { key: string; direction: "asc" | "desc" | "none"; }` — Current sort configuration
|
|
30
|
+
- `onSortChange: (key: string, direction: "asc" | "desc" | "none") => void` — Callback when the sort configuration changes
|
|
31
|
+
- `pagination: object | false` — Pagination configuration, or false to disable pagination
|
|
32
|
+
- `infiniteScroll: { hasMore: boolean; onLoadMore: () => void; threshold?: number; }` — Infinite-scroll configuration for dynamic loading
|
|
33
|
+
- `className: string` — Additional class names
|
|
34
|
+
- `ariaLabel: string` — Accessibility label for the grid
|
|
35
|
+
- `aria-label: string` — Accessible name for the grid. Takes precedence over `ariaLabel`.
|
|
36
|
+
- `aria-labelledby: string` — ID of the element that labels the grid. Takes precedence over `aria-label`.
|
|
37
|
+
|
|
38
|
+
## Design tokens it reads
|
|
39
|
+
|
|
40
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-surface`, `--wim-color-surface-subtle`, `--wim-color-text-accent`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-font-size-sm`, `--wim-font-weight-medium`, `--wim-opacity-disabled`, `--wim-radius-component`, `--wim-spacing-2xl`, `--wim-spacing-4xl`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-table-row-bg`, `--wim-width-sm`
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# DatePicker — wimui
|
|
2
|
+
|
|
3
|
+
> Date selection
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { DatePicker } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `intent: FieldIntent` = "default" — Semantic intent of the field (e.g. error state)
|
|
15
|
+
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
16
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
17
|
+
- `value: Date | null` — Selected date value (`null` = cleared; omit/`undefined` = uncontrolled)
|
|
18
|
+
- `defaultValue: Date | null` — Default date value (uncontrolled)
|
|
19
|
+
- `onChange: (date: Date | null) => void` — Callback when date changes (`null` when cleared)
|
|
20
|
+
- `format: string` = "YYYY-MM-DD" — Date format for display (default: 'YYYY-MM-DD')
|
|
21
|
+
- `clearable: boolean` = true — Show clear button
|
|
22
|
+
- `placeholder: string` — Placeholder text
|
|
23
|
+
- `minDate: Date` — Minimum selectable date
|
|
24
|
+
- `maxDate: Date` — Maximum selectable date
|
|
25
|
+
- `disabledDates: Date[]` — Disabled dates
|
|
26
|
+
- `label: string` — Field label
|
|
27
|
+
- `error: string` — Error message
|
|
28
|
+
- `required: boolean` — Whether to show the required indicator
|
|
29
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
30
|
+
- `labels: { placeholder?: string; }` — Labels for manual translation
|
|
31
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
32
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
33
|
+
|
|
34
|
+
## Design tokens it reads
|
|
35
|
+
|
|
36
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-surface`, `--wim-floating-shift-x`, `--wim-radius-overlay`, `--wim-shadow-overlay`, `--wim-spacing-2xl`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-width-md`, `--wim-z-overlay`
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DateRangePicker — wimui
|
|
2
|
+
|
|
3
|
+
> Date range selection
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { DateRangePicker } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `startProps: React.ComponentProps<typeof DatePicker>` — Props passed to the start-date DatePicker
|
|
15
|
+
- `endProps: React.ComponentProps<typeof DatePicker>` — Props passed to the end-date DatePicker
|
|
16
|
+
- `className: string` — Additional class names
|
|
17
|
+
- `label: string` — Field label
|
|
18
|
+
- `error: string` — Error message
|
|
19
|
+
- `required: boolean` — Whether to show the required indicator
|
|
20
|
+
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
21
|
+
- `aria-label: string` — Accessible name for the group of the two date fields when no visible `label` is provided.
|
|
22
|
+
- `aria-labelledby: string` — ID of the element that labels the group of the two date fields when no visible `label` is provided.
|
|
23
|
+
- `aria-describedby: string` — ID of the element that describes the group. Announced together with the error message.
|
|
24
|
+
|
|
25
|
+
## Design tokens it reads
|
|
26
|
+
|
|
27
|
+
`--wim-color-text-secondary`, `--wim-spacing-xs`, `--wim-width-sm`
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# DescriptionList — wimui
|
|
2
|
+
|
|
3
|
+
> Key-value pairs
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { DescriptionList } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `children: React.ReactNode` (required) — DescriptionListItem elements
|
|
15
|
+
- `className: string` — Additional class names
|
|
16
|
+
- `layout: "horizontal" | "vertical" | "compact"` = "horizontal" — Layout of terms and descriptions
|
|
17
|
+
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the text
|
|
18
|
+
- `border: boolean` = false — Whether to show borders (alias of bordered)
|
|
19
|
+
- `bordered: boolean` = false — Whether to show borders
|
|
20
|
+
|
|
21
|
+
## Design tokens it reads
|
|
22
|
+
|
|
23
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-border-secondary`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-dl-compact-term-width`, `--wim-dl-term-width`, `--wim-font-size-lg`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-semibold`, `--wim-radius-container`, `--wim-spacing-2xl`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-width-sm`
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Dialog — wimui
|
|
2
|
+
|
|
3
|
+
> Focused task windows
|
|
4
|
+
|
|
5
|
+
Also known as: Modal, Modal Dialog
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Dialog } from "wimui/overlay";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: React.ReactNode` (required) — Dialog parts (Dialog.Trigger, Dialog.Content, etc.).
|
|
17
|
+
- `open: boolean` — Controlled open state. Use together with onOpenChange.
|
|
18
|
+
- `onOpenChange: (open: boolean) => void` — Called with the next state when the dialog is opened or closed.
|
|
19
|
+
- `defaultOpen: boolean` = false — Initial open state for uncontrolled usage. @default false
|
|
20
|
+
- `className: string` — Additional CSS class name.
|
|
21
|
+
- `closeOnOverlayClick: boolean` = role !== "alertdialog" — Whether clicking the overlay closes the dialog. Defaults to true, except when role is "alertdialog", where it defaults to false.
|
|
22
|
+
- `role: "dialog" | "alertdialog"` = "dialog" — ARIA role of the dialog content. Use "alertdialog" for a dialog that interrupts the user and needs a response before they can continue, such as confirming a destructive action. An alert dialog does not close when the overlay is clicked unless closeOnOverlayClick is set; Escape still closes it. @default "dialog"
|
|
23
|
+
|
|
24
|
+
## Dialog.Close
|
|
25
|
+
|
|
26
|
+
- `asChild: boolean` = false
|
|
27
|
+
|
|
28
|
+
## Dialog.Content
|
|
29
|
+
|
|
30
|
+
- `asChild: boolean` = false
|
|
31
|
+
|
|
32
|
+
## Dialog.Description
|
|
33
|
+
|
|
34
|
+
(no props of its own)
|
|
35
|
+
|
|
36
|
+
## Dialog.Footer
|
|
37
|
+
|
|
38
|
+
- `layout: "row" | "column"` — The layout of the footer. - "row" (default): Buttons are side-by-side. - "column": Buttons are stacked (standard mobile behavior).
|
|
39
|
+
|
|
40
|
+
## Dialog.Header
|
|
41
|
+
|
|
42
|
+
(no props of its own)
|
|
43
|
+
|
|
44
|
+
## Dialog.Title
|
|
45
|
+
|
|
46
|
+
(no props of its own)
|
|
47
|
+
|
|
48
|
+
## Dialog.Trigger
|
|
49
|
+
|
|
50
|
+
- `asChild: boolean` = false
|
|
51
|
+
|
|
52
|
+
## Design tokens it reads
|
|
53
|
+
|
|
54
|
+
`--wim-blur-xs`, `--wim-color-overlay`, `--wim-color-surface`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-dialog-max-height`, `--wim-dialog-width-mobile`, `--wim-font-size-lg`, `--wim-font-size-sm`, `--wim-font-weight-semibold`, `--wim-line-height-normal`, `--wim-radius-container`, `--wim-shadow-modal`, `--wim-spacing-2xl`, `--wim-spacing-md`, `--wim-spacing-xl`, `--wim-z-overlay`
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Divider — wimui
|
|
2
|
+
|
|
3
|
+
> Content separator
|
|
4
|
+
|
|
5
|
+
Also known as: Separator, Horizontal Rule
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Divider } from "wimui/layout";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `orientation: "horizontal" | "vertical"` = "horizontal" — Orientation of the divider
|
|
17
|
+
- `thickness: number` — Thickness of the line, in pixels. Left out, the line is as thick as every other hairline in the theme, so a theme that thickens its borders thickens this too.
|
|
18
|
+
|
|
19
|
+
## Design tokens it reads
|
|
20
|
+
|
|
21
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-divider-thickness`, `--wim-spacing-md`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Drawer — wimui
|
|
2
|
+
|
|
3
|
+
> Slide-out detail panels
|
|
4
|
+
|
|
5
|
+
Also known as: Navigation Drawer
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Drawer } from "wimui/overlay";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: React.ReactNode` (required) — Drawer parts (DrawerTrigger, DrawerContent, etc.).
|
|
17
|
+
- `open: boolean` — Controlled open state. Use together with onOpenChange.
|
|
18
|
+
- `onOpenChange: (open: boolean) => void` — Called with the next state when the drawer is opened or closed.
|
|
19
|
+
- `defaultOpen: boolean` = false — Initial open state for uncontrolled usage. @default false
|
|
20
|
+
- `side: "left" | "right" | "top" | "bottom"` = "right" — Edge of the screen the drawer slides in from. @default "right"
|
|
21
|
+
- `slideIn: boolean` = true — Whether to animate the drawer when opening. @default true
|
|
22
|
+
- `slideOut: boolean` = true — Whether to animate the drawer when closing. @default true
|
|
23
|
+
|
|
24
|
+
## Design tokens it reads
|
|
25
|
+
|
|
26
|
+
`--wim-blur-xs`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-overlay`, `--wim-color-surface`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-font-size-lg`, `--wim-font-size-sm`, `--wim-font-weight-semibold`, `--wim-line-height-snug-jp`, `--wim-overlay-max-width-md`, `--wim-shadow-modal`, `--wim-spacing-2xl`, `--wim-spacing-md`, `--wim-spacing-xs`, `--wim-z-overlay`, `--wim-z-overlay-panel`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Dropdown — wimui
|
|
2
|
+
|
|
3
|
+
> Overlay selection menu
|
|
4
|
+
|
|
5
|
+
Also known as: Overflow Menu, Kebab Menu, Meatball Menu, Vertical Ellipsis, Horizontal Ellipsis, Three Dots Menu, More Menu, App Switcher, オーバーフローメニュー, ケバブメニュー, ミートボールメニュー
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Dropdown } from "wimui/overlay";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: ReactNode` (required) — Dropdown parts (Dropdown.Trigger and Dropdown.Menu).
|
|
17
|
+
- `asChild: boolean` = false — If true, the dropdown will be rendered as its child, merging its props onto that child.
|
|
18
|
+
- `defaultOpen: boolean` = false — Whether the menu starts open. Use it for a screenshot, a test, or a menu that should already be showing. Ignored once `open` is provided.
|
|
19
|
+
- `open: boolean` — Controls the open state from the outside. Pass it together with `onOpenChange`.
|
|
20
|
+
- `onOpenChange: (open: boolean) => void` — Called with the next open state, both when the trigger is used and when the menu is dismissed by an outside click or Escape.
|
|
21
|
+
|
|
22
|
+
## Dropdown.Item
|
|
23
|
+
|
|
24
|
+
- `asChild: boolean` — If true, the item will be rendered as its child, merging its props onto that child. Use when the list item must be a specific element (e.g. `<li>` inside `<ul>`).
|
|
25
|
+
- `icon: React.ReactNode` — Left icon or element to display before the children.
|
|
26
|
+
- `rightSection: React.ReactNode` — Right section (e.g., shortcuts, arrows, status indicators) to display after the children.
|
|
27
|
+
- `active: boolean` — If true, the item will be rendered in an active/highlighted state.
|
|
28
|
+
- `disabled: boolean` = false — If true, the item will be rendered in a disabled state and become non-interactive.
|
|
29
|
+
- `danger: boolean` — If true, the item will be styled to indicate a dangerous or danger action.
|
|
30
|
+
- `className: string` — Additional CSS class name.
|
|
31
|
+
- `children: ReactNode` (required)
|
|
32
|
+
- `onClick: () => void`
|
|
33
|
+
|
|
34
|
+
## Dropdown.Menu
|
|
35
|
+
|
|
36
|
+
- `children: ReactNode` (required)
|
|
37
|
+
- `align: "left" | "right"` = "left"
|
|
38
|
+
- `show: boolean`
|
|
39
|
+
|
|
40
|
+
## Dropdown.Trigger
|
|
41
|
+
|
|
42
|
+
- `children: ReactNode` (required)
|
|
43
|
+
- `asChild: boolean` = false
|
|
44
|
+
|
|
45
|
+
## Design tokens it reads
|
|
46
|
+
|
|
47
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-surface`, `--wim-menu-min-width`, `--wim-radius-overlay`, `--wim-shadow-overlay`, `--wim-spacing-xs`, `--wim-z-overlay`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Dropzone — wimui
|
|
2
|
+
|
|
3
|
+
> Drag & drop files
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Dropzone } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `label: React.ReactNode` — Field label.
|
|
15
|
+
- `description: React.ReactNode` — Description text shown in the drag-and-drop area.
|
|
16
|
+
- `accept: string` — Accepted file types (e.g. ".jpg,.png").
|
|
17
|
+
- `multiple: boolean` = false — Whether multiple files can be selected.
|
|
18
|
+
- `disabled: boolean` = false — Whether the component is disabled.
|
|
19
|
+
- `value: string[]` — Names of the files the area should list — typically ones that already exist on the server, from an earlier session or an earlier step. Controlled: while this is set, it is what the area lists, and dropping or picking a file only fires `onChange`. Pass the new names back to show them. Leave it undefined to let the area track its own selection.
|
|
20
|
+
- `onChange: (files: FileList | null) => void` — Callback when files are selected.
|
|
21
|
+
- `className: string` — Additional class names.
|
|
22
|
+
- `iconName: React.ComponentProps<typeof Icon>["name"]` = "UploadIcon" — Icon name shown in the drop area.
|
|
23
|
+
- `error: string` — Error message
|
|
24
|
+
- `required: boolean` — Whether to show the required indicator
|
|
25
|
+
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
26
|
+
- `size: InteractiveAreaProps["size"]` = "md" — Size of the drop area
|
|
27
|
+
- `aria-label: string` — Accessible name for the drop area when no visible `label` is provided.
|
|
28
|
+
- `aria-labelledby: string` — ID of the element that labels the drop area when no visible `label` is provided.
|
|
29
|
+
- `aria-describedby: string` — ID of the element that describes the drop area. Announced together with the error message.
|
|
30
|
+
|
|
31
|
+
## Design tokens it reads
|
|
32
|
+
|
|
33
|
+
`--wim-border-width-thin`, `--wim-color-border-secondary`, `--wim-color-surface`, `--wim-color-text-secondary`, `--wim-font-size-sm`, `--wim-radius-component`, `--wim-spacing-sm`, `--wim-spacing-xs`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# EmptyState — wimui
|
|
2
|
+
|
|
3
|
+
> Missing data placeholder
|
|
4
|
+
|
|
5
|
+
Also known as: Blank Slate, Zero State
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { EmptyState } from "wimui/data-display";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `title: React.ReactNode` (required) — Title to display.
|
|
17
|
+
- `description: React.ReactNode` — Description text to display.
|
|
18
|
+
- `icon: React.ReactNode` — Icon to display.
|
|
19
|
+
- `extra: React.ReactNode` — Element shown as an action (e.g. a button).
|
|
20
|
+
- `align: "start" | "center"` = "start" — Horizontal alignment. Start-aligned reads as part of the card or table it sits in; use `"center"` only when the empty state is the only thing in its region. @default "start"
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ErrorBoundary — wimui
|
|
2
|
+
|
|
3
|
+
> Runtime error fallback
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ErrorBoundary } from "wimui/feedback";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `fallback: ReactNode | unknown` — Component or element displayed when an error occurs. When a function is passed, it is called as (error, errorInfo, reset) => ReactNode.
|
|
15
|
+
- `onError: (error: Error, errorInfo: ErrorInfo) => void` — Called when an error occurs.
|
|
16
|
+
- `onReset: () => void` — Called when the error is reset.
|
|
17
|
+
- `labels: { title?: string; retry?: string; showDetails?: string; hideDetails?: string; }` — Labels for manual translation overrides.
|
|
18
|
+
- `children: ReactNode` (required) — Content the boundary protects.
|
|
19
|
+
|
|
20
|
+
## Design tokens it reads
|
|
21
|
+
|
|
22
|
+
`--wim-border-width-thin`, `--wim-color-border-secondary`, `--wim-color-danger`, `--wim-font-size-sm`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# FAQSection — wimui
|
|
2
|
+
|
|
3
|
+
> Frequently Asked Questions section
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { FAQSection } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `items: FAQItem[]` (required) — FAQ items.
|
|
15
|
+
- `title: React.ReactNode` — Main title of the section.
|
|
16
|
+
- `description: React.ReactNode` — Supplementary description shown below the title.
|
|
17
|
+
- `layout: "top" | "left"` = "top" — Layout. - top: title and description above the accordion. - left: title and description on the left, accordion on the right (desktop and up).
|
|
18
|
+
- `accordionProps: Omit<AccordionProps, "children">` — Props passed to the inner Accordion component.
|
|
19
|
+
- `className: string` — Additional class names.
|
|
20
|
+
- `aria-label: string` — Accessible name for the section. A named section is exposed as a region landmark.
|
|
21
|
+
- `aria-labelledby: string` — ID of the element that labels the section. Takes precedence over `aria-label`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# FieldError — wimui
|
|
2
|
+
|
|
3
|
+
> Validation messages
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { FieldError } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `content: string` (required) — Error message text
|
|
15
|
+
- `className: string` — Additional class names
|
|
16
|
+
- `id: string` — ID of the error message element
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|