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.
Files changed (54) hide show
  1. package/README.ja.md +10 -9
  2. package/README.md +9 -6
  3. package/dist/components/_internal/StatusContent.cjs +1 -1
  4. package/dist/components/_internal/StatusContent.d.ts +9 -2
  5. package/dist/components/_internal/StatusContent.js +4 -2
  6. package/dist/components/_internal/status-content.module.cjs +1 -1
  7. package/dist/components/_internal/status-content.module.js +11 -9
  8. package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
  9. package/dist/components/data-display/Carousel/Carousel.d.ts +6 -0
  10. package/dist/components/data-display/Carousel/Carousel.js +92 -92
  11. package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
  12. package/dist/components/data-display/Carousel/carousel.module.js +14 -13
  13. package/dist/components/data-display/EmptyState/EmptyState.cjs +1 -1
  14. package/dist/components/data-display/EmptyState/EmptyState.d.ts +7 -1
  15. package/dist/components/data-display/EmptyState/EmptyState.js +4 -3
  16. package/dist/components/data-display/Marquee/Marquee.cjs +1 -1
  17. package/dist/components/data-display/Marquee/Marquee.d.ts +4 -1
  18. package/dist/components/data-display/Marquee/Marquee.js +4 -2
  19. package/dist/components/data-display/Marquee/marquee.module.cjs +1 -1
  20. package/dist/components/data-display/Marquee/marquee.module.js +1 -1
  21. package/dist/components/data-display/Stats/Stats.cjs +1 -1
  22. package/dist/components/data-display/Stats/Stats.d.ts +14 -3
  23. package/dist/components/data-display/Stats/Stats.js +12 -6
  24. package/dist/components/data-display/Stats/stats.module.cjs +1 -1
  25. package/dist/components/data-display/Stats/stats.module.js +4 -4
  26. package/dist/components/form/RichTextEditor/commands.d.ts +1 -1
  27. package/dist/components/layout/BentoGrid/BentoGrid.cjs +1 -1
  28. package/dist/components/layout/BentoGrid/BentoGrid.d.ts +18 -5
  29. package/dist/components/layout/BentoGrid/BentoGrid.js +43 -36
  30. package/dist/components/layout/BentoGrid/bento-grid.module.cjs +1 -1
  31. package/dist/components/layout/BentoGrid/bento-grid.module.js +7 -6
  32. package/dist/components/layout/Group/Group.cjs +1 -1
  33. package/dist/components/layout/Group/Group.d.ts +10 -2
  34. package/dist/components/layout/Group/Group.js +1 -1
  35. package/dist/components/layout/InteractiveArea/InteractiveArea.cjs +1 -1
  36. package/dist/components/layout/InteractiveArea/InteractiveArea.d.ts +16 -0
  37. package/dist/components/layout/InteractiveArea/InteractiveArea.js +21 -20
  38. package/dist/components/layout/InteractiveArea/interactive-area.module.cjs +1 -1
  39. package/dist/components/layout/InteractiveArea/interactive-area.module.js +23 -21
  40. package/dist/components/layout/Masonry/Masonry.cjs +1 -1
  41. package/dist/components/layout/Masonry/Masonry.d.ts +20 -4
  42. package/dist/components/layout/Masonry/Masonry.js +26 -25
  43. package/dist/components/layout/SimpleGrid/SimpleGrid.cjs +1 -1
  44. package/dist/components/layout/SimpleGrid/SimpleGrid.d.ts +5 -1
  45. package/dist/components/layout/SimpleGrid/SimpleGrid.js +1 -1
  46. package/dist/components/overlay/Dropdown/Dropdown.cjs +1 -1
  47. package/dist/components/overlay/Dropdown/Dropdown.d.ts +14 -0
  48. package/dist/components/overlay/Dropdown/Dropdown.js +99 -93
  49. package/dist/llms-full.txt +37 -7
  50. package/dist/llms.txt +2 -2
  51. package/dist/styles.css +2 -2
  52. package/dist/wimui.umd.css +1 -1
  53. package/dist/wimui.umd.js +5 -5
  54. package/package.json +33 -14
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.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={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`outline`,className:t,children:n,...r})=>(0,l.jsx)(a.Card,{variant:e,className:(0,c.default)(`wim-stats`,o.default.root,t),padding:`none`,...r,children:(0,l.jsx)(`div`,{className:o.default.inner,children:n})}),f=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.label,e),...n,children:t}),p=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,e),...n,children:t}),m=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.description,e),...n,children:t}),h=({direction:e=`up`,className:t,children:n,...r})=>(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.trend,o.default[e],t),...r,children:[(0,l.jsx)(`span`,{"aria-hidden":`true`,children:(0,l.jsx)(i.Icon,{component:u[e],size:`sm`})}),(0,l.jsx)(`span`,{children:n})]});d.displayName=`Stats`,f.displayName=`Stats.Label`,p.displayName=`Stats.Value`,m.displayName=`Stats.Description`,h.displayName=`Stats.Trend`,d.Label=f,d.Value=p,d.Description=m,d.Trend=h,exports.Stats=d,exports.default=d,exports.StatsDescription=m,exports.StatsLabel=f,exports.StatsTrend=h,exports.StatsValue=p;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.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={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`outline`,className:t,children:n,...r})=>(0,l.jsx)(a.Card,{variant:e,className:(0,c.default)(`wim-stats`,o.default.root,t),padding:`none`,...r,children:(0,l.jsx)(`div`,{className:o.default.inner,children:n})}),f=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.label,e),...n,children:t}),p=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,e),...n,children:t}),m=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.description,e),...n,children:t}),h={up:`success`,down:`danger`,neutral:`neutral`},g=({direction:e=`up`,intent:t=h[e],className:n,children:r,...a})=>(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.trend,o.default[t],n),"data-direction":e,"data-intent":t,...a,children:[(0,l.jsx)(`span`,{"aria-hidden":`true`,children:(0,l.jsx)(i.Icon,{component:u[e],size:`sm`})}),(0,l.jsx)(`span`,{children:r})]});d.displayName=`Stats`,f.displayName=`Stats.Label`,p.displayName=`Stats.Value`,m.displayName=`Stats.Description`,g.displayName=`Stats.Trend`,d.Label=f,d.Value=p,d.Description=m,d.Trend=g,exports.Stats=d,exports.default=d,exports.StatsDescription=m,exports.StatsLabel=f,exports.StatsTrend=g,exports.StatsValue=p;
@@ -23,7 +23,7 @@ export declare const Stats: {
23
23
  displayName: string;
24
24
  };
25
25
  Trend: {
26
- ({ direction, className, children, ...props }: StatsTrendProps): React.JSX.Element;
26
+ ({ direction, intent, className, children, ...props }: StatsTrendProps): React.JSX.Element;
27
27
  displayName: string;
28
28
  };
29
29
  };
@@ -40,11 +40,22 @@ export declare const StatsDescription: {
40
40
  displayName: string;
41
41
  };
42
42
  export type StatsTrendProps = React.ComponentPropsWithoutRef<"div"> & {
43
- /** Trend direction, which controls the icon and color */
43
+ /**
44
+ * Trend direction, which controls the arrow icon. When `intent` is not given it
45
+ * also sets the color (`up` = success, `down` = danger, `neutral` = neutral).
46
+ * @default "up"
47
+ */
44
48
  direction?: "up" | "down" | "neutral";
49
+ /**
50
+ * Whether the change is good or bad, which controls the color independently of
51
+ * the arrow. Set it for metrics where a rise is bad news, such as costs or error
52
+ * rates: `direction="up" intent="danger"`. Defaults to the color implied by
53
+ * `direction`.
54
+ */
55
+ intent?: "success" | "danger" | "neutral";
45
56
  };
46
57
  export declare const StatsTrend: {
47
- ({ direction, className, children, ...props }: StatsTrendProps): React.JSX.Element;
58
+ ({ direction, intent, className, children, ...props }: StatsTrendProps): React.JSX.Element;
48
59
  displayName: string;
49
60
  };
50
61
  export default Stats;
@@ -34,17 +34,23 @@ var l = {
34
34
  className: o(a.description, e),
35
35
  ...n,
36
36
  children: t
37
- }), m = ({ direction: e = "up", className: t, children: n, ...i }) => /* @__PURE__ */ c("div", {
38
- className: o(a.trend, a[e], t),
39
- ...i,
37
+ }), m = {
38
+ up: "success",
39
+ down: "danger",
40
+ neutral: "neutral"
41
+ }, h = ({ direction: e = "up", intent: t = m[e], className: n, children: i, ...u }) => /* @__PURE__ */ c("div", {
42
+ className: o(a.trend, a[t], n),
43
+ "data-direction": e,
44
+ "data-intent": t,
45
+ ...u,
40
46
  children: [/* @__PURE__ */ s("span", {
41
47
  "aria-hidden": "true",
42
48
  children: /* @__PURE__ */ s(r, {
43
49
  component: l[e],
44
50
  size: "sm"
45
51
  })
46
- }), /* @__PURE__ */ s("span", { children: n })]
52
+ }), /* @__PURE__ */ s("span", { children: i })]
47
53
  });
48
- u.displayName = "Stats", d.displayName = "Stats.Label", f.displayName = "Stats.Value", p.displayName = "Stats.Description", m.displayName = "Stats.Trend", u.Label = d, u.Value = f, u.Description = p, u.Trend = m;
54
+ u.displayName = "Stats", d.displayName = "Stats.Label", f.displayName = "Stats.Value", p.displayName = "Stats.Description", h.displayName = "Stats.Trend", u.Label = d, u.Value = f, u.Description = p, u.Trend = h;
49
55
  //#endregion
50
- export { u as Stats, u as default, p as StatsDescription, d as StatsLabel, m as StatsTrend, f as StatsValue };
56
+ export { u as Stats, u as default, p as StatsDescription, d as StatsLabel, h as StatsTrend, f as StatsValue };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1ky8j_3`,t=`_inner_1ky8j_6`,n=`_label_1ky8j_12`,r=`_value_1ky8j_18`,i=`_description_1ky8j_24`,a=`_trend_1ky8j_29`,o=`_up_1ky8j_49`,s=`_down_1ky8j_53`,c=`_neutral_1ky8j_57`,l={root:e,inner:t,label:n,value:r,description:i,trend:a,up:o,down:s,neutral:c};exports.default=l,exports.description=i,exports.down=s,exports.inner=t,exports.label=n,exports.neutral=c,exports.root=e,exports.trend=a,exports.up=o,exports.value=r;
2
+ var e=`_root_l22hh_3`,t=`_inner_l22hh_6`,n=`_label_l22hh_12`,r=`_value_l22hh_18`,i=`_description_l22hh_24`,a=`_trend_l22hh_29`,o=`_success_l22hh_50`,s=`_danger_l22hh_54`,c=`_neutral_l22hh_58`,l={root:e,inner:t,label:n,value:r,description:i,trend:a,success:o,danger:s,neutral:c};exports.danger=s,exports.default=l,exports.description=i,exports.inner=t,exports.label=n,exports.neutral=c,exports.root=e,exports.success=o,exports.trend=a,exports.value=r;
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  //#region src/components/data-display/Stats/stats.module.scss
3
- var e = "_root_1ky8j_3", t = "_inner_1ky8j_6", n = "_label_1ky8j_12", r = "_value_1ky8j_18", i = "_description_1ky8j_24", a = "_trend_1ky8j_29", o = "_up_1ky8j_49", s = "_down_1ky8j_53", c = "_neutral_1ky8j_57", l = {
3
+ var e = "_root_l22hh_3", t = "_inner_l22hh_6", n = "_label_l22hh_12", r = "_value_l22hh_18", i = "_description_l22hh_24", a = "_trend_l22hh_29", o = "_success_l22hh_50", s = "_danger_l22hh_54", c = "_neutral_l22hh_58", l = {
4
4
  root: e,
5
5
  inner: t,
6
6
  label: n,
7
7
  value: r,
8
8
  description: i,
9
9
  trend: a,
10
- up: o,
11
- down: s,
10
+ success: o,
11
+ danger: s,
12
12
  neutral: c
13
13
  };
14
14
  //#endregion
15
- export { l as default, i as description, s as down, t as inner, n as label, c as neutral, e as root, a as trend, o as up, r as value };
15
+ export { s as danger, l as default, i as description, t as inner, n as label, c as neutral, e as root, o as success, a as trend, r as value };
@@ -2,7 +2,7 @@
2
2
  * RichTextEditor のコマンド層(純 DOM、React 非依存)。
3
3
  *
4
4
  * 旧実装は非推奨の document.execCommand / queryCommandState に依存していた
5
- * (IMPROVEMENTS.md T15)。ここでは Selection / Range API で同等のコマンドを
5
+ * (docs/history/improvements-ledger.md の T15)。ここでは Selection / Range API で同等のコマンドを
6
6
  * 実装する。部分選択時の書式分割は Range.extractContents() の仕様
7
7
  * (partial containment chain を複製してフラグメント側に書式ラッパーを残す)
8
8
  * を利用する。
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.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=({className:e,children:n,rowHeight:a,style:o,...s})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:a?{...o,"--wim-bento-row-height":a}:o,...s,children:n})});a.displayName=`BentoGrid`;var o=({className:e,title:n,description:a,header:o,icon:s,span:c=1,rowSpan:l=1,...u})=>(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.item,t.default[`span-${c}`],t.default[`row-${l}`],e),...u,children:[o&&(0,i.jsx)(`div`,{className:t.default.itemHeader,children:o}),(0,i.jsxs)(`div`,{className:t.default.itemContent,children:[s&&(0,i.jsx)(`div`,{className:t.default.itemIcon,children:s}),(0,i.jsxs)(`div`,{className:t.default.itemText,children:[n&&(0,i.jsx)(`div`,{className:t.default.itemTitle,children:n}),a&&(0,i.jsx)(`div`,{className:t.default.itemDescription,children:a})]})]})]});o.displayName=`BentoGridItem`,exports.BentoGrid=a,exports.BentoGridItem=o;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.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=n.default.createContext(3),o=({className:e,children:n,columns:o=3,rowHeight:s,style:c,...l})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:{...c,"--wim-bento-columns":o,...s?{"--wim-bento-row-height":s}:null},...l,children:(0,i.jsx)(a.Provider,{value:o,children:n})})});o.displayName=`BentoGrid`;var s=({className:e,title:o,description:s,header:c,icon:l,span:u=1,rowSpan:d=1,...f})=>{let p=n.default.useContext(a),m=Math.min(u,p);return(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.item,t.default[`span-${m}`],t.default[`row-${d}`],e),...f,children:[c&&(0,i.jsx)(`div`,{className:t.default.itemHeader,children:c}),(0,i.jsxs)(`div`,{className:t.default.itemContent,children:[l&&(0,i.jsx)(`div`,{className:t.default.itemIcon,children:l}),(0,i.jsxs)(`div`,{className:t.default.itemText,children:[o&&(0,i.jsx)(`div`,{className:t.default.itemTitle,children:o}),s&&(0,i.jsx)(`div`,{className:t.default.itemDescription,children:s})]})]})]})};s.displayName=`BentoGridItem`,exports.BentoGrid=o,exports.BentoGridItem=s;
@@ -1,12 +1,21 @@
1
1
  import { default as React } from 'react';
2
+ export type BentoGridColumns = 2 | 3 | 4;
2
3
  type BentoGridProps = React.ComponentPropsWithoutRef<"div"> & {
3
4
  /** Grid items (typically BentoGrid.Item elements) */
4
5
  children?: React.ReactNode;
6
+ /**
7
+ * How many columns the grid uses from container width `md` up; below that it is
8
+ * always a single column. Pick it from what the tiles hold — three columns is a
9
+ * layout decision, not a default to accept, and three equal tiles is the shape
10
+ * readers have learnt to skip.
11
+ * @default 3
12
+ */
13
+ columns?: BentoGridColumns;
5
14
  /** 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. */
6
15
  rowHeight?: string;
7
16
  };
8
17
  export declare const BentoGrid: {
9
- ({ className, children, rowHeight, style, ...props }: BentoGridProps): React.JSX.Element;
18
+ ({ className, children, columns, rowHeight, style, ...props }: BentoGridProps): React.JSX.Element;
10
19
  displayName: string;
11
20
  };
12
21
  export type BentoGridItemProps = React.ComponentPropsWithoutRef<"div"> & {
@@ -15,19 +24,23 @@ export type BentoGridItemProps = React.ComponentPropsWithoutRef<"div"> & {
15
24
  header?: React.ReactNode;
16
25
  icon?: React.ReactNode;
17
26
  /**
18
- * How many columns the tile occupies where the grid is 3 columns wide.
27
+ * How many columns the tile occupies where the grid is at its full width.
19
28
  * Below that width the grid is a single column and every tile spans it.
29
+ * A span wider than the grid's `columns` is clamped to it.
30
+ *
31
+ * Give one tile more room than the rest: tiles that all span 1 are the equal
32
+ * grid the composition rules call out, whatever their contents.
20
33
  * @default 1
21
34
  */
22
- span?: 1 | 2 | 3;
35
+ span?: 1 | 2 | 3 | 4;
23
36
  /**
24
- * How many rows the tile occupies where the grid is 3 columns wide.
37
+ * How many rows the tile occupies where the grid is at its full width.
25
38
  * @default 1
26
39
  */
27
40
  rowSpan?: 1 | 2;
28
41
  };
29
42
  export declare const BentoGridItem: {
30
- ({ className, title, description, header, icon, span, rowSpan, ...props }: BentoGridItemProps): React.JSX.Element;
43
+ ({ className, title, description, header, icon, span: spanProp, rowSpan, ...props }: BentoGridItemProps): React.JSX.Element;
31
44
  displayName: string;
32
45
  };
33
46
  export {};
@@ -1,45 +1,52 @@
1
1
  "use client";
2
2
  import e from "./bento-grid.module.js";
3
- import "react";
4
- import t from "classnames";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import t from "react";
4
+ import n from "classnames";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  //#region src/components/layout/BentoGrid/BentoGrid.tsx
7
- var i = ({ className: r, children: i, rowHeight: a, style: o, ...s }) => /* @__PURE__ */ n("div", {
7
+ var a = t.createContext(3), o = ({ className: t, children: i, columns: o = 3, rowHeight: s, style: c, ...l }) => /* @__PURE__ */ r("div", {
8
8
  className: e.container,
9
- children: /* @__PURE__ */ n("div", {
10
- className: t("wim-bento-grid", e.root, r),
11
- style: a ? {
12
- ...o,
13
- "--wim-bento-row-height": a
14
- } : o,
15
- ...s,
16
- children: i
9
+ children: /* @__PURE__ */ r("div", {
10
+ className: n("wim-bento-grid", e.root, t),
11
+ style: {
12
+ ...c,
13
+ "--wim-bento-columns": o,
14
+ ...s ? { "--wim-bento-row-height": s } : null
15
+ },
16
+ ...l,
17
+ children: /* @__PURE__ */ r(a.Provider, {
18
+ value: o,
19
+ children: i
20
+ })
17
21
  })
18
22
  });
19
- i.displayName = "BentoGrid";
20
- var a = ({ className: i, title: a, description: o, header: s, icon: c, span: l = 1, rowSpan: u = 1, ...d }) => /* @__PURE__ */ r("div", {
21
- className: t(e.item, e[`span-${l}`], e[`row-${u}`], i),
22
- ...d,
23
- children: [s && /* @__PURE__ */ n("div", {
24
- className: e.itemHeader,
25
- children: s
26
- }), /* @__PURE__ */ r("div", {
27
- className: e.itemContent,
28
- children: [c && /* @__PURE__ */ n("div", {
29
- className: e.itemIcon,
30
- children: c
31
- }), /* @__PURE__ */ r("div", {
32
- className: e.itemText,
33
- children: [a && /* @__PURE__ */ n("div", {
34
- className: e.itemTitle,
35
- children: a
36
- }), o && /* @__PURE__ */ n("div", {
37
- className: e.itemDescription,
38
- children: o
23
+ o.displayName = "BentoGrid";
24
+ var s = ({ className: o, title: s, description: c, header: l, icon: u, span: d = 1, rowSpan: f = 1, ...p }) => {
25
+ let m = t.useContext(a), h = Math.min(d, m);
26
+ return /* @__PURE__ */ i("div", {
27
+ className: n(e.item, e[`span-${h}`], e[`row-${f}`], o),
28
+ ...p,
29
+ children: [l && /* @__PURE__ */ r("div", {
30
+ className: e.itemHeader,
31
+ children: l
32
+ }), /* @__PURE__ */ i("div", {
33
+ className: e.itemContent,
34
+ children: [u && /* @__PURE__ */ r("div", {
35
+ className: e.itemIcon,
36
+ children: u
37
+ }), /* @__PURE__ */ i("div", {
38
+ className: e.itemText,
39
+ children: [s && /* @__PURE__ */ r("div", {
40
+ className: e.itemTitle,
41
+ children: s
42
+ }), c && /* @__PURE__ */ r("div", {
43
+ className: e.itemDescription,
44
+ children: c
45
+ })]
39
46
  })]
40
47
  })]
41
- })]
42
- });
43
- a.displayName = "BentoGridItem";
48
+ });
49
+ };
50
+ s.displayName = "BentoGridItem";
44
51
  //#endregion
45
- export { i as BentoGrid, a as BentoGridItem };
52
+ export { o as BentoGrid, s as BentoGridItem };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_container_1lu3a_4`,t=`_root_1lu3a_16`,n=`_item_1lu3a_52`,r=`_itemHeader_1lu3a_66`,i=`_itemContent_1lu3a_78`,a=`_itemIcon_1lu3a_83`,o=`_itemText_1lu3a_86`,s=`_itemTitle_1lu3a_90`,c=`_itemDescription_1lu3a_95`,l={container:e,root:t,"span-1":`_span-1_1lu3a_36`,"span-2":`_span-2_1lu3a_39`,"span-3":`_span-3_1lu3a_42`,"row-1":`_row-1_1lu3a_45`,"row-2":`_row-2_1lu3a_48`,item:n,itemHeader:r,itemContent:i,itemIcon:a,itemText:o,itemTitle:s,itemDescription:c};exports.container=e,exports.default=l,exports.item=n,exports.itemContent=i,exports.itemDescription=c,exports.itemHeader=r,exports.itemIcon=a,exports.itemText=o,exports.itemTitle=s,exports.root=t;
2
+ var e=`_container_1241e_4`,t=`_root_1241e_16`,n=`_item_1241e_58`,r=`_itemHeader_1241e_72`,i=`_itemContent_1241e_84`,a=`_itemIcon_1241e_89`,o=`_itemText_1241e_92`,s=`_itemTitle_1241e_96`,c=`_itemDescription_1241e_101`,l={container:e,root:t,"span-1":`_span-1_1241e_39`,"span-2":`_span-2_1241e_42`,"span-3":`_span-3_1241e_45`,"span-4":`_span-4_1241e_48`,"row-1":`_row-1_1241e_51`,"row-2":`_row-2_1241e_54`,item:n,itemHeader:r,itemContent:i,itemIcon:a,itemText:o,itemTitle:s,itemDescription:c};exports.container=e,exports.default=l,exports.item=n,exports.itemContent=i,exports.itemDescription=c,exports.itemHeader=r,exports.itemIcon=a,exports.itemText=o,exports.itemTitle=s,exports.root=t;
@@ -1,13 +1,14 @@
1
1
  "use client";
2
2
  //#region src/components/layout/BentoGrid/bento-grid.module.scss
3
- var e = "_container_1lu3a_4", t = "_root_1lu3a_16", n = "_item_1lu3a_52", r = "_itemHeader_1lu3a_66", i = "_itemContent_1lu3a_78", a = "_itemIcon_1lu3a_83", o = "_itemText_1lu3a_86", s = "_itemTitle_1lu3a_90", c = "_itemDescription_1lu3a_95", l = {
3
+ var e = "_container_1241e_4", t = "_root_1241e_16", n = "_item_1241e_58", r = "_itemHeader_1241e_72", i = "_itemContent_1241e_84", a = "_itemIcon_1241e_89", o = "_itemText_1241e_92", s = "_itemTitle_1241e_96", c = "_itemDescription_1241e_101", l = {
4
4
  container: e,
5
5
  root: t,
6
- "span-1": "_span-1_1lu3a_36",
7
- "span-2": "_span-2_1lu3a_39",
8
- "span-3": "_span-3_1lu3a_42",
9
- "row-1": "_row-1_1lu3a_45",
10
- "row-2": "_row-2_1lu3a_48",
6
+ "span-1": "_span-1_1241e_39",
7
+ "span-2": "_span-2_1241e_42",
8
+ "span-3": "_span-3_1241e_45",
9
+ "span-4": "_span-4_1241e_48",
10
+ "row-1": "_row-1_1241e_51",
11
+ "row-2": "_row-2_1241e_54",
11
12
  item: n,
12
13
  itemHeader: r,
13
14
  itemContent: i,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../Flex/Flex.cjs"),n=require("./group.module.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=r.default.forwardRef(({align:e=`center`,justify:o=`start`,gap:s=16,wrap:c=`wrap`,grow:l=!1,children:u,className:d,...f},p)=>{let m=l?r.default.Children.map(u,e=>{if(r.default.isValidElement(e)){let t={flexGrow:1,...e.props.style};return r.default.cloneElement(e,{style:t})}return e}):u;return(0,a.jsx)(t.Flex,{ref:p,align:e,justify:o,gap:s,wrap:c,className:(0,i.default)(`wim-group`,n.default.root,d),...f,children:m})});o.displayName=`Group`,exports.Group=o;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../Flex/Flex.cjs"),n=require("./group.module.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=r.default.forwardRef(({align:e=`center`,justify:o=`start`,gap:s=`2xl`,wrap:c=`wrap`,grow:l=!1,children:u,className:d,...f},p)=>{let m=l?r.default.Children.map(u,e=>{if(r.default.isValidElement(e)){let t={flexGrow:1,...e.props.style};return r.default.cloneElement(e,{style:t})}return e}):u;return(0,a.jsx)(t.Flex,{ref:p,align:e,justify:o,gap:s,wrap:c,className:(0,i.default)(`wim-group`,n.default.root,d),...f,children:m})});o.displayName=`Group`,exports.Group=o;
@@ -8,7 +8,11 @@ export type GroupProps = React.ComponentPropsWithoutRef<"div"> & {
8
8
  align?: "start" | "center" | "end" | "stretch" | "baseline";
9
9
  /** Horizontal alignment */
10
10
  justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
11
- /** Gap between elements */
11
+ /**
12
+ * Gap between elements: a spacing token name (`"md"`, `"2xl"`, …) or a raw
13
+ * number of pixels. Prefer the token so the gap follows the theme.
14
+ * @default "2xl"
15
+ */
12
16
  gap?: number | string;
13
17
  /** Whether to wrap children */
14
18
  wrap?: "nowrap" | "wrap" | "wrap-reverse";
@@ -27,7 +31,11 @@ export declare const Group: React.ForwardRefExoticComponent<Omit<React.DetailedH
27
31
  align?: "start" | "center" | "end" | "stretch" | "baseline";
28
32
  /** Horizontal alignment */
29
33
  justify?: "start" | "center" | "end" | "between" | "around" | "evenly";
30
- /** Gap between elements */
34
+ /**
35
+ * Gap between elements: a spacing token name (`"md"`, `"2xl"`, …) or a raw
36
+ * number of pixels. Prefer the token so the gap follows the theme.
37
+ * @default "2xl"
38
+ */
31
39
  gap?: number | string;
32
40
  /** Whether to wrap children */
33
41
  wrap?: "nowrap" | "wrap" | "wrap-reverse";
@@ -5,7 +5,7 @@ import n from "react";
5
5
  import r from "classnames";
6
6
  import { jsx as i } from "react/jsx-runtime";
7
7
  //#region src/components/layout/Group/Group.tsx
8
- var a = n.forwardRef(({ align: a = "center", justify: o = "start", gap: s = 16, wrap: c = "wrap", grow: l = !1, children: u, className: d, ...f }, p) => {
8
+ var a = n.forwardRef(({ align: a = "center", justify: o = "start", gap: s = "2xl", wrap: c = "wrap", grow: l = !1, children: u, className: d, ...f }, p) => {
9
9
  let m = l ? n.Children.map(u, (e) => {
10
10
  if (n.isValidElement(e)) {
11
11
  let t = {
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./interactive-area.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=n.default.forwardRef(({title:e,description:n,icon:a,actions:o,variant:s=`dashed`,bgVariant:c=`default`,size:l=`md`,isDragging:u=!1,isClickable:d=!1,disabled:f=!1,className:p,children:m,styles:h,...g},_)=>(0,i.jsx)(`div`,{ref:_,className:(0,r.default)(`wim-interactive-area`,t.default.root,t.default[s],t.default[c],t.default[l],u&&t.default.dragging,d&&!f&&t.default.clickable,f&&t.default.disabled,p),"data-variant":s,"data-bg-variant":c,"data-size":l,"data-disabled":f,"data-dragging":u,role:d&&!f?`button`:g[`aria-label`]||g[`aria-labelledby`]?`group`:void 0,tabIndex:d&&!f?0:void 0,"aria-disabled":f||void 0,onKeyDown:e=>{d&&!f&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click()),g.onKeyDown?.(e)},...g,onClick:e=>{if(f){e.preventDefault();return}g.onClick?.(e)},children:(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.inner,h?.inner),children:[a&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.icon,h?.icon),children:a}),(e||n)&&(0,i.jsxs)(`div`,{className:t.default.text,children:[e&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.title,h?.title),children:e}),n&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.description,h?.description),children:n})]}),m&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.content,h?.content),children:m}),o&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.actions,h?.actions),children:o})]})}));a.displayName=`InteractiveArea`,exports.InteractiveArea=a;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./interactive-area.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=n.default.forwardRef(({title:e,description:n,icon:a,actions:o,variant:s=`dashed`,bgVariant:c=`default`,size:l=`md`,align:u=`center`,isDragging:d=!1,isClickable:f=!1,disabled:p=!1,className:m,children:h,styles:g,..._},v)=>(0,i.jsx)(`div`,{ref:v,className:(0,r.default)(`wim-interactive-area`,t.default.root,t.default[s],t.default[c],t.default[l],u===`center`?t.default.alignCenter:t.default.alignStart,d&&t.default.dragging,f&&!p&&t.default.clickable,p&&t.default.disabled,m),"data-variant":s,"data-bg-variant":c,"data-size":l,"data-align":u,"data-disabled":p,"data-dragging":d,role:f&&!p?`button`:_[`aria-label`]||_[`aria-labelledby`]?`group`:void 0,tabIndex:f&&!p?0:void 0,"aria-disabled":p||void 0,onKeyDown:e=>{f&&!p&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.currentTarget.click()),_.onKeyDown?.(e)},..._,onClick:e=>{if(p){e.preventDefault();return}_.onClick?.(e)},children:(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.inner,g?.inner),children:[a&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.icon,g?.icon),children:a}),(e||n)&&(0,i.jsxs)(`div`,{className:t.default.text,children:[e&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.title,g?.title),children:e}),n&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.description,g?.description),children:n})]}),h&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.content,g?.content),children:h}),o&&(0,i.jsx)(`div`,{className:(0,r.default)(t.default.actions,g?.actions),children:o})]})}));a.displayName=`InteractiveArea`,exports.InteractiveArea=a;
@@ -29,6 +29,14 @@ export type InteractiveAreaProps = Omit<React.ComponentPropsWithoutRef<"div">, "
29
29
  * Size variation
30
30
  */
31
31
  size?: ComponentSizeBasic;
32
+ /**
33
+ * Horizontal alignment of the icon, text and actions. Centred content only reads
34
+ * as deliberate when the area is the one thing in its region — a drop target or a
35
+ * whole result page. Inside a card, a table or a column of prose, use `"start"`
36
+ * so the block lines up with the text around it.
37
+ * @default "center"
38
+ */
39
+ align?: "start" | "center";
32
40
  /**
33
41
  * Whether the area is currently in a dragging state (for dropzone)
34
42
  */
@@ -85,6 +93,14 @@ export declare const InteractiveArea: React.ForwardRefExoticComponent<Omit<Omit<
85
93
  * Size variation
86
94
  */
87
95
  size?: ComponentSizeBasic;
96
+ /**
97
+ * Horizontal alignment of the icon, text and actions. Centred content only reads
98
+ * as deliberate when the area is the one thing in its region — a drop target or a
99
+ * whole result page. Inside a card, a table or a column of prose, use `"start"`
100
+ * so the block lines up with the text around it.
101
+ * @default "center"
102
+ */
103
+ align?: "start" | "center";
88
104
  /**
89
105
  * Whether the area is currently in a dragging state (for dropzone)
90
106
  */
@@ -4,51 +4,52 @@ import t from "react";
4
4
  import n from "classnames";
5
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  //#region src/components/layout/InteractiveArea/InteractiveArea.tsx
7
- var a = t.forwardRef(({ title: t, description: a, icon: o, actions: s, variant: c = "dashed", bgVariant: l = "default", size: u = "md", isDragging: d = !1, isClickable: f = !1, disabled: p = !1, className: m, children: h, styles: g, ..._ }, v) => /* @__PURE__ */ r("div", {
8
- ref: v,
9
- className: n("wim-interactive-area", e.root, e[c], e[l], e[u], d && e.dragging, f && !p && e.clickable, p && e.disabled, m),
7
+ var a = t.forwardRef(({ title: t, description: a, icon: o, actions: s, variant: c = "dashed", bgVariant: l = "default", size: u = "md", align: d = "center", isDragging: f = !1, isClickable: p = !1, disabled: m = !1, className: h, children: g, styles: _, ...v }, y) => /* @__PURE__ */ r("div", {
8
+ ref: y,
9
+ className: n("wim-interactive-area", e.root, e[c], e[l], e[u], d === "center" ? e.alignCenter : e.alignStart, f && e.dragging, p && !m && e.clickable, m && e.disabled, h),
10
10
  "data-variant": c,
11
11
  "data-bg-variant": l,
12
12
  "data-size": u,
13
- "data-disabled": p,
14
- "data-dragging": d,
15
- role: f && !p ? "button" : _["aria-label"] || _["aria-labelledby"] ? "group" : void 0,
16
- tabIndex: f && !p ? 0 : void 0,
17
- "aria-disabled": p || void 0,
13
+ "data-align": d,
14
+ "data-disabled": m,
15
+ "data-dragging": f,
16
+ role: p && !m ? "button" : v["aria-label"] || v["aria-labelledby"] ? "group" : void 0,
17
+ tabIndex: p && !m ? 0 : void 0,
18
+ "aria-disabled": m || void 0,
18
19
  onKeyDown: (e) => {
19
- f && !p && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click()), _.onKeyDown?.(e);
20
+ p && !m && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click()), v.onKeyDown?.(e);
20
21
  },
21
- ..._,
22
+ ...v,
22
23
  onClick: (e) => {
23
- if (p) {
24
+ if (m) {
24
25
  e.preventDefault();
25
26
  return;
26
27
  }
27
- _.onClick?.(e);
28
+ v.onClick?.(e);
28
29
  },
29
30
  children: /* @__PURE__ */ i("div", {
30
- className: n(e.inner, g?.inner),
31
+ className: n(e.inner, _?.inner),
31
32
  children: [
32
33
  o && /* @__PURE__ */ r("div", {
33
- className: n(e.icon, g?.icon),
34
+ className: n(e.icon, _?.icon),
34
35
  children: o
35
36
  }),
36
37
  (t || a) && /* @__PURE__ */ i("div", {
37
38
  className: e.text,
38
39
  children: [t && /* @__PURE__ */ r("div", {
39
- className: n(e.title, g?.title),
40
+ className: n(e.title, _?.title),
40
41
  children: t
41
42
  }), a && /* @__PURE__ */ r("div", {
42
- className: n(e.description, g?.description),
43
+ className: n(e.description, _?.description),
43
44
  children: a
44
45
  })]
45
46
  }),
46
- h && /* @__PURE__ */ r("div", {
47
- className: n(e.content, g?.content),
48
- children: h
47
+ g && /* @__PURE__ */ r("div", {
48
+ className: n(e.content, _?.content),
49
+ children: g
49
50
  }),
50
51
  s && /* @__PURE__ */ r("div", {
51
- className: n(e.actions, g?.actions),
52
+ className: n(e.actions, _?.actions),
52
53
  children: s
53
54
  })
54
55
  ]
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1ljn8_2`,t=`_dashed_1ljn8_19`,n=`_solid_1ljn8_22`,r=`_none_1ljn8_25`,i=`_transparent_1ljn8_31`,a=`_muted_1ljn8_34`,o=`_sm_1ljn8_37`,s=`_md_1ljn8_43`,c=`_lg_1ljn8_49`,l=`_dragging_1ljn8_55`,u=`_clickable_1ljn8_59`,d=`_disabled_1ljn8_70`,f=`_inner_1ljn8_74`,p=`_text_1ljn8_83`,m=`_icon_1ljn8_89`,h=`_title_1ljn8_100`,g=`_description_1ljn8_105`,_=`_content_1ljn8_109`,v=`_actions_1ljn8_112`,y={root:e,dashed:t,solid:n,none:r,default:`_default_1ljn8_28`,transparent:i,muted:a,sm:o,md:s,lg:c,dragging:l,clickable:u,disabled:d,inner:f,text:p,icon:m,title:h,description:g,content:_,actions:v};exports.actions=v,exports.clickable=u,exports.content=_,exports.dashed=t,exports.default=y,exports.description=g,exports.disabled=d,exports.dragging=l,exports.icon=m,exports.inner=f,exports.lg=c,exports.md=s,exports.muted=a,exports.none=r,exports.root=e,exports.sm=o,exports.solid=n,exports.text=p,exports.title=h,exports.transparent=i;
2
+ var e=`_root_f4rek_3`,t=`_alignCenter_f4rek_23`,n=`_inner_f4rek_26`,r=`_text_f4rek_30`,i=`_actions_f4rek_33`,a=`_alignStart_f4rek_36`,o=`_dashed_f4rek_49`,s=`_solid_f4rek_52`,c=`_none_f4rek_55`,l=`_transparent_f4rek_61`,u=`_muted_f4rek_64`,d=`_sm_f4rek_67`,f=`_md_f4rek_73`,p=`_lg_f4rek_79`,m=`_dragging_f4rek_85`,h=`_clickable_f4rek_89`,g=`_disabled_f4rek_100`,_=`_icon_f4rek_118`,v=`_title_f4rek_129`,y=`_description_f4rek_134`,b=`_content_f4rek_138`,x={root:e,alignCenter:t,inner:n,text:r,actions:i,alignStart:a,dashed:o,solid:s,none:c,default:`_default_f4rek_58`,transparent:l,muted:u,sm:d,md:f,lg:p,dragging:m,clickable:h,disabled:g,icon:_,title:v,description:y,content:b};exports.actions=i,exports.alignCenter=t,exports.alignStart=a,exports.clickable=h,exports.content=b,exports.dashed=o,exports.default=x,exports.description=y,exports.disabled=g,exports.dragging=m,exports.icon=_,exports.inner=n,exports.lg=p,exports.md=f,exports.muted=u,exports.none=c,exports.root=e,exports.sm=d,exports.solid=s,exports.text=r,exports.title=v,exports.transparent=l;
@@ -1,26 +1,28 @@
1
1
  "use client";
2
2
  //#region src/components/layout/InteractiveArea/interactive-area.module.scss
3
- var e = "_root_1ljn8_2", t = "_dashed_1ljn8_19", n = "_solid_1ljn8_22", r = "_none_1ljn8_25", i = "_transparent_1ljn8_31", a = "_muted_1ljn8_34", o = "_sm_1ljn8_37", s = "_md_1ljn8_43", c = "_lg_1ljn8_49", l = "_dragging_1ljn8_55", u = "_clickable_1ljn8_59", d = "_disabled_1ljn8_70", f = "_inner_1ljn8_74", p = "_text_1ljn8_83", m = "_icon_1ljn8_89", h = "_title_1ljn8_100", g = "_description_1ljn8_105", _ = "_content_1ljn8_109", v = "_actions_1ljn8_112", y = {
3
+ var e = "_root_f4rek_3", t = "_alignCenter_f4rek_23", n = "_inner_f4rek_26", r = "_text_f4rek_30", i = "_actions_f4rek_33", a = "_alignStart_f4rek_36", o = "_dashed_f4rek_49", s = "_solid_f4rek_52", c = "_none_f4rek_55", l = "_transparent_f4rek_61", u = "_muted_f4rek_64", d = "_sm_f4rek_67", f = "_md_f4rek_73", p = "_lg_f4rek_79", m = "_dragging_f4rek_85", h = "_clickable_f4rek_89", g = "_disabled_f4rek_100", _ = "_icon_f4rek_118", v = "_title_f4rek_129", y = "_description_f4rek_134", b = "_content_f4rek_138", x = {
4
4
  root: e,
5
- dashed: t,
6
- solid: n,
7
- none: r,
8
- default: "_default_1ljn8_28",
9
- transparent: i,
10
- muted: a,
11
- sm: o,
12
- md: s,
13
- lg: c,
14
- dragging: l,
15
- clickable: u,
16
- disabled: d,
17
- inner: f,
18
- text: p,
19
- icon: m,
20
- title: h,
21
- description: g,
22
- content: _,
23
- actions: v
5
+ alignCenter: t,
6
+ inner: n,
7
+ text: r,
8
+ actions: i,
9
+ alignStart: a,
10
+ dashed: o,
11
+ solid: s,
12
+ none: c,
13
+ default: "_default_f4rek_58",
14
+ transparent: l,
15
+ muted: u,
16
+ sm: d,
17
+ md: f,
18
+ lg: p,
19
+ dragging: m,
20
+ clickable: h,
21
+ disabled: g,
22
+ icon: _,
23
+ title: v,
24
+ description: y,
25
+ content: b
24
26
  };
25
27
  //#endregion
26
- export { v as actions, u as clickable, _ as content, t as dashed, y as default, g as description, d as disabled, l as dragging, m as icon, f as inner, c as lg, s as md, a as muted, r as none, e as root, o as sm, n as solid, p as text, h as title, i as transparent };
28
+ export { i as actions, t as alignCenter, a as alignStart, h as clickable, b as content, o as dashed, x as default, y as description, g as disabled, m as dragging, _ as icon, n as inner, p as lg, f as md, u as muted, c as none, e as root, d as sm, s as solid, r as text, v as title, l as transparent };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./masonry.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=n.default.forwardRef(({columns:e=3,spacing:a=16,className:o,style:s,children:c,...l},u)=>{let d={columnCount:e,columnGap:typeof a==`number`?`${a}px`:a,...s},f={breakInside:`avoid`,marginBottom:typeof a==`number`?`${a}px`:a};return(0,i.jsx)(`div`,{ref:u,className:(0,r.default)(`wim-masonry`,t.default.root,o),style:d,...l,children:n.default.Children.map(c,e=>{if(n.default.isValidElement(e)){let i=e.props,a=i.style||{};return n.default.cloneElement(e,{style:{...f,...a},className:(0,r.default)(t.default.item,i.className),"data-testid":`masonry-item`})}return e})})});a.displayName=`Masonry`,exports.Masonry=a;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("./masonry.module.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=r.default.forwardRef(({columns:e=3,spacing:o=`2xl`,className:s,style:c,children:l,...u},d)=>{let f={columnCount:e,columnGap:t.getSpacingValue(o),...c},p={breakInside:`avoid`,marginBottom:t.getSpacingValue(o)};return(0,a.jsx)(`div`,{ref:d,className:(0,i.default)(`wim-masonry`,n.default.root,s),style:f,...u,children:r.default.Children.map(l,e=>{if(r.default.isValidElement(e)){let t=e.props,a=t.style||{};return r.default.cloneElement(e,{style:{...p,...a},className:(0,i.default)(n.default.item,t.className),"data-testid":`masonry-item`})}return e})})});o.displayName=`Masonry`,exports.Masonry=o;
@@ -1,8 +1,16 @@
1
1
  import { default as React } from 'react';
2
2
  export type MasonryProps = React.ComponentPropsWithoutRef<"div"> & {
3
- /** Number of columns */
3
+ /**
4
+ * Number of columns. Pick it from how many items there are — three columns
5
+ * holding four cards leaves a ragged row that reads as a template, not a choice.
6
+ * @default 3
7
+ */
4
8
  columns?: number;
5
- /** Spacing between items */
9
+ /**
10
+ * Gap between items: a spacing token name (`"md"`, `"2xl"`, …) or a raw number
11
+ * of pixels. Prefer the token so the gap follows the theme.
12
+ * @default "2xl"
13
+ */
6
14
  spacing?: number | string;
7
15
  };
8
16
  /**
@@ -10,8 +18,16 @@ export type MasonryProps = React.ComponentPropsWithoutRef<"div"> & {
10
18
  * It arranges items in columns, filling in gaps to minimize empty space.
11
19
  */
12
20
  export declare const Masonry: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
- /** Number of columns */
21
+ /**
22
+ * Number of columns. Pick it from how many items there are — three columns
23
+ * holding four cards leaves a ragged row that reads as a template, not a choice.
24
+ * @default 3
25
+ */
14
26
  columns?: number;
15
- /** Spacing between items */
27
+ /**
28
+ * Gap between items: a spacing token name (`"md"`, `"2xl"`, …) or a raw number
29
+ * of pixels. Prefer the token so the gap follows the theme.
30
+ * @default "2xl"
31
+ */
16
32
  spacing?: number | string;
17
33
  } & React.RefAttributes<HTMLDivElement>>;