wimui 0.50.4 → 0.51.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/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +116 -71
- package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
- package/dist/components/data-display/TreeView/TreeView.js +194 -179
- package/dist/components/form/Combobox/Combobox.cjs +1 -1
- package/dist/components/form/Combobox/Combobox.js +2 -1
- package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/form/DatePicker/DatePicker.js +3 -2
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.d.ts +7 -0
- package/dist/components/form/Input/Input.js +51 -50
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.d.ts +7 -0
- package/dist/components/form/InputBase/InputBase.js +5 -1
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +1 -1
- package/dist/components/form/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/form/TimePicker/TimePicker.js +1 -0
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +5 -1
- package/dist/llms-full.txt +33 -1
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +1 -1
|
@@ -40,7 +40,7 @@ var g = c(({ intent: c = "default", variant: g = "outline", fullWidth: _ = !1, c
|
|
|
40
40
|
return l(() => {
|
|
41
41
|
if (I) {
|
|
42
42
|
let e = setTimeout(() => {
|
|
43
|
-
let e = B.current?.querySelector("[data-calendar-day][data-selected]:not(:disabled), [data-calendar-day]:focus");
|
|
43
|
+
let e = B.current?.querySelector("[data-calendar-day][tabindex=\"0\"]:not(:disabled), [data-calendar-day][data-selected]:not(:disabled), [data-calendar-day]:focus");
|
|
44
44
|
e ? e.focus() : B.current?.querySelector("[data-calendar-day]:not([data-other-month]):not(:disabled)")?.focus();
|
|
45
45
|
}, 50);
|
|
46
46
|
return () => clearTimeout(e);
|
|
@@ -69,7 +69,8 @@ var g = c(({ intent: c = "default", variant: g = "outline", fullWidth: _ = !1, c
|
|
|
69
69
|
rightIcons: [{
|
|
70
70
|
name: "ChevronDownIcon",
|
|
71
71
|
rotated: I,
|
|
72
|
-
onClick:
|
|
72
|
+
onClick: $,
|
|
73
|
+
decorative: !0
|
|
73
74
|
}],
|
|
74
75
|
children: /* @__PURE__ */ m("input", {
|
|
75
76
|
id: G,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),ee=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../hooks/useMergedRef.cjs"),te=require("../InputBase/InputBase.cjs"),ne=require("../FieldTemplate/FieldTemplate.cjs"),r=require("./input.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=(0,i.forwardRef)(({intent:e=`default`,variant:s=`outline`,fullWidth:re=!1,className:c,disabled:l,leftIcon:u,rightIcon:d,leftIconColor:f,rightIconColor:ie,onLeftIconClick:p,onRightIconClick:m,allowClear:ae=!1,showPasswordToggle:oe=!0,rightIconClassName:se,rightIconRotated:ce,width:le,value:h,defaultValue:ue,onChange:g,type:_,label:v,error:y,required:b,layout:x,id:S,inputClassName:C,showPasswordAriaLabel:w,hidePasswordAriaLabel:T,rightIconAriaLabel:E,rightIconDecorative:D=!1,suffix:O,styles:k,asChild:A=!1,children:j,...M},N)=>{let{t:P}=ee.useWimTranslation(`common`),F=w??P(`a11y.show_password`),I=T??P(`a11y.hide_password`),L=E??P(`a11y.right_icon_action`),[R,z]=(0,i.useState)(ue??``),[B,V]=(0,i.useState)(!1),H=(0,i.useRef)(null),U=n.useMergedRef(N,H),W=h!==void 0,G=W?h:R,K=l,de=e=>{W||z(e.target.value),g?.(e)},fe=()=>{let e=H.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?(t.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0}))):(W||z(``),g&&(e.value=``,g({target:e,currentTarget:e}))),W||z(``)},pe=()=>{V(e=>!e)},me=_===`password`&&oe,q=[];me&&q.push({name:B?`EyeOffIcon`:`EyeIcon`,onClick:e=>pe(),ariaLabel:B?I:F}),d&&(q.some(e=>e.name===d)||q.push({name:d,onClick:m,color:ie,ariaLabel:L,decorative:D,className:se,rotated:ce}));let J=_===`password`&&B?`text`:_,Y=y?`danger`:e,he=(0,i.useId)(),X=S||`wim-input-${he}`,Z=y?`${X}-error`:void 0,Q=O!=null&&O!==``?`${X}-suffix`:void 0,ge=[Z,Q].filter(Boolean).join(` `)||void 0,$=v?`${X}-label`:void 0;return(0,o.jsx)(ne.FieldTemplate,{label:v,error:y,required:b,layout:x,labelId:$,htmlFor:X,errorId:Z,className:c,children:(0,o.jsx)(te.InputBase,{intent:Y,variant:s,fullWidth:re,width:le,disabled:K,leftIcon:u,leftIconColor:f,onLeftIconClick:p,rightIcons:q,suffix:O,suffixId:Q,allowClear:ae,hasValue:!!G,onClear:fe,styles:k,children:(0,o.jsx)(A?t.Root:`input`,{id:X,ref:U,className:(0,a.default)(`wim-input`,r.default.root,r.default[Y],K&&r.default.disabled,r.default[s],C),disabled:K,value:G,onChange:de,type:J,"aria-invalid":Y===`danger`,"aria-describedby":ge,"aria-labelledby":v?$:void 0,"aria-required":b,...M,children:A?(0,o.jsx)(t.Slottable,{children:j}):null})})})});s.displayName=`Input`,exports.Input=s,exports.default=s;
|
|
@@ -47,6 +47,13 @@ export interface InputProps extends Omit<React.ComponentPropsWithoutRef<"input">
|
|
|
47
47
|
hidePasswordAriaLabel?: string;
|
|
48
48
|
/** Aria label for the right icon button */
|
|
49
49
|
rightIconAriaLabel?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Treats the clickable right icon as a pointer-only affordance: it stays
|
|
52
|
+
* clickable but leaves the tab order and is hidden from assistive technology.
|
|
53
|
+
* Use it when the field already does the same thing from the keyboard.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
rightIconDecorative?: boolean;
|
|
50
57
|
/**
|
|
51
58
|
* Static text shown after the field, inside the same shell — a unit such as
|
|
52
59
|
* `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
3
|
-
import { useWimTranslation as
|
|
4
|
-
import { useMergedRef as
|
|
5
|
-
import { InputBase as
|
|
6
|
-
import { FieldTemplate as
|
|
7
|
-
import
|
|
8
|
-
import { forwardRef as
|
|
9
|
-
import
|
|
10
|
-
import { jsx as
|
|
3
|
+
import { useWimTranslation as ee } from "../../../i18n/useWimTranslation.js";
|
|
4
|
+
import { useMergedRef as te } from "../../../hooks/useMergedRef.js";
|
|
5
|
+
import { InputBase as n } from "../InputBase/InputBase.js";
|
|
6
|
+
import { FieldTemplate as r } from "../FieldTemplate/FieldTemplate.js";
|
|
7
|
+
import i from "./input.module.js";
|
|
8
|
+
import { forwardRef as a, useId as o, useRef as s, useState as c } from "react";
|
|
9
|
+
import l from "classnames";
|
|
10
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/form/Input/Input.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t:
|
|
14
|
-
W ||
|
|
15
|
-
},
|
|
12
|
+
var d = a(({ intent: a = "default", variant: d = "outline", fullWidth: f = !1, className: ne, disabled: re, leftIcon: ie, rightIcon: p, leftIconColor: ae, rightIconColor: oe, onLeftIconClick: m, onRightIconClick: se, allowClear: h = !1, showPasswordToggle: g = !0, rightIconClassName: _, rightIconRotated: ce, width: le, value: v, defaultValue: ue, onChange: y, type: b, label: x, error: S, required: C, layout: w, id: T, inputClassName: E, showPasswordAriaLabel: D, hidePasswordAriaLabel: O, rightIconAriaLabel: k, rightIconDecorative: A = !1, suffix: j, styles: M, asChild: N = !1, children: P, ...F }, I) => {
|
|
13
|
+
let { t: L } = ee("common"), R = D ?? L("a11y.show_password"), de = O ?? L("a11y.hide_password"), z = k ?? L("a11y.right_icon_action"), [B, V] = c(ue ?? ""), [H, fe] = c(!1), U = s(null), pe = te(I, U), W = v !== void 0, G = W ? v : B, K = re, me = (e) => {
|
|
14
|
+
W || V(e.target.value), y?.(e);
|
|
15
|
+
}, q = () => {
|
|
16
16
|
let e = U.current;
|
|
17
17
|
if (!e) return;
|
|
18
18
|
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
19
|
-
t ? (t.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))) : (W ||
|
|
19
|
+
t ? (t.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 }))) : (W || V(""), y && (e.value = "", y({
|
|
20
20
|
target: e,
|
|
21
21
|
currentTarget: e
|
|
22
|
-
}))), W ||
|
|
22
|
+
}))), W || V("");
|
|
23
23
|
}, he = () => {
|
|
24
|
-
|
|
25
|
-
}, ge = b === "password" &&
|
|
26
|
-
ge &&
|
|
27
|
-
name:
|
|
24
|
+
fe((e) => !e);
|
|
25
|
+
}, ge = b === "password" && g, J = [];
|
|
26
|
+
ge && J.push({
|
|
27
|
+
name: H ? "EyeOffIcon" : "EyeIcon",
|
|
28
28
|
onClick: (e) => he(),
|
|
29
|
-
ariaLabel:
|
|
30
|
-
}),
|
|
31
|
-
name:
|
|
32
|
-
onClick:
|
|
33
|
-
color:
|
|
34
|
-
ariaLabel:
|
|
35
|
-
|
|
29
|
+
ariaLabel: H ? de : R
|
|
30
|
+
}), p && (J.some((e) => e.name === p) || J.push({
|
|
31
|
+
name: p,
|
|
32
|
+
onClick: se,
|
|
33
|
+
color: oe,
|
|
34
|
+
ariaLabel: z,
|
|
35
|
+
decorative: A,
|
|
36
|
+
className: _,
|
|
36
37
|
rotated: ce
|
|
37
38
|
}));
|
|
38
|
-
let _e = b === "password" &&
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
let _e = b === "password" && H ? "text" : b, Y = S ? "danger" : a, ve = o(), X = T || `wim-input-${ve}`, Z = S ? `${X}-error` : void 0, Q = j != null && j !== "" ? `${X}-suffix` : void 0, ye = [Z, Q].filter(Boolean).join(" ") || void 0, $ = x ? `${X}-label` : void 0;
|
|
40
|
+
return /* @__PURE__ */ u(r, {
|
|
40
41
|
label: x,
|
|
41
42
|
error: S,
|
|
42
43
|
required: C,
|
|
@@ -44,41 +45,41 @@ var f = s(({ intent: s = "default", variant: f = "outline", fullWidth: p = !1, c
|
|
|
44
45
|
labelId: $,
|
|
45
46
|
htmlFor: X,
|
|
46
47
|
errorId: Z,
|
|
47
|
-
className:
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
intent:
|
|
50
|
-
variant:
|
|
51
|
-
fullWidth:
|
|
48
|
+
className: ne,
|
|
49
|
+
children: /* @__PURE__ */ u(n, {
|
|
50
|
+
intent: Y,
|
|
51
|
+
variant: d,
|
|
52
|
+
fullWidth: f,
|
|
52
53
|
width: le,
|
|
53
54
|
disabled: K,
|
|
54
|
-
leftIcon:
|
|
55
|
-
leftIconColor:
|
|
56
|
-
onLeftIconClick:
|
|
57
|
-
rightIcons:
|
|
58
|
-
suffix:
|
|
55
|
+
leftIcon: ie,
|
|
56
|
+
leftIconColor: ae,
|
|
57
|
+
onLeftIconClick: m,
|
|
58
|
+
rightIcons: J,
|
|
59
|
+
suffix: j,
|
|
59
60
|
suffixId: Q,
|
|
60
|
-
allowClear:
|
|
61
|
+
allowClear: h,
|
|
61
62
|
hasValue: !!G,
|
|
62
|
-
onClear:
|
|
63
|
-
styles:
|
|
64
|
-
children: /* @__PURE__ */
|
|
63
|
+
onClear: q,
|
|
64
|
+
styles: M,
|
|
65
|
+
children: /* @__PURE__ */ u(N ? e : "input", {
|
|
65
66
|
id: X,
|
|
66
|
-
ref:
|
|
67
|
-
className:
|
|
67
|
+
ref: pe,
|
|
68
|
+
className: l("wim-input", i.root, i[Y], K && i.disabled, i[d], E),
|
|
68
69
|
disabled: K,
|
|
69
70
|
value: G,
|
|
70
|
-
onChange:
|
|
71
|
+
onChange: me,
|
|
71
72
|
type: _e,
|
|
72
|
-
"aria-invalid":
|
|
73
|
-
"aria-describedby":
|
|
73
|
+
"aria-invalid": Y === "danger",
|
|
74
|
+
"aria-describedby": ye,
|
|
74
75
|
"aria-labelledby": x ? $ : void 0,
|
|
75
76
|
"aria-required": C,
|
|
76
|
-
...
|
|
77
|
-
children:
|
|
77
|
+
...F,
|
|
78
|
+
children: N ? /* @__PURE__ */ u(t, { children: P }) : null
|
|
78
79
|
})
|
|
79
80
|
})
|
|
80
81
|
});
|
|
81
82
|
});
|
|
82
|
-
|
|
83
|
+
d.displayName = "Input";
|
|
83
84
|
//#endregion
|
|
84
|
-
export {
|
|
85
|
+
export { d as Input, d 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("../../media/Icon/Icon.cjs"),r=require("./input-base.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=({children:e,intent:s=`default`,variant:c=`outline`,fullWidth:l=!1,width:u,className:d,disabled:f,leftIcon:p,leftIconColor:m,onLeftIconClick:h,leftIconAriaLabel:g,rightIcons:_=[],suffix:v,suffixId:y,allowClear:b,hasValue:x,onClear:S,clearAriaLabel:C,styles:w})=>{let{t:T}=t.useWimTranslation(`common`),E=g??T(`a11y.left_icon_action`),D=C??T(`a11y.clear_input`),O=typeof u==`string`&&[`xs`,`sm`,`md`,`lg`,`xl`].includes(u),k=i.default.Children.map(e,e=>i.default.isValidElement(e)?i.default.cloneElement(e,{disabled:f?!0:e.props.disabled,className:(0,a.default)(e.props.className,r.default.inner,w?.inner)}):e),A=u!==void 0&&!O&&!l,j=O&&!l?u:void 0,M=e=>f?`disabled`:e||(s===`danger`?`danger`:s===`warning`?`warning`:s===`success`?`success`:`secondary`),N=[..._];b&&x&&!f&&N.push({name:`CloseIcon`,onClick:e=>{e.stopPropagation(),S?.()},ariaLabel:D});let P=j?r.default[`width${j.charAt(0).toUpperCase()}${j.slice(1)}`]:void 0;return(0,o.jsxs)(`div`,{className:(0,a.default)(`wim-input-base`,r.default.root,s&&r.default[s],f&&r.default.disabled,r.default[c],l&&r.default.fullWidth,A&&r.default.hasCustomWidth,P,p&&r.default.hasLeftIcon,(N.length>0||b)&&r.default.hasRightIcon,(N.length>=2||_.length>=1&&b)&&r.default.hasMultipleRightIcons,d,w?.root),style:A?{"--wim-input-width":typeof u==`number`?`${u}px`:u}:void 0,children:[p&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icon,r.default.left,h&&r.default.clickable,w?.icon),children:h?(0,o.jsx)(`button`,{type:`button`,onClick:h,className:(0,a.default)(r.default.iconButton,w?.iconButton),"aria-label":E,children:(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}):(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}),k,v!=null&&v!==``&&(0,o.jsx)(`span`,{id:y,className:(0,a.default)(r.default.suffix,N.length>0&&r.default.suffixClearsIcons),"data-testid":`input-suffix`,children:v}),N.length>0&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icons,r.default.right,w?.icons),children:N.map((e,t)=>(0,o.jsx)(`div`,{className:(0,a.default)(r.default.iconItem,e.onClick&&r.default.clickable,e.rotated&&r.default.rotated,e.className,w?.iconItem),children:e.onClick?(0,o.jsx)(`button`,{type:`button`,onClick:e.onClick,className:(0,a.default)(r.default.iconButton,w?.iconButton),"aria-label":e.ariaLabel??T(`a11y.right_icon_action`),children:(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})}):(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})},`${e.name}-${t}`))})]})};exports.InputBase=s;
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../media/Icon/Icon.cjs"),r=require("./input-base.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=({children:e,intent:s=`default`,variant:c=`outline`,fullWidth:l=!1,width:u,className:d,disabled:f,leftIcon:p,leftIconColor:m,onLeftIconClick:h,leftIconAriaLabel:g,rightIcons:_=[],suffix:v,suffixId:y,allowClear:b,hasValue:x,onClear:S,clearAriaLabel:C,styles:w})=>{let{t:T}=t.useWimTranslation(`common`),E=g??T(`a11y.left_icon_action`),D=C??T(`a11y.clear_input`),O=typeof u==`string`&&[`xs`,`sm`,`md`,`lg`,`xl`].includes(u),k=i.default.Children.map(e,e=>i.default.isValidElement(e)?i.default.cloneElement(e,{disabled:f?!0:e.props.disabled,className:(0,a.default)(e.props.className,r.default.inner,w?.inner)}):e),A=u!==void 0&&!O&&!l,j=O&&!l?u:void 0,M=e=>f?`disabled`:e||(s===`danger`?`danger`:s===`warning`?`warning`:s===`success`?`success`:`secondary`),N=[..._];b&&x&&!f&&N.push({name:`CloseIcon`,onClick:e=>{e.stopPropagation(),S?.()},ariaLabel:D});let P=j?r.default[`width${j.charAt(0).toUpperCase()}${j.slice(1)}`]:void 0;return(0,o.jsxs)(`div`,{className:(0,a.default)(`wim-input-base`,r.default.root,s&&r.default[s],f&&r.default.disabled,r.default[c],l&&r.default.fullWidth,A&&r.default.hasCustomWidth,P,p&&r.default.hasLeftIcon,(N.length>0||b)&&r.default.hasRightIcon,(N.length>=2||_.length>=1&&b)&&r.default.hasMultipleRightIcons,d,w?.root),style:A?{"--wim-input-width":typeof u==`number`?`${u}px`:u}:void 0,children:[p&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icon,r.default.left,h&&r.default.clickable,w?.icon),children:h?(0,o.jsx)(`button`,{type:`button`,onClick:h,className:(0,a.default)(r.default.iconButton,w?.iconButton),"aria-label":E,disabled:f,children:(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}):(0,o.jsx)(n.Icon,{name:p,size:`md`,color:M(m)})}),k,v!=null&&v!==``&&(0,o.jsx)(`span`,{id:y,className:(0,a.default)(r.default.suffix,N.length>0&&r.default.suffixClearsIcons),"data-testid":`input-suffix`,children:v}),N.length>0&&(0,o.jsx)(`div`,{className:(0,a.default)(r.default.icons,r.default.right,w?.icons),children:N.map((e,t)=>(0,o.jsx)(`div`,{className:(0,a.default)(r.default.iconItem,e.onClick&&r.default.clickable,e.rotated&&r.default.rotated,e.className,w?.iconItem),children:e.onClick?(0,o.jsx)(`button`,{type:`button`,onClick:e.onClick,className:(0,a.default)(r.default.iconButton,w?.iconButton),disabled:f,tabIndex:e.decorative?-1:void 0,"aria-hidden":e.decorative||void 0,"aria-label":e.decorative?void 0:e.ariaLabel??T(`a11y.right_icon_action`),children:(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})}):(0,o.jsx)(n.Icon,{name:e.name,size:`md`,color:M(e.color)})},`${e.name}-${t}`))})]})};exports.InputBase=s;
|
|
@@ -9,6 +9,13 @@ export type InputBaseIcon = {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
/** Whether the icon should be rotated 180deg */
|
|
11
11
|
rotated?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Marks a clickable icon as a pointer-only affordance that repeats what the
|
|
14
|
+
* control already does from the keyboard (the chevron of a combobox, the
|
|
15
|
+
* clock of a time field). It stays clickable but is taken out of the tab
|
|
16
|
+
* order and hidden from assistive technology, so it needs no name.
|
|
17
|
+
*/
|
|
18
|
+
decorative?: boolean;
|
|
12
19
|
};
|
|
13
20
|
export type InputBaseProps = {
|
|
14
21
|
/** Inner form control element(s) wrapped by the shell */
|
|
@@ -36,6 +36,7 @@ var s = ({ children: s, intent: c = "default", variant: l = "outline", fullWidth
|
|
|
36
36
|
onClick: g,
|
|
37
37
|
className: i(n.iconButton, T?.iconButton),
|
|
38
38
|
"aria-label": D,
|
|
39
|
+
disabled: p,
|
|
39
40
|
children: /* @__PURE__ */ a(t, {
|
|
40
41
|
name: m,
|
|
41
42
|
size: "md",
|
|
@@ -62,7 +63,10 @@ var s = ({ children: s, intent: c = "default", variant: l = "outline", fullWidth
|
|
|
62
63
|
type: "button",
|
|
63
64
|
onClick: e.onClick,
|
|
64
65
|
className: i(n.iconButton, T?.iconButton),
|
|
65
|
-
|
|
66
|
+
disabled: p,
|
|
67
|
+
tabIndex: e.decorative ? -1 : void 0,
|
|
68
|
+
"aria-hidden": e.decorative || void 0,
|
|
69
|
+
"aria-label": e.decorative ? void 0 : e.ariaLabel ?? E("a11y.right_icon_action"),
|
|
66
70
|
children: /* @__PURE__ */ a(t, {
|
|
67
71
|
name: e.name,
|
|
68
72
|
size: "md",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_43cv5_36`,t=`_ghost_43cv5_81`,n=`_disabled_43cv5_85`,r=`_icon_43cv5_94`,i=`_iconItem_43cv5_94`,a=`_danger_43cv5_7`,o=`_warning_43cv5_110`,s=`_success_43cv5_113`,c=`_hasLeftIcon_43cv5_146`,l=`_hasRightIcon_43cv5_149`,u=`_hasMultipleRightIcons_43cv5_152`,d=`_widthXs_43cv5_155`,f=`_widthSm_43cv5_158`,p=`_widthMd_43cv5_161`,m=`_widthLg_43cv5_164`,h=`_widthXl_43cv5_167`,g=`_hasCustomWidth_43cv5_170`,_=`_fullWidth_43cv5_175`,v=`_clickable_43cv5_197`,y=`_left_43cv5_200`,b=`_suffix_43cv5_203`,x=`_suffixClearsIcons_43cv5_211`,S=`_icons_43cv5_214`,C=`_right_43cv5_229`,w=`_rotated_43cv5_241`,T=`_iconButton_43cv5_244`,E=`_inner_43cv5_270`,D={root:e,ghost:t,disabled:n,icon:r,iconItem:i,danger:a,warning:o,success:s,hasLeftIcon:c,hasRightIcon:l,hasMultipleRightIcons:u,widthXs:d,widthSm:f,widthMd:p,widthLg:m,widthXl:h,hasCustomWidth:g,fullWidth:_,clickable:v,left:y,suffix:b,suffixClearsIcons:x,icons:S,right:C,rotated:w,iconButton:T,inner:E};exports.clickable=v,exports.danger=a,exports.default=D,exports.disabled=n,exports.fullWidth=_,exports.ghost=t,exports.hasCustomWidth=g,exports.hasLeftIcon=c,exports.hasMultipleRightIcons=u,exports.hasRightIcon=l,exports.icon=r,exports.iconButton=T,exports.iconItem=i,exports.icons=S,exports.inner=E,exports.left=y,exports.right=C,exports.root=e,exports.rotated=w,exports.success=s,exports.suffix=b,exports.suffixClearsIcons=x,exports.warning=o,exports.widthLg=m,exports.widthMd=p,exports.widthSm=f,exports.widthXl=h,exports.widthXs=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/InputBase/input-base.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_43cv5_36", t = "_ghost_43cv5_81", n = "_disabled_43cv5_85", r = "_icon_43cv5_94", i = "_iconItem_43cv5_94", a = "_danger_43cv5_7", o = "_warning_43cv5_110", s = "_success_43cv5_113", c = "_hasLeftIcon_43cv5_146", l = "_hasRightIcon_43cv5_149", u = "_hasMultipleRightIcons_43cv5_152", d = "_widthXs_43cv5_155", f = "_widthSm_43cv5_158", p = "_widthMd_43cv5_161", m = "_widthLg_43cv5_164", h = "_widthXl_43cv5_167", g = "_hasCustomWidth_43cv5_170", _ = "_fullWidth_43cv5_175", v = "_clickable_43cv5_197", y = "_left_43cv5_200", b = "_suffix_43cv5_203", x = "_suffixClearsIcons_43cv5_211", S = "_icons_43cv5_214", C = "_right_43cv5_229", w = "_rotated_43cv5_241", T = "_iconButton_43cv5_244", E = "_inner_43cv5_270", D = {
|
|
4
4
|
root: e,
|
|
5
5
|
ghost: t,
|
|
6
6
|
disabled: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../hooks/useMergedRef.cjs"),n=require("../Input/input.module.cjs"),r=require("../Input/Input.cjs"),i=require("./time-picker.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=(0,a.forwardRef)(({intent:e=`default`,variant:c=`outline`,fullWidth:l=!1,className:u,disabled:d,allowClear:f=!0,value:p,defaultValue:m,onChange:h,...g},_)=>{let v=p!==void 0,[y,b]=(0,a.useState)(m??``),x=v?p:y,S=(0,a.useRef)(null),C=t.useMergedRef(_,S),w=f&&!!x&&!d,T=w?void 0:`ClockIcon`;return(0,s.jsx)(r.Input,{ref:C,type:`time`,allowClear:w,intent:e,variant:c,fullWidth:l,className:(0,o.default)(`wim-time-picker`,u),inputClassName:(0,o.default)(n.default.root,i.default.input),disabled:d,value:p,defaultValue:m,onChange:e=>{v||b(e.target.value),h?.(e)},rightIcon:T,rightIconColor:d||w?void 0:`primary`,onRightIconClick:w?void 0:()=>{S.current?.showPicker?.()},...g})});c.displayName=`TimePicker`,exports.TimePicker=c;
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../hooks/useMergedRef.cjs"),n=require("../Input/input.module.cjs"),r=require("../Input/Input.cjs"),i=require("./time-picker.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=(0,a.forwardRef)(({intent:e=`default`,variant:c=`outline`,fullWidth:l=!1,className:u,disabled:d,allowClear:f=!0,value:p,defaultValue:m,onChange:h,...g},_)=>{let v=p!==void 0,[y,b]=(0,a.useState)(m??``),x=v?p:y,S=(0,a.useRef)(null),C=t.useMergedRef(_,S),w=f&&!!x&&!d,T=w?void 0:`ClockIcon`;return(0,s.jsx)(r.Input,{ref:C,type:`time`,allowClear:w,intent:e,variant:c,fullWidth:l,className:(0,o.default)(`wim-time-picker`,u),inputClassName:(0,o.default)(n.default.root,i.default.input),disabled:d,value:p,defaultValue:m,onChange:e=>{v||b(e.target.value),h?.(e)},rightIcon:T,rightIconColor:d||w?void 0:`primary`,onRightIconClick:w?void 0:()=>{S.current?.showPicker?.()},rightIconDecorative:!0,...g})});c.displayName=`TimePicker`,exports.TimePicker=c;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),ee=require("../../overlay/FocusTrap/FocusTrap.cjs"),r=require("../../../hooks/useMergedRef.cjs"),i=require("../InputBase/InputBase.cjs"),a=require("../FieldTemplate/FieldTemplate.cjs"),te=require("../../data-display/TreeView/TreeView.cjs"),o=require("./tree-select.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");function u(e){return e.map(e=>({value:e.value,label:e.label,disabled:e.disabled,icon:e.icon,children:e.children?u(e.children):void 0}))}var d=(0,s.forwardRef)(({treeData:e=[],value:d,onChange:f,placeholder:p,label:m,error:h,required:g,layout:_,className:v,disabled:y=!1,multiple:b=!1,searchable:x=!1,defaultExpandedKeys:S=[],allowClear:C=!1,checkStrategy:w=`cascade`,id:T,width:E,fullWidth:D=!1,asChild:O=!1,children:ne,...re},ie)=>{let ae=(0,s.useId)(),k=T||`wim-tree-select-${ae}`,A=m?`${k}-label`:void 0,j=h?`${k}-error`:void 0,M=`${k}-trigger`,N=`${k}-dropdown`,[P,F]=(0,s.useState)(!1),[I,L]=(0,s.useState)(b?[]:``),R=(0,s.useRef)(null),z=(0,s.useRef)(null),B=d!==void 0,V=B?d:I;(0,s.useEffect)(()=>{let e=e=>{R.current&&!R.current.contains(e.target)&&F(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,s.useEffect)(()=>{if(P){let e=setTimeout(()=>{let e=R.current?.querySelector(`[data-testid="tree-view-search-input"]`);e?e.focus():(R.current?.querySelector(`[data-testid="tree-view-root"]`))?.focus()},100);return()=>clearTimeout(e)}},[P]);let H=()=>{if(!y){let e=!P;F(e),e||z.current?.focus()}},U=e=>{if(!y){if(!P){(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`)&&(e.preventDefault(),F(!0));return}e.key===`Escape`&&(e.preventDefault(),F(!1),z.current?.focus())}},W=(0,s.useMemo)(()=>{let t={},n=e=>{e.forEach(e=>{t[e.value]=e,e.children&&n(e.children)})};return n(e),t},[e]),G=()=>{if(b){let e=Array.isArray(V)?V:[];return e.length===0?null:e.map(e=>W[e]?W[e].label:e).reduce((e,t)=>[e,`, `,t])}{let e=V;return e?W[e]?W[e].label:e:null}},K=e=>{let t;b?t=e:(t=e[0]||``,F(!1),z.current?.focus()),B||L(t),f&&f(t)},q=()=>{if(y)return;let e=b?[]:``;B||L(e),f&&f(e)},oe=(0,s.useMemo)(()=>u(e),[e]),J=(0,s.useMemo)(()=>b?Array.isArray(V)?V:[]:V?[V]:[],[V,b]),Y=G(),{"aria-label":X,"aria-labelledby":Z,"aria-describedby":se,...ce}=re,Q=typeof p==`string`?p:`Select`,le=O?t.Root:`div`,$=r.useMergedRef(R,ie);return(0,l.jsx)(a.FieldTemplate,{label:m,error:h,required:g,layout:_,labelId:A,errorId:j,className:(0,c.default)(o.default.container,v),children:(0,l.jsxs)(le,{className:(0,c.default)(`wim-tree-select`,o.default.root,D&&o.default.fullWidth),ref:$,...ce,children:[(0,l.jsx)(t.Slottable,{children:ne}),(0,l.jsx)(i.InputBase,{disabled:y,allowClear:C,hasValue:!!Y,onClear:q,intent:h?`danger`:`default`,width:E,fullWidth:D,rightIcons:[{name:`ChevronDownIcon`,rotated:P,onClick:H}],className:(0,c.default)(P&&o.default.open),children:(0,l.jsx)(`div`,{id:M,className:(0,c.default)(o.default.trigger,y&&o.default.disabled),onClick:H,onKeyDown:U,tabIndex:y?-1:0,role:`combobox`,"aria-expanded":P,"aria-haspopup":`tree`,"aria-controls":P?N:void 0,"aria-disabled":y,"aria-labelledby":A||Z,"aria-label":m?void 0:X||Q,"aria-describedby":j||se,"aria-required":g,"aria-invalid":!!h,ref:z,children:(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,!Y&&o.default.placeholder),children:Y||p})})}),(0,l.jsx)(n.Transition,{show:P&&!y,preset:`fade`,className:o.default.dropdown,children:(0,l.jsx)(`div`,{id:N,children:(0,l.jsx)(ee.FocusTrap,{active:P,initialFocus:!1,children:(0,l.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":A||Z,"aria-label":m?void 0:X||Q,children:(0,l.jsx)(te.TreeView,{multiSelect:b,defaultSelectedValues:J,defaultCheckedValues:b?J:[],nodes:oe,onCheckedChange:K,onSelectedChange:K,checkable:b,checkStrategy:w,searchable:x,defaultExpandedValues:S,styles:{root:o.default.treeView,item:o.default.treeViewItem,search:o.default.treeViewSearch}})})})})})]})})});d.displayName=`TreeSelect`,exports.TreeSelect=d;
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),ee=require("../../overlay/FocusTrap/FocusTrap.cjs"),r=require("../../../hooks/useMergedRef.cjs"),i=require("../InputBase/InputBase.cjs"),a=require("../FieldTemplate/FieldTemplate.cjs"),te=require("../../data-display/TreeView/TreeView.cjs"),o=require("./tree-select.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");function u(e){return e.map(e=>({value:e.value,label:e.label,disabled:e.disabled,icon:e.icon,children:e.children?u(e.children):void 0}))}var d=(0,s.forwardRef)(({treeData:e=[],value:d,onChange:f,placeholder:p,label:m,error:h,required:g,layout:_,className:v,disabled:y=!1,multiple:b=!1,searchable:x=!1,defaultExpandedKeys:S=[],allowClear:C=!1,checkStrategy:w=`cascade`,id:T,width:E,fullWidth:D=!1,asChild:O=!1,children:ne,...re},ie)=>{let ae=(0,s.useId)(),k=T||`wim-tree-select-${ae}`,A=m?`${k}-label`:void 0,j=h?`${k}-error`:void 0,M=`${k}-trigger`,N=`${k}-dropdown`,[P,F]=(0,s.useState)(!1),[I,L]=(0,s.useState)(b?[]:``),R=(0,s.useRef)(null),z=(0,s.useRef)(null),B=d!==void 0,V=B?d:I;(0,s.useEffect)(()=>{let e=e=>{R.current&&!R.current.contains(e.target)&&F(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,s.useEffect)(()=>{if(P){let e=setTimeout(()=>{let e=R.current?.querySelector(`[data-testid="tree-view-search-input"]`);e?e.focus():(R.current?.querySelector(`[data-testid="tree-view-root"]`))?.focus()},100);return()=>clearTimeout(e)}},[P]);let H=()=>{if(!y){let e=!P;F(e),e||z.current?.focus()}},U=e=>{if(!y){if(!P){(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`)&&(e.preventDefault(),F(!0));return}e.key===`Escape`&&(e.preventDefault(),F(!1),z.current?.focus())}},W=(0,s.useMemo)(()=>{let t={},n=e=>{e.forEach(e=>{t[e.value]=e,e.children&&n(e.children)})};return n(e),t},[e]),G=()=>{if(b){let e=Array.isArray(V)?V:[];return e.length===0?null:e.map(e=>W[e]?W[e].label:e).reduce((e,t)=>[e,`, `,t])}{let e=V;return e?W[e]?W[e].label:e:null}},K=e=>{let t;b?t=e:(t=e[0]||``,F(!1),z.current?.focus()),B||L(t),f&&f(t)},q=()=>{if(y)return;let e=b?[]:``;B||L(e),f&&f(e)},oe=(0,s.useMemo)(()=>u(e),[e]),J=(0,s.useMemo)(()=>b?Array.isArray(V)?V:[]:V?[V]:[],[V,b]),Y=G(),{"aria-label":X,"aria-labelledby":Z,"aria-describedby":se,...ce}=re,Q=typeof p==`string`?p:`Select`,le=O?t.Root:`div`,$=r.useMergedRef(R,ie);return(0,l.jsx)(a.FieldTemplate,{label:m,error:h,required:g,layout:_,labelId:A,errorId:j,className:(0,c.default)(o.default.container,v),children:(0,l.jsxs)(le,{className:(0,c.default)(`wim-tree-select`,o.default.root,D&&o.default.fullWidth),ref:$,...ce,children:[(0,l.jsx)(t.Slottable,{children:ne}),(0,l.jsx)(i.InputBase,{disabled:y,allowClear:C,hasValue:!!Y,onClear:q,intent:h?`danger`:`default`,width:E,fullWidth:D,rightIcons:[{name:`ChevronDownIcon`,rotated:P,onClick:H,decorative:!0}],className:(0,c.default)(P&&o.default.open),children:(0,l.jsx)(`div`,{id:M,className:(0,c.default)(o.default.trigger,y&&o.default.disabled),onClick:H,onKeyDown:U,tabIndex:y?-1:0,role:`combobox`,"aria-expanded":P,"aria-haspopup":`tree`,"aria-controls":P?N:void 0,"aria-disabled":y,"aria-labelledby":A||Z,"aria-label":m?void 0:X||Q,"aria-describedby":j||se,"aria-required":g,"aria-invalid":!!h,ref:z,children:(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,!Y&&o.default.placeholder),children:Y||p})})}),(0,l.jsx)(n.Transition,{show:P&&!y,preset:`fade`,className:o.default.dropdown,children:(0,l.jsx)(`div`,{id:N,children:(0,l.jsx)(ee.FocusTrap,{active:P,initialFocus:!1,children:(0,l.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":A||Z,"aria-label":m?void 0:X||Q,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),F(!1),z.current?.focus())},children:(0,l.jsx)(te.TreeView,{multiSelect:b,defaultSelectedValues:J,defaultCheckedValues:b?J:[],nodes:oe,onCheckedChange:K,onSelectedChange:K,checkable:b,checkStrategy:w,searchable:x,defaultExpandedValues:S,styles:{root:o.default.treeView,item:o.default.treeViewItem,search:o.default.treeViewSearch}})})})})})]})})});d.displayName=`TreeSelect`,exports.TreeSelect=d;
|
|
@@ -102,7 +102,8 @@ var _ = s(({ treeData: s = [], value: _, onChange: v, placeholder: y, label: b,
|
|
|
102
102
|
rightIcons: [{
|
|
103
103
|
name: "ChevronDownIcon",
|
|
104
104
|
rotated: R,
|
|
105
|
-
onClick: K
|
|
105
|
+
onClick: K,
|
|
106
|
+
decorative: !0
|
|
106
107
|
}],
|
|
107
108
|
className: p(R && o.open),
|
|
108
109
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -142,6 +143,9 @@ var _ = s(({ treeData: s = [], value: _, onChange: v, placeholder: y, label: b,
|
|
|
142
143
|
"aria-modal": "true",
|
|
143
144
|
"aria-labelledby": P || Q,
|
|
144
145
|
"aria-label": b ? void 0 : Z || $,
|
|
146
|
+
onKeyDown: (e) => {
|
|
147
|
+
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), z(!1), U.current?.focus());
|
|
148
|
+
},
|
|
145
149
|
children: /* @__PURE__ */ m(te, {
|
|
146
150
|
multiSelect: E,
|
|
147
151
|
defaultSelectedValues: Y,
|
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.51.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
|
|
|
@@ -1010,6 +1010,10 @@ Useful for using the button styles with Link components (e.g. from React Router
|
|
|
1010
1010
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1011
1011
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1012
1012
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1013
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1014
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1015
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1016
|
+
@default false
|
|
1013
1017
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1014
1018
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1015
1019
|
so the unit does not have to be repeated in the label.
|
|
@@ -1038,6 +1042,10 @@ so the unit does not have to be repeated in the label.
|
|
|
1038
1042
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1039
1043
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1040
1044
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1045
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1046
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1047
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1048
|
+
@default false
|
|
1041
1049
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1042
1050
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1043
1051
|
so the unit does not have to be repeated in the label.
|
|
@@ -1109,6 +1117,10 @@ so the unit does not have to be repeated in the label.
|
|
|
1109
1117
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1110
1118
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1111
1119
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1120
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1121
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1122
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1123
|
+
@default false
|
|
1112
1124
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1113
1125
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1114
1126
|
so the unit does not have to be repeated in the label.
|
|
@@ -1287,6 +1299,10 @@ SCSS には誰も付けない `.default_intent` が「temporary name」のまま
|
|
|
1287
1299
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1288
1300
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1289
1301
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1302
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1303
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1304
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1305
|
+
@default false
|
|
1290
1306
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1291
1307
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1292
1308
|
so the unit does not have to be repeated in the label.
|
|
@@ -1343,6 +1359,10 @@ make room rather than running underneath it.
|
|
|
1343
1359
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1344
1360
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1345
1361
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1362
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1363
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1364
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1365
|
+
@default false
|
|
1346
1366
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1347
1367
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1348
1368
|
so the unit does not have to be repeated in the label.
|
|
@@ -1419,6 +1439,10 @@ box and receives a **1-based** position — the first box is `1`, not `0`.
|
|
|
1419
1439
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1420
1440
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1421
1441
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1442
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1443
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1444
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1445
|
+
@default false
|
|
1422
1446
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1423
1447
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1424
1448
|
so the unit does not have to be repeated in the label.
|
|
@@ -1579,6 +1603,10 @@ and image files pasted or dropped into the editor are uploaded and inserted. The
|
|
|
1579
1603
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1580
1604
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1581
1605
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1606
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1607
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1608
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1609
|
+
@default false
|
|
1582
1610
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1583
1611
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1584
1612
|
so the unit does not have to be repeated in the label.
|
|
@@ -1761,6 +1789,10 @@ but the toggle only shows a chevron, so it needs one of its own.
|
|
|
1761
1789
|
- `showPasswordAriaLabel: string` — Aria label for the show-password toggle
|
|
1762
1790
|
- `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
|
|
1763
1791
|
- `rightIconAriaLabel: string` — Aria label for the right icon button
|
|
1792
|
+
- `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
|
|
1793
|
+
clickable but leaves the tab order and is hidden from assistive technology.
|
|
1794
|
+
Use it when the field already does the same thing from the keyboard.
|
|
1795
|
+
@default false
|
|
1764
1796
|
- `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
|
|
1765
1797
|
`kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
|
|
1766
1798
|
so the unit does not have to be repeated in the label.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.51.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
|
|