wimui 0.30.0 → 0.32.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 +10 -9
- package/README.md +9 -6
- package/dist/components/_internal/StatusContent.cjs +1 -1
- package/dist/components/_internal/StatusContent.d.ts +9 -2
- package/dist/components/_internal/StatusContent.js +4 -2
- package/dist/components/_internal/status-content.module.cjs +1 -1
- package/dist/components/_internal/status-content.module.js +11 -9
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.d.ts +6 -0
- package/dist/components/data-display/Carousel/Carousel.js +92 -92
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +14 -13
- package/dist/components/data-display/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/data-display/EmptyState/EmptyState.d.ts +7 -1
- package/dist/components/data-display/EmptyState/EmptyState.js +4 -3
- package/dist/components/data-display/Marquee/Marquee.cjs +1 -1
- package/dist/components/data-display/Marquee/Marquee.d.ts +4 -1
- package/dist/components/data-display/Marquee/Marquee.js +4 -2
- package/dist/components/data-display/Marquee/marquee.module.cjs +1 -1
- package/dist/components/data-display/Marquee/marquee.module.js +1 -1
- package/dist/components/data-display/Stats/Stats.cjs +1 -1
- package/dist/components/data-display/Stats/Stats.d.ts +14 -3
- package/dist/components/data-display/Stats/Stats.js +12 -6
- package/dist/components/data-display/Stats/stats.module.cjs +1 -1
- package/dist/components/data-display/Stats/stats.module.js +4 -4
- package/dist/components/form/RichTextEditor/commands.d.ts +1 -1
- package/dist/components/layout/BentoGrid/BentoGrid.cjs +1 -1
- package/dist/components/layout/BentoGrid/BentoGrid.d.ts +18 -5
- package/dist/components/layout/BentoGrid/BentoGrid.js +43 -36
- package/dist/components/layout/BentoGrid/bento-grid.module.cjs +1 -1
- package/dist/components/layout/BentoGrid/bento-grid.module.js +7 -6
- package/dist/components/layout/Group/Group.cjs +1 -1
- package/dist/components/layout/Group/Group.d.ts +10 -2
- package/dist/components/layout/Group/Group.js +1 -1
- package/dist/components/layout/InteractiveArea/InteractiveArea.cjs +1 -1
- package/dist/components/layout/InteractiveArea/InteractiveArea.d.ts +16 -0
- package/dist/components/layout/InteractiveArea/InteractiveArea.js +21 -20
- package/dist/components/layout/InteractiveArea/interactive-area.module.cjs +1 -1
- package/dist/components/layout/InteractiveArea/interactive-area.module.js +23 -21
- package/dist/components/layout/Masonry/Masonry.cjs +1 -1
- package/dist/components/layout/Masonry/Masonry.d.ts +20 -4
- package/dist/components/layout/Masonry/Masonry.js +26 -25
- package/dist/components/layout/SimpleGrid/SimpleGrid.cjs +1 -1
- package/dist/components/layout/SimpleGrid/SimpleGrid.d.ts +5 -1
- package/dist/components/layout/SimpleGrid/SimpleGrid.js +1 -1
- package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/overlay/Dropdown/Dropdown.d.ts +14 -0
- package/dist/components/overlay/Dropdown/Dropdown.js +99 -93
- package/dist/llms-full.txt +37 -7
- package/dist/llms.txt +2 -2
- package/dist/styles.css +2 -2
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +33 -14
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import e from "
|
|
3
|
-
import t from "
|
|
4
|
-
import n from "
|
|
5
|
-
import
|
|
2
|
+
import { getSpacingValue as e } from "../../../utilities/style-utils.js";
|
|
3
|
+
import t from "./masonry.module.js";
|
|
4
|
+
import n from "react";
|
|
5
|
+
import r from "classnames";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/layout/Masonry/Masonry.tsx
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
columnCount:
|
|
10
|
-
columnGap:
|
|
11
|
-
...
|
|
12
|
-
},
|
|
8
|
+
var a = n.forwardRef(({ columns: a = 3, spacing: o = "2xl", className: s, style: c, children: l, ...u }, d) => {
|
|
9
|
+
let f = {
|
|
10
|
+
columnCount: a,
|
|
11
|
+
columnGap: e(o),
|
|
12
|
+
...c
|
|
13
|
+
}, p = {
|
|
13
14
|
breakInside: "avoid",
|
|
14
|
-
marginBottom:
|
|
15
|
+
marginBottom: e(o)
|
|
15
16
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
ref:
|
|
18
|
-
className:
|
|
19
|
-
style:
|
|
20
|
-
...
|
|
21
|
-
children:
|
|
22
|
-
if (
|
|
23
|
-
let i =
|
|
24
|
-
return
|
|
17
|
+
return /* @__PURE__ */ i("div", {
|
|
18
|
+
ref: d,
|
|
19
|
+
className: r("wim-masonry", t.root, s),
|
|
20
|
+
style: f,
|
|
21
|
+
...u,
|
|
22
|
+
children: n.Children.map(l, (e) => {
|
|
23
|
+
if (n.isValidElement(e)) {
|
|
24
|
+
let i = e.props, a = i.style || {};
|
|
25
|
+
return n.cloneElement(e, {
|
|
25
26
|
style: {
|
|
26
|
-
...
|
|
27
|
+
...p,
|
|
27
28
|
...a
|
|
28
29
|
},
|
|
29
|
-
className:
|
|
30
|
+
className: r(t.item, i.className),
|
|
30
31
|
"data-testid": "masonry-item"
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
+
return e;
|
|
34
35
|
})
|
|
35
36
|
});
|
|
36
37
|
});
|
|
37
|
-
|
|
38
|
+
a.displayName = "Masonry";
|
|
38
39
|
//#endregion
|
|
39
|
-
export {
|
|
40
|
+
export { a as Masonry };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("../Grid/grid-utils.cjs"),r=require("./simple-grid.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=i.default.forwardRef(({cols:e=1,spacing:i
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("../Grid/grid-utils.cjs"),r=require("./simple-grid.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=i.default.forwardRef(({cols:e=1,spacing:i=`2xl`,verticalSpacing:s,minChildWidth:c,className:l,style:u,children:d,...f},p)=>{let m=n.generateResponsiveVars(e,`--wim-simple-grid-cols`,e=>`repeat(${e}, minmax(0, 1fr))`),h={display:`grid`,gap:t.getSpacingValue(i),rowGap:t.getSpacingValue(s??i),gridTemplateColumns:c?`repeat(auto-fill, minmax(${typeof c==`number`?`${c}px`:c}, 1fr))`:void 0,...m,...u};return(0,o.jsx)(`div`,{className:r.default.container,children:(0,o.jsx)(`div`,{ref:p,className:(0,a.default)(`wim-simple-grid`,r.default.root,l),style:h,...f,children:d})})});s.displayName=`SimpleGrid`,exports.SimpleGrid=s;
|
|
@@ -3,7 +3,11 @@ import { ResponsiveProp } from '../../layout/Grid/grid-utils';
|
|
|
3
3
|
export declare const SimpleGrid: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
4
|
/** Number of columns (or a responsive object per breakpoint) */
|
|
5
5
|
cols?: ResponsiveProp<number>;
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Spacing between cells: a spacing token name (`"md"`, `"2xl"`, …) or a raw
|
|
8
|
+
* number of pixels. Prefer the token so the gap follows the theme.
|
|
9
|
+
* @default "2xl"
|
|
10
|
+
*/
|
|
7
11
|
spacing?: number | string;
|
|
8
12
|
/** Vertical spacing between rows (defaults to `spacing`) */
|
|
9
13
|
verticalSpacing?: number | string;
|
|
@@ -6,7 +6,7 @@ import r from "react";
|
|
|
6
6
|
import i from "classnames";
|
|
7
7
|
import { jsx as a } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/layout/SimpleGrid/SimpleGrid.tsx
|
|
9
|
-
var o = r.forwardRef(({ cols: r = 1, spacing: o =
|
|
9
|
+
var o = r.forwardRef(({ cols: r = 1, spacing: o = "2xl", verticalSpacing: s, minChildWidth: c, className: l, style: u, children: d, ...f }, p) => {
|
|
10
10
|
let m = t(r, "--wim-simple-grid-cols", (e) => `repeat(${e}, minmax(0, 1fr))`), h = {
|
|
11
11
|
display: "grid",
|
|
12
12
|
gap: e(o),
|
|
@@ -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("../../layout/Transition/Transition.cjs"),r=require("../../_internal/BaseListItem/BaseListItem.cjs"),i=require("../../_internal/mergeRefs.cjs"),a=require("./dropdown.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("@floating-ui/react");var u=o.default.createContext({isOpen:!1,toggle:()=>{},close:()=>{},menuId:``,triggerId:``,focusedIndex:-1,setFocusedIndex:()=>{},registerItem:()=>0,containerRef:{current:null},setReference:()=>{},setFloating:()=>{},floatingStyles:{},floatingRef:{current:null},setAlign:()=>{}}),d=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,...
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),r=require("../../_internal/BaseListItem/BaseListItem.cjs"),i=require("../../_internal/mergeRefs.cjs"),a=require("./dropdown.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime"),l=require("@floating-ui/react");var u=o.default.createContext({isOpen:!1,toggle:()=>{},close:()=>{},menuId:``,triggerId:``,focusedIndex:-1,setFocusedIndex:()=>{},registerItem:()=>0,containerRef:{current:null},setReference:()=>{},setFloating:()=>{},floatingStyles:{},floatingRef:{current:null},setAlign:()=>{}}),d=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,defaultOpen:d=!1,open:f,onOpenChange:p,...m},h)=>{let[g,_]=(0,o.useState)(d),v=f??g,y=(0,o.useCallback)(e=>{f===void 0&&_(e),p?.(e)},[f,p]),[b,x]=(0,o.useState)(-1),S=(0,o.useRef)(null),C=(0,o.useRef)(0),[w,T]=(0,o.useState)(`left`),{refs:E,floatingStyles:D}=(0,l.useFloating)({open:v,placement:w===`right`?`bottom-end`:`bottom-start`,whileElementsMounted:l.autoUpdate,middleware:[(0,l.offset)(4),(0,l.flip)(),(0,l.shift)({padding:8})]}),O=i.mergeRefs(S,h);(0,o.useEffect)(()=>{C.current=0});let k=()=>{let e=C.current;return C.current+=1,e},A=(0,o.useId)(),j=`wim-dropdown-menu-${A}`,M=`wim-dropdown-trigger-${A}`,N=()=>{let e=!v;y(e),x(e?0:-1)},P=(0,o.useCallback)(()=>{y(!1),x(-1)},[y]);(0,o.useEffect)(()=>{let e=e=>{let t=e.target,n=E.floating.current?.contains(t)??!1;S.current&&!S.current.contains(t)&&!n&&P()},t=e=>{e.key===`Escape`&&P()};return v&&(document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t)),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[v,E.floating,P]);let F=e=>{if(!v)return;let t=Array.from((E.floating.current??S.current)?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)||[]);switch(e.key){case`ArrowDown`:e.preventDefault(),x(e=>e<t.length-1?e+1:0);break;case`ArrowUp`:e.preventDefault(),x(e=>e>0?e-1:t.length-1);break;case`Home`:e.preventDefault(),x(0);break;case`End`:e.preventDefault(),x(t.length-1);break;case`Tab`:P();break}};(0,o.useEffect)(()=>{v&&b>=0&&Array.from((E.floating.current??S.current)?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)||[])[b]?.focus({preventScroll:!0})},[b,v,E.floating]);let I=r?t.Root:`div`;return(0,c.jsx)(u.Provider,{value:{isOpen:v,toggle:N,close:P,menuId:j,triggerId:M,focusedIndex:b,setFocusedIndex:x,registerItem:k,containerRef:S,setReference:E.setReference,setFloating:E.setFloating,floatingStyles:D,floatingRef:E.floating,setAlign:T},children:(0,c.jsx)(I,{...m,role:`none`,className:(0,s.default)(`wim-dropdown`,a.default.root,n),ref:O,onKeyDown:F,children:(0,c.jsx)(t.Slottable,{children:e})})})});d.displayName=`Dropdown`;var f=(0,o.forwardRef)(({children:e,className:n,asChild:r=!1,...l},d)=>{let{toggle:f,isOpen:p,menuId:m,triggerId:h,setReference:g}=o.default.useContext(u),_=r?t.Root:`div`,v=i.mergeRefs(g,d);return(0,c.jsx)(_,{...l,ref:v,id:h,className:(0,s.default)(a.default.trigger,n),onClick:f,"aria-haspopup":`menu`,"aria-expanded":p,"aria-controls":p?m:void 0,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f())},children:(0,c.jsx)(t.Slottable,{children:e})})});f.displayName=`Dropdown.Trigger`;var p=(0,o.forwardRef)(({children:e,className:t,align:r=`left`,show:d,style:f,...p},m)=>{let{isOpen:h,menuId:g,triggerId:_,setFloating:v,floatingStyles:y,setAlign:b}=o.default.useContext(u);(0,o.useEffect)(()=>{b(r)},[r,b]);let x=i.mergeRefs(v,m);return(0,c.jsx)(l.FloatingPortal,{children:(0,c.jsx)(n.Transition,{...p,ref:x,show:d===void 0?h:d,preset:`fade`,id:g,style:{...y,...f},className:(0,s.default)(a.default.menu,t),role:`menu`,"aria-labelledby":_,children:e})})});p.displayName=`Dropdown.Menu`;var m=(0,o.forwardRef)(({children:e,onClick:t,disabled:n=!1,className:i,...l},d)=>{let{close:f,focusedIndex:p,setFocusedIndex:m,registerItem:h}=o.default.useContext(u),[g]=(0,o.useState)(()=>h()),_=p===g,v=e=>{n||(e.stopPropagation(),t&&t(),f())};return(0,c.jsx)(r.BaseListItem,{...l,ref:d,className:(0,s.default)(a.default.item,i),onClick:v,onFocus:()=>m(g),disabled:n,role:`menuitem`,tabIndex:_?0:-1,onKeyDown:e=>{!n&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},children:e})});m.displayName=`Dropdown.Item`;var h=(0,o.forwardRef)((e,t)=>(0,c.jsx)(d,{...e,ref:t}));h.displayName=`Dropdown`,h.Trigger=f,h.Menu=p,h.Item=m,exports.Dropdown=h,exports.default=h,exports.DropdownItem=m,exports.DropdownMenu=p,exports.DropdownTrigger=f;
|
|
@@ -10,6 +10,20 @@ export interface DropdownProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
|
10
10
|
* If true, the dropdown will be rendered as its child, merging its props onto that child.
|
|
11
11
|
*/
|
|
12
12
|
asChild?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the menu starts open. Use it for a screenshot, a test, or a menu that should
|
|
15
|
+
* already be showing. Ignored once `open` is provided.
|
|
16
|
+
*/
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Controls the open state from the outside. Pass it together with `onOpenChange`.
|
|
20
|
+
*/
|
|
21
|
+
open?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Called with the next open state, both when the trigger is used and when the menu is
|
|
24
|
+
* dismissed by an outside click or Escape.
|
|
25
|
+
*/
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
27
|
}
|
|
14
28
|
export interface DropdownTriggerProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
15
29
|
children: ReactNode;
|
|
@@ -4,12 +4,12 @@ import { Transition as n } from "../../layout/Transition/Transition.js";
|
|
|
4
4
|
import { BaseListItem as r } from "../../_internal/BaseListItem/BaseListItem.js";
|
|
5
5
|
import { mergeRefs as i } from "../../_internal/mergeRefs.js";
|
|
6
6
|
import a from "./dropdown.module.js";
|
|
7
|
-
import o, { forwardRef as s,
|
|
8
|
-
import
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { FloatingPortal as
|
|
7
|
+
import o, { forwardRef as s, useCallback as c, useEffect as l, useId as u, useRef as d, useState as f } from "react";
|
|
8
|
+
import p from "classnames";
|
|
9
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
10
|
+
import { FloatingPortal as h, autoUpdate as g, flip as _, offset as v, shift as y, useFloating as b } from "@floating-ui/react";
|
|
11
11
|
//#region src/components/overlay/Dropdown/Dropdown.tsx
|
|
12
|
-
var
|
|
12
|
+
var x = o.createContext({
|
|
13
13
|
isOpen: !1,
|
|
14
14
|
toggle: () => {},
|
|
15
15
|
close: () => {},
|
|
@@ -24,150 +24,156 @@ var b = o.createContext({
|
|
|
24
24
|
floatingStyles: {},
|
|
25
25
|
floatingRef: { current: null },
|
|
26
26
|
setAlign: () => {}
|
|
27
|
-
}),
|
|
28
|
-
let [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
}), S = s(({ children: n, className: r, asChild: o = !1, defaultOpen: s = !1, open: h, onOpenChange: S, ...C }, w) => {
|
|
28
|
+
let [T, E] = f(s), D = h ?? T, O = c((e) => {
|
|
29
|
+
h === void 0 && E(e), S?.(e);
|
|
30
|
+
}, [h, S]), [k, A] = f(-1), j = d(null), M = d(0), [N, P] = f("left"), { refs: F, floatingStyles: I } = b({
|
|
31
|
+
open: D,
|
|
32
|
+
placement: N === "right" ? "bottom-end" : "bottom-start",
|
|
33
|
+
whileElementsMounted: g,
|
|
32
34
|
middleware: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
v(4),
|
|
36
|
+
_(),
|
|
37
|
+
y({ padding: 8 })
|
|
36
38
|
]
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
}), L = i(j, w);
|
|
40
|
+
l(() => {
|
|
41
|
+
M.current = 0;
|
|
40
42
|
});
|
|
41
|
-
let
|
|
42
|
-
let e =
|
|
43
|
-
return
|
|
44
|
-
},
|
|
45
|
-
let e = !
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
|
|
43
|
+
let R = () => {
|
|
44
|
+
let e = M.current;
|
|
45
|
+
return M.current += 1, e;
|
|
46
|
+
}, z = u(), B = `wim-dropdown-menu-${z}`, V = `wim-dropdown-trigger-${z}`, H = () => {
|
|
47
|
+
let e = !D;
|
|
48
|
+
O(e), A(e ? 0 : -1);
|
|
49
|
+
}, U = c(() => {
|
|
50
|
+
O(!1), A(-1);
|
|
51
|
+
}, [O]);
|
|
52
|
+
l(() => {
|
|
51
53
|
let e = (e) => {
|
|
52
|
-
let t = e.target, n =
|
|
53
|
-
|
|
54
|
+
let t = e.target, n = F.floating.current?.contains(t) ?? !1;
|
|
55
|
+
j.current && !j.current.contains(t) && !n && U();
|
|
54
56
|
}, t = (e) => {
|
|
55
|
-
e.key === "Escape" &&
|
|
57
|
+
e.key === "Escape" && U();
|
|
56
58
|
};
|
|
57
|
-
return
|
|
59
|
+
return D && (document.addEventListener("mousedown", e), document.addEventListener("keydown", t)), () => {
|
|
58
60
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
59
61
|
};
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
}, [
|
|
63
|
+
D,
|
|
64
|
+
F.floating,
|
|
65
|
+
U
|
|
66
|
+
]);
|
|
67
|
+
let W = (e) => {
|
|
68
|
+
if (!D) return;
|
|
69
|
+
let t = Array.from((F.floating.current ?? j.current)?.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])") || []);
|
|
64
70
|
switch (e.key) {
|
|
65
71
|
case "ArrowDown":
|
|
66
|
-
e.preventDefault(),
|
|
72
|
+
e.preventDefault(), A((e) => e < t.length - 1 ? e + 1 : 0);
|
|
67
73
|
break;
|
|
68
74
|
case "ArrowUp":
|
|
69
|
-
e.preventDefault(),
|
|
75
|
+
e.preventDefault(), A((e) => e > 0 ? e - 1 : t.length - 1);
|
|
70
76
|
break;
|
|
71
77
|
case "Home":
|
|
72
|
-
e.preventDefault(),
|
|
78
|
+
e.preventDefault(), A(0);
|
|
73
79
|
break;
|
|
74
80
|
case "End":
|
|
75
|
-
e.preventDefault(),
|
|
81
|
+
e.preventDefault(), A(t.length - 1);
|
|
76
82
|
break;
|
|
77
83
|
case "Tab":
|
|
78
|
-
|
|
84
|
+
U();
|
|
79
85
|
break;
|
|
80
86
|
}
|
|
81
87
|
};
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
l(() => {
|
|
89
|
+
D && k >= 0 && Array.from((F.floating.current ?? j.current)?.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])") || [])[k]?.focus({ preventScroll: !0 });
|
|
84
90
|
}, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
k,
|
|
92
|
+
D,
|
|
93
|
+
F.floating
|
|
88
94
|
]);
|
|
89
|
-
let
|
|
90
|
-
return /* @__PURE__ */
|
|
95
|
+
let G = o ? e : "div";
|
|
96
|
+
return /* @__PURE__ */ m(x.Provider, {
|
|
91
97
|
value: {
|
|
92
|
-
isOpen:
|
|
93
|
-
toggle:
|
|
94
|
-
close:
|
|
95
|
-
menuId:
|
|
96
|
-
triggerId:
|
|
97
|
-
focusedIndex:
|
|
98
|
-
setFocusedIndex:
|
|
99
|
-
registerItem:
|
|
100
|
-
containerRef:
|
|
101
|
-
setReference:
|
|
102
|
-
setFloating:
|
|
103
|
-
floatingStyles:
|
|
104
|
-
floatingRef:
|
|
105
|
-
setAlign:
|
|
98
|
+
isOpen: D,
|
|
99
|
+
toggle: H,
|
|
100
|
+
close: U,
|
|
101
|
+
menuId: B,
|
|
102
|
+
triggerId: V,
|
|
103
|
+
focusedIndex: k,
|
|
104
|
+
setFocusedIndex: A,
|
|
105
|
+
registerItem: R,
|
|
106
|
+
containerRef: j,
|
|
107
|
+
setReference: F.setReference,
|
|
108
|
+
setFloating: F.setFloating,
|
|
109
|
+
floatingStyles: I,
|
|
110
|
+
floatingRef: F.floating,
|
|
111
|
+
setAlign: P
|
|
106
112
|
},
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
...
|
|
113
|
+
children: /* @__PURE__ */ m(G, {
|
|
114
|
+
...C,
|
|
109
115
|
role: "none",
|
|
110
|
-
className:
|
|
111
|
-
ref:
|
|
112
|
-
onKeyDown:
|
|
113
|
-
children: /* @__PURE__ */
|
|
116
|
+
className: p("wim-dropdown", a.root, r),
|
|
117
|
+
ref: L,
|
|
118
|
+
onKeyDown: W,
|
|
119
|
+
children: /* @__PURE__ */ m(t, { children: n })
|
|
114
120
|
})
|
|
115
121
|
});
|
|
116
122
|
});
|
|
117
|
-
|
|
118
|
-
var
|
|
119
|
-
let { toggle: u, isOpen: d, menuId:
|
|
120
|
-
return /* @__PURE__ */
|
|
123
|
+
S.displayName = "Dropdown";
|
|
124
|
+
var C = s(({ children: n, className: r, asChild: s = !1, ...c }, l) => {
|
|
125
|
+
let { toggle: u, isOpen: d, menuId: f, triggerId: h, setReference: g } = o.useContext(x), _ = s ? e : "div", v = i(g, l);
|
|
126
|
+
return /* @__PURE__ */ m(_, {
|
|
121
127
|
...c,
|
|
122
128
|
ref: v,
|
|
123
129
|
id: h,
|
|
124
|
-
className:
|
|
130
|
+
className: p(a.trigger, r),
|
|
125
131
|
onClick: u,
|
|
126
132
|
"aria-haspopup": "menu",
|
|
127
133
|
"aria-expanded": d,
|
|
128
|
-
"aria-controls": d ?
|
|
134
|
+
"aria-controls": d ? f : void 0,
|
|
129
135
|
role: "button",
|
|
130
136
|
tabIndex: 0,
|
|
131
137
|
onKeyDown: (e) => {
|
|
132
138
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), u());
|
|
133
139
|
},
|
|
134
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */ m(t, { children: n })
|
|
135
141
|
});
|
|
136
142
|
});
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
let { isOpen:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}, [r,
|
|
143
|
+
C.displayName = "Dropdown.Trigger";
|
|
144
|
+
var w = s(({ children: e, className: t, align: r = "left", show: s, style: c, ...u }, d) => {
|
|
145
|
+
let { isOpen: f, menuId: g, triggerId: _, setFloating: v, floatingStyles: y, setAlign: b } = o.useContext(x);
|
|
146
|
+
l(() => {
|
|
147
|
+
b(r);
|
|
148
|
+
}, [r, b]);
|
|
143
149
|
let S = i(v, d);
|
|
144
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ m(h, { children: /* @__PURE__ */ m(n, {
|
|
145
151
|
...u,
|
|
146
152
|
ref: S,
|
|
147
|
-
show: s === void 0 ?
|
|
153
|
+
show: s === void 0 ? f : s,
|
|
148
154
|
preset: "fade",
|
|
149
155
|
id: g,
|
|
150
156
|
style: {
|
|
151
157
|
...y,
|
|
152
|
-
...
|
|
158
|
+
...c
|
|
153
159
|
},
|
|
154
|
-
className:
|
|
160
|
+
className: p(a.menu, t),
|
|
155
161
|
role: "menu",
|
|
156
162
|
"aria-labelledby": _,
|
|
157
163
|
children: e
|
|
158
164
|
}) });
|
|
159
165
|
});
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
let { close: l, focusedIndex: u, setFocusedIndex:
|
|
166
|
+
w.displayName = "Dropdown.Menu";
|
|
167
|
+
var T = s(({ children: e, onClick: t, disabled: n = !1, className: i, ...s }, c) => {
|
|
168
|
+
let { close: l, focusedIndex: u, setFocusedIndex: d, registerItem: h } = o.useContext(x), [g] = f(() => h()), _ = u === g, v = (e) => {
|
|
163
169
|
n || (e.stopPropagation(), t && t(), l());
|
|
164
170
|
};
|
|
165
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ m(r, {
|
|
166
172
|
...s,
|
|
167
173
|
ref: c,
|
|
168
|
-
className:
|
|
174
|
+
className: p(a.item, i),
|
|
169
175
|
onClick: v,
|
|
170
|
-
onFocus: () =>
|
|
176
|
+
onFocus: () => d(g),
|
|
171
177
|
disabled: n,
|
|
172
178
|
role: "menuitem",
|
|
173
179
|
tabIndex: _ ? 0 : -1,
|
|
@@ -177,11 +183,11 @@ var w = s(({ children: e, onClick: t, disabled: n = !1, className: i, ...s }, c)
|
|
|
177
183
|
children: e
|
|
178
184
|
});
|
|
179
185
|
});
|
|
180
|
-
|
|
181
|
-
var
|
|
186
|
+
T.displayName = "Dropdown.Item";
|
|
187
|
+
var E = s((e, t) => /* @__PURE__ */ m(S, {
|
|
182
188
|
...e,
|
|
183
189
|
ref: t
|
|
184
190
|
}));
|
|
185
|
-
|
|
191
|
+
E.displayName = "Dropdown", E.Trigger = C, E.Menu = w, E.Item = T;
|
|
186
192
|
//#endregion
|
|
187
|
-
export {
|
|
193
|
+
export { E as Dropdown, E as default, T as DropdownItem, w as DropdownMenu, C as DropdownTrigger };
|
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.32.0 — a React 19 component library: 225 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
|
|
|
@@ -80,7 +80,7 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
80
80
|
10. Keep one elevation stance per screen: don't mix surfaces raised by shadow with surfaces cut by borders. `Card` and `Stats` default to `elevated`, so pass `variant="outline"` when the screen is border-led. If the outer container already casts a shadow, its contents need only a border. On admin/list screens, `Table`/`DataGrid` mobile cards must stay border-only like the toolbar and pagination — row cards with `shadow-sm` while chrome is flat outline is the same mixed stance.
|
|
81
81
|
11. Never wrap a component that already draws its own frame. `<Card><Table card /></Card>` doubles the border and nests radii (12px inside 4px). `Table` takes a `card` prop and `Stats` is already a Card — place them directly.
|
|
82
82
|
12. Always pass `intent` on `Badge` / `Tag` / `Chip`. Their default is `primary` (the accent), so an ordinary value like `pending` or `member` gets painted as loudly as an exception and the colour stops carrying information. Use `intent="neutral"` for ordinary values.
|
|
83
|
-
13. Pick colour by good/bad, not by direction. `Stats.Trend`
|
|
83
|
+
13. Pick colour by good/bad, not by direction. On `Stats.Trend`, `direction` sets the arrow and `intent` sets the colour; without `intent` the colour follows the direction, so `up` is the success colour. For a metric where up is bad (failures, error rate, cost), write `direction="up" intent="danger"` — leaving it out renders the bad news as good. Don't approximate a meaning the API cannot express.
|
|
84
84
|
14. Keep the chrome quiet. Breadcrumb, page title, summary line, toolbar and filter bar frame the content; they must not compete with the protagonist. Don't promote a one-line summary to an `Alert`/`Banner`, don't wrap the filter bar in a `Card` (its border doubles up with the data region's), keep primary surfaces out of the chrome, and don't stack a KPI tile row above a table screen. Corollary of protagonist and accent limits, but it is the rule most often broken on admin/list screens — the test is whether the eye lands on the data first.
|
|
85
85
|
15. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
|
|
86
86
|
16. Check the screen at 390px and 768px before calling it done. The page itself must never scroll sideways (`document.scrollWidth > document.documentElement.clientWidth` is a bug — the usual cause is a group of controls that cannot wrap, e.g. several buttons packed into one `Toolbar.Group`; split them into separate groups). Data tables need their narrow mode turned on (`<DataGrid mobileCard>` / `<Table mobileCard>`) rather than an inner scrollbar: without it columns collapse and a short string like a `Code` lot number breaks one character per line. The default card switch is `container-down(sm)` (576px). Wide grids that still overflow at tablet should pass `mobileCard="md"` so cards continue through 768px.
|
|
@@ -635,6 +635,11 @@ export function RenameWorkspace() {
|
|
|
635
635
|
- `children: React.ReactNode` (required) — Child content
|
|
636
636
|
- **BentoGrid** — Modern card grid (aka Waffle Menu, Bento Menu, Grid Menu, Candy Bar Menu, Chocolate Bar Menu, ベントーメニュー, ワッフルメニュー)
|
|
637
637
|
- `children: React.ReactNode` — Grid items (typically BentoGrid.Item elements)
|
|
638
|
+
- `columns: 2 | 3 | 4` = 3 — How many columns the grid uses from container width `md` up; below that it is
|
|
639
|
+
always a single column. Pick it from what the tiles hold — three columns is a
|
|
640
|
+
layout decision, not a default to accept, and three equal tiles is the shape
|
|
641
|
+
readers have learnt to skip.
|
|
642
|
+
@default 3
|
|
638
643
|
- `rowHeight: string` — Fixed height of each grid row (`grid-auto-rows`). Any CSS length; defaults to `18rem`. Lower it when tiles hold compact content so they don't read as mostly-empty panels.
|
|
639
644
|
- **Box** — Polymorphic box
|
|
640
645
|
- `as: C` — The component used for the root node. Either a string to use a HTML element or a component.
|
|
@@ -757,7 +762,9 @@ The container-query wrapper div is preserved to maintain responsive column behav
|
|
|
757
762
|
- `asChild: boolean` — If true, the group will be rendered as its child, merging its props onto that child.
|
|
758
763
|
- `align: "start" | "center" | "end" | "stretch" | "baseline"` = "center" — Vertical alignment
|
|
759
764
|
- `justify: "start" | "center" | "end" | "between" | "around" | "evenly"` = "start" — Horizontal alignment
|
|
760
|
-
- `gap: number | string` =
|
|
765
|
+
- `gap: number | string` = "2xl" — Gap between elements: a spacing token name (`"md"`, `"2xl"`, …) or a raw
|
|
766
|
+
number of pixels. Prefer the token so the gap follows the theme.
|
|
767
|
+
@default "2xl"
|
|
761
768
|
- `wrap: "nowrap" | "wrap" | "wrap-reverse"` = "wrap" — Whether to wrap children
|
|
762
769
|
- `grow: boolean` = false — Whether items should grow to fill available space
|
|
763
770
|
- **Header** — Upper navigation
|
|
@@ -775,13 +782,22 @@ The container-query wrapper div is preserved to maintain responsive column behav
|
|
|
775
782
|
- `variant: "dashed" | "solid" | "none"` = "dashed" — Border variant
|
|
776
783
|
- `bgVariant: "default" | "transparent" | "muted"` = "default" — Background variant
|
|
777
784
|
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size variation
|
|
785
|
+
- `align: "start" | "center"` = "center" — Horizontal alignment of the icon, text and actions. Centred content only reads
|
|
786
|
+
as deliberate when the area is the one thing in its region — a drop target or a
|
|
787
|
+
whole result page. Inside a card, a table or a column of prose, use `"start"`
|
|
788
|
+
so the block lines up with the text around it.
|
|
789
|
+
@default "center"
|
|
778
790
|
- `isDragging: boolean` = false — Whether the area is currently in a dragging state (for dropzone)
|
|
779
791
|
- `isClickable: boolean` = false — Whether the area is clickable
|
|
780
792
|
- `disabled: boolean` = false — Whether the area is disabled
|
|
781
793
|
- `styles: { inner?: string; icon?: string; title?: string; description?: string; content?: string; actions?: string; }` — Custom styles for internal parts
|
|
782
794
|
- **Masonry** — Waterfall grid
|
|
783
|
-
- `columns: number` = 3 — Number of columns
|
|
784
|
-
|
|
795
|
+
- `columns: number` = 3 — Number of columns. Pick it from how many items there are — three columns
|
|
796
|
+
holding four cards leaves a ragged row that reads as a template, not a choice.
|
|
797
|
+
@default 3
|
|
798
|
+
- `spacing: number | string` = "2xl" — Gap between items: a spacing token name (`"md"`, `"2xl"`, …) or a raw number
|
|
799
|
+
of pixels. Prefer the token so the gap follows the theme.
|
|
800
|
+
@default "2xl"
|
|
785
801
|
- **Navbar** — Primary navigation
|
|
786
802
|
- `fixed: boolean` — Whether the navbar is fixed to the viewport
|
|
787
803
|
- `sticky: boolean` — Whether the navbar sticks to the top while scrolling
|
|
@@ -831,7 +847,9 @@ Set `responsive={false}` to keep the sidebar in flow at every width.
|
|
|
831
847
|
- `onOverlayClick: () => void` — Callback when overlay is clicked
|
|
832
848
|
- **SimpleGrid** — Responsive fixed grid
|
|
833
849
|
- `cols: T | { base?: T; sm?: T; md?: T; lg?: T; xl?: T; }` = 1 — Number of columns (or a responsive object per breakpoint)
|
|
834
|
-
- `spacing: number | string` =
|
|
850
|
+
- `spacing: number | string` = "2xl" — Spacing between cells: a spacing token name (`"md"`, `"2xl"`, …) or a raw
|
|
851
|
+
number of pixels. Prefer the token so the gap follows the theme.
|
|
852
|
+
@default "2xl"
|
|
835
853
|
- `verticalSpacing: number | string` — Vertical spacing between rows (defaults to `spacing`)
|
|
836
854
|
- `minChildWidth: number | string` — Minimum width of each child; columns wrap automatically to fit
|
|
837
855
|
- **Splitter** — Split and resize panels
|
|
@@ -2270,6 +2288,9 @@ Same derivation as `padding`. There is no `--wim-radius-xs` / `-3xl` /
|
|
|
2270
2288
|
- `interval: number` = 5000 — Auto-play interval (in milliseconds)
|
|
2271
2289
|
- `showIndicators: boolean` = true — Whether to show the indicators
|
|
2272
2290
|
- `showControls: boolean` = true — Whether to show the previous/next buttons
|
|
2291
|
+
- `controlsPlacement: "overlay" | "outside"` = "overlay" — Where the arrows and indicators sit. `overlay` (default) places them on top of the
|
|
2292
|
+
slide, which suits full-bleed images. `outside` moves the arrows beside the viewport
|
|
2293
|
+
and the indicators below it, so they never cover a slide made of text.
|
|
2273
2294
|
- `loop: boolean` = true — Whether to loop infinitely (seamless transitions)
|
|
2274
2295
|
- `slidesToShow: number | Breakpoints` = 1 — Number of slides to show at once. A number or an object per breakpoint.
|
|
2275
2296
|
- `aspectRatio: string` — Aspect ratio (e.g. '16/9', '4/3', '1/1').
|
|
@@ -2378,6 +2399,9 @@ drops secondary text below the AA contrast floor.
|
|
|
2378
2399
|
- `description: React.ReactNode` — Description text to display.
|
|
2379
2400
|
- `icon: React.ReactNode` — Icon to display.
|
|
2380
2401
|
- `extra: React.ReactNode` — Element shown as an action (e.g. a button).
|
|
2402
|
+
- `align: "start" | "center"` = "start" — Horizontal alignment. Start-aligned reads as part of the card or table it sits
|
|
2403
|
+
in; use `"center"` only when the empty state is the only thing in its region.
|
|
2404
|
+
@default "start"
|
|
2381
2405
|
- **FAQSection** — Frequently Asked Questions section
|
|
2382
2406
|
- `items: FAQItem[]` (required) — FAQ items.
|
|
2383
2407
|
- `title: React.ReactNode` — Main title of the section.
|
|
@@ -2433,7 +2457,8 @@ drops secondary text below the AA contrast floor.
|
|
|
2433
2457
|
- **Marquee** — Scrolling text animation (aka Ticker)
|
|
2434
2458
|
- `duration: number` = 20 — Animation speed (in seconds). Defaults to `20`.
|
|
2435
2459
|
- `reverse: boolean` = false — Whether to run the animation in reverse.
|
|
2436
|
-
- `pauseOnHover: boolean` = true — Whether to pause the animation on hover.
|
|
2460
|
+
- `pauseOnHover: boolean` = true — Whether to pause the animation on hover. Keyboard focus inside the marquee
|
|
2461
|
+
always pauses it, regardless of this option (WCAG 2.2.2).
|
|
2437
2462
|
- `vertical: boolean` = false — Whether to scroll vertically.
|
|
2438
2463
|
- `repeat: number` = 2 — Number of times the content is repeated. May need adjusting for a seamless loop. Defaults to `2`.
|
|
2439
2464
|
- **NodeGraph** — Visualizes complex networks and relationships between nodes.
|
|
@@ -2664,6 +2689,11 @@ Cannot be combined with `onDelete` — the delete control is a second element, a
|
|
|
2664
2689
|
- **Dropdown** — Overlay selection menu (aka Overflow Menu, Kebab Menu, Meatball Menu, Vertical Ellipsis, Horizontal Ellipsis, Three Dots Menu, More Menu, App Switcher, オーバーフローメニュー, ケバブメニュー, ミートボールメニュー)
|
|
2665
2690
|
- `children: ReactNode` (required) — Dropdown parts (Dropdown.Trigger and Dropdown.Menu).
|
|
2666
2691
|
- `asChild: boolean` = false — If true, the dropdown will be rendered as its child, merging its props onto that child.
|
|
2692
|
+
- `defaultOpen: boolean` = false — Whether the menu starts open. Use it for a screenshot, a test, or a menu that should
|
|
2693
|
+
already be showing. Ignored once `open` is provided.
|
|
2694
|
+
- `open: boolean` — Controls the open state from the outside. Pass it together with `onOpenChange`.
|
|
2695
|
+
- `onOpenChange: (open: boolean) => void` — Called with the next open state, both when the trigger is used and when the menu is
|
|
2696
|
+
dismissed by an outside click or Escape.
|
|
2667
2697
|
- **FocusTrap** — Focus management
|
|
2668
2698
|
- `children: React.ReactNode` (required) — Content to trap focus within.
|
|
2669
2699
|
- `active: boolean` = true — Whether the trap is active.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.32.0 — a React 19 component library: 225 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
|
|
|
@@ -80,7 +80,7 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
80
80
|
10. Keep one elevation stance per screen: don't mix surfaces raised by shadow with surfaces cut by borders. `Card` and `Stats` default to `elevated`, so pass `variant="outline"` when the screen is border-led. If the outer container already casts a shadow, its contents need only a border. On admin/list screens, `Table`/`DataGrid` mobile cards must stay border-only like the toolbar and pagination — row cards with `shadow-sm` while chrome is flat outline is the same mixed stance.
|
|
81
81
|
11. Never wrap a component that already draws its own frame. `<Card><Table card /></Card>` doubles the border and nests radii (12px inside 4px). `Table` takes a `card` prop and `Stats` is already a Card — place them directly.
|
|
82
82
|
12. Always pass `intent` on `Badge` / `Tag` / `Chip`. Their default is `primary` (the accent), so an ordinary value like `pending` or `member` gets painted as loudly as an exception and the colour stops carrying information. Use `intent="neutral"` for ordinary values.
|
|
83
|
-
13. Pick colour by good/bad, not by direction. `Stats.Trend`
|
|
83
|
+
13. Pick colour by good/bad, not by direction. On `Stats.Trend`, `direction` sets the arrow and `intent` sets the colour; without `intent` the colour follows the direction, so `up` is the success colour. For a metric where up is bad (failures, error rate, cost), write `direction="up" intent="danger"` — leaving it out renders the bad news as good. Don't approximate a meaning the API cannot express.
|
|
84
84
|
14. Keep the chrome quiet. Breadcrumb, page title, summary line, toolbar and filter bar frame the content; they must not compete with the protagonist. Don't promote a one-line summary to an `Alert`/`Banner`, don't wrap the filter bar in a `Card` (its border doubles up with the data region's), keep primary surfaces out of the chrome, and don't stack a KPI tile row above a table screen. Corollary of protagonist and accent limits, but it is the rule most often broken on admin/list screens — the test is whether the eye lands on the data first.
|
|
85
85
|
15. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
|
|
86
86
|
16. Check the screen at 390px and 768px before calling it done. The page itself must never scroll sideways (`document.scrollWidth > document.documentElement.clientWidth` is a bug — the usual cause is a group of controls that cannot wrap, e.g. several buttons packed into one `Toolbar.Group`; split them into separate groups). Data tables need their narrow mode turned on (`<DataGrid mobileCard>` / `<Table mobileCard>`) rather than an inner scrollbar: without it columns collapse and a short string like a `Code` lot number breaks one character per line. The default card switch is `container-down(sm)` (576px). Wide grids that still overflow at tablet should pass `mobileCard="md"` so cards continue through 768px.
|