wimui 0.62.1 → 0.63.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/_internal/observeMove.cjs +2 -0
- package/dist/components/_internal/observeMove.d.ts +16 -0
- package/dist/components/_internal/observeMove.js +44 -0
- package/dist/components/feedback/Tour/Tour.cjs +1 -1
- package/dist/components/feedback/Tour/Tour.js +91 -88
- package/dist/components/form/Button/Button.cjs +1 -1
- package/dist/components/form/Button/Button.d.ts +2 -2
- package/dist/components/form/Button/Button.js +14 -12
- package/dist/components/form/Textarea/Textarea.cjs +1 -1
- package/dist/components/form/Textarea/Textarea.js +4 -4
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.js +3 -2
- package/dist/components/layout/Navbar/Navbar.cjs +1 -1
- package/dist/components/layout/Navbar/Navbar.js +1 -0
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.js +49 -49
- package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
- package/dist/components/media/ImageCompare/ImageCompare.js +5 -4
- package/dist/components/navigation/Affix/Affix.cjs +1 -1
- package/dist/components/navigation/Affix/Affix.js +39 -36
- package/dist/components/navigation/Menubar/Menubar.cjs +1 -1
- package/dist/components/navigation/Menubar/Menubar.js +67 -61
- package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/overlay/Dropdown/Dropdown.js +42 -36
- package/dist/llms-full.txt +3 -3
- package/dist/llms.txt +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ var x = o.createContext({
|
|
|
15
15
|
close: () => {},
|
|
16
16
|
menuId: "",
|
|
17
17
|
triggerId: "",
|
|
18
|
+
setTriggerIdOverride: () => {},
|
|
19
|
+
setMenuIdOverride: () => {},
|
|
18
20
|
focusedIndex: -1,
|
|
19
21
|
setFocusedIndex: () => {},
|
|
20
22
|
registerItem: () => 0,
|
|
@@ -43,10 +45,10 @@ var x = o.createContext({
|
|
|
43
45
|
let R = () => {
|
|
44
46
|
let e = M.current;
|
|
45
47
|
return M.current += 1, e;
|
|
46
|
-
}, z = u(), B = `wim-dropdown-menu-${z}`,
|
|
48
|
+
}, z = u(), [B, V] = f(void 0), [H, U] = f(void 0), W = H ?? `wim-dropdown-menu-${z}`, G = B ?? `wim-dropdown-trigger-${z}`, K = () => {
|
|
47
49
|
let e = !D;
|
|
48
50
|
O(e), A(e ? 0 : -1);
|
|
49
|
-
},
|
|
51
|
+
}, q = c(() => {
|
|
50
52
|
let e = F.floating.current, t = !!e && e.contains(document.activeElement);
|
|
51
53
|
O(!1), A(-1), t && F.reference.current?.focus?.({ preventScroll: !0 });
|
|
52
54
|
}, [
|
|
@@ -57,9 +59,9 @@ var x = o.createContext({
|
|
|
57
59
|
l(() => {
|
|
58
60
|
let e = (e) => {
|
|
59
61
|
let t = e.target, n = F.floating.current?.contains(t) ?? !1;
|
|
60
|
-
j.current && !j.current.contains(t) && !n &&
|
|
62
|
+
j.current && !j.current.contains(t) && !n && q();
|
|
61
63
|
}, t = (e) => {
|
|
62
|
-
e.key === "Escape" &&
|
|
64
|
+
e.key === "Escape" && q();
|
|
63
65
|
};
|
|
64
66
|
return D && (document.addEventListener("mousedown", e), document.addEventListener("keydown", t)), () => {
|
|
65
67
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
@@ -67,9 +69,9 @@ var x = o.createContext({
|
|
|
67
69
|
}, [
|
|
68
70
|
D,
|
|
69
71
|
F.floating,
|
|
70
|
-
|
|
72
|
+
q
|
|
71
73
|
]);
|
|
72
|
-
let
|
|
74
|
+
let J = (e) => {
|
|
73
75
|
if (!D) return;
|
|
74
76
|
let t = Array.from((F.floating.current ?? j.current)?.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])") || []);
|
|
75
77
|
switch (e.key) {
|
|
@@ -85,7 +87,7 @@ var x = o.createContext({
|
|
|
85
87
|
case "End":
|
|
86
88
|
e.preventDefault(), A(t.length - 1);
|
|
87
89
|
break;
|
|
88
|
-
case "Tab":
|
|
90
|
+
case "Tab": q();
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
l(() => {
|
|
@@ -95,14 +97,16 @@ var x = o.createContext({
|
|
|
95
97
|
D,
|
|
96
98
|
F.floating
|
|
97
99
|
]);
|
|
98
|
-
let
|
|
100
|
+
let Y = o ? e : "div";
|
|
99
101
|
return /* @__PURE__ */ m(x.Provider, {
|
|
100
102
|
value: {
|
|
101
103
|
isOpen: D,
|
|
102
|
-
toggle:
|
|
103
|
-
close:
|
|
104
|
-
menuId:
|
|
105
|
-
triggerId:
|
|
104
|
+
toggle: K,
|
|
105
|
+
close: q,
|
|
106
|
+
menuId: W,
|
|
107
|
+
triggerId: G,
|
|
108
|
+
setTriggerIdOverride: V,
|
|
109
|
+
setMenuIdOverride: U,
|
|
106
110
|
focusedIndex: k,
|
|
107
111
|
setFocusedIndex: A,
|
|
108
112
|
registerItem: R,
|
|
@@ -113,56 +117,58 @@ var x = o.createContext({
|
|
|
113
117
|
floatingRef: F.floating,
|
|
114
118
|
setAlign: P
|
|
115
119
|
},
|
|
116
|
-
children: /* @__PURE__ */ m(
|
|
120
|
+
children: /* @__PURE__ */ m(Y, {
|
|
117
121
|
...C,
|
|
118
122
|
role: "none",
|
|
119
123
|
className: p("wim-dropdown", a.root, r),
|
|
120
124
|
ref: L,
|
|
121
|
-
onKeyDown:
|
|
125
|
+
onKeyDown: J,
|
|
122
126
|
children: /* @__PURE__ */ m(t, { children: n })
|
|
123
127
|
})
|
|
124
128
|
});
|
|
125
129
|
});
|
|
126
130
|
S.displayName = "Dropdown";
|
|
127
|
-
var C = s(({ children: n, className: r, asChild: s = !1,
|
|
128
|
-
let { toggle:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
var C = s(({ children: n, className: r, asChild: s = !1, id: c, ...u }, d) => {
|
|
132
|
+
let { toggle: f, isOpen: h, menuId: g, triggerId: _, setTriggerIdOverride: v, setReference: y } = o.useContext(x);
|
|
133
|
+
l(() => (v(c), () => v(void 0)), [c, v]);
|
|
134
|
+
let b = s ? e : "div", S = i(y, d);
|
|
135
|
+
return /* @__PURE__ */ m(b, {
|
|
136
|
+
...u,
|
|
137
|
+
ref: S,
|
|
138
|
+
id: c ?? _,
|
|
133
139
|
className: p(a.trigger, r),
|
|
134
|
-
onClick:
|
|
140
|
+
onClick: f,
|
|
135
141
|
"aria-haspopup": "menu",
|
|
136
|
-
"aria-expanded":
|
|
137
|
-
"aria-controls":
|
|
142
|
+
"aria-expanded": h,
|
|
143
|
+
"aria-controls": h ? g : void 0,
|
|
138
144
|
role: "button",
|
|
139
145
|
tabIndex: 0,
|
|
140
146
|
onKeyDown: (e) => {
|
|
141
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown" && !
|
|
147
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown" && !h) && (e.preventDefault(), f());
|
|
142
148
|
},
|
|
143
149
|
children: /* @__PURE__ */ m(t, { children: n })
|
|
144
150
|
});
|
|
145
151
|
});
|
|
146
152
|
C.displayName = "Dropdown.Trigger";
|
|
147
|
-
var w = s(({ children: e, className: t, align: r = "left", show: s, style: c,
|
|
148
|
-
let { isOpen:
|
|
149
|
-
l(() => {
|
|
150
|
-
|
|
151
|
-
}, [r,
|
|
152
|
-
let
|
|
153
|
+
var w = s(({ children: e, className: t, align: r = "left", show: s, style: c, id: u, "aria-labelledby": d, ...f }, g) => {
|
|
154
|
+
let { isOpen: _, menuId: v, triggerId: y, setMenuIdOverride: b, setFloating: S, floatingStyles: C, setAlign: w } = o.useContext(x);
|
|
155
|
+
l(() => (b(u), () => b(void 0)), [u, b]), l(() => {
|
|
156
|
+
w(r);
|
|
157
|
+
}, [r, w]);
|
|
158
|
+
let T = i(S, g);
|
|
153
159
|
return /* @__PURE__ */ m(h, { children: /* @__PURE__ */ m(n, {
|
|
154
|
-
...
|
|
155
|
-
ref:
|
|
156
|
-
show: s === void 0 ?
|
|
160
|
+
...f,
|
|
161
|
+
ref: T,
|
|
162
|
+
show: s === void 0 ? _ : s,
|
|
157
163
|
preset: "fade",
|
|
158
|
-
id:
|
|
164
|
+
id: u ?? v,
|
|
159
165
|
style: {
|
|
160
|
-
...
|
|
166
|
+
...C,
|
|
161
167
|
...c
|
|
162
168
|
},
|
|
163
169
|
className: p(a.menu, t),
|
|
164
170
|
role: "menu",
|
|
165
|
-
"aria-labelledby":
|
|
171
|
+
"aria-labelledby": d ?? y,
|
|
166
172
|
children: e
|
|
167
173
|
}) });
|
|
168
174
|
});
|
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.63.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
|
|
|
@@ -938,7 +938,7 @@ Useful for using the button styles with Link components (e.g. from React Router
|
|
|
938
938
|
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
|
|
939
939
|
- `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
|
|
940
940
|
- `intent: ButtonIntent` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
|
|
941
|
-
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element
|
|
941
|
+
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element. An icon-only button (no children) needs `aria-label` or `aria-labelledby`: the icon name is not used as the accessible name.
|
|
942
942
|
- `iconPosition: "left" | "right"` = "left" — Position of the icon relative to the label
|
|
943
943
|
- `loading: boolean` = false — Whether to show a loading indicator and disable interaction
|
|
944
944
|
- `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
|
|
@@ -1263,7 +1263,7 @@ text to take a name from, and the icon name is not used as one.
|
|
|
1263
1263
|
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size of the button
|
|
1264
1264
|
- `variant: "solid" | "outline" | "ghost"` = "outline" — Visual style variant of the button
|
|
1265
1265
|
- `intent: ButtonIntent` = "default" — Design intent of the button (visual / semantic state). Unrelated to the ARIA role attribute.
|
|
1266
|
-
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element
|
|
1266
|
+
- `icon: React.ComponentProps<typeof Icon>["name"] | React.ReactNode` — Icon name or custom icon element. An icon-only button (no children) needs `aria-label` or `aria-labelledby`: the icon name is not used as the accessible name.
|
|
1267
1267
|
- `loading: boolean` = false — Whether to show a loading indicator and disable interaction
|
|
1268
1268
|
- `justify: "start" | "center" | "end" | "between"` = "center" — Horizontal alignment of the button content
|
|
1269
1269
|
- `animateWidth: boolean` = false — Whether to animate the width change when label changes
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.63.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
|
|