wimui 0.31.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/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/llms-full.txt +23 -5
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +6 -6
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
|
5
|
-
import { jsx as
|
|
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
|
|
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__ */
|
|
10
|
-
className:
|
|
11
|
-
style:
|
|
12
|
-
...
|
|
13
|
-
"--wim-bento-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className: e.
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className: e.
|
|
35
|
-
children:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
s.displayName = "BentoGridItem";
|
|
44
51
|
//#endregion
|
|
45
|
-
export {
|
|
52
|
+
export { o as BentoGrid, s as BentoGridItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
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 = "
|
|
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-
|
|
7
|
-
"span-2": "_span-
|
|
8
|
-
"span-3": "_span-
|
|
9
|
-
"
|
|
10
|
-
"row-
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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 =
|
|
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:
|
|
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",
|
|
8
|
-
ref:
|
|
9
|
-
className: n("wim-interactive-area", e.root, e[c], e[l], e[u], d && e.dragging,
|
|
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-
|
|
14
|
-
"data-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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 (
|
|
24
|
+
if (m) {
|
|
24
25
|
e.preventDefault();
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
v.onClick?.(e);
|
|
28
29
|
},
|
|
29
30
|
children: /* @__PURE__ */ i("div", {
|
|
30
|
-
className: n(e.inner,
|
|
31
|
+
className: n(e.inner, _?.inner),
|
|
31
32
|
children: [
|
|
32
33
|
o && /* @__PURE__ */ r("div", {
|
|
33
|
-
className: n(e.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,
|
|
40
|
+
className: n(e.title, _?.title),
|
|
40
41
|
children: t
|
|
41
42
|
}), a && /* @__PURE__ */ r("div", {
|
|
42
|
-
className: n(e.description,
|
|
43
|
+
className: n(e.description, _?.description),
|
|
43
44
|
children: a
|
|
44
45
|
})]
|
|
45
46
|
}),
|
|
46
|
-
|
|
47
|
-
className: n(e.content,
|
|
48
|
-
children:
|
|
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,
|
|
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=`
|
|
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 = "
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 {
|
|
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
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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>>;
|
|
@@ -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),
|