wimui 0.64.3 → 0.64.5
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/ai/code-diff-viewer.js +1 -2
- package/dist/ai/interactive-graph.js +1 -2
- package/dist/ai/markdown-renderer.js +1 -2
- package/dist/ai/streaming-text.js +1 -2
- package/dist/components/_internal/observeMove.cjs +1 -1
- package/dist/components/_internal/observeMove.js +9 -10
- package/dist/components/ai/SourceCitation/SourceCitation.cjs +1 -1
- package/dist/components/ai/SourceCitation/SourceCitation.js +1 -1
- package/dist/components/charts/SankeyChart/SankeyChart.cjs +1 -1
- package/dist/components/charts/SankeyChart/SankeyChart.js +1 -5
- package/dist/components/data-display/Accordion/Accordion.cjs +1 -1
- package/dist/components/data-display/Accordion/Accordion.js +1 -5
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.js +2 -14
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +180 -171
- package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
- package/dist/components/data-display/NodeGraph/NodeGraph.js +1 -7
- package/dist/components/data-display/ScheduleView/ScheduleView.cjs +1 -1
- package/dist/components/data-display/ScheduleView/ScheduleView.js +3 -1
- package/dist/components/data-display/SwipeAction/SwipeAction.cjs +1 -1
- package/dist/components/data-display/SwipeAction/SwipeAction.js +9 -10
- package/dist/components/data-display/TreeDiagram/TreeDiagram.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.js +94 -73
- package/dist/components/feedback/Tour/Tour.cjs +1 -1
- package/dist/components/feedback/Tour/Tour.js +2 -6
- package/dist/components/form/Button/Button.cjs +1 -1
- package/dist/components/form/Button/Button.js +58 -55
- package/dist/components/form/Combobox/Combobox.cjs +1 -1
- package/dist/components/form/Combobox/Combobox.js +2 -5
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.js +83 -68
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.js +64 -47
- package/dist/components/form/FloatButton/FloatButton.cjs +1 -1
- package/dist/components/form/FloatButton/FloatButton.js +7 -6
- package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
- package/dist/components/form/InlineEdit/InlineEdit.js +76 -73
- package/dist/components/form/RichTextEditor/RichTextEditor.cjs +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.js +117 -129
- package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +1 -7
- package/dist/components/layout/InteractiveArea/InteractiveArea.cjs +1 -1
- package/dist/components/layout/InteractiveArea/InteractiveArea.js +1 -5
- package/dist/components/media/Audio/hooks/useAudioPlayer.cjs +1 -1
- package/dist/components/media/Audio/hooks/useAudioPlayer.js +1 -9
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.js +5 -9
- package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.js +1 -8
- package/dist/components/navigation/TabNavigation/TabNavigation.cjs +1 -1
- package/dist/components/navigation/TabNavigation/TabNavigation.js +1 -5
- package/dist/data-display/json-diff-viewer.js +1 -2
- package/dist/data-display/markdown.js +1 -2
- package/dist/data-display/node-graph.js +1 -2
- package/dist/data-display/qr-code.js +1 -2
- package/dist/data-display/schedule-view.js +1 -2
- package/dist/form/rich-text-editor.js +1 -2
- package/dist/i18n/generated/common.cjs +1 -1
- package/dist/i18n/generated/common.d.ts +1 -1
- package/dist/i18n/generated/common.js +15 -6
- package/dist/i18n/generated/form.cjs +1 -1
- package/dist/i18n/generated/form.d.ts +1 -1
- package/dist/i18n/generated/form.js +6 -3
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/locales/en/common.json +5 -1
- package/dist/locales/en/form.json +2 -1
- package/dist/locales/ja/common.json +5 -1
- package/dist/locales/ja/form.json +2 -1
- package/dist/locales/pt/common.json +5 -1
- package/dist/locales/pt/form.json +2 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -17
- package/dist/rhf/zod.js +1 -2
- package/dist/wimui.umd.js +5 -5
- package/package.json +44 -44
|
@@ -9,33 +9,33 @@ import o, { useCallback as s, useEffect as c, useMemo as l, useRef as u, useStat
|
|
|
9
9
|
import f from "classnames";
|
|
10
10
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/data-display/TreeDiagram/TreeDiagram.tsx
|
|
12
|
-
var h = 200,
|
|
13
|
-
for (let n of e) n.children?.length && (t.push(n.value),
|
|
12
|
+
var h = 200, g = 64, _ = 24, v = 48, y = (e, t = []) => {
|
|
13
|
+
for (let n of e) n.children?.length && (t.push(n.value), y(n.children, t));
|
|
14
14
|
return t;
|
|
15
|
-
},
|
|
16
|
-
for (let n of e) t.set(n.value, n), n.children &&
|
|
15
|
+
}, b = (e, t = /* @__PURE__ */ new Map()) => {
|
|
16
|
+
for (let n of e) t.set(n.value, n), n.children && b(n.children, t);
|
|
17
17
|
return t;
|
|
18
|
-
},
|
|
19
|
-
let { t: P } = e(t), F = o.useId(), I =
|
|
20
|
-
|
|
21
|
-
}, [
|
|
18
|
+
}, x = (e) => typeof e.label == "string" ? e.label : e.value, S = o.forwardRef(({ nodes: S, orientation: C = "vertical", expandedValues: w, defaultExpandedValues: T, onExpandedChange: E, selectedValue: D, onSelect: O, renderNode: k, nodeWidth: A = h, nodeHeight: j = g, labels: M, className: ee, "aria-label": te, ...ne }, N) => {
|
|
19
|
+
let { t: P } = e(t), F = o.useId(), I = M?.expand ?? ((e) => P("treediagram.expand", { label: e })), L = M?.collapse ?? ((e) => P("treediagram.collapse", { label: e })), [R, z] = d(() => T ?? y(S)), B = w ?? R, V = l(() => new Set(B), [B]), H = s((e) => {
|
|
20
|
+
w === void 0 && z(e), E?.(e);
|
|
21
|
+
}, [w, E]), U = s((e) => H(V.has(e) ? B.filter((t) => t !== e) : [...B, e]), [
|
|
22
22
|
B,
|
|
23
23
|
V,
|
|
24
24
|
H
|
|
25
|
-
]), W = l(() =>
|
|
26
|
-
nodeWidth:
|
|
27
|
-
nodeHeight:
|
|
28
|
-
siblingGap:
|
|
29
|
-
levelGap:
|
|
30
|
-
orientation:
|
|
25
|
+
]), W = l(() => b(S), [S]), G = l(() => i(S, {
|
|
26
|
+
nodeWidth: A,
|
|
27
|
+
nodeHeight: j,
|
|
28
|
+
siblingGap: _,
|
|
29
|
+
levelGap: v,
|
|
30
|
+
orientation: C,
|
|
31
31
|
isExpanded: (e) => V.has(e)
|
|
32
32
|
}), [
|
|
33
|
-
x,
|
|
34
|
-
k,
|
|
35
|
-
A,
|
|
36
33
|
S,
|
|
34
|
+
A,
|
|
35
|
+
j,
|
|
36
|
+
C,
|
|
37
37
|
V
|
|
38
|
-
]), K = l(() => new Map(G.nodes.map((e) => [e.value, e])), [G]), [q, J] = d(null), Y = q !== null && K.has(q) ? q : null, re = Y ??
|
|
38
|
+
]), K = l(() => new Map(G.nodes.map((e) => [e.value, e])), [G]), [q, J] = d(null), Y = q !== null && K.has(q) ? q : null, re = Y ?? D ?? G.nodes[0]?.value ?? null, X = u(/* @__PURE__ */ new Map()), Z = u(!1);
|
|
39
39
|
c(() => {
|
|
40
40
|
if (q === null || K.has(q)) return;
|
|
41
41
|
let e = q, t = (e) => {
|
|
@@ -82,27 +82,27 @@ var h = 200, ee = 64, g = 24, _ = 48, v = (e, t = []) => {
|
|
|
82
82
|
break;
|
|
83
83
|
case "Enter":
|
|
84
84
|
case " ":
|
|
85
|
-
if (!
|
|
86
|
-
|
|
85
|
+
if (!O) return;
|
|
86
|
+
O(t.value);
|
|
87
87
|
break;
|
|
88
88
|
default: return;
|
|
89
89
|
}
|
|
90
90
|
e.preventDefault();
|
|
91
|
-
}, $ =
|
|
91
|
+
}, $ = C === "vertical", ae = (e, t) => {
|
|
92
92
|
if ($) {
|
|
93
|
-
let n = e.x +
|
|
94
|
-
return `M${n} ${r}V${r +
|
|
93
|
+
let n = e.x + A / 2, r = e.y + j, i = t.x + A / 2;
|
|
94
|
+
return `M${n} ${r}V${r + v / 2}H${i}V${t.y}`;
|
|
95
95
|
}
|
|
96
|
-
let n = e.x +
|
|
97
|
-
return `M${n} ${r}H${n +
|
|
96
|
+
let n = e.x + A, r = e.y + j / 2, i = t.y + j / 2;
|
|
97
|
+
return `M${n} ${r}H${n + v / 2}V${i}H${t.x}`;
|
|
98
98
|
};
|
|
99
99
|
return /* @__PURE__ */ p("div", {
|
|
100
100
|
ref: N,
|
|
101
101
|
role: "tree",
|
|
102
|
-
"aria-label":
|
|
103
|
-
"aria-orientation":
|
|
104
|
-
className: f("wim-tree-diagram", a.root, $ ? a.vertical : a.horizontal,
|
|
105
|
-
...
|
|
102
|
+
"aria-label": te ?? P("treediagram.aria"),
|
|
103
|
+
"aria-orientation": C,
|
|
104
|
+
className: f("wim-tree-diagram", a.root, $ ? a.vertical : a.horizontal, ee),
|
|
105
|
+
...ne,
|
|
106
106
|
children: /* @__PURE__ */ m("div", {
|
|
107
107
|
className: a.canvas,
|
|
108
108
|
style: {
|
|
@@ -117,12 +117,12 @@ var h = 200, ee = 64, g = 24, _ = 48, v = (e, t = []) => {
|
|
|
117
117
|
focusable: "false",
|
|
118
118
|
children: G.edges.map((e) => /* @__PURE__ */ p("path", { d: ae(K.get(e.from), K.get(e.to)) }, `${e.from}>${e.to}`))
|
|
119
119
|
}), G.nodes.map((e, t) => {
|
|
120
|
-
let i = W.get(e.value), o = V.has(e.value), s =
|
|
120
|
+
let i = W.get(e.value), o = V.has(e.value), s = D === e.value, c = {
|
|
121
121
|
depth: e.depth,
|
|
122
122
|
expanded: o,
|
|
123
123
|
selected: s,
|
|
124
124
|
hiddenCount: e.hiddenCount
|
|
125
|
-
}, l =
|
|
125
|
+
}, l = x(i);
|
|
126
126
|
return /* @__PURE__ */ m("div", {
|
|
127
127
|
ref: (t) => {
|
|
128
128
|
t ? X.current.set(e.value, t) : X.current.delete(e.value);
|
|
@@ -132,60 +132,81 @@ var h = 200, ee = 64, g = 24, _ = 48, v = (e, t = []) => {
|
|
|
132
132
|
"aria-setsize": e.setSize,
|
|
133
133
|
"aria-posinset": e.posInSet,
|
|
134
134
|
"aria-expanded": e.hasChildren ? o : void 0,
|
|
135
|
-
"aria-selected":
|
|
135
|
+
"aria-selected": O ? s : void 0,
|
|
136
136
|
tabIndex: e.value === re ? 0 : -1,
|
|
137
137
|
"data-value": e.value,
|
|
138
|
-
"aria-labelledby":
|
|
139
|
-
|
|
138
|
+
"aria-labelledby": [
|
|
139
|
+
!k && i.avatar && `${F}-${t}-a`,
|
|
140
|
+
`${F}-${t}`,
|
|
141
|
+
!k && i.description && `${F}-${t}-d`,
|
|
142
|
+
e.hasChildren && !o && `${F}-${t}-c`
|
|
143
|
+
].filter(Boolean).join(" "),
|
|
144
|
+
className: f(a.node, s && a.selected, O && a.selectable),
|
|
140
145
|
style: {
|
|
141
146
|
left: e.x,
|
|
142
147
|
top: e.y,
|
|
143
|
-
width:
|
|
144
|
-
height:
|
|
148
|
+
width: A,
|
|
149
|
+
height: j
|
|
145
150
|
},
|
|
146
151
|
title: l,
|
|
147
152
|
onKeyDown: (n) => ie(n, e, t),
|
|
148
153
|
onFocus: () => J(e.value),
|
|
149
|
-
onClick:
|
|
150
|
-
children: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
154
|
+
onClick: O ? () => O(e.value) : void 0,
|
|
155
|
+
children: [
|
|
156
|
+
k ? /* @__PURE__ */ p("span", {
|
|
157
|
+
id: `${F}-${t}`,
|
|
158
|
+
className: a.custom,
|
|
159
|
+
children: k(i, c)
|
|
160
|
+
}) : /* @__PURE__ */ m("span", {
|
|
161
|
+
className: a.content,
|
|
162
|
+
children: [
|
|
163
|
+
i.avatar && /* @__PURE__ */ p("span", {
|
|
164
|
+
id: `${F}-${t}-a`,
|
|
165
|
+
className: a.avatar,
|
|
166
|
+
children: i.avatar
|
|
167
|
+
}),
|
|
168
|
+
i.avatar && " ",
|
|
169
|
+
/* @__PURE__ */ m("span", {
|
|
170
|
+
className: a.text,
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ p("span", {
|
|
173
|
+
id: `${F}-${t}`,
|
|
174
|
+
className: a.label,
|
|
175
|
+
children: i.label
|
|
176
|
+
}),
|
|
177
|
+
i.description && " ",
|
|
178
|
+
i.description && /* @__PURE__ */ p("span", {
|
|
179
|
+
id: `${F}-${t}-d`,
|
|
180
|
+
className: a.description,
|
|
181
|
+
children: i.description
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
}),
|
|
187
|
+
e.hasChildren && " ",
|
|
188
|
+
e.hasChildren && /* @__PURE__ */ p("button", {
|
|
189
|
+
type: "button",
|
|
190
|
+
tabIndex: -1,
|
|
191
|
+
className: a.toggle,
|
|
192
|
+
"aria-label": o ? L(l) : `${I(l)} +${e.hiddenCount}`,
|
|
193
|
+
onClick: (t) => {
|
|
194
|
+
t.stopPropagation(), U(e.value);
|
|
195
|
+
},
|
|
196
|
+
children: o ? /* @__PURE__ */ p(r, {
|
|
197
|
+
component: n,
|
|
198
|
+
size: "xs"
|
|
199
|
+
}) : /* @__PURE__ */ m("span", {
|
|
200
|
+
id: `${F}-${t}-c`,
|
|
201
|
+
children: ["+", e.hiddenCount]
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
]
|
|
184
205
|
}, e.value);
|
|
185
206
|
})]
|
|
186
207
|
})
|
|
187
208
|
});
|
|
188
209
|
});
|
|
189
|
-
|
|
210
|
+
S.displayName = "TreeDiagram";
|
|
190
211
|
//#endregion
|
|
191
|
-
export {
|
|
212
|
+
export { S as TreeDiagram };
|
|
@@ -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/common.cjs"),r=require("../../overlay/Portal/Portal.cjs"),i=require("../../overlay/FocusTrap/FocusTrap.cjs"),a=require("../../form/Button/Button.cjs"),o=require("./tour.module.cjs"),s=require("../../_internal/observeMove.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=16;function f(e){let t=getComputedStyle(e);return`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`}async function p(e){let t=document.fonts;if(t&&typeof t.load==`function`){try{await t.load(f(e))}catch{}for(;t.status===`loading`;)await new Promise(e=>{t.addEventListener(`loadingdone`,()=>e(),{once:!0})})}}function m(e){let t=document.fonts;return!t||typeof t.load!=`function`?!1:t.status===`loading`||typeof t.check==`function`&&!t.check(f(e))}function h(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.width)===Math.round(t.width)&&Math.round(e.height)===Math.round(t.height)}function g(e){return e.top>=d&&e.bottom<=window.innerHeight-d&&e.left>=d&&e.right<=window.innerWidth-d}var _=({steps:e,open:d,onClose:f,onFinish:_})=>{let{t:v}=t.useWimTranslation(n.commonNs),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null),C=e[y],w=C?.target;(0,c.useLayoutEffect)(()=>{if(!d||!w){S(null);return}let e=!1,t=t=>{e||S(e=>t?e&&h(e,t)?e:t:null)},n=()=>{let e=document.querySelector(w);
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../overlay/Portal/Portal.cjs"),i=require("../../overlay/FocusTrap/FocusTrap.cjs"),a=require("../../form/Button/Button.cjs"),o=require("./tour.module.cjs"),s=require("../../_internal/observeMove.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=16;function f(e){let t=getComputedStyle(e);return`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`}async function p(e){let t=document.fonts;if(t&&typeof t.load==`function`){try{await t.load(f(e))}catch{}for(;t.status===`loading`;)await new Promise(e=>{t.addEventListener(`loadingdone`,()=>e(),{once:!0})})}}function m(e){let t=document.fonts;return!t||typeof t.load!=`function`?!1:t.status===`loading`||typeof t.check==`function`&&!t.check(f(e))}function h(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.width)===Math.round(t.width)&&Math.round(e.height)===Math.round(t.height)}function g(e){return e.top>=d&&e.bottom<=window.innerHeight-d&&e.left>=d&&e.right<=window.innerWidth-d}var _=({steps:e,open:d,onClose:f,onFinish:_})=>{let{t:v}=t.useWimTranslation(n.commonNs),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null),C=e[y],w=C?.target;(0,c.useLayoutEffect)(()=>{if(!d||!w){S(null);return}let e=!1,t=t=>{e||S(e=>t?e&&h(e,t)?e:t:null)},n=()=>{let e=document.querySelector(w);e?(g(e.getBoundingClientRect())||e.scrollIntoView({block:`center`,inline:`nearest`}),t(e.getBoundingClientRect())):t(null)},r=()=>{let e=document.querySelector(w);t(e?e.getBoundingClientRect():null)},i,a=()=>{window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0);let e=document.querySelector(w);e&&(i=s.observeMove(e,r))},o=async()=>{let t=document.querySelector(w);t&&await p(t),!e&&(n(),a())},c=document.querySelector(w);return c&&m(c)?o():(n(),a()),()=>{e=!0,window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0),i?.()}},[d,y,w]);let T=(0,c.useId)(),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=d&&!!C&&!!x;if((0,c.useEffect)(()=>{if(!O)return;let e=E.current;e&&!e.contains(document.activeElement)&&D.current?.focus()},[O,y]),(0,c.useEffect)(()=>{if(!d)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),f())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[d,f]),!d||!C)return null;let k=()=>{y<e.length-1?b(y+1):(_?_():f(),b(0))},A=()=>{y>0&&b(y-1)},j={},M=C.placement||`bottom`;if(x){let e=window.innerWidth,t=Math.min(300,e-32),n=M;if(e<640&&(n===`left`||n===`right`)&&(n=`bottom`),M=n,n===`top`||n===`bottom`){let r=x.left+x.width/2,i=t/2+16,a=e-t/2-16;r=i>a?e/2:Math.max(i,Math.min(a,r)),j.left=r,n===`top`?(j.top=x.top-12,j.transform=`translate(-50%, -100%)`):(j.top=x.bottom+12,j.transform=`translateX(-50%)`)}else n===`left`?(j.left=x.left-12,j.top=x.top+x.height/2,j.transform=`translate(-100%, -50%)`):n===`right`&&(j.left=x.right+12,j.top=x.top+x.height/2,j.transform=`translateY(-50%)`)}return(0,u.jsx)(r.Portal,{children:(0,u.jsx)(i.FocusTrap,{initialFocus:!1,children:(0,u.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":C.title,"aria-describedby":x?T:void 0,children:[x&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:o.default.highlight,style:{top:x.top-4,left:x.left-4,width:x.width+8,height:x.height+8}}),(0,u.jsx)(`div`,{ref:E,className:(0,l.default)(`wim-tour`,o.default.bubble),"data-placement":M,style:j,children:(0,u.jsxs)(`div`,{className:o.default.inner,children:[(0,u.jsx)(`h3`,{className:o.default.title,children:C.title}),(0,u.jsx)(`p`,{id:T,className:o.default.description,children:C.description}),(0,u.jsxs)(`div`,{className:o.default.footer,children:[(0,u.jsxs)(`span`,{className:o.default.progress,children:[y+1,` / `,e.length]}),(0,u.jsxs)(`div`,{className:o.default.buttons,children:[y>0&&(0,u.jsx)(a.Button,{size:`sm`,variant:`outline`,onClick:A,children:v(`action.back`)}),(0,u.jsx)(a.Button,{ref:D,size:`sm`,variant:`solid`,onClick:k,children:y===e.length-1?v(`action.finish`):v(`action.next`)})]})]})]})})]}),(0,u.jsx)(`div`,{className:o.default.mask,onClick:f,role:`button`,tabIndex:0,"aria-label":v(`a11y.close_tour`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f()}})]},y)})})};exports.Tour=_;
|
|
@@ -47,14 +47,10 @@ var S = ({ steps: g, open: _, onClose: S, onFinish: C }) => {
|
|
|
47
47
|
e || O((e) => t ? e && b(e, t) ? e : t : null);
|
|
48
48
|
}, n = () => {
|
|
49
49
|
let e = document.querySelector(A);
|
|
50
|
-
|
|
51
|
-
t(null);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
x(e.getBoundingClientRect()) || e.scrollIntoView({
|
|
50
|
+
e ? (x(e.getBoundingClientRect()) || e.scrollIntoView({
|
|
55
51
|
block: "center",
|
|
56
52
|
inline: "nearest"
|
|
57
|
-
}), t(e.getBoundingClientRect());
|
|
53
|
+
}), t(e.getBoundingClientRect())) : t(null);
|
|
58
54
|
}, r = () => {
|
|
59
55
|
let e = document.querySelector(A);
|
|
60
56
|
t(e ? e.getBoundingClientRect() : null);
|
|
@@ -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("../../../utilities/style-utils.cjs"),r=require("../../../i18n/useWimTranslation.cjs"),i=require("../../../i18n/generated/common.cjs"),a=require("../../../hooks/useMergedRef.cjs"),o=require("../../../icon/loading.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/style-utils.cjs"),r=require("../../../i18n/useWimTranslation.cjs"),i=require("../../../i18n/generated/common.cjs"),a=require("../../../hooks/useMergedRef.cjs"),o=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),s=require("../../../icon/loading.cjs"),c=require("../../media/Icon/Icon.cjs"),l=require("./button.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=u.default.forwardRef(({asChild:e=!1,size:p=`md`,variant:m=`outline`,intent:h=`default`,icon:g,iconPosition:_=`left`,loading:v=!1,backgroundColor:y,justify:b=`center`,animateWidth:x=!1,fullWidth:S=!1,styles:C,"aria-label":w,className:T,disabled:E,children:D,...O},k)=>{let A=u.default.useRef(null),j=a.useMergedRef(A,k),[M,N]=u.default.useState(`auto`),P=u.default.useRef(!0);u.default.useLayoutEffect(()=>{if(!x||!A.current)return;if(P.current){P.current=!1;return}let e=A.current,t=e.getBoundingClientRect().width;N(t);let n=e.style.width,r=e.style.minWidth;e.style.width=`auto`,e.style.minWidth=`0`;let i=Math.ceil(e.getBoundingClientRect().width)+2;e.style.width=n,e.style.minWidth=r;let a=requestAnimationFrame(()=>{N(i)});return()=>cancelAnimationFrame(a)},[D,x]);let{t:F}=r.useWimTranslation(i.commonNs),I=E,L;typeof w==`string`?L=w:w!==!1&&v&&!D&&typeof g!=`string`&&(L=F(`a11y.loading`));let R=!e&&!D&&!!g&&typeof w!=`string`&&!O[`aria-labelledby`]&&!O.title;u.default.useEffect(()=>{},[R]);let z=b===`start`?`flex-start`:b===`end`?`flex-end`:b===`between`?`space-between`:b,B=v?(0,f.jsx)(`span`,{className:(0,d.default)(l.default.loader,C?.loader),children:(0,f.jsx)(c.Icon,{component:s.default,spin:!0,size:p})}):g?typeof g==`string`?(0,f.jsx)(c.Icon,{name:g,size:p,className:C?.icon}):g:null,V=v&&D?(0,f.jsxs)(f.Fragment,{children:[` `,(0,f.jsx)(o.VisuallyHidden,{children:F(`a11y.loading`)})]}):null;return(0,f.jsxs)(e?t.Root:`button`,{ref:j,type:e?void 0:`button`,className:(0,d.default)(`wim-button`,l.default.root,l.default[p],l.default[m],l.default[h],v&&l.default.loading,x&&l.default.animatedWidth,S&&l.default.fullWidth,!D&&!!g&&l.default.iconOnly,T,C?.root),disabled:(I||v)&&!e?!0:void 0,"aria-label":L,"aria-busy":v||void 0,...e?O:{...O},style:{...O.style,justifyContent:z,...y?{backgroundColor:n.getColorValue(y)}:{},...x&&M!==`auto`?{width:`${M}px`,transitionProperty:O.style?.transitionProperty||`width, background-color, border-color, box-shadow, transform`,transitionDuration:O.style?.transitionDuration||`var(--wim-duration-base)`,transitionTimingFunction:O.style?.transitionTimingFunction||`var(--wim-easing-standard)`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`clip`}:{}},children:[e&&B&&_===`left`?B:null,e?(0,f.jsx)(t.Slottable,{children:D}):(0,f.jsxs)(`span`,{className:l.default.content,children:[B&&_===`left`&&B,D,V,B&&_===`right`&&B]}),e?V:null,e&&B&&_===`right`?B:null]})});p.displayName=`Button`,exports.Button=p;
|
|
@@ -4,84 +4,87 @@ import { getColorValue as n } from "../../../utilities/style-utils.js";
|
|
|
4
4
|
import { useWimTranslation as r } from "../../../i18n/useWimTranslation.js";
|
|
5
5
|
import { commonNs as i } from "../../../i18n/generated/common.js";
|
|
6
6
|
import { useMergedRef as a } from "../../../hooks/useMergedRef.js";
|
|
7
|
-
import o from "
|
|
8
|
-
import
|
|
9
|
-
import c from "
|
|
10
|
-
import l from "
|
|
11
|
-
import u from "
|
|
12
|
-
import
|
|
7
|
+
import { VisuallyHidden as o } from "../../layout/VisuallyHidden/VisuallyHidden.js";
|
|
8
|
+
import s from "../../../icon/loading.js";
|
|
9
|
+
import { Icon as c } from "../../media/Icon/Icon.js";
|
|
10
|
+
import l from "./button.module.js";
|
|
11
|
+
import u from "react";
|
|
12
|
+
import d from "classnames";
|
|
13
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
14
|
//#region src/components/form/Button/Button.tsx
|
|
14
|
-
var
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
if (!
|
|
18
|
-
if (
|
|
19
|
-
|
|
15
|
+
var h = u.forwardRef(({ asChild: h = !1, size: g = "md", variant: _ = "outline", intent: v = "default", icon: y, iconPosition: b = "left", loading: x = !1, backgroundColor: S, justify: C = "center", animateWidth: w = !1, fullWidth: T = !1, styles: E, "aria-label": D, className: O, disabled: k, children: A, ...j }, M) => {
|
|
16
|
+
let N = u.useRef(null), P = a(N, M), [F, I] = u.useState("auto"), L = u.useRef(!0);
|
|
17
|
+
u.useLayoutEffect(() => {
|
|
18
|
+
if (!w || !N.current) return;
|
|
19
|
+
if (L.current) {
|
|
20
|
+
L.current = !1;
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
|
-
let e =
|
|
23
|
-
|
|
23
|
+
let e = N.current, t = e.getBoundingClientRect().width;
|
|
24
|
+
I(t);
|
|
24
25
|
let n = e.style.width, r = e.style.minWidth;
|
|
25
26
|
e.style.width = "auto", e.style.minWidth = "0";
|
|
26
27
|
let i = Math.ceil(e.getBoundingClientRect().width) + 2;
|
|
27
28
|
e.style.width = n, e.style.minWidth = r;
|
|
28
29
|
let a = requestAnimationFrame(() => {
|
|
29
|
-
|
|
30
|
+
I(i);
|
|
30
31
|
});
|
|
31
32
|
return () => cancelAnimationFrame(a);
|
|
32
|
-
}, [
|
|
33
|
-
let { t:
|
|
34
|
-
typeof
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
let
|
|
38
|
-
className:
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
component:
|
|
33
|
+
}, [A, w]);
|
|
34
|
+
let { t: R } = r(i), z = k, B;
|
|
35
|
+
typeof D == "string" ? B = D : D !== !1 && x && !A && typeof y != "string" && (B = R("a11y.loading"));
|
|
36
|
+
let V = !h && !A && !!y && typeof D != "string" && !j["aria-labelledby"] && !j.title;
|
|
37
|
+
u.useEffect(() => {}, [V]);
|
|
38
|
+
let H = C === "start" ? "flex-start" : C === "end" ? "flex-end" : C === "between" ? "space-between" : C, U = x ? /* @__PURE__ */ p("span", {
|
|
39
|
+
className: d(l.loader, E?.loader),
|
|
40
|
+
children: /* @__PURE__ */ p(c, {
|
|
41
|
+
component: s,
|
|
41
42
|
spin: !0,
|
|
42
|
-
size:
|
|
43
|
+
size: g
|
|
43
44
|
})
|
|
44
|
-
}) :
|
|
45
|
-
name:
|
|
46
|
-
size:
|
|
47
|
-
className:
|
|
48
|
-
}) :
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
ref:
|
|
51
|
-
type:
|
|
52
|
-
className:
|
|
53
|
-
disabled: (
|
|
54
|
-
"aria-label":
|
|
55
|
-
"aria-busy":
|
|
56
|
-
...
|
|
45
|
+
}) : y ? typeof y == "string" ? /* @__PURE__ */ p(c, {
|
|
46
|
+
name: y,
|
|
47
|
+
size: g,
|
|
48
|
+
className: E?.icon
|
|
49
|
+
}) : y : null, W = x && A ? /* @__PURE__ */ m(f, { children: [" ", /* @__PURE__ */ p(o, { children: R("a11y.loading") })] }) : null;
|
|
50
|
+
return /* @__PURE__ */ m(h ? e : "button", {
|
|
51
|
+
ref: P,
|
|
52
|
+
type: h ? void 0 : "button",
|
|
53
|
+
className: d("wim-button", l.root, l[g], l[_], l[v], x && l.loading, w && l.animatedWidth, T && l.fullWidth, !A && !!y && l.iconOnly, O, E?.root),
|
|
54
|
+
disabled: (z || x) && !h ? !0 : void 0,
|
|
55
|
+
"aria-label": B,
|
|
56
|
+
"aria-busy": x || void 0,
|
|
57
|
+
...h ? j : { ...j },
|
|
57
58
|
style: {
|
|
58
|
-
...
|
|
59
|
-
justifyContent:
|
|
60
|
-
...
|
|
61
|
-
...
|
|
62
|
-
width: `${
|
|
63
|
-
transitionProperty:
|
|
64
|
-
transitionDuration:
|
|
65
|
-
transitionTimingFunction:
|
|
59
|
+
...j.style,
|
|
60
|
+
justifyContent: H,
|
|
61
|
+
...S ? { backgroundColor: n(S) } : {},
|
|
62
|
+
...w && F !== "auto" ? {
|
|
63
|
+
width: `${F}px`,
|
|
64
|
+
transitionProperty: j.style?.transitionProperty || "width, background-color, border-color, box-shadow, transform",
|
|
65
|
+
transitionDuration: j.style?.transitionDuration || "var(--wim-duration-base)",
|
|
66
|
+
transitionTimingFunction: j.style?.transitionTimingFunction || "var(--wim-easing-standard)",
|
|
66
67
|
overflow: "hidden",
|
|
67
68
|
whiteSpace: "nowrap",
|
|
68
69
|
textOverflow: "clip"
|
|
69
70
|
} : {}
|
|
70
71
|
},
|
|
71
72
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
className:
|
|
73
|
+
h && U && b === "left" ? U : null,
|
|
74
|
+
h ? /* @__PURE__ */ p(t, { children: A }) : /* @__PURE__ */ m("span", {
|
|
75
|
+
className: l.content,
|
|
75
76
|
children: [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
U && b === "left" && U,
|
|
78
|
+
A,
|
|
79
|
+
W,
|
|
80
|
+
U && b === "right" && U
|
|
79
81
|
]
|
|
80
82
|
}),
|
|
81
|
-
|
|
83
|
+
h ? W : null,
|
|
84
|
+
h && U && b === "right" ? U : null
|
|
82
85
|
]
|
|
83
86
|
});
|
|
84
87
|
});
|
|
85
|
-
|
|
88
|
+
h.displayName = "Button";
|
|
86
89
|
//#endregion
|
|
87
|
-
export {
|
|
90
|
+
export { h as Button };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../hooks/useMergedRef.cjs"),n=require("../../_internal/BaseListItem/BaseListItem.cjs"),r=require("../InputBase/InputBase.cjs"),i=require("../../_internal/useInlineFloating.cjs"),a=require("../FieldTemplate/FieldTemplate.cjs"),o=require("./combobox.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");var u=({options:e=[],onChange:u,placeholder:d,showSearchIcon:f=!0,allowClear:p=!0,defaultValue:m=``,className:h,disabled:g=!1,label:_,error:v,required:y,layout:b,fullWidth:x=!1,id:S,labels:C={},...w})=>{let{noResults:T=`No results found`}=C,[E,D]=(0,s.useState)(!1),[O,k]=(0,s.useState)(m),[A,j]=(0,s.useState)(-1),[M,N]=(0,s.useState)(!1),P=(0,s.useRef)(null),F=(0,s.useId)(),I=S||`wim-combobox-${F}`,L=`${I}-list`,R=_?`${I}-label`:void 0,z=v?`${I}-error`:void 0,B=(0,s.useMemo)(()=>{let t=(O||``).toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[e,O]);(0,s.useEffect)(()=>{let e=e=>{P.current&&!P.current.contains(e.target)&&D(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let V=e=>{let t=e.target.value;k(t),D(!0),j(-1)},H=e=>{k(e.label),D(!1),u&&u(e)},U=e=>{if(N(!0),!E&&e.key===`ArrowDown`)
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../hooks/useMergedRef.cjs"),n=require("../../_internal/BaseListItem/BaseListItem.cjs"),r=require("../InputBase/InputBase.cjs"),i=require("../../_internal/useInlineFloating.cjs"),a=require("../FieldTemplate/FieldTemplate.cjs"),o=require("./combobox.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");var u=({options:e=[],onChange:u,placeholder:d,showSearchIcon:f=!0,allowClear:p=!0,defaultValue:m=``,className:h,disabled:g=!1,label:_,error:v,required:y,layout:b,fullWidth:x=!1,id:S,labels:C={},...w})=>{let{noResults:T=`No results found`}=C,[E,D]=(0,s.useState)(!1),[O,k]=(0,s.useState)(m),[A,j]=(0,s.useState)(-1),[M,N]=(0,s.useState)(!1),P=(0,s.useRef)(null),F=(0,s.useId)(),I=S||`wim-combobox-${F}`,L=`${I}-list`,R=_?`${I}-label`:void 0,z=v?`${I}-error`:void 0,B=(0,s.useMemo)(()=>{let t=(O||``).toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t))},[e,O]);(0,s.useEffect)(()=>{let e=e=>{P.current&&!P.current.contains(e.target)&&D(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let V=e=>{let t=e.target.value;k(t),D(!0),j(-1)},H=e=>{k(e.label),D(!1),u&&u(e)},U=e=>{if(N(!0),!E&&e.key===`ArrowDown`)D(!0);else switch(e.key){case`ArrowDown`:j(e=>e<B.length-1?e+1:0);break;case`ArrowUp`:j(e=>e<=0?B.length-1:e-1);break;case`Enter`:A>=0&&A<B.length&&H(B[A]);break;case`Escape`:D(!1);break;case`Tab`:D(!1)}},{setReference:W,setFloating:G,floatingProps:K}=i.useInlineFloating({open:E}),q=t.useMergedRef(P,W);return(0,l.jsx)(a.FieldTemplate,{label:_,error:v,required:y,layout:b,labelId:R,htmlFor:I,errorId:z,className:h,children:(0,l.jsxs)(`div`,{className:(0,c.default)(`wim-combobox`,o.default.root,x&&o.default.fullWidth),ref:q,onMouseMove:()=>N(!1),"data-keyboard-nav":M,children:[(0,l.jsx)(r.InputBase,{disabled:g,allowClear:p,hasValue:!!O,onClear:()=>k(``),intent:v?`danger`:`default`,leftIcon:f?`SearchIcon`:void 0,fullWidth:x,rightIcons:[{name:`ChevronDownIcon`,rotated:E,onClick:()=>D(!E),decorative:!0}],children:(0,l.jsx)(`input`,{id:I,className:o.default.input,placeholder:d,value:O,onChange:V,onKeyDown:U,onFocus:()=>D(!0),disabled:g,autoComplete:`off`,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":E,"aria-controls":E?L:void 0,"aria-labelledby":R,"aria-describedby":z,required:y,"aria-invalid":!!v,"aria-activedescendant":E&&A>=0?`${L}-option-${A}`:void 0,...w})}),E&&B.length>0&&(0,l.jsx)(`div`,{className:o.default.dropdown,ref:G,...K,children:(0,l.jsx)(`ul`,{id:L,className:o.default.list,role:`listbox`,"aria-labelledby":R,children:B.map((e,t)=>(0,l.jsx)(n.BaseListItem,{asChild:!0,id:`${L}-option-${t}`,className:(0,c.default)(o.default.option,t===A&&o.default.selected),active:t===A,onClick:()=>H(e),onMouseEnter:()=>j(t),role:`option`,"aria-selected":t===A,children:(0,l.jsx)(`li`,{children:e.label})},e.value))})}),E&&B.length===0&&(0,l.jsx)(`div`,{className:o.default.dropdown,ref:G,...K,children:(0,l.jsx)(`div`,{className:o.default.empty,role:`region`,"aria-live":`polite`,children:T})})]})})};u.displayName=`Combobox`,exports.Combobox=u;
|
|
@@ -26,11 +26,8 @@ var m = ({ options: m = [], onChange: h, placeholder: g, showSearchIcon: _ = !0,
|
|
|
26
26
|
}, q = (e) => {
|
|
27
27
|
P(e.label), M(!1), h && h(e);
|
|
28
28
|
}, J = (e) => {
|
|
29
|
-
if (R(!0), !j && e.key === "ArrowDown")
|
|
30
|
-
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
switch (e.key) {
|
|
29
|
+
if (R(!0), !j && e.key === "ArrowDown") M(!0);
|
|
30
|
+
else switch (e.key) {
|
|
34
31
|
case "ArrowDown":
|
|
35
32
|
I((e) => e < G.length - 1 ? e + 1 : 0);
|
|
36
33
|
break;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../layout/InteractiveArea/InteractiveArea.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../media/Icon/Icon.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../layout/InteractiveArea/InteractiveArea.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../../i18n/generated/form.cjs"),o=require("../FieldTemplate/FieldTemplate.cjs"),s=require("./dropzone.module.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=({label:e,description:d,accept:f,multiple:p=!1,disabled:m=!1,value:h,onChange:g,className:_,iconName:v=`UploadIcon`,error:y,required:b,layout:x=`vertical`,size:S=`md`,"aria-label":C,"aria-labelledby":w,"aria-describedby":T})=>{let{t:E}=n.useWimTranslation(a.formNs),D=d??E(`dropzone.description`),O=`wim-dropzone-${c.default.useId()}`,k=e?`${O}-label`:void 0,A=y?`${O}-error`:void 0,j=`${O}-description`,M=`${O}-files`,N=`${O}-name`,P=k??w??(C?N:void 0),F=(0,c.useRef)(null),[I,L]=(0,c.useState)(!1),[R,z]=(0,c.useState)(null),B=()=>{m||F.current?.click()},V=e=>{e.preventDefault(),!m&&L(!0)},H=()=>{L(!1)},U=e=>{if(e.preventDefault(),L(!1),m)return;let t=e.dataTransfer.files;z(t),g&&g(t)},W=e=>{let t=e.target.files;z(t),g&&g(t)},G=h===void 0?R?Array.from(R).map(e=>e.name):[]:h;return(0,u.jsxs)(o.FieldTemplate,{label:e,error:y,required:b,layout:x,labelId:k,errorId:A,className:(0,l.default)(`wim-dropzone`,s.default.container,_),children:[(0,u.jsx)(`input`,{type:`file`,ref:F,accept:f,multiple:p,disabled:m,onChange:W,style:{display:`none`},"aria-hidden":`true`,tabIndex:-1}),P===N&&(0,u.jsx)(r.VisuallyHidden,{id:N,children:C}),(0,u.jsx)(t.InteractiveArea,{size:S,isDragging:I,disabled:m,isClickable:!m,onClick:B,onDragOver:V,onDragLeave:H,onDrop:U,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&B()},"aria-labelledby":P?[P,j,G.length>0&&M].filter(Boolean).join(` `):void 0,"aria-describedby":[T,A].filter(Boolean).join(` `)||void 0,"aria-required":b,"aria-invalid":!!y,icon:v&&(0,u.jsx)(i.Icon,{name:v,color:m?`disabled`:`primary`}),description:(0,u.jsx)(`span`,{id:j,children:D}),children:G.length>0?(0,u.jsx)(`div`,{id:M,className:s.default.fileList,children:G.map((e,t)=>(0,u.jsx)(`span`,{className:s.default.fileName,children:e},t))}):null})]})};exports.Dropzone=d;
|