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,41 @@
|
|
|
1
|
+
# Card — wimui
|
|
2
|
+
|
|
3
|
+
> Information containers
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Card } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `asChild: boolean` = false — If true, the card will be rendered as its child, merging its props onto that child.
|
|
15
|
+
- `variant: "elevated" | "outline" | "flat" | "glass"` = "outline" — Visual style variant of the card
|
|
16
|
+
- `interactive: boolean` = false — Whether the card is clickable: shows hover and press feedback and a pointer cursor
|
|
17
|
+
- `padding: (typeof CARD_STYLED_PADDING)[number]` = "md" — Padding size. Derived from the values `card.module.scss` implements, not from `ComponentSize`. Declaring the whole scale meant `padding="5xl"` type-checked and then did nothing (T38); deriving it means the type cannot drift from the stylesheet again, because `Card.unstyled-values.test.tsx` fails if the list stops matching the SCSS.
|
|
18
|
+
- `radius: (typeof CARD_STYLED_RADIUS)[number]` = "lg" — Corner radius size. Same derivation as `padding`. There is no `--wim-radius-xs` / `-3xl` / `-4xl` / `-5xl` token, so those values had nothing they could have meant.
|
|
19
|
+
|
|
20
|
+
## Card.Body
|
|
21
|
+
|
|
22
|
+
(no props of its own)
|
|
23
|
+
|
|
24
|
+
## Card.Footer
|
|
25
|
+
|
|
26
|
+
(no props of its own)
|
|
27
|
+
|
|
28
|
+
## Card.Header
|
|
29
|
+
|
|
30
|
+
(no props of its own)
|
|
31
|
+
|
|
32
|
+
## Card.Link
|
|
33
|
+
|
|
34
|
+
- `asChild: boolean` = false — Render your own element (a router `Link`, or a `button`) instead of an `<a>`.
|
|
35
|
+
|
|
36
|
+
## Design tokens it reads
|
|
37
|
+
|
|
38
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-border-secondary`, `--wim-color-focus-outline`, `--wim-color-ghost-border`, `--wim-color-glass-bg`, `--wim-color-glass-blur`, `--wim-color-glass-border`, `--wim-color-primary`, `--wim-color-shadow-glass`, `--wim-color-surface`, `--wim-color-surface-variant`, `--wim-color-text-primary`, `--wim-color-white`, `--wim-divider-color`, `--wim-focus-outline-offset`, `--wim-focus-outline-width`, `--wim-radius-component`, `--wim-radius-container`, `--wim-radius-md`, `--wim-radius-sm`, `--wim-radius-xl`, `--wim-scale-active`, `--wim-shadow-md`, `--wim-shadow-sm`, `--wim-spacing-2xl`, `--wim-spacing-3xl`, `--wim-spacing-4xl`, `--wim-spacing-5xl`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-transition-base`
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Carousel — wimui
|
|
2
|
+
|
|
3
|
+
> Content slideshow
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Carousel } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `children: React.ReactNode` — Content of the carousel
|
|
15
|
+
- `autoPlay: boolean` = false — Whether to auto-play
|
|
16
|
+
- `interval: number` = 5000 — Auto-play interval (in milliseconds)
|
|
17
|
+
- `showIndicators: boolean` = true — Whether to show the indicators
|
|
18
|
+
- `showControls: boolean` = true — Whether to show the previous/next buttons
|
|
19
|
+
- `controlsPlacement: "overlay" | "outside"` = "overlay" — Where the arrows and indicators sit. `overlay` (default) places them on top of the slide, which suits full-bleed images. `outside` moves the arrows beside the viewport and the indicators below it, so they never cover a slide made of text.
|
|
20
|
+
- `loop: boolean` = true — Whether to loop infinitely (seamless transitions)
|
|
21
|
+
- `slidesToShow: number | Breakpoints` = 1 — Number of slides to show at once. A number or an object per breakpoint.
|
|
22
|
+
- `aspectRatio: string` — Aspect ratio (e.g. '16/9', '4/3', '1/1').
|
|
23
|
+
- `objectFit: "fill" | "contain" | "cover" | "none" | "scale-down"` = "cover" — How the image fits. Effective when aspectRatio is set. (default: 'cover')
|
|
24
|
+
- `labels: { slideLabel?: (number: number) => string; prevSlide?: string; nextSlide?: string; goToSlide?: (number: number) => string; /** Announced to screen readers when the user changes the slide. Receives the slide number and the slide count. */ slideStatus?: (current: number, total: number) => string; }` — Labels for manual translation.
|
|
25
|
+
- `className: string` — Additional class names
|
|
26
|
+
- `asChild: boolean` — Whether to use the Radix Slot pattern
|
|
27
|
+
|
|
28
|
+
## Design tokens it reads
|
|
29
|
+
|
|
30
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-carousel-object-fit`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-surface-subtle`, `--wim-color-text-on-primary`, `--wim-color-text-secondary`, `--wim-comp-carousel-control-bg`, `--wim-comp-carousel-control-hover-bg`, `--wim-comp-carousel-indicator-bg`, `--wim-comp-carousel-indicator-hover-bg`, `--wim-comp-carousel-ring`, `--wim-duration-extra-slow`, `--wim-easing-standard`, `--wim-height-md`, `--wim-scale-active-sm`, `--wim-spacing-md`, `--wim-spacing-xl`, `--wim-tap-target-min`, `--wim-transition-fast`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Cascader — wimui
|
|
2
|
+
|
|
3
|
+
> Hierarchical selection
|
|
4
|
+
|
|
5
|
+
Also known as: Column View, Miller Columns
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Cascader } from "wimui/form";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `options: CascaderOption[]` = [] — Hierarchical options to select from
|
|
17
|
+
- `value: string[]` — Selected value path (controlled)
|
|
18
|
+
- `onChange: (value: string[], selectedOptions: CascaderOption[]) => void` — Callback when the selection changes
|
|
19
|
+
- `placeholder: React.ReactNode` — Placeholder shown when nothing is selected
|
|
20
|
+
- `label: React.ReactNode` — Field label
|
|
21
|
+
- `error: string` — Error message
|
|
22
|
+
- `required: boolean` — Whether to show the required indicator
|
|
23
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
24
|
+
- `className: string` — Additional class names
|
|
25
|
+
- `disabled: boolean` = false — Whether the field is disabled
|
|
26
|
+
- `defaultValue: string[]` — Initially selected value path (uncontrolled)
|
|
27
|
+
- `id: string` — Unique ID for the component
|
|
28
|
+
- `expandTrigger: "click" | "hover"` = "click" — Expand trigger mode
|
|
29
|
+
- `separator: string` = " / " — Custom separator for the display value
|
|
30
|
+
- `allowClear: boolean` = false — Whether to show a clear button when a value is selected
|
|
31
|
+
- `aria-label: string` — Accessible label for the trigger when no visible label is provided
|
|
32
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
33
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
34
|
+
|
|
35
|
+
## Design tokens it reads
|
|
36
|
+
|
|
37
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-primary`, `--wim-color-primary-muted`, `--wim-color-surface`, `--wim-color-text-accent`, `--wim-color-text-on-disabled`, `--wim-color-text-placeholder`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-floating-shift-x`, `--wim-font-family-default`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-medium`, `--wim-height-md`, `--wim-radius-component`, `--wim-radius-overlay`, `--wim-shadow-focus`, `--wim-shadow-focus-ring`, `--wim-shadow-overlay`, `--wim-spacing-md`, `--wim-spacing-xs`, `--wim-transition-fast`, `--wim-z-overlay`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Center — wimui
|
|
2
|
+
|
|
3
|
+
> Radial centering
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Center } from "wimui/layout";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `inline: boolean` = false — Whether to use inline-flex
|
|
15
|
+
- `asChild: boolean` = false — If true, the box will be rendered as its child, merging its props onto that child.
|
|
16
|
+
- `p: number | WimSpacing` — Padding
|
|
17
|
+
- `pt: number | WimSpacing` — Padding top
|
|
18
|
+
- `pr: number | WimSpacing` — Padding right
|
|
19
|
+
- `pb: number | WimSpacing` — Padding bottom
|
|
20
|
+
- `pl: number | WimSpacing` — Padding left
|
|
21
|
+
- `px: number | WimSpacing` — Padding horizontal
|
|
22
|
+
- `py: number | WimSpacing` — Padding vertical
|
|
23
|
+
- `m: number | WimSpacing` — Margin
|
|
24
|
+
- `mt: number | WimSpacing` — Margin top
|
|
25
|
+
- `mr: number | WimSpacing` — Margin right
|
|
26
|
+
- `mb: number | WimSpacing` — Margin bottom
|
|
27
|
+
- `ml: number | WimSpacing` — Margin left
|
|
28
|
+
- `mx: number | WimSpacing` — Margin horizontal
|
|
29
|
+
- `my: number | WimSpacing` — Margin vertical
|
|
30
|
+
- `bg: T | (string & {})` — Background color
|
|
31
|
+
- `color: T | (string & {})` — Text color
|
|
32
|
+
- `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
|
|
33
|
+
- `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
|
|
34
|
+
- `radius: number | WimRadius` — Border radius
|
|
35
|
+
- `shadow: T | (string & {})` — Box shadow
|
|
36
|
+
- `display: React.CSSProperties["display"]` — Display
|
|
37
|
+
- `position: React.CSSProperties["position"]` — Position
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Charts — wimui
|
|
2
|
+
|
|
3
|
+
> Visual representation of data with various chart types
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Charts } 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,17 @@
|
|
|
1
|
+
# ChatUI — wimui
|
|
2
|
+
|
|
3
|
+
> A comprehensive set of components for building chat interfaces with support for messages, avatars, timestamps, and interactive input.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ChatUI } from "wimui/ai";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Design tokens it reads
|
|
13
|
+
|
|
14
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-chat-bubble-bg`, `--wim-chat-bubble-color`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-surface-variant`, `--wim-color-text-accent`, `--wim-color-text-danger`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-color-text-success`, `--wim-color-text-tertiary`, `--wim-color-text-warning`, `--wim-comp-avatar-default`, `--wim-comp-avatar-default-fg`, `--wim-comp-avatar-s1`, `--wim-comp-avatar-s1-fg`, `--wim-comp-avatar-s10`, `--wim-comp-avatar-s10-fg`, `--wim-comp-avatar-s12`, `--wim-comp-avatar-s12-fg`, `--wim-comp-avatar-s14`, `--wim-comp-avatar-s14-fg`, `--wim-comp-avatar-s16`, `--wim-comp-avatar-s16-fg`, `--wim-comp-avatar-s18`, `--wim-comp-avatar-s18-fg`, `--wim-comp-avatar-s20`, `--wim-comp-avatar-s20-fg`, `--wim-comp-avatar-s22`, `--wim-comp-avatar-s22-fg`, `--wim-comp-avatar-s24`, `--wim-comp-avatar-s24-fg`, `--wim-comp-avatar-s3`, `--wim-comp-avatar-s3-fg`, `--wim-comp-avatar-s5`, `--wim-comp-avatar-s5-fg`, `--wim-comp-avatar-s7`, `--wim-comp-avatar-s7-fg`, `--wim-comp-chat-bubble-received`, `--wim-comp-chat-bubble-sent`, `--wim-comp-chat-surface`, `--wim-drop-shadow-xs`, `--wim-focus-outline-offset`, `--wim-focus-outline-width`, `--wim-font-size-lg`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-height-lg`, `--wim-height-md`, `--wim-height-sm`, `--wim-height-xs`, `--wim-line-height-normal`, `--wim-opacity-dim`, `--wim-opacity-disabled`, `--wim-radius-component`, `--wim-radius-container`, `--wim-radius-full`, `--wim-shadow-focus-ring`, `--wim-shadow-xs`, `--wim-spacing-2xs`, `--wim-spacing-3xs`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-transition-fast`, `--wim-width-md`, `--wim-width-sm`
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Checkbox — wimui
|
|
2
|
+
|
|
3
|
+
> Multiple choice
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Checkbox } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
15
|
+
- `children: React.ReactNode` — Label content rendered next to the checkbox
|
|
16
|
+
- `indeterminate: boolean` = false — Whether to show the indeterminate (mixed) state
|
|
17
|
+
- `error: boolean` = false — Whether to display as an error state (aria-invalid is applied)
|
|
18
|
+
|
|
19
|
+
## Design tokens it reads
|
|
20
|
+
|
|
21
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-checkbox-check-height`, `--wim-checkbox-check-width`, `--wim-checkbox-indeterminate-width`, `--wim-checkbox-size`, `--wim-color-danger`, `--wim-color-disabled`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-text-danger`, `--wim-color-text-on-disabled`, `--wim-color-text-primary`, `--wim-color-text-tertiary`, `--wim-color-white`, `--wim-duration-fast`, `--wim-easing-entrance`, `--wim-easing-standard`, `--wim-font-family-default`, `--wim-font-size-md`, `--wim-line-height-normal`, `--wim-opacity-disabled`, `--wim-radius-sm`, `--wim-shadow-error-ring`, `--wim-shadow-focus`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-tap-target-min`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# CheckboxGroup — wimui
|
|
2
|
+
|
|
3
|
+
> Shared state checkboxes
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CheckboxGroup } from "wimui/form";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `options: Option[]` (required) — List of checkbox options
|
|
15
|
+
- `value: string[]` — Selected values (controlled)
|
|
16
|
+
- `defaultValue: string[]` = [] — Initially selected values (uncontrolled)
|
|
17
|
+
- `onChange: (value: string[]) => void` — Callback when the selected values change
|
|
18
|
+
- `direction: "vertical" | "horizontal"` = "vertical" — Layout direction of the checkboxes
|
|
19
|
+
- `variant: "default" | "card"` = "default" — `card` draws each option as a bordered card that is selectable as a whole (the card is the option's `<label>`). Keys and group semantics stay those of a checkbox group. Use with `description` when the options need explaining. @default "default"
|
|
20
|
+
- `name: string` — Name attribute shared by the checkbox inputs
|
|
21
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
22
|
+
- `label: string` — Group label
|
|
23
|
+
- `error: string` — Error message
|
|
24
|
+
- `required: boolean` — Whether to show the required indicator
|
|
25
|
+
- `disabled: boolean` — Whether the whole group is disabled
|
|
26
|
+
|
|
27
|
+
## Design tokens it reads
|
|
28
|
+
|
|
29
|
+
`--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-width-sm`
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Chip — wimui
|
|
2
|
+
|
|
3
|
+
> Filter/Selection tokens
|
|
4
|
+
|
|
5
|
+
Also known as: Pill, Token
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Chip } from "wimui/data-display";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `asChild: boolean` = false — If true, the chip will be rendered as its child, merging its props onto that child. Cannot be combined with `onDelete` (T99).
|
|
17
|
+
- `children: React.ReactNode` — Content to display
|
|
18
|
+
- `content: React.ReactNode` — Content to display (alternative to children)
|
|
19
|
+
- `onClick: (e: React.MouseEvent<HTMLButtonElement | HTMLSpanElement>) => void` — Click event. When provided, the chip behaves as a button.
|
|
20
|
+
- `onDelete: (e: React.SyntheticEvent) => void` — Delete event. When provided, a × button is shown.
|
|
21
|
+
- `avatar: React.ReactNode` — Avatar (e.g. an image or initials)
|
|
22
|
+
- `icon: React.ReactNode` — Icon
|
|
23
|
+
- `selected: boolean` = false — Whether the chip is selected
|
|
24
|
+
- `disabled: boolean` = false — Whether the chip is disabled
|
|
25
|
+
- `intent: IndicatorIntent` = "neutral" — Intent (semantic state)
|
|
26
|
+
- `variant: "solid" | "outline" | "subtle"` = "solid" — Visual style variant
|
|
27
|
+
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size
|
|
28
|
+
- `deleteAriaLabel: string` — Accessible label for the delete button
|
|
29
|
+
- `className: string` — Additional class names
|
|
30
|
+
|
|
31
|
+
## Design tokens it reads
|
|
32
|
+
|
|
33
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-disabled`, `--wim-color-ghost-bg-active`, `--wim-color-skeleton-bg`, `--wim-color-surface`, `--wim-color-text-on-disabled`, `--wim-focus-outline-offset`, `--wim-font-size-2xs`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-opacity-disabled`, `--wim-radius-full`, `--wim-scale-active`, `--wim-scale-active-sm`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-tap-target-min`, `--wim-transition-fast`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Code — wimui
|
|
2
|
+
|
|
3
|
+
> Code snippets
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Code } from "wimui/typography";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `asChild: boolean` = false — If true, the code will be rendered as its child, merging its props onto that child.
|
|
15
|
+
- `children: React.ReactNode` — Code to display. Ignored when `code` is set (unless asChild is true).
|
|
16
|
+
- `code: string` — Code string to display. Takes precedence over children.
|
|
17
|
+
- `block: boolean` = false — If true, renders as a block (`<pre>`) instead of inline. @default false
|
|
18
|
+
- `language: string` — Language identifier appended as a `language-<lang>` class for syntax highlighters.
|
|
19
|
+
|
|
20
|
+
## Design tokens it reads
|
|
21
|
+
|
|
22
|
+
`--wim-border-width-thin`, `--wim-color-border-secondary`, `--wim-color-ghost-bg-hover`, `--wim-color-surface-subtle`, `--wim-color-text-primary`, `--wim-font-size-small-scale`, `--wim-radius-component`, `--wim-radius-sm`, `--wim-spacing-2xl`, `--wim-width-sm`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# CodeBlock — wimui
|
|
2
|
+
|
|
3
|
+
> Syntax-highlighted code block with copy button, line numbers, and collapsible overflow.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CodeBlock } from "wimui/ai";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `code: string` (required) — The code string to display
|
|
15
|
+
- `language: string` — Programming language label shown in the header (e.g. "tsx", "bash")
|
|
16
|
+
- `filename: string` — Optional filename shown in the header instead of the language label
|
|
17
|
+
- `showCopy: boolean` = true — Whether to show the copy-to-clipboard button (default: true)
|
|
18
|
+
- `showLineNumbers: boolean` = false — Whether to show line numbers (default: false)
|
|
19
|
+
- `maxLines: number` — Maximum visible height before the block becomes scrollable. Pass a CSS value (e.g. "300px") or a number of lines (e.g. 20). When set, an expand/collapse toggle is shown.
|
|
20
|
+
- `className: string` — Additional CSS class
|
|
21
|
+
|
|
22
|
+
## Design tokens it reads
|
|
23
|
+
|
|
24
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-ghost-bg-hover`, `--wim-color-success`, `--wim-color-surface-subtle`, `--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-letter-spacing-wide`, `--wim-line-height-loose`, `--wim-radius-component`, `--wim-radius-sm`, `--wim-spacing-2xs`, `--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,30 @@
|
|
|
1
|
+
# CodeDiffViewer — wimui
|
|
2
|
+
|
|
3
|
+
> Displays code changes as a side-by-side or unified diff, with line-level highlighting and Apply/Reject actions.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { CodeDiffViewer } from "wimui/ai";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `before: string` (required) — Code before the change
|
|
15
|
+
- `after: string` (required) — Code after the change
|
|
16
|
+
- `language: string` — Language label shown in header
|
|
17
|
+
- `filename: string` — Filename shown in header (takes precedence over language)
|
|
18
|
+
- `view: "split" | "unified"` = "split" — Display mode
|
|
19
|
+
- `onApply: () => void` — Called when user clicks Apply
|
|
20
|
+
- `onReject: () => void` — Called when user clicks Reject
|
|
21
|
+
- `className: string` — Additional CSS class
|
|
22
|
+
- `isApplying: boolean` = false — Whether the change is currently being applied
|
|
23
|
+
- `isApplied: boolean` = false — Whether the change has been successfully applied
|
|
24
|
+
|
|
25
|
+
## Design tokens it reads
|
|
26
|
+
|
|
27
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-danger`, `--wim-color-focus-outline`, `--wim-color-ghost-bg-active`, `--wim-color-ghost-bg-hover`, `--wim-color-primary`, `--wim-color-primary-hover`, `--wim-color-success`, `--wim-color-surface-subtle`, `--wim-color-text-on-primary`, `--wim-color-text-on-success`, `--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-family-default`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-letter-spacing-wide`, `--wim-line-height-loose`, `--wim-opacity-subtle`, `--wim-radius-component`, `--wim-radius-sm`, `--wim-spacing-2xs`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-transition-fast`
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ColorInput — wimui
|
|
2
|
+
|
|
3
|
+
> Input with color preview
|
|
4
|
+
|
|
5
|
+
Also known as: Color Well, Color Field
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { ColorInput } from "wimui/form";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
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
|
+
- `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
|
|
21
|
+
- `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
|
|
22
|
+
- `rightIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the right icon
|
|
23
|
+
- `onLeftIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the left icon is clicked (renders the icon as a button)
|
|
24
|
+
- `onRightIconClick: (e: React.MouseEvent<HTMLButtonElement>) => void` — Callback when the right icon is clicked (renders the icon as a button)
|
|
25
|
+
- `allowClear: boolean` = false — Whether to show a clear button when value is present
|
|
26
|
+
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
27
|
+
- `rightIconClassName: string` — Additional class name for the right icon
|
|
28
|
+
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
29
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
30
|
+
- `label: React.ReactNode` — Field label
|
|
31
|
+
- `error: string` — Error message
|
|
32
|
+
- `required: boolean` — Whether to show the required indicator
|
|
33
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
34
|
+
- `inputClassName: string` — Additional class name for the inner input element
|
|
35
|
+
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
36
|
+
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
37
|
+
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
38
|
+
- `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
|
|
39
|
+
- `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.
|
|
40
|
+
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
41
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
42
|
+
|
|
43
|
+
## Design tokens it reads
|
|
44
|
+
|
|
45
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-height-xs`, `--wim-opacity-disabled`, `--wim-radius-component`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# ColorPicker — wimui
|
|
2
|
+
|
|
3
|
+
> Color selection picker
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ColorPicker } 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
|
+
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
18
|
+
- `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right 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
|
+
- `allowClear: boolean` = false — Whether to show a clear button when value is present
|
|
24
|
+
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
25
|
+
- `rightIconClassName: string` — Additional class name for the right icon
|
|
26
|
+
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
27
|
+
- `width: FieldWidth | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
28
|
+
- `label: React.ReactNode` — Field label
|
|
29
|
+
- `error: string` — Error message
|
|
30
|
+
- `required: boolean` — Whether to show the required indicator
|
|
31
|
+
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
32
|
+
- `inputClassName: string` — Additional class name for the inner input element
|
|
33
|
+
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
34
|
+
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
35
|
+
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
36
|
+
- `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
|
|
37
|
+
- `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.
|
|
38
|
+
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
39
|
+
- `asChild: boolean` = false — Whether to render as a child element.
|
|
40
|
+
|
|
41
|
+
## Design tokens it reads
|
|
42
|
+
|
|
43
|
+
`--wim-height-md`, `--wim-radius-sm`
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Combobox — wimui
|
|
2
|
+
|
|
3
|
+
> Select with search
|
|
4
|
+
|
|
5
|
+
Also known as: Autocomplete, Auto Complete
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { Combobox } from "wimui/form";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `options: ComboboxOption[]` = [] — List of suggestion options
|
|
17
|
+
- `onChange: (option: ComboboxOption) => void` — Callback when an option is selected
|
|
18
|
+
- `placeholder: string` — Placeholder for the input
|
|
19
|
+
- `label: React.ReactNode` — 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
|
+
- `showSearchIcon: boolean` = true — Whether to show the search icon
|
|
24
|
+
- `allowClear: boolean` = true — Whether to show a clear button when value is present
|
|
25
|
+
- `defaultValue: string` = "" — Initial input value (uncontrolled)
|
|
26
|
+
- `className: string` — Additional class names
|
|
27
|
+
- `disabled: boolean` = false — Whether the field is disabled
|
|
28
|
+
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
29
|
+
- `id: string` — Unique ID for the component
|
|
30
|
+
- `labels: { noResults?: React.ReactNode; }` = {} — Labels for internationalization
|
|
31
|
+
|
|
32
|
+
## Design tokens it reads
|
|
33
|
+
|
|
34
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-primary-muted`, `--wim-color-surface`, `--wim-color-text-accent`, `--wim-color-text-on-disabled`, `--wim-color-text-placeholder`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-control-item-padding-x-lg`, `--wim-floating-shift-x`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-weight-medium`, `--wim-line-height-normal`, `--wim-list-item-padding-y`, `--wim-radius-overlay`, `--wim-shadow-focus`, `--wim-shadow-overlay`, `--wim-spacing-xs`, `--wim-width-md`, `--wim-z-overlay`
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# CommandPalette — wimui
|
|
2
|
+
|
|
3
|
+
> Cmd+K search overlay
|
|
4
|
+
|
|
5
|
+
Also known as: Command Bar, Quick Open
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import "wimui/styles.css"; // once per app — required
|
|
11
|
+
import { CommandPalette } from "wimui/navigation";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Props
|
|
15
|
+
|
|
16
|
+
- `children: ReactNode` (required) — Palette parts (CommandPaletteTrigger, CommandPaletteContent, etc.).
|
|
17
|
+
- `open: boolean` — Controlled open state. Use together with onOpenChange.
|
|
18
|
+
- `onOpenChange: (open: boolean) => void` — Called with the next state when the palette is opened or closed.
|
|
19
|
+
|
|
20
|
+
## Design tokens it reads
|
|
21
|
+
|
|
22
|
+
`--wim-blur-xs`, `--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-border-secondary`, `--wim-color-glass-border`, `--wim-color-overlay`, `--wim-color-primary`, `--wim-color-surface`, `--wim-color-surface-inset`, `--wim-color-surface-subtle-alpha`, `--wim-color-surface-variant`, `--wim-color-text-accent`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-duration-fast`, `--wim-easing-entrance`, `--wim-font-size-3xs`, `--wim-font-size-md`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-semibold`, `--wim-letter-spacing-wide`, `--wim-radius-component`, `--wim-radius-container`, `--wim-radius-sm`, `--wim-shadow-focus`, `--wim-shadow-modal`, `--wim-spacing-2xl`, `--wim-spacing-hairline`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xl`, `--wim-spacing-xs`, `--wim-status-desc-max-width`, `--wim-tap-target-min`, `--wim-transition-fast`, `--wim-z-overlay`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Comment — wimui
|
|
2
|
+
|
|
3
|
+
> Shows one comment in a discussion, with its actions and nested replies.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Comment } from "wimui/data-display";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `id: string` (required) — Identifies this comment. The `replyingTo` / `editingId` props are compared against it, and the callbacks pass it back.
|
|
15
|
+
- `author: { /** Display name. Also names the comment for assistive tech. */ name: string; /** Avatar image URL. */ avatarSrc?: string; /** Initials shown when there is no avatar image. */ initials?: string; /** Optional marker next to the name — "Author", "Moderator", a `Tag`, etc. */ badge?: React.ReactNode; }` (required) — Who wrote it.
|
|
16
|
+
- `timestamp: React.ReactNode` — When it was written. Pass a `RelativeTime`, or any node — this component does not format dates, because the surrounding page decides whether "3 hours ago" or an absolute date is the useful thing to read.
|
|
17
|
+
- `children: React.ReactNode` — The comment itself. Any node — Markdown, mentions, attachments.
|
|
18
|
+
- `replies: React.ReactNode` — Nested replies: `Comment` elements. The nesting is drawn as a list, so assistive tech reads the depth rather than inferring it from indentation.
|
|
19
|
+
- `edited: boolean` = false — Marks the comment as changed since it was posted. A comment that was silently rewritten reads as if it always said the new thing. @default false
|
|
20
|
+
- `replyingTo: string` — Id of the comment whose reply box is open. When it equals `id`, `composer` is rendered below this comment.
|
|
21
|
+
- `editingId: string` — Id of the comment being edited. When it equals `id`, `editor` replaces the body rather than appearing alongside it.
|
|
22
|
+
- `composer: React.ReactNode` — The reply box. Rendered only while `replyingTo` equals `id`.
|
|
23
|
+
- `editor: React.ReactNode` — The edit form. Rendered only while `editingId` equals `id`.
|
|
24
|
+
- `onReply: (id: string) => void` — Shows a Reply button when set.
|
|
25
|
+
- `onEdit: (id: string) => void` — Shows an Edit button when set.
|
|
26
|
+
- `onDelete: (id: string) => void` — Shows a Delete button when set.
|
|
27
|
+
- `actions: React.ReactNode` — Extra actions, placed after the built-in ones.
|
|
28
|
+
- `className: string` — Additional class names
|
|
29
|
+
|
|
30
|
+
## Design tokens it reads
|
|
31
|
+
|
|
32
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-text-primary`, `--wim-color-text-secondary`, `--wim-focus-outline-offset`, `--wim-focus-outline-width`, `--wim-font-size-sm`, `--wim-font-size-xs`, `--wim-font-weight-medium`, `--wim-radius-sm`, `--wim-spacing-lg`, `--wim-spacing-md`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-tap-target-min`, `--wim-transition-fast`
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Container — wimui
|
|
2
|
+
|
|
3
|
+
> Layout wrapper
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { Container } from "wimui/layout";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `size: "xs" | "sm" | "md" | "lg" | "xl" | number | string` = "lg" — Container max-width
|
|
15
|
+
- `fluid: boolean` = false — Whether the container should be fluid (100% width)
|
|
16
|
+
- `asChild: boolean` = false — If true, the box will be rendered as its child, merging its props onto that child.
|
|
17
|
+
- `p: number | WimSpacing` — Padding
|
|
18
|
+
- `pt: number | WimSpacing` — Padding top
|
|
19
|
+
- `pr: number | WimSpacing` — Padding right
|
|
20
|
+
- `pb: number | WimSpacing` — Padding bottom
|
|
21
|
+
- `pl: number | WimSpacing` — Padding left
|
|
22
|
+
- `px: number | WimSpacing` — Padding horizontal
|
|
23
|
+
- `py: number | WimSpacing` — Padding vertical
|
|
24
|
+
- `m: number | WimSpacing` — Margin
|
|
25
|
+
- `mt: number | WimSpacing` — Margin top
|
|
26
|
+
- `mr: number | WimSpacing` — Margin right
|
|
27
|
+
- `mb: number | WimSpacing` — Margin bottom
|
|
28
|
+
- `ml: number | WimSpacing` — Margin left
|
|
29
|
+
- `mx: number | WimSpacing` — Margin horizontal
|
|
30
|
+
- `my: number | WimSpacing` — Margin vertical
|
|
31
|
+
- `bg: T | (string & {})` — Background color
|
|
32
|
+
- `color: T | (string & {})` — Text color
|
|
33
|
+
- `w: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Width
|
|
34
|
+
- `h: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` — Height
|
|
35
|
+
- `radius: number | WimRadius` — Border radius
|
|
36
|
+
- `shadow: T | (string & {})` — Box shadow
|
|
37
|
+
- `display: React.CSSProperties["display"]` — Display
|
|
38
|
+
- `position: React.CSSProperties["position"]` — Position
|
|
39
|
+
|
|
40
|
+
## Design tokens it reads
|
|
41
|
+
|
|
42
|
+
`--wim-spacing-2xl`
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ContextMenu — wimui
|
|
2
|
+
|
|
3
|
+
> Right-click menus
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "wimui/styles.css"; // once per app — required
|
|
9
|
+
import { ContextMenu } from "wimui/overlay";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Props
|
|
13
|
+
|
|
14
|
+
- `children: ReactNode` (required) — Element that opens the context menu on right-click.
|
|
15
|
+
- `menu: ReactNode` (required) — Menu items to display in the context menu
|
|
16
|
+
- `className: string` — Additional CSS class name for the container.
|
|
17
|
+
- `disabled: boolean` = false — Disable the context menu
|
|
18
|
+
- `asChild: boolean` = false — If true, merge trigger props onto the child element.
|
|
19
|
+
|
|
20
|
+
## Design tokens it reads
|
|
21
|
+
|
|
22
|
+
`--wim-border-width-thin`, `--wim-color-border`, `--wim-color-line`, `--wim-color-surface`, `--wim-color-text-secondary`, `--wim-duration-fast`, `--wim-font-size-xs`, `--wim-font-weight-semibold`, `--wim-letter-spacing-wide`, `--wim-list-item-padding-x`, `--wim-list-item-padding-y`, `--wim-menu-min-width`, `--wim-opacity-dim`, `--wim-radius-overlay`, `--wim-shadow-focus`, `--wim-shadow-overlay`, `--wim-spacing-md`, `--wim-spacing-xs`, `--wim-z-toast`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|