wimui 0.56.1 → 0.57.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/ai/ThoughtProcess/ThoughtProcess.cjs +1 -1
- package/dist/components/ai/ThoughtProcess/ThoughtProcess.d.ts +10 -1
- package/dist/components/ai/ThoughtProcess/ThoughtProcess.js +12 -12
- package/dist/components/feedback/LoadingOverlay/LoadingOverlay.cjs +1 -1
- package/dist/components/feedback/LoadingOverlay/LoadingOverlay.js +0 -1
- package/dist/components/feedback/Toast/Toast.cjs +1 -1
- package/dist/components/feedback/Toast/Toast.js +1 -1
- package/dist/components/feedback/Toast/toast.module.cjs +1 -1
- package/dist/components/feedback/Toast/toast.module.js +8 -8
- package/dist/components/form/Cascader/Cascader.cjs +1 -1
- package/dist/components/form/Cascader/Cascader.d.ts +1 -1
- package/dist/components/form/Cascader/Cascader.js +54 -54
- package/dist/components/form/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.d.ts +7 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.js +9 -8
- package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
- package/dist/components/form/InlineEdit/InlineEdit.js +33 -29
- package/dist/components/form/Mentions/Mentions.cjs +1 -1
- package/dist/components/form/Mentions/Mentions.js +62 -60
- package/dist/components/form/OtpInput/OtpInput.cjs +1 -1
- package/dist/components/form/OtpInput/OtpInput.js +36 -35
- package/dist/components/form/PhoneInput/PhoneInput.cjs +1 -1
- package/dist/components/form/PhoneInput/PhoneInput.d.ts +6 -0
- package/dist/components/form/PhoneInput/PhoneInput.js +59 -57
- package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
- package/dist/components/form/RangeSlider/RangeSlider.d.ts +1 -1
- package/dist/components/form/RangeSlider/RangeSlider.js +66 -64
- package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.d.ts +6 -0
- package/dist/components/form/SegmentedControl/SegmentedControl.js +18 -17
- package/dist/components/form/Slider/Slider.cjs +1 -1
- package/dist/components/form/Slider/Slider.js +44 -44
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.d.ts +7 -1
- package/dist/components/form/Transfer/Transfer.js +50 -49
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.d.ts +6 -1
- package/dist/components/layout/Dashboard/Dashboard.js +2 -2
- package/dist/llms-full.txt +21 -2
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +2 -2
- package/package.json +1 -1
|
@@ -3,12 +3,12 @@ import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react
|
|
|
3
3
|
import { FieldTemplate as n } from "../FieldTemplate/FieldTemplate.js";
|
|
4
4
|
import { useSliderCommon as r } from "../../../utilities/slider-utils.js";
|
|
5
5
|
import i from "./slider.module.js";
|
|
6
|
-
import { forwardRef as a, useCallback as o, useEffect as s, useId as c, useRef as l, useState as
|
|
7
|
-
import
|
|
8
|
-
import { jsx as
|
|
6
|
+
import { forwardRef as a, useCallback as o, useEffect as s, useId as c, useRef as l, useState as u } from "react";
|
|
7
|
+
import d from "classnames";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/form/Slider/Slider.tsx
|
|
10
|
-
var
|
|
11
|
-
let N = a !== void 0, [P, F] =
|
|
10
|
+
var m = a(({ value: a, defaultValue: m = 0, min: h = 0, max: g = 100, step: _ = 1, disabled: v = !1, onChange: y, onAfterChange: b, className: x, name: S, label: C, error: w, required: T, layout: E = "vertical", id: D, "aria-label": ee, "aria-labelledby": te, "aria-describedby": ne, asChild: O = !1, styles: k, children: A, ...j }, M) => {
|
|
11
|
+
let N = a !== void 0, [P, F] = u(m), I = N ? a : P, L = l(null), R = l(null), z = l(null), B = l(null), V = l(!1), H = l(I), U = c(), W = D || U, G = `wim-slider-label-${W}`, K = `wim-slider-error-${W}`, { calculateValue: q } = r(h, g, _), J = o((e) => (e - h) / (g - h) * 100, [h, g]), Y = o((e) => {
|
|
12
12
|
let t = J(e);
|
|
13
13
|
z.current && (z.current.style.width = `${t}%`), R.current && (R.current.style.left = `${t}%`, R.current.setAttribute("aria-valuenow", String(e))), B.current && (B.current.value = String(e));
|
|
14
14
|
}, [J]);
|
|
@@ -16,87 +16,87 @@ var f = a(({ value: a, defaultValue: f = 0, min: p = 0, max: m = 100, step: h =
|
|
|
16
16
|
V.current || Y(I);
|
|
17
17
|
}, [I, Y]);
|
|
18
18
|
let X = (e) => {
|
|
19
|
-
if (
|
|
19
|
+
if (v) return;
|
|
20
20
|
V.current = !0;
|
|
21
21
|
let t = "touches" in e ? e.touches[0].clientX : e.clientX, n = q(t, L.current);
|
|
22
|
-
H.current = n, Y(n),
|
|
22
|
+
H.current = n, Y(n), y?.(n), e.preventDefault();
|
|
23
23
|
}, Z = o((e) => {
|
|
24
|
-
if (!V.current ||
|
|
24
|
+
if (!V.current || v) return;
|
|
25
25
|
let t = "touches" in e ? e.touches[0].clientX : e.clientX, n = q(t, L.current);
|
|
26
|
-
H.current = n, Y(n),
|
|
26
|
+
H.current = n, Y(n), y?.(n);
|
|
27
27
|
}, [
|
|
28
|
-
|
|
28
|
+
v,
|
|
29
29
|
q,
|
|
30
|
-
|
|
30
|
+
y,
|
|
31
31
|
Y
|
|
32
32
|
]), Q = o(() => {
|
|
33
33
|
if (V.current) {
|
|
34
34
|
V.current = !1;
|
|
35
35
|
let e = H.current;
|
|
36
|
-
N || F(e),
|
|
36
|
+
N || F(e), b?.(e);
|
|
37
37
|
}
|
|
38
|
-
}, [N,
|
|
38
|
+
}, [N, b]);
|
|
39
39
|
s(() => (document.addEventListener("mousemove", Z), document.addEventListener("mouseup", Q), document.addEventListener("touchmove", Z, { passive: !1 }), document.addEventListener("touchend", Q), () => {
|
|
40
40
|
document.removeEventListener("mousemove", Z), document.removeEventListener("mouseup", Q), document.removeEventListener("touchmove", Z), document.removeEventListener("touchend", Q);
|
|
41
41
|
}), [Z, Q]);
|
|
42
|
-
let
|
|
43
|
-
if (
|
|
42
|
+
let re = (e) => {
|
|
43
|
+
if (v) return;
|
|
44
44
|
let t;
|
|
45
|
-
if (e.key === "ArrowLeft" || e.key === "ArrowDown") t = Math.max(
|
|
46
|
-
else if (e.key === "ArrowRight" || e.key === "ArrowUp") t = Math.min(
|
|
47
|
-
else if (e.key === "Home") t =
|
|
48
|
-
else if (e.key === "End") t =
|
|
45
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowDown") t = Math.max(h, I - _);
|
|
46
|
+
else if (e.key === "ArrowRight" || e.key === "ArrowUp") t = Math.min(g, I + _);
|
|
47
|
+
else if (e.key === "Home") t = h;
|
|
48
|
+
else if (e.key === "End") t = g;
|
|
49
49
|
else return;
|
|
50
|
-
N || F(t),
|
|
50
|
+
N || F(t), y?.(t), e.preventDefault();
|
|
51
51
|
}, $ = J(I);
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
label:
|
|
54
|
-
error:
|
|
55
|
-
required:
|
|
56
|
-
layout:
|
|
52
|
+
return /* @__PURE__ */ f(n, {
|
|
53
|
+
label: C,
|
|
54
|
+
error: w,
|
|
55
|
+
required: T,
|
|
56
|
+
layout: E,
|
|
57
57
|
labelId: G,
|
|
58
58
|
errorId: K,
|
|
59
|
-
className:
|
|
59
|
+
className: x,
|
|
60
60
|
styles: k,
|
|
61
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ p(O ? e : "div", {
|
|
62
62
|
role: "presentation",
|
|
63
|
-
className:
|
|
63
|
+
className: d("wim-slider", i.root, v && i.disabled, w && i.danger),
|
|
64
64
|
onMouseDown: X,
|
|
65
65
|
onTouchStart: X,
|
|
66
66
|
ref: M,
|
|
67
67
|
...j,
|
|
68
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ p(t, { children: [/* @__PURE__ */ p("div", {
|
|
69
69
|
className: i.trackContainer,
|
|
70
70
|
ref: L,
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ f("div", {
|
|
72
72
|
ref: z,
|
|
73
73
|
className: i.track,
|
|
74
74
|
style: { width: `${$}%` }
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ f("div", {
|
|
76
76
|
ref: R,
|
|
77
77
|
className: i.thumb,
|
|
78
78
|
style: { left: `${$}%` },
|
|
79
79
|
role: "slider",
|
|
80
|
-
"aria-valuemin":
|
|
81
|
-
"aria-valuemax":
|
|
80
|
+
"aria-valuemin": h,
|
|
81
|
+
"aria-valuemax": g,
|
|
82
82
|
"aria-valuenow": I,
|
|
83
|
-
"aria-disabled":
|
|
84
|
-
"aria-labelledby":
|
|
85
|
-
"aria-label":
|
|
86
|
-
"aria-describedby":
|
|
87
|
-
"aria-invalid":
|
|
88
|
-
tabIndex:
|
|
89
|
-
onKeyDown:
|
|
83
|
+
"aria-disabled": v,
|
|
84
|
+
"aria-labelledby": C ? G : te,
|
|
85
|
+
"aria-label": C ? void 0 : ee,
|
|
86
|
+
"aria-describedby": [ne, w ? K : void 0].filter(Boolean).join(" ") || void 0,
|
|
87
|
+
"aria-invalid": w ? !0 : void 0,
|
|
88
|
+
tabIndex: v ? -1 : 0,
|
|
89
|
+
onKeyDown: re
|
|
90
90
|
})]
|
|
91
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ f("input", {
|
|
92
92
|
ref: B,
|
|
93
93
|
type: "hidden",
|
|
94
|
-
name:
|
|
94
|
+
name: S,
|
|
95
95
|
value: I
|
|
96
96
|
})] }), O ? A : null]
|
|
97
97
|
})
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
|
-
|
|
100
|
+
m.displayName = "Slider";
|
|
101
101
|
//#endregion
|
|
102
|
-
export {
|
|
102
|
+
export { m as Slider, m as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),r=require("../Button/Button.cjs"),i=require("../../_internal/BaseListItem/BaseListItem.cjs"),a=require("../../../i18n/generated/form.cjs"),o=require("../FieldTemplate/FieldTemplate.cjs"),s=require("../Checkbox/Checkbox.cjs"),c=require("../../data-display/VirtualList/VirtualList.cjs"),l=require("./transfer.module.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p=36,m=50,h=({data:e,title:n,listType:r,id:o,disabled:h,selectedKeys:g,focusedKey:_,setFocusedKey:v,onSelect:y,onSelectAll:b,onKeyDown:x,labels:S={},className:C})=>{let{t:w}=t.useWimTranslation(a.formNs),{noData:T=w(`transfer.no_data`)}=S,E=(0,u.useRef)(null),D=(0,u.useRef)(null),[O,k]=(0,u.useState)(0);(0,u.useEffect)(()=>{let e=E.current;if(!e)return;let t=new ResizeObserver(([e])=>{k(Math.floor(e.contentRect.height))});return t.observe(e),()=>t.disconnect()},[]),(0,u.useEffect)(()=>{if(!_||!D.current||O===0)return;let t=e.findIndex(e=>e.key===_);if(t===-1)return;let n=D.current,r=t*p,i=r+p;r<n.scrollTop?n.scrollTop=r:i>n.scrollTop+O&&(n.scrollTop=i-O)},[_,e,O]);let A=e.filter(e=>!e.disabled).map(e=>e.key),j=g.filter(e=>A.includes(e)),M=A.length>0&&j.length===A.length,N=j.length>0&&j.length<A.length,P=_&&e.some(e=>e.key===_)?`${o}-${r}-option-${_}`:void 0,F=e.length>=m&&O>0,I=(t,n)=>(0,f.jsx)(i.BaseListItem,{id:`${o}-${r}-option-${t.key}`,className:(0,d.default)(l.default.item,_===t.key&&l.default.active),disabled:h||t.disabled,active:_===t.key,onClick:()=>{t.disabled||(v(t.key),y(t.key))},role:`option`,"aria-selected":g.includes(t.key),"aria-disabled":h||t.disabled,"aria-setsize":F?e.length:void 0,"aria-posinset":F?n+1:void 0,icon:(0,f.jsx)(`div`,{className:(0,d.default)(l.default.checkboxVisual,g.includes(t.key)&&l.default.checked,(h||t.disabled)&&l.default.disabled),"aria-hidden":`true`}),children:t.title},t.key),L=typeof n==`string`?n:``;return(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.list,C),children:[(0,f.jsxs)(`div`,{className:l.default.header,children:[(0,f.jsx)(s.Checkbox,{checked:M,indeterminate:N,onChange:()=>b(A,r),disabled:h||A.length===0,children:(0,f.jsx)(`span`,{className:l.default.headerTitle,title:L,children:n})}),(0,f.jsxs)(`span`,{className:l.default.headerCount,children:[j.length,`/`,e.length]})]}),(0,f.jsx)(`div`,{ref:E,className:l.default.body,role:e.length>0?`listbox`:`group`,"aria-multiselectable":e.length>0?`true`:void 0,"aria-label":L,"aria-activedescendant":e.length>0?P:void 0,"aria-disabled":h||void 0,tabIndex:e.length===0?-1:0,onKeyDown:t=>x(t,r,e),onFocus:()=>{if(!_){let t=e.find(e=>!e.disabled);t&&v(t.key)}},style:F?{overflow:`hidden`,padding:0}:void 0,children:e.length===0?(0,f.jsx)(`div`,{className:l.default.empty,"aria-live":`polite`,children:T}):F?(0,f.jsx)(c.VirtualList,{items:e,itemHeight:p,height:O,renderItem:I,itemRole:`none`,ref:D,role:`presentation`}):e.map((e,t)=>I(e,t))})]})},g=({dataSource:e=[],targetKeys:i,onChange:s,titles:c,className:p,style:m,disabled:g=!1,label:_,error:v,required:y,layout:b=`vertical`,labels:x={}})=>{let{t:
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),r=require("../Button/Button.cjs"),i=require("../../_internal/BaseListItem/BaseListItem.cjs"),a=require("../../../i18n/generated/form.cjs"),o=require("../FieldTemplate/FieldTemplate.cjs"),s=require("../Checkbox/Checkbox.cjs"),c=require("../../data-display/VirtualList/VirtualList.cjs"),l=require("./transfer.module.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p=36,m=50,h=({data:e,title:n,listType:r,id:o,disabled:h,selectedKeys:g,focusedKey:_,setFocusedKey:v,onSelect:y,onSelectAll:b,onKeyDown:x,labels:S={},className:C})=>{let{t:w}=t.useWimTranslation(a.formNs),{noData:T=w(`transfer.no_data`)}=S,E=(0,u.useRef)(null),D=(0,u.useRef)(null),[O,k]=(0,u.useState)(0);(0,u.useEffect)(()=>{let e=E.current;if(!e)return;let t=new ResizeObserver(([e])=>{k(Math.floor(e.contentRect.height))});return t.observe(e),()=>t.disconnect()},[]),(0,u.useEffect)(()=>{if(!_||!D.current||O===0)return;let t=e.findIndex(e=>e.key===_);if(t===-1)return;let n=D.current,r=t*p,i=r+p;r<n.scrollTop?n.scrollTop=r:i>n.scrollTop+O&&(n.scrollTop=i-O)},[_,e,O]);let A=e.filter(e=>!e.disabled).map(e=>e.key),j=g.filter(e=>A.includes(e)),M=A.length>0&&j.length===A.length,N=j.length>0&&j.length<A.length,P=_&&e.some(e=>e.key===_)?`${o}-${r}-option-${_}`:void 0,F=e.length>=m&&O>0,I=(t,n)=>(0,f.jsx)(i.BaseListItem,{id:`${o}-${r}-option-${t.key}`,className:(0,d.default)(l.default.item,_===t.key&&l.default.active),disabled:h||t.disabled,active:_===t.key,onClick:()=>{t.disabled||(v(t.key),y(t.key))},role:`option`,"aria-selected":g.includes(t.key),"aria-disabled":h||t.disabled,"aria-setsize":F?e.length:void 0,"aria-posinset":F?n+1:void 0,icon:(0,f.jsx)(`div`,{className:(0,d.default)(l.default.checkboxVisual,g.includes(t.key)&&l.default.checked,(h||t.disabled)&&l.default.disabled),"aria-hidden":`true`}),children:t.title},t.key),L=typeof n==`string`?n:``;return(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.list,C),children:[(0,f.jsxs)(`div`,{className:l.default.header,children:[(0,f.jsx)(s.Checkbox,{checked:M,indeterminate:N,onChange:()=>b(A,r),disabled:h||A.length===0,children:(0,f.jsx)(`span`,{className:l.default.headerTitle,title:L,children:n})}),(0,f.jsxs)(`span`,{className:l.default.headerCount,children:[j.length,`/`,e.length]})]}),(0,f.jsx)(`div`,{ref:E,className:l.default.body,role:e.length>0?`listbox`:`group`,"aria-multiselectable":e.length>0?`true`:void 0,"aria-label":L,"aria-activedescendant":e.length>0?P:void 0,"aria-disabled":h||void 0,tabIndex:e.length===0?-1:0,onKeyDown:t=>x(t,r,e),onFocus:()=>{if(!_){let t=e.find(e=>!e.disabled);t&&v(t.key)}},style:F?{overflow:`hidden`,padding:0}:void 0,children:e.length===0?(0,f.jsx)(`div`,{className:l.default.empty,"aria-live":`polite`,children:T}):F?(0,f.jsx)(c.VirtualList,{items:e,itemHeight:p,height:O,renderItem:I,itemRole:`none`,ref:D,role:`presentation`}):e.map((e,t)=>I(e,t))})]})},g=({dataSource:e=[],targetKeys:i,onChange:s,titles:c,className:p,style:m,disabled:g=!1,label:_,error:v,required:y,layout:b=`vertical`,labels:x={},"aria-label":S,"aria-labelledby":C,"aria-describedby":w})=>{let{t:T}=t.useWimTranslation(a.formNs),E=c??[T(`transfer.source`),T(`transfer.target`)],{moveToTarget:D=T(`transfer.move_to_target`),moveToSource:O=T(`transfer.move_to_source`),statusMovedToTarget:k=e=>T(`transfer.status_moved_to_target`,{count:e}),statusMovedToSource:A=e=>T(`transfer.status_moved_to_source`,{count:e})}=x,[j,M]=(0,u.useState)([]),[N,P]=(0,u.useState)(i||[]),F=`wim-transfer-${(0,u.useId)()}`,I=_?`${F}-label`:void 0,L=v?`${F}-error`:void 0,R=i!==void 0&&!!s,z=R?i:N,B=(0,u.useMemo)(()=>e.filter(e=>!z.includes(e.key)),[e,z]),V=(0,u.useMemo)(()=>e.filter(e=>z.includes(e.key)),[e,z]),[H,U]=(0,u.useState)(null),[W,G]=(0,u.useState)(null),[K,q]=(0,u.useState)(``),J=(0,u.useRef)(null);H&&!B.some(e=>e.key===H)&&U(null),W&&!V.some(e=>e.key===W)&&G(null);let Y=e=>{g||M(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},X=(e,t)=>{if(g)return;let n=e;n.every(e=>j.includes(e))?M(e=>e.filter(e=>!n.includes(e))):M(e=>[...new Set([...e,...n])])},Z=e=>{if(g)return;let t=e===`toRight`?B.map(e=>e.key):V.map(e=>e.key),n=j.filter(e=>t.includes(e));if(n.length===0)return;let r=e===`toRight`?[...z,...n]:z.filter(e=>!n.includes(e));R||P(r),s&&s(r,e,n),M(e=>e.filter(e=>!n.includes(e)));let i=e===`toRight`?k(n.length):A(n.length);J.current&&clearTimeout(J.current),q(``),J.current=setTimeout(()=>q(i),50)},Q=(e,t,n)=>{let r=e.filter(e=>!e.disabled);if(r.length===0)return null;if(t===null)return n===1?r[0].key:r[r.length-1].key;let i=r.findIndex(e=>e.key===t);return i===-1?r[0].key:r[(i+n+r.length)%r.length].key},$=(e,t,n)=>{if(g)return;let r=t===`source`?H:W,i=t===`source`?U:G;if(e.key===`ArrowDown`)e.preventDefault(),i(Q(n,r,1));else if(e.key===`ArrowUp`)e.preventDefault(),i(Q(n,r,-1));else if(e.key===`Home`){e.preventDefault();let t=n.find(e=>!e.disabled);t&&i(t.key)}else if(e.key===`End`){e.preventDefault();let t=[...n].reverse().find(e=>!e.disabled);t&&i(t.key)}else if(e.key===` `){e.preventDefault();let t=n.find(e=>e.key===r);t&&!t.disabled&&Y(t.key)}else e.key===`Enter`&&(e.preventDefault(),Z(t===`source`?`toRight`:`toLeft`))},ee=j.filter(e=>B.some(t=>t.key===e)).length===0,te=j.filter(e=>V.some(t=>t.key===e)).length===0;return(0,f.jsx)(o.FieldTemplate,{label:_,error:v,required:y,layout:b,labelId:I,errorId:L,className:p,children:(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.container,`wim-transfer`),children:[(0,f.jsx)(n.VisuallyHidden,{"aria-live":`polite`,"aria-atomic":`true`,children:K}),(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.root,g&&l.default.disabled),style:m,role:`group`,"aria-labelledby":_?I:C,"aria-label":_||C?void 0:S,"aria-describedby":[w,L].filter(Boolean).join(` `)||void 0,children:[(0,f.jsx)(h,{className:`wim-transfer__list`,data:B,title:E[0],listType:`source`,id:F,disabled:g,selectedKeys:j,focusedKey:H,setFocusedKey:U,onSelect:Y,onSelectAll:X,onKeyDown:$,labels:x}),(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.operation,`wim-transfer__operation`),children:[(0,f.jsx)(r.Button,{variant:`outline`,size:`sm`,className:l.default.button,onClick:()=>Z(`toRight`),disabled:g||ee,icon:`ChevronRightIcon`,"aria-label":D}),(0,f.jsx)(r.Button,{variant:`outline`,size:`sm`,className:l.default.button,onClick:()=>Z(`toLeft`),disabled:g||te,icon:`ChevronLeftIcon`,"aria-label":O})]}),(0,f.jsx)(h,{className:`wim-transfer__list`,data:V,title:E[1],listType:`target`,id:F,disabled:g,selectedKeys:j,focusedKey:W,setFocusedKey:G,onSelect:Y,onSelectAll:X,onKeyDown:$,labels:x})]})]})})};exports.Transfer=g;
|
|
@@ -37,8 +37,14 @@ export type TransferProps = {
|
|
|
37
37
|
layout?: "vertical" | "horizontal";
|
|
38
38
|
/** Labels for internationalization */
|
|
39
39
|
labels?: TransferLabels;
|
|
40
|
+
/** Accessible name for the group of the two lists when no visible `label` is provided. */
|
|
41
|
+
"aria-label"?: string;
|
|
42
|
+
/** ID of the element that labels the group of the two lists when no visible `label` is provided. */
|
|
43
|
+
"aria-labelledby"?: string;
|
|
44
|
+
/** ID of the element that describes the group. Announced together with the error message. */
|
|
45
|
+
"aria-describedby"?: string;
|
|
40
46
|
};
|
|
41
47
|
/**
|
|
42
48
|
* 2つのカラム間でアイテムを移動させて選択を行うためのコンポーネント。
|
|
43
49
|
*/
|
|
44
|
-
export declare const Transfer: ({ dataSource, targetKeys, onChange, titles: titlesProp, className, style, disabled, label, error, required, layout, labels, }: TransferProps) => React.JSX.Element;
|
|
50
|
+
export declare const Transfer: ({ dataSource, targetKeys, onChange, titles: titlesProp, className, style, disabled, label, error, required, layout, labels, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, }: TransferProps) => React.JSX.Element;
|
|
@@ -108,34 +108,34 @@ var _ = 36, v = 50, y = ({ data: t, title: n, listType: a, id: u, disabled: d, s
|
|
|
108
108
|
}) : t.map((e, t) => z(e, t))
|
|
109
109
|
})]
|
|
110
110
|
});
|
|
111
|
-
}, b = ({ dataSource: r = [], targetKeys: o, onChange: s, titles: l, className: _, style: v, disabled: b = !1, label: x, error: S, required: C, layout: w = "vertical", labels: T = {} }) => {
|
|
112
|
-
let { t:
|
|
113
|
-
|
|
114
|
-
let
|
|
115
|
-
b ||
|
|
116
|
-
},
|
|
111
|
+
}, b = ({ dataSource: r = [], targetKeys: o, onChange: s, titles: l, className: _, style: v, disabled: b = !1, label: x, error: S, required: C, layout: w = "vertical", labels: T = {}, "aria-label": E, "aria-labelledby": D, "aria-describedby": O }) => {
|
|
112
|
+
let { t: k } = e(i), A = l ?? [k("transfer.source"), k("transfer.target")], { moveToTarget: j = k("transfer.move_to_target"), moveToSource: M = k("transfer.move_to_source"), statusMovedToTarget: N = (e) => k("transfer.status_moved_to_target", { count: e }), statusMovedToSource: P = (e) => k("transfer.status_moved_to_source", { count: e }) } = T, [F, I] = p([]), [L, R] = p(o || []), z = `wim-transfer-${u()}`, B = x ? `${z}-label` : void 0, V = S ? `${z}-error` : void 0, H = o !== void 0 && !!s, U = H ? o : L, W = d(() => r.filter((e) => !U.includes(e.key)), [r, U]), G = d(() => r.filter((e) => U.includes(e.key)), [r, U]), [K, q] = p(null), [J, Y] = p(null), [ee, X] = p(""), Z = f(null);
|
|
113
|
+
K && !W.some((e) => e.key === K) && q(null), J && !G.some((e) => e.key === J) && Y(null);
|
|
114
|
+
let Q = (e) => {
|
|
115
|
+
b || I((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
116
|
+
}, te = (e, t) => {
|
|
117
117
|
if (b) return;
|
|
118
118
|
let n = e;
|
|
119
|
-
n.every((e) =>
|
|
120
|
-
},
|
|
119
|
+
n.every((e) => F.includes(e)) ? I((e) => e.filter((e) => !n.includes(e))) : I((e) => [.../* @__PURE__ */ new Set([...e, ...n])]);
|
|
120
|
+
}, $ = (e) => {
|
|
121
121
|
if (b) return;
|
|
122
|
-
let t = e === "toRight" ?
|
|
122
|
+
let t = e === "toRight" ? W.map((e) => e.key) : G.map((e) => e.key), n = F.filter((e) => t.includes(e));
|
|
123
123
|
if (n.length === 0) return;
|
|
124
|
-
let r = e === "toRight" ? [...
|
|
125
|
-
|
|
126
|
-
let i = e === "toRight" ?
|
|
127
|
-
|
|
128
|
-
},
|
|
124
|
+
let r = e === "toRight" ? [...U, ...n] : U.filter((e) => !n.includes(e));
|
|
125
|
+
H || R(r), s && s(r, e, n), I((e) => e.filter((e) => !n.includes(e)));
|
|
126
|
+
let i = e === "toRight" ? N(n.length) : P(n.length);
|
|
127
|
+
Z.current && clearTimeout(Z.current), X(""), Z.current = setTimeout(() => X(i), 50);
|
|
128
|
+
}, ne = (e, t, n) => {
|
|
129
129
|
let r = e.filter((e) => !e.disabled);
|
|
130
130
|
if (r.length === 0) return null;
|
|
131
131
|
if (t === null) return n === 1 ? r[0].key : r[r.length - 1].key;
|
|
132
132
|
let i = r.findIndex((e) => e.key === t);
|
|
133
133
|
return i === -1 ? r[0].key : r[(i + n + r.length) % r.length].key;
|
|
134
|
-
},
|
|
134
|
+
}, re = (e, t, n) => {
|
|
135
135
|
if (b) return;
|
|
136
|
-
let r = t === "source" ?
|
|
137
|
-
if (e.key === "ArrowDown") e.preventDefault(), i(
|
|
138
|
-
else if (e.key === "ArrowUp") e.preventDefault(), i(
|
|
136
|
+
let r = t === "source" ? K : J, i = t === "source" ? q : Y;
|
|
137
|
+
if (e.key === "ArrowDown") e.preventDefault(), i(ne(n, r, 1));
|
|
138
|
+
else if (e.key === "ArrowUp") e.preventDefault(), i(ne(n, r, -1));
|
|
139
139
|
else if (e.key === "Home") {
|
|
140
140
|
e.preventDefault();
|
|
141
141
|
let t = n.find((e) => !e.disabled);
|
|
@@ -147,16 +147,16 @@ var _ = 36, v = 50, y = ({ data: t, title: n, listType: a, id: u, disabled: d, s
|
|
|
147
147
|
} else if (e.key === " ") {
|
|
148
148
|
e.preventDefault();
|
|
149
149
|
let t = n.find((e) => e.key === r);
|
|
150
|
-
t && !t.disabled &&
|
|
151
|
-
} else e.key === "Enter" && (e.preventDefault(),
|
|
152
|
-
},
|
|
150
|
+
t && !t.disabled && Q(t.key);
|
|
151
|
+
} else e.key === "Enter" && (e.preventDefault(), $(t === "source" ? "toRight" : "toLeft"));
|
|
152
|
+
}, ie = F.filter((e) => W.some((t) => t.key === e)).length === 0, ae = F.filter((e) => G.some((t) => t.key === e)).length === 0;
|
|
153
153
|
return /* @__PURE__ */ h(a, {
|
|
154
154
|
label: x,
|
|
155
155
|
error: S,
|
|
156
156
|
required: C,
|
|
157
157
|
layout: w,
|
|
158
|
-
labelId:
|
|
159
|
-
errorId:
|
|
158
|
+
labelId: B,
|
|
159
|
+
errorId: V,
|
|
160
160
|
className: _,
|
|
161
161
|
children: /* @__PURE__ */ g("div", {
|
|
162
162
|
className: m(c.container, "wim-transfer"),
|
|
@@ -168,22 +168,23 @@ var _ = 36, v = 50, y = ({ data: t, title: n, listType: a, id: u, disabled: d, s
|
|
|
168
168
|
className: m(c.root, b && c.disabled),
|
|
169
169
|
style: v,
|
|
170
170
|
role: "group",
|
|
171
|
-
"aria-labelledby": x ?
|
|
172
|
-
"aria-
|
|
171
|
+
"aria-labelledby": x ? B : D,
|
|
172
|
+
"aria-label": x || D ? void 0 : E,
|
|
173
|
+
"aria-describedby": [O, V].filter(Boolean).join(" ") || void 0,
|
|
173
174
|
children: [
|
|
174
175
|
/* @__PURE__ */ h(y, {
|
|
175
176
|
className: "wim-transfer__list",
|
|
176
|
-
data:
|
|
177
|
-
title:
|
|
177
|
+
data: W,
|
|
178
|
+
title: A[0],
|
|
178
179
|
listType: "source",
|
|
179
|
-
id:
|
|
180
|
+
id: z,
|
|
180
181
|
disabled: b,
|
|
181
|
-
selectedKeys:
|
|
182
|
-
focusedKey:
|
|
183
|
-
setFocusedKey:
|
|
184
|
-
onSelect:
|
|
185
|
-
onSelectAll:
|
|
186
|
-
onKeyDown:
|
|
182
|
+
selectedKeys: F,
|
|
183
|
+
focusedKey: K,
|
|
184
|
+
setFocusedKey: q,
|
|
185
|
+
onSelect: Q,
|
|
186
|
+
onSelectAll: te,
|
|
187
|
+
onKeyDown: re,
|
|
187
188
|
labels: T
|
|
188
189
|
}),
|
|
189
190
|
/* @__PURE__ */ g("div", {
|
|
@@ -192,33 +193,33 @@ var _ = 36, v = 50, y = ({ data: t, title: n, listType: a, id: u, disabled: d, s
|
|
|
192
193
|
variant: "outline",
|
|
193
194
|
size: "sm",
|
|
194
195
|
className: c.button,
|
|
195
|
-
onClick: () =>
|
|
196
|
-
disabled: b ||
|
|
196
|
+
onClick: () => $("toRight"),
|
|
197
|
+
disabled: b || ie,
|
|
197
198
|
icon: "ChevronRightIcon",
|
|
198
|
-
"aria-label":
|
|
199
|
+
"aria-label": j
|
|
199
200
|
}), /* @__PURE__ */ h(n, {
|
|
200
201
|
variant: "outline",
|
|
201
202
|
size: "sm",
|
|
202
203
|
className: c.button,
|
|
203
|
-
onClick: () =>
|
|
204
|
-
disabled: b ||
|
|
204
|
+
onClick: () => $("toLeft"),
|
|
205
|
+
disabled: b || ae,
|
|
205
206
|
icon: "ChevronLeftIcon",
|
|
206
|
-
"aria-label":
|
|
207
|
+
"aria-label": M
|
|
207
208
|
})]
|
|
208
209
|
}),
|
|
209
210
|
/* @__PURE__ */ h(y, {
|
|
210
211
|
className: "wim-transfer__list",
|
|
211
|
-
data:
|
|
212
|
-
title:
|
|
212
|
+
data: G,
|
|
213
|
+
title: A[1],
|
|
213
214
|
listType: "target",
|
|
214
|
-
id:
|
|
215
|
+
id: z,
|
|
215
216
|
disabled: b,
|
|
216
|
-
selectedKeys:
|
|
217
|
-
focusedKey:
|
|
218
|
-
setFocusedKey:
|
|
219
|
-
onSelect:
|
|
220
|
-
onSelectAll:
|
|
221
|
-
onKeyDown:
|
|
217
|
+
selectedKeys: F,
|
|
218
|
+
focusedKey: J,
|
|
219
|
+
setFocusedKey: Y,
|
|
220
|
+
onSelect: Q,
|
|
221
|
+
onSelectAll: te,
|
|
222
|
+
onKeyDown: re,
|
|
222
223
|
labels: T
|
|
223
224
|
})
|
|
224
225
|
]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/components.cjs"),r=require("../../../icon/close.cjs"),i=require("../../../icon/edit.cjs"),a=require("../../../icon/plus.cjs"),o=require("../../media/Icon/Icon.cjs"),s=require("../../data-display/Card/Card.cjs"),c=require("../../form/Button/Button.cjs"),l=require("./dashboard.module.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p=(0,u.createContext)(null),m=()=>{let e=(0,u.useContext)(p);if(!e)throw Error(`Dashboard subcomponents must be used within Dashboard`);return e},h=u.default.forwardRef(({widgets:e,editable:r,defaultEditable:s=!1,onEditChange:m,onRemove:h,onAdd:_,columns:v=3,gap:y=`md`,showEditToggle:b,titleLevel:x=3,label:S,className:C,style:w,children:T,...E},D)=>{let{t:O}=t.useWimTranslation(n.componentsNs),k=r!==void 0,[A,j]=(0,u.useState)(s),M=k?r:A,N=(0,u.useCallback)(()=>{let e=!M;k||j(e),m?.(e)},[M,k,m]),P={"--dashboard-columns":v,...w},F=b??(r!==void 0||s||h!==void 0||_!==void 0),I=(0,u.useMemo)(()=>({editable:M??!1,onRemove:h,titleLevel:x}),[M,h,x])
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/components.cjs"),r=require("../../../icon/close.cjs"),i=require("../../../icon/edit.cjs"),a=require("../../../icon/plus.cjs"),o=require("../../media/Icon/Icon.cjs"),s=require("../../data-display/Card/Card.cjs"),c=require("../../form/Button/Button.cjs"),l=require("./dashboard.module.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p=(0,u.createContext)(null),m=()=>{let e=(0,u.useContext)(p);if(!e)throw Error(`Dashboard subcomponents must be used within Dashboard`);return e},h=u.default.forwardRef(({widgets:e,editable:r,defaultEditable:s=!1,onEditChange:m,onRemove:h,onAdd:_,columns:v=3,gap:y=`md`,showEditToggle:b,titleLevel:x=3,label:S,className:C,style:w,children:T,...E},D)=>{let{t:O}=t.useWimTranslation(n.componentsNs),k=r!==void 0,[A,j]=(0,u.useState)(s),M=k?r:A,N=(0,u.useCallback)(()=>{let e=!M;k||j(e),m?.(e)},[M,k,m]),P={"--dashboard-columns":v,...w},F=b??(r!==void 0||s||h!==void 0||_!==void 0),I=(0,u.useMemo)(()=>({editable:M??!1,onRemove:h,titleLevel:x}),[M,h,x]),L=`h${Math.max(2,x-1)}`;return(0,f.jsx)(p.Provider,{value:I,children:(0,f.jsxs)(`div`,{ref:D,className:(0,d.default)(`wim-dashboard`,l.default.root,C),role:`group`,"aria-label":S??O(`dashboard_widget.label`),...E,children:[(S||F)&&(0,f.jsxs)(`div`,{className:l.default.header,children:[S&&(0,f.jsx)(L,{className:l.default.heading,children:S}),F&&(0,f.jsx)(c.Button,{size:`sm`,variant:M?`solid`:`outline`,intent:`default`,className:void 0,onClick:N,"aria-pressed":M,"aria-label":O(M?`dashboard_widget.exit_edit`:`dashboard_widget.enter_edit`),icon:(0,f.jsx)(o.Icon,{component:i.default,size:`sm`}),children:O(M?`dashboard_widget.exit_edit`:`dashboard_widget.enter_edit`)})]}),(0,f.jsxs)(`div`,{className:(0,d.default)(l.default.grid,l.default[`gap-${y}`]),style:P,role:`region`,"aria-label":O(`dashboard_widget.grid_label`),children:[e?e.map(e=>(0,f.jsx)(g,{widget:e},e.id)):T,M&&_&&(0,f.jsx)(c.Button,{asChild:!0,className:l.default.addButton,onClick:_,"aria-label":O(`dashboard_widget.add_widget`),children:(0,f.jsxs)(`button`,{type:`button`,children:[(0,f.jsx)(o.Icon,{component:a.default,size:`md`}),(0,f.jsx)(`span`,{children:O(`dashboard_widget.add_widget`)})]})})]})]})})});h.displayName=`Dashboard`;var g=({widget:e,className:i,...a})=>{let{editable:u,onRemove:p,titleLevel:h}=m(),g=`h${h}`,{t:_}=t.useWimTranslation(n.componentsNs),{id:v,title:y,description:b,content:x,span:S=1,rowSpan:C=1}=e;return(0,f.jsxs)(s.Card,{variant:`outline`,padding:`md`,radius:`md`,className:(0,d.default)(l.default.widget,l.default[`span-${S}`],l.default[`row-${C}`],{[l.default.editMode]:u},i),style:{"--widget-span":S,"--widget-row-span":C},...a,children:[(0,f.jsxs)(`div`,{className:l.default.widgetHeader,children:[(0,f.jsxs)(`div`,{className:l.default.widgetMeta,children:[(0,f.jsx)(g,{className:l.default.widgetTitle,children:y}),b&&(0,f.jsx)(`p`,{className:l.default.widgetDescription,children:b})]}),u&&p&&(0,f.jsx)(c.Button,{size:`sm`,variant:`ghost`,intent:`danger`,className:l.default.removeButton,onClick:()=>p(v),"aria-label":_(`dashboard_widget.remove_widget`,{title:y}),icon:(0,f.jsx)(o.Icon,{component:r.default,size:`sm`})})]}),(0,f.jsx)(`div`,{className:l.default.widgetContent,children:x})]})};g.displayName=`DashboardWidgetCard`,exports.Dashboard=h,exports.DashboardWidgetCard=g;
|
|
@@ -33,10 +33,15 @@ export interface DashboardProps extends Omit<React.ComponentPropsWithoutRef<"div
|
|
|
33
33
|
/**
|
|
34
34
|
* Heading level for the widget titles. Match it to the page: a dashboard
|
|
35
35
|
* under an `h1` needs `2`, one under an `h2` section keeps `3`.
|
|
36
|
+
* The `label` heading sits one level above the widget titles, and never
|
|
37
|
+
* above `h2`.
|
|
36
38
|
* @default 3
|
|
37
39
|
*/
|
|
38
40
|
titleLevel?: DashboardTitleLevel;
|
|
39
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Dashboard heading label. Rendered one level above `titleLevel` (`h2` by
|
|
43
|
+
* default, and `h2` at the highest).
|
|
44
|
+
*/
|
|
40
45
|
label?: string;
|
|
41
46
|
}
|
|
42
47
|
export declare const Dashboard: React.ForwardRefExoticComponent<DashboardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -35,7 +35,7 @@ var v = u(null), y = () => {
|
|
|
35
35
|
F,
|
|
36
36
|
f,
|
|
37
37
|
w
|
|
38
|
-
])
|
|
38
|
+
]), B = `h${Math.max(2, w - 1)}`;
|
|
39
39
|
return /* @__PURE__ */ g(v.Provider, {
|
|
40
40
|
value: z,
|
|
41
41
|
children: /* @__PURE__ */ _("div", {
|
|
@@ -46,7 +46,7 @@ var v = u(null), y = () => {
|
|
|
46
46
|
...k,
|
|
47
47
|
children: [(T || R) && /* @__PURE__ */ _("div", {
|
|
48
48
|
className: c.header,
|
|
49
|
-
children: [T && /* @__PURE__ */ g(
|
|
49
|
+
children: [T && /* @__PURE__ */ g(B, {
|
|
50
50
|
className: c.heading,
|
|
51
51
|
children: T
|
|
52
52
|
}), R && /* @__PURE__ */ g(s, {
|
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.57.0 — a React 19 component library: 228 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
|
|
|
@@ -729,8 +729,11 @@ readers have learnt to skip.
|
|
|
729
729
|
- `showEditToggle: boolean` — Show the edit toggle button in the header. Default: true.
|
|
730
730
|
- `titleLevel: 2 | 3 | 4 | 5 | 6` = 3 — Heading level for the widget titles. Match it to the page: a dashboard
|
|
731
731
|
under an `h1` needs `2`, one under an `h2` section keeps `3`.
|
|
732
|
+
The `label` heading sits one level above the widget titles, and never
|
|
733
|
+
above `h2`.
|
|
732
734
|
@default 3
|
|
733
|
-
- `label: string` — Dashboard heading label.
|
|
735
|
+
- `label: string` — Dashboard heading label. Rendered one level above `titleLevel` (`h2` by
|
|
736
|
+
default, and `h2` at the highest).
|
|
734
737
|
- **Divider** — Content separator (aka Separator, Horizontal Rule)
|
|
735
738
|
- `orientation: "horizontal" | "vertical"` = "horizontal" — Orientation of the divider
|
|
736
739
|
- `thickness: number` — Thickness of the line, in pixels. Left out, the line is as thick as every
|
|
@@ -1153,6 +1156,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1153
1156
|
- `error: string` — Error message
|
|
1154
1157
|
- `required: boolean` — Whether to show the required indicator
|
|
1155
1158
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
1159
|
+
- `aria-label: string` — Accessible name for the group of the two date fields when no visible `label` is provided.
|
|
1160
|
+
- `aria-labelledby: string` — ID of the element that labels the group of the two date fields when no visible `label` is provided.
|
|
1161
|
+
- `aria-describedby: string` — ID of the element that describes the group. Announced together with the error message.
|
|
1156
1162
|
- **Dropzone** — Drag & drop files
|
|
1157
1163
|
- `label: React.ReactNode` — Field label.
|
|
1158
1164
|
- `description: React.ReactNode` — Description text shown in the drag-and-drop area.
|
|
@@ -1489,6 +1495,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1489
1495
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field.
|
|
1490
1496
|
- `className: string` — Additional class names.
|
|
1491
1497
|
- `fullWidth: boolean` = false — Whether to take full width of parent.
|
|
1498
|
+
- `aria-label: string` — Accessible name for the phone number input when no visible `label` is provided.
|
|
1499
|
+
- `aria-labelledby: string` — ID of the element that labels the phone number input when no visible `label` is provided.
|
|
1500
|
+
- `aria-describedby: string` — ID of the element that describes the phone number input. Announced together with the error message.
|
|
1492
1501
|
- **QueryBuilder** — Visual builder for constructing complex search queries.
|
|
1493
1502
|
- `fields: QueryField[]` (required) — Field definitions
|
|
1494
1503
|
- `query: QueryGroup` — Current query state (controlled)
|
|
@@ -1640,6 +1649,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1640
1649
|
- `disabled: boolean` = false — Whether the control is disabled
|
|
1641
1650
|
- `asChild: boolean` = false — If true, merge radiogroup props onto the child element.
|
|
1642
1651
|
- `children: React.ReactNode` — Optional children used when asChild is true
|
|
1652
|
+
- `aria-label: string` — Accessible name for the radio group when no visible `label` is provided.
|
|
1653
|
+
- `aria-labelledby: string` — ID of the element that labels the radio group when no visible `label` is provided.
|
|
1654
|
+
- `aria-describedby: string` — ID of the element that describes the radio group. Announced together with the error message.
|
|
1643
1655
|
- `id: string` — Unique ID for the component
|
|
1644
1656
|
- `styles: { root?: string; item?: string; slider?: string; label?: string; }` — Custom styles for internal parts
|
|
1645
1657
|
- **Select** — A dropdown menu for selecting one option from a predefined list (aka Pop-Up Button, Select Menu)
|
|
@@ -1845,6 +1857,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1845
1857
|
- `required: boolean` — Whether to show the required indicator
|
|
1846
1858
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
1847
1859
|
- `labels: { noData?: React.ReactNode; moveToTarget?: string; moveToSource?: string; statusMovedToTarget?: (count: number) => string; statusMovedToSource?: (count: number) => string; }` = {} — Labels for internationalization
|
|
1860
|
+
- `aria-label: string` — Accessible name for the group of the two lists when no visible `label` is provided.
|
|
1861
|
+
- `aria-labelledby: string` — ID of the element that labels the group of the two lists when no visible `label` is provided.
|
|
1862
|
+
- `aria-describedby: string` — ID of the element that describes the group. Announced together with the error message.
|
|
1848
1863
|
- **TreeSelect** — Select from tree structure
|
|
1849
1864
|
- `treeData: TreeSelectNode[]` = [] — Tree nodes to select from
|
|
1850
1865
|
- `value: string | string[]` — Selected value(s) (controlled)
|
|
@@ -3469,6 +3484,10 @@ written in the markdown. Default `"2xl"` keeps the historical mapping
|
|
|
3469
3484
|
- **ThoughtProcess** — Visualizes AI reasoning steps and execution states in a timeline format.
|
|
3470
3485
|
- `children: React.ReactNode` (required) — Reasoning steps to display (typically ThoughtStep elements)
|
|
3471
3486
|
- `title: string` = "Thinking Process" — Header title
|
|
3487
|
+
- `titleLevel: 2 | 3 | 4 | 5 | 6` = 3 — Heading level of the title when `isCollapsible` is false. Match it to the
|
|
3488
|
+
page: under an `h1` use `2`, under an `h3` use `4`. Has no effect when
|
|
3489
|
+
`isCollapsible` is true, where the title is a toggle button, not a heading.
|
|
3490
|
+
@default 3
|
|
3472
3491
|
- `className: string` — Additional CSS class
|
|
3473
3492
|
- `isCollapsible: boolean` = true — Whether the body can be collapsed
|
|
3474
3493
|
- `defaultExpanded: boolean` = true — Initial expanded state (only relevant when isCollapsible is true)
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.57.0 — a React 19 component library: 228 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
|
|