wimui 0.58.1 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ai/PromptInput/PromptInput.cjs +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +30 -30
- package/dist/components/ai/Terminal/Terminal.cjs +2 -2
- package/dist/components/ai/Terminal/Terminal.js +16 -14
- package/dist/components/data-display/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/data-display/VirtualList/VirtualList.d.ts +2 -0
- package/dist/components/data-display/VirtualList/VirtualList.js +15 -14
- package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
- package/dist/components/form/CopyButton/CopyButton.d.ts +5 -1
- package/dist/components/form/CopyButton/CopyButton.js +17 -15
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.d.ts +7 -1
- package/dist/components/form/Dropzone/Dropzone.js +29 -28
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.d.ts +7 -1
- package/dist/components/form/FileUpload/FileUpload.js +22 -17
- package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/form/ImageCropper/ImageCropper.js +102 -100
- package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.d.ts +7 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.js +104 -102
- package/dist/components/form/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/form/ThemeToggle/ThemeToggle.js +59 -54
- package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
- package/dist/components/media/ImageCompare/ImageCompare.js +33 -31
- package/dist/components/navigation/BackTop/BackTop.cjs +1 -1
- package/dist/components/navigation/BackTop/BackTop.d.ts +4 -0
- package/dist/components/navigation/BackTop/BackTop.js +18 -16
- package/dist/llms-full.txt +15 -1
- package/dist/llms.txt +1 -1
- package/dist/wimui.umd.js +4 -4
- package/package.json +1 -1
|
@@ -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("../../../i18n/useWimTranslation.cjs"),r=require("../../../i18n/generated/common.cjs"),i=require("../../../icon/chevron-up.cjs"),a=require("../../media/Icon/Icon.cjs"),o=require("./backtop.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=s.default.forwardRef(({target:e=()=>window,visibilityHeight:u=400,onClick:d,children:f,className:p,style:m,"aria-label":h,asChild:
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../i18n/generated/common.cjs"),i=require("../../../icon/chevron-up.cjs"),a=require("../../media/Icon/Icon.cjs"),o=require("./backtop.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=s.default.forwardRef(({target:e=()=>window,visibilityHeight:u=400,onClick:d,children:f,className:p,style:m,"aria-label":h,"aria-labelledby":g,"aria-describedby":_,asChild:v=!1},y)=>{let{t:b}=n.useWimTranslation(r.commonNs),[x,S]=(0,s.useState)(!1),C=(0,s.useCallback)(e=>e===window||e instanceof Window?window.pageYOffset||document.documentElement.scrollTop:e instanceof Document?document.documentElement.scrollTop:e.scrollTop,[]),w=(0,s.useCallback)(()=>{let t=e();if(!t)return;let n=C(t);S(n>u)},[e,u,C]);(0,s.useEffect)(()=>{let t=e();if(t)return requestAnimationFrame(w),t.addEventListener(`scroll`,w),()=>{t.removeEventListener(`scroll`,w)}},[e,w]);let T=t=>{let n=e();n&&(n===window||n instanceof Window?window.scrollTo({top:0,behavior:`smooth`}):n instanceof Document?document.documentElement.scrollTo({top:0,behavior:`smooth`}):n.scrollTo({top:0,behavior:`smooth`}),d?.(t))},E=(0,l.jsx)(`div`,{className:o.default.content,children:(0,l.jsx)(a.Icon,{component:i.default,className:o.default.icon})});return(0,l.jsx)(v?t.Root:`div`,{ref:y,className:(0,c.default)(`wim-back-top`,o.default.root,!x&&o.default.hidden,p),style:m,onClick:T,role:`button`,tabIndex:0,"aria-label":g?void 0:h??b(`a11y.back_to_top`),"aria-labelledby":g,"aria-describedby":_,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&e.currentTarget.click()},children:(0,l.jsx)(t.Slottable,{children:f||E})})});u.displayName=`BackTop`,exports.BackTop=u,exports.default=u;
|
|
@@ -14,6 +14,10 @@ export interface BackTopProps {
|
|
|
14
14
|
style?: React.CSSProperties;
|
|
15
15
|
/** Accessible label for the button */
|
|
16
16
|
"aria-label"?: string;
|
|
17
|
+
/** ID of the element that labels the button. Takes precedence over `aria-label`. */
|
|
18
|
+
"aria-labelledby"?: string;
|
|
19
|
+
/** ID of the element that describes the button. */
|
|
20
|
+
"aria-describedby"?: string;
|
|
17
21
|
/** Whether to render as a child element. */
|
|
18
22
|
asChild?: boolean;
|
|
19
23
|
}
|
|
@@ -9,24 +9,24 @@ import s, { useCallback as c, useEffect as l, useState as u } from "react";
|
|
|
9
9
|
import d from "classnames";
|
|
10
10
|
import { jsx as f } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/navigation/BackTop/BackTop.tsx
|
|
12
|
-
var p = s.forwardRef(({ target: s = () => window, visibilityHeight: p = 400, onClick: m, children: h, className: g, style: _, "aria-label": v,
|
|
13
|
-
let { t:
|
|
12
|
+
var p = s.forwardRef(({ target: s = () => window, visibilityHeight: p = 400, onClick: m, children: h, className: g, style: _, "aria-label": v, "aria-labelledby": y, "aria-describedby": b, asChild: x = !1 }, S) => {
|
|
13
|
+
let { t: C } = n(r), [w, T] = u(!1), E = c((e) => e === window || e instanceof Window ? window.pageYOffset || document.documentElement.scrollTop : e instanceof Document ? document.documentElement.scrollTop : e.scrollTop, []), D = c(() => {
|
|
14
14
|
let e = s();
|
|
15
15
|
if (!e) return;
|
|
16
|
-
let t =
|
|
17
|
-
|
|
16
|
+
let t = E(e);
|
|
17
|
+
T(t > p);
|
|
18
18
|
}, [
|
|
19
19
|
s,
|
|
20
20
|
p,
|
|
21
|
-
|
|
21
|
+
E
|
|
22
22
|
]);
|
|
23
23
|
l(() => {
|
|
24
24
|
let e = s();
|
|
25
|
-
if (e) return requestAnimationFrame(
|
|
26
|
-
e.removeEventListener("scroll",
|
|
25
|
+
if (e) return requestAnimationFrame(D), e.addEventListener("scroll", D), () => {
|
|
26
|
+
e.removeEventListener("scroll", D);
|
|
27
27
|
};
|
|
28
|
-
}, [s,
|
|
29
|
-
let
|
|
28
|
+
}, [s, D]);
|
|
29
|
+
let O = (e) => {
|
|
30
30
|
let t = s();
|
|
31
31
|
t && (t === window || t instanceof Window ? window.scrollTo({
|
|
32
32
|
top: 0,
|
|
@@ -38,25 +38,27 @@ var p = s.forwardRef(({ target: s = () => window, visibilityHeight: p = 400, onC
|
|
|
38
38
|
top: 0,
|
|
39
39
|
behavior: "smooth"
|
|
40
40
|
}), m?.(e));
|
|
41
|
-
},
|
|
41
|
+
}, k = /* @__PURE__ */ f("div", {
|
|
42
42
|
className: o.content,
|
|
43
43
|
children: /* @__PURE__ */ f(a, {
|
|
44
44
|
component: i,
|
|
45
45
|
className: o.icon
|
|
46
46
|
})
|
|
47
47
|
});
|
|
48
|
-
return /* @__PURE__ */ f(
|
|
49
|
-
ref:
|
|
50
|
-
className: d("wim-back-top", o.root, !
|
|
48
|
+
return /* @__PURE__ */ f(x ? e : "div", {
|
|
49
|
+
ref: S,
|
|
50
|
+
className: d("wim-back-top", o.root, !w && o.hidden, g),
|
|
51
51
|
style: _,
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: O,
|
|
53
53
|
role: "button",
|
|
54
54
|
tabIndex: 0,
|
|
55
|
-
"aria-label": v ??
|
|
55
|
+
"aria-label": y ? void 0 : v ?? C("a11y.back_to_top"),
|
|
56
|
+
"aria-labelledby": y,
|
|
57
|
+
"aria-describedby": b,
|
|
56
58
|
onKeyDown: (e) => {
|
|
57
59
|
(e.key === "Enter" || e.key === " ") && e.currentTarget.click();
|
|
58
60
|
},
|
|
59
|
-
children: /* @__PURE__ */ f(t, { children: h ||
|
|
61
|
+
children: /* @__PURE__ */ f(t, { children: h || k })
|
|
60
62
|
});
|
|
61
63
|
});
|
|
62
64
|
p.displayName = "BackTop";
|
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.59.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
|
|
|
@@ -1075,6 +1075,8 @@ so the unit does not have to be repeated in the label.
|
|
|
1075
1075
|
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
|
|
1076
1076
|
- `className: string` — Additional class names
|
|
1077
1077
|
- `aria-label: string` — Accessible label for the button
|
|
1078
|
+
- `aria-labelledby: string` — ID of the element that labels the button. Takes precedence over `aria-label`.
|
|
1079
|
+
- `aria-describedby: string` — ID of the element that describes the button.
|
|
1078
1080
|
- `copyLabel: string` — Tooltip label before copying
|
|
1079
1081
|
- `copiedLabel: string` — Tooltip label after copying
|
|
1080
1082
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
@@ -1178,6 +1180,9 @@ them. Leave it undefined to let the area track its own selection.
|
|
|
1178
1180
|
- `required: boolean` — Whether to show the required indicator
|
|
1179
1181
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
1180
1182
|
- `size: InteractiveAreaProps["size"]` = "md" — Size of the drop area
|
|
1183
|
+
- `aria-label: string` — Accessible name for the drop area when no visible `label` is provided.
|
|
1184
|
+
- `aria-labelledby: string` — ID of the element that labels the drop area when no visible `label` is provided.
|
|
1185
|
+
- `aria-describedby: string` — ID of the element that describes the drop area. Announced together with the error message.
|
|
1181
1186
|
- **FieldError** — Validation messages
|
|
1182
1187
|
- `content: string` (required) — Error message text
|
|
1183
1188
|
- `className: string` — Additional class names
|
|
@@ -1225,6 +1230,9 @@ it undefined to let the field track its own selection.
|
|
|
1225
1230
|
- `error: string` — Error message
|
|
1226
1231
|
- `required: boolean` — Whether to show the required indicator
|
|
1227
1232
|
- `layout: "vertical" | "horizontal"` = "vertical" — Layout direction of label and field
|
|
1233
|
+
- `aria-label: string` — Accessible name for the choose-file button when no visible `label` is provided.
|
|
1234
|
+
- `aria-labelledby: string` — ID of the element that labels the choose-file button when no visible `label` is provided.
|
|
1235
|
+
- `aria-describedby: string` — ID of the element that describes the choose-file button. Announced together with the error message.
|
|
1228
1236
|
- **FloatButton** — Floating action buttons
|
|
1229
1237
|
- `asChild: boolean` = false — If true, the button will be rendered as its child, merging its props onto that child.
|
|
1230
1238
|
- `iconName: "CircleIcon" | "SquareIcon" | "LoadingIcon" | "ExternalLinkIcon" | "ArrowUpIcon" | string` = "CircleIcon" — Icon name from the library
|
|
@@ -1507,6 +1515,9 @@ so the unit does not have to be repeated in the label.
|
|
|
1507
1515
|
- `className: string` — Additional class name
|
|
1508
1516
|
- `id: string` — Unique ID for the component
|
|
1509
1517
|
- `labels: QueryBuilderLabels` = {} — Labels for internationalization
|
|
1518
|
+
- `aria-label: string` — Accessible name for the query builder region. Takes precedence over `labels.regionAriaLabel`.
|
|
1519
|
+
- `aria-labelledby: string` — ID of the element that labels the query builder region. Takes precedence over `aria-label`.
|
|
1520
|
+
- `aria-describedby: string` — ID of the element that describes the query builder region.
|
|
1510
1521
|
- **Radio** — Single choice
|
|
1511
1522
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1512
1523
|
- `children: React.ReactNode` — Label content rendered next to the radio
|
|
@@ -2134,6 +2145,8 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2134
2145
|
- `className: string` — Additional class names
|
|
2135
2146
|
- `style: React.CSSProperties` — Style attribute
|
|
2136
2147
|
- `aria-label: string` — Accessible label for the button
|
|
2148
|
+
- `aria-labelledby: string` — ID of the element that labels the button. Takes precedence over `aria-label`.
|
|
2149
|
+
- `aria-describedby: string` — ID of the element that describes the button.
|
|
2137
2150
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
2138
2151
|
- **Breadcrumb** — Location trace (aka Path Bar, Path Control)
|
|
2139
2152
|
- `items: BreadcrumbItem[]` (required) — Items to display, from the root to the current page.
|
|
@@ -2785,6 +2798,7 @@ anything is measured; long text is truncated and read in full by assistive techn
|
|
|
2785
2798
|
- `role: string` = "list" — Role of the whole list (for accessibility)
|
|
2786
2799
|
- `aria-label: string` — Accessible label
|
|
2787
2800
|
- `aria-labelledby: string` — ID of the element that labels the list
|
|
2801
|
+
- `aria-describedby: string` — ID of the element that describes the list
|
|
2788
2802
|
|
|
2789
2803
|
### overlay — `import { … } from "wimui/overlay"`
|
|
2790
2804
|
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.59.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
|
|