@particle-academy/react-fancy 5.13.1 → 5.15.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/chunk-3F66SAE7.js +40 -0
- package/dist/chunk-3F66SAE7.js.map +1 -0
- package/dist/chunk-5LHG7HEY.cjs +42 -0
- package/dist/chunk-5LHG7HEY.cjs.map +1 -0
- package/dist/chunk-AY3JABE3.cjs +32 -0
- package/dist/chunk-AY3JABE3.cjs.map +1 -0
- package/dist/chunk-DBJWHDWP.js +31 -0
- package/dist/chunk-DBJWHDWP.js.map +1 -0
- package/dist/chunk-MKFWFZVX.js +30 -0
- package/dist/chunk-MKFWFZVX.js.map +1 -0
- package/dist/chunk-PG3ILQIW.js +30 -0
- package/dist/chunk-PG3ILQIW.js.map +1 -0
- package/dist/chunk-SYXLPCQP.cjs +33 -0
- package/dist/chunk-SYXLPCQP.cjs.map +1 -0
- package/dist/chunk-VQ4M25U3.cjs +32 -0
- package/dist/chunk-VQ4M25U3.cjs.map +1 -0
- package/dist/container.cjs +13 -0
- package/dist/container.cjs.map +1 -0
- package/dist/container.d.cts +21 -0
- package/dist/container.d.ts +21 -0
- package/dist/container.js +4 -0
- package/dist/container.js.map +1 -0
- package/dist/editor.cjs +1 -1
- package/dist/editor.js +1 -1
- package/dist/grid.cjs +13 -0
- package/dist/grid.cjs.map +1 -0
- package/dist/grid.d.cts +30 -0
- package/dist/grid.d.ts +30 -0
- package/dist/grid.js +4 -0
- package/dist/grid.js.map +1 -0
- package/dist/index.cjs +118 -98
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +24 -20
- package/dist/inputs.cjs +25 -25
- package/dist/inputs.js +5 -5
- package/dist/section.cjs +13 -0
- package/dist/section.cjs.map +1 -0
- package/dist/section.d.cts +23 -0
- package/dist/section.d.ts +23 -0
- package/dist/section.js +4 -0
- package/dist/section.js.map +1 -0
- package/dist/stat-list.cjs +13 -0
- package/dist/stat-list.cjs.map +1 -0
- package/dist/stat-list.d.cts +43 -0
- package/dist/stat-list.d.ts +43 -0
- package/dist/stat-list.js +4 -0
- package/dist/stat-list.js.map +1 -0
- package/package.json +52 -12
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from './chunk-DSUHZO6T.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var StatList = forwardRef(
|
|
6
|
+
({ items, align = "right", className, ...props }, ref) => {
|
|
7
|
+
if (items.length === 0) return null;
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
...props,
|
|
13
|
+
"data-react-fancy-stat-list": "",
|
|
14
|
+
"data-align": align,
|
|
15
|
+
className: cn(
|
|
16
|
+
"flex flex-col gap-0.5 font-mono text-[11.5px] text-zinc-500 dark:text-zinc-400",
|
|
17
|
+
align === "right" ? "items-end text-right" : "items-start text-left",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
"data-stat": item.key ?? (typeof item.label === "string" ? item.label : void 0),
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx("b", { className: "font-medium text-zinc-900 dark:text-zinc-100", children: item.value }),
|
|
26
|
+
" ",
|
|
27
|
+
item.label
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
item.key ?? (typeof item.label === "string" ? item.label : i)
|
|
31
|
+
))
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
StatList.displayName = "StatList";
|
|
37
|
+
|
|
38
|
+
export { StatList };
|
|
39
|
+
//# sourceMappingURL=chunk-3F66SAE7.js.map
|
|
40
|
+
//# sourceMappingURL=chunk-3F66SAE7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/StatList/StatList.tsx"],"names":[],"mappings":";;;;AAoBO,IAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,EAAE,KAAA,EAAO,KAAA,GAAQ,SAAS,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AACxD,IAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAE/B,IAAA,uBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,4BAAA,EAA2B,EAAA;AAAA,QAC3B,YAAA,EAAY,KAAA;AAAA,QACZ,SAAA,EAAW,EAAA;AAAA,UACT,gFAAA;AAAA,UACA,KAAA,KAAU,UAAU,sBAAA,GAAyB,uBAAA;AAAA,UAC7C;AAAA,SACF;AAAA,QAEC,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,EAAM,CAAA,qBAChB,IAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YAEC,WAAA,EAAW,KAAK,GAAA,KAAQ,OAAO,KAAK,KAAA,KAAU,QAAA,GAAW,KAAK,KAAA,GAAQ,MAAA,CAAA;AAAA,YAEtE,QAAA,EAAA;AAAA,8BAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,8CAAA,EAAgD,QAAA,EAAA,IAAA,CAAK,KAAA,EAAM,CAAA;AAAA,cAAK,GAAA;AAAA,cAC5E,IAAA,CAAK;AAAA;AAAA,WAAA;AAAA,UAJD,KAAK,GAAA,KAAQ,OAAO,KAAK,KAAA,KAAU,QAAA,GAAW,KAAK,KAAA,GAAQ,CAAA;AAAA,SAMnE;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"chunk-3F66SAE7.js","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { StatListProps } from \"./StatList.types\";\n\n/**\n * The mono figure stack — `70 packages / 261 components / MIT licensed`.\n *\n * The Inspiration index and `/packages` each hand-rolled this from tokens, which\n * is the gallery working as intended: it stress-tests the kit, and what it\n * hand-rolls is the gap list. The list only pays off when the gap comes back\n * here, otherwise every surface keeps a copy and they drift apart.\n *\n * Takes `items` as DATA rather than children. What those surfaces repeat is a\n * shape, not a layout, so there is nothing to assemble at the call site — and a\n * data prop is what an agent can emit, which children are not.\n *\n * The value is a `<b>` rather than a colour, because in most of these stacks the\n * figure is the only part that is not muted, and expressing that structurally\n * keeps it meaningful when a design replaces the styling wholesale.\n */\nexport const StatList = forwardRef<HTMLDivElement, StatListProps>(\n ({ items, align = \"right\", className, ...props }, ref) => {\n if (items.length === 0) return null;\n\n return (\n <div\n ref={ref}\n {...props}\n data-react-fancy-stat-list=\"\"\n data-align={align}\n className={cn(\n \"flex flex-col gap-0.5 font-mono text-[11.5px] text-zinc-500 dark:text-zinc-400\",\n align === \"right\" ? \"items-end text-right\" : \"items-start text-left\",\n className,\n )}\n >\n {items.map((item, i) => (\n <span\n key={item.key ?? (typeof item.label === \"string\" ? item.label : i)}\n data-stat={item.key ?? (typeof item.label === \"string\" ? item.label : undefined)}\n >\n <b className=\"font-medium text-zinc-900 dark:text-zinc-100\">{item.value}</b>{\" \"}\n {item.label}\n </span>\n ))}\n </div>\n );\n },\n);\n\nStatList.displayName = \"StatList\";\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3Z6ALUWP_cjs = require('./chunk-3Z6ALUWP.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var StatList = react.forwardRef(
|
|
8
|
+
({ items, align = "right", className, ...props }, ref) => {
|
|
9
|
+
if (items.length === 0) return null;
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
...props,
|
|
15
|
+
"data-react-fancy-stat-list": "",
|
|
16
|
+
"data-align": align,
|
|
17
|
+
className: chunk3Z6ALUWP_cjs.cn(
|
|
18
|
+
"flex flex-col gap-0.5 font-mono text-[11.5px] text-zinc-500 dark:text-zinc-400",
|
|
19
|
+
align === "right" ? "items-end text-right" : "items-start text-left",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
"data-stat": item.key ?? (typeof item.label === "string" ? item.label : void 0),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { className: "font-medium text-zinc-900 dark:text-zinc-100", children: item.value }),
|
|
28
|
+
" ",
|
|
29
|
+
item.label
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
item.key ?? (typeof item.label === "string" ? item.label : i)
|
|
33
|
+
))
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
StatList.displayName = "StatList";
|
|
39
|
+
|
|
40
|
+
exports.StatList = StatList;
|
|
41
|
+
//# sourceMappingURL=chunk-5LHG7HEY.cjs.map
|
|
42
|
+
//# sourceMappingURL=chunk-5LHG7HEY.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/StatList/StatList.tsx"],"names":["forwardRef","jsx","cn","jsxs"],"mappings":";;;;;;AAoBO,IAAM,QAAA,GAAWA,gBAAA;AAAA,EACtB,CAAC,EAAE,KAAA,EAAO,KAAA,GAAQ,SAAS,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AACxD,IAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAE/B,IAAA,uBACEC,cAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,4BAAA,EAA2B,EAAA;AAAA,QAC3B,YAAA,EAAY,KAAA;AAAA,QACZ,SAAA,EAAWC,oBAAA;AAAA,UACT,gFAAA;AAAA,UACA,KAAA,KAAU,UAAU,sBAAA,GAAyB,uBAAA;AAAA,UAC7C;AAAA,SACF;AAAA,QAEC,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,EAAM,CAAA,qBAChBC,eAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YAEC,WAAA,EAAW,KAAK,GAAA,KAAQ,OAAO,KAAK,KAAA,KAAU,QAAA,GAAW,KAAK,KAAA,GAAQ,MAAA,CAAA;AAAA,YAEtE,QAAA,EAAA;AAAA,8BAAAF,cAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,8CAAA,EAAgD,QAAA,EAAA,IAAA,CAAK,KAAA,EAAM,CAAA;AAAA,cAAK,GAAA;AAAA,cAC5E,IAAA,CAAK;AAAA;AAAA,WAAA;AAAA,UAJD,KAAK,GAAA,KAAQ,OAAO,KAAK,KAAA,KAAU,QAAA,GAAW,KAAK,KAAA,GAAQ,CAAA;AAAA,SAMnE;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"chunk-5LHG7HEY.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { StatListProps } from \"./StatList.types\";\n\n/**\n * The mono figure stack — `70 packages / 261 components / MIT licensed`.\n *\n * The Inspiration index and `/packages` each hand-rolled this from tokens, which\n * is the gallery working as intended: it stress-tests the kit, and what it\n * hand-rolls is the gap list. The list only pays off when the gap comes back\n * here, otherwise every surface keeps a copy and they drift apart.\n *\n * Takes `items` as DATA rather than children. What those surfaces repeat is a\n * shape, not a layout, so there is nothing to assemble at the call site — and a\n * data prop is what an agent can emit, which children are not.\n *\n * The value is a `<b>` rather than a colour, because in most of these stacks the\n * figure is the only part that is not muted, and expressing that structurally\n * keeps it meaningful when a design replaces the styling wholesale.\n */\nexport const StatList = forwardRef<HTMLDivElement, StatListProps>(\n ({ items, align = \"right\", className, ...props }, ref) => {\n if (items.length === 0) return null;\n\n return (\n <div\n ref={ref}\n {...props}\n data-react-fancy-stat-list=\"\"\n data-align={align}\n className={cn(\n \"flex flex-col gap-0.5 font-mono text-[11.5px] text-zinc-500 dark:text-zinc-400\",\n align === \"right\" ? \"items-end text-right\" : \"items-start text-left\",\n className,\n )}\n >\n {items.map((item, i) => (\n <span\n key={item.key ?? (typeof item.label === \"string\" ? item.label : i)}\n data-stat={item.key ?? (typeof item.label === \"string\" ? item.label : undefined)}\n >\n <b className=\"font-medium text-zinc-900 dark:text-zinc-100\">{item.value}</b>{\" \"}\n {item.label}\n </span>\n ))}\n </div>\n );\n },\n);\n\nStatList.displayName = \"StatList\";\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3Z6ALUWP_cjs = require('./chunk-3Z6ALUWP.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var GAP = { sm: "gap-3", md: "gap-6", lg: "gap-10" };
|
|
8
|
+
var Grid = react.forwardRef(
|
|
9
|
+
({ children, cols = 3, gap = "md", responsive = true, className, style, ...props }, ref) => {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
...props,
|
|
15
|
+
"data-react-fancy-grid": "",
|
|
16
|
+
"data-responsive": responsive ? "true" : "false",
|
|
17
|
+
className: chunk3Z6ALUWP_cjs.cn("grid", GAP[gap], className),
|
|
18
|
+
style: {
|
|
19
|
+
...style,
|
|
20
|
+
["--fancy-grid-cols"]: String(cols),
|
|
21
|
+
gridTemplateColumns: responsive ? "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" : `repeat(${cols}, minmax(0, 1fr))`
|
|
22
|
+
},
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
Grid.displayName = "Grid";
|
|
29
|
+
|
|
30
|
+
exports.Grid = Grid;
|
|
31
|
+
//# sourceMappingURL=chunk-AY3JABE3.cjs.map
|
|
32
|
+
//# sourceMappingURL=chunk-AY3JABE3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Grid/Grid.tsx"],"names":["forwardRef","jsx","cn"],"mappings":";;;;;;AAIA,IAAM,MAAM,EAAE,EAAA,EAAI,SAAS,EAAA,EAAI,OAAA,EAAS,IAAI,QAAA,EAAS;AAW9C,IAAM,IAAA,GAAOA,gBAAA;AAAA,EAClB,CAAC,EAAE,QAAA,EAAU,IAAA,GAAO,GAAG,GAAA,GAAM,IAAA,EAAM,UAAA,GAAa,IAAA,EAAM,SAAA,EAAW,KAAA,EAAO,GAAG,KAAA,IAAS,GAAA,KAAQ;AAC1F,IAAA,uBACEC,cAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,uBAAA,EAAsB,EAAA;AAAA,QACtB,iBAAA,EAAiB,aAAa,MAAA,GAAS,OAAA;AAAA,QACvC,WAAWC,oBAAA,CAAG,MAAA,EAAQ,GAAA,CAAI,GAAG,GAAG,SAAS,CAAA;AAAA,QACzC,KAAA,EAAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,CAAC,mBAA6B,GAAG,MAAA,CAAO,IAAI,CAAA;AAAA,UAC5C,mBAAA,EAAqB,UAAA,GACjB,iDAAA,GACA,CAAA,OAAA,EAAU,IAAI,CAAA,iBAAA;AAAA,SACpB;AAAA,QAEC;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA","file":"chunk-AY3JABE3.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { GridProps } from \"./Grid.types\";\n\nconst GAP = { sm: \"gap-3\", md: \"gap-6\", lg: \"gap-10\" } as const;\n\n/**\n * The modular grid.\n *\n * Column count goes through a custom property rather than a `grid-cols-N` class\n * because N is a prop: Tailwind cannot generate a class it never sees in source,\n * and every hand-rolled copy in the gallery worked around that differently. The\n * property also gives a design a single place to override the breakpoint\n * behaviour in CSS without fighting a utility.\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n ({ children, cols = 3, gap = \"md\", responsive = true, className, style, ...props }, ref) => {\n return (\n <div\n ref={ref}\n {...props}\n data-react-fancy-grid=\"\"\n data-responsive={responsive ? \"true\" : \"false\"}\n className={cn(\"grid\", GAP[gap], className)}\n style={{\n ...style,\n [\"--fancy-grid-cols\" as string]: String(cols),\n gridTemplateColumns: responsive\n ? \"repeat(auto-fit, minmax(min(100%, 16rem), 1fr))\"\n : `repeat(${cols}, minmax(0, 1fr))`,\n }}\n >\n {children}\n </div>\n );\n },\n);\n\nGrid.displayName = \"Grid\";\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cn } from './chunk-DSUHZO6T.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var SIZES = {
|
|
6
|
+
sm: "max-w-3xl",
|
|
7
|
+
md: "max-w-5xl",
|
|
8
|
+
lg: "max-w-7xl",
|
|
9
|
+
full: "max-w-none"
|
|
10
|
+
};
|
|
11
|
+
var Container = forwardRef(
|
|
12
|
+
({ children, size = "md", as: Tag = "div", className, ...props }, ref) => {
|
|
13
|
+
const Component = Tag;
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Component,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
...props,
|
|
19
|
+
"data-react-fancy-container": "",
|
|
20
|
+
"data-size": size,
|
|
21
|
+
className: cn("mx-auto w-full px-4 sm:px-6", SIZES[size], className),
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
Container.displayName = "Container";
|
|
28
|
+
|
|
29
|
+
export { Container };
|
|
30
|
+
//# sourceMappingURL=chunk-DBJWHDWP.js.map
|
|
31
|
+
//# sourceMappingURL=chunk-DBJWHDWP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Container/Container.tsx"],"names":[],"mappings":";;;;AAKA,IAAM,KAAA,GAAQ;AAAA,EACZ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,IAAA,EAAM;AACR,CAAA;AASO,IAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,EAAE,QAAA,EAAU,IAAA,GAAO,IAAA,EAAM,EAAA,EAAI,GAAA,GAAM,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAIxE,IAAA,MAAM,SAAA,GAAY,GAAA;AAElB,IAAA,uBACE,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,4BAAA,EAA2B,EAAA;AAAA,QAC3B,WAAA,EAAW,IAAA;AAAA,QACX,WAAW,EAAA,CAAG,6BAAA,EAA+B,KAAA,CAAM,IAAI,GAAG,SAAS,CAAA;AAAA,QAElE;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA","file":"chunk-DBJWHDWP.js","sourcesContent":["import { forwardRef } from \"react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ContainerProps } from \"./Container.types\";\n\nconst SIZES = {\n sm: \"max-w-3xl\",\n md: \"max-w-5xl\",\n lg: \"max-w-7xl\",\n full: \"max-w-none\",\n} as const;\n\n/**\n * The page's horizontal measure — centred, capped, with gutters.\n *\n * Every Swiss-family gallery style hand-rolled this. What they repeated was not\n * `mx-auto` but the DECISION about how wide the page reads, and twenty copies of\n * a decision drift. This owns the decision and leaves the styling replaceable.\n */\nexport const Container = forwardRef<HTMLElement, ContainerProps>(\n ({ children, size = \"md\", as: Tag = \"div\", className, ...props }, ref) => {\n // `as` makes the element dynamic, so the ref type cannot be known\n // statically. Narrowed at the boundary rather than dragging a full\n // polymorphic-component generic into a layout primitive.\n const Component = Tag as \"div\";\n\n return (\n <Component\n ref={ref as React.Ref<HTMLDivElement>}\n {...props}\n data-react-fancy-container=\"\"\n data-size={size}\n className={cn(\"mx-auto w-full px-4 sm:px-6\", SIZES[size], className)}\n >\n {children}\n </Component>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn } from './chunk-DSUHZO6T.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var GAP = { sm: "gap-3", md: "gap-6", lg: "gap-10" };
|
|
6
|
+
var Grid = forwardRef(
|
|
7
|
+
({ children, cols = 3, gap = "md", responsive = true, className, style, ...props }, ref) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
...props,
|
|
13
|
+
"data-react-fancy-grid": "",
|
|
14
|
+
"data-responsive": responsive ? "true" : "false",
|
|
15
|
+
className: cn("grid", GAP[gap], className),
|
|
16
|
+
style: {
|
|
17
|
+
...style,
|
|
18
|
+
["--fancy-grid-cols"]: String(cols),
|
|
19
|
+
gridTemplateColumns: responsive ? "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" : `repeat(${cols}, minmax(0, 1fr))`
|
|
20
|
+
},
|
|
21
|
+
children
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Grid.displayName = "Grid";
|
|
27
|
+
|
|
28
|
+
export { Grid };
|
|
29
|
+
//# sourceMappingURL=chunk-MKFWFZVX.js.map
|
|
30
|
+
//# sourceMappingURL=chunk-MKFWFZVX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Grid/Grid.tsx"],"names":[],"mappings":";;;;AAIA,IAAM,MAAM,EAAE,EAAA,EAAI,SAAS,EAAA,EAAI,OAAA,EAAS,IAAI,QAAA,EAAS;AAW9C,IAAM,IAAA,GAAO,UAAA;AAAA,EAClB,CAAC,EAAE,QAAA,EAAU,IAAA,GAAO,GAAG,GAAA,GAAM,IAAA,EAAM,UAAA,GAAa,IAAA,EAAM,SAAA,EAAW,KAAA,EAAO,GAAG,KAAA,IAAS,GAAA,KAAQ;AAC1F,IAAA,uBACE,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,uBAAA,EAAsB,EAAA;AAAA,QACtB,iBAAA,EAAiB,aAAa,MAAA,GAAS,OAAA;AAAA,QACvC,WAAW,EAAA,CAAG,MAAA,EAAQ,GAAA,CAAI,GAAG,GAAG,SAAS,CAAA;AAAA,QACzC,KAAA,EAAO;AAAA,UACL,GAAG,KAAA;AAAA,UACH,CAAC,mBAA6B,GAAG,MAAA,CAAO,IAAI,CAAA;AAAA,UAC5C,mBAAA,EAAqB,UAAA,GACjB,iDAAA,GACA,CAAA,OAAA,EAAU,IAAI,CAAA,iBAAA;AAAA,SACpB;AAAA,QAEC;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,IAAA,CAAK,WAAA,GAAc,MAAA","file":"chunk-MKFWFZVX.js","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { GridProps } from \"./Grid.types\";\n\nconst GAP = { sm: \"gap-3\", md: \"gap-6\", lg: \"gap-10\" } as const;\n\n/**\n * The modular grid.\n *\n * Column count goes through a custom property rather than a `grid-cols-N` class\n * because N is a prop: Tailwind cannot generate a class it never sees in source,\n * and every hand-rolled copy in the gallery worked around that differently. The\n * property also gives a design a single place to override the breakpoint\n * behaviour in CSS without fighting a utility.\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n ({ children, cols = 3, gap = \"md\", responsive = true, className, style, ...props }, ref) => {\n return (\n <div\n ref={ref}\n {...props}\n data-react-fancy-grid=\"\"\n data-responsive={responsive ? \"true\" : \"false\"}\n className={cn(\"grid\", GAP[gap], className)}\n style={{\n ...style,\n [\"--fancy-grid-cols\" as string]: String(cols),\n gridTemplateColumns: responsive\n ? \"repeat(auto-fit, minmax(min(100%, 16rem), 1fr))\"\n : `repeat(${cols}, minmax(0, 1fr))`,\n }}\n >\n {children}\n </div>\n );\n },\n);\n\nGrid.displayName = \"Grid\";\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { cn } from './chunk-DSUHZO6T.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var SPACE = { sm: "py-8", md: "py-16", lg: "py-24" };
|
|
6
|
+
var Section = forwardRef(
|
|
7
|
+
({ children, space = "md", divider = false, as: Tag = "section", className, ...props }, ref) => {
|
|
8
|
+
const Component = Tag;
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
Component,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
...props,
|
|
14
|
+
"data-react-fancy-section": "",
|
|
15
|
+
"data-space": space,
|
|
16
|
+
className: cn(
|
|
17
|
+
SPACE[space],
|
|
18
|
+
divider && "border-t border-zinc-200 dark:border-zinc-800",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
children
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Section.displayName = "Section";
|
|
27
|
+
|
|
28
|
+
export { Section };
|
|
29
|
+
//# sourceMappingURL=chunk-PG3ILQIW.js.map
|
|
30
|
+
//# sourceMappingURL=chunk-PG3ILQIW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Section/Section.tsx"],"names":[],"mappings":";;;;AAKA,IAAM,QAAQ,EAAE,EAAA,EAAI,QAAQ,EAAA,EAAI,OAAA,EAAS,IAAI,OAAA,EAAQ;AAS9C,IAAM,OAAA,GAAU,UAAA;AAAA,EACrB,CAAC,EAAE,QAAA,EAAU,KAAA,GAAQ,MAAM,OAAA,GAAU,KAAA,EAAO,EAAA,EAAI,GAAA,GAAM,SAAA,EAAW,SAAA,EAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAC9F,IAAA,MAAM,SAAA,GAAY,GAAA;AAElB,IAAA,uBACE,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,0BAAA,EAAyB,EAAA;AAAA,QACzB,YAAA,EAAY,KAAA;AAAA,QACZ,SAAA,EAAW,EAAA;AAAA,UACT,MAAM,KAAK,CAAA;AAAA,UACX,OAAA,IAAW,+CAAA;AAAA,UACX;AAAA,SACF;AAAA,QAEC;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA","file":"chunk-PG3ILQIW.js","sourcesContent":["import { forwardRef } from \"react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { SectionProps } from \"./Section.types\";\n\nconst SPACE = { sm: \"py-8\", md: \"py-16\", lg: \"py-24\" } as const;\n\n/**\n * Vertical rhythm between page sections, with the optional opening hairline.\n *\n * Pairs with `Eyebrow`, which is what usually sits at the top of one. The rule\n * is a prop rather than a caller-drawn border because half the gallery styles\n * drew it and half forgot, and an inconsistent rule reads as a bug.\n */\nexport const Section = forwardRef<HTMLElement, SectionProps>(\n ({ children, space = \"md\", divider = false, as: Tag = \"section\", className, ...props }, ref) => {\n const Component = Tag as \"section\";\n\n return (\n <Component\n ref={ref as React.Ref<HTMLElement>}\n {...props}\n data-react-fancy-section=\"\"\n data-space={space}\n className={cn(\n SPACE[space],\n divider && \"border-t border-zinc-200 dark:border-zinc-800\",\n className,\n )}\n >\n {children}\n </Component>\n );\n },\n);\n\nSection.displayName = \"Section\";\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3Z6ALUWP_cjs = require('./chunk-3Z6ALUWP.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var SIZES = {
|
|
8
|
+
sm: "max-w-3xl",
|
|
9
|
+
md: "max-w-5xl",
|
|
10
|
+
lg: "max-w-7xl",
|
|
11
|
+
full: "max-w-none"
|
|
12
|
+
};
|
|
13
|
+
var Container = react.forwardRef(
|
|
14
|
+
({ children, size = "md", as: Tag = "div", className, ...props }, ref) => {
|
|
15
|
+
const Component = Tag;
|
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
+
Component,
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
...props,
|
|
21
|
+
"data-react-fancy-container": "",
|
|
22
|
+
"data-size": size,
|
|
23
|
+
className: chunk3Z6ALUWP_cjs.cn("mx-auto w-full px-4 sm:px-6", SIZES[size], className),
|
|
24
|
+
children
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Container.displayName = "Container";
|
|
30
|
+
|
|
31
|
+
exports.Container = Container;
|
|
32
|
+
//# sourceMappingURL=chunk-SYXLPCQP.cjs.map
|
|
33
|
+
//# sourceMappingURL=chunk-SYXLPCQP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Container/Container.tsx"],"names":["forwardRef","jsx","cn"],"mappings":";;;;;;AAKA,IAAM,KAAA,GAAQ;AAAA,EACZ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,EAAA,EAAI,WAAA;AAAA,EACJ,IAAA,EAAM;AACR,CAAA;AASO,IAAM,SAAA,GAAYA,gBAAA;AAAA,EACvB,CAAC,EAAE,QAAA,EAAU,IAAA,GAAO,IAAA,EAAM,EAAA,EAAI,GAAA,GAAM,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAIxE,IAAA,MAAM,SAAA,GAAY,GAAA;AAElB,IAAA,uBACEC,cAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,4BAAA,EAA2B,EAAA;AAAA,QAC3B,WAAA,EAAW,IAAA;AAAA,QACX,WAAWC,oBAAA,CAAG,6BAAA,EAA+B,KAAA,CAAM,IAAI,GAAG,SAAS,CAAA;AAAA,QAElE;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA","file":"chunk-SYXLPCQP.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ContainerProps } from \"./Container.types\";\n\nconst SIZES = {\n sm: \"max-w-3xl\",\n md: \"max-w-5xl\",\n lg: \"max-w-7xl\",\n full: \"max-w-none\",\n} as const;\n\n/**\n * The page's horizontal measure — centred, capped, with gutters.\n *\n * Every Swiss-family gallery style hand-rolled this. What they repeated was not\n * `mx-auto` but the DECISION about how wide the page reads, and twenty copies of\n * a decision drift. This owns the decision and leaves the styling replaceable.\n */\nexport const Container = forwardRef<HTMLElement, ContainerProps>(\n ({ children, size = \"md\", as: Tag = \"div\", className, ...props }, ref) => {\n // `as` makes the element dynamic, so the ref type cannot be known\n // statically. Narrowed at the boundary rather than dragging a full\n // polymorphic-component generic into a layout primitive.\n const Component = Tag as \"div\";\n\n return (\n <Component\n ref={ref as React.Ref<HTMLDivElement>}\n {...props}\n data-react-fancy-container=\"\"\n data-size={size}\n className={cn(\"mx-auto w-full px-4 sm:px-6\", SIZES[size], className)}\n >\n {children}\n </Component>\n );\n },\n);\n\nContainer.displayName = \"Container\";\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3Z6ALUWP_cjs = require('./chunk-3Z6ALUWP.cjs');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var SPACE = { sm: "py-8", md: "py-16", lg: "py-24" };
|
|
8
|
+
var Section = react.forwardRef(
|
|
9
|
+
({ children, space = "md", divider = false, as: Tag = "section", className, ...props }, ref) => {
|
|
10
|
+
const Component = Tag;
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12
|
+
Component,
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
...props,
|
|
16
|
+
"data-react-fancy-section": "",
|
|
17
|
+
"data-space": space,
|
|
18
|
+
className: chunk3Z6ALUWP_cjs.cn(
|
|
19
|
+
SPACE[space],
|
|
20
|
+
divider && "border-t border-zinc-200 dark:border-zinc-800",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
Section.displayName = "Section";
|
|
29
|
+
|
|
30
|
+
exports.Section = Section;
|
|
31
|
+
//# sourceMappingURL=chunk-VQ4M25U3.cjs.map
|
|
32
|
+
//# sourceMappingURL=chunk-VQ4M25U3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Section/Section.tsx"],"names":["forwardRef","jsx","cn"],"mappings":";;;;;;AAKA,IAAM,QAAQ,EAAE,EAAA,EAAI,QAAQ,EAAA,EAAI,OAAA,EAAS,IAAI,OAAA,EAAQ;AAS9C,IAAM,OAAA,GAAUA,gBAAA;AAAA,EACrB,CAAC,EAAE,QAAA,EAAU,KAAA,GAAQ,MAAM,OAAA,GAAU,KAAA,EAAO,EAAA,EAAI,GAAA,GAAM,SAAA,EAAW,SAAA,EAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAC9F,IAAA,MAAM,SAAA,GAAY,GAAA;AAElB,IAAA,uBACEC,cAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACC,GAAG,KAAA;AAAA,QACJ,0BAAA,EAAyB,EAAA;AAAA,QACzB,YAAA,EAAY,KAAA;AAAA,QACZ,SAAA,EAAWC,oBAAA;AAAA,UACT,MAAM,KAAK,CAAA;AAAA,UACX,OAAA,IAAW,+CAAA;AAAA,UACX;AAAA,SACF;AAAA,QAEC;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA","file":"chunk-VQ4M25U3.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { SectionProps } from \"./Section.types\";\n\nconst SPACE = { sm: \"py-8\", md: \"py-16\", lg: \"py-24\" } as const;\n\n/**\n * Vertical rhythm between page sections, with the optional opening hairline.\n *\n * Pairs with `Eyebrow`, which is what usually sits at the top of one. The rule\n * is a prop rather than a caller-drawn border because half the gallery styles\n * drew it and half forgot, and an inconsistent rule reads as a bug.\n */\nexport const Section = forwardRef<HTMLElement, SectionProps>(\n ({ children, space = \"md\", divider = false, as: Tag = \"section\", className, ...props }, ref) => {\n const Component = Tag as \"section\";\n\n return (\n <Component\n ref={ref as React.Ref<HTMLElement>}\n {...props}\n data-react-fancy-section=\"\"\n data-space={space}\n className={cn(\n SPACE[space],\n divider && \"border-t border-zinc-200 dark:border-zinc-800\",\n className,\n )}\n >\n {children}\n </Component>\n );\n },\n);\n\nSection.displayName = \"Section\";\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkSYXLPCQP_cjs = require('./chunk-SYXLPCQP.cjs');
|
|
4
|
+
require('./chunk-3Z6ALUWP.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Container", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkSYXLPCQP_cjs.Container; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=container.cjs.map
|
|
13
|
+
//# sourceMappingURL=container.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"container.cjs"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Reading measure. `md` (default) suits body text; `full` removes the cap. */
|
|
7
|
+
size?: "sm" | "md" | "lg" | "full";
|
|
8
|
+
/** The element to render. A container is often a `<main>` or `<header>`. */
|
|
9
|
+
as?: ElementType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The page's horizontal measure — centred, capped, with gutters.
|
|
14
|
+
*
|
|
15
|
+
* Every Swiss-family gallery style hand-rolled this. What they repeated was not
|
|
16
|
+
* `mx-auto` but the DECISION about how wide the page reads, and twenty copies of
|
|
17
|
+
* a decision drift. This owns the decision and leaves the styling replaceable.
|
|
18
|
+
*/
|
|
19
|
+
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLElement>>;
|
|
20
|
+
|
|
21
|
+
export { Container, type ContainerProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ContainerProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Reading measure. `md` (default) suits body text; `full` removes the cap. */
|
|
7
|
+
size?: "sm" | "md" | "lg" | "full";
|
|
8
|
+
/** The element to render. A container is often a `<main>` or `<header>`. */
|
|
9
|
+
as?: ElementType;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The page's horizontal measure — centred, capped, with gutters.
|
|
14
|
+
*
|
|
15
|
+
* Every Swiss-family gallery style hand-rolled this. What they repeated was not
|
|
16
|
+
* `mx-auto` but the DECISION about how wide the page reads, and twenty copies of
|
|
17
|
+
* a decision drift. This owns the decision and leaves the styling replaceable.
|
|
18
|
+
*/
|
|
19
|
+
declare const Container: react.ForwardRefExoticComponent<ContainerProps & react.RefAttributes<HTMLElement>>;
|
|
20
|
+
|
|
21
|
+
export { Container, type ContainerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"container.js"}
|
package/dist/editor.cjs
CHANGED
|
@@ -5,8 +5,8 @@ require('./chunk-G34OBTU3.cjs');
|
|
|
5
5
|
require('./chunk-T6YELZPJ.cjs');
|
|
6
6
|
require('./chunk-RNHIDZLE.cjs');
|
|
7
7
|
require('./chunk-TXTRTTG7.cjs');
|
|
8
|
-
require('./chunk-DJ3YM72H.cjs');
|
|
9
8
|
require('./chunk-3WGRVDQR.cjs');
|
|
9
|
+
require('./chunk-DJ3YM72H.cjs');
|
|
10
10
|
require('./chunk-BFKCVSNK.cjs');
|
|
11
11
|
require('./chunk-J2DI6RMR.cjs');
|
|
12
12
|
require('./chunk-L3V3BYVS.cjs');
|
package/dist/editor.js
CHANGED
|
@@ -3,8 +3,8 @@ import './chunk-RNPFSVFN.js';
|
|
|
3
3
|
import './chunk-CPY7NHXM.js';
|
|
4
4
|
import './chunk-FVV76TRF.js';
|
|
5
5
|
import './chunk-5U2DZ7AV.js';
|
|
6
|
-
import './chunk-ZLCVKYHY.js';
|
|
7
6
|
import './chunk-CHADHN6M.js';
|
|
7
|
+
import './chunk-ZLCVKYHY.js';
|
|
8
8
|
import './chunk-XJXQG34J.js';
|
|
9
9
|
import './chunk-MQ6VGG62.js';
|
|
10
10
|
import './chunk-NRXK42LO.js';
|
package/dist/grid.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkAY3JABE3_cjs = require('./chunk-AY3JABE3.cjs');
|
|
4
|
+
require('./chunk-3Z6ALUWP.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Grid", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkAY3JABE3_cjs.Grid; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=grid.cjs.map
|
|
13
|
+
//# sourceMappingURL=grid.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"grid.cjs"}
|
package/dist/grid.d.cts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Column count at the widest breakpoint. Default `3`. */
|
|
7
|
+
cols?: number;
|
|
8
|
+
/** Gutter. Default `md`. */
|
|
9
|
+
gap?: "sm" | "md" | "lg";
|
|
10
|
+
/**
|
|
11
|
+
* Collapse toward one column on small screens. Default `true`.
|
|
12
|
+
*
|
|
13
|
+
* Off for grids that are genuinely fixed — a 2-up of icons, say — where
|
|
14
|
+
* collapsing looks broken rather than responsive.
|
|
15
|
+
*/
|
|
16
|
+
responsive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The modular grid.
|
|
21
|
+
*
|
|
22
|
+
* Column count goes through a custom property rather than a `grid-cols-N` class
|
|
23
|
+
* because N is a prop: Tailwind cannot generate a class it never sees in source,
|
|
24
|
+
* and every hand-rolled copy in the gallery worked around that differently. The
|
|
25
|
+
* property also gives a design a single place to override the breakpoint
|
|
26
|
+
* behaviour in CSS without fighting a utility.
|
|
27
|
+
*/
|
|
28
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
|
|
30
|
+
export { Grid, type GridProps };
|
package/dist/grid.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Column count at the widest breakpoint. Default `3`. */
|
|
7
|
+
cols?: number;
|
|
8
|
+
/** Gutter. Default `md`. */
|
|
9
|
+
gap?: "sm" | "md" | "lg";
|
|
10
|
+
/**
|
|
11
|
+
* Collapse toward one column on small screens. Default `true`.
|
|
12
|
+
*
|
|
13
|
+
* Off for grids that are genuinely fixed — a 2-up of icons, say — where
|
|
14
|
+
* collapsing looks broken rather than responsive.
|
|
15
|
+
*/
|
|
16
|
+
responsive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The modular grid.
|
|
21
|
+
*
|
|
22
|
+
* Column count goes through a custom property rather than a `grid-cols-N` class
|
|
23
|
+
* because N is a prop: Tailwind cannot generate a class it never sees in source,
|
|
24
|
+
* and every hand-rolled copy in the gallery worked around that differently. The
|
|
25
|
+
* property also gives a design a single place to override the breakpoint
|
|
26
|
+
* behaviour in CSS without fighting a utility.
|
|
27
|
+
*/
|
|
28
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & react.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
|
|
30
|
+
export { Grid, type GridProps };
|
package/dist/grid.js
ADDED
package/dist/grid.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"grid.js"}
|