wimui 0.70.0 → 0.72.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/data-display/List/List.cjs +1 -1
- package/dist/components/data-display/List/List.d.ts +5 -1
- package/dist/components/data-display/List/List.js +3 -3
- 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/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.d.ts +2 -1
- package/dist/components/media/Lightbox/Lightbox.js +3 -3
- 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 +114 -111
- 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,31 @@
|
|
|
1
|
+
# ThemeToggle — wimui
|
|
2
|
+
|
|
3
|
+
> Light / dark / system theme switcher
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ThemeToggle } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `value: "light" | "dark" | "system"` — Selected mode (controlled)
|
|
15
|
+
- `defaultValue: "light" | "dark" | "system"` = "system" — Initially selected mode (uncontrolled)
|
|
16
|
+
- `onChange: (mode: ("light" | "dark" | "system")) => void` — Callback when the mode changes
|
|
17
|
+
- `modes: ("light" | "dark" | "system")[]` = ["light", "dark"] — Modes to offer, in cycle order
|
|
18
|
+
- `variant: "icon" | "segmented"` = "icon" — "icon" cycles modes on a single button; "segmented" shows one button per mode
|
|
19
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the control
|
|
20
|
+
- `storageKey: string | null` = "wim-theme" — localStorage key used to persist the choice; pass null to disable persistence
|
|
21
|
+
- `applyToDocument: boolean` = true — Whether to apply the selected mode to the document root as `data-theme`
|
|
22
|
+
- `labels: { /** Label for the light mode */ light?: string; /** Label for the dark mode */ dark?: string; /** Label for the system (auto) mode */ system?: string; /** Accessible label / group label for the control */ toggle?: string; }` — Labels for internationalization
|
|
23
|
+
- `className: string` — Additional class names
|
|
24
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
25
|
+
|
|
26
|
+
## Design tokens it reads
|
|
27
|
+
|
|
28
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-surface`, `--wim-color-surface-variant`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-duration-fast`, `--wim-easing-standard`, `--wim-height-lg`, `--wim-height-md`, `--wim-height-sm`, `--wim-radius-component`, `--wim-radius-sm`, `--wim-shadow-focus-ring`, `--wim-shadow-xs`, `--wim-spacing-3xs`, `--wim-tap-target-min`, `--wim-transition-fast`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ThoughtProcess — wimui
|
|
2
|
+
|
|
3
|
+
> Visualizes AI reasoning steps and execution states in a timeline format.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ThoughtProcess } from "wimui/ai";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `children: React.ReactNode` (required) — Reasoning steps to display (typically ThoughtStep elements)
|
|
15
|
+
- `title: string` = "Thinking Process" — Header title
|
|
16
|
+
- `titleLevel: 2 | 3 | 4 | 5 | 6` = 3 — Heading level of the title when `isCollapsible` is false. Match it to the page: under an `h1` use `2`, under an `h3` use `4`. Has no effect when `isCollapsible` is true, where the title is a toggle button, not a heading. @default 3
|
|
17
|
+
- `className: string` — Additional CSS class
|
|
18
|
+
- `isCollapsible: boolean` = true — Whether the body can be collapsed
|
|
19
|
+
- `defaultExpanded: boolean` = true — Initial expanded state (only relevant when isCollapsible is true)
|
|
20
|
+
- `isThinking: boolean` = false — Whether the AI is currently thinking (shows a pulsating background)
|
|
21
|
+
|
|
22
|
+
## Design tokens it reads
|
|
23
|
+
|
|
24
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-ghost-bg`, `--wim-color-ghost-bg-hover`, `--wim-color-primary`, `--wim-color-text-danger`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-duration-base`, `--wim-duration-fast`, `--wim-duration-slow`, `--wim-easing-standard`, `--wim-focus-outline-offset`, `--wim-focus-outline-width`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-bold`, `--wim-font-weight-medium`, `--wim-height-lg`, `--wim-line-height-normal`, `--wim-line-height-snug`, `--wim-line-height-snug-jp`, `--wim-radius-component`, `--wim-spacing-3xs`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-width-sm`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ThreadList — wimui
|
|
2
|
+
|
|
3
|
+
> ThreadList renders a conversation-history sidebar for AI chat apps — a scrollable list of past threads with an optional new-conversation action and per-thread deletion.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ThreadList } from "wimui/ai";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `threads: Thread[]` (required) — Conversations to display, ordered newest first
|
|
15
|
+
- `activeId: string` — Id of the currently active thread
|
|
16
|
+
- `onSelect: (id: string) => void` — Callback when a thread is selected
|
|
17
|
+
- `onDelete: (id: string) => void` — Callback when a thread's delete button is clicked (shows the button when set)
|
|
18
|
+
- `onNewThread: () => void` — Callback when the new-conversation button is clicked (shows the button when set)
|
|
19
|
+
- `labels: { /** Label of the new-conversation button */ newThread?: string; /** Text shown when there are no threads */ empty?: string; /** Accessible label for each delete button */ delete?: string; /** Accessible label for the list */ listAriaLabel?: string; }` — Labels for internationalization
|
|
20
|
+
- `className: string` — Additional class names
|
|
21
|
+
|
|
22
|
+
## Design tokens it reads
|
|
23
|
+
|
|
24
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-primary-muted`, `--wim-color-surface`, `--wim-color-surface-variant`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-color-text-tertiary`, `--wim-duration-fast`, `--wim-easing-standard`, `--wim-font-family-default`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-radius-component`, `--wim-radius-full`, `--wim-radius-sm`, `--wim-shadow-focus`, `--wim-shadow-focus-ring`, `--wim-spacing-3xs`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-tap-target-min`, `--wim-width-sm`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# TimePicker — wimui
|
|
2
|
+
|
|
3
|
+
> Time selection
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { TimePicker } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `intent: "default" | "danger"` = "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
|
+
- `allowClear: boolean` = true — Whether to show a clear button when value is present
|
|
18
|
+
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
19
|
+
- `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
|
|
20
|
+
- `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
|
|
21
|
+
- `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
|
|
22
|
+
- `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
|
|
23
|
+
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
24
|
+
- `rightIconClassName: string` — Additional class name for the right icon
|
|
25
|
+
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
26
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
27
|
+
- `label: React.ReactNode` — Field label
|
|
28
|
+
- `error: string` — Error message
|
|
29
|
+
- `required: boolean` — Whether to show the required indicator
|
|
30
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
31
|
+
- `inputClassName: string` — Additional class name for the inner input element
|
|
32
|
+
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
33
|
+
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
34
|
+
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
35
|
+
- `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
|
|
36
|
+
- `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.
|
|
37
|
+
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
38
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Timeline — wimui
|
|
2
|
+
|
|
3
|
+
> A vertical list mapping events or history in chronological order
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Timeline } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `children: React.ReactNode` (required) — Timeline items
|
|
15
|
+
- `align: "left" | "right" | "alternate"` = "left" — Alignment of the items relative to the line
|
|
16
|
+
- `className: string` — Additional class names
|
|
17
|
+
- `asChild: boolean` — Whether to render as a child element.
|
|
18
|
+
|
|
19
|
+
## Design tokens it reads
|
|
20
|
+
|
|
21
|
+
`--wim-border-width-thick`, `--wim-color-border`, `--wim-color-danger`, `--wim-color-line`, `--wim-color-primary`, `--wim-color-success`, `--wim-color-surface`, `--wim-color-text-accent`, `--wim-color-text-danger`, `--wim-color-text-secondary`, `--wim-color-text-success`, `--wim-color-text-tertiary`, `--wim-font-size-sm`, `--wim-radius-full`, `--wim-spacing-2xl`, `--wim-spacing-3xl`, `--wim-spacing-5xl`, `--wim-spacing-sm`, `--wim-spacing-xl`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Title — wimui
|
|
2
|
+
|
|
3
|
+
> Possesses visual weight (boldness/size) to indicate page structure.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Title } from "wimui/typography";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `asChild: boolean` = false — If true, the heading will be rendered as its child, merging its props onto that child.
|
|
15
|
+
- `tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"` = "h1" — The semantic HTML tag to use.
|
|
16
|
+
- `size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"` = "xl" — The visual size of the title.
|
|
17
|
+
- `color: T | (string & {})` — Text color.
|
|
18
|
+
- `align: "left" | "center" | "right"` = "left" — Text alignment.
|
|
19
|
+
- `decoration: "underline" | "highlight" | "none"` = "none" — Visual decoration applied to the heading text. @default "none"
|
|
20
|
+
- `children: React.ReactNode` (required) — The heading content.
|
|
21
|
+
|
|
22
|
+
## Design tokens it reads
|
|
23
|
+
|
|
24
|
+
`--wim-breakpoint-xl`, `--wim-breakpoint-xs`, `--wim-color-text-accent`, `--wim-color-text-danger`, `--wim-color-text-info`, `--wim-color-text-success`, `--wim-color-text-warning`, `--wim-comp-decoration-highlight-color`, `--wim-decoration-underline`, `--wim-font-size-`, `--wim-font-size-2xl`, `--wim-font-size-3xl`, `--wim-font-size-md`, `--wim-font-size-xl`, `--wim-font-weight-bold`, `--wim-letter-spacing-normal`, `--wim-letter-spacing-tight`, `--wim-letter-spacing-tighter`, `--wim-line-height-snug`, `--wim-line-height-snug-jp`, `--wim-text-underline-offset`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Toast — wimui
|
|
2
|
+
|
|
3
|
+
> Non-intrusive floating messages that provide feedback on system operations
|
|
4
|
+
|
|
5
|
+
Also known as: Message, Sonner
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Toast } from "wimui/feedback";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `id: string` — Identifier of the toast, passed to onClose. Used by ToastProvider to manage a stack.
|
|
17
|
+
- `title: string` — Title of the toast.
|
|
18
|
+
- `description: string` — Description text displayed below the title.
|
|
19
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the toast. @default "default"
|
|
20
|
+
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. Set 0 to disable auto-close. @default 3000
|
|
21
|
+
- `open: boolean` = true — Whether the toast is shown. @default true
|
|
22
|
+
- `onClose: (id?: string) => void` — Called with the toast id when the toast is closed.
|
|
23
|
+
- `className: string` — Additional CSS class name.
|
|
24
|
+
- `aria-label: string` — Accessible name for the toast.
|
|
25
|
+
- `aria-labelledby: string` — ID of the element that labels the toast. Takes precedence over `aria-label`.
|
|
26
|
+
|
|
27
|
+
## Design tokens it reads
|
|
28
|
+
|
|
29
|
+
`--wim-border-width-thin`, `--wim-color-border-secondary`, `--wim-color-danger`, `--wim-color-info`, `--wim-color-success`, `--wim-color-surface`, `--wim-color-text-danger`, `--wim-color-text-info`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-color-text-success`, `--wim-color-text-warning`, `--wim-color-warning`, `--wim-comp-close-hover`, `--wim-duration-base`, `--wim-easing-entrance`, `--wim-easing-standard`, `--wim-font-size-sm`, `--wim-font-size-xl`, `--wim-font-size-xs`, `--wim-font-weight-semibold`, `--wim-height-xs`, `--wim-line-height-snug`, `--wim-line-height-snug-jp`, `--wim-opacity-ghost`, `--wim-radius-component`, `--wim-radius-overlay`, `--wim-scale-active-sm`, `--wim-shadow-overlay`, `--wim-spacing-2xs`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-transition-fast`, `--wim-z-toast`
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ToggleGroup — wimui
|
|
2
|
+
|
|
3
|
+
> Toggleable buttons
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ToggleGroup } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `options: Option[]` (required) — List of toggle options
|
|
15
|
+
- `value: string | string[]` — Selected value(s) (controlled)
|
|
16
|
+
- `defaultValue: string | string[]` — Initially selected value(s) (uncontrolled)
|
|
17
|
+
- `onChange: (value: string | string[]) => void` — Callback when the selection changes
|
|
18
|
+
- `selectionMode: "single" | "multiple"` = "single" — Whether one or multiple options can be selected
|
|
19
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the toggle buttons
|
|
20
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
21
|
+
- `className: string` — Additional class names
|
|
22
|
+
- `disabled: boolean` = false — Whether the group is disabled
|
|
23
|
+
- `label: string` — Group label
|
|
24
|
+
- `error: string` — Error message
|
|
25
|
+
- `required: boolean` — Whether to show the required indicator
|
|
26
|
+
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
27
|
+
- `id: string` — Unique ID for the component
|
|
28
|
+
- `asChild: boolean` = false — If true, merge group props onto the child element.
|
|
29
|
+
- `children: React.ReactNode` — Optional children used when asChild is true
|
|
30
|
+
- `aria-label: string` — Accessible label when no visible label is provided
|
|
31
|
+
- `aria-labelledby: string` — ID of the element that labels the group
|
|
32
|
+
- `aria-describedby: string` — ID of the element that describes the group, such as help text
|
|
33
|
+
|
|
34
|
+
## Design tokens it reads
|
|
35
|
+
|
|
36
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-surface-hover`, `--wim-color-text-accent`, `--wim-color-text-disabled`, `--wim-color-text-secondary`, `--wim-color-white`, `--wim-control-item-padding-x-lg`, `--wim-control-item-padding-x-md`, `--wim-control-item-padding-x-sm`, `--wim-focus-outline-offset`, `--wim-font-size-lg`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-medium`, `--wim-height-lg`, `--wim-height-md`, `--wim-height-sm`, `--wim-opacity-ghost`, `--wim-radius-component`, `--wim-shadow-sm`, `--wim-spacing-3xs`, `--wim-spacing-xs`, `--wim-tap-target-min`, `--wim-transition-fast`
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Toolbar — wimui
|
|
2
|
+
|
|
3
|
+
> Action strip for IconButton, ToggleGroup, and related controls with toolbar keyboard navigation.
|
|
4
|
+
|
|
5
|
+
Also known as: Action Bar
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Toolbar } from "wimui/layout";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
|
|
17
|
+
- `size: "lg" | "md" | "sm"` = "md" — Visual density for padding and gap. @default "md"
|
|
18
|
+
- `orientation: "horizontal" | "vertical"` = "horizontal" — Layout axis of the toolbar. @default "horizontal"
|
|
19
|
+
- `overflow: "wrap" | "collapse"` = "wrap" — How the controls that do not fit on one line are handled. `"wrap"` wraps them onto the next line; `"collapse"` keeps one line and moves the trailing children that do not fit behind a "…" button, which opens them in a panel next to it. Each direct child (a whole `Toolbar.Group`) is collapsed as one unit. Horizontal toolbars only, and not with `asChild`. A control remounts when it moves into the panel, so keep its state controlled. @default "wrap"
|
|
20
|
+
- `moreLabel: (count: number) => string` — Accessible name of the "…" button with `overflow="collapse"`, from the number of hidden children. Defaults to the built-in "Show hidden tools (n)" (en / ja / pt).
|
|
21
|
+
|
|
22
|
+
## Toolbar.Group
|
|
23
|
+
|
|
24
|
+
- `asChild: boolean` = false — If true, the group will be rendered as its child, merging its props onto that child.
|
|
25
|
+
|
|
26
|
+
## Toolbar.Separator
|
|
27
|
+
|
|
28
|
+
(no props of its own)
|
|
29
|
+
|
|
30
|
+
## Design tokens it reads
|
|
31
|
+
|
|
32
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-surface`, `--wim-height-sm`, `--wim-radius-component`, `--wim-spacing-2xs`, `--wim-spacing-sm`, `--wim-spacing-xs`
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Tooltip — wimui
|
|
2
|
+
|
|
3
|
+
> Information on hover
|
|
4
|
+
|
|
5
|
+
Also known as: Help Tag
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Tooltip } from "wimui/overlay";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: ReactNode` (required) — Tooltip parts (TooltipTrigger and TooltipContent).
|
|
17
|
+
- `className: string` — Additional CSS class name for the container.
|
|
18
|
+
- `delay: number` = 200 — Delay before showing the tooltip in ms.
|
|
19
|
+
- `open: boolean` — If provided, controls the open state.
|
|
20
|
+
- `onOpenChange: (open: boolean) => void` — Callback when open state changes.
|
|
21
|
+
- `placement: "bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"` = "top" — Preferred placement of the tooltip.
|
|
22
|
+
- `variant: "default" | "glass"` = "default" — The variant of the tooltip content.
|
|
23
|
+
|
|
24
|
+
## Design tokens it reads
|
|
25
|
+
|
|
26
|
+
`--wim-border-width-thin`, `--wim-color-glass-bg`, `--wim-color-glass-blur`, `--wim-color-glass-border`, `--wim-color-shadow-glass`, `--wim-color-text-primary`, `--wim-comp-tooltip-bg`, `--wim-comp-tooltip-fg`, `--wim-duration-fast`, `--wim-font-size-sm`, `--wim-line-height-tight`, `--wim-radius-overlay`, `--wim-shadow-overlay`, `--wim-spacing-lg`, `--wim-spacing-sm`, `--wim-z-overlay`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Tour — wimui
|
|
2
|
+
|
|
3
|
+
> Sequential guided walkthroughs to onboard users or highlight features
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Tour } from "wimui/feedback";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `steps: TourStep[]` (required) — Steps of the tour. Each step targets an element via a CSS selector.
|
|
15
|
+
- `open: boolean` (required) — Whether the tour is shown.
|
|
16
|
+
- `onClose: () => void` (required) — Called when the tour is dismissed before completion.
|
|
17
|
+
- `onFinish: () => void` — Called when the last step is completed.
|
|
18
|
+
|
|
19
|
+
## Design tokens it reads
|
|
20
|
+
|
|
21
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-overlay`, `--wim-color-surface`, `--wim-color-text-secondary`, `--wim-color-text-tertiary`, `--wim-font-size-lg`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-semibold`, `--wim-radius-component`, `--wim-radius-overlay`, `--wim-shadow-overlay`, `--wim-spacing-2xl`, `--wim-spacing-4xl`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-tour-bubble-width`, `--wim-z-overlay`, `--wim-z-overlay-panel`, `--wim-z-overlay-step`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Transfer — wimui
|
|
2
|
+
|
|
3
|
+
> Move items between lists
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Transfer } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `dataSource: TransferItem[]` = [] — All items shown across the two lists
|
|
15
|
+
- `targetKeys: string[]` — Keys of the items in the target (right) list
|
|
16
|
+
- `onChange: ( targetKeys: string[], direction: "toLeft" | "toRight", moveKeys: string[], ) => void` — Callback when items are moved between the lists
|
|
17
|
+
- `titles: [React.ReactNode, React.ReactNode]` — Titles of the source and target lists
|
|
18
|
+
- `className: string` — Additional class names
|
|
19
|
+
- `style: React.CSSProperties` — Inline styles
|
|
20
|
+
- `disabled: boolean` = false — Whether the component is disabled
|
|
21
|
+
- `label: React.ReactNode` — Field label
|
|
22
|
+
- `error: string` — Error message
|
|
23
|
+
- `required: boolean` — Whether to show the required indicator
|
|
24
|
+
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
25
|
+
- `labels: { noData?: React.ReactNode; moveToTarget?: string; moveToSource?: string; statusMovedToTarget?: (count: number) => string; statusMovedToSource?: (count: number) => string; }` = {} — Labels for internationalization
|
|
26
|
+
- `aria-label: string` — Accessible name for the group of the two lists when no visible `label` is provided.
|
|
27
|
+
- `aria-labelledby: string` — ID of the element that labels the group of the two lists when no visible `label` is provided.
|
|
28
|
+
- `aria-describedby: string` — ID of the element that describes the group. Announced together with the error message.
|
|
29
|
+
|
|
30
|
+
## Design tokens it reads
|
|
31
|
+
|
|
32
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-checkbox-check-height`, `--wim-checkbox-check-width`, `--wim-checkbox-size`, `--wim-color-border`, `--wim-color-disabled`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-primary-muted`, `--wim-color-surface`, `--wim-color-surface-variant`, `--wim-color-text-on-disabled`, `--wim-color-text-placeholder`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-color-text-tertiary`, `--wim-color-white`, `--wim-duration-fast`, `--wim-easing-entrance`, `--wim-easing-standard`, `--wim-font-family-default`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-list-item-padding-x`, `--wim-list-item-padding-y`, `--wim-opacity-disabled`, `--wim-radius-component`, `--wim-radius-sm`, `--wim-shadow-md`, `--wim-shadow-xs`, `--wim-spacing-2xl`, `--wim-spacing-3xl`, `--wim-spacing-4xl`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-transition-base`, `--wim-width-md`, `--wim-width-sm`
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Transition — wimui
|
|
2
|
+
|
|
3
|
+
> Utilities for managing smooth enter and leave animations with CSS classes
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Transition } from "wimui/layout";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `show: boolean` (required) — Whether the content is shown (drives the enter/leave transitions)
|
|
15
|
+
- `children: React.ReactNode` (required) — Content to transition
|
|
16
|
+
- `preset: "none" | "fade" | "scale" | "slide-right" | "slide-left" | "slide-top" | "slide-bottom"` — Preset transition (fade, scale, slide-*) — 入りと出の両方に効く
|
|
17
|
+
- `enterPreset: "none" | "fade" | "scale" | "slide-right" | "slide-left" | "slide-top" | "slide-bottom"` — 入りだけ別扱いにしたいときのプリセット。`"none"` で入りのアニメーションを止める。 省略時は `preset` に従う。 `Drawer` の `slideIn` / `slideOut` のように片方だけ切りたい API があるのに、 `preset` は両相を一括で決めるため表現できなかった(T58)。
|
|
18
|
+
- `leavePreset: "none" | "fade" | "scale" | "slide-right" | "slide-left" | "slide-top" | "slide-bottom"` — 出だけ別扱いにしたいときのプリセット。`"none"` で出のアニメーションを止める。
|
|
19
|
+
- `enter: string` = "" — Class applied during the enter transition
|
|
20
|
+
- `enterFrom: string` = "" — Class applied at the start of the enter transition
|
|
21
|
+
- `enterTo: string` = "" — Class applied at the end of the enter transition
|
|
22
|
+
- `leave: string` = "" — Class applied during the leave transition
|
|
23
|
+
- `leaveFrom: string` = "" — Class applied at the start of the leave transition
|
|
24
|
+
- `leaveTo: string` = "" — Class applied at the end of the leave transition
|
|
25
|
+
- `unmount: boolean` = true — Whether to unmount the content when hidden
|
|
26
|
+
- `appear: boolean` = false — Whether to run the enter transition on initial mount
|
|
27
|
+
- `className: string` — Additional class names
|
|
28
|
+
|
|
29
|
+
## Design tokens it reads
|
|
30
|
+
|
|
31
|
+
`--wim-transition-base`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# TreeDiagram — wimui
|
|
2
|
+
|
|
3
|
+
> Lays out a tree such as an org chart from the data alone, with parents centred over their children and collapsible subtrees.
|
|
4
|
+
|
|
5
|
+
Also known as: Org Chart, Tree Chart, Hierarchy Diagram
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { TreeDiagram } from "wimui/data-display";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `nodes: TreeDiagramNode[]` (required) — The roots of the tree. Several roots are laid out side by side.
|
|
17
|
+
- `orientation: "vertical" | "horizontal"` = "vertical" — `vertical` grows from top to bottom (an org chart). `horizontal` grows from left to right, which suits deep trees and narrow containers.
|
|
18
|
+
- `expandedValues: string[]` — Expanded nodes (controlled). A node that is not listed shows only itself.
|
|
19
|
+
- `defaultExpandedValues: string[]` — Expanded nodes on first render (uncontrolled). Defaults to every node that has children.
|
|
20
|
+
- `onExpandedChange: (values: string[]) => void` — Called with the new list of expanded nodes when a node is expanded or collapsed.
|
|
21
|
+
- `selectedValue: string | null` — Selected node (controlled). Pass `null` for none.
|
|
22
|
+
- `onSelect: (value: string) => void` — Called when a node is chosen by click, Enter or Space. Nodes are only selectable when this is given; without it the diagram is read-only.
|
|
23
|
+
- `renderNode: (node: TreeDiagramNode, state: TreeDiagramNodeState) => React.ReactNode` — Replaces the default card (label, description, avatar). The card frame stays.
|
|
24
|
+
- `nodeWidth: number` = 200 — Card width in px. Every card has the same size so the layout is decided before anything is measured; long text is truncated and read in full by assistive technology.
|
|
25
|
+
- `nodeHeight: number` = 64 — Card height in px.
|
|
26
|
+
- `labels: { /** Accessible name of the collapse / expand button. */ expand?: (label: string) => string; collapse?: (label: string) => string; }` — Accessible names of the collapse / expand button, for when the built-in translations do not fit.
|
|
27
|
+
|
|
28
|
+
## Design tokens it reads
|
|
29
|
+
|
|
30
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-border-secondary`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-color-text-tertiary`, `--wim-duration-fast`, `--wim-easing-standard`, `--wim-focus-outline-offset`, `--wim-focus-outline-width`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-font-weight-semibold`, `--wim-line-height-tight`, `--wim-radius-component`, `--wim-radius-full`, `--wim-spacing-2xs`, `--wim-spacing-3xs`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-tap-target-min`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# TreeSelect — wimui
|
|
2
|
+
|
|
3
|
+
> Select from tree structure
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { TreeSelect } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `treeData: TreeSelectNode[]` = [] — Tree nodes to select from
|
|
15
|
+
- `value: string | string[]` — Selected value(s) (controlled)
|
|
16
|
+
- `onChange: (value: string | string[]) => void` — Callback when the selection changes
|
|
17
|
+
- `placeholder: React.ReactNode` — Placeholder shown when nothing is selected
|
|
18
|
+
- `label: React.ReactNode` — Field label
|
|
19
|
+
- `error: string` — Error message
|
|
20
|
+
- `required: boolean` — Whether to show the required indicator
|
|
21
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
22
|
+
- `className: string` — Additional class names
|
|
23
|
+
- `disabled: boolean` = false — Whether the field is disabled
|
|
24
|
+
- `multiple: boolean` = false — Whether multiple nodes can be selected
|
|
25
|
+
- `searchable: boolean` = false — Whether to show a search input for filtering nodes
|
|
26
|
+
- `defaultExpandedKeys: string[]` = [] — Keys of the nodes expanded initially
|
|
27
|
+
- `allowClear: boolean` = false — Whether to show a clear button when a value is selected
|
|
28
|
+
- `checkStrategy: "cascade" | "exclusive"` = "cascade" — Check selection behavior (effective when multiple). - cascade: checking a parent selects all children; partially checked children make the parent indeterminate (default) - exclusive: parent and children are mutually exclusive (selecting a parent deselects children and vice versa)
|
|
29
|
+
- `id: string` — Unique ID for the component
|
|
30
|
+
- `asChild: boolean` = false — If true, merge root props onto the child element.
|
|
31
|
+
- `children: React.ReactNode` — Optional children used when asChild is true
|
|
32
|
+
- `aria-label: string` — Accessible label for the trigger when no visible label is provided
|
|
33
|
+
- `aria-labelledby: string` — ID of the element that labels the field
|
|
34
|
+
- `aria-describedby: string` — ID of the element that describes the field
|
|
35
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
36
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
37
|
+
|
|
38
|
+
## Design tokens it reads
|
|
39
|
+
|
|
40
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-text-on-disabled`, `--wim-color-text-placeholder`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-floating-shift-x`, `--wim-focus-outline-offset`, `--wim-font-family-default`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-medium`, `--wim-height-md`, `--wim-input-width`, `--wim-menu-min-width`, `--wim-radius-component`, `--wim-radius-overlay`, `--wim-shadow-overlay`, `--wim-spacing-2xs`, `--wim-spacing-5xl`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-xl`, `--wim-transition-fast`, `--wim-width-md`, `--wim-width-sm`, `--wim-z-overlay`
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# TreeView — wimui
|
|
2
|
+
|
|
3
|
+
> Hierarchical data
|
|
4
|
+
|
|
5
|
+
Also known as: Outline View
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { TreeView } from "wimui/data-display";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: React.ReactNode` — JSX-based items (children API). Use this when not using `nodes`.
|
|
17
|
+
- `nodes: TreeViewNode[]` — Node array for data-driven mode.
|
|
18
|
+
- `className: string` — Additional class names
|
|
19
|
+
- `multiSelect: boolean` = false — Whether multiple nodes can be selected
|
|
20
|
+
- `checkable: boolean` = false — Whether nodes show checkboxes
|
|
21
|
+
- `checkStrategy: "cascade" | "exclusive"` = "cascade" — Check selection behavior. - cascade: checking a parent selects all children; partially checked children make the parent indeterminate - exclusive: parent and children are mutually exclusive
|
|
22
|
+
- `searchable: boolean` = false — Whether to show a search input for filtering nodes
|
|
23
|
+
- `defaultExpandedValues: string[]` = [] — Values of the nodes expanded initially
|
|
24
|
+
- `defaultSelectedValues: string[]` = [] — Values of the nodes selected initially
|
|
25
|
+
- `defaultCheckedValues: string[]` = [] — Values of the nodes checked initially
|
|
26
|
+
- `onCheckedChange: (checked: string[]) => void` — Callback when the checked values change
|
|
27
|
+
- `onSelectedChange: (selected: string[]) => void` — Callback when the selected values change
|
|
28
|
+
- `width: string | number` — Width of the tree (CSS value or number in px)
|
|
29
|
+
- `virtualThreshold: number` = 100 — Node count threshold at which virtualization kicks in.
|
|
30
|
+
- `labels: { searchPlaceholder?: string; searchAriaLabel?: string; expandLabel?: (label: string) => string; collapseLabel?: (label: string) => string; treeAriaLabel?: string; }` = {} — Labels for internationalization
|
|
31
|
+
- `labelId: string` — Accessibility label ID
|
|
32
|
+
- `aria-label: string` — Accessible name for the tree. Takes precedence over `labels.treeAriaLabel`.
|
|
33
|
+
- `aria-labelledby: string` — ID of the element that labels the tree. Takes precedence over `aria-label`.
|
|
34
|
+
- `styles: { root?: string; item?: string; search?: string; searchInput?: string; labelContainer?: string; iconWrapper?: string; expandBtn?: string; checkbox?: string; icon?: string; }` — Custom styles for internal parts
|
|
35
|
+
|
|
36
|
+
## TreeView.Item
|
|
37
|
+
|
|
38
|
+
- `value: string` (required) — Unique value identifying the node
|
|
39
|
+
- `label: React.ReactNode` (required) — Label content of the node
|
|
40
|
+
- `icon: React.ReactNode` — Icon displayed next to the label
|
|
41
|
+
- `children: React.ReactNode` — Child nodes
|
|
42
|
+
- `className: string` — Additional class names
|
|
43
|
+
- `disabled: boolean` = false — Whether the node is disabled
|
|
44
|
+
|
|
45
|
+
## Design tokens it reads
|
|
46
|
+
|
|
47
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-border-secondary`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-surface-hover`, `--wim-color-text-disabled`, `--wim-color-text-secondary`, `--wim-color-text-tertiary`, `--wim-duration-base`, `--wim-duration-fast`, `--wim-duration-slow`, `--wim-easing-standard`, `--wim-font-size-sm`, `--wim-radius-component`, `--wim-radius-container`, `--wim-radius-sm`, `--wim-shadow-focus`, `--wim-spacing-2xs`, `--wim-spacing-3xl`, `--wim-spacing-3xs`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-tap-target-min`, `--wim-transition-fast`, `--wim-tree-icon-size`, `--wim-tree-indent`
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Treemap — wimui
|
|
2
|
+
|
|
3
|
+
> Hierarchical data area-based display
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Treemap } from "wimui/charts";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `data: ChartDataPoint[]` (required) — Data to display in the treemap.
|
|
15
|
+
- `dataKey: string` (required) — The key in the data objects that represents the size of the rectangle.
|
|
16
|
+
- `aspectRatio: number` = 4 / 3 — The aspect ratio of the rectangles. @default 4/3
|
|
17
|
+
- `height: number` = 300 — The height of the chart in pixels. @default 300
|
|
18
|
+
- `width: string | number` = "100%" — The width of the chart (e.g., "100%", 500). @default "100%"
|
|
19
|
+
- `title: string` — Optional title displayed above the chart.
|
|
20
|
+
- `aria-label: string` — Accessible name for the chart. Defaults to `title` when omitted; pass this when the chart has no visible title, or when the title is not descriptive enough on its own.
|
|
21
|
+
|
|
22
|
+
## Design tokens it reads
|
|
23
|
+
|
|
24
|
+
`--wim-color-primary-fill`, `--wim-font-size-xs`
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# UsageMeter — wimui
|
|
2
|
+
|
|
3
|
+
> UsageMeter (also exported as TokenCounter) visualizes token consumption against a budget such as a model's context window — a labeled bar plus a numeric readout that shifts to warning and danger colors near the limit.
|
|
4
|
+
|
|
5
|
+
Also known as: Level Indicator, Capacity Indicator, Meter
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { UsageMeter } from "wimui/ai";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `used: number` (required) — Number of tokens used so far
|
|
17
|
+
- `max: number` — Maximum available tokens (e.g. the context window). Omit for a counter-only display.
|
|
18
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the meter
|
|
19
|
+
- `showBar: boolean` = true — Whether to render the progress bar (requires `max`)
|
|
20
|
+
- `showPercentage: boolean` = false — Whether to show the percentage instead of the raw count in the readout
|
|
21
|
+
- `warnThreshold: number` = 0.75 — Fraction (0–1) at which the meter turns to the warning color
|
|
22
|
+
- `dangerThreshold: number` = 0.9 — Fraction (0–1) at which the meter turns to the danger color
|
|
23
|
+
- `labels: { /** Leading label (default "Tokens") */ label?: string; /** Unit appended to the raw counts (default "tokens") */ unit?: string; /** Accessible label describing the meter */ ariaLabel?: string; }` — Labels for internationalization
|
|
24
|
+
- `className: string` — Additional class names
|
|
25
|
+
|
|
26
|
+
## Design tokens it reads
|
|
27
|
+
|
|
28
|
+
`--wim-color-danger`, `--wim-color-primary`, `--wim-color-surface-variant`, `--wim-color-text-accent`, `--wim-color-text-danger`, `--wim-color-text-secondary`, `--wim-color-text-warning`, `--wim-color-warning`, `--wim-duration-base`, `--wim-easing-standard`, `--wim-font-family-default`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-radius-full`, `--wim-spacing-3xs`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-usage-meter-fill`, `--wim-width-sm`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|