@puzzle-ui/ui 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,13 @@
1
1
  # @puzzle-ui/ui
2
2
 
3
- Accessible, token-driven React components for building Puzzle interfaces.
3
+ Composable, token-driven React components for building React interfaces with Puzzle.
4
4
 
5
5
  **Documentation:** [https://puzzle-ui.com/docs/ui](https://puzzle-ui.com/docs/ui)
6
6
 
7
- > [!WARNING]
8
- > **Puzzle is not ready for production use.** APIs, component props, package
9
- > exports, and styling may change without notice. Accessibility and framework
10
- > compatibility are still being tested. Use it for experimentation and
11
- > evaluation.
7
+ Component API maturity is listed on each component's documentation page.
8
+ Paper, Skeleton, Label, Background, Breadcrumbs, Sidebar, and Backdrop are
9
+ Experimental because their current validation evidence is limited. Review
10
+ documented accessibility and framework details when integrating components.
12
11
 
13
12
  `@puzzle-ui/ui` provides composable, router-independent React components:
14
13
  actions, data display, editors, forms, layout, navigation, overlays,
@@ -61,7 +60,7 @@ export const App = () => (
61
60
  | Data display | Alert, Avatar, Badge, Card, EmptyState, Image, Paper, Progress, Rating, Skeleton |
62
61
  | Editors | TextEditor, TextEditorToolbar, TextRenderer |
63
62
  | Forms | Autocomplete, Checkbox, ColorPicker, DatePicker, FileUpload, FormField, inputs, Radio, Select, Slider, Switch |
64
- | Layout | AppBar, AspectRatio, Container, PageLayout, ResizablePanels, ScrollArea, Section, Separator, Sidebar, Stack |
63
+ | Layout | AppBar, AspectRatio, Container, Grid, GridItem, PageLayout, ResizablePanels, ScrollArea, Section, Separator, Sidebar, Stack |
65
64
  | Navigation | Accordion, Breadcrumbs, Carousel, Link, Pagination, Tabs, TreeView |
66
65
  | Overlays | Command, ContextMenu, Dialog, Drawer, DropdownMenu, Notification, Popover, Tooltip |
67
66
  | Typography | Heading, Text |
@@ -21,7 +21,7 @@ const Badge = ({ content, size = 20, color = "primary", anchorOrigin = {
21
21
  anchorOrigin.horizontal,
22
22
  anchorOverlap
23
23
  ], children == null && "puzzle-badge-standalone", !isHex && `puzzle-badge-${color}`, className);
24
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(children == null ? "span" : "div", {
25
25
  className: classes,
26
26
  children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
27
27
  className: (0, _puzzle_ui_core.cn)("puzzle-badge-indicator", isSingleCharacter && "puzzle-badge-indicator--single"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["isHexColor","isDarkColor","cn"],"sources":["../../../../src/components/data-display/badge/index.tsx"],"sourcesContent":["import { cn, isDarkColor, isHexColor } from \"@puzzle-ui/core\";\nimport { type ReactNode } from \"react\";\nimport \"./badge.css\";\n\ntype AnchorOrigin = {\n vertical: \"top\" | \"bottom\";\n horizontal: \"left\" | \"right\";\n};\n\ntype AnchorOffset = {\n vertical: number;\n horizontal: number;\n};\n\ntype AnchorOverlap = \"rectangular\" | \"circular\";\ntype BadgeColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"danger\"\n | \"info\"\n | `#${string}`;\n\ntype BadgeProps = {\n content: ReactNode;\n size?: number;\n color?: BadgeColor;\n anchorOrigin?: AnchorOrigin;\n anchorOffset?: AnchorOffset;\n anchorOverlap?: AnchorOverlap;\n className?: string;\n children?: ReactNode;\n};\n\nconst Badge = ({\n content,\n size = 20,\n color = \"primary\",\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n anchorOffset = { vertical: 0, horizontal: 0 },\n anchorOverlap = \"rectangular\",\n className,\n children,\n}: BadgeProps) => {\n if (!Number.isFinite(anchorOffset.vertical) || !Number.isFinite(anchorOffset.horizontal)) {\n throw new TypeError(\"Badge anchorOffset values must be finite numbers.\");\n }\n\n const resolvedSize = Math.max(size, 16);\n const isHex = isHexColor(color);\n const isDark = isHex ? isDarkColor(color) : false;\n\n const textContent =\n typeof content === \"string\" || typeof content === \"number\"\n ? String(content).trim()\n : null;\n const isSingleCharacter =\n textContent != null && Array.from(textContent).length === 1;\n\n const classes = cn(\n \"puzzle-badge\",\n children != null && [\n anchorOrigin.vertical,\n anchorOrigin.horizontal,\n anchorOverlap,\n ],\n children == null && \"puzzle-badge-standalone\",\n !isHex && `puzzle-badge-${color}`,\n className,\n );\n\n return (\n <div className={classes}>\n {children}\n <span\n className={cn(\n \"puzzle-badge-indicator\",\n isSingleCharacter && \"puzzle-badge-indicator--single\",\n )}\n style={{\n fontSize: `clamp(0.7rem, calc(${resolvedSize}px - 1em), 4rem)`,\n minHeight: `${resolvedSize}px`,\n minWidth: `${resolvedSize}px`,\n translate: children != null\n ? `${anchorOffset.horizontal * (anchorOrigin.horizontal === \"left\" ? 1 : -1)}px ${anchorOffset.vertical * (anchorOrigin.vertical === \"top\" ? 1 : -1)}px`\n : undefined,\n backgroundColor: isHex ? color : undefined,\n color: isHex\n ? isDark\n ? \"var(--puzzle-color-light-foreground)\"\n : \"var(--puzzle-color-dark-foreground)\"\n : undefined,\n }}\n >\n {content}\n </span>\n </div>\n );\n};\n\nexport {\n Badge,\n type BadgeProps,\n type BadgeColor,\n type AnchorOrigin,\n type AnchorOffset,\n type AnchorOverlap,\n};\n"],"mappings":";;;;;AAkCA,MAAM,SAAS,EACb,SACA,OAAO,IACP,QAAQ,WACR,eAAe;CAAE,UAAU;CAAO,YAAY;AAAQ,GACtD,eAAe;CAAE,UAAU;CAAG,YAAY;AAAE,GAC5C,gBAAgB,eAChB,WACA,eACgB;CAChB,IAAI,CAAC,OAAO,SAAS,aAAa,QAAQ,KAAK,CAAC,OAAO,SAAS,aAAa,UAAU,GACrF,MAAM,IAAI,UAAU,mDAAmD;CAGzE,MAAM,eAAe,KAAK,IAAI,MAAM,EAAE;CACtC,MAAM,SAAA,GAAQA,gBAAAA,WAAAA,CAAW,KAAK;CAC9B,MAAM,SAAS,SAAA,GAAQC,gBAAAA,YAAAA,CAAY,KAAK,IAAI;CAE5C,MAAM,cACJ,OAAO,YAAY,YAAY,OAAO,YAAY,WAC9C,OAAO,OAAO,CAAC,CAAC,KAAK,IACrB;CACN,MAAM,oBACJ,eAAe,QAAQ,MAAM,KAAK,WAAW,CAAC,CAAC,WAAW;CAE5D,MAAM,WAAA,GAAUC,gBAAAA,GAAAA,CACd,gBACA,YAAY,QAAQ;EAClB,aAAa;EACb,aAAa;EACb;CACF,GACA,YAAY,QAAQ,2BACpB,CAAC,SAAS,gBAAgB,SAC1B,SACF;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAW;EAAhB,UAAA,CACG,UACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,YAAA,GAAWA,gBAAAA,GAAAA,CACT,0BACA,qBAAqB,gCACvB;GACA,OAAO;IACL,UAAU,sBAAsB,aAAa;IAC7C,WAAW,GAAG,aAAa;IAC3B,UAAU,GAAG,aAAa;IAC1B,WAAW,YAAY,OACnB,GAAG,aAAa,cAAc,aAAa,eAAe,SAAS,IAAI,IAAI,KAAK,aAAa,YAAY,aAAa,aAAa,QAAQ,IAAI,IAAI,MACnJ,KAAA;IACJ,iBAAiB,QAAQ,QAAQ,KAAA;IACjC,OAAO,QACH,SACE,yCACA,wCACF,KAAA;GACN;GAEC,UAAA;EACG,CAAA,CACH;;AAET"}
1
+ {"version":3,"file":"index.cjs","names":["isHexColor","isDarkColor","cn"],"sources":["../../../../src/components/data-display/badge/index.tsx"],"sourcesContent":["import { cn, isDarkColor, isHexColor } from \"@puzzle-ui/core\";\nimport { type ReactNode } from \"react\";\nimport \"./badge.css\";\n\ntype AnchorOrigin = {\n vertical: \"top\" | \"bottom\";\n horizontal: \"left\" | \"right\";\n};\n\ntype AnchorOffset = {\n vertical: number;\n horizontal: number;\n};\n\ntype AnchorOverlap = \"rectangular\" | \"circular\";\ntype BadgeColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"danger\"\n | \"info\"\n | `#${string}`;\n\ntype BadgeProps = {\n content: ReactNode;\n size?: number;\n color?: BadgeColor;\n anchorOrigin?: AnchorOrigin;\n anchorOffset?: AnchorOffset;\n anchorOverlap?: AnchorOverlap;\n className?: string;\n children?: ReactNode;\n};\n\nconst Badge = ({\n content,\n size = 20,\n color = \"primary\",\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n anchorOffset = { vertical: 0, horizontal: 0 },\n anchorOverlap = \"rectangular\",\n className,\n children,\n}: BadgeProps) => {\n if (!Number.isFinite(anchorOffset.vertical) || !Number.isFinite(anchorOffset.horizontal)) {\n throw new TypeError(\"Badge anchorOffset values must be finite numbers.\");\n }\n\n const resolvedSize = Math.max(size, 16);\n const isHex = isHexColor(color);\n const isDark = isHex ? isDarkColor(color) : false;\n\n const textContent =\n typeof content === \"string\" || typeof content === \"number\"\n ? String(content).trim()\n : null;\n const isSingleCharacter =\n textContent != null && Array.from(textContent).length === 1;\n\n const classes = cn(\n \"puzzle-badge\",\n children != null && [\n anchorOrigin.vertical,\n anchorOrigin.horizontal,\n anchorOverlap,\n ],\n children == null && \"puzzle-badge-standalone\",\n !isHex && `puzzle-badge-${color}`,\n className,\n );\n\n const Component = children == null ? \"span\" : \"div\";\n\n return (\n <Component className={classes}>\n {children}\n <span\n className={cn(\n \"puzzle-badge-indicator\",\n isSingleCharacter && \"puzzle-badge-indicator--single\",\n )}\n style={{\n fontSize: `clamp(0.7rem, calc(${resolvedSize}px - 1em), 4rem)`,\n minHeight: `${resolvedSize}px`,\n minWidth: `${resolvedSize}px`,\n translate: children != null\n ? `${anchorOffset.horizontal * (anchorOrigin.horizontal === \"left\" ? 1 : -1)}px ${anchorOffset.vertical * (anchorOrigin.vertical === \"top\" ? 1 : -1)}px`\n : undefined,\n backgroundColor: isHex ? color : undefined,\n color: isHex\n ? isDark\n ? \"var(--puzzle-color-light-foreground)\"\n : \"var(--puzzle-color-dark-foreground)\"\n : undefined,\n }}\n >\n {content}\n </span>\n </Component>\n );\n};\n\nexport {\n Badge,\n type BadgeProps,\n type BadgeColor,\n type AnchorOrigin,\n type AnchorOffset,\n type AnchorOverlap,\n};\n"],"mappings":";;;;;AAkCA,MAAM,SAAS,EACb,SACA,OAAO,IACP,QAAQ,WACR,eAAe;CAAE,UAAU;CAAO,YAAY;AAAQ,GACtD,eAAe;CAAE,UAAU;CAAG,YAAY;AAAE,GAC5C,gBAAgB,eAChB,WACA,eACgB;CAChB,IAAI,CAAC,OAAO,SAAS,aAAa,QAAQ,KAAK,CAAC,OAAO,SAAS,aAAa,UAAU,GACrF,MAAM,IAAI,UAAU,mDAAmD;CAGzE,MAAM,eAAe,KAAK,IAAI,MAAM,EAAE;CACtC,MAAM,SAAA,GAAQA,gBAAAA,WAAAA,CAAW,KAAK;CAC9B,MAAM,SAAS,SAAA,GAAQC,gBAAAA,YAAAA,CAAY,KAAK,IAAI;CAE5C,MAAM,cACJ,OAAO,YAAY,YAAY,OAAO,YAAY,WAC9C,OAAO,OAAO,CAAC,CAAC,KAAK,IACrB;CACN,MAAM,oBACJ,eAAe,QAAQ,MAAM,KAAK,WAAW,CAAC,CAAC,WAAW;CAE5D,MAAM,WAAA,GAAUC,gBAAAA,GAAAA,CACd,gBACA,YAAY,QAAQ;EAClB,aAAa;EACb,aAAa;EACb;CACF,GACA,YAAY,QAAQ,2BACpB,CAAC,SAAS,gBAAgB,SAC1B,SACF;CAIA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAHgB,YAAY,OAAO,SAAS,OAG5C;EAAW,WAAW;EAAtB,UAAA,CACG,UACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,YAAA,GAAWA,gBAAAA,GAAAA,CACT,0BACA,qBAAqB,gCACvB;GACA,OAAO;IACL,UAAU,sBAAsB,aAAa;IAC7C,WAAW,GAAG,aAAa;IAC3B,UAAU,GAAG,aAAa;IAC1B,WAAW,YAAY,OACnB,GAAG,aAAa,cAAc,aAAa,eAAe,SAAS,IAAI,IAAI,KAAK,aAAa,YAAY,aAAa,aAAa,QAAQ,IAAI,IAAI,MACnJ,KAAA;IACJ,iBAAiB,QAAQ,QAAQ,KAAA;IACjC,OAAO,QACH,SACE,yCACA,wCACF,KAAA;GACN;GAEC,UAAA;EACG,CAAA,CACG;;AAEf"}
@@ -21,7 +21,7 @@ const Badge = ({ content, size = 20, color = "primary", anchorOrigin = {
21
21
  anchorOrigin.horizontal,
22
22
  anchorOverlap
23
23
  ], children == null && "puzzle-badge-standalone", !isHex && `puzzle-badge-${color}`, className);
24
- return /* @__PURE__ */ jsxs("div", {
24
+ return /* @__PURE__ */ jsxs(children == null ? "span" : "div", {
25
25
  className: classes,
26
26
  children: [children, /* @__PURE__ */ jsx("span", {
27
27
  className: cn("puzzle-badge-indicator", isSingleCharacter && "puzzle-badge-indicator--single"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/data-display/badge/index.tsx"],"sourcesContent":["import { cn, isDarkColor, isHexColor } from \"@puzzle-ui/core\";\nimport { type ReactNode } from \"react\";\nimport \"./badge.css\";\n\ntype AnchorOrigin = {\n vertical: \"top\" | \"bottom\";\n horizontal: \"left\" | \"right\";\n};\n\ntype AnchorOffset = {\n vertical: number;\n horizontal: number;\n};\n\ntype AnchorOverlap = \"rectangular\" | \"circular\";\ntype BadgeColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"danger\"\n | \"info\"\n | `#${string}`;\n\ntype BadgeProps = {\n content: ReactNode;\n size?: number;\n color?: BadgeColor;\n anchorOrigin?: AnchorOrigin;\n anchorOffset?: AnchorOffset;\n anchorOverlap?: AnchorOverlap;\n className?: string;\n children?: ReactNode;\n};\n\nconst Badge = ({\n content,\n size = 20,\n color = \"primary\",\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n anchorOffset = { vertical: 0, horizontal: 0 },\n anchorOverlap = \"rectangular\",\n className,\n children,\n}: BadgeProps) => {\n if (!Number.isFinite(anchorOffset.vertical) || !Number.isFinite(anchorOffset.horizontal)) {\n throw new TypeError(\"Badge anchorOffset values must be finite numbers.\");\n }\n\n const resolvedSize = Math.max(size, 16);\n const isHex = isHexColor(color);\n const isDark = isHex ? isDarkColor(color) : false;\n\n const textContent =\n typeof content === \"string\" || typeof content === \"number\"\n ? String(content).trim()\n : null;\n const isSingleCharacter =\n textContent != null && Array.from(textContent).length === 1;\n\n const classes = cn(\n \"puzzle-badge\",\n children != null && [\n anchorOrigin.vertical,\n anchorOrigin.horizontal,\n anchorOverlap,\n ],\n children == null && \"puzzle-badge-standalone\",\n !isHex && `puzzle-badge-${color}`,\n className,\n );\n\n return (\n <div className={classes}>\n {children}\n <span\n className={cn(\n \"puzzle-badge-indicator\",\n isSingleCharacter && \"puzzle-badge-indicator--single\",\n )}\n style={{\n fontSize: `clamp(0.7rem, calc(${resolvedSize}px - 1em), 4rem)`,\n minHeight: `${resolvedSize}px`,\n minWidth: `${resolvedSize}px`,\n translate: children != null\n ? `${anchorOffset.horizontal * (anchorOrigin.horizontal === \"left\" ? 1 : -1)}px ${anchorOffset.vertical * (anchorOrigin.vertical === \"top\" ? 1 : -1)}px`\n : undefined,\n backgroundColor: isHex ? color : undefined,\n color: isHex\n ? isDark\n ? \"var(--puzzle-color-light-foreground)\"\n : \"var(--puzzle-color-dark-foreground)\"\n : undefined,\n }}\n >\n {content}\n </span>\n </div>\n );\n};\n\nexport {\n Badge,\n type BadgeProps,\n type BadgeColor,\n type AnchorOrigin,\n type AnchorOffset,\n type AnchorOverlap,\n};\n"],"mappings":";;;;;AAkCA,MAAM,SAAS,EACb,SACA,OAAO,IACP,QAAQ,WACR,eAAe;CAAE,UAAU;CAAO,YAAY;AAAQ,GACtD,eAAe;CAAE,UAAU;CAAG,YAAY;AAAE,GAC5C,gBAAgB,eAChB,WACA,eACgB;CAChB,IAAI,CAAC,OAAO,SAAS,aAAa,QAAQ,KAAK,CAAC,OAAO,SAAS,aAAa,UAAU,GACrF,MAAM,IAAI,UAAU,mDAAmD;CAGzE,MAAM,eAAe,KAAK,IAAI,MAAM,EAAE;CACtC,MAAM,QAAQ,WAAW,KAAK;CAC9B,MAAM,SAAS,QAAQ,YAAY,KAAK,IAAI;CAE5C,MAAM,cACJ,OAAO,YAAY,YAAY,OAAO,YAAY,WAC9C,OAAO,OAAO,CAAC,CAAC,KAAK,IACrB;CACN,MAAM,oBACJ,eAAe,QAAQ,MAAM,KAAK,WAAW,CAAC,CAAC,WAAW;CAE5D,MAAM,UAAU,GACd,gBACA,YAAY,QAAQ;EAClB,aAAa;EACb,aAAa;EACb;CACF,GACA,YAAY,QAAQ,2BACpB,CAAC,SAAS,gBAAgB,SAC1B,SACF;CAEA,OACE,qBAAC,OAAD;EAAK,WAAW;EAAhB,UAAA,CACG,UACD,oBAAC,QAAD;GACE,WAAW,GACT,0BACA,qBAAqB,gCACvB;GACA,OAAO;IACL,UAAU,sBAAsB,aAAa;IAC7C,WAAW,GAAG,aAAa;IAC3B,UAAU,GAAG,aAAa;IAC1B,WAAW,YAAY,OACnB,GAAG,aAAa,cAAc,aAAa,eAAe,SAAS,IAAI,IAAI,KAAK,aAAa,YAAY,aAAa,aAAa,QAAQ,IAAI,IAAI,MACnJ,KAAA;IACJ,iBAAiB,QAAQ,QAAQ,KAAA;IACjC,OAAO,QACH,SACE,yCACA,wCACF,KAAA;GACN;GAEC,UAAA;EACG,CAAA,CACH;;AAET"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/data-display/badge/index.tsx"],"sourcesContent":["import { cn, isDarkColor, isHexColor } from \"@puzzle-ui/core\";\nimport { type ReactNode } from \"react\";\nimport \"./badge.css\";\n\ntype AnchorOrigin = {\n vertical: \"top\" | \"bottom\";\n horizontal: \"left\" | \"right\";\n};\n\ntype AnchorOffset = {\n vertical: number;\n horizontal: number;\n};\n\ntype AnchorOverlap = \"rectangular\" | \"circular\";\ntype BadgeColor =\n | \"primary\"\n | \"secondary\"\n | \"accent\"\n | \"danger\"\n | \"info\"\n | `#${string}`;\n\ntype BadgeProps = {\n content: ReactNode;\n size?: number;\n color?: BadgeColor;\n anchorOrigin?: AnchorOrigin;\n anchorOffset?: AnchorOffset;\n anchorOverlap?: AnchorOverlap;\n className?: string;\n children?: ReactNode;\n};\n\nconst Badge = ({\n content,\n size = 20,\n color = \"primary\",\n anchorOrigin = { vertical: \"top\", horizontal: \"right\" },\n anchorOffset = { vertical: 0, horizontal: 0 },\n anchorOverlap = \"rectangular\",\n className,\n children,\n}: BadgeProps) => {\n if (!Number.isFinite(anchorOffset.vertical) || !Number.isFinite(anchorOffset.horizontal)) {\n throw new TypeError(\"Badge anchorOffset values must be finite numbers.\");\n }\n\n const resolvedSize = Math.max(size, 16);\n const isHex = isHexColor(color);\n const isDark = isHex ? isDarkColor(color) : false;\n\n const textContent =\n typeof content === \"string\" || typeof content === \"number\"\n ? String(content).trim()\n : null;\n const isSingleCharacter =\n textContent != null && Array.from(textContent).length === 1;\n\n const classes = cn(\n \"puzzle-badge\",\n children != null && [\n anchorOrigin.vertical,\n anchorOrigin.horizontal,\n anchorOverlap,\n ],\n children == null && \"puzzle-badge-standalone\",\n !isHex && `puzzle-badge-${color}`,\n className,\n );\n\n const Component = children == null ? \"span\" : \"div\";\n\n return (\n <Component className={classes}>\n {children}\n <span\n className={cn(\n \"puzzle-badge-indicator\",\n isSingleCharacter && \"puzzle-badge-indicator--single\",\n )}\n style={{\n fontSize: `clamp(0.7rem, calc(${resolvedSize}px - 1em), 4rem)`,\n minHeight: `${resolvedSize}px`,\n minWidth: `${resolvedSize}px`,\n translate: children != null\n ? `${anchorOffset.horizontal * (anchorOrigin.horizontal === \"left\" ? 1 : -1)}px ${anchorOffset.vertical * (anchorOrigin.vertical === \"top\" ? 1 : -1)}px`\n : undefined,\n backgroundColor: isHex ? color : undefined,\n color: isHex\n ? isDark\n ? \"var(--puzzle-color-light-foreground)\"\n : \"var(--puzzle-color-dark-foreground)\"\n : undefined,\n }}\n >\n {content}\n </span>\n </Component>\n );\n};\n\nexport {\n Badge,\n type BadgeProps,\n type BadgeColor,\n type AnchorOrigin,\n type AnchorOffset,\n type AnchorOverlap,\n};\n"],"mappings":";;;;;AAkCA,MAAM,SAAS,EACb,SACA,OAAO,IACP,QAAQ,WACR,eAAe;CAAE,UAAU;CAAO,YAAY;AAAQ,GACtD,eAAe;CAAE,UAAU;CAAG,YAAY;AAAE,GAC5C,gBAAgB,eAChB,WACA,eACgB;CAChB,IAAI,CAAC,OAAO,SAAS,aAAa,QAAQ,KAAK,CAAC,OAAO,SAAS,aAAa,UAAU,GACrF,MAAM,IAAI,UAAU,mDAAmD;CAGzE,MAAM,eAAe,KAAK,IAAI,MAAM,EAAE;CACtC,MAAM,QAAQ,WAAW,KAAK;CAC9B,MAAM,SAAS,QAAQ,YAAY,KAAK,IAAI;CAE5C,MAAM,cACJ,OAAO,YAAY,YAAY,OAAO,YAAY,WAC9C,OAAO,OAAO,CAAC,CAAC,KAAK,IACrB;CACN,MAAM,oBACJ,eAAe,QAAQ,MAAM,KAAK,WAAW,CAAC,CAAC,WAAW;CAE5D,MAAM,UAAU,GACd,gBACA,YAAY,QAAQ;EAClB,aAAa;EACb,aAAa;EACb;CACF,GACA,YAAY,QAAQ,2BACpB,CAAC,SAAS,gBAAgB,SAC1B,SACF;CAIA,OACE,qBAHgB,YAAY,OAAO,SAAS,OAG5C;EAAW,WAAW;EAAtB,UAAA,CACG,UACD,oBAAC,QAAD;GACE,WAAW,GACT,0BACA,qBAAqB,gCACvB;GACA,OAAO;IACL,UAAU,sBAAsB,aAAa;IAC7C,WAAW,GAAG,aAAa;IAC3B,UAAU,GAAG,aAAa;IAC1B,WAAW,YAAY,OACnB,GAAG,aAAa,cAAc,aAAa,eAAe,SAAS,IAAI,IAAI,KAAK,aAAa,YAAY,aAAa,aAAa,QAAQ,IAAI,IAAI,MACnJ,KAAA;IACJ,iBAAiB,QAAQ,QAAQ,KAAA;IACjC,OAAO,QACH,SACE,yCACA,wCACF,KAAA;GACN;GAEC,UAAA;EACG,CAAA,CACG;;AAEf"}
@@ -0,0 +1,63 @@
1
+ .puzzle-grid {
2
+ grid-template-columns: var(--puzzle-grid-columns-mobile);
3
+ grid-template-rows: var(--puzzle-grid-rows-mobile);
4
+ row-gap: var(--puzzle-grid-row-gap-mobile);
5
+ column-gap: var(--puzzle-grid-column-gap-mobile);
6
+ justify-items: var(--puzzle-grid-align-h-mobile);
7
+ align-items: var(--puzzle-grid-align-v-mobile);
8
+ grid-auto-flow: var(--puzzle-grid-auto-flow-mobile);
9
+ min-width: 0;
10
+ display: grid;
11
+ }
12
+
13
+ .puzzle-grid > * {
14
+ min-width: 0;
15
+ }
16
+
17
+ .puzzle-grid-item {
18
+ grid-column: var(--puzzle-grid-item-column-start-mobile) / var(--puzzle-grid-item-column-end-mobile);
19
+ grid-row-end: var(--puzzle-grid-item-row-span-mobile);
20
+ grid-row-start: var(--puzzle-grid-item-row-start-mobile);
21
+ justify-self: var(--puzzle-grid-item-align-h-mobile);
22
+ align-self: var(--puzzle-grid-item-align-v-mobile);
23
+ }
24
+
25
+ @media (width >= 768px) {
26
+ .puzzle-grid {
27
+ grid-template-columns: var(--puzzle-grid-columns-tablet);
28
+ grid-template-rows: var(--puzzle-grid-rows-tablet);
29
+ row-gap: var(--puzzle-grid-row-gap-tablet);
30
+ column-gap: var(--puzzle-grid-column-gap-tablet);
31
+ justify-items: var(--puzzle-grid-align-h-tablet);
32
+ align-items: var(--puzzle-grid-align-v-tablet);
33
+ grid-auto-flow: var(--puzzle-grid-auto-flow-tablet);
34
+ }
35
+
36
+ .puzzle-grid-item {
37
+ grid-column: var(--puzzle-grid-item-column-start-tablet) / var(--puzzle-grid-item-column-end-tablet);
38
+ grid-row-end: var(--puzzle-grid-item-row-span-tablet);
39
+ grid-row-start: var(--puzzle-grid-item-row-start-tablet);
40
+ justify-self: var(--puzzle-grid-item-align-h-tablet);
41
+ align-self: var(--puzzle-grid-item-align-v-tablet);
42
+ }
43
+ }
44
+
45
+ @media (width >= 1024px) {
46
+ .puzzle-grid {
47
+ grid-template-columns: var(--puzzle-grid-columns-desktop);
48
+ grid-template-rows: var(--puzzle-grid-rows-desktop);
49
+ row-gap: var(--puzzle-grid-row-gap-desktop);
50
+ column-gap: var(--puzzle-grid-column-gap-desktop);
51
+ justify-items: var(--puzzle-grid-align-h-desktop);
52
+ align-items: var(--puzzle-grid-align-v-desktop);
53
+ grid-auto-flow: var(--puzzle-grid-auto-flow-desktop);
54
+ }
55
+
56
+ .puzzle-grid-item {
57
+ grid-column: var(--puzzle-grid-item-column-start-desktop) / var(--puzzle-grid-item-column-end-desktop);
58
+ grid-row-end: var(--puzzle-grid-item-row-span-desktop);
59
+ grid-row-start: var(--puzzle-grid-item-row-start-desktop);
60
+ justify-self: var(--puzzle-grid-item-align-h-desktop);
61
+ align-self: var(--puzzle-grid-item-align-v-desktop);
62
+ }
63
+ }
@@ -0,0 +1,65 @@
1
+ ;/* empty css */
2
+ let _puzzle_ui_core = require("@puzzle-ui/core");
3
+ let react = require("react");
4
+ // src/components/layout/grid/index.tsx
5
+ const responsiveStyle = (property, value, format = (value) => value) => {
6
+ const styles = {};
7
+ if (value === void 0) return styles;
8
+ let current = typeof value === "object" ? value.mobile : value;
9
+ for (const breakpoint of _puzzle_ui_core.BREAKPOINTS) {
10
+ if (typeof value === "object") current = value[breakpoint] ?? current;
11
+ styles[`--puzzle-grid-${property}-${breakpoint}`] = format(current);
12
+ }
13
+ return styles;
14
+ };
15
+ const positiveInteger = (value, prop) => {
16
+ if (!Number.isInteger(value) || value < 1) throw new RangeError(`Grid ${prop} must be a positive integer.`);
17
+ return value;
18
+ };
19
+ const tracks = (value) => typeof value === "number" ? `repeat(${positiveInteger(value, "columns/rows")}, minmax(0, 1fr))` : value;
20
+ const span = (value) => `span ${positiveInteger(value, "span")}`;
21
+ const line = (value) => {
22
+ if (typeof value === "number" && (!Number.isInteger(value) || value === 0)) throw new RangeError("Grid start lines must be non-zero integers or auto.");
23
+ return value;
24
+ };
25
+ const gaps = {
26
+ "0": "0",
27
+ xs: "var(--puzzle-space-1, 0.25rem)",
28
+ sm: "var(--puzzle-space-2, 0.5rem)",
29
+ md: "var(--puzzle-space-4, 1rem)",
30
+ lg: "var(--puzzle-space-8, 2rem)",
31
+ xl: "var(--puzzle-space-16, 4rem)"
32
+ };
33
+ const Grid = ({ as, columns = 1, rows = "none", minChildWidth, gap = "md", rowGap = gap, columnGap = gap, alignH = "stretch", alignV = "stretch", autoFlow = "row", children, className, style, ...props }) => (0, react.createElement)(as ?? "div", {
34
+ ...props,
35
+ className: (0, _puzzle_ui_core.cn)("puzzle-grid", className),
36
+ style: {
37
+ ...responsiveStyle("columns", columns, tracks),
38
+ ...responsiveStyle("columns", minChildWidth, (width) => `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`),
39
+ ...responsiveStyle("rows", rows, tracks),
40
+ ...responsiveStyle("row-gap", rowGap, (value) => gaps[value]),
41
+ ...responsiveStyle("column-gap", columnGap, (value) => gaps[value]),
42
+ ...responsiveStyle("align-h", alignH),
43
+ ...responsiveStyle("align-v", alignV),
44
+ ...responsiveStyle("auto-flow", autoFlow),
45
+ ...style
46
+ }
47
+ }, children);
48
+ const GridItem = ({ as, colSpan = 1, rowSpan = 1, colStart, rowStart = "auto", alignH = "auto", alignV = "auto", children, className, style, ...props }) => (0, react.createElement)(as ?? "div", {
49
+ ...props,
50
+ className: (0, _puzzle_ui_core.cn)("puzzle-grid-item", className),
51
+ style: {
52
+ ...responsiveStyle("item-column-end", colSpan, (value) => value === "full" ? "-1" : span(value)),
53
+ ...responsiveStyle("item-column-start", colSpan, (value) => value === "full" ? "1" : "auto"),
54
+ ...responsiveStyle("item-row-span", rowSpan, span),
55
+ ...responsiveStyle("item-column-start", colStart, line),
56
+ ...responsiveStyle("item-row-start", rowStart, line),
57
+ ...responsiveStyle("item-align-h", alignH),
58
+ ...responsiveStyle("item-align-v", alignV),
59
+ ...style
60
+ }
61
+ }, children);
62
+ exports.Grid = Grid;
63
+ exports.GridItem = GridItem;
64
+
65
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["BREAKPOINTS","createElement","cn"],"sources":["../../../../src/components/layout/grid/index.tsx"],"sourcesContent":["import { BREAKPOINTS, cn, type ResponsiveValue } from \"@puzzle-ui/core\";\nimport {\n createElement,\n type ComponentPropsWithRef,\n type CSSProperties,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport \"./grid.css\";\n\ntype GridGap = \"0\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\ntype GridAlignment = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype GridTracks = number | string;\ntype GridSpan = number | \"full\";\ntype GridLine = number | \"auto\";\ntype GridAutoFlow = NonNullable<CSSProperties[\"gridAutoFlow\"]>;\n\ntype RootProps<C extends ElementType> = {\n as?: C;\n children?: ReactNode;\n className?: string;\n style?: CSSProperties;\n};\n\ntype GridOwnProps<C extends ElementType> = RootProps<C> & {\n columns?: ResponsiveValue<GridTracks>;\n rows?: ResponsiveValue<GridTracks>;\n minChildWidth?: ResponsiveValue<string>;\n gap?: ResponsiveValue<GridGap>;\n rowGap?: ResponsiveValue<GridGap>;\n columnGap?: ResponsiveValue<GridGap>;\n alignH?: ResponsiveValue<GridAlignment>;\n alignV?: ResponsiveValue<GridAlignment>;\n autoFlow?: ResponsiveValue<GridAutoFlow>;\n};\n\ntype GridProps<C extends ElementType = \"div\"> = GridOwnProps<C> &\n Omit<ComponentPropsWithRef<C>, keyof GridOwnProps<C>>;\n\ntype GridItemOwnProps<C extends ElementType> = RootProps<C> & {\n colSpan?: ResponsiveValue<GridSpan>;\n rowSpan?: ResponsiveValue<number>;\n colStart?: ResponsiveValue<GridLine>;\n rowStart?: ResponsiveValue<GridLine>;\n alignH?: ResponsiveValue<GridAlignment | \"auto\">;\n alignV?: ResponsiveValue<GridAlignment | \"auto\">;\n};\n\ntype GridItemProps<C extends ElementType = \"div\"> = GridItemOwnProps<C> &\n Omit<ComponentPropsWithRef<C>, keyof GridItemOwnProps<C>>;\n\ntype GridStyle = CSSProperties &\n Record<`--puzzle-grid-${string}`, string | number | undefined>;\n\nconst responsiveStyle = <T extends string | number>(\n property: string,\n value: ResponsiveValue<T>,\n format: (value: T) => string | number = (value) => value,\n): GridStyle => {\n const styles: GridStyle = {};\n if (value === undefined) return styles;\n\n let current = typeof value === \"object\" ? value.mobile : value;\n for (const breakpoint of BREAKPOINTS) {\n if (typeof value === \"object\") {\n current = value[breakpoint] ?? current;\n }\n styles[`--puzzle-grid-${property}-${breakpoint}`] = format(current);\n }\n return styles;\n};\n\nconst positiveInteger = (value: number, prop: string) => {\n if (!Number.isInteger(value) || value < 1) {\n throw new RangeError(`Grid ${prop} must be a positive integer.`);\n }\n return value;\n};\n\nconst tracks = (value: GridTracks) =>\n typeof value === \"number\"\n ? `repeat(${positiveInteger(value, \"columns/rows\")}, minmax(0, 1fr))`\n : value;\n\nconst span = (value: number) => `span ${positiveInteger(value, \"span\")}`;\n\nconst line = (value: GridLine) => {\n if (typeof value === \"number\" && (!Number.isInteger(value) || value === 0)) {\n throw new RangeError(\"Grid start lines must be non-zero integers or auto.\");\n }\n return value;\n};\n\nconst gaps: Record<GridGap, string> = {\n \"0\": \"0\",\n xs: \"var(--puzzle-space-1, 0.25rem)\",\n sm: \"var(--puzzle-space-2, 0.5rem)\",\n md: \"var(--puzzle-space-4, 1rem)\",\n lg: \"var(--puzzle-space-8, 2rem)\",\n xl: \"var(--puzzle-space-16, 4rem)\",\n};\n\nconst Grid = <C extends ElementType = \"div\">({\n as,\n columns = 1,\n rows = \"none\",\n minChildWidth,\n gap = \"md\",\n rowGap = gap,\n columnGap = gap,\n alignH = \"stretch\",\n alignV = \"stretch\",\n autoFlow = \"row\",\n children,\n className,\n style,\n ...props\n}: GridProps<C>) =>\n createElement(\n as ?? \"div\",\n {\n ...props,\n className: cn(\"puzzle-grid\", className),\n style: {\n ...responsiveStyle(\"columns\", columns, tracks),\n ...responsiveStyle(\n \"columns\",\n minChildWidth,\n (width) => `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`,\n ),\n ...responsiveStyle(\"rows\", rows, tracks),\n ...responsiveStyle(\"row-gap\", rowGap, (value) => gaps[value]),\n ...responsiveStyle(\"column-gap\", columnGap, (value) => gaps[value]),\n ...responsiveStyle(\"align-h\", alignH),\n ...responsiveStyle(\"align-v\", alignV),\n ...responsiveStyle(\"auto-flow\", autoFlow),\n ...style,\n },\n },\n children,\n );\n\nconst GridItem = <C extends ElementType = \"div\">({\n as,\n colSpan = 1,\n rowSpan = 1,\n colStart,\n rowStart = \"auto\",\n alignH = \"auto\",\n alignV = \"auto\",\n children,\n className,\n style,\n ...props\n}: GridItemProps<C>) =>\n createElement(\n as ?? \"div\",\n {\n ...props,\n className: cn(\"puzzle-grid-item\", className),\n style: {\n ...responsiveStyle(\"item-column-end\", colSpan, (value) =>\n value === \"full\" ? \"-1\" : span(value),\n ),\n ...responsiveStyle(\"item-column-start\", colSpan, (value) =>\n value === \"full\" ? \"1\" : \"auto\",\n ),\n ...responsiveStyle(\"item-row-span\", rowSpan, span),\n ...responsiveStyle(\"item-column-start\", colStart, line),\n ...responsiveStyle(\"item-row-start\", rowStart, line),\n ...responsiveStyle(\"item-align-h\", alignH),\n ...responsiveStyle(\"item-align-v\", alignV),\n ...style,\n },\n },\n children,\n );\n\nexport {\n Grid,\n GridItem,\n type GridProps,\n type GridItemProps,\n type GridGap,\n type GridAlignment,\n type GridTracks,\n type GridSpan,\n type GridLine,\n type GridAutoFlow,\n};\n"],"mappings":";;;;AAsDA,MAAM,mBACJ,UACA,OACA,UAAyC,UAAU,UACrC;CACd,MAAM,SAAoB,CAAC;CAC3B,IAAI,UAAU,KAAA,GAAW,OAAO;CAEhC,IAAI,UAAU,OAAO,UAAU,WAAW,MAAM,SAAS;CACzD,KAAK,MAAM,cAAcA,gBAAAA,aAAa;EACpC,IAAI,OAAO,UAAU,UACnB,UAAU,MAAM,eAAe;EAEjC,OAAO,iBAAiB,SAAS,GAAG,gBAAgB,OAAO,OAAO;CACpE;CACA,OAAO;AACT;AAEA,MAAM,mBAAmB,OAAe,SAAiB;CACvD,IAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,GACtC,MAAM,IAAI,WAAW,QAAQ,KAAK,6BAA6B;CAEjE,OAAO;AACT;AAEA,MAAM,UAAU,UACd,OAAO,UAAU,WACb,UAAU,gBAAgB,OAAO,cAAc,EAAE,qBACjD;AAEN,MAAM,QAAQ,UAAkB,QAAQ,gBAAgB,OAAO,MAAM;AAErE,MAAM,QAAQ,UAAoB;CAChC,IAAI,OAAO,UAAU,aAAa,CAAC,OAAO,UAAU,KAAK,KAAK,UAAU,IACtE,MAAM,IAAI,WAAW,qDAAqD;CAE5E,OAAO;AACT;AAEA,MAAM,OAAgC;CACpC,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,QAAuC,EAC3C,IACA,UAAU,GACV,OAAO,QACP,eACA,MAAM,MACN,SAAS,KACT,YAAY,KACZ,SAAS,WACT,SAAS,WACT,WAAW,OACX,UACA,WACA,OACA,GAAG,aAAA,GAEHC,MAAAA,cAAAA,CACE,MAAM,OACN;CACE,GAAG;CACH,YAAA,GAAWC,gBAAAA,GAAAA,CAAG,eAAe,SAAS;CACtC,OAAO;EACL,GAAG,gBAAgB,WAAW,SAAS,MAAM;EAC7C,GAAG,gBACD,WACA,gBACC,UAAU,qCAAqC,MAAM,SACxD;EACA,GAAG,gBAAgB,QAAQ,MAAM,MAAM;EACvC,GAAG,gBAAgB,WAAW,SAAS,UAAU,KAAK,MAAM;EAC5D,GAAG,gBAAgB,cAAc,YAAY,UAAU,KAAK,MAAM;EAClE,GAAG,gBAAgB,WAAW,MAAM;EACpC,GAAG,gBAAgB,WAAW,MAAM;EACpC,GAAG,gBAAgB,aAAa,QAAQ;EACxC,GAAG;CACL;AACF,GACA,QACF;AAEF,MAAM,YAA2C,EAC/C,IACA,UAAU,GACV,UAAU,GACV,UACA,WAAW,QACX,SAAS,QACT,SAAS,QACT,UACA,WACA,OACA,GAAG,aAAA,GAEHD,MAAAA,cAAAA,CACE,MAAM,OACN;CACE,GAAG;CACH,YAAA,GAAWC,gBAAAA,GAAAA,CAAG,oBAAoB,SAAS;CAC3C,OAAO;EACL,GAAG,gBAAgB,mBAAmB,UAAU,UAC9C,UAAU,SAAS,OAAO,KAAK,KAAK,CACtC;EACA,GAAG,gBAAgB,qBAAqB,UAAU,UAChD,UAAU,SAAS,MAAM,MAC3B;EACA,GAAG,gBAAgB,iBAAiB,SAAS,IAAI;EACjD,GAAG,gBAAgB,qBAAqB,UAAU,IAAI;EACtD,GAAG,gBAAgB,kBAAkB,UAAU,IAAI;EACnD,GAAG,gBAAgB,gBAAgB,MAAM;EACzC,GAAG,gBAAgB,gBAAgB,MAAM;EACzC,GAAG;CACL;AACF,GACA,QACF"}
@@ -0,0 +1,38 @@
1
+ import { CSSProperties, ComponentPropsWithRef, ElementType, ReactNode } from "react";
2
+ import { ResponsiveValue } from "@puzzle-ui/core";
3
+ type GridGap = "0" | "xs" | "sm" | "md" | "lg" | "xl";
4
+ type GridAlignment = "start" | "center" | "end" | "stretch";
5
+ type GridTracks = number | string;
6
+ type GridSpan = number | "full";
7
+ type GridLine = number | "auto";
8
+ type GridAutoFlow = NonNullable<CSSProperties["gridAutoFlow"]>;
9
+ type RootProps<C extends ElementType> = {
10
+ as?: C;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ };
15
+ type GridOwnProps<C extends ElementType> = RootProps<C> & {
16
+ columns?: ResponsiveValue<GridTracks>;
17
+ rows?: ResponsiveValue<GridTracks>;
18
+ minChildWidth?: ResponsiveValue<string>;
19
+ gap?: ResponsiveValue<GridGap>;
20
+ rowGap?: ResponsiveValue<GridGap>;
21
+ columnGap?: ResponsiveValue<GridGap>;
22
+ alignH?: ResponsiveValue<GridAlignment>;
23
+ alignV?: ResponsiveValue<GridAlignment>;
24
+ autoFlow?: ResponsiveValue<GridAutoFlow>;
25
+ };
26
+ type GridProps<C extends ElementType = "div"> = GridOwnProps<C> & Omit<ComponentPropsWithRef<C>, keyof GridOwnProps<C>>;
27
+ type GridItemOwnProps<C extends ElementType> = RootProps<C> & {
28
+ colSpan?: ResponsiveValue<GridSpan>;
29
+ rowSpan?: ResponsiveValue<number>;
30
+ colStart?: ResponsiveValue<GridLine>;
31
+ rowStart?: ResponsiveValue<GridLine>;
32
+ alignH?: ResponsiveValue<GridAlignment | "auto">;
33
+ alignV?: ResponsiveValue<GridAlignment | "auto">;
34
+ };
35
+ type GridItemProps<C extends ElementType = "div"> = GridItemOwnProps<C> & Omit<ComponentPropsWithRef<C>, keyof GridItemOwnProps<C>>;
36
+ declare const Grid: <C extends ElementType = "div">({ as, columns, rows, minChildWidth, gap, rowGap, columnGap, alignH, alignV, autoFlow, children, className, style, ...props }: GridProps<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
37
+ declare const GridItem: <C extends ElementType = "div">({ as, colSpan, rowSpan, colStart, rowStart, alignH, alignV, children, className, style, ...props }: GridItemProps<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
38
+ export { Grid, type GridAlignment, type GridAutoFlow, type GridGap, GridItem, type GridItemProps, type GridLine, type GridProps, type GridSpan, type GridTracks };
@@ -0,0 +1,38 @@
1
+ import { ResponsiveValue } from "@puzzle-ui/core";
2
+ import { CSSProperties, ComponentPropsWithRef, ElementType, ReactNode } from "react";
3
+ type GridGap = "0" | "xs" | "sm" | "md" | "lg" | "xl";
4
+ type GridAlignment = "start" | "center" | "end" | "stretch";
5
+ type GridTracks = number | string;
6
+ type GridSpan = number | "full";
7
+ type GridLine = number | "auto";
8
+ type GridAutoFlow = NonNullable<CSSProperties["gridAutoFlow"]>;
9
+ type RootProps<C extends ElementType> = {
10
+ as?: C;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ };
15
+ type GridOwnProps<C extends ElementType> = RootProps<C> & {
16
+ columns?: ResponsiveValue<GridTracks>;
17
+ rows?: ResponsiveValue<GridTracks>;
18
+ minChildWidth?: ResponsiveValue<string>;
19
+ gap?: ResponsiveValue<GridGap>;
20
+ rowGap?: ResponsiveValue<GridGap>;
21
+ columnGap?: ResponsiveValue<GridGap>;
22
+ alignH?: ResponsiveValue<GridAlignment>;
23
+ alignV?: ResponsiveValue<GridAlignment>;
24
+ autoFlow?: ResponsiveValue<GridAutoFlow>;
25
+ };
26
+ type GridProps<C extends ElementType = "div"> = GridOwnProps<C> & Omit<ComponentPropsWithRef<C>, keyof GridOwnProps<C>>;
27
+ type GridItemOwnProps<C extends ElementType> = RootProps<C> & {
28
+ colSpan?: ResponsiveValue<GridSpan>;
29
+ rowSpan?: ResponsiveValue<number>;
30
+ colStart?: ResponsiveValue<GridLine>;
31
+ rowStart?: ResponsiveValue<GridLine>;
32
+ alignH?: ResponsiveValue<GridAlignment | "auto">;
33
+ alignV?: ResponsiveValue<GridAlignment | "auto">;
34
+ };
35
+ type GridItemProps<C extends ElementType = "div"> = GridItemOwnProps<C> & Omit<ComponentPropsWithRef<C>, keyof GridItemOwnProps<C>>;
36
+ declare const Grid: <C extends ElementType = "div">({ as, columns, rows, minChildWidth, gap, rowGap, columnGap, alignH, alignV, autoFlow, children, className, style, ...props }: GridProps<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
37
+ declare const GridItem: <C extends ElementType = "div">({ as, colSpan, rowSpan, colStart, rowStart, alignH, alignV, children, className, style, ...props }: GridItemProps<C>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
38
+ export { Grid, type GridAlignment, type GridAutoFlow, type GridGap, GridItem, type GridItemProps, type GridLine, type GridProps, type GridSpan, type GridTracks };
@@ -0,0 +1,64 @@
1
+ import "./grid.css";
2
+ import { BREAKPOINTS, cn } from "@puzzle-ui/core";
3
+ import { createElement } from "react";
4
+ // src/components/layout/grid/index.tsx
5
+ const responsiveStyle = (property, value, format = (value) => value) => {
6
+ const styles = {};
7
+ if (value === void 0) return styles;
8
+ let current = typeof value === "object" ? value.mobile : value;
9
+ for (const breakpoint of BREAKPOINTS) {
10
+ if (typeof value === "object") current = value[breakpoint] ?? current;
11
+ styles[`--puzzle-grid-${property}-${breakpoint}`] = format(current);
12
+ }
13
+ return styles;
14
+ };
15
+ const positiveInteger = (value, prop) => {
16
+ if (!Number.isInteger(value) || value < 1) throw new RangeError(`Grid ${prop} must be a positive integer.`);
17
+ return value;
18
+ };
19
+ const tracks = (value) => typeof value === "number" ? `repeat(${positiveInteger(value, "columns/rows")}, minmax(0, 1fr))` : value;
20
+ const span = (value) => `span ${positiveInteger(value, "span")}`;
21
+ const line = (value) => {
22
+ if (typeof value === "number" && (!Number.isInteger(value) || value === 0)) throw new RangeError("Grid start lines must be non-zero integers or auto.");
23
+ return value;
24
+ };
25
+ const gaps = {
26
+ "0": "0",
27
+ xs: "var(--puzzle-space-1, 0.25rem)",
28
+ sm: "var(--puzzle-space-2, 0.5rem)",
29
+ md: "var(--puzzle-space-4, 1rem)",
30
+ lg: "var(--puzzle-space-8, 2rem)",
31
+ xl: "var(--puzzle-space-16, 4rem)"
32
+ };
33
+ const Grid = ({ as, columns = 1, rows = "none", minChildWidth, gap = "md", rowGap = gap, columnGap = gap, alignH = "stretch", alignV = "stretch", autoFlow = "row", children, className, style, ...props }) => createElement(as ?? "div", {
34
+ ...props,
35
+ className: cn("puzzle-grid", className),
36
+ style: {
37
+ ...responsiveStyle("columns", columns, tracks),
38
+ ...responsiveStyle("columns", minChildWidth, (width) => `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`),
39
+ ...responsiveStyle("rows", rows, tracks),
40
+ ...responsiveStyle("row-gap", rowGap, (value) => gaps[value]),
41
+ ...responsiveStyle("column-gap", columnGap, (value) => gaps[value]),
42
+ ...responsiveStyle("align-h", alignH),
43
+ ...responsiveStyle("align-v", alignV),
44
+ ...responsiveStyle("auto-flow", autoFlow),
45
+ ...style
46
+ }
47
+ }, children);
48
+ const GridItem = ({ as, colSpan = 1, rowSpan = 1, colStart, rowStart = "auto", alignH = "auto", alignV = "auto", children, className, style, ...props }) => createElement(as ?? "div", {
49
+ ...props,
50
+ className: cn("puzzle-grid-item", className),
51
+ style: {
52
+ ...responsiveStyle("item-column-end", colSpan, (value) => value === "full" ? "-1" : span(value)),
53
+ ...responsiveStyle("item-column-start", colSpan, (value) => value === "full" ? "1" : "auto"),
54
+ ...responsiveStyle("item-row-span", rowSpan, span),
55
+ ...responsiveStyle("item-column-start", colStart, line),
56
+ ...responsiveStyle("item-row-start", rowStart, line),
57
+ ...responsiveStyle("item-align-h", alignH),
58
+ ...responsiveStyle("item-align-v", alignV),
59
+ ...style
60
+ }
61
+ }, children);
62
+ export { Grid, GridItem };
63
+
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/layout/grid/index.tsx"],"sourcesContent":["import { BREAKPOINTS, cn, type ResponsiveValue } from \"@puzzle-ui/core\";\nimport {\n createElement,\n type ComponentPropsWithRef,\n type CSSProperties,\n type ElementType,\n type ReactNode,\n} from \"react\";\nimport \"./grid.css\";\n\ntype GridGap = \"0\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\ntype GridAlignment = \"start\" | \"center\" | \"end\" | \"stretch\";\ntype GridTracks = number | string;\ntype GridSpan = number | \"full\";\ntype GridLine = number | \"auto\";\ntype GridAutoFlow = NonNullable<CSSProperties[\"gridAutoFlow\"]>;\n\ntype RootProps<C extends ElementType> = {\n as?: C;\n children?: ReactNode;\n className?: string;\n style?: CSSProperties;\n};\n\ntype GridOwnProps<C extends ElementType> = RootProps<C> & {\n columns?: ResponsiveValue<GridTracks>;\n rows?: ResponsiveValue<GridTracks>;\n minChildWidth?: ResponsiveValue<string>;\n gap?: ResponsiveValue<GridGap>;\n rowGap?: ResponsiveValue<GridGap>;\n columnGap?: ResponsiveValue<GridGap>;\n alignH?: ResponsiveValue<GridAlignment>;\n alignV?: ResponsiveValue<GridAlignment>;\n autoFlow?: ResponsiveValue<GridAutoFlow>;\n};\n\ntype GridProps<C extends ElementType = \"div\"> = GridOwnProps<C> &\n Omit<ComponentPropsWithRef<C>, keyof GridOwnProps<C>>;\n\ntype GridItemOwnProps<C extends ElementType> = RootProps<C> & {\n colSpan?: ResponsiveValue<GridSpan>;\n rowSpan?: ResponsiveValue<number>;\n colStart?: ResponsiveValue<GridLine>;\n rowStart?: ResponsiveValue<GridLine>;\n alignH?: ResponsiveValue<GridAlignment | \"auto\">;\n alignV?: ResponsiveValue<GridAlignment | \"auto\">;\n};\n\ntype GridItemProps<C extends ElementType = \"div\"> = GridItemOwnProps<C> &\n Omit<ComponentPropsWithRef<C>, keyof GridItemOwnProps<C>>;\n\ntype GridStyle = CSSProperties &\n Record<`--puzzle-grid-${string}`, string | number | undefined>;\n\nconst responsiveStyle = <T extends string | number>(\n property: string,\n value: ResponsiveValue<T>,\n format: (value: T) => string | number = (value) => value,\n): GridStyle => {\n const styles: GridStyle = {};\n if (value === undefined) return styles;\n\n let current = typeof value === \"object\" ? value.mobile : value;\n for (const breakpoint of BREAKPOINTS) {\n if (typeof value === \"object\") {\n current = value[breakpoint] ?? current;\n }\n styles[`--puzzle-grid-${property}-${breakpoint}`] = format(current);\n }\n return styles;\n};\n\nconst positiveInteger = (value: number, prop: string) => {\n if (!Number.isInteger(value) || value < 1) {\n throw new RangeError(`Grid ${prop} must be a positive integer.`);\n }\n return value;\n};\n\nconst tracks = (value: GridTracks) =>\n typeof value === \"number\"\n ? `repeat(${positiveInteger(value, \"columns/rows\")}, minmax(0, 1fr))`\n : value;\n\nconst span = (value: number) => `span ${positiveInteger(value, \"span\")}`;\n\nconst line = (value: GridLine) => {\n if (typeof value === \"number\" && (!Number.isInteger(value) || value === 0)) {\n throw new RangeError(\"Grid start lines must be non-zero integers or auto.\");\n }\n return value;\n};\n\nconst gaps: Record<GridGap, string> = {\n \"0\": \"0\",\n xs: \"var(--puzzle-space-1, 0.25rem)\",\n sm: \"var(--puzzle-space-2, 0.5rem)\",\n md: \"var(--puzzle-space-4, 1rem)\",\n lg: \"var(--puzzle-space-8, 2rem)\",\n xl: \"var(--puzzle-space-16, 4rem)\",\n};\n\nconst Grid = <C extends ElementType = \"div\">({\n as,\n columns = 1,\n rows = \"none\",\n minChildWidth,\n gap = \"md\",\n rowGap = gap,\n columnGap = gap,\n alignH = \"stretch\",\n alignV = \"stretch\",\n autoFlow = \"row\",\n children,\n className,\n style,\n ...props\n}: GridProps<C>) =>\n createElement(\n as ?? \"div\",\n {\n ...props,\n className: cn(\"puzzle-grid\", className),\n style: {\n ...responsiveStyle(\"columns\", columns, tracks),\n ...responsiveStyle(\n \"columns\",\n minChildWidth,\n (width) => `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`,\n ),\n ...responsiveStyle(\"rows\", rows, tracks),\n ...responsiveStyle(\"row-gap\", rowGap, (value) => gaps[value]),\n ...responsiveStyle(\"column-gap\", columnGap, (value) => gaps[value]),\n ...responsiveStyle(\"align-h\", alignH),\n ...responsiveStyle(\"align-v\", alignV),\n ...responsiveStyle(\"auto-flow\", autoFlow),\n ...style,\n },\n },\n children,\n );\n\nconst GridItem = <C extends ElementType = \"div\">({\n as,\n colSpan = 1,\n rowSpan = 1,\n colStart,\n rowStart = \"auto\",\n alignH = \"auto\",\n alignV = \"auto\",\n children,\n className,\n style,\n ...props\n}: GridItemProps<C>) =>\n createElement(\n as ?? \"div\",\n {\n ...props,\n className: cn(\"puzzle-grid-item\", className),\n style: {\n ...responsiveStyle(\"item-column-end\", colSpan, (value) =>\n value === \"full\" ? \"-1\" : span(value),\n ),\n ...responsiveStyle(\"item-column-start\", colSpan, (value) =>\n value === \"full\" ? \"1\" : \"auto\",\n ),\n ...responsiveStyle(\"item-row-span\", rowSpan, span),\n ...responsiveStyle(\"item-column-start\", colStart, line),\n ...responsiveStyle(\"item-row-start\", rowStart, line),\n ...responsiveStyle(\"item-align-h\", alignH),\n ...responsiveStyle(\"item-align-v\", alignV),\n ...style,\n },\n },\n children,\n );\n\nexport {\n Grid,\n GridItem,\n type GridProps,\n type GridItemProps,\n type GridGap,\n type GridAlignment,\n type GridTracks,\n type GridSpan,\n type GridLine,\n type GridAutoFlow,\n};\n"],"mappings":";;;;AAsDA,MAAM,mBACJ,UACA,OACA,UAAyC,UAAU,UACrC;CACd,MAAM,SAAoB,CAAC;CAC3B,IAAI,UAAU,KAAA,GAAW,OAAO;CAEhC,IAAI,UAAU,OAAO,UAAU,WAAW,MAAM,SAAS;CACzD,KAAK,MAAM,cAAc,aAAa;EACpC,IAAI,OAAO,UAAU,UACnB,UAAU,MAAM,eAAe;EAEjC,OAAO,iBAAiB,SAAS,GAAG,gBAAgB,OAAO,OAAO;CACpE;CACA,OAAO;AACT;AAEA,MAAM,mBAAmB,OAAe,SAAiB;CACvD,IAAI,CAAC,OAAO,UAAU,KAAK,KAAK,QAAQ,GACtC,MAAM,IAAI,WAAW,QAAQ,KAAK,6BAA6B;CAEjE,OAAO;AACT;AAEA,MAAM,UAAU,UACd,OAAO,UAAU,WACb,UAAU,gBAAgB,OAAO,cAAc,EAAE,qBACjD;AAEN,MAAM,QAAQ,UAAkB,QAAQ,gBAAgB,OAAO,MAAM;AAErE,MAAM,QAAQ,UAAoB;CAChC,IAAI,OAAO,UAAU,aAAa,CAAC,OAAO,UAAU,KAAK,KAAK,UAAU,IACtE,MAAM,IAAI,WAAW,qDAAqD;CAE5E,OAAO;AACT;AAEA,MAAM,OAAgC;CACpC,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,QAAuC,EAC3C,IACA,UAAU,GACV,OAAO,QACP,eACA,MAAM,MACN,SAAS,KACT,YAAY,KACZ,SAAS,WACT,SAAS,WACT,WAAW,OACX,UACA,WACA,OACA,GAAG,YAEH,cACE,MAAM,OACN;CACE,GAAG;CACH,WAAW,GAAG,eAAe,SAAS;CACtC,OAAO;EACL,GAAG,gBAAgB,WAAW,SAAS,MAAM;EAC7C,GAAG,gBACD,WACA,gBACC,UAAU,qCAAqC,MAAM,SACxD;EACA,GAAG,gBAAgB,QAAQ,MAAM,MAAM;EACvC,GAAG,gBAAgB,WAAW,SAAS,UAAU,KAAK,MAAM;EAC5D,GAAG,gBAAgB,cAAc,YAAY,UAAU,KAAK,MAAM;EAClE,GAAG,gBAAgB,WAAW,MAAM;EACpC,GAAG,gBAAgB,WAAW,MAAM;EACpC,GAAG,gBAAgB,aAAa,QAAQ;EACxC,GAAG;CACL;AACF,GACA,QACF;AAEF,MAAM,YAA2C,EAC/C,IACA,UAAU,GACV,UAAU,GACV,UACA,WAAW,QACX,SAAS,QACT,SAAS,QACT,UACA,WACA,OACA,GAAG,YAEH,cACE,MAAM,OACN;CACE,GAAG;CACH,WAAW,GAAG,oBAAoB,SAAS;CAC3C,OAAO;EACL,GAAG,gBAAgB,mBAAmB,UAAU,UAC9C,UAAU,SAAS,OAAO,KAAK,KAAK,CACtC;EACA,GAAG,gBAAgB,qBAAqB,UAAU,UAChD,UAAU,SAAS,MAAM,MAC3B;EACA,GAAG,gBAAgB,iBAAiB,SAAS,IAAI;EACjD,GAAG,gBAAgB,qBAAqB,UAAU,IAAI;EACtD,GAAG,gBAAgB,kBAAkB,UAAU,IAAI;EACnD,GAAG,gBAAgB,gBAAgB,MAAM;EACzC,GAAG,gBAAgB,gBAAgB,MAAM;EACzC,GAAG;CACL;AACF,GACA,QACF"}
package/dist/index.cjs CHANGED
@@ -41,31 +41,32 @@ const require_index$30 = require("./components/layout/bottom-navigation/index.cj
41
41
  const require_index$31 = require("./components/layout/breadcrumbs/index.cjs");
42
42
  const require_index$32 = require("./components/layout/collapsable-sidebar/index.cjs");
43
43
  const require_index$33 = require("./components/layout/container/index.cjs");
44
- const require_index$34 = require("./components/layout/page-layout/index.cjs");
45
- const require_index$35 = require("./components/layout/resizable-panels/index.cjs");
46
- const require_index$36 = require("./components/layout/scroll-area/index.cjs");
47
- const require_index$37 = require("./components/layout/section/index.cjs");
48
- const require_index$38 = require("./components/layout/section-stack/index.cjs");
49
- const require_index$39 = require("./components/layout/separator/index.cjs");
50
- const require_index$40 = require("./components/layout/sidebar/index.cjs");
51
- const require_index$41 = require("./components/layout/stack/index.cjs");
52
- const require_index$42 = require("./components/navigation/accordion/index.cjs");
53
- const require_index$43 = require("./components/navigation/carousel/index.cjs");
44
+ const require_index$34 = require("./components/layout/grid/index.cjs");
45
+ const require_index$35 = require("./components/layout/page-layout/index.cjs");
46
+ const require_index$36 = require("./components/layout/resizable-panels/index.cjs");
47
+ const require_index$37 = require("./components/layout/scroll-area/index.cjs");
48
+ const require_index$38 = require("./components/layout/section/index.cjs");
49
+ const require_index$39 = require("./components/layout/section-stack/index.cjs");
50
+ const require_index$40 = require("./components/layout/separator/index.cjs");
51
+ const require_index$41 = require("./components/layout/sidebar/index.cjs");
52
+ const require_index$42 = require("./components/layout/stack/index.cjs");
53
+ const require_index$43 = require("./components/navigation/accordion/index.cjs");
54
+ const require_index$44 = require("./components/navigation/carousel/index.cjs");
54
55
  const require_controller = require("./components/navigation/carousel/controller.cjs");
55
- const require_index$44 = require("./components/navigation/link/index.cjs");
56
- const require_index$45 = require("./components/navigation/pagination/index.cjs");
57
- const require_index$46 = require("./components/navigation/tabs/index.cjs");
58
- const require_index$47 = require("./components/navigation/tree-view/index.cjs");
59
- const require_index$48 = require("./components/overlays/backdrop/index.cjs");
60
- const require_index$49 = require("./components/overlays/command/index.cjs");
61
- const require_index$50 = require("./components/overlays/context-menu/index.cjs");
62
- const require_index$51 = require("./components/overlays/dialog/index.cjs");
63
- const require_index$52 = require("./components/overlays/drawer/index.cjs");
64
- const require_index$53 = require("./components/overlays/dropdown-menu/index.cjs");
65
- const require_index$54 = require("./components/overlays/notification/index.cjs");
66
- const require_index$55 = require("./components/overlays/popout/index.cjs");
67
- const require_index$56 = require("./components/overlays/portal/index.cjs");
68
- const require_index$57 = require("./components/overlays/popover/index.cjs");
56
+ const require_index$45 = require("./components/navigation/link/index.cjs");
57
+ const require_index$46 = require("./components/navigation/pagination/index.cjs");
58
+ const require_index$47 = require("./components/navigation/tabs/index.cjs");
59
+ const require_index$48 = require("./components/navigation/tree-view/index.cjs");
60
+ const require_index$49 = require("./components/overlays/backdrop/index.cjs");
61
+ const require_index$50 = require("./components/overlays/command/index.cjs");
62
+ const require_index$51 = require("./components/overlays/context-menu/index.cjs");
63
+ const require_index$52 = require("./components/overlays/dialog/index.cjs");
64
+ const require_index$53 = require("./components/overlays/drawer/index.cjs");
65
+ const require_index$54 = require("./components/overlays/dropdown-menu/index.cjs");
66
+ const require_index$55 = require("./components/overlays/notification/index.cjs");
67
+ const require_index$56 = require("./components/overlays/popout/index.cjs");
68
+ const require_index$57 = require("./components/overlays/portal/index.cjs");
69
+ const require_index$58 = require("./components/overlays/popover/index.cjs");
69
70
  const require_dropdown_menu_content = require("./components/overlays/dropdown-menu/dropdown-menu-content.cjs");
70
71
  const require_dropdown_menu_trigger = require("./components/overlays/dropdown-menu/dropdown-menu-trigger.cjs");
71
72
  const require_dropdown_menu_items = require("./components/overlays/dropdown-menu/dropdown-menu-items.cjs");
@@ -73,19 +74,19 @@ const require_dropdown_menu_radio = require("./components/overlays/dropdown-menu
73
74
  const require_target = require("./components/overlays/portal/target.cjs");
74
75
  const require_notification_provider = require("./components/overlays/notification/notification-provider.cjs");
75
76
  const require_use_notification = require("./components/overlays/notification/use-notification.cjs");
76
- const require_index$58 = require("./components/overlays/tooltip/index.cjs");
77
+ const require_index$59 = require("./components/overlays/tooltip/index.cjs");
77
78
  const require_text = require("./components/typography/text.cjs");
78
79
  const require_heading = require("./components/typography/heading.cjs");
79
- const require_index$59 = require("./components/utilities/preview/index.cjs");
80
- const require_index$60 = require("./components/utilities/scroll-lock/index.cjs");
81
- const require_index$61 = require("./components/utilities/transition/index.cjs");
82
- exports.Accordion = require_index$42.Accordion;
80
+ const require_index$60 = require("./components/utilities/preview/index.cjs");
81
+ const require_index$61 = require("./components/utilities/scroll-lock/index.cjs");
82
+ const require_index$62 = require("./components/utilities/transition/index.cjs");
83
+ exports.Accordion = require_index$43.Accordion;
83
84
  exports.Alert = require_index$3.Alert;
84
85
  exports.AppBar = require_index$27.AppBar;
85
86
  exports.AspectRatio = require_index$28.AspectRatio;
86
87
  exports.Autocomplete = require_index$13.Autocomplete;
87
88
  exports.Avatar = require_index$4.Avatar;
88
- exports.Backdrop = require_index$48.Backdrop;
89
+ exports.Backdrop = require_index$49.Backdrop;
89
90
  exports.Background = require_index$29.Background;
90
91
  exports.Badge = require_index$5.Badge;
91
92
  exports.BottomNavigation = require_index$30.BottomNavigation;
@@ -101,32 +102,32 @@ exports.CardFooter = require_index$6.CardFooter;
101
102
  exports.CardHeader = require_index$6.CardHeader;
102
103
  exports.CardMedia = require_index$6.CardMedia;
103
104
  exports.CardTitle = require_index$6.CardTitle;
104
- exports.Carousel = require_index$43.Carousel;
105
+ exports.Carousel = require_index$44.Carousel;
105
106
  exports.CarouselController = require_controller.CarouselController;
106
107
  exports.Checkbox = require_index$14.Checkbox;
107
108
  exports.CircularProgress = require_circular_progress.CircularProgress;
108
109
  exports.CollapsableSidebar = require_index$32.CollapsableSidebar;
109
110
  exports.ColorPicker = require_index$15.ColorPicker;
110
- exports.Command = require_index$49.Command;
111
- exports.CommandDialog = require_index$49.CommandDialog;
111
+ exports.Command = require_index$50.Command;
112
+ exports.CommandDialog = require_index$50.CommandDialog;
112
113
  exports.Container = require_index$33.Container;
113
- exports.ContextMenu = require_index$50.ContextMenu;
114
- exports.ContextMenuCheckboxItem = require_index$50.ContextMenuCheckboxItem;
115
- exports.ContextMenuContent = require_index$50.ContextMenuContent;
116
- exports.ContextMenuGroup = require_index$50.ContextMenuGroup;
117
- exports.ContextMenuItem = require_index$50.ContextMenuItem;
118
- exports.ContextMenuLabel = require_index$50.ContextMenuLabel;
119
- exports.ContextMenuRadioGroup = require_index$50.ContextMenuRadioGroup;
120
- exports.ContextMenuRadioItem = require_index$50.ContextMenuRadioItem;
121
- exports.ContextMenuSeparator = require_index$50.ContextMenuSeparator;
122
- exports.ContextMenuSub = require_index$50.ContextMenuSub;
123
- exports.ContextMenuSubContent = require_index$50.ContextMenuSubContent;
124
- exports.ContextMenuSubTrigger = require_index$50.ContextMenuSubTrigger;
125
- exports.ContextMenuTrigger = require_index$50.ContextMenuTrigger;
114
+ exports.ContextMenu = require_index$51.ContextMenu;
115
+ exports.ContextMenuCheckboxItem = require_index$51.ContextMenuCheckboxItem;
116
+ exports.ContextMenuContent = require_index$51.ContextMenuContent;
117
+ exports.ContextMenuGroup = require_index$51.ContextMenuGroup;
118
+ exports.ContextMenuItem = require_index$51.ContextMenuItem;
119
+ exports.ContextMenuLabel = require_index$51.ContextMenuLabel;
120
+ exports.ContextMenuRadioGroup = require_index$51.ContextMenuRadioGroup;
121
+ exports.ContextMenuRadioItem = require_index$51.ContextMenuRadioItem;
122
+ exports.ContextMenuSeparator = require_index$51.ContextMenuSeparator;
123
+ exports.ContextMenuSub = require_index$51.ContextMenuSub;
124
+ exports.ContextMenuSubContent = require_index$51.ContextMenuSubContent;
125
+ exports.ContextMenuSubTrigger = require_index$51.ContextMenuSubTrigger;
126
+ exports.ContextMenuTrigger = require_index$51.ContextMenuTrigger;
126
127
  exports.DatePicker = require_index$16.DatePicker;
127
- exports.Dialog = require_index$51.Dialog;
128
- exports.Drawer = require_index$52.Drawer;
129
- exports.DropdownMenu = require_index$53.DropdownMenu;
128
+ exports.Dialog = require_index$52.Dialog;
129
+ exports.Drawer = require_index$53.Drawer;
130
+ exports.DropdownMenu = require_index$54.DropdownMenu;
130
131
  exports.DropdownMenuCheckboxItem = require_dropdown_menu_items.DropdownMenuCheckboxItem;
131
132
  exports.DropdownMenuContent = require_dropdown_menu_content.DropdownMenuContent;
132
133
  exports.DropdownMenuGroup = require_dropdown_menu_items.DropdownMenuGroup;
@@ -144,44 +145,46 @@ exports.EmptyStateMedia = require_index$7.EmptyStateMedia;
144
145
  exports.EmptyStateTitle = require_index$7.EmptyStateTitle;
145
146
  exports.FileUpload = require_index$17.FileUpload;
146
147
  exports.FormField = require_index$18.FormField;
148
+ exports.Grid = require_index$34.Grid;
149
+ exports.GridItem = require_index$34.GridItem;
147
150
  exports.Heading = require_heading.Heading;
148
151
  exports.Image = require_index$8.Image;
149
152
  exports.InputGroup = require_input_group.InputGroup;
150
153
  exports.Label = require_index$19.Label;
151
154
  exports.LinearProgress = require_linear_progress.LinearProgress;
152
- exports.Link = require_index$44.Link;
153
- exports.Notification = require_index$54.Notification;
155
+ exports.Link = require_index$45.Link;
156
+ exports.Notification = require_index$55.Notification;
154
157
  exports.NotificationProvider = require_notification_provider.NotificationProvider;
155
- exports.NotificationViewport = require_index$54.NotificationViewport;
158
+ exports.NotificationViewport = require_index$55.NotificationViewport;
156
159
  exports.NumberInput = require_number_input.NumberInput;
157
- exports.PageLayout = require_index$34.PageLayout;
158
- exports.Pagination = require_index$45.Pagination;
160
+ exports.PageLayout = require_index$35.PageLayout;
161
+ exports.Pagination = require_index$46.Pagination;
159
162
  exports.Paper = require_index$9.Paper;
160
- exports.Popout = require_index$55.Popout;
161
- exports.Popover = require_index$57.Popover;
162
- exports.Portal = require_index$56.Portal;
163
+ exports.Popout = require_index$56.Popout;
164
+ exports.Popover = require_index$58.Popover;
165
+ exports.Portal = require_index$57.Portal;
163
166
  exports.PortalTarget = require_target.PortalTarget;
164
- exports.Preview = require_index$59.Preview;
167
+ exports.Preview = require_index$60.Preview;
165
168
  exports.Radio = require_index$20.Radio;
166
169
  exports.RadioGroup = require_index$20.RadioGroup;
167
170
  exports.Rating = require_index$10.Rating;
168
- exports.ResizableHandle = require_index$35.ResizableHandle;
169
- exports.ResizablePanel = require_index$35.ResizablePanel;
170
- exports.ResizablePanels = require_index$35.ResizablePanels;
171
- exports.ScrollArea = require_index$36.ScrollArea;
172
- exports.ScrollLock = require_index$60.ScrollLock;
173
- exports.Section = require_index$37.Section;
174
- exports.SectionStack = require_index$38.SectionStack;
171
+ exports.ResizableHandle = require_index$36.ResizableHandle;
172
+ exports.ResizablePanel = require_index$36.ResizablePanel;
173
+ exports.ResizablePanels = require_index$36.ResizablePanels;
174
+ exports.ScrollArea = require_index$37.ScrollArea;
175
+ exports.ScrollLock = require_index$61.ScrollLock;
176
+ exports.Section = require_index$38.Section;
177
+ exports.SectionStack = require_index$39.SectionStack;
175
178
  exports.Select = require_index$21.Select;
176
- exports.Separator = require_index$39.Separator;
177
- exports.Sidebar = require_index$40.Sidebar;
179
+ exports.Separator = require_index$40.Separator;
180
+ exports.Sidebar = require_index$41.Sidebar;
178
181
  exports.Skeleton = require_index$11.Skeleton;
179
182
  exports.Slider = require_index$22.Slider;
180
- exports.Stack = require_index$41.Stack;
183
+ exports.Stack = require_index$42.Stack;
181
184
  exports.Stepper = require_index$23.Stepper;
182
185
  exports.Switch = require_index$24.Switch;
183
- exports.Tabs = require_index$46.Tabs;
184
- exports.TabsTab = require_index$46.TabsTab;
186
+ exports.Tabs = require_index$47.Tabs;
187
+ exports.TabsTab = require_index$47.TabsTab;
185
188
  exports.Text = require_text.Text;
186
189
  exports.TextAreaInput = require_text_area_input.TextAreaInput;
187
190
  exports.TextEditor = require_index$12.TextEditor;
@@ -191,8 +194,8 @@ exports.TextRenderer = require_text_renderer.TextRenderer;
191
194
  exports.TimePicker = require_index$25.TimePicker;
192
195
  exports.ToggleGroup = require_index$2.ToggleGroup;
193
196
  exports.TokenInput = require_index$26.TokenInput;
194
- exports.Tooltip = require_index$58.Tooltip;
195
- exports.Transition = require_index$61.Transition;
196
- exports.TreeView = require_index$47.TreeView;
197
+ exports.Tooltip = require_index$59.Tooltip;
198
+ exports.Transition = require_index$62.Transition;
199
+ exports.TreeView = require_index$48.TreeView;
197
200
  exports.useCarouselContext = require_controller.useCarouselContext;
198
201
  exports.useNotification = require_use_notification.useNotification;
package/dist/index.d.cts CHANGED
@@ -58,6 +58,7 @@ import { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, Bott
58
58
  import { BreadcrumbItem, Breadcrumbs, BreadcrumbsProps } from "./components/layout/breadcrumbs/index.cjs";
59
59
  import { CollapsableSidebar, CollapsableSidebarEntry, CollapsableSidebarExpansion, CollapsableSidebarGroup, CollapsableSidebarItem, CollapsableSidebarProps, SidebarItemBase, WithClickHandler, WithLink } from "./components/layout/collapsable-sidebar/index.cjs";
60
60
  import { Container, ContainerProps } from "./components/layout/container/index.cjs";
61
+ import { Grid, GridAlignment, GridAutoFlow, GridGap, GridItem, GridItemProps, GridLine, GridProps, GridSpan, GridTracks } from "./components/layout/grid/index.cjs";
61
62
  import { PageLayout, PageLayoutProps, SidebarPlacement } from "./components/layout/page-layout/index.cjs";
62
63
  import { ResizableHandle, ResizableHandleProps, ResizablePanel, ResizablePanelProps, ResizablePanels, ResizablePanelsOrientation, ResizablePanelsProps } from "./components/layout/resizable-panels/index.cjs";
63
64
  import { ScrollArea, ScrollAreaProps } from "./components/layout/scroll-area/index.cjs";
@@ -104,4 +105,4 @@ import { Heading, HeadingLevel, HeadingProps } from "./components/typography/hea
104
105
  import { Preview, PreviewAlign, PreviewDevice, PreviewJustify, PreviewProps } from "./components/utilities/preview/index.cjs";
105
106
  import { ScrollLock, ScrollLockProps } from "./components/utilities/scroll-lock/index.cjs";
106
107
  import { Transition, TransitionPhase, TransitionProps, TransitionTemplate } from "./components/utilities/transition/index.cjs";
107
- export { Accordion, type AccordionItemData, type AccordionItemId, type AccordionProps, type AccordionType, type AccordionValue, Alert, type AlertProps, type AlertSeverity, type AlertVariant, type AnchorOffset, type AnchorOrigin, type AnchorOverlap, AppBar, type AppBarNavigationItem, type AppBarProps, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteInputChangeReason, type AutocompleteMultipleProps, type AutocompleteOption, type AutocompleteOptionRenderState, type AutocompleteProps, type AutocompleteSingleProps, type AutocompleteSize, type AutocompleteValue, Avatar, type AvatarProps, type AvatarShape, Backdrop, type BackdropProps, Background, type BackgroundFade, type BackgroundMeshColors, type BackgroundPattern, type BackgroundProps, Badge, type BadgeColor, type BadgeProps, BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, type CardOrientation, type CardPartProps, type CardProps, type CardSize, CardTitle, type CardVariant, Carousel, type CarouselAlignment, type CarouselAlignmentConfig, type CarouselButtonAlignment, type CarouselContextValue, CarouselController, type CarouselControllerProps, type CarouselPagerAlignment, type CarouselProps, Checkbox, type CheckboxProps, type CheckboxSize, CircularProgress, type CircularProgressProps, type CircularProgressSize, CollapsableSidebar, type CollapsableSidebarEntry, type CollapsableSidebarExpansion, type CollapsableSidebarGroup, type CollapsableSidebarItem, type CollapsableSidebarProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, type ColorPickerSwatch, Command, CommandDialog, type CommandDialogProps, type CommandItem, type CommandProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, type ContextMenuCheckedState, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, type ContextMenuItemVariant, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DatePickerSize, Dialog, type DialogProps, Drawer, type DrawerProps, CompoundDropdownMenu as DropdownMenu, type DropdownMenuAlignment, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, type DropdownMenuCheckedState, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuPosition, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateMediaVariant, type EmptyStateProps, type EmptyStateSize, EmptyStateTitle, type EmptyStateVariant, FileUpload, type FileUploadItem, type FileUploadProps, type FileUploadRejection, type FileUploadRejectionCode, type FileUploadStatus, type FileUploadUploadContext, type FileUploadUploadHandler, FormField, type FormFieldProps, Heading, type HeadingLevel, type HeadingProps, Image, type ImageFit, type ImagePlaceholder, type ImageProps, type ImageRadius, type ImageSource, type ImageSourceData, type ImageSourceSet, InputGroup, type InputGroupAddonAlign, type InputGroupAddonProps, type InputGroupProps, Label, type LabelProps, LinearProgress, type LinearProgressProps, Link, type LinkProps, Notification, type NotificationAction, type NotificationInput, type NotificationItem, type NotificationOptions, type NotificationPosition, type NotificationProps, NotificationProvider, type NotificationProviderProps, type NotificationSeverity, NotificationViewport, type NotificationViewportProps, NumberInput, type NumberInputProps, PageLayout, type PageLayoutProps, type PagerAlignmentConfig, Pagination, type PaginationProps, Paper, type PaperProps, Popout, type PopoutAction, type PopoutAlignment, type PopoutPosition, type PopoutProps, type PopoutTriggerProps, Popover, type PopoverProps, Portal, type PortalProps, PortalTarget, type PortalTargetProps, Preview, type PreviewAlign, type PreviewDevice, type PreviewJustify, type PreviewProps, type ProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, Rating, type RatingProps, type RatingSize, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, ResizablePanels, type ResizablePanelsOrientation, type ResizablePanelsProps, type ResponsiveDirection, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollLock, type ScrollLockProps, Section, type SectionProps, SectionStack, type SectionStackProps, type SectionTheme, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarItemBase, type SidebarPlacement, type SidebarProps, Skeleton, type SkeletonProps, type SkeletonRadius, Slider, type SliderMark, type SliderProps, type SliderSize, Stack, type StackCrossAlignment, type StackMainAlignment, type StackProps, Stepper, type StepperOrientation, type StepperProps, type StepperStepProps, Switch, type SwitchProps, type SwitchSize, Tabs, type TabsPosition, type TabsProps, TabsTab, type TabsTabProps, Text, type TextAlign, TextAreaInput, type TextAreaInputProps, type TextBlock, type TextBlockType, type TextBlockVariant, type TextDocument, TextEditor, type TextEditorProps, TextEditorToolbar, type TextEditorToolbarProps, type TextInline, TextInput, type TextInputProps, type TextInputType, type TextListType, type TextMark, type TextPoint, type TextProps, TextRenderer, type TextRendererProps, type TextSelection, type TextType, TimePicker, type TimePickerProps, type TimePickerSize, ToggleGroup, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupOrientation, type ToggleGroupProps, type ToggleGroupSingleProps, type ToggleGroupSize, TokenInput, type TokenInputMode, type TokenInputProps, type TokenInputSize, Tooltip, type TooltipArrowSide, type TooltipContentProps, type TooltipProps, Transition, type TransitionPhase, type TransitionProps, type TransitionTemplate, TreeView, type TreeViewItem, type TreeViewItemState, type TreeViewProps, type TreeViewSelectionMode, type TreeViewSize, type WithClickHandler, type WithLink, useCarouselContext, useNotification };
108
+ export { Accordion, type AccordionItemData, type AccordionItemId, type AccordionProps, type AccordionType, type AccordionValue, Alert, type AlertProps, type AlertSeverity, type AlertVariant, type AnchorOffset, type AnchorOrigin, type AnchorOverlap, AppBar, type AppBarNavigationItem, type AppBarProps, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteInputChangeReason, type AutocompleteMultipleProps, type AutocompleteOption, type AutocompleteOptionRenderState, type AutocompleteProps, type AutocompleteSingleProps, type AutocompleteSize, type AutocompleteValue, Avatar, type AvatarProps, type AvatarShape, Backdrop, type BackdropProps, Background, type BackgroundFade, type BackgroundMeshColors, type BackgroundPattern, type BackgroundProps, Badge, type BadgeColor, type BadgeProps, BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, type CardOrientation, type CardPartProps, type CardProps, type CardSize, CardTitle, type CardVariant, Carousel, type CarouselAlignment, type CarouselAlignmentConfig, type CarouselButtonAlignment, type CarouselContextValue, CarouselController, type CarouselControllerProps, type CarouselPagerAlignment, type CarouselProps, Checkbox, type CheckboxProps, type CheckboxSize, CircularProgress, type CircularProgressProps, type CircularProgressSize, CollapsableSidebar, type CollapsableSidebarEntry, type CollapsableSidebarExpansion, type CollapsableSidebarGroup, type CollapsableSidebarItem, type CollapsableSidebarProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, type ColorPickerSwatch, Command, CommandDialog, type CommandDialogProps, type CommandItem, type CommandProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, type ContextMenuCheckedState, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, type ContextMenuItemVariant, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DatePickerSize, Dialog, type DialogProps, Drawer, type DrawerProps, CompoundDropdownMenu as DropdownMenu, type DropdownMenuAlignment, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, type DropdownMenuCheckedState, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuPosition, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateMediaVariant, type EmptyStateProps, type EmptyStateSize, EmptyStateTitle, type EmptyStateVariant, FileUpload, type FileUploadItem, type FileUploadProps, type FileUploadRejection, type FileUploadRejectionCode, type FileUploadStatus, type FileUploadUploadContext, type FileUploadUploadHandler, FormField, type FormFieldProps, Grid, type GridAlignment, type GridAutoFlow, type GridGap, GridItem, type GridItemProps, type GridLine, type GridProps, type GridSpan, type GridTracks, Heading, type HeadingLevel, type HeadingProps, Image, type ImageFit, type ImagePlaceholder, type ImageProps, type ImageRadius, type ImageSource, type ImageSourceData, type ImageSourceSet, InputGroup, type InputGroupAddonAlign, type InputGroupAddonProps, type InputGroupProps, Label, type LabelProps, LinearProgress, type LinearProgressProps, Link, type LinkProps, Notification, type NotificationAction, type NotificationInput, type NotificationItem, type NotificationOptions, type NotificationPosition, type NotificationProps, NotificationProvider, type NotificationProviderProps, type NotificationSeverity, NotificationViewport, type NotificationViewportProps, NumberInput, type NumberInputProps, PageLayout, type PageLayoutProps, type PagerAlignmentConfig, Pagination, type PaginationProps, Paper, type PaperProps, Popout, type PopoutAction, type PopoutAlignment, type PopoutPosition, type PopoutProps, type PopoutTriggerProps, Popover, type PopoverProps, Portal, type PortalProps, PortalTarget, type PortalTargetProps, Preview, type PreviewAlign, type PreviewDevice, type PreviewJustify, type PreviewProps, type ProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, Rating, type RatingProps, type RatingSize, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, ResizablePanels, type ResizablePanelsOrientation, type ResizablePanelsProps, type ResponsiveDirection, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollLock, type ScrollLockProps, Section, type SectionProps, SectionStack, type SectionStackProps, type SectionTheme, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarItemBase, type SidebarPlacement, type SidebarProps, Skeleton, type SkeletonProps, type SkeletonRadius, Slider, type SliderMark, type SliderProps, type SliderSize, Stack, type StackCrossAlignment, type StackMainAlignment, type StackProps, Stepper, type StepperOrientation, type StepperProps, type StepperStepProps, Switch, type SwitchProps, type SwitchSize, Tabs, type TabsPosition, type TabsProps, TabsTab, type TabsTabProps, Text, type TextAlign, TextAreaInput, type TextAreaInputProps, type TextBlock, type TextBlockType, type TextBlockVariant, type TextDocument, TextEditor, type TextEditorProps, TextEditorToolbar, type TextEditorToolbarProps, type TextInline, TextInput, type TextInputProps, type TextInputType, type TextListType, type TextMark, type TextPoint, type TextProps, TextRenderer, type TextRendererProps, type TextSelection, type TextType, TimePicker, type TimePickerProps, type TimePickerSize, ToggleGroup, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupOrientation, type ToggleGroupProps, type ToggleGroupSingleProps, type ToggleGroupSize, TokenInput, type TokenInputMode, type TokenInputProps, type TokenInputSize, Tooltip, type TooltipArrowSide, type TooltipContentProps, type TooltipProps, Transition, type TransitionPhase, type TransitionProps, type TransitionTemplate, TreeView, type TreeViewItem, type TreeViewItemState, type TreeViewProps, type TreeViewSelectionMode, type TreeViewSize, type WithClickHandler, type WithLink, useCarouselContext, useNotification };
package/dist/index.d.ts CHANGED
@@ -58,6 +58,7 @@ import { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, Bott
58
58
  import { BreadcrumbItem, Breadcrumbs, BreadcrumbsProps } from "./components/layout/breadcrumbs/index.js";
59
59
  import { CollapsableSidebar, CollapsableSidebarEntry, CollapsableSidebarExpansion, CollapsableSidebarGroup, CollapsableSidebarItem, CollapsableSidebarProps, SidebarItemBase, WithClickHandler, WithLink } from "./components/layout/collapsable-sidebar/index.js";
60
60
  import { Container, ContainerProps } from "./components/layout/container/index.js";
61
+ import { Grid, GridAlignment, GridAutoFlow, GridGap, GridItem, GridItemProps, GridLine, GridProps, GridSpan, GridTracks } from "./components/layout/grid/index.js";
61
62
  import { PageLayout, PageLayoutProps, SidebarPlacement } from "./components/layout/page-layout/index.js";
62
63
  import { ResizableHandle, ResizableHandleProps, ResizablePanel, ResizablePanelProps, ResizablePanels, ResizablePanelsOrientation, ResizablePanelsProps } from "./components/layout/resizable-panels/index.js";
63
64
  import { ScrollArea, ScrollAreaProps } from "./components/layout/scroll-area/index.js";
@@ -104,4 +105,4 @@ import { Heading, HeadingLevel, HeadingProps } from "./components/typography/hea
104
105
  import { Preview, PreviewAlign, PreviewDevice, PreviewJustify, PreviewProps } from "./components/utilities/preview/index.js";
105
106
  import { ScrollLock, ScrollLockProps } from "./components/utilities/scroll-lock/index.js";
106
107
  import { Transition, TransitionPhase, TransitionProps, TransitionTemplate } from "./components/utilities/transition/index.js";
107
- export { Accordion, type AccordionItemData, type AccordionItemId, type AccordionProps, type AccordionType, type AccordionValue, Alert, type AlertProps, type AlertSeverity, type AlertVariant, type AnchorOffset, type AnchorOrigin, type AnchorOverlap, AppBar, type AppBarNavigationItem, type AppBarProps, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteInputChangeReason, type AutocompleteMultipleProps, type AutocompleteOption, type AutocompleteOptionRenderState, type AutocompleteProps, type AutocompleteSingleProps, type AutocompleteSize, type AutocompleteValue, Avatar, type AvatarProps, type AvatarShape, Backdrop, type BackdropProps, Background, type BackgroundFade, type BackgroundMeshColors, type BackgroundPattern, type BackgroundProps, Badge, type BadgeColor, type BadgeProps, BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, type CardOrientation, type CardPartProps, type CardProps, type CardSize, CardTitle, type CardVariant, Carousel, type CarouselAlignment, type CarouselAlignmentConfig, type CarouselButtonAlignment, type CarouselContextValue, CarouselController, type CarouselControllerProps, type CarouselPagerAlignment, type CarouselProps, Checkbox, type CheckboxProps, type CheckboxSize, CircularProgress, type CircularProgressProps, type CircularProgressSize, CollapsableSidebar, type CollapsableSidebarEntry, type CollapsableSidebarExpansion, type CollapsableSidebarGroup, type CollapsableSidebarItem, type CollapsableSidebarProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, type ColorPickerSwatch, Command, CommandDialog, type CommandDialogProps, type CommandItem, type CommandProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, type ContextMenuCheckedState, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, type ContextMenuItemVariant, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DatePickerSize, Dialog, type DialogProps, Drawer, type DrawerProps, CompoundDropdownMenu as DropdownMenu, type DropdownMenuAlignment, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, type DropdownMenuCheckedState, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuPosition, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateMediaVariant, type EmptyStateProps, type EmptyStateSize, EmptyStateTitle, type EmptyStateVariant, FileUpload, type FileUploadItem, type FileUploadProps, type FileUploadRejection, type FileUploadRejectionCode, type FileUploadStatus, type FileUploadUploadContext, type FileUploadUploadHandler, FormField, type FormFieldProps, Heading, type HeadingLevel, type HeadingProps, Image, type ImageFit, type ImagePlaceholder, type ImageProps, type ImageRadius, type ImageSource, type ImageSourceData, type ImageSourceSet, InputGroup, type InputGroupAddonAlign, type InputGroupAddonProps, type InputGroupProps, Label, type LabelProps, LinearProgress, type LinearProgressProps, Link, type LinkProps, Notification, type NotificationAction, type NotificationInput, type NotificationItem, type NotificationOptions, type NotificationPosition, type NotificationProps, NotificationProvider, type NotificationProviderProps, type NotificationSeverity, NotificationViewport, type NotificationViewportProps, NumberInput, type NumberInputProps, PageLayout, type PageLayoutProps, type PagerAlignmentConfig, Pagination, type PaginationProps, Paper, type PaperProps, Popout, type PopoutAction, type PopoutAlignment, type PopoutPosition, type PopoutProps, type PopoutTriggerProps, Popover, type PopoverProps, Portal, type PortalProps, PortalTarget, type PortalTargetProps, Preview, type PreviewAlign, type PreviewDevice, type PreviewJustify, type PreviewProps, type ProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, Rating, type RatingProps, type RatingSize, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, ResizablePanels, type ResizablePanelsOrientation, type ResizablePanelsProps, type ResponsiveDirection, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollLock, type ScrollLockProps, Section, type SectionProps, SectionStack, type SectionStackProps, type SectionTheme, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarItemBase, type SidebarPlacement, type SidebarProps, Skeleton, type SkeletonProps, type SkeletonRadius, Slider, type SliderMark, type SliderProps, type SliderSize, Stack, type StackCrossAlignment, type StackMainAlignment, type StackProps, Stepper, type StepperOrientation, type StepperProps, type StepperStepProps, Switch, type SwitchProps, type SwitchSize, Tabs, type TabsPosition, type TabsProps, TabsTab, type TabsTabProps, Text, type TextAlign, TextAreaInput, type TextAreaInputProps, type TextBlock, type TextBlockType, type TextBlockVariant, type TextDocument, TextEditor, type TextEditorProps, TextEditorToolbar, type TextEditorToolbarProps, type TextInline, TextInput, type TextInputProps, type TextInputType, type TextListType, type TextMark, type TextPoint, type TextProps, TextRenderer, type TextRendererProps, type TextSelection, type TextType, TimePicker, type TimePickerProps, type TimePickerSize, ToggleGroup, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupOrientation, type ToggleGroupProps, type ToggleGroupSingleProps, type ToggleGroupSize, TokenInput, type TokenInputMode, type TokenInputProps, type TokenInputSize, Tooltip, type TooltipArrowSide, type TooltipContentProps, type TooltipProps, Transition, type TransitionPhase, type TransitionProps, type TransitionTemplate, TreeView, type TreeViewItem, type TreeViewItemState, type TreeViewProps, type TreeViewSelectionMode, type TreeViewSize, type WithClickHandler, type WithLink, useCarouselContext, useNotification };
108
+ export { Accordion, type AccordionItemData, type AccordionItemId, type AccordionProps, type AccordionType, type AccordionValue, Alert, type AlertProps, type AlertSeverity, type AlertVariant, type AnchorOffset, type AnchorOrigin, type AnchorOverlap, AppBar, type AppBarNavigationItem, type AppBarProps, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteInputChangeReason, type AutocompleteMultipleProps, type AutocompleteOption, type AutocompleteOptionRenderState, type AutocompleteProps, type AutocompleteSingleProps, type AutocompleteSize, type AutocompleteValue, Avatar, type AvatarProps, type AvatarShape, Backdrop, type BackdropProps, Background, type BackgroundFade, type BackgroundMeshColors, type BackgroundPattern, type BackgroundProps, Badge, type BadgeColor, type BadgeProps, BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, type CardOrientation, type CardPartProps, type CardProps, type CardSize, CardTitle, type CardVariant, Carousel, type CarouselAlignment, type CarouselAlignmentConfig, type CarouselButtonAlignment, type CarouselContextValue, CarouselController, type CarouselControllerProps, type CarouselPagerAlignment, type CarouselProps, Checkbox, type CheckboxProps, type CheckboxSize, CircularProgress, type CircularProgressProps, type CircularProgressSize, CollapsableSidebar, type CollapsableSidebarEntry, type CollapsableSidebarExpansion, type CollapsableSidebarGroup, type CollapsableSidebarItem, type CollapsableSidebarProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, type ColorPickerSwatch, Command, CommandDialog, type CommandDialogProps, type CommandItem, type CommandProps, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, type ContextMenuCheckedState, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, type ContextMenuItemVariant, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DatePickerSize, Dialog, type DialogProps, Drawer, type DrawerProps, CompoundDropdownMenu as DropdownMenu, type DropdownMenuAlignment, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, type DropdownMenuCheckedState, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuItemVariant, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuPosition, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateMediaVariant, type EmptyStateProps, type EmptyStateSize, EmptyStateTitle, type EmptyStateVariant, FileUpload, type FileUploadItem, type FileUploadProps, type FileUploadRejection, type FileUploadRejectionCode, type FileUploadStatus, type FileUploadUploadContext, type FileUploadUploadHandler, FormField, type FormFieldProps, Grid, type GridAlignment, type GridAutoFlow, type GridGap, GridItem, type GridItemProps, type GridLine, type GridProps, type GridSpan, type GridTracks, Heading, type HeadingLevel, type HeadingProps, Image, type ImageFit, type ImagePlaceholder, type ImageProps, type ImageRadius, type ImageSource, type ImageSourceData, type ImageSourceSet, InputGroup, type InputGroupAddonAlign, type InputGroupAddonProps, type InputGroupProps, Label, type LabelProps, LinearProgress, type LinearProgressProps, Link, type LinkProps, Notification, type NotificationAction, type NotificationInput, type NotificationItem, type NotificationOptions, type NotificationPosition, type NotificationProps, NotificationProvider, type NotificationProviderProps, type NotificationSeverity, NotificationViewport, type NotificationViewportProps, NumberInput, type NumberInputProps, PageLayout, type PageLayoutProps, type PagerAlignmentConfig, Pagination, type PaginationProps, Paper, type PaperProps, Popout, type PopoutAction, type PopoutAlignment, type PopoutPosition, type PopoutProps, type PopoutTriggerProps, Popover, type PopoverProps, Portal, type PortalProps, PortalTarget, type PortalTargetProps, Preview, type PreviewAlign, type PreviewDevice, type PreviewJustify, type PreviewProps, type ProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, Rating, type RatingProps, type RatingSize, ResizableHandle, type ResizableHandleProps, ResizablePanel, type ResizablePanelProps, ResizablePanels, type ResizablePanelsOrientation, type ResizablePanelsProps, type ResponsiveDirection, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, ScrollLock, type ScrollLockProps, Section, type SectionProps, SectionStack, type SectionStackProps, type SectionTheme, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, Sidebar, type SidebarItemBase, type SidebarPlacement, type SidebarProps, Skeleton, type SkeletonProps, type SkeletonRadius, Slider, type SliderMark, type SliderProps, type SliderSize, Stack, type StackCrossAlignment, type StackMainAlignment, type StackProps, Stepper, type StepperOrientation, type StepperProps, type StepperStepProps, Switch, type SwitchProps, type SwitchSize, Tabs, type TabsPosition, type TabsProps, TabsTab, type TabsTabProps, Text, type TextAlign, TextAreaInput, type TextAreaInputProps, type TextBlock, type TextBlockType, type TextBlockVariant, type TextDocument, TextEditor, type TextEditorProps, TextEditorToolbar, type TextEditorToolbarProps, type TextInline, TextInput, type TextInputProps, type TextInputType, type TextListType, type TextMark, type TextPoint, type TextProps, TextRenderer, type TextRendererProps, type TextSelection, type TextType, TimePicker, type TimePickerProps, type TimePickerSize, ToggleGroup, type ToggleGroupItemProps, type ToggleGroupMultipleProps, type ToggleGroupOrientation, type ToggleGroupProps, type ToggleGroupSingleProps, type ToggleGroupSize, TokenInput, type TokenInputMode, type TokenInputProps, type TokenInputSize, Tooltip, type TooltipArrowSide, type TooltipContentProps, type TooltipProps, Transition, type TransitionPhase, type TransitionProps, type TransitionTemplate, TreeView, type TreeViewItem, type TreeViewItemState, type TreeViewProps, type TreeViewSelectionMode, type TreeViewSize, type WithClickHandler, type WithLink, useCarouselContext, useNotification };
package/dist/index.js CHANGED
@@ -40,6 +40,7 @@ import { BottomNavigation, BottomNavigationItem } from "./components/layout/bott
40
40
  import { Breadcrumbs } from "./components/layout/breadcrumbs/index.js";
41
41
  import { CollapsableSidebar } from "./components/layout/collapsable-sidebar/index.js";
42
42
  import { Container } from "./components/layout/container/index.js";
43
+ import { Grid, GridItem } from "./components/layout/grid/index.js";
43
44
  import { PageLayout } from "./components/layout/page-layout/index.js";
44
45
  import { ResizableHandle, ResizablePanel, ResizablePanels } from "./components/layout/resizable-panels/index.js";
45
46
  import { ScrollArea } from "./components/layout/scroll-area/index.js";
@@ -78,4 +79,4 @@ import { Heading } from "./components/typography/heading.js";
78
79
  import { Preview } from "./components/utilities/preview/index.js";
79
80
  import { ScrollLock } from "./components/utilities/scroll-lock/index.js";
80
81
  import { Transition } from "./components/utilities/transition/index.js";
81
- export { Accordion, Alert, AppBar, AspectRatio, Autocomplete, Avatar, Backdrop, Background, Badge, BottomNavigation, BottomNavigationItem, Breadcrumbs, Button, ButtonGroup, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, CarouselController, Checkbox, CircularProgress, CollapsableSidebar, ColorPicker, Command, CommandDialog, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, Dialog, Drawer, CompoundDropdownMenu as DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, FileUpload, FormField, Heading, Image, InputGroup, Label, LinearProgress, Link, Notification, NotificationProvider, NotificationViewport, NumberInput, PageLayout, Pagination, Paper, Popout, Popover, Portal, PortalTarget, Preview, Radio, RadioGroup, Rating, ResizableHandle, ResizablePanel, ResizablePanels, ScrollArea, ScrollLock, Section, SectionStack, Select, Separator, Sidebar, Skeleton, Slider, Stack, Stepper, Switch, Tabs, TabsTab, Text, TextAreaInput, TextEditor, TextEditorToolbar, TextInput, TextRenderer, TimePicker, ToggleGroup, TokenInput, Tooltip, Transition, TreeView, useCarouselContext, useNotification };
82
+ export { Accordion, Alert, AppBar, AspectRatio, Autocomplete, Avatar, Backdrop, Background, Badge, BottomNavigation, BottomNavigationItem, Breadcrumbs, Button, ButtonGroup, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, CarouselController, Checkbox, CircularProgress, CollapsableSidebar, ColorPicker, Command, CommandDialog, Container, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSubCompound as ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, Dialog, Drawer, CompoundDropdownMenu as DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateContent, EmptyStateDescription, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, FileUpload, FormField, Grid, GridItem, Heading, Image, InputGroup, Label, LinearProgress, Link, Notification, NotificationProvider, NotificationViewport, NumberInput, PageLayout, Pagination, Paper, Popout, Popover, Portal, PortalTarget, Preview, Radio, RadioGroup, Rating, ResizableHandle, ResizablePanel, ResizablePanels, ScrollArea, ScrollLock, Section, SectionStack, Select, Separator, Sidebar, Skeleton, Slider, Stack, Stepper, Switch, Tabs, TabsTab, Text, TextAreaInput, TextEditor, TextEditorToolbar, TextInput, TextRenderer, TimePicker, ToggleGroup, TokenInput, Tooltip, Transition, TreeView, useCarouselContext, useNotification };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puzzle-ui/ui",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "UI components for Puzzle",
5
5
  "homepage": "https://puzzle-ui.com",
6
6
  "repository": {
@@ -47,10 +47,10 @@
47
47
  "prepack": "tsdown"
48
48
  },
49
49
  "dependencies": {
50
- "@puzzle-ui/core": "^0.5.1",
51
- "@puzzle-ui/hooks": "^0.5.1",
52
- "@puzzle-ui/icons": "^0.5.1",
53
- "@puzzle-ui/theme": "^0.5.1"
50
+ "@puzzle-ui/core": "^0.6.0",
51
+ "@puzzle-ui/hooks": "^0.6.0",
52
+ "@puzzle-ui/icons": "^0.6.0",
53
+ "@puzzle-ui/theme": "^0.6.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": "^19.0.0",