wimui 0.50.3 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
  2. package/dist/components/data-display/Calendar/Calendar.js +116 -71
  3. package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
  4. package/dist/components/data-display/TreeView/TreeView.js +194 -179
  5. package/dist/components/form/Combobox/Combobox.cjs +1 -1
  6. package/dist/components/form/Combobox/Combobox.js +2 -1
  7. package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
  8. package/dist/components/form/DatePicker/DatePicker.js +3 -2
  9. package/dist/components/form/Input/Input.cjs +1 -1
  10. package/dist/components/form/Input/Input.d.ts +7 -0
  11. package/dist/components/form/Input/Input.js +51 -50
  12. package/dist/components/form/InputBase/InputBase.cjs +1 -1
  13. package/dist/components/form/InputBase/InputBase.d.ts +7 -0
  14. package/dist/components/form/InputBase/InputBase.js +5 -1
  15. package/dist/components/form/InputBase/input-base.module.cjs +1 -1
  16. package/dist/components/form/InputBase/input-base.module.js +1 -1
  17. package/dist/components/form/TimePicker/TimePicker.cjs +1 -1
  18. package/dist/components/form/TimePicker/TimePicker.js +1 -0
  19. package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
  20. package/dist/components/form/TreeSelect/TreeSelect.js +5 -1
  21. package/dist/components/navigation/Menubar/Menubar.cjs +1 -1
  22. package/dist/components/navigation/Menubar/Menubar.js +31 -26
  23. package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
  24. package/dist/components/navigation/SpeedDial/SpeedDial.d.ts +2 -2
  25. package/dist/components/navigation/SpeedDial/SpeedDial.js +53 -39
  26. package/dist/components/overlay/FocusTrap/FocusTrap.cjs +1 -1
  27. package/dist/components/overlay/FocusTrap/FocusTrap.js +5 -4
  28. package/dist/llms-full.txt +34 -2
  29. package/dist/llms.txt +1 -1
  30. package/dist/styles.css +1 -1
  31. package/dist/wimui.umd.css +1 -1
  32. package/dist/wimui.umd.js +5 -5
  33. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./focus-trap.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({children:e,active:a=!0,initialFocus:o=!0,className:s})=>{let c=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!a)return;l.current=document.activeElement;let e=c.current;if(!e)return;let t=()=>Array.from(e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)).filter(e=>{let t=window.getComputedStyle(e);return e.tabIndex>=0&&t.display!==`none`&&t.visibility!==`hidden`&&!e.disabled});if(o){let e=t();e.length>0&&e[0].focus()}let n=n=>{if(n.key!==`Tab`)return;let r=t();if(r.length===0){n.preventDefault();return}let i=r[0],a=r[r.length-1],o=document.activeElement;if(!o||!e.contains(o))return;let s=r.indexOf(o);n.shiftKey?(s>=0?s>0:r.some(e=>e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING))||(n.preventDefault(),a.focus()):(s>=0?s<r.length-1:r.some(e=>o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING))||(n.preventDefault(),i.focus())};return document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`keydown`,n),l.current&&l.current.focus()}},[a,o]),(0,i.jsx)(`div`,{ref:c,className:(0,r.default)(`wim-focus-trap`,t.default.root,s),children:e})};exports.FocusTrap=a;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./focus-trap.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({children:e,active:a=!0,initialFocus:o=!0,className:s})=>{let c=(0,n.useRef)(null),l=(0,n.useRef)(null),u=(0,n.useRef)(!1);return a&&!u.current&&typeof document<`u`?(l.current=document.activeElement,u.current=!0):!a&&u.current&&(u.current=!1),(0,n.useEffect)(()=>{if(!a)return;let e=c.current;if(!e)return;let t=()=>Array.from(e.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)).filter(e=>{let t=window.getComputedStyle(e);return e.tabIndex>=0&&t.display!==`none`&&t.visibility!==`hidden`&&!e.disabled});if(o){let e=t();e.length>0&&e[0].focus()}let n=n=>{if(n.key!==`Tab`)return;let r=t();if(r.length===0){n.preventDefault();return}let i=r[0],a=r[r.length-1],o=document.activeElement;if(!o||!e.contains(o))return;let s=r.indexOf(o);n.shiftKey?(s>=0?s>0:r.some(e=>e.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING))||(n.preventDefault(),a.focus()):(s>=0?s<r.length-1:r.some(e=>o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING))||(n.preventDefault(),i.focus())};return document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`keydown`,n);let e=l.current;e&&e.isConnected&&e.focus()}},[a,o]),(0,i.jsx)(`div`,{ref:c,className:(0,r.default)(`wim-focus-trap`,t.default.root,s),children:e})};exports.FocusTrap=a;
@@ -5,10 +5,9 @@ import r from "classnames";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  //#region src/components/overlay/FocusTrap/FocusTrap.tsx
7
7
  var a = ({ children: a, active: o = !0, initialFocus: s = !0, className: c }) => {
8
- let l = n(null), u = n(null);
9
- return t(() => {
8
+ let l = n(null), u = n(null), d = n(!1);
9
+ return o && !d.current && typeof document < "u" ? (u.current = document.activeElement, d.current = !0) : !o && d.current && (d.current = !1), t(() => {
10
10
  if (!o) return;
11
- u.current = document.activeElement;
12
11
  let e = l.current;
13
12
  if (!e) return;
14
13
  let t = () => Array.from(e.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])")).filter((e) => {
@@ -32,7 +31,9 @@ var a = ({ children: a, active: o = !0, initialFocus: s = !0, className: c }) =>
32
31
  n.shiftKey ? (s >= 0 ? s > 0 : r.some((e) => e.compareDocumentPosition(o) & Node.DOCUMENT_POSITION_FOLLOWING)) || (n.preventDefault(), a.focus()) : (s >= 0 ? s < r.length - 1 : r.some((e) => o.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING)) || (n.preventDefault(), i.focus());
33
32
  };
34
33
  return document.addEventListener("keydown", n), () => {
35
- document.removeEventListener("keydown", n), u.current && u.current.focus();
34
+ document.removeEventListener("keydown", n);
35
+ let e = u.current;
36
+ e && e.isConnected && e.focus();
36
37
  };
37
38
  }, [o, s]), /* @__PURE__ */ i("div", {
38
39
  ref: l,
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.50.3 — 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).
7
+ **wimui** v0.51.0 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
8
8
 
9
9
  ## Install & required setup
10
10
 
@@ -1010,6 +1010,10 @@ Useful for using the button styles with Link components (e.g. from React Router
1010
1010
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1011
1011
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1012
1012
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1013
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1014
+ clickable but leaves the tab order and is hidden from assistive technology.
1015
+ Use it when the field already does the same thing from the keyboard.
1016
+ @default false
1013
1017
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1014
1018
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1015
1019
  so the unit does not have to be repeated in the label.
@@ -1038,6 +1042,10 @@ so the unit does not have to be repeated in the label.
1038
1042
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1039
1043
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1040
1044
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1045
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1046
+ clickable but leaves the tab order and is hidden from assistive technology.
1047
+ Use it when the field already does the same thing from the keyboard.
1048
+ @default false
1041
1049
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1042
1050
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1043
1051
  so the unit does not have to be repeated in the label.
@@ -1109,6 +1117,10 @@ so the unit does not have to be repeated in the label.
1109
1117
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1110
1118
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1111
1119
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1120
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1121
+ clickable but leaves the tab order and is hidden from assistive technology.
1122
+ Use it when the field already does the same thing from the keyboard.
1123
+ @default false
1112
1124
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1113
1125
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1114
1126
  so the unit does not have to be repeated in the label.
@@ -1287,6 +1299,10 @@ SCSS には誰も付けない `.default_intent` が「temporary name」のまま
1287
1299
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1288
1300
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1289
1301
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1302
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1303
+ clickable but leaves the tab order and is hidden from assistive technology.
1304
+ Use it when the field already does the same thing from the keyboard.
1305
+ @default false
1290
1306
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1291
1307
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1292
1308
  so the unit does not have to be repeated in the label.
@@ -1343,6 +1359,10 @@ make room rather than running underneath it.
1343
1359
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1344
1360
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1345
1361
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1362
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1363
+ clickable but leaves the tab order and is hidden from assistive technology.
1364
+ Use it when the field already does the same thing from the keyboard.
1365
+ @default false
1346
1366
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1347
1367
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1348
1368
  so the unit does not have to be repeated in the label.
@@ -1419,6 +1439,10 @@ box and receives a **1-based** position — the first box is `1`, not `0`.
1419
1439
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1420
1440
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1421
1441
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1442
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1443
+ clickable but leaves the tab order and is hidden from assistive technology.
1444
+ Use it when the field already does the same thing from the keyboard.
1445
+ @default false
1422
1446
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1423
1447
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1424
1448
  so the unit does not have to be repeated in the label.
@@ -1579,6 +1603,10 @@ and image files pasted or dropped into the editor are uploaded and inserted. The
1579
1603
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1580
1604
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1581
1605
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1606
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1607
+ clickable but leaves the tab order and is hidden from assistive technology.
1608
+ Use it when the field already does the same thing from the keyboard.
1609
+ @default false
1582
1610
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1583
1611
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1584
1612
  so the unit does not have to be repeated in the label.
@@ -1761,6 +1789,10 @@ but the toggle only shows a chevron, so it needs one of its own.
1761
1789
  - `showPasswordAriaLabel: string` — Aria label for the show-password toggle
1762
1790
  - `hidePasswordAriaLabel: string` — Aria label for the hide-password toggle
1763
1791
  - `rightIconAriaLabel: string` — Aria label for the right icon button
1792
+ - `rightIconDecorative: boolean` = false — Treats the clickable right icon as a pointer-only affordance: it stays
1793
+ clickable but leaves the tab order and is hidden from assistive technology.
1794
+ Use it when the field already does the same thing from the keyboard.
1795
+ @default false
1764
1796
  - `suffix: React.ReactNode` — Static text shown after the field, inside the same shell — a unit such as
1765
1797
  `kg`, `%` or `円`. It is announced with the field via `aria-describedby`,
1766
1798
  so the unit does not have to be repeated in the label.
@@ -2160,7 +2192,7 @@ near the right edge pushes the page into a horizontal scroll. Anchor a
2160
2192
  - `onOpenChange: (open: boolean) => void` — Callback when open state changes
2161
2193
  - `aria-label: string` — Accessible name for the trigger button.
2162
2194
  Lands on the inner `FloatButton`, not on the wrapper `div`.
2163
- Omit to keep the icon-name fallback (`PlusIcon` / `CloseIcon`).
2195
+ Defaults to a translated "Open menu" / "Close menu" (en / ja / pt), following the open state.
2164
2196
  - **Stepper** — Visual sequence steps
2165
2197
  - ⚠️ Not the same as elsewhere: In Apple HIG and macOS, a "Stepper" is the control that increments a number — that is `NumberInput` here. WIM's `Stepper` shows progress through a sequence of steps, which is what Material calls a Stepper.
2166
2198
  - `steps: Step[]` = [] — Array of step configurations
package/dist/llms.txt CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.50.3 — 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).
7
+ **wimui** v0.51.0 — a React 19 component library: 228 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
8
8
 
9
9
  ## Install & required setup
10
10