wimui 0.78.0 → 0.79.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/README.ja.md +2 -2
- package/README.md +2 -2
- package/dist/components/ai/InteractiveGraph/InteractiveGraph.cjs +1 -1
- package/dist/components/ai/InteractiveGraph/InteractiveGraph.js +22 -37
- package/dist/components/ai/InteractiveGraph/interactive-graph.module.cjs +1 -1
- package/dist/components/ai/InteractiveGraph/interactive-graph.module.js +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +136 -111
- package/dist/components/data-display/DataGrid/useDataGridKeyboard.cjs +1 -1
- package/dist/components/data-display/DataGrid/useDataGridKeyboard.js +23 -23
- package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
- package/dist/components/data-display/NodeGraph/NodeGraph.js +69 -66
- package/dist/components/data-display/NodeGraph/node-graph.module.cjs +1 -1
- package/dist/components/data-display/NodeGraph/node-graph.module.js +1 -1
- package/dist/components/form/Cascader/cascader.module.cjs +1 -1
- package/dist/components/form/Cascader/cascader.module.js +7 -6
- package/dist/components/form/OtpInput/OtpInput.cjs +1 -1
- package/dist/components/form/OtpInput/OtpInput.d.ts +5 -0
- package/dist/components/form/OtpInput/OtpInput.js +48 -41
- package/dist/components/form/SignaturePad/signature-pad.module.cjs +1 -1
- package/dist/components/form/SignaturePad/signature-pad.module.js +7 -6
- package/dist/components/form/Transfer/transfer.module.cjs +1 -1
- package/dist/components/form/Transfer/transfer.module.js +7 -6
- package/dist/components/form/TreeSelect/tree-select.module.cjs +1 -1
- package/dist/components/form/TreeSelect/tree-select.module.js +7 -6
- package/dist/llms/Alert.md +3 -1
- package/dist/llms/Anchor.md +1 -1
- package/dist/llms/AvatarGroup.md +1 -1
- package/dist/llms/Breadcrumb.md +1 -1
- package/dist/llms/CodeDiffViewer.md +2 -0
- package/dist/llms/Combobox.md +1 -1
- package/dist/llms/CommandPalette.md +1 -1
- package/dist/llms/CopyButton.md +1 -1
- package/dist/llms/Countdown.md +2 -0
- package/dist/llms/DatePicker.md +4 -0
- package/dist/llms/DateRangePicker.md +4 -0
- package/dist/llms/DescriptionList.md +2 -0
- package/dist/llms/EmptyState.md +1 -1
- package/dist/llms/Group.md +2 -0
- package/dist/llms/Highlight.md +2 -0
- package/dist/llms/InlineEdit.md +1 -1
- package/dist/llms/InputGroup.md +2 -0
- package/dist/llms/JsonViewer.md +2 -0
- package/dist/llms/Kbd.md +2 -0
- package/dist/llms/KeyboardShortcuts.md +4 -0
- package/dist/llms/LinkButton.md +2 -0
- package/dist/llms/List.md +1 -1
- package/dist/llms/NumberInput.md +1 -1
- package/dist/llms/OtpInput.md +1 -0
- package/dist/llms/Presence.md +2 -0
- package/dist/llms/ProgressRing.md +2 -0
- package/dist/llms/Rating.md +1 -1
- package/dist/llms/SegmentedControl.md +1 -1
- package/dist/llms/Stepper.md +1 -1
- package/dist/llms/Switch.md +2 -0
- package/dist/llms/Table.md +1 -1
- package/dist/llms/TagInput.md +1 -1
- package/dist/llms/ThemeToggle.md +2 -0
- package/dist/llms/Title.md +2 -0
- package/dist/llms/TreeView.md +1 -1
- package/dist/llms-full.txt +49 -34
- package/dist/llms.txt +47 -34
- package/dist/reset.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +1 -1
- package/package.json +20 -17
|
@@ -2,148 +2,151 @@
|
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
3
|
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
4
|
import n from "../../../icon/plus.js";
|
|
5
|
-
import
|
|
6
|
-
import { Icon as
|
|
5
|
+
import ee from "../../../icon/trash.js";
|
|
6
|
+
import { Icon as r } from "../../media/Icon/Icon.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Background as
|
|
8
|
+
import i from "./node-graph.module.js";
|
|
9
|
+
import a, { useCallback as o, useEffect as s, useMemo as c, useRef as te, useState as l } from "react";
|
|
10
|
+
import u from "classnames";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { Background as p, BackgroundVariant as m, Controls as ne, EdgeChangeset as re, MiniMap as ie, NodeChangeset as h, ReactFlow as ae } from "@xyflow/react";
|
|
13
13
|
//#region src/components/data-display/NodeGraph/NodeGraph.tsx
|
|
14
|
-
var
|
|
15
|
-
function
|
|
14
|
+
var oe = ["Backspace", "Delete"], g = 180, _ = 80;
|
|
15
|
+
function v(e) {
|
|
16
16
|
let t = 1, n = new Set(e.map((e) => e.id));
|
|
17
17
|
for (; n.has(`node-${t}`);) t += 1;
|
|
18
18
|
return `node-${t}`;
|
|
19
19
|
}
|
|
20
20
|
function y(e) {
|
|
21
21
|
if (e.length === 0) return {
|
|
22
|
-
x:
|
|
23
|
-
y:
|
|
22
|
+
x: _,
|
|
23
|
+
y: _
|
|
24
24
|
};
|
|
25
|
-
let t = Math.max(...e.map((e) => e.position.x)), n = e[e.length - 1]?.position.y ??
|
|
25
|
+
let t = Math.max(...e.map((e) => e.position.x)), n = e[e.length - 1]?.position.y ?? _;
|
|
26
26
|
return {
|
|
27
|
-
x: t +
|
|
27
|
+
x: t + g,
|
|
28
28
|
y: n
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
var b =
|
|
32
|
-
let { t: F } = e(t), I = M ?? F("nodeGraph.label"), L = F("nodeGraph.add_node"), R = F("nodeGraph.node_name"), z = F("nodeGraph.new_node"), B = F("a11y.delete"), V = T === void 0 ? [...
|
|
33
|
-
|
|
31
|
+
var b = a.forwardRef(({ nodes: a, edges: g, onNodesChange: _, onEdgesChange: b, onConnect: se, nodeTypes: x, edgeTypes: S, nodesDraggable: C = !0, nodesConnectable: w = !0, deleteKeyCode: T, showMiniMap: ce = !1, showControls: E = !0, backgroundVariant: D = m.Dots, fitView: O = !0, fitViewOptions: k, defaultEdgeOptions: A, className: j, "aria-label": M, ...N }, P) => {
|
|
32
|
+
let { t: F } = e(t), I = M ?? F("nodeGraph.label"), L = F("nodeGraph.add_node"), R = F("nodeGraph.node_name"), z = F("nodeGraph.new_node"), B = F("a11y.delete"), V = T === void 0 ? [...oe] : T, H = V != null, [U, W] = l(!1), [G, K] = l(""), q = te(null), J = c(() => a.filter((e) => e.selected), [a]), Y = c(() => g.filter((e) => e.selected), [g]), X = J.length > 0 || Y.length > 0, Z = G.trim(), le = V == null ? void 0 : Array.isArray(V) ? V.join(" ") : V;
|
|
33
|
+
s(() => {
|
|
34
34
|
U && q.current?.focus();
|
|
35
35
|
}, [U]);
|
|
36
|
-
let Q =
|
|
37
|
-
H
|
|
36
|
+
let Q = o(() => {
|
|
37
|
+
if (!H || !Z) return;
|
|
38
|
+
let e = v(a);
|
|
39
|
+
_(new h([{
|
|
38
40
|
type: "add",
|
|
41
|
+
id: e,
|
|
39
42
|
item: {
|
|
40
|
-
id:
|
|
41
|
-
position: y(
|
|
43
|
+
id: e,
|
|
44
|
+
position: y(a),
|
|
42
45
|
data: { label: Z }
|
|
43
46
|
}
|
|
44
|
-
}]), W(!1), K("")
|
|
47
|
+
}])), W(!1), K("");
|
|
45
48
|
}, [
|
|
46
49
|
H,
|
|
47
50
|
Z,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]),
|
|
51
|
+
a,
|
|
52
|
+
_
|
|
53
|
+
]), ue = o(() => {
|
|
51
54
|
H && (U ? Q() : W(!0));
|
|
52
55
|
}, [
|
|
53
56
|
H,
|
|
54
57
|
U,
|
|
55
58
|
Q
|
|
56
|
-
]),
|
|
59
|
+
]), de = o((e) => {
|
|
57
60
|
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), Q()), e.key === "Escape" && (e.preventDefault(), W(!1), K(""));
|
|
58
|
-
}, [Q]),
|
|
61
|
+
}, [Q]), fe = o(() => {
|
|
59
62
|
if (!H || !X) return;
|
|
60
63
|
let e = new Set(J.map((e) => e.id)), t = new Set(Y.map((e) => e.id));
|
|
61
|
-
for (let n of
|
|
62
|
-
t.size > 0 && b([...t].map((e) => ({
|
|
64
|
+
for (let n of g) (e.has(n.source) || e.has(n.target)) && t.add(n.id);
|
|
65
|
+
t.size > 0 && b(new re([...t].map((e) => ({
|
|
63
66
|
type: "remove",
|
|
64
67
|
id: e
|
|
65
|
-
}))), e.size > 0 &&
|
|
68
|
+
})))), e.size > 0 && _(new h([...e].map((e) => ({
|
|
66
69
|
type: "remove",
|
|
67
70
|
id: e
|
|
68
|
-
})));
|
|
71
|
+
}))));
|
|
69
72
|
}, [
|
|
70
73
|
H,
|
|
71
74
|
X,
|
|
72
75
|
J,
|
|
73
76
|
Y,
|
|
74
|
-
|
|
77
|
+
g,
|
|
75
78
|
b,
|
|
76
|
-
|
|
77
|
-
]), $ =
|
|
79
|
+
_
|
|
80
|
+
]), $ = o((e) => {
|
|
78
81
|
e.stopPropagation();
|
|
79
82
|
}, []);
|
|
80
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ f("div", {
|
|
81
84
|
ref: P,
|
|
82
|
-
className:
|
|
85
|
+
className: u("wim-node-graph", i.root, j),
|
|
83
86
|
role: "region",
|
|
84
87
|
"aria-label": I,
|
|
85
88
|
...N,
|
|
86
|
-
children: [/* @__PURE__ */
|
|
87
|
-
nodes:
|
|
88
|
-
edges:
|
|
89
|
-
onNodesChange:
|
|
89
|
+
children: [/* @__PURE__ */ f(ae, {
|
|
90
|
+
nodes: a,
|
|
91
|
+
edges: g,
|
|
92
|
+
onNodesChange: _,
|
|
90
93
|
onEdgesChange: b,
|
|
91
|
-
onConnect:
|
|
92
|
-
nodeTypes:
|
|
93
|
-
edgeTypes:
|
|
94
|
-
nodesDraggable:
|
|
95
|
-
nodesConnectable:
|
|
94
|
+
onConnect: se,
|
|
95
|
+
nodeTypes: x,
|
|
96
|
+
edgeTypes: S,
|
|
97
|
+
nodesDraggable: C,
|
|
98
|
+
nodesConnectable: w,
|
|
96
99
|
deleteKeyCode: V,
|
|
97
100
|
fitView: O,
|
|
98
101
|
fitViewOptions: k,
|
|
99
102
|
defaultEdgeOptions: A,
|
|
100
|
-
className:
|
|
103
|
+
className: i.flow,
|
|
101
104
|
children: [
|
|
102
|
-
/* @__PURE__ */ p
|
|
105
|
+
/* @__PURE__ */ d(p, {
|
|
103
106
|
variant: D,
|
|
104
|
-
className:
|
|
107
|
+
className: i.background
|
|
105
108
|
}),
|
|
106
|
-
E && /* @__PURE__ */
|
|
107
|
-
|
|
109
|
+
E && /* @__PURE__ */ d(ne, { className: i.controls }),
|
|
110
|
+
ce && /* @__PURE__ */ d(ie, { className: i.miniMap })
|
|
108
111
|
]
|
|
109
|
-
}), H && /* @__PURE__ */
|
|
110
|
-
className:
|
|
111
|
-
children: [U && /* @__PURE__ */
|
|
112
|
+
}), H && /* @__PURE__ */ f("div", {
|
|
113
|
+
className: i.tools,
|
|
114
|
+
children: [U && /* @__PURE__ */ d("input", {
|
|
112
115
|
ref: q,
|
|
113
|
-
className:
|
|
116
|
+
className: u("nodrag", "nopan", i.name),
|
|
114
117
|
value: G,
|
|
115
118
|
onChange: (e) => K(e.target.value),
|
|
116
|
-
onKeyDown:
|
|
119
|
+
onKeyDown: de,
|
|
117
120
|
onPointerDown: $,
|
|
118
121
|
onMouseDown: $,
|
|
119
122
|
"aria-label": R,
|
|
120
123
|
placeholder: z
|
|
121
|
-
}), /* @__PURE__ */
|
|
122
|
-
className:
|
|
123
|
-
children: [/* @__PURE__ */
|
|
124
|
+
}), /* @__PURE__ */ f("div", {
|
|
125
|
+
className: i.toolRow,
|
|
126
|
+
children: [/* @__PURE__ */ f("button", {
|
|
124
127
|
type: "button",
|
|
125
|
-
className:
|
|
128
|
+
className: u("nodrag", "nopan", i.tool),
|
|
126
129
|
disabled: U && !Z,
|
|
127
|
-
onClick:
|
|
130
|
+
onClick: ue,
|
|
128
131
|
onPointerDown: $,
|
|
129
132
|
onMouseDown: $,
|
|
130
133
|
"aria-label": L,
|
|
131
134
|
"aria-expanded": U,
|
|
132
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ d(r, {
|
|
133
136
|
component: n,
|
|
134
137
|
size: "sm"
|
|
135
138
|
}), L]
|
|
136
|
-
}), /* @__PURE__ */
|
|
139
|
+
}), /* @__PURE__ */ f("button", {
|
|
137
140
|
type: "button",
|
|
138
|
-
className:
|
|
141
|
+
className: u("nodrag", "nopan", i.tool),
|
|
139
142
|
disabled: !X,
|
|
140
|
-
onClick:
|
|
143
|
+
onClick: fe,
|
|
141
144
|
onPointerDown: $,
|
|
142
145
|
onMouseDown: $,
|
|
143
146
|
"aria-label": B,
|
|
144
|
-
"aria-keyshortcuts":
|
|
145
|
-
children: [/* @__PURE__ */
|
|
146
|
-
component:
|
|
147
|
+
"aria-keyshortcuts": le,
|
|
148
|
+
children: [/* @__PURE__ */ d(r, {
|
|
149
|
+
component: ee,
|
|
147
150
|
size: "sm"
|
|
148
151
|
}), B]
|
|
149
152
|
})]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1brv9_3`,t=`_tools_1brv9_21`,n=`_toolRow_1brv9_32`,r=`_name_1brv9_36`,i=`_tool_1brv9_21`,a=`_flow_1brv9_94`,o=`_background_1brv9_94`,s=`_controls_1brv9_95`,c=`_miniMap_1brv9_95`,l={root:e,tools:t,toolRow:n,name:r,tool:i,flow:a,background:o,controls:s,miniMap:c};exports.background=o,exports.controls=s,exports.default=l,exports.flow=a,exports.miniMap=c,exports.name=r,exports.root=e,exports.tool=i,exports.toolRow=n,exports.tools=t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/NodeGraph/node-graph.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1brv9_3", t = "_tools_1brv9_21", n = "_toolRow_1brv9_32", r = "_name_1brv9_36", i = "_tool_1brv9_21", a = "_flow_1brv9_94", o = "_background_1brv9_94", s = "_controls_1brv9_95", c = "_miniMap_1brv9_95", l = {
|
|
4
4
|
root: e,
|
|
5
5
|
tools: t,
|
|
6
6
|
toolRow: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1rnyk_333`,t=`_label_1rnyk_338`,n=`_trigger_1rnyk_345`,r=`_disabled_1rnyk_358`,i=`_open_1rnyk_364`,a=`_value_1rnyk_372`,o=`_placeholder_1rnyk_373`,s=`_icon_1rnyk_376`,c=`_clear_1rnyk_396`,l=`_dropdown_1rnyk_408`,u=`_menu_1rnyk_438`,d=`_menuItem_1rnyk_467`,f=`_active_1rnyk_467`,p=`_selected_1rnyk_475`,m={"wim-docs-container":`_wim-docs-container_1rnyk_87`,"wim-t":`_wim-t_1rnyk_292`,"react-flow":`_react-flow_1rnyk_315`,"react-flow__edges":`_react-flow__edges_1rnyk_316`,"react-flow__connectionline":`_react-flow__connectionline_1rnyk_317`,"react-flow__background":`_react-flow__background_1rnyk_326`,root:e,label:t,trigger:n,disabled:r,open:i,value:a,placeholder:o,icon:s,clear:c,dropdown:l,menu:u,menuItem:d,active:f,selected:p};exports.active=f,exports.clear=c,exports.default=m,exports.disabled=r,exports.dropdown=l,exports.icon=s,exports.label=t,exports.menu=u,exports.menuItem=d,exports.open=i,exports.placeholder=o,exports.root=e,exports.selected=p,exports.trigger=n,exports.value=a;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/Cascader/cascader.module.scss
|
|
3
|
-
var e = "
|
|
4
|
-
"wim-docs-container": "_wim-docs-
|
|
5
|
-
"wim-t": "_wim-
|
|
6
|
-
"react-flow": "_react-
|
|
7
|
-
"react-flow__edges": "_react-
|
|
8
|
-
"react-flow__connectionline": "_react-
|
|
3
|
+
var e = "_root_1rnyk_333", t = "_label_1rnyk_338", n = "_trigger_1rnyk_345", r = "_disabled_1rnyk_358", i = "_open_1rnyk_364", a = "_value_1rnyk_372", o = "_placeholder_1rnyk_373", s = "_icon_1rnyk_376", c = "_clear_1rnyk_396", l = "_dropdown_1rnyk_408", u = "_menu_1rnyk_438", d = "_menuItem_1rnyk_467", f = "_active_1rnyk_467", p = "_selected_1rnyk_475", m = {
|
|
4
|
+
"wim-docs-container": "_wim-docs-container_1rnyk_87",
|
|
5
|
+
"wim-t": "_wim-t_1rnyk_292",
|
|
6
|
+
"react-flow": "_react-flow_1rnyk_315",
|
|
7
|
+
"react-flow__edges": "_react-flow__edges_1rnyk_316",
|
|
8
|
+
"react-flow__connectionline": "_react-flow__connectionline_1rnyk_317",
|
|
9
|
+
"react-flow__background": "_react-flow__background_1rnyk_326",
|
|
9
10
|
root: e,
|
|
10
11
|
label: t,
|
|
11
12
|
trigger: n,
|
|
@@ -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("../FieldTemplate/FieldTemplate.cjs"),r=require("./otp-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=(e,t)=>{let n=e.split(``).slice(0,t);return Array(t).fill(``).map((e,t)=>n[t]??``)},c=(0,i.forwardRef)(({length:e=6,value:c=``,onChange:l,disabled:u=!1,error:d,required:f,label:p,layout:m,className:h,labels:g={},asChild:_=!1,fullWidth:v=!1,children:
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../FieldTemplate/FieldTemplate.cjs"),r=require("./otp-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=(e,t)=>{let n=e.split(``).slice(0,t);return Array(t).fill(``).map((e,t)=>n[t]??``)},c=(0,i.forwardRef)(({length:e=6,value:c=``,onChange:l,disabled:u=!1,error:d,required:f,label:p,layout:m,className:h,labels:g={},asChild:_=!1,fullWidth:v=!1,inputMode:y=`numeric`,children:b,"aria-label":x,"aria-labelledby":S,"aria-describedby":C,...w},T)=>{let{digitAriaLabel:E=e=>`Digit ${e}`}=g,[D,O]=(0,i.useState)(()=>s(c,e)),[k,A]=(0,i.useState)(c),j=(0,i.useRef)([]),M=`wim-otp-input-${(0,i.useId)()}`,N=p?`${M}-label`:void 0,P=d?`${M}-error`:void 0,F=N??S,I=[C,P].filter(Boolean).join(` `)||void 0;c!==k&&(A(c),O(s(c,e)));let L=e=>{let t=e.join(``);l&&l(t)},R=(t,n)=>{let r=t.target.value,i=D[n],a=i&&r.startsWith(i)?r.slice(i.length):i&&r.endsWith(i)?r.slice(0,-i.length):r;if(a.length>1){B(n,a);return}let o=r.slice(-1),s=[...D];s[n]=o,O(s),L(s),o&&n<e-1&&j.current[n+1]?.focus()},z=(t,n)=>{if(t.key===`Backspace`){if(!D[n]&&n>0){let e=[...D];e[n-1]=``,O(e),L(e),j.current[n-1]?.focus()}else if(D[n]){let e=[...D];e[n]=``,O(e),L(e)}}else t.key===`ArrowLeft`&&n>0?(t.preventDefault(),j.current[n-1]?.focus()):t.key===`ArrowRight`&&n<e-1&&(t.preventDefault(),j.current[n+1]?.focus())},B=(t,n)=>{let r=n.slice(0,e-t).split(``),i=[...D];r.forEach((e,n)=>{i[t+n]=e}),O(i),L(i);let a=Math.min(t+r.length,e-1);j.current[a]?.focus()},V=e=>{e.preventDefault(),B(0,e.clipboardData.getData(`text`))},H=_?t.Root:`div`;return(0,o.jsx)(n.FieldTemplate,{label:p,error:d,required:f,layout:m,labelId:N,htmlFor:M,errorId:P,className:(0,a.default)(h,v&&r.default.fullWidth),children:(0,o.jsxs)(H,{className:(0,a.default)(`wim-otp-input`,r.default.root,v&&r.default.fullWidth),ref:T,...w,children:[(0,o.jsx)(`div`,{className:(0,a.default)(r.default.container,u&&r.default.disabled),role:`group`,"aria-labelledby":F,"aria-label":F?void 0:x,"data-testid":`otp-input-container`,"data-disabled":u,children:Array.from({length:e}).map((e,t)=>(0,o.jsx)(`input`,{id:t===0?M:void 0,ref:e=>{j.current[t]=e},"data-testid":`otp-input`,className:(0,a.default)(r.default.input,d&&r.default.danger,u&&r.default.disabled),type:`text`,autoComplete:t===0?`one-time-code`:`off`,inputMode:y,value:D[t],onChange:e=>R(e,t),onKeyDown:e=>z(e,t),onPaste:V,disabled:u,"aria-label":E(t+1),"aria-invalid":d?`true`:`false`,"aria-describedby":I,"aria-required":f?`true`:void 0},t))}),(0,o.jsx)(t.Slottable,{children:b})]})})});c.displayName=`OtpInput`,exports.OtpInput=c,exports.default=c;
|
|
@@ -39,6 +39,11 @@ export interface OtpInputProps extends Omit<React.ComponentPropsWithoutRef<"div"
|
|
|
39
39
|
asChild?: boolean;
|
|
40
40
|
/** Whether to take full width of parent */
|
|
41
41
|
fullWidth?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Keyboard shown on touch devices. Use `"text"` for codes that contain letters.
|
|
44
|
+
* @default "numeric"
|
|
45
|
+
*/
|
|
46
|
+
inputMode?: "numeric" | "text";
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* Component for entering an OTP (one-time password).
|
|
@@ -9,74 +9,81 @@ import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
|
9
9
|
var d = (e, t) => {
|
|
10
10
|
let n = e.split("").slice(0, t);
|
|
11
11
|
return Array(t).fill("").map((e, t) => n[t] ?? "");
|
|
12
|
-
}, f = i(({ length: i = 6, value: f = "", onChange: p, disabled: m = !1, error: h, required: g, label: _, layout: v, className: y, labels: b = {}, asChild: x = !1, fullWidth: S = !1,
|
|
13
|
-
let { digitAriaLabel:
|
|
14
|
-
f !==
|
|
15
|
-
let
|
|
12
|
+
}, f = i(({ length: i = 6, value: f = "", onChange: p, disabled: m = !1, error: h, required: g, label: _, layout: v, className: y, labels: b = {}, asChild: x = !1, fullWidth: S = !1, inputMode: C = "numeric", children: w, "aria-label": T, "aria-labelledby": E, "aria-describedby": D, ...O }, k) => {
|
|
13
|
+
let { digitAriaLabel: A = (e) => `Digit ${e}` } = b, [j, M] = s(() => d(f, i)), [N, P] = s(f), F = o([]), I = `wim-otp-input-${a()}`, L = _ ? `${I}-label` : void 0, R = h ? `${I}-error` : void 0, z = L ?? E, B = [D, R].filter(Boolean).join(" ") || void 0;
|
|
14
|
+
f !== N && (P(f), M(d(f, i)));
|
|
15
|
+
let V = (e) => {
|
|
16
16
|
let t = e.join("");
|
|
17
17
|
p && p(t);
|
|
18
|
-
}, V = (e, t) => {
|
|
19
|
-
let n = e.target.value.slice(-1), r = [...A];
|
|
20
|
-
r[t] = n, j(r), B(r), n && t < i - 1 && P.current[t + 1]?.focus();
|
|
21
18
|
}, H = (e, t) => {
|
|
19
|
+
let n = e.target.value, r = j[t], a = r && n.startsWith(r) ? n.slice(r.length) : r && n.endsWith(r) ? n.slice(0, -r.length) : n;
|
|
20
|
+
if (a.length > 1) {
|
|
21
|
+
W(t, a);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let o = n.slice(-1), s = [...j];
|
|
25
|
+
s[t] = o, M(s), V(s), o && t < i - 1 && F.current[t + 1]?.focus();
|
|
26
|
+
}, U = (e, t) => {
|
|
22
27
|
if (e.key === "Backspace") {
|
|
23
|
-
if (!
|
|
24
|
-
let e = [...
|
|
25
|
-
e[t - 1] = "",
|
|
26
|
-
} else if (
|
|
27
|
-
let e = [...
|
|
28
|
-
e[t] = "",
|
|
28
|
+
if (!j[t] && t > 0) {
|
|
29
|
+
let e = [...j];
|
|
30
|
+
e[t - 1] = "", M(e), V(e), F.current[t - 1]?.focus();
|
|
31
|
+
} else if (j[t]) {
|
|
32
|
+
let e = [...j];
|
|
33
|
+
e[t] = "", M(e), V(e);
|
|
29
34
|
}
|
|
30
|
-
} else e.key === "ArrowLeft" && t > 0 ? (e.preventDefault(),
|
|
31
|
-
},
|
|
32
|
-
e.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
} else e.key === "ArrowLeft" && t > 0 ? (e.preventDefault(), F.current[t - 1]?.focus()) : e.key === "ArrowRight" && t < i - 1 && (e.preventDefault(), F.current[t + 1]?.focus());
|
|
36
|
+
}, W = (e, t) => {
|
|
37
|
+
let n = t.slice(0, i - e).split(""), r = [...j];
|
|
38
|
+
n.forEach((t, n) => {
|
|
39
|
+
r[e + n] = t;
|
|
40
|
+
}), M(r), V(r);
|
|
41
|
+
let a = Math.min(e + n.length, i - 1);
|
|
42
|
+
F.current[a]?.focus();
|
|
43
|
+
}, G = (e) => {
|
|
44
|
+
e.preventDefault(), W(0, e.clipboardData.getData("text"));
|
|
45
|
+
}, K = x ? e : "div";
|
|
40
46
|
return /* @__PURE__ */ l(n, {
|
|
41
47
|
label: _,
|
|
42
48
|
error: h,
|
|
43
49
|
required: g,
|
|
44
50
|
layout: v,
|
|
45
|
-
labelId:
|
|
46
|
-
htmlFor:
|
|
47
|
-
errorId:
|
|
51
|
+
labelId: L,
|
|
52
|
+
htmlFor: I,
|
|
53
|
+
errorId: R,
|
|
48
54
|
className: c(y, S && r.fullWidth),
|
|
49
|
-
children: /* @__PURE__ */ u(
|
|
55
|
+
children: /* @__PURE__ */ u(K, {
|
|
50
56
|
className: c("wim-otp-input", r.root, S && r.fullWidth),
|
|
51
|
-
ref:
|
|
52
|
-
...
|
|
57
|
+
ref: k,
|
|
58
|
+
...O,
|
|
53
59
|
children: [/* @__PURE__ */ l("div", {
|
|
54
60
|
className: c(r.container, m && r.disabled),
|
|
55
61
|
role: "group",
|
|
56
|
-
"aria-labelledby":
|
|
57
|
-
"aria-label":
|
|
62
|
+
"aria-labelledby": z,
|
|
63
|
+
"aria-label": z ? void 0 : T,
|
|
58
64
|
"data-testid": "otp-input-container",
|
|
59
65
|
"data-disabled": m,
|
|
60
66
|
children: Array.from({ length: i }).map((e, t) => /* @__PURE__ */ l("input", {
|
|
61
|
-
id: t === 0 ?
|
|
67
|
+
id: t === 0 ? I : void 0,
|
|
62
68
|
ref: (e) => {
|
|
63
|
-
|
|
69
|
+
F.current[t] = e;
|
|
64
70
|
},
|
|
65
71
|
"data-testid": "otp-input",
|
|
66
72
|
className: c(r.input, h && r.danger, m && r.disabled),
|
|
67
73
|
type: "text",
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
75
|
+
inputMode: C,
|
|
76
|
+
value: j[t],
|
|
77
|
+
onChange: (e) => H(e, t),
|
|
78
|
+
onKeyDown: (e) => U(e, t),
|
|
79
|
+
onPaste: G,
|
|
73
80
|
disabled: m,
|
|
74
|
-
"aria-label":
|
|
81
|
+
"aria-label": A(t + 1),
|
|
75
82
|
"aria-invalid": h ? "true" : "false",
|
|
76
|
-
"aria-describedby":
|
|
83
|
+
"aria-describedby": B,
|
|
77
84
|
"aria-required": g ? "true" : void 0
|
|
78
85
|
}, t))
|
|
79
|
-
}), /* @__PURE__ */ l(t, { children:
|
|
86
|
+
}), /* @__PURE__ */ l(t, { children: w })]
|
|
80
87
|
})
|
|
81
88
|
});
|
|
82
89
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_cqhmc_345`,t=`_disabled_cqhmc_363`,n=`_canvasContainer_cqhmc_367`,r=`_danger_cqhmc_336`,i=`_canvas_cqhmc_367`,a=`_footer_cqhmc_391`,o={"wim-docs-container":`_wim-docs-container_cqhmc_87`,"wim-t":`_wim-t_cqhmc_292`,"react-flow":`_react-flow_cqhmc_315`,"react-flow__edges":`_react-flow__edges_cqhmc_316`,"react-flow__connectionline":`_react-flow__connectionline_cqhmc_317`,"react-flow__background":`_react-flow__background_cqhmc_326`,root:e,disabled:t,canvasContainer:n,danger:r,canvas:i,footer:a};exports.canvas=i,exports.canvasContainer=n,exports.danger=r,exports.default=o,exports.disabled=t,exports.footer=a,exports.root=e;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/SignaturePad/signature-pad.module.scss
|
|
3
|
-
var e = "
|
|
4
|
-
"wim-docs-container": "_wim-docs-
|
|
5
|
-
"wim-t": "_wim-
|
|
6
|
-
"react-flow": "_react-
|
|
7
|
-
"react-flow__edges": "_react-
|
|
8
|
-
"react-flow__connectionline": "_react-
|
|
3
|
+
var e = "_root_cqhmc_345", t = "_disabled_cqhmc_363", n = "_canvasContainer_cqhmc_367", r = "_danger_cqhmc_336", i = "_canvas_cqhmc_367", a = "_footer_cqhmc_391", o = {
|
|
4
|
+
"wim-docs-container": "_wim-docs-container_cqhmc_87",
|
|
5
|
+
"wim-t": "_wim-t_cqhmc_292",
|
|
6
|
+
"react-flow": "_react-flow_cqhmc_315",
|
|
7
|
+
"react-flow__edges": "_react-flow__edges_cqhmc_316",
|
|
8
|
+
"react-flow__connectionline": "_react-flow__connectionline_cqhmc_317",
|
|
9
|
+
"react-flow__background": "_react-flow__background_cqhmc_326",
|
|
9
10
|
root: e,
|
|
10
11
|
disabled: t,
|
|
11
12
|
canvasContainer: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_1pc97_363`,t=`_root_1pc97_372`,n=`_list_1pc97_391`,r=`_header_1pc97_419`,i=`_headerTitle_1pc97_434`,a=`_disabled_1pc97_440`,o=`_headerCount_1pc97_449`,s=`_body_1pc97_459`,c=`_itemList_1pc97_499`,l=`_item_1pc97_499`,u=`_checkboxVisual_1pc97_511`,d=`_checked_1pc97_537`,f=`_active_1pc97_553`,p=`_operation_1pc97_565`,m=`_button_1pc97_577`,h=`_empty_1pc97_584`,g={"wim-docs-container":`_wim-docs-container_1pc97_87`,"wim-t":`_wim-t_1pc97_292`,"react-flow":`_react-flow_1pc97_315`,"react-flow__edges":`_react-flow__edges_1pc97_316`,"react-flow__connectionline":`_react-flow__connectionline_1pc97_317`,"react-flow__background":`_react-flow__background_1pc97_326`,container:e,root:t,list:n,header:r,headerTitle:i,disabled:a,headerCount:o,body:s,itemList:c,item:l,checkboxVisual:u,checked:d,active:f,operation:p,button:m,empty:h};exports.active=f,exports.body=s,exports.button=m,exports.checkboxVisual=u,exports.checked=d,exports.container=e,exports.default=g,exports.disabled=a,exports.empty=h,exports.header=r,exports.headerCount=o,exports.headerTitle=i,exports.item=l,exports.itemList=c,exports.list=n,exports.operation=p,exports.root=t;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/Transfer/transfer.module.scss
|
|
3
|
-
var e = "
|
|
4
|
-
"wim-docs-container": "_wim-docs-
|
|
5
|
-
"wim-t": "_wim-
|
|
6
|
-
"react-flow": "_react-
|
|
7
|
-
"react-flow__edges": "_react-
|
|
8
|
-
"react-flow__connectionline": "_react-
|
|
3
|
+
var e = "_container_1pc97_363", t = "_root_1pc97_372", n = "_list_1pc97_391", r = "_header_1pc97_419", i = "_headerTitle_1pc97_434", a = "_disabled_1pc97_440", o = "_headerCount_1pc97_449", s = "_body_1pc97_459", c = "_itemList_1pc97_499", l = "_item_1pc97_499", u = "_checkboxVisual_1pc97_511", d = "_checked_1pc97_537", f = "_active_1pc97_553", p = "_operation_1pc97_565", m = "_button_1pc97_577", h = "_empty_1pc97_584", g = {
|
|
4
|
+
"wim-docs-container": "_wim-docs-container_1pc97_87",
|
|
5
|
+
"wim-t": "_wim-t_1pc97_292",
|
|
6
|
+
"react-flow": "_react-flow_1pc97_315",
|
|
7
|
+
"react-flow__edges": "_react-flow__edges_1pc97_316",
|
|
8
|
+
"react-flow__connectionline": "_react-flow__connectionline_1pc97_317",
|
|
9
|
+
"react-flow__background": "_react-flow__background_1pc97_326",
|
|
9
10
|
container: e,
|
|
10
11
|
root: t,
|
|
11
12
|
list: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_1sjj9_332`,t=`_root_1sjj9_342`,n=`_fullWidth_1sjj9_355`,r=`_label_1sjj9_359`,i=`_trigger_1sjj9_366`,a=`_disabled_1sjj9_379`,o=`_open_1sjj9_391`,s=`_value_1sjj9_399`,c=`_placeholder_1sjj9_400`,l=`_icon_1sjj9_403`,u=`_clear_1sjj9_423`,d=`_dropdown_1sjj9_435`,f=`_treeView_1sjj9_465`,p=`_treeViewItem_1sjj9_473`,m=`_treeViewSearch_1sjj9_476`,h={"wim-docs-container":`_wim-docs-container_1sjj9_87`,"wim-t":`_wim-t_1sjj9_292`,"react-flow":`_react-flow_1sjj9_315`,"react-flow__edges":`_react-flow__edges_1sjj9_316`,"react-flow__connectionline":`_react-flow__connectionline_1sjj9_317`,"react-flow__background":`_react-flow__background_1sjj9_326`,container:e,root:t,fullWidth:n,label:r,trigger:i,disabled:a,open:o,value:s,placeholder:c,icon:l,clear:u,dropdown:d,treeView:f,treeViewItem:p,treeViewSearch:m};exports.clear=u,exports.container=e,exports.default=h,exports.disabled=a,exports.dropdown=d,exports.fullWidth=n,exports.icon=l,exports.label=r,exports.open=o,exports.placeholder=c,exports.root=t,exports.treeView=f,exports.treeViewItem=p,exports.treeViewSearch=m,exports.trigger=i,exports.value=s;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/form/TreeSelect/tree-select.module.scss
|
|
3
|
-
var e = "
|
|
4
|
-
"wim-docs-container": "_wim-docs-
|
|
5
|
-
"wim-t": "_wim-
|
|
6
|
-
"react-flow": "_react-
|
|
7
|
-
"react-flow__edges": "_react-
|
|
8
|
-
"react-flow__connectionline": "_react-
|
|
3
|
+
var e = "_container_1sjj9_332", t = "_root_1sjj9_342", n = "_fullWidth_1sjj9_355", r = "_label_1sjj9_359", i = "_trigger_1sjj9_366", a = "_disabled_1sjj9_379", o = "_open_1sjj9_391", s = "_value_1sjj9_399", c = "_placeholder_1sjj9_400", l = "_icon_1sjj9_403", u = "_clear_1sjj9_423", d = "_dropdown_1sjj9_435", f = "_treeView_1sjj9_465", p = "_treeViewItem_1sjj9_473", m = "_treeViewSearch_1sjj9_476", h = {
|
|
4
|
+
"wim-docs-container": "_wim-docs-container_1sjj9_87",
|
|
5
|
+
"wim-t": "_wim-t_1sjj9_292",
|
|
6
|
+
"react-flow": "_react-flow_1sjj9_315",
|
|
7
|
+
"react-flow__edges": "_react-flow__edges_1sjj9_316",
|
|
8
|
+
"react-flow__connectionline": "_react-flow__connectionline_1sjj9_317",
|
|
9
|
+
"react-flow__background": "_react-flow__background_1sjj9_326",
|
|
9
10
|
container: e,
|
|
10
11
|
root: t,
|
|
11
12
|
fullWidth: n,
|
package/dist/llms/Alert.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> Important messages
|
|
4
4
|
|
|
5
|
-
Also known as: Message Bar
|
|
5
|
+
Also known as: Message Bar, Callout
|
|
6
|
+
|
|
7
|
+
⚠️ Not the same as elsewhere: In Fluent UI v8, a "Callout" is a popup anchored to an element — that is `Popover` here. WIM's `Alert` matches Blueprint's Callout: an inline message in the page flow.
|
|
6
8
|
|
|
7
9
|
## Import
|
|
8
10
|
|
package/dist/llms/Anchor.md
CHANGED
package/dist/llms/AvatarGroup.md
CHANGED
package/dist/llms/Breadcrumb.md
CHANGED
package/dist/llms/Combobox.md
CHANGED
package/dist/llms/CopyButton.md
CHANGED
package/dist/llms/Countdown.md
CHANGED
package/dist/llms/DatePicker.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> Date selection
|
|
4
4
|
|
|
5
|
+
Also known as: Date Input
|
|
6
|
+
|
|
7
|
+
⚠️ Not the same as elsewhere: In Blueprint, a "DatePicker" is the calendar panel shown inline — that is `Calendar` here. WIM's `DatePicker` is a text field that opens a calendar, which Blueprint calls DateInput.
|
|
8
|
+
|
|
5
9
|
## Import
|
|
6
10
|
|
|
7
11
|
```ts
|