wimui 0.71.0 → 0.73.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/WimProvider.d.ts +5 -0
- package/dist/components/_internal/useAnnounce.d.ts +18 -1
- package/dist/components/data-display/AvatarGroup/AvatarGroup.cjs +1 -1
- package/dist/components/data-display/AvatarGroup/AvatarGroup.js +5 -5
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +258 -141
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +16 -13
- package/dist/components/data-display/InfiniteScroll/InfiniteScroll.cjs +1 -1
- package/dist/components/data-display/InfiniteScroll/InfiniteScroll.js +4 -4
- package/dist/components/data-display/Kanban/Kanban.cjs +1 -1
- package/dist/components/data-display/Kanban/Kanban.d.ts +4 -1
- package/dist/components/data-display/Kanban/Kanban.js +142 -97
- package/dist/components/data-display/Kanban/kanban.module.cjs +1 -1
- package/dist/components/data-display/Kanban/kanban.module.js +7 -6
- 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/data-display/Table/useTableSort.d.ts +9 -3
- package/dist/components/feedback/Notification/Notification.d.ts +13 -0
- package/dist/components/feedback/Snackbar/Snackbar.d.ts +14 -0
- package/dist/components/feedback/Toast/Toast.d.ts +13 -0
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.d.ts +2 -14
- package/dist/components/media/Lightbox/Lightbox.js +3 -3
- package/dist/components/overlay/Dialog/Dialog.cjs +1 -1
- package/dist/components/overlay/Dialog/Dialog.d.ts +0 -9
- package/dist/components/overlay/Dialog/Dialog.js +1 -1
- package/dist/components/overlay/Drawer/Drawer.cjs +1 -1
- package/dist/components/overlay/Drawer/Drawer.d.ts +0 -10
- package/dist/components/overlay/Drawer/Drawer.js +1 -1
- package/dist/hooks/useAutoResize.d.ts +8 -2
- 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 +36 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +232 -231
- package/dist/llms/AIResponseFeedback.md +3 -3
- package/dist/llms/AgentStatus.md +1 -1
- package/dist/llms/Alert.md +1 -1
- package/dist/llms/Avatar.md +2 -2
- package/dist/llms/AvatarGroup.md +1 -1
- package/dist/llms/Badge.md +2 -2
- package/dist/llms/Banner.md +1 -1
- package/dist/llms/Blockquote.md +1 -1
- package/dist/llms/Breadcrumb.md +1 -1
- package/dist/llms/Button.md +2 -2
- package/dist/llms/Calendar.md +1 -1
- package/dist/llms/Cascader.md +1 -1
- package/dist/llms/Chip.md +2 -2
- package/dist/llms/ColorInput.md +2 -2
- package/dist/llms/ColorPicker.md +2 -2
- package/dist/llms/CopyButton.md +1 -1
- package/dist/llms/Countdown.md +1 -1
- package/dist/llms/CounterTextarea.md +2 -2
- package/dist/llms/CreditCardInput.md +3 -3
- package/dist/llms/DatePicker.md +2 -2
- package/dist/llms/DescriptionList.md +1 -1
- package/dist/llms/FileUpload.md +1 -1
- package/dist/llms/FloatButton.md +2 -2
- package/dist/llms/HamburgerMenu.md +1 -1
- package/dist/llms/IconButton.md +2 -2
- package/dist/llms/Image.md +1 -1
- package/dist/llms/Indicator.md +1 -1
- package/dist/llms/Input.md +2 -2
- package/dist/llms/InputBase.md +2 -2
- package/dist/llms/InputMask.md +2 -2
- package/dist/llms/InteractiveArea.md +1 -1
- package/dist/llms/Kanban.md +2 -2
- package/dist/llms/Kbd.md +1 -1
- package/dist/llms/KeyboardShortcuts.md +1 -1
- package/dist/llms/Leaderboard.md +1 -1
- package/dist/llms/Link.md +1 -1
- package/dist/llms/LinkButton.md +2 -2
- package/dist/llms/List.md +1 -1
- package/dist/llms/Loader.md +1 -1
- package/dist/llms/ModelSelector.md +1 -1
- package/dist/llms/MultiSelect.md +1 -1
- package/dist/llms/Notification.md +1 -1
- package/dist/llms/PasswordInput.md +2 -2
- package/dist/llms/PasswordStrength.md +1 -1
- package/dist/llms/Popconfirm.md +1 -1
- package/dist/llms/Popover.md +1 -1
- package/dist/llms/Presence.md +1 -1
- package/dist/llms/Progress.md +2 -2
- package/dist/llms/ProgressRing.md +2 -2
- package/dist/llms/Rating.md +1 -1
- package/dist/llms/Reaction.md +1 -1
- package/dist/llms/Result.md +1 -1
- package/dist/llms/RichTextEditor.md +3 -3
- package/dist/llms/ScrollProgress.md +1 -1
- package/dist/llms/SearchInput.md +2 -2
- package/dist/llms/SegmentedControl.md +1 -1
- package/dist/llms/Select.md +2 -2
- package/dist/llms/SmartSearchInput.md +2 -2
- package/dist/llms/Snackbar.md +1 -1
- package/dist/llms/Span.md +2 -2
- package/dist/llms/Spinner.md +1 -1
- package/dist/llms/SplitButton.md +1 -1
- package/dist/llms/Switch.md +1 -1
- package/dist/llms/TabNavigation.md +1 -1
- package/dist/llms/Tag.md +2 -2
- package/dist/llms/TagInput.md +2 -2
- package/dist/llms/Text.md +2 -2
- package/dist/llms/Textarea.md +2 -2
- package/dist/llms/ThemeToggle.md +3 -3
- package/dist/llms/TimePicker.md +2 -2
- package/dist/llms/Toast.md +1 -1
- package/dist/llms/ToggleGroup.md +1 -1
- package/dist/llms/Toolbar.md +1 -1
- package/dist/llms/Tooltip.md +1 -1
- package/dist/llms/TreeSelect.md +1 -1
- package/dist/llms/UsageMeter.md +1 -1
- package/dist/llms-full.txt +201 -110
- package/dist/llms.txt +17 -1
- package/dist/locales/en/data-display.json +12 -1
- package/dist/locales/ja/data-display.json +12 -1
- package/dist/locales/pt/data-display.json +12 -1
- package/dist/media.cjs +1 -1
- package/dist/media.js +4 -4
- package/dist/overlay.cjs +1 -1
- package/dist/overlay.js +11 -11
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +7 -5
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.73.0 — a React 19 component library: 230 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -786,7 +786,7 @@ number of pixels. Prefer the token so the gap follows the theme.
|
|
|
786
786
|
- `actions: ReactNode` — Action elements (buttons, etc.)
|
|
787
787
|
- `variant: "dashed" | "solid" | "none"` = "dashed" — Border variant
|
|
788
788
|
- `bgVariant: "default" | "transparent" | "muted"` = "default" — Background variant
|
|
789
|
-
- `size:
|
|
789
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size variation
|
|
790
790
|
- `align: "start" | "center"` = "center" — Horizontal alignment of the icon, text and actions. Centred content only reads
|
|
791
791
|
as deliberate when the area is the one thing in its region — a drop target or a
|
|
792
792
|
whole result page. Inside a card, a table or a column of prose, use `"start"`
|
|
@@ -915,7 +915,7 @@ number of pixels. Prefer the token so the gap follows the theme.
|
|
|
915
915
|
- `position: React.CSSProperties["position"]` — Position
|
|
916
916
|
- **Toolbar** — Action strip for IconButton, ToggleGroup, and related controls with toolbar keyboard navigation. (aka Action Bar)
|
|
917
917
|
- `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
|
|
918
|
-
- `size:
|
|
918
|
+
- `size: "lg" | "md" | "sm"` = "md" — Visual density for padding and gap.
|
|
919
919
|
@default "md"
|
|
920
920
|
- `orientation: "horizontal" | "vertical"` = "horizontal" — Layout axis of the toolbar.
|
|
921
921
|
@default "horizontal"
|
|
@@ -968,9 +968,9 @@ children. Defaults to the built-in "Show hidden tools (n)" (en / ja / pt).
|
|
|
968
968
|
- `asChild: boolean` = false — If true, the button will be rendered as its child, merging its props onto that child.
|
|
969
969
|
Useful for using the button styles with Link components (e.g. from React Router or Next.js).
|
|
970
970
|
- `backgroundColor: T | (string & {})` — Overrides the button background color with a design token. Usually the `variant` prop is enough; use this prop only as a last resort.
|
|
971
|
-
- `size:
|
|
971
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
972
972
|
- `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
|
|
973
|
-
- `intent:
|
|
973
|
+
- `intent: "default" | "danger" | "success"` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
|
|
974
974
|
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element. An icon-only button (no children) needs `aria-label` or `aria-labelledby`: the icon name is not used as the accessible name.
|
|
975
975
|
- `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label
|
|
976
976
|
- `loading: boolean` = false — Whether to show a loading indicator and disable interaction
|
|
@@ -1004,7 +1004,7 @@ Useful for using the button styles with Link components (e.g. from React Router
|
|
|
1004
1004
|
- `separator: string` = " / " — Custom separator for the display value
|
|
1005
1005
|
- `allowClear: boolean` = false — Whether to show a clear button when a value is selected
|
|
1006
1006
|
- `aria-label: string` — Accessible label for the trigger when no visible label is provided
|
|
1007
|
-
- `width:
|
|
1007
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1008
1008
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1009
1009
|
- **Checkbox** — Multiple choice
|
|
1010
1010
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
@@ -1028,7 +1028,7 @@ of a checkbox group. Use with `description` when the options need explaining.
|
|
|
1028
1028
|
- `required: boolean` — Whether to show the required indicator
|
|
1029
1029
|
- `disabled: boolean` — Whether the whole group is disabled
|
|
1030
1030
|
- **ColorInput** — Input with color preview (aka Color Well, Color Field)
|
|
1031
|
-
- `intent:
|
|
1031
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1032
1032
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1033
1033
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1034
1034
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1041,7 +1041,7 @@ of a checkbox group. Use with `description` when the options need explaining.
|
|
|
1041
1041
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1042
1042
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1043
1043
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1044
|
-
- `width:
|
|
1044
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1045
1045
|
- `label: React.ReactNode` — Field label
|
|
1046
1046
|
- `error: string` — Error message
|
|
1047
1047
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1060,7 +1060,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1060
1060
|
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
1061
1061
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1062
1062
|
- **ColorPicker** — Color selection picker
|
|
1063
|
-
- `intent:
|
|
1063
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1064
1064
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1065
1065
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1066
1066
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1073,7 +1073,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1073
1073
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1074
1074
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1075
1075
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1076
|
-
- `width:
|
|
1076
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1077
1077
|
- `label: React.ReactNode` — Field label
|
|
1078
1078
|
- `error: string` — Error message
|
|
1079
1079
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1109,7 +1109,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1109
1109
|
- `labels: { noResults?: React.ReactNode; }` = {} — Labels for internationalization
|
|
1110
1110
|
- **CopyButton** — Copy to clipboard
|
|
1111
1111
|
- `value: string` (required) — Text copied to the clipboard
|
|
1112
|
-
- `size:
|
|
1112
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
1113
1113
|
- `className: string` — Additional class names
|
|
1114
1114
|
- `aria-label: string` — Accessible label for the button
|
|
1115
1115
|
- `aria-labelledby: string` — ID of the element that labels the button. Takes precedence over `aria-label`.
|
|
@@ -1120,7 +1120,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1120
1120
|
- `children: React.ReactNode` — Trigger content when `asChild` is true
|
|
1121
1121
|
- **CounterTextarea** — Textarea with character count display
|
|
1122
1122
|
- `asChild: boolean` — If true, the textarea element will be rendered as its child, merging its props onto that child.
|
|
1123
|
-
- `intent:
|
|
1123
|
+
- `intent: "default" | "danger"` — Semantic intent of the field (e.g. error state)
|
|
1124
1124
|
- `variant: "outline" | "ghost"` — Visual style variant of the field
|
|
1125
1125
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1126
1126
|
- `fieldSizing: "fixed" | "content"` — Sizing behavior: "fixed" keeps the height, "content" grows with the text
|
|
@@ -1128,7 +1128,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1128
1128
|
- `error: string` — Error message
|
|
1129
1129
|
- `required: boolean` — Whether to show the required indicator
|
|
1130
1130
|
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
1131
|
-
- `width:
|
|
1131
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1132
1132
|
- `showCount: boolean` = true — Whether to show the character count.
|
|
1133
1133
|
@default true
|
|
1134
1134
|
- `counterPosition: "bottom" | "overlay"` = "bottom" — Position of the counter.
|
|
@@ -1136,9 +1136,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1136
1136
|
"overlay" shows it inside the textarea (bottom-right).
|
|
1137
1137
|
@default "bottom"
|
|
1138
1138
|
- **CreditCardInput** — Payment card input with brand detection
|
|
1139
|
-
- `onBrandChange: (brand:
|
|
1139
|
+
- `onBrandChange: (brand: ("visa" | "mastercard" | "amex" | "discover" | "jcb" | "diners" | "generic")) => void` — Callback when the card brand is detected.
|
|
1140
1140
|
- `asChild: boolean` = false — Whether to render as a child component.
|
|
1141
|
-
- `intent:
|
|
1141
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1142
1142
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1143
1143
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1144
1144
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1150,7 +1150,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1150
1150
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1151
1151
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1152
1152
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1153
|
-
- `width:
|
|
1153
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1154
1154
|
- `label: React.ReactNode` — Field label
|
|
1155
1155
|
- `error: string` — Error message
|
|
1156
1156
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1168,7 +1168,7 @@ Use it when the field already does the same thing from the keyboard.
|
|
|
1168
1168
|
so the unit does not have to be repeated in the label.
|
|
1169
1169
|
- `styles: { root?: string; inner?: string; icon?: string; icons?: string; iconItem?: string; iconButton?: string; }` — Custom styles for internal parts
|
|
1170
1170
|
- **DatePicker** — Date selection
|
|
1171
|
-
- `intent:
|
|
1171
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1172
1172
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1173
1173
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1174
1174
|
- `value: Date | null` — Selected date value (`null` = cleared; omit/`undefined` = uncontrolled)
|
|
@@ -1185,7 +1185,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1185
1185
|
- `required: boolean` — Whether to show the required indicator
|
|
1186
1186
|
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
1187
1187
|
- `labels: { placeholder?: string; }` — Labels for manual translation
|
|
1188
|
-
- `width:
|
|
1188
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1189
1189
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1190
1190
|
- **DateRangePicker** — Date range selection
|
|
1191
1191
|
- `startProps: React.ComponentProps<typeof DatePicker>` — Props passed to the start-date DatePicker
|
|
@@ -1263,7 +1263,7 @@ it undefined to let the field track its own selection.
|
|
|
1263
1263
|
- `className: string` — Additional class names
|
|
1264
1264
|
- `iconName: React.ComponentProps<typeof Icon>["name"]` — Icon name shown on the button
|
|
1265
1265
|
- `iconPosition: "left" | "right"` — Position of the icon relative to the button label
|
|
1266
|
-
- `size:
|
|
1266
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
1267
1267
|
- `error: string` — Error message
|
|
1268
1268
|
- `required: boolean` — Whether to show the required indicator
|
|
1269
1269
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
@@ -1279,9 +1279,9 @@ it undefined to let the field track its own selection.
|
|
|
1279
1279
|
`primary` は variant 未指定とまったく同じ規則に落ちる重複、
|
|
1280
1280
|
`default` は**既定の見た目ではなく枠線のある outline** で名前が逆、
|
|
1281
1281
|
SCSS には誰も付けない `.default_intent` が「temporary name」のまま残っていた。
|
|
1282
|
-
- `intent:
|
|
1282
|
+
- `intent: "default" | "danger" | "success"` = "default" — Intent of the button (semantic meaning)
|
|
1283
1283
|
- `shape: "circle" | "square"` = "circle" — Shape of the button
|
|
1284
|
-
- `size:
|
|
1284
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
1285
1285
|
- `label: React.ReactNode` — Label text for extended FAB
|
|
1286
1286
|
- `shrink: boolean` = false — Whether to shrink the extended FAB (hide label)
|
|
1287
1287
|
- `position: "bottom-right" | "bottom-left" | "bottom-center" | "top-right" | "top-left" | "inline"` = "bottom-right" — Position of the button
|
|
@@ -1297,9 +1297,9 @@ text to take a name from, and the icon name is not used as one.
|
|
|
1297
1297
|
- `iconName: React.ComponentProps<typeof Icon>["name"]` (required) — Icon name to display
|
|
1298
1298
|
- `aria-label: string` (required) — Accessible label for the icon-only button
|
|
1299
1299
|
- `backgroundColor: T | (string & {})` — Overrides the button background color with a design token. Usually the `variant` prop is enough; use this prop only as a last resort.
|
|
1300
|
-
- `size:
|
|
1300
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
1301
1301
|
- `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
|
|
1302
|
-
- `intent:
|
|
1302
|
+
- `intent: "default" | "danger" | "success"` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
|
|
1303
1303
|
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element. An icon-only button (no children) needs `aria-label` or `aria-labelledby`: the icon name is not used as the accessible name.
|
|
1304
1304
|
- `loading: boolean` = false — Whether to show a loading indicator and disable interaction
|
|
1305
1305
|
- `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
|
|
@@ -1342,7 +1342,7 @@ the server must send matching CORS headers or the image will not load at all.
|
|
|
1342
1342
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1343
1343
|
- `label: React.ReactNode` — Accessible label for the text and edit button
|
|
1344
1344
|
- **Input** — Single-line input fields for text, numbers, or emails
|
|
1345
|
-
- `intent:
|
|
1345
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1346
1346
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1347
1347
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1348
1348
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1355,7 +1355,7 @@ the server must send matching CORS headers or the image will not load at all.
|
|
|
1355
1355
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1356
1356
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1357
1357
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1358
|
-
- `width:
|
|
1358
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1359
1359
|
- `label: React.ReactNode` — Field label
|
|
1360
1360
|
- `error: string` — Error message
|
|
1361
1361
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1375,10 +1375,10 @@ so the unit does not have to be repeated in the label.
|
|
|
1375
1375
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1376
1376
|
- **InputBase** — Standardizes the visual container, icon slots (Prefix/Suffix), and clear button behavior for text-based inputs.
|
|
1377
1377
|
- `children: React.ReactNode` (required) — Inner form control element(s) wrapped by the shell
|
|
1378
|
-
- `intent:
|
|
1378
|
+
- `intent: ("default" | "danger") | ("primary" | "success" | "warning" | "danger" | "info" | "neutral" | "default")` = "default" — Semantic intent of the field (e.g. error state)
|
|
1379
1379
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1380
1380
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1381
|
-
- `width:
|
|
1381
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1382
1382
|
- `className: string` — Additional class names
|
|
1383
1383
|
- `disabled: boolean` — Whether the field is disabled
|
|
1384
1384
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1402,7 +1402,7 @@ make room rather than running underneath it.
|
|
|
1402
1402
|
- **InputMask** — Formatted inputs
|
|
1403
1403
|
- `mask: string` (required) — Mask pattern ('9': digit, 'a': letter, '*': alphanumeric; other characters are shown as-is)
|
|
1404
1404
|
- `maskChar: string` = "_" — Placeholder character for unfilled mask positions
|
|
1405
|
-
- `intent:
|
|
1405
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1406
1406
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1407
1407
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1408
1408
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1415,7 +1415,7 @@ make room rather than running underneath it.
|
|
|
1415
1415
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1416
1416
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1417
1417
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1418
|
-
- `width:
|
|
1418
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1419
1419
|
- `label: React.ReactNode` — Field label
|
|
1420
1420
|
- `error: string` — Error message
|
|
1421
1421
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1435,9 +1435,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1435
1435
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1436
1436
|
- **LinkButton** — Anchor styled as button
|
|
1437
1437
|
- `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label
|
|
1438
|
-
- `size:
|
|
1438
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the button
|
|
1439
1439
|
- `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
|
|
1440
|
-
- `intent:
|
|
1440
|
+
- `intent: "default" | "danger" | "success"` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
|
|
1441
1441
|
- `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
|
|
1442
1442
|
- `fullWidth: boolean` = false — Whether the button should take up the full width of its container
|
|
1443
1443
|
- **Mentions** — @ / # suggestions
|
|
@@ -1462,7 +1462,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1462
1462
|
- `aria-label: string` — Accessible label for the trigger when no visible label is provided
|
|
1463
1463
|
- `aria-labelledby: string` — ID of the element that labels the field
|
|
1464
1464
|
- `aria-describedby: string` — ID of the element that describes the field
|
|
1465
|
-
- `width:
|
|
1465
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1466
1466
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1467
1467
|
- **NumberInput** — Input with step adjustments (aka Spin Button, Numeric Stepper)
|
|
1468
1468
|
- `mode: "number" | "text"` = "number" — 'number': uses the native type="number" (e.g. quantity steppers)
|
|
@@ -1485,7 +1485,7 @@ box and receives a **1-based** position — the first box is `1`, not `0`.
|
|
|
1485
1485
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1486
1486
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1487
1487
|
- **PasswordInput** — Password with toggle
|
|
1488
|
-
- `intent:
|
|
1488
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1489
1489
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1490
1490
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1491
1491
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1495,7 +1495,7 @@ box and receives a **1-based** position — the first box is `1`, not `0`.
|
|
|
1495
1495
|
- `allowClear: boolean` = false — Whether to show a clear button when value is present
|
|
1496
1496
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1497
1497
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1498
|
-
- `width:
|
|
1498
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1499
1499
|
- `label: React.ReactNode` — Field label
|
|
1500
1500
|
- `error: string` — Error message
|
|
1501
1501
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1518,7 +1518,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1518
1518
|
- `score: 0 | 1 | 2 | 3 | 4` — Strength score (the default calculation is used when omitted)
|
|
1519
1519
|
0: very weak, 1: weak, 2: fair, 3: strong, 4: very strong
|
|
1520
1520
|
- `showLabel: boolean` = true — Whether to show the strength label
|
|
1521
|
-
- `calculateLevel: (password: string) =>
|
|
1521
|
+
- `calculateLevel: (password: string) => (0 | 1 | 2 | 3 | 4)` = (password: string): PasswordStrengthLevel => {
|
|
1522
1522
|
if (!password) return 0;
|
|
1523
1523
|
let score = 0;
|
|
1524
1524
|
if (password.length >= 8) score++;
|
|
@@ -1602,7 +1602,7 @@ of a radio group. Use with `description` when the options need explaining.
|
|
|
1602
1602
|
- `allowHalf: boolean` = false — Whether to allow half stars
|
|
1603
1603
|
- `disabled: boolean` = false — Whether the rating is disabled
|
|
1604
1604
|
- `readOnly: boolean` = false — Read-only flag (display only; unlike disabled it is not grayed out)
|
|
1605
|
-
- `size:
|
|
1605
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the stars
|
|
1606
1606
|
- `onChange: (value: number) => void` — Callback when the value changes
|
|
1607
1607
|
- `className: string` — Additional class names
|
|
1608
1608
|
- `label: React.ReactNode` — Accessible label
|
|
@@ -1621,10 +1621,10 @@ allows, whichever format is used.
|
|
|
1621
1621
|
editor is created; changing it later does not convert the content.
|
|
1622
1622
|
- `placeholder: string` — Placeholder shown when the editor is empty
|
|
1623
1623
|
- `disabled: boolean` — Whether the editor is disabled
|
|
1624
|
-
- `intent:
|
|
1624
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1625
1625
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1626
1626
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1627
|
-
- `width:
|
|
1627
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1628
1628
|
- `minHeight: number | string` = 200 — Minimum height of the editing area
|
|
1629
1629
|
- `label: React.ReactNode` — Field label
|
|
1630
1630
|
- `error: string` — Error message
|
|
@@ -1632,7 +1632,7 @@ editor is created; changing it later does not convert the content.
|
|
|
1632
1632
|
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
1633
1633
|
- `className: string` — Additional class names
|
|
1634
1634
|
- `id: string` — Unique ID for the component
|
|
1635
|
-
- `toolbar:
|
|
1635
|
+
- `toolbar: ("bold" | "italic" | "underline" | "strikethrough" | "h1" | "h2" | "h3" | "ul" | "ol" | "link" | "unlink" | "image" | "removeFormat" | "separator")[]` = [
|
|
1636
1636
|
"bold",
|
|
1637
1637
|
"italic",
|
|
1638
1638
|
"underline",
|
|
@@ -1656,7 +1656,7 @@ editor is created; changing it later does not convert the content.
|
|
|
1656
1656
|
- `onImageUpload: (file: File) => Promise<string>` — Uploads an image file and resolves to its URL (http, https or relative). When given, the image dialog offers a file picker
|
|
1657
1657
|
and image files pasted or dropped into the editor are uploaded and inserted. The editor stores only the URL it gets back.
|
|
1658
1658
|
- **SearchInput** — Search with clear button (aka Search Field, Search Bar)
|
|
1659
|
-
- `intent:
|
|
1659
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1660
1660
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1661
1661
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1662
1662
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
@@ -1669,7 +1669,7 @@ and image files pasted or dropped into the editor are uploaded and inserted. The
|
|
|
1669
1669
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1670
1670
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1671
1671
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1672
|
-
- `width:
|
|
1672
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1673
1673
|
- `label: React.ReactNode` — Field label
|
|
1674
1674
|
- `error: string` — Error message
|
|
1675
1675
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1691,7 +1691,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1691
1691
|
- `options: Option[]` (required) — List of segment options
|
|
1692
1692
|
- `value: string` (required) — Selected value
|
|
1693
1693
|
- `onChange: (value: string) => void` (required) — Callback when the selected value changes
|
|
1694
|
-
- `size:
|
|
1694
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the control
|
|
1695
1695
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1696
1696
|
- `className: string` — Additional class names
|
|
1697
1697
|
- `label: string` — Accessible label
|
|
@@ -1721,12 +1721,12 @@ so the unit does not have to be repeated in the label.
|
|
|
1721
1721
|
- `allowClear: boolean` = false — Whether to show a clear button when a value is selected
|
|
1722
1722
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1723
1723
|
- `id: string` — Unique ID for the component
|
|
1724
|
-
- `intent:
|
|
1724
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1725
1725
|
- `error: string` — Error message
|
|
1726
1726
|
- `required: boolean` — Whether to show the required indicator
|
|
1727
1727
|
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
1728
1728
|
- `noOptionsFoundLabel: string` — Label shown when no options match the search
|
|
1729
|
-
- `width:
|
|
1729
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1730
1730
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1731
1731
|
- `styles: { root?: string; trigger?: string; value?: string; dropdown?: string; list?: string; option?: string; search?: string; searchInput?: string; groupLabel?: string; separator?: string; empty?: string; inputBase?: React.ComponentProps<typeof InputBase>["styles"]; }` — Custom styles for internal parts
|
|
1732
1732
|
- **SignaturePad** — Handwritten signature input
|
|
@@ -1764,10 +1764,10 @@ so the unit does not have to be repeated in the label.
|
|
|
1764
1764
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1765
1765
|
- `styles: { root?: string; labelWrapper?: string; label?: string; content?: string; error?: string; }` — Custom styles for internal parts
|
|
1766
1766
|
- **SmartSearchInput** — Smart search input enabling both traditional search and AI prompting.
|
|
1767
|
-
- `intent:
|
|
1767
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1768
1768
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1769
1769
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1770
|
-
- `width:
|
|
1770
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1771
1771
|
- `label: React.ReactNode` — Field label
|
|
1772
1772
|
- `error: string` — Error message
|
|
1773
1773
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1785,14 +1785,14 @@ so the unit does not have to be repeated in the label.
|
|
|
1785
1785
|
- `actions: SplitButtonAction[]` (required) — Secondary actions listed behind the toggle.
|
|
1786
1786
|
- `variant: "solid" | "outline" | "ghost"` = "solid" — Visual style, applied to both halves so they read as one control.
|
|
1787
1787
|
- `intent: "default" | "danger" | "success"` = "default" — Intent (semantic color), applied to both halves.
|
|
1788
|
-
- `size:
|
|
1788
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of both halves.
|
|
1789
1789
|
- `disabled: boolean` = false — Disable the whole control.
|
|
1790
1790
|
- `loading: boolean` = false — Show a loading state on the main action.
|
|
1791
1791
|
- `toggleLabel: string` (required) — Accessible name for the toggle half. The main half is named by its own text,
|
|
1792
1792
|
but the toggle only shows a chevron, so it needs one of its own.
|
|
1793
1793
|
- **Switch** — A binary switch for instantly toggling settings between on and off states (aka Toggle, Toggle Switch)
|
|
1794
1794
|
- `asChild: boolean` = false — If true, the component will be rendered as its child, merging its props onto that child.
|
|
1795
|
-
- `size:
|
|
1795
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the switch
|
|
1796
1796
|
- `className: string` — Additional class names
|
|
1797
1797
|
- `children: React.ReactNode` — Label content rendered next to the switch
|
|
1798
1798
|
- `error: boolean` = false — Whether to display as an error state (aria-invalid is applied)
|
|
@@ -1814,10 +1814,10 @@ but the toggle only shows a chevron, so it needs one of its own.
|
|
|
1814
1814
|
- `onChange: (tags: string[]) => void` — Callback when the tags change
|
|
1815
1815
|
- `placeholder: string` — Placeholder for the input
|
|
1816
1816
|
- `disabled: boolean` = false — Whether the input is disabled
|
|
1817
|
-
- `intent:
|
|
1817
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1818
1818
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1819
1819
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1820
|
-
- `width:
|
|
1820
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1821
1821
|
- `label: React.ReactNode` — Field label
|
|
1822
1822
|
- `error: string` — Error message
|
|
1823
1823
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1826,7 +1826,7 @@ but the toggle only shows a chevron, so it needs one of its own.
|
|
|
1826
1826
|
- `maxTags: number` — Maximum number of tags that can be entered
|
|
1827
1827
|
- **Textarea** — Multi-line input fields for longer text entries like descriptions or comments
|
|
1828
1828
|
- `asChild: boolean` = false — If true, the textarea element will be rendered as its child, merging its props onto that child.
|
|
1829
|
-
- `intent:
|
|
1829
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1830
1830
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1831
1831
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1832
1832
|
- `fieldSizing: "fixed" | "content"` = "fixed" — Sizing behavior: "fixed" keeps the height, "content" grows with the text
|
|
@@ -1834,21 +1834,21 @@ but the toggle only shows a chevron, so it needs one of its own.
|
|
|
1834
1834
|
- `error: string` — Error message
|
|
1835
1835
|
- `required: boolean` — Whether to show the required indicator
|
|
1836
1836
|
- `layout: "vertical" | "horizontal"` — Layout direction of label and field
|
|
1837
|
-
- `width:
|
|
1837
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1838
1838
|
- **ThemeToggle** — Light / dark / system theme switcher
|
|
1839
1839
|
- `value: "light" | "dark" | "system"` — Selected mode (controlled)
|
|
1840
1840
|
- `defaultValue: "light" | "dark" | "system"` = "system" — Initially selected mode (uncontrolled)
|
|
1841
|
-
- `onChange: (mode:
|
|
1842
|
-
- `modes:
|
|
1841
|
+
- `onChange: (mode: ("light" | "dark" | "system")) => void` — Callback when the mode changes
|
|
1842
|
+
- `modes: ("light" | "dark" | "system")[]` = ["light", "dark"] — Modes to offer, in cycle order
|
|
1843
1843
|
- `variant: "icon" | "segmented"` = "icon" — "icon" cycles modes on a single button; "segmented" shows one button per mode
|
|
1844
|
-
- `size:
|
|
1844
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the control
|
|
1845
1845
|
- `storageKey: string | null` = "wim-theme" — localStorage key used to persist the choice; pass null to disable persistence
|
|
1846
1846
|
- `applyToDocument: boolean` = true — Whether to apply the selected mode to the document root as `data-theme`
|
|
1847
1847
|
- `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
|
|
1848
1848
|
- `className: string` — Additional class names
|
|
1849
1849
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1850
1850
|
- **TimePicker** — Time selection
|
|
1851
|
-
- `intent:
|
|
1851
|
+
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1852
1852
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1853
1853
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1854
1854
|
- `allowClear: boolean` = true — Whether to show a clear button when value is present
|
|
@@ -1860,7 +1860,7 @@ but the toggle only shows a chevron, so it needs one of its own.
|
|
|
1860
1860
|
- `showPasswordToggle: boolean` = true — Whether to show the visibility toggle when type is "password"
|
|
1861
1861
|
- `rightIconClassName: string` — Additional class name for the right icon
|
|
1862
1862
|
- `rightIconRotated: boolean` — Whether to rotate the right icon 180 degrees (e.g. for an open state)
|
|
1863
|
-
- `width:
|
|
1863
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1864
1864
|
- `label: React.ReactNode` — Field label
|
|
1865
1865
|
- `error: string` — Error message
|
|
1866
1866
|
- `required: boolean` — Whether to show the required indicator
|
|
@@ -1884,7 +1884,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1884
1884
|
- `defaultValue: string | string[]` — Initially selected value(s) (uncontrolled)
|
|
1885
1885
|
- `onChange: (value: string | string[]) => void` — Callback when the selection changes
|
|
1886
1886
|
- `selectionMode: "single" | "multiple"` = "single" — Whether one or multiple options can be selected
|
|
1887
|
-
- `size:
|
|
1887
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the toggle buttons
|
|
1888
1888
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1889
1889
|
- `className: string` — Additional class names
|
|
1890
1890
|
- `disabled: boolean` = false — Whether the group is disabled
|
|
@@ -1938,7 +1938,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1938
1938
|
- `aria-label: string` — Accessible label for the trigger when no visible label is provided
|
|
1939
1939
|
- `aria-labelledby: string` — ID of the element that labels the field
|
|
1940
1940
|
- `aria-describedby: string` — ID of the element that describes the field
|
|
1941
|
-
- `width:
|
|
1941
|
+
- `width: ("xs" | "sm" | "md" | "lg" | "xl") | string | number` — Fixed width of the field (width token, CSS value, or number in px)
|
|
1942
1942
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1943
1943
|
|
|
1944
1944
|
### feedback — `import { … } from "wimui/feedback"`
|
|
@@ -1955,7 +1955,7 @@ section of the page.
|
|
|
1955
1955
|
|
|
1956
1956
|
@default "div"
|
|
1957
1957
|
- `description: React.ReactNode` — Description text of the alert
|
|
1958
|
-
- `intent:
|
|
1958
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the alert
|
|
1959
1959
|
@default "default"
|
|
1960
1960
|
- `icon: React.ReactNode` — Custom icon. When omitted, a default icon matching the intent is displayed.
|
|
1961
1961
|
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
|
|
@@ -1968,7 +1968,7 @@ section of the page.
|
|
|
1968
1968
|
- **Banner** — Top prominent messages
|
|
1969
1969
|
- `title: React.ReactNode` — Title of the banner
|
|
1970
1970
|
- `description: React.ReactNode` — Description text of the banner
|
|
1971
|
-
- `intent:
|
|
1971
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the banner
|
|
1972
1972
|
@default "default"
|
|
1973
1973
|
- `icon: boolean | React.ReactNode` = true — Whether to show the icon, or a custom icon element
|
|
1974
1974
|
@default true
|
|
@@ -1987,7 +1987,7 @@ When a function is passed, it is called as (error, errorInfo, reset) => ReactNod
|
|
|
1987
1987
|
- `children: React.ReactNode` — Element the indicator dot is attached to. If omitted, only the dot is rendered.
|
|
1988
1988
|
- `color: T | (string & {})` = "primary" — Color of the dot. Accepts a design token color name or any CSS color value.
|
|
1989
1989
|
@default "primary"
|
|
1990
|
-
- `size:
|
|
1990
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the dot.
|
|
1991
1991
|
@default "md"
|
|
1992
1992
|
- `position: "top-right" | "top-left" | "bottom-right" | "bottom-left"` = "top-right" — Corner of the children the dot is placed at.
|
|
1993
1993
|
@default "top-right"
|
|
@@ -2000,7 +2000,7 @@ When a function is passed, it is called as (error, errorInfo, reset) => ReactNod
|
|
|
2000
2000
|
- **Loader** — Animated indicators to show that data is loading or processing
|
|
2001
2001
|
- `variant: "bars" | "dots" | "pulse"` = "bars" — Animation style of the loader.
|
|
2002
2002
|
@default "bars"
|
|
2003
|
-
- `size:
|
|
2003
|
+
- `size: "sm" | "md" | "lg" | "xl"` = "md" — Size of the loader.
|
|
2004
2004
|
@default "md"
|
|
2005
2005
|
- `color: "currentColor" | WimColor` = "primary" — Color of the loader. Accepts a design token color name or "currentColor".
|
|
2006
2006
|
@default "primary"
|
|
@@ -2039,7 +2039,7 @@ origin while the card it was meant to cover was 1248x75.
|
|
|
2039
2039
|
- `title: ReactNode` (required) — The title of notification
|
|
2040
2040
|
- `description: ReactNode` — The description of notification
|
|
2041
2041
|
- `icon: ReactNode` — The icon of notification
|
|
2042
|
-
- `intent:
|
|
2042
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — The intent of notification
|
|
2043
2043
|
@default "default"
|
|
2044
2044
|
- `onClose: (id?: string) => void` — Callback when notification is closed
|
|
2045
2045
|
- `closable: boolean` = true — Whether to show close button
|
|
@@ -2052,9 +2052,9 @@ origin while the card it was meant to cover was 1248x75.
|
|
|
2052
2052
|
@default 0
|
|
2053
2053
|
- `max: number` = 100 — Maximum value of the progress bar.
|
|
2054
2054
|
@default 100
|
|
2055
|
-
- `intent:
|
|
2055
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` = "primary" — Intent (semantic color) of the bar.
|
|
2056
2056
|
@default "primary"
|
|
2057
|
-
- `size:
|
|
2057
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the bar.
|
|
2058
2058
|
@default "md"
|
|
2059
2059
|
- `label: string` — Text label displayed above the bar. Also used as the accessible name unless
|
|
2060
2060
|
`aria-label` / `aria-labelledby` is given.
|
|
@@ -2071,9 +2071,9 @@ type therefore requires one of `label` / `aria-label` / `aria-labelledby`.
|
|
|
2071
2071
|
@default 0
|
|
2072
2072
|
- `max: number` = 100 — Maximum value of the progress ring.
|
|
2073
2073
|
@default 100
|
|
2074
|
-
- `intent:
|
|
2074
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` = "primary" — Intent (semantic color) of the ring.
|
|
2075
2075
|
@default "primary"
|
|
2076
|
-
- `size:
|
|
2076
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the ring.
|
|
2077
2077
|
@default "md"
|
|
2078
2078
|
- `label: string` — Text label displayed below the ring. Also used as the accessible name unless
|
|
2079
2079
|
`aria-label` / `aria-labelledby` is given.
|
|
@@ -2086,7 +2086,7 @@ type therefore requires one of `label` / `aria-label` / `aria-labelledby`.
|
|
|
2086
2086
|
- `indeterminate: boolean` = false — If true, shows an indeterminate animation instead of a value.
|
|
2087
2087
|
@default false
|
|
2088
2088
|
- **Result** — Task status indicator
|
|
2089
|
-
- `intent:
|
|
2089
|
+
- `intent: "default" | "success" | "danger" | "info" | "warning"` = "default" — Semantic intent — determines the icon and color. `default` draws no icon unless `icon` is passed.
|
|
2090
2090
|
@default "default"
|
|
2091
2091
|
- `status: "404" | "403" | "500"` — HTTP error status — adds a status-specific CSS class and shows a neutral icon.
|
|
2092
2092
|
Use for error pages (404, 403, 500).
|
|
@@ -2104,7 +2104,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2104
2104
|
- `className: string` — Custom class name
|
|
2105
2105
|
- `children: ReactNode` — The children
|
|
2106
2106
|
- **ScrollProgress** — Reading progress indicator
|
|
2107
|
-
- `intent:
|
|
2107
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` = "primary" — 意味の軸。兄弟の `Progress` / `ProgressRing` と同じ語彙にそろえてある。
|
|
2108
2108
|
|
|
2109
2109
|
以前は `color` という名前で、値も独自(`secondary` を含む)だった。
|
|
2110
2110
|
塗っているものは `Progress.intent` と構造まで同一だったので、prop 名だけが
|
|
@@ -2127,7 +2127,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2127
2127
|
- `message: string` (required) — Message displayed in the snackbar
|
|
2128
2128
|
- `open: boolean` = false — Whether the snackbar is shown
|
|
2129
2129
|
@default false
|
|
2130
|
-
- `intent:
|
|
2130
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state)
|
|
2131
2131
|
@default "default"
|
|
2132
2132
|
- `position: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"` = "bottom-center" — Position on the screen
|
|
2133
2133
|
@default "bottom-center"
|
|
@@ -2140,7 +2140,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2140
2140
|
- `onClose: () => void` — Called when the snackbar is closed
|
|
2141
2141
|
- `className: string` — Additional CSS class name
|
|
2142
2142
|
- **Spinner** — A rotating icon indicating background activity or data fetching (aka Activity Indicator)
|
|
2143
|
-
- `size:
|
|
2143
|
+
- `size: "sm" | "md" | "lg" | "xl"` = "md" — Size of the spinner.
|
|
2144
2144
|
@default "md"
|
|
2145
2145
|
- `color: "currentColor" | WimColor` = "primary" — Color of the spinner. Accepts a design token color name or "currentColor".
|
|
2146
2146
|
@default "primary"
|
|
@@ -2151,7 +2151,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2151
2151
|
- `id: string` — Identifier of the toast, passed to onClose. Used by ToastProvider to manage a stack.
|
|
2152
2152
|
- `title: string` — Title of the toast.
|
|
2153
2153
|
- `description: string` — Description text displayed below the title.
|
|
2154
|
-
- `intent:
|
|
2154
|
+
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the toast.
|
|
2155
2155
|
@default "default"
|
|
2156
2156
|
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. Set 0 to disable auto-close.
|
|
2157
2157
|
@default 3000
|
|
@@ -2200,7 +2200,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2200
2200
|
- **Breadcrumb** — Location trace (aka Path Bar, Path Control)
|
|
2201
2201
|
- `items: BreadcrumbItem[]` (required) — Items to display, from the root to the current page.
|
|
2202
2202
|
- `separator: React.ReactNode` — Separator displayed between items. Defaults to a chevron icon.
|
|
2203
|
-
- `size:
|
|
2203
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the breadcrumb.
|
|
2204
2204
|
@default "md"
|
|
2205
2205
|
- `overflow: "wrap" | "collapse"` = "wrap" — What happens when the items do not fit on one line. `"wrap"` moves them onto more lines;
|
|
2206
2206
|
`"collapse"` keeps the first item and the current page and folds the levels in between
|
|
@@ -2224,7 +2224,7 @@ into a "…" button that lists them.
|
|
|
2224
2224
|
- `onOpenChange: (open: boolean) => void` — Called with the next open state: the opposite of `open` when the button is pressed, and
|
|
2225
2225
|
false when Escape is pressed while the menu is open. Escape also moves focus back to the
|
|
2226
2226
|
button. Without this callback the button cannot close on Escape, because `open` is controlled.
|
|
2227
|
-
- `size:
|
|
2227
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the hamburger menu
|
|
2228
2228
|
- `color: string` — Color of the bars
|
|
2229
2229
|
- `visibleBelow: "xs" | "sm" | "md" | "lg" | "xl"` — Show only below the given breakpoint (e.g. "md" matches Sidebar's mobile drawer range)
|
|
2230
2230
|
- `className: string` — Custom class name
|
|
@@ -2240,13 +2240,13 @@ button. Without this callback the button cannot close on Escape, because `open`
|
|
|
2240
2240
|
(既定 `div`)と同じ形。
|
|
2241
2241
|
- `separator: string` = "+" — Separator displayed between keys
|
|
2242
2242
|
@default "+"
|
|
2243
|
-
- `size:
|
|
2243
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the list
|
|
2244
2244
|
@default "md"
|
|
2245
2245
|
- **Link** — Hyperlinks
|
|
2246
2246
|
- `asChild: boolean` = false — If true, the link will be rendered as its child, merging its props onto that child.
|
|
2247
2247
|
Useful for using the link styles with Link components from React Router or Next.js.
|
|
2248
2248
|
- `label: React.ReactNode` — Link text or element. Alternative to children.
|
|
2249
|
-
- `size:
|
|
2249
|
+
- `size: "sm" | "md" | "lg"` = "md" — Font size of the link.
|
|
2250
2250
|
@default "md"
|
|
2251
2251
|
- `priority: "primary" | "secondary" | "tertiary"` = "primary" — Visual emphasis of the link.
|
|
2252
2252
|
@default "primary"
|
|
@@ -2328,7 +2328,7 @@ scans stay green while the bar hangs outside its parent.
|
|
|
2328
2328
|
- **TabNavigation** — Tab-based navigation
|
|
2329
2329
|
- `variant: "underline" | "pill" | "contained"` = "underline" — Visual style of the tabs
|
|
2330
2330
|
- `align: "start" | "center" | "end" | "justify"` = "start" — Alignment of the tabs
|
|
2331
|
-
- `size:
|
|
2331
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the tabs
|
|
2332
2332
|
- **Tabs** — A container to organize related content into switchable view panels
|
|
2333
2333
|
- `asChild: boolean` = false — If true, the tabs root will be rendered as its child, merging its props onto that child.
|
|
2334
2334
|
- `defaultValue: string` — Value of the tab selected initially, for uncontrolled usage.
|
|
@@ -2354,13 +2354,13 @@ scans stay green while the bar hangs outside its parent.
|
|
|
2354
2354
|
- `alt: string` = "" — Alternative text for the image
|
|
2355
2355
|
- `initials: string` — Initials shown as a fallback when no image is available
|
|
2356
2356
|
- `icon: React.ReactNode` — Icon shown as a fallback when no image or initials are available
|
|
2357
|
-
- `size:
|
|
2357
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the avatar
|
|
2358
2358
|
- `shape: "circle" | "rounded"` = "circle" — Shape of the avatar
|
|
2359
|
-
- `intent:
|
|
2359
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` — Intent (semantic color) applied to the avatar
|
|
2360
2360
|
- **AvatarGroup** — Stacked avatars (aka Face Pile)
|
|
2361
2361
|
- `children: React.ReactNode` (required) — Avatar elements to group
|
|
2362
2362
|
- `max: number` — Maximum number of avatars to show before collapsing into a count. Ignored with `overflow="collapse"`.
|
|
2363
|
-
- `size:
|
|
2363
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size applied to the avatars
|
|
2364
2364
|
- `total: number` — Total number of avatars (used to compute the overflow count). Ignored with `overflow="collapse"`.
|
|
2365
2365
|
- `overflow: "count" | "collapse"` = "count" — How the avatars that do not fit are handled. `"count"` cuts them by `max` / `total` and shows
|
|
2366
2366
|
"+N" as text; `"collapse"` shows as many as fit the width and turns "+N" into a button that
|
|
@@ -2372,9 +2372,9 @@ lists the hidden people by name.
|
|
|
2372
2372
|
- `children: React.ReactNode` — Content to display
|
|
2373
2373
|
- `content: React.ReactNode` — Content to display (alternative to children)
|
|
2374
2374
|
- `icon: React.ReactNode` — Icon
|
|
2375
|
-
- `intent:
|
|
2375
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` — Intent (semantic state)
|
|
2376
2376
|
- `variant: "solid" | "outline" | "subtle"` — Visual style variant
|
|
2377
|
-
- `size:
|
|
2377
|
+
- `size: "sm" | "md" | "lg"` — Size
|
|
2378
2378
|
- `interactive: boolean` = false — Whether to enable the interactive state
|
|
2379
2379
|
- **Barcode** — Draws a scannable Code 128 or EAN-13 barcode.
|
|
2380
2380
|
- `value: string` (required) — Value to encode. For `ean13`, 12 digits (the check digit is calculated) or
|
|
@@ -2462,9 +2462,9 @@ Cannot be combined with `onDelete` (T99).
|
|
|
2462
2462
|
- `icon: React.ReactNode` — Icon
|
|
2463
2463
|
- `selected: boolean` = false — Whether the chip is selected
|
|
2464
2464
|
- `disabled: boolean` = false — Whether the chip is disabled
|
|
2465
|
-
- `intent:
|
|
2465
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` = "neutral" — Intent (semantic state)
|
|
2466
2466
|
- `variant: "solid" | "outline" | "subtle"` = "solid" — Visual style variant
|
|
2467
|
-
- `size:
|
|
2467
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size
|
|
2468
2468
|
- `deleteAriaLabel: string` — Accessible label for the delete button
|
|
2469
2469
|
- `className: string` — Additional class names
|
|
2470
2470
|
- **Comment** — Shows one comment in a discussion, with its actions and nested replies.
|
|
@@ -2499,7 +2499,7 @@ that instant (useful for snapshots and tests).
|
|
|
2499
2499
|
- `variant: "digital" | "units"` = "digital" — "digital" renders a compact colon-separated clock (04:12:33);
|
|
2500
2500
|
"units" renders one labeled segment per unit (days / hours / min / sec).
|
|
2501
2501
|
@default "digital"
|
|
2502
|
-
- `size:
|
|
2502
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the numbers and labels.
|
|
2503
2503
|
@default "md"
|
|
2504
2504
|
- `locale: string` — BCP 47 locale override for unit labels (e.g. "en", "ja", "pt-BR").
|
|
2505
2505
|
@default current i18next language
|
|
@@ -2546,7 +2546,7 @@ drops secondary text below the AA contrast floor.
|
|
|
2546
2546
|
- `children: React.ReactNode` (required) — DescriptionListItem elements
|
|
2547
2547
|
- `className: string` — Additional class names
|
|
2548
2548
|
- `layout: "horizontal" | "vertical" | "compact"` = "horizontal" — Layout of terms and descriptions
|
|
2549
|
-
- `size:
|
|
2549
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the text
|
|
2550
2550
|
- `border: boolean` = false — Whether to show borders (alias of bordered)
|
|
2551
2551
|
- `bordered: boolean` = false — Whether to show borders
|
|
2552
2552
|
- **EmptyState** — Missing data placeholder (aka Blank Slate, Zero State)
|
|
@@ -2593,16 +2593,17 @@ in; use `"center"` only when the empty state is the only thing in its region.
|
|
|
2593
2593
|
- `columns: KanbanColumnData[]` — Kanban column data (for prop-driven usage).
|
|
2594
2594
|
- `onMove: (itemId: string, fromColumnId: string, toColumnId: string) => void` — Callback when a card is moved.
|
|
2595
2595
|
- `onCardMove: (itemId: string, fromColumnId: string, toColumnId: string) => void` — Callback when a card is moved (legacy / alternative name).
|
|
2596
|
-
- `forceMobileUI: boolean` = false — Whether to force the touch-device UI.
|
|
2596
|
+
- `forceMobileUI: boolean` = false — Whether to force the touch-device UI (the move button as a full-width bar under each card).
|
|
2597
|
+
Without it, pointer devices show the move button in the card's corner on hover or focus.
|
|
2597
2598
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
2598
2599
|
- **Leaderboard** — Display a ranked list of entries with scores. Medal colors for the top three are opt-in.
|
|
2599
2600
|
- `entries: LeaderboardEntry[]` (required) — List of ranking entries
|
|
2600
2601
|
- `unit: string` — Label for the score unit
|
|
2601
|
-
- `size:
|
|
2602
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size
|
|
2602
2603
|
- `showMedals: boolean` = false — Whether to paint the rank badges of the top three in gold, silver and bronze (off by default: the number and the order already say the rank)
|
|
2603
2604
|
- **List** — Structurally organized items in bullet points or numbered formats
|
|
2604
2605
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
2605
|
-
- `size:
|
|
2606
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the list items
|
|
2606
2607
|
- `spacing: "tight" | "normal" | "loose"` = "normal" — Spacing between items
|
|
2607
2608
|
- `bordered: boolean` = false — Whether to show borders between items
|
|
2608
2609
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
@@ -2678,7 +2679,7 @@ with empty spacer rows. Use it for tables with hundreds of rows, together with
|
|
|
2678
2679
|
- `showLabel: boolean` = false — Whether the label is shown next to the dot. The label is always exposed to
|
|
2679
2680
|
assistive technology; this only controls whether it is also visible.
|
|
2680
2681
|
@default false
|
|
2681
|
-
- `size:
|
|
2682
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the dot.
|
|
2682
2683
|
@default "md"
|
|
2683
2684
|
- `position: "top-right" | "top-left" | "bottom-right" | "bottom-left"` = "bottom-right" — Corner the dot is placed at. Only applies when `children` is given.
|
|
2684
2685
|
@default "bottom-right"
|
|
@@ -2718,7 +2719,7 @@ renders inline, next to whatever follows it.
|
|
|
2718
2719
|
- `onReact: (emoji: string, active: boolean) => void` — Callback when a reaction is added or removed
|
|
2719
2720
|
- `showAddButton: boolean` = false — Whether to show the add button
|
|
2720
2721
|
- `onAdd: () => void` — Callback when the add button is clicked
|
|
2721
|
-
- `size:
|
|
2722
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size
|
|
2722
2723
|
- `disabled: boolean` = false — Whether the component is disabled
|
|
2723
2724
|
- **RelativeTime** — Display a timestamp as a localized relative phrase ("3 minutes ago", "yesterday") that updates automatically as time passes.
|
|
2724
2725
|
- `date: Date | string | number` (required) — The date to display, as a Date object, ISO 8601 string, or epoch milliseconds.
|
|
@@ -2817,9 +2818,9 @@ Cannot be combined with `onDelete` — the delete control is a second element, a
|
|
|
2817
2818
|
`asChild` requires a single React element child (T99).
|
|
2818
2819
|
- `children: React.ReactNode` — Content to display
|
|
2819
2820
|
- `content: React.ReactNode` — Content to display (alternative to children)
|
|
2820
|
-
- `intent:
|
|
2821
|
+
- `intent: "primary" | "success" | "warning" | "danger" | "info" | "neutral"` — Intent (semantic state)
|
|
2821
2822
|
- `variant: "solid" | "outline" | "subtle"` — Visual style variant
|
|
2822
|
-
- `size:
|
|
2823
|
+
- `size: "sm" | "md" | "lg"` — Size
|
|
2823
2824
|
- `icon: React.ReactNode` — Icon
|
|
2824
2825
|
- `onDelete: (e: React.MouseEvent<HTMLButtonElement>) => void` — Delete event. When provided, a × button is shown. Incompatible with `asChild`.
|
|
2825
2826
|
- `disabled: boolean` — Whether the tag is disabled
|
|
@@ -2957,7 +2958,7 @@ dismissed by an outside click or Escape.
|
|
|
2957
2958
|
- `onCancel: () => void` — Callback when the user clicks the cancel button
|
|
2958
2959
|
- `okText: ReactNode` = "OK" — Text of the confirm button
|
|
2959
2960
|
- `cancelText: ReactNode` = "Cancel" — Text of the cancel button
|
|
2960
|
-
- `okType:
|
|
2961
|
+
- `okType: "default" | "danger" | "success"` = "default" — Color role of the confirm button
|
|
2961
2962
|
- `children: ReactNode` (required) — The target element which the Popconfirm will be attached to
|
|
2962
2963
|
- `icon: ReactNode` — Customize the icon
|
|
2963
2964
|
- `disabled: boolean` = false — Whether to show the popconfirm
|
|
@@ -2967,7 +2968,7 @@ dismissed by an outside click or Escape.
|
|
|
2967
2968
|
- `defaultOpen: boolean` = false — If true, the popover component will manage its own open state.
|
|
2968
2969
|
- `open: boolean` — If provided, controls the open state.
|
|
2969
2970
|
- `onOpenChange: (open: boolean) => void` — Callback when open state changes.
|
|
2970
|
-
- `placement:
|
|
2971
|
+
- `placement: "bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start"` = "bottom-start" — Preferred placement of the popover.
|
|
2971
2972
|
- `variant: "default" | "glass"` = "default" — The variant of the popover content.
|
|
2972
2973
|
- **Portal** — Out-of-hierarchy render
|
|
2973
2974
|
- `children: React.ReactNode` (required) — The content to be rendered in the portal
|
|
@@ -2978,14 +2979,14 @@ dismissed by an outside click or Escape.
|
|
|
2978
2979
|
- `delay: number` = 200 — Delay before showing the tooltip in ms.
|
|
2979
2980
|
- `open: boolean` — If provided, controls the open state.
|
|
2980
2981
|
- `onOpenChange: (open: boolean) => void` — Callback when open state changes.
|
|
2981
|
-
- `placement:
|
|
2982
|
+
- `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.
|
|
2982
2983
|
- `variant: "default" | "glass"` = "default" — The variant of the tooltip content.
|
|
2983
2984
|
|
|
2984
2985
|
### typography — `import { … } from "wimui/typography"`
|
|
2985
2986
|
|
|
2986
2987
|
- **Blockquote** — Visually separates external quotes or text to be emphasized.
|
|
2987
2988
|
- `asChild: boolean` = false — If true, the blockquote will be rendered as its child, merging its props onto that child.
|
|
2988
|
-
- `size:
|
|
2989
|
+
- `size: "sm" | "md" | "lg"` = "md" — Font size of the quote.
|
|
2989
2990
|
@default "md"
|
|
2990
2991
|
- `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
|
|
2991
2992
|
- `content: React.ReactNode` — Quoted content. Alternative to children.
|
|
@@ -3008,7 +3009,7 @@ dismissed by an outside click or Escape.
|
|
|
3008
3009
|
- `asChild: boolean` = false — If true, the component will be rendered as its child.
|
|
3009
3010
|
- **Kbd** — Keyboard shortcuts
|
|
3010
3011
|
- `asChild: boolean` = false — If true, the Kbd will be rendered as its child, merging its props onto that child.
|
|
3011
|
-
- `size:
|
|
3012
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the key cap.
|
|
3012
3013
|
@default "md"
|
|
3013
3014
|
- `children: React.ReactNode` — Key label(s) to display.
|
|
3014
3015
|
- **Label** — Descriptive text for input fields, including required/optional marks
|
|
@@ -3039,10 +3040,10 @@ Defaults to the localized `form.optional` string.
|
|
|
3039
3040
|
- `asChild: boolean` = false — If true, the Legend will be rendered as its child, merging its props onto that child.
|
|
3040
3041
|
- **Span** — Lightweight wrapper for inline text or short labels with icon support
|
|
3041
3042
|
- `asChild: boolean` = false — If true, the span will be rendered as its child, merging its props onto that child.
|
|
3042
|
-
- `size:
|
|
3043
|
+
- `size: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Font size of the text.
|
|
3043
3044
|
@default "md"
|
|
3044
3045
|
- `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
|
|
3045
|
-
- `weight:
|
|
3046
|
+
- `weight: "bold" | "medium" | "normal" | "semibold"` = "normal" — Font weight.
|
|
3046
3047
|
@default "normal"
|
|
3047
3048
|
- `fontStyle: "normal" | "italic"` = "normal" — Font style.
|
|
3048
3049
|
@default "normal"
|
|
@@ -3065,10 +3066,10 @@ Defaults to the localized `form.optional` string.
|
|
|
3065
3066
|
@default t("spoiler.show_less")
|
|
3066
3067
|
- **Text** — Has appropriate line-height and spacing to ensure readability of long text.
|
|
3067
3068
|
- `asChild: boolean` = false — If true, the text will be rendered as its child, merging its props onto that child.
|
|
3068
|
-
- `size:
|
|
3069
|
+
- `size: "xs" | "sm" | "md" | "lg" | "xl"` = "md" — Font size of the text.
|
|
3069
3070
|
@default "md"
|
|
3070
3071
|
- `color: T | (string & {})` — Text color. Accepts a design token color name or any CSS color value.
|
|
3071
|
-
- `weight:
|
|
3072
|
+
- `weight: "bold" | "medium" | "normal" | "semibold"` = "normal" — Font weight.
|
|
3072
3073
|
@default "normal"
|
|
3073
3074
|
- `lineHeight: T | (string & {})` — Line height. Accepts a design token name or any CSS line-height value.
|
|
3074
3075
|
- `fontStyle: "normal" | "italic"` = "normal" — Font style.
|
|
@@ -3164,7 +3165,7 @@ Ignored when `truncate` is set (one line wins; they cannot both apply).
|
|
|
3164
3165
|
- `backdropFilter: ImageFilterOptions` — Filter applied to the background (effective with transparent images)
|
|
3165
3166
|
- `hoverBackdropFilter: ImageFilterOptions` — Filter applied to the background on hover
|
|
3166
3167
|
- `transition: "none" | "fast" | "normal" | "slow"` = "normal" — Animation speed when switching filters
|
|
3167
|
-
- `noise:
|
|
3168
|
+
- `noise: ("xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl") | "none"` — Intensity of the film-grain (noise) effect
|
|
3168
3169
|
- `duotone: ImageDuotoneOptions` — Duotone settings
|
|
3169
3170
|
- `overlay: ImageOverlayOptions` — Overlay settings
|
|
3170
3171
|
- `zoom: boolean | number` = false — Zoom factor on hover (e.g. 1.1) or true (defaults to 1.05)
|
|
@@ -3471,13 +3472,13 @@ enough on its own.
|
|
|
3471
3472
|
- **AgentStatus** — Real-time agent state indicator (thinking / running / waiting)
|
|
3472
3473
|
- `status: "idle" | "thinking" | "running" | "waiting" | "done" | "error"` (required) — Current state of the agent
|
|
3473
3474
|
- `message: string` — Optional description of what the agent is doing; falls back to the localized status label
|
|
3474
|
-
- `size:
|
|
3475
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size variant
|
|
3475
3476
|
- `showLabel: boolean` = true — Whether to show the text label next to the indicator
|
|
3476
3477
|
- `className: string` — Additional CSS class
|
|
3477
3478
|
- **AIResponseFeedback** — Thumbs-up/down feedback controls and regenerate button for AI responses.
|
|
3478
|
-
- `feedback:
|
|
3479
|
-
- `defaultFeedback:
|
|
3480
|
-
- `onFeedback: (value:
|
|
3479
|
+
- `feedback: ("positive" | "negative") | null` — Currently selected feedback value (controlled)
|
|
3480
|
+
- `defaultFeedback: ("positive" | "negative") | null` = null — Default feedback value (uncontrolled)
|
|
3481
|
+
- `onFeedback: (value: ("positive" | "negative") | null) => void` — Called when user clicks a feedback button. Passes null when deselected.
|
|
3481
3482
|
- `showRegenerate: boolean` = false — Whether to show the regenerate button
|
|
3482
3483
|
- `onRegenerate: () => void` — Called when the regenerate button is clicked
|
|
3483
3484
|
- `disabled: boolean` = false — Whether all buttons are disabled
|
|
@@ -3533,7 +3534,7 @@ written in the markdown. Default `"2xl"` keeps the historical mapping
|
|
|
3533
3534
|
- `value: string` — Selected model id (controlled)
|
|
3534
3535
|
- `defaultValue: string` — Initially selected model id (uncontrolled)
|
|
3535
3536
|
- `onChange: (id: string, model: ModelOption) => void` — Callback when the selected model changes
|
|
3536
|
-
- `size:
|
|
3537
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the trigger
|
|
3537
3538
|
- `disabled: boolean` = false — Whether the selector is disabled
|
|
3538
3539
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
3539
3540
|
- `showPricing: boolean` = true — Whether to show pricing metadata in the dropdown
|
|
@@ -3604,7 +3605,7 @@ page: under an `h1` use `2`, under an `h3` use `4`. Has no effect when
|
|
|
3604
3605
|
- **UsageMeter** — 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. (aka Level Indicator, Capacity Indicator, Meter)
|
|
3605
3606
|
- `used: number` (required) — Number of tokens used so far
|
|
3606
3607
|
- `max: number` — Maximum available tokens (e.g. the context window). Omit for a counter-only display.
|
|
3607
|
-
- `size:
|
|
3608
|
+
- `size: "sm" | "md" | "lg"` = "md" — Size of the meter
|
|
3608
3609
|
- `showBar: boolean` = true — Whether to render the progress bar (requires `max`)
|
|
3609
3610
|
- `showPercentage: boolean` = false — Whether to show the percentage instead of the raw count in the readout
|
|
3610
3611
|
- `warnThreshold: number` = 0.75 — Fraction (0–1) at which the meter turns to the warning color
|
|
@@ -3632,6 +3633,96 @@ sentiment color and the rest in a neutral color. Has effect only with `data`.
|
|
|
3632
3633
|
- `ariaLabel: string` — Accessible label describing the audio; when omitted the visualizer is
|
|
3633
3634
|
hidden from assistive tech
|
|
3634
3635
|
|
|
3636
|
+
## Hooks
|
|
3637
|
+
|
|
3638
|
+
Exported hooks. Prefer them over hand-rolled equivalents (`matchMedia` listeners, textarea height math, sort state).
|
|
3639
|
+
|
|
3640
|
+
- **useAnnounce** — `import { useAnnounce } from "wimui"` — Announce the result of an action to screen readers — "Saved", "3 results", "Moved to Done".
|
|
3641
|
+
- Signature: `({ role, initialMessage, }?: { role?: AnnounceRole | undefined; initialMessage?: string | undefined; }): { announce: (text: string, { delay }?: AnnounceOptions) => void; clear: () => void; region: Element; }`
|
|
3642
|
+
|
|
3643
|
+
```tsx
|
|
3644
|
+
const { announce, region } = useAnnounce();
|
|
3645
|
+
const save = async () => { await saveDraft(); announce("Draft saved"); };
|
|
3646
|
+
return <>{region}<Button onClick={save}>Save</Button></>;
|
|
3647
|
+
```
|
|
3648
|
+
|
|
3649
|
+
- **useAutoResize** — `import { useAutoResize } from "wimui"` — Grow a `<textarea>` with its content, up to `maxRows` rows; past that it scrolls. `Textarea` and `PromptInput` already do this — use the hook only for a textarea you render yourself.
|
|
3650
|
+
- Signature: `(value: string | undefined, maxRows?: number): RefObject<HTMLTextAreaElement | null>`
|
|
3651
|
+
|
|
3652
|
+
```tsx
|
|
3653
|
+
const [value, setValue] = useState("");
|
|
3654
|
+
const ref = useAutoResize(value, 6);
|
|
3655
|
+
return <textarea ref={ref} value={value} onChange={(e) => setValue(e.target.value)} />;
|
|
3656
|
+
```
|
|
3657
|
+
|
|
3658
|
+
- **useBreakpoint** — `import { useBreakpoint } from "wimui"` — Resolve the current active breakpoint — the largest whose min-width the viewport satisfies. Returns the smallest breakpoint below the first threshold. SSR-safe (defaults to the smallest until mounted).
|
|
3659
|
+
- Signature: `(): Breakpoint`
|
|
3660
|
+
|
|
3661
|
+
```tsx
|
|
3662
|
+
const bp = useBreakpoint(); // "xs" | "sm" | "md" | "lg" | "xl"
|
|
3663
|
+
```
|
|
3664
|
+
|
|
3665
|
+
- **useBreakpointDown** — `import { useBreakpointDown } from "wimui"` — Track whether the viewport is below a named breakpoint (max-width), mirroring the SCSS `down()` mixin — the JS equivalent of HamburgerMenu's `visibleBelow`. SSR-safe.
|
|
3666
|
+
- Signature: `(breakpoint: Breakpoint): boolean`
|
|
3667
|
+
|
|
3668
|
+
```tsx
|
|
3669
|
+
const isMobile = useBreakpointDown("md");
|
|
3670
|
+
```
|
|
3671
|
+
|
|
3672
|
+
- **useBreakpointUp** — `import { useBreakpointUp } from "wimui"` — Track whether the viewport is at or above a named breakpoint (min-width), mirroring the SCSS `up()` mixin. SSR-safe.
|
|
3673
|
+
- Signature: `(breakpoint: Breakpoint): boolean`
|
|
3674
|
+
|
|
3675
|
+
```tsx
|
|
3676
|
+
const isDesktop = useBreakpointUp("lg");
|
|
3677
|
+
```
|
|
3678
|
+
|
|
3679
|
+
- **useMediaQuery** — `import { useMediaQuery } from "wimui"` — Subscribe to a CSS media query and track whether it currently matches.
|
|
3680
|
+
- Signature: `(query: string, defaultState?: boolean): boolean`
|
|
3681
|
+
|
|
3682
|
+
```tsx
|
|
3683
|
+
const isWide = useMediaQuery("(min-width: 768px)");
|
|
3684
|
+
```
|
|
3685
|
+
|
|
3686
|
+
- **useNotification** — `import { useNotification } from "wimui/feedback"` — Show a notification card in a corner of the screen from anywhere under `NotificationProvider`. Notifications stack, carry a title and a body, and suit events that happened elsewhere (a finished export, a new comment) rather than the result of the user's last action.
|
|
3687
|
+
- Signature: `(): NotificationContextType`
|
|
3688
|
+
|
|
3689
|
+
```tsx
|
|
3690
|
+
const { show } = useNotification();
|
|
3691
|
+
show({ title: "Export finished", description: "report.csv is ready." });
|
|
3692
|
+
```
|
|
3693
|
+
|
|
3694
|
+
- **useSnackbar** — `import { useSnackbar } from "wimui/feedback"` — Show a single message bar at the edge of the screen from anywhere under `SnackbarProvider`. One message at a time: showing a new one replaces the current one. Use it when the message may carry one action (for example "Undo").
|
|
3695
|
+
- Signature: `(): SnackbarContextType`
|
|
3696
|
+
|
|
3697
|
+
```tsx
|
|
3698
|
+
const { showMessage } = useSnackbar();
|
|
3699
|
+
showMessage("Message archived");
|
|
3700
|
+
```
|
|
3701
|
+
|
|
3702
|
+
- **useTableSort** — `import { useTableSort } from "wimui/data-display"` — Sort rows on the client for `Table`: clicking the same column cycles ascending → descending → unsorted. For server-side sorting, keep the state yourself and pass `onSortChange`.
|
|
3703
|
+
- Signature: `<T extends Record<string, unknown>>(data: T[], options?: UseTableSortOptions<T>): UseTableSortReturn<T>`
|
|
3704
|
+
|
|
3705
|
+
```tsx
|
|
3706
|
+
const { sortedData, handleSort, getSortDirection } = useTableSort(rows);
|
|
3707
|
+
// <Table.Head sortable sortDirection={getSortDirection("name")} onSort={() => handleSort("name")}>
|
|
3708
|
+
```
|
|
3709
|
+
|
|
3710
|
+
- **useToast** — `import { useToast } from "wimui/feedback"` — Show a short, self-dismissing message (a toast) from anywhere under `ToastProvider`. Use it for a one-off confirmation of something the user just did; for state that stays true (a limit, an outage), render an inline `Alert` instead.
|
|
3711
|
+
- Signature: `(): ToastContextType`
|
|
3712
|
+
|
|
3713
|
+
```tsx
|
|
3714
|
+
const { show } = useToast();
|
|
3715
|
+
show({ title: "Saved", intent: "success" });
|
|
3716
|
+
```
|
|
3717
|
+
|
|
3718
|
+
- **useWim** — `import { useWim } from "wimui"` — Read the nearest `WimProvider` values, or fall back to document / i18n globals when used outside a provider.
|
|
3719
|
+
- Signature: `(): WimContextValue`
|
|
3720
|
+
|
|
3721
|
+
```tsx
|
|
3722
|
+
const { theme, locale } = useWim();
|
|
3723
|
+
```
|
|
3724
|
+
|
|
3725
|
+
|
|
3635
3726
|
## Not in scope — deliberately not provided
|
|
3636
3727
|
|
|
3637
3728
|
These exist in other systems' vocabularies and are **decisions, not gaps**. Do not hand-roll them into a wimui screen; the alternative given is the supported way to express the same intent.
|