@gridui/grid 1.0.0 → 2.0.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 +20 -12
- package/dist/frame/chrome/chrome.d.ts +3 -1
- package/dist/frame/page/page.d.ts +1 -1
- package/dist/frame/rail/rail.d.ts +1 -1
- package/dist/frame/section.d.ts +3 -0
- package/dist/index.js +77 -66
- package/dist/index.js.map +4 -4
- package/dist/primitives/export.d.ts +3 -2
- package/dist/primitives/grid/grid-item.d.ts +2 -1
- package/dist/primitives/grid/grid.d.ts +2 -1
- package/dist/primitives/responsive.d.ts +0 -16
- package/dist/primitives/row/row.d.ts +1 -1
- package/dist/primitives/split/split.d.ts +15 -0
- package/dist/primitives/stack/stack.d.ts +1 -1
- package/dist/styles.css +121 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Grid foundation
|
|
2
2
|
|
|
3
|
-
See the usage handbook and
|
|
4
|
-
|
|
3
|
+
See the [usage handbook](../../docs/usage/README.md) and
|
|
4
|
+
[Grid contract](docs/README.md) for practical usage.
|
|
5
5
|
|
|
6
|
-
`@gridui/grid` owns Container, Grid, GridItem, Stack, Row,
|
|
7
|
-
|
|
6
|
+
`@gridui/grid` owns Container, Grid, GridItem, Split, Stack, Row,
|
|
7
|
+
PageFrame, FrameSections, FrameSection, frame chrome, rails, textures,
|
|
8
8
|
and structural boundaries. It does not know website routes or domain state.
|
|
9
9
|
Load its explicit `styles.css` export after theme styles and before Layout.
|
|
10
|
+
Theme supplies token values; `@gridui/style-utils/responsive` supplies the
|
|
11
|
+
React-free spacing and breakpoint-value calculations.
|
|
12
|
+
|
|
13
|
+
Use Grid for two-dimensional tracks and Split for a linear, non-wrapping
|
|
14
|
+
sequence of regions. Split's `direction` and `seam` accept scalar or responsive
|
|
15
|
+
values; it owns only the seam between direct child regions. Put functional
|
|
16
|
+
controls and tables inside those regions so their own borders remain intact.
|
|
17
|
+
See [linear regions](docs/README.md#linear-regions) for the full contract.
|
|
10
18
|
|
|
11
19
|
FrameSection and FrameFooter accept `tone="neutral" | "brand" | "warning" | "danger"`.
|
|
12
20
|
Non-neutral tones scope background, foreground, muted text, borders, controls,
|
|
@@ -53,18 +61,18 @@ See the [Grid contract](docs/README.md#grid-foundation) for geometry and API.
|
|
|
53
61
|
The package root `src/index.ts` declares the public API, and `src/styles.css`
|
|
54
62
|
imports component styles. Neither entry point contains component implementation.
|
|
55
63
|
|
|
56
|
-
- `primitives/` groups Container, Grid/GridItem with track planning,
|
|
57
|
-
Row with their own styles.
|
|
58
|
-
|
|
64
|
+
- `primitives/` groups Container, Grid/GridItem with track planning, Split,
|
|
65
|
+
Stack, and Row with their own styles. `responsive.ts` retains only column,
|
|
66
|
+
track, and span geometry; shared responsive spacing comes from Style-utils.
|
|
67
|
+
`geometry.css` owns the shared Container/frame-rail tracks.
|
|
59
68
|
- `frame/` groups page hosts, chrome, rails, boundaries, decorations, and
|
|
60
69
|
textures with their CSS and variants. `section.tsx` composes those groups.
|
|
61
70
|
Only shared content styles and tone variants remain in `frame/style.ts`;
|
|
62
71
|
`tone.css` owns inherited region colors. Primitives never import Frame.
|
|
63
72
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
use the component and stylesheet exports.
|
|
73
|
+
Cross-package browser fixtures live in root
|
|
74
|
+
`scripts/development/preview/fixtures` and use public exports. Browser
|
|
75
|
+
specifications live separately in `scripts/testing/browser/specs`.
|
|
68
76
|
|
|
69
77
|
Unit tests mirror these owners under `test/unit/primitives/` and
|
|
70
78
|
`test/unit/frame/`. Tests can combine public primitives to protect their
|
|
@@ -73,4 +81,4 @@ track resolution, seams, and decorative geometry in colocated CSS imported by
|
|
|
73
81
|
the root stylesheet. See the shared
|
|
74
82
|
style organization contract.
|
|
75
83
|
Consumers use the package root and explicit stylesheet export; internal file
|
|
76
|
-
paths are private
|
|
84
|
+
paths are private.
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @namespace Frame_Chrome
|
|
5
5
|
* @description Chrome
|
|
6
6
|
*/
|
|
7
|
-
import type { Responsive, Space } from "../../primitives/responsive";
|
|
8
7
|
import type { FrameBoundaryStyle } from "../boundary/boundary";
|
|
9
8
|
import type { FrameDecorationStyle } from "../decoration/decoration";
|
|
10
9
|
import type { FrameTone } from "../style";
|
|
10
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
11
11
|
import type { ComponentPropsWithRef, FC, ReactNode } from "react";
|
|
12
12
|
export type ChromeProps = {
|
|
13
13
|
readonly padding?: Responsive<Space>;
|
|
@@ -15,9 +15,11 @@ export type ChromeProps = {
|
|
|
15
15
|
export type FrameHeaderProps = ComponentPropsWithRef<"header"> & ChromeProps & {
|
|
16
16
|
readonly wrap?: boolean;
|
|
17
17
|
readonly gap?: Space;
|
|
18
|
+
readonly justify?: "start" | "between";
|
|
18
19
|
};
|
|
19
20
|
export declare const FrameHeader: FC<FrameHeaderProps>;
|
|
20
21
|
export type FrameFooterProps = ComponentPropsWithRef<"footer"> & ChromeProps & {
|
|
22
|
+
readonly contentLayout?: "flex" | "block";
|
|
21
23
|
readonly tone?: FrameTone;
|
|
22
24
|
readonly boundary?: FrameBoundaryStyle;
|
|
23
25
|
readonly decoration?: FrameDecorationStyle;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* @description Page
|
|
6
6
|
*/
|
|
7
7
|
import type { ContainerProps } from "../../primitives/container/container";
|
|
8
|
-
import type { Responsive, Space } from "../../primitives/responsive";
|
|
9
8
|
import type { FrameRailGroupProps } from "../rail/rail";
|
|
9
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
10
10
|
import type { ComponentPropsWithRef, FC, ReactNode } from "react";
|
|
11
11
|
export type PageFrameProps = FrameRailGroupProps & {
|
|
12
12
|
readonly width?: ContainerProps["width"];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @namespace Frame_Rail
|
|
5
5
|
* @description Rail
|
|
6
6
|
*/
|
|
7
|
-
import type { Responsive, Space } from "
|
|
7
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
8
8
|
import type { ComponentPropsWithRef, FC, ReactNode } from "react";
|
|
9
9
|
export type FrameRailProps = ComponentPropsWithRef<"div"> & {
|
|
10
10
|
readonly placement?: "start" | "sticky-bottom";
|
package/dist/frame/section.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { FrameBoundaryStyle } from "./boundary/boundary";
|
|
|
8
8
|
import type { FrameDecorationStyle } from "./decoration/decoration";
|
|
9
9
|
import type { FrameTone } from "./style";
|
|
10
10
|
import type { FrameTextureStyle } from "./texture/texture";
|
|
11
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
11
12
|
import type { ComponentPropsWithRef, FC } from "react";
|
|
12
13
|
export type FrameSectionProps = ComponentPropsWithRef<"section"> & {
|
|
13
14
|
readonly tone?: FrameTone;
|
|
@@ -15,5 +16,7 @@ export type FrameSectionProps = ComponentPropsWithRef<"section"> & {
|
|
|
15
16
|
readonly decoration?: FrameDecorationStyle;
|
|
16
17
|
readonly texture?: FrameTextureStyle;
|
|
17
18
|
readonly edges?: "frame" | "none";
|
|
19
|
+
readonly paddingInline?: Responsive<Space>;
|
|
20
|
+
readonly paddingBlock?: Responsive<Space>;
|
|
18
21
|
};
|
|
19
22
|
export declare const FrameSection: FC<FrameSectionProps>;
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
// src/primitives/responsive.ts
|
|
2
|
-
var resolveResponsive = (value) => {
|
|
3
|
-
if (typeof value !== "object" || !("base" in value)) {
|
|
4
|
-
return {
|
|
5
|
-
base: value,
|
|
6
|
-
md: value,
|
|
7
|
-
lg: value
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
base: value.base,
|
|
12
|
-
md: value.md ?? value.base,
|
|
13
|
-
lg: value.lg ?? value.md ?? value.base
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
var spaceValue = (value) => {
|
|
17
|
-
return `var(--gridui-space-${value})`;
|
|
18
|
-
};
|
|
19
|
-
var spanValue = (value) => {
|
|
20
|
-
return value === "full" ? "1 / -1" : `span ${value} / span ${value}`;
|
|
21
|
-
};
|
|
22
|
-
var spacingStyle = (name, value) => {
|
|
23
|
-
const sizes = resolveResponsive(value);
|
|
24
|
-
return {
|
|
25
|
-
[`--gridui-${name}`]: spaceValue(sizes.base),
|
|
26
|
-
[`--gridui-${name}-md`]: spaceValue(sizes.md),
|
|
27
|
-
[`--gridui-${name}-lg`]: spaceValue(sizes.lg)
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
1
|
// src/frame/boundary/boundary.tsx
|
|
32
2
|
import { cn } from "@gridui/style-utils";
|
|
33
3
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -86,10 +56,7 @@ var frameContentStyles = cva(cn2(
|
|
|
86
56
|
// src/frame/chrome/style.ts
|
|
87
57
|
import { cn as cn3 } from "@gridui/style-utils";
|
|
88
58
|
import { cva as cva2 } from "class-variance-authority";
|
|
89
|
-
var frameChromeStyles = cva2(
|
|
90
|
-
"gridui-frame-chrome",
|
|
91
|
-
"flex flex-wrap items-center justify-between gap-gridui-16"
|
|
92
|
-
));
|
|
59
|
+
var frameChromeStyles = cva2("gridui-frame-chrome");
|
|
93
60
|
var frameSignatureStyles = cva2(cn3(
|
|
94
61
|
"gridui-frame-signature flex min-w-0 items-center justify-center gap-gridui-24 py-gridui-32 px-gridui-24 overflow-hidden border-t border-solid border-border bg-transparent",
|
|
95
62
|
"[&>svg]:h-auto [&>svg]:opacity-30 [&>span]:font-display [&>span]:leading-none [&>span]:text-transparent"
|
|
@@ -98,6 +65,7 @@ var frameSignatureCroppedStyles = cva2("gridui-frame-signature-cropped block pb-
|
|
|
98
65
|
|
|
99
66
|
// src/frame/chrome/chrome.tsx
|
|
100
67
|
import { cn as cn4 } from "@gridui/style-utils";
|
|
68
|
+
import { resolveResponsive, spaceValue } from "@gridui/style-utils/responsive";
|
|
101
69
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
102
70
|
var chromeStyle = (padding) => {
|
|
103
71
|
const values = resolveResponsive(padding);
|
|
@@ -111,7 +79,7 @@ var FrameHeader = (props) => {
|
|
|
111
79
|
const { padding = {
|
|
112
80
|
base: 16,
|
|
113
81
|
md: 24
|
|
114
|
-
}, wrap = true, gap = 16, className, children, ...restProps } = props;
|
|
82
|
+
}, wrap = true, gap = 16, justify = "between", className, children, ...restProps } = props;
|
|
115
83
|
return /* @__PURE__ */ jsx3(
|
|
116
84
|
"header",
|
|
117
85
|
{
|
|
@@ -121,6 +89,7 @@ var FrameHeader = (props) => {
|
|
|
121
89
|
"div",
|
|
122
90
|
{
|
|
123
91
|
className: cn4(frameContentStyles(), frameChromeStyles()),
|
|
92
|
+
"data-justify": justify,
|
|
124
93
|
style: {
|
|
125
94
|
...chromeStyle(padding),
|
|
126
95
|
flexWrap: wrap ? "wrap" : "nowrap",
|
|
@@ -136,7 +105,7 @@ var FrameFooter = (props) => {
|
|
|
136
105
|
const { padding = {
|
|
137
106
|
base: 16,
|
|
138
107
|
md: 24
|
|
139
|
-
}, tone = "neutral", boundary = "line", decoration, signature, signatureAppearance = "standard", className, children, ...restProps } = props;
|
|
108
|
+
}, contentLayout = "flex", tone = "neutral", boundary = "line", decoration, signature, signatureAppearance = "standard", className, children, ...restProps } = props;
|
|
140
109
|
return /* @__PURE__ */ jsxs(
|
|
141
110
|
"footer",
|
|
142
111
|
{
|
|
@@ -155,6 +124,7 @@ var FrameFooter = (props) => {
|
|
|
155
124
|
"div",
|
|
156
125
|
{
|
|
157
126
|
className: cn4(frameContentStyles(), frameChromeStyles(), "gridui-frame-surface"),
|
|
127
|
+
"data-content-layout": contentLayout,
|
|
158
128
|
style: chromeStyle(padding),
|
|
159
129
|
children: [
|
|
160
130
|
children,
|
|
@@ -189,6 +159,7 @@ var frameRailStickyBottomStyles = cva3("gridui-frame-rail-sticky-bottom justify-
|
|
|
189
159
|
|
|
190
160
|
// src/frame/rail/rail.tsx
|
|
191
161
|
import { cn as cn5 } from "@gridui/style-utils";
|
|
162
|
+
import { resolveResponsive as resolveResponsive2, spaceValue as spaceValue2 } from "@gridui/style-utils/responsive";
|
|
192
163
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
193
164
|
var FrameRail = (props) => {
|
|
194
165
|
const {
|
|
@@ -218,11 +189,11 @@ var FrameRailGroup = (props) => {
|
|
|
218
189
|
md: 32
|
|
219
190
|
}, children, className, style, ...restProps } = props;
|
|
220
191
|
const hasRail = rail !== void 0 && rail !== null && rail !== false;
|
|
221
|
-
const width =
|
|
192
|
+
const width = resolveResponsive2(hasRail ? railWidth : 0);
|
|
222
193
|
const layoutStyle = {
|
|
223
|
-
"--gridui-rail-width-base":
|
|
224
|
-
"--gridui-rail-width-md":
|
|
225
|
-
"--gridui-rail-width-lg":
|
|
194
|
+
"--gridui-rail-width-base": spaceValue2(width.base),
|
|
195
|
+
"--gridui-rail-width-md": spaceValue2(width.md),
|
|
196
|
+
"--gridui-rail-width-lg": spaceValue2(width.lg),
|
|
226
197
|
"--gridui-rail-display-base": width.base === 0 ? "none" : "block",
|
|
227
198
|
"--gridui-rail-display-md": width.md === 0 ? "none" : "block",
|
|
228
199
|
"--gridui-rail-display-lg": width.lg === 0 ? "none" : "block",
|
|
@@ -269,6 +240,7 @@ var pageFrameVariants = cva4("gridui-page-frame min-h-svh", {
|
|
|
269
240
|
|
|
270
241
|
// src/frame/page/page.tsx
|
|
271
242
|
import { cn as cn6 } from "@gridui/style-utils";
|
|
243
|
+
import { spacingVariables } from "@gridui/style-utils/responsive";
|
|
272
244
|
import { Fragment, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
273
245
|
var FrameSections = (props) => {
|
|
274
246
|
const { className, ...restProps } = props;
|
|
@@ -329,7 +301,7 @@ var PageFrame = (props) => {
|
|
|
329
301
|
"main",
|
|
330
302
|
{
|
|
331
303
|
className: "gridui-frame-main",
|
|
332
|
-
style: mainGutterStart === void 0 ? void 0 :
|
|
304
|
+
style: mainGutterStart === void 0 ? void 0 : spacingVariables("main-gutter-start", mainGutterStart),
|
|
333
305
|
children: railScope === "main" && rail !== void 0 && rail !== null && rail !== false ? /* @__PURE__ */ jsx5(
|
|
334
306
|
FrameRailGroup,
|
|
335
307
|
{
|
|
@@ -370,6 +342,7 @@ var FrameTexture = (props) => {
|
|
|
370
342
|
|
|
371
343
|
// src/frame/section.tsx
|
|
372
344
|
import { cn as cn7 } from "@gridui/style-utils";
|
|
345
|
+
import { spacingVariables as spacingVariables2 } from "@gridui/style-utils/responsive";
|
|
373
346
|
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
374
347
|
var FrameSection = (props) => {
|
|
375
348
|
const {
|
|
@@ -378,6 +351,8 @@ var FrameSection = (props) => {
|
|
|
378
351
|
decoration,
|
|
379
352
|
texture = "none",
|
|
380
353
|
edges = "frame",
|
|
354
|
+
paddingInline = 0,
|
|
355
|
+
paddingBlock = 0,
|
|
381
356
|
className,
|
|
382
357
|
children,
|
|
383
358
|
...restProps
|
|
@@ -399,6 +374,10 @@ var FrameSection = (props) => {
|
|
|
399
374
|
"div",
|
|
400
375
|
{
|
|
401
376
|
className: cn7(frameContentStyles(), "gridui-frame-surface", edges === "none" && "border-x-0"),
|
|
377
|
+
style: {
|
|
378
|
+
...spacingVariables2("section-padding-inline", paddingInline),
|
|
379
|
+
...spacingVariables2("section-padding-block", paddingBlock)
|
|
380
|
+
},
|
|
402
381
|
children: [
|
|
403
382
|
/* @__PURE__ */ jsx7(
|
|
404
383
|
FrameTexture,
|
|
@@ -448,6 +427,11 @@ var Container = (props) => {
|
|
|
448
427
|
);
|
|
449
428
|
};
|
|
450
429
|
|
|
430
|
+
// src/primitives/responsive.ts
|
|
431
|
+
var spanValue = (value) => {
|
|
432
|
+
return value === "full" ? "1 / -1" : `span ${value} / span ${value}`;
|
|
433
|
+
};
|
|
434
|
+
|
|
451
435
|
// src/primitives/grid/style.ts
|
|
452
436
|
import { cn as cn9 } from "@gridui/style-utils";
|
|
453
437
|
import { cva as cva6 } from "class-variance-authority";
|
|
@@ -480,6 +464,7 @@ var gridVariants = cva6(gridStyles(), {
|
|
|
480
464
|
|
|
481
465
|
// src/primitives/grid/grid-item.tsx
|
|
482
466
|
import { cn as cn10 } from "@gridui/style-utils";
|
|
467
|
+
import { resolveResponsive as resolveResponsive3, spaceValue as spaceValue3 } from "@gridui/style-utils/responsive";
|
|
483
468
|
import { Slot } from "@radix-ui/react-slot";
|
|
484
469
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
485
470
|
var GridItem = (props) => {
|
|
@@ -492,15 +477,15 @@ var GridItem = (props) => {
|
|
|
492
477
|
style,
|
|
493
478
|
...restProps
|
|
494
479
|
} = props;
|
|
495
|
-
const size =
|
|
496
|
-
const inset =
|
|
480
|
+
const size = resolveResponsive3(span);
|
|
481
|
+
const inset = resolveResponsive3(padding);
|
|
497
482
|
const layoutStyle = {
|
|
498
483
|
"--gridui-span": spanValue(size.base),
|
|
499
484
|
"--gridui-span-md": spanValue(size.md),
|
|
500
485
|
"--gridui-span-lg": spanValue(size.lg),
|
|
501
|
-
"--gridui-padding":
|
|
502
|
-
"--gridui-padding-md":
|
|
503
|
-
"--gridui-padding-lg":
|
|
486
|
+
"--gridui-padding": spaceValue3(inset.base),
|
|
487
|
+
"--gridui-padding-md": spaceValue3(inset.md),
|
|
488
|
+
"--gridui-padding-lg": spaceValue3(inset.lg),
|
|
504
489
|
...align ? {
|
|
505
490
|
display: "flex",
|
|
506
491
|
alignItems: align
|
|
@@ -555,6 +540,7 @@ var fillGridRowSpans = (columns, spans) => {
|
|
|
555
540
|
|
|
556
541
|
// src/primitives/grid/grid.tsx
|
|
557
542
|
import { cn as cn11 } from "@gridui/style-utils";
|
|
543
|
+
import { resolveResponsive as resolveResponsive4, spaceValue as spaceValue4 } from "@gridui/style-utils/responsive";
|
|
558
544
|
import { Children, cloneElement, isValidElement } from "react";
|
|
559
545
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
560
546
|
var Grid = (props) => {
|
|
@@ -568,13 +554,13 @@ var Grid = (props) => {
|
|
|
568
554
|
children,
|
|
569
555
|
...restProps
|
|
570
556
|
} = props;
|
|
571
|
-
const tracks =
|
|
557
|
+
const tracks = resolveResponsive4(columns);
|
|
572
558
|
const count = {
|
|
573
559
|
base: gridColumnCount(tracks.base),
|
|
574
560
|
md: gridColumnCount(tracks.md),
|
|
575
561
|
lg: gridColumnCount(tracks.lg)
|
|
576
562
|
};
|
|
577
|
-
const spacing =
|
|
563
|
+
const spacing = resolveResponsive4(frame === "none" ? gap : 0);
|
|
578
564
|
const layoutStyle = {
|
|
579
565
|
"--gridui-columns": count.base,
|
|
580
566
|
"--gridui-columns-md": count.md,
|
|
@@ -582,9 +568,9 @@ var Grid = (props) => {
|
|
|
582
568
|
"--gridui-grid-template": gridTemplate(tracks.base),
|
|
583
569
|
"--gridui-grid-template-md": gridTemplate(tracks.md),
|
|
584
570
|
"--gridui-grid-template-lg": gridTemplate(tracks.lg),
|
|
585
|
-
"--gridui-gap": frame === "internal" ? "1px" :
|
|
586
|
-
"--gridui-gap-md": frame === "internal" ? "1px" :
|
|
587
|
-
"--gridui-gap-lg": frame === "internal" ? "1px" :
|
|
571
|
+
"--gridui-gap": frame === "internal" ? "1px" : spaceValue4(spacing.base),
|
|
572
|
+
"--gridui-gap-md": frame === "internal" ? "1px" : spaceValue4(spacing.md),
|
|
573
|
+
"--gridui-gap-lg": frame === "internal" ? "1px" : spaceValue4(spacing.lg),
|
|
588
574
|
...style
|
|
589
575
|
};
|
|
590
576
|
let content = children;
|
|
@@ -596,7 +582,7 @@ var Grid = (props) => {
|
|
|
596
582
|
return child;
|
|
597
583
|
});
|
|
598
584
|
const spans = items.map((item) => {
|
|
599
|
-
return
|
|
585
|
+
return resolveResponsive4(item.props.span ?? 1);
|
|
600
586
|
});
|
|
601
587
|
const filled = {
|
|
602
588
|
base: fillGridRowSpans(count.base, spans.map((span) => {
|
|
@@ -642,6 +628,7 @@ var rowStyles = cva7(cn12(
|
|
|
642
628
|
|
|
643
629
|
// src/primitives/row/row.tsx
|
|
644
630
|
import { cn as cn13 } from "@gridui/style-utils";
|
|
631
|
+
import { spaceValue as spaceValue5 } from "@gridui/style-utils/responsive";
|
|
645
632
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
646
633
|
var Row = (props) => {
|
|
647
634
|
const {
|
|
@@ -666,24 +653,48 @@ var Row = (props) => {
|
|
|
666
653
|
alignItems: align,
|
|
667
654
|
justifyContent: justify === "between" ? "space-between" : "flex-start",
|
|
668
655
|
flexWrap: wrap ? "wrap" : "nowrap",
|
|
669
|
-
gap: `${
|
|
656
|
+
gap: `${spaceValue5(rowGap)} ${spaceValue5(gap)}`,
|
|
670
657
|
...style
|
|
671
658
|
}
|
|
672
659
|
}
|
|
673
660
|
);
|
|
674
661
|
};
|
|
675
662
|
|
|
676
|
-
// src/primitives/
|
|
663
|
+
// src/primitives/split/split.tsx
|
|
677
664
|
import { cn as cn14 } from "@gridui/style-utils";
|
|
665
|
+
import { resolveResponsive as resolveResponsive5 } from "@gridui/style-utils/responsive";
|
|
666
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
667
|
+
var Split = (props) => {
|
|
668
|
+
const { direction = "row", seam = "line", className, ...restProps } = props;
|
|
669
|
+
const directions = resolveResponsive5(direction);
|
|
670
|
+
const seams = resolveResponsive5(seam);
|
|
671
|
+
return /* @__PURE__ */ jsx12(
|
|
672
|
+
"div",
|
|
673
|
+
{
|
|
674
|
+
...restProps,
|
|
675
|
+
className: cn14("gridui-split", className),
|
|
676
|
+
"data-direction": directions.base,
|
|
677
|
+
"data-direction-md": directions.md,
|
|
678
|
+
"data-direction-lg": directions.lg,
|
|
679
|
+
"data-seam": seams.base,
|
|
680
|
+
"data-seam-md": seams.md,
|
|
681
|
+
"data-seam-lg": seams.lg
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
// src/primitives/stack/style.ts
|
|
687
|
+
import { cn as cn15 } from "@gridui/style-utils";
|
|
678
688
|
import { cva as cva8 } from "class-variance-authority";
|
|
679
|
-
var stackStyles = cva8(
|
|
689
|
+
var stackStyles = cva8(cn15(
|
|
680
690
|
"gridui-stack",
|
|
681
691
|
"flex min-w-0 flex-col"
|
|
682
692
|
));
|
|
683
693
|
|
|
684
694
|
// src/primitives/stack/stack.tsx
|
|
685
|
-
import { cn as
|
|
686
|
-
import {
|
|
695
|
+
import { cn as cn16 } from "@gridui/style-utils";
|
|
696
|
+
import { resolveResponsive as resolveResponsive6, spaceValue as spaceValue6 } from "@gridui/style-utils/responsive";
|
|
697
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
687
698
|
var Stack = (props) => {
|
|
688
699
|
const {
|
|
689
700
|
gap = 16,
|
|
@@ -694,21 +705,21 @@ var Stack = (props) => {
|
|
|
694
705
|
style,
|
|
695
706
|
...restProps
|
|
696
707
|
} = props;
|
|
697
|
-
const spacing =
|
|
708
|
+
const spacing = resolveResponsive6(gap);
|
|
698
709
|
const layoutStyle = {
|
|
699
|
-
"--gridui-gap":
|
|
700
|
-
"--gridui-gap-md":
|
|
701
|
-
"--gridui-gap-lg":
|
|
710
|
+
"--gridui-gap": spaceValue6(spacing.base),
|
|
711
|
+
"--gridui-gap-md": spaceValue6(spacing.md),
|
|
712
|
+
"--gridui-gap-lg": spaceValue6(spacing.lg),
|
|
702
713
|
width: width === "full" ? "100%" : void 0,
|
|
703
714
|
maxWidth,
|
|
704
|
-
paddingTop: paddingStart === void 0 ? void 0 :
|
|
715
|
+
paddingTop: paddingStart === void 0 ? void 0 : spaceValue6(paddingStart),
|
|
705
716
|
...style
|
|
706
717
|
};
|
|
707
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx13(
|
|
708
719
|
"div",
|
|
709
720
|
{
|
|
710
721
|
...restProps,
|
|
711
|
-
className:
|
|
722
|
+
className: cn16(stackStyles(), className),
|
|
712
723
|
style: layoutStyle
|
|
713
724
|
}
|
|
714
725
|
);
|
|
@@ -726,7 +737,7 @@ export {
|
|
|
726
737
|
GridItem,
|
|
727
738
|
PageFrame,
|
|
728
739
|
Row,
|
|
729
|
-
|
|
730
|
-
|
|
740
|
+
Split,
|
|
741
|
+
Stack
|
|
731
742
|
};
|
|
732
743
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives\n * @description Responsive\n */\n\nimport type { CSSProperties } from \"react\";\n\nexport type Space = 0 | 4 | 8 | 16 | 24 | 32 | 48 | 64;\nexport type Columns = 1 | 2 | 3 | 4 | 6 | 12;\nexport type GridTrack = \"1fr\" | \"auto\";\nexport type GridColumns = Columns | readonly [GridTrack, ...GridTrack[]];\nexport type Span = Columns | 5 | 7 | 8 | 9 | 10 | 11 | \"full\";\nexport type Responsive<T extends string | number | readonly string[]> = T | {\n readonly base: T;\n readonly md?: T;\n readonly lg?: T;\n};\n\nexport const resolveResponsive = <T extends string | number | readonly string[]>(value: Responsive<T>,\n): {\n base: T;\n md: T;\n lg: T;\n} => {\n if (typeof value !== \"object\" || !(\"base\" in value)) {\n return {\n base: value,\n md: value,\n lg: value,\n };\n }\n return {\n base: value.base,\n md: value.md ?? value.base,\n lg: value.lg ?? value.md ?? value.base,\n };\n};\n\nexport const spaceValue = (value: Space): string => {\n return `var(--gridui-space-${value})`;\n};\n\nexport const spanValue = (value: Span): string => {\n return value === \"full\" ? \"1 / -1\" : `span ${value} / span ${value}`;\n};\n\nexport const spacingStyle = (name: string, value: Responsive<Space>): CSSProperties & {\n [key: `--gridui-${string}`]: string | number;\n} => {\n const sizes = resolveResponsive(value);\n return {\n [`--gridui-${name}`]: spaceValue(sizes.base),\n [`--gridui-${name}-md`]: spaceValue(sizes.md),\n [`--gridui-${name}-lg`]: spaceValue(sizes.lg),\n };\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Boundary\n * @description Boundary\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type FrameBoundaryStyle = \"none\" | \"line\" | \"band\" | \"stripe\" | \"space\";\n\nexport type FrameBoundaryProps = {\n readonly boundary: FrameBoundaryStyle;\n};\n\nexport const FrameBoundary: FC<FrameBoundaryProps> = (props: FrameBoundaryProps) => {\n const { boundary } = props;\n return boundary === \"none\" ? null : (<div\n className={cn(\n \"gridui-frame-boundary\",\n (boundary === \"band\" || boundary === \"stripe\") && \"gridui-frame-divider\",\n boundary === \"stripe\" && \"gridui-frame-stripe\",\n boundary === \"space\" && \"gridui-frame-space\",\n )}\n aria-hidden=\"true\"\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Decoration\n * @description Decoration\n */\n\nimport type { FrameBoundaryStyle } from \"../boundary/boundary\";\nimport type { FC } from \"react\";\n\nexport type FrameDecorationStyle = \"none\" | \"nodes\" | \"marks\" | \"corners\" | \"ticks\";\n\nexport const resolveFrameDecoration = (\n boundary: FrameBoundaryStyle,\n decoration?: FrameDecorationStyle,\n): FrameDecorationStyle => {\n return decoration ?? (boundary === \"band\" ? \"nodes\" : \"none\");\n};\n\nexport type FrameDecorationProps = {\n readonly decoration: FrameDecorationStyle;\n};\n\nexport const FrameDecoration: FC<FrameDecorationProps> = (props: FrameDecorationProps) => {\n const { decoration } = props;\n return decoration === \"none\" ? null : (<div\n className=\"gridui-frame-decoration\"\n data-decoration={decoration}\n aria-hidden=\"true\"\n inert\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport type FrameTone = \"neutral\" | \"brand\" | \"warning\" | \"danger\";\n\nexport const frameToneStyles = cva(\"\", {\n variants: {\n tone: {\n neutral: \"\",\n brand: \"gridui-frame-brand\",\n warning: \"gridui-frame-warning\",\n danger: \"gridui-frame-danger\",\n },\n },\n});\n\nexport const frameContentStyles = cva(cn(\n \"gridui-frame-content\",\n \"border-x border-solid border-border wrap-anywhere\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Chrome\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const frameChromeStyles = cva(cn(\n \"gridui-frame-chrome\",\n \"flex flex-wrap items-center justify-between gap-gridui-16\",\n));\n\nexport const frameSignatureStyles = cva(cn(\n \"gridui-frame-signature flex min-w-0 items-center justify-center gap-gridui-24 py-gridui-32 px-gridui-24 overflow-hidden border-t border-solid border-border bg-transparent\",\n \"[&>svg]:h-auto [&>svg]:opacity-30 [&>span]:font-display [&>span]:leading-none [&>span]:text-transparent\",\n));\n\nexport const frameSignatureCroppedStyles = cva(\"gridui-frame-signature-cropped block pb-0 @container [&>span]:block [&>span]:text-center [&>span]:whitespace-nowrap\");\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Chrome\n * @description Chrome\n */\n\nimport type { Responsive, Space } from \"../../primitives/responsive\";\nimport { resolveResponsive, spaceValue } from \"../../primitives/responsive\";\nimport type { FrameBoundaryStyle } from \"../boundary/boundary\";\nimport { FrameBoundary } from \"../boundary/boundary\";\nimport type { FrameDecorationStyle } from \"../decoration/decoration\";\nimport { FrameDecoration, resolveFrameDecoration } from \"../decoration/decoration\";\nimport type { FrameTone } from \"../style\";\nimport { frameContentStyles, frameToneStyles } from \"../style\";\nimport { frameChromeStyles, frameSignatureCroppedStyles, frameSignatureStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, CSSProperties, FC, ReactNode } from \"react\";\n\nexport type ChromeProps = {\n readonly padding?: Responsive<Space>;\n};\n\nconst chromeStyle = (padding: Responsive<Space>): CSSProperties & {\n \"--gridui-chrome-padding\": string;\n \"--gridui-chrome-padding-md\": string;\n \"--gridui-chrome-padding-lg\": string;\n} => {\n const values = resolveResponsive(padding);\n return {\n \"--gridui-chrome-padding\": spaceValue(values.base),\n \"--gridui-chrome-padding-md\": spaceValue(values.md),\n \"--gridui-chrome-padding-lg\": spaceValue(values.lg),\n };\n};\n\nexport type FrameHeaderProps = ComponentPropsWithRef<\"header\"> & ChromeProps & {\n readonly wrap?: boolean;\n readonly gap?: Space;\n};\n\nexport const FrameHeader: FC<FrameHeaderProps> = (props: FrameHeaderProps) => {\n const { padding = {\n base: 16,\n md: 24,\n }, wrap = true, gap = 16, className, children, ...restProps } = props;\n return (<header\n {...restProps}\n className={cn(\"gridui-container gridui-frame-header\", className)}\n >\n <div\n className={cn(frameContentStyles(), frameChromeStyles())}\n style={{\n ...chromeStyle(padding),\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n gap: spaceValue(gap),\n }}\n >\n {children}\n </div>\n </header>);\n};\n\nexport type FrameFooterProps = ComponentPropsWithRef<\"footer\"> & ChromeProps & {\n readonly tone?: FrameTone;\n readonly boundary?: FrameBoundaryStyle;\n readonly decoration?: FrameDecorationStyle;\n readonly signature?: ReactNode;\n readonly signatureAppearance?: \"standard\" | \"cropped\";\n};\n\nexport const FrameFooter: FC<FrameFooterProps> = (props: FrameFooterProps) => {\n const { padding = {\n base: 16,\n md: 24,\n }, tone = \"neutral\", boundary = \"line\", decoration, signature, signatureAppearance = \"standard\", className, children, ...restProps } = props;\n return (<footer\n {...restProps}\n className={cn(\"gridui-container gridui-frame-footer\", frameToneStyles({\n tone,\n }), className)}\n >\n <FrameBoundary\n boundary={boundary}\n />\n <div\n className={cn(frameContentStyles(), frameChromeStyles(), \"gridui-frame-surface\")}\n style={chromeStyle(padding)}\n >\n {children}\n <FrameDecoration\n decoration={resolveFrameDecoration(boundary, decoration)}\n />\n </div>\n {signature ? (<div\n className={cn(frameContentStyles(), frameSignatureStyles(), signatureAppearance === \"cropped\" && frameSignatureCroppedStyles())}\n aria-hidden=\"true\"\n inert\n >\n {signature}\n </div>) : null}\n </footer>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Rail\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const frameRailStyles = cva(\"gridui-frame-rail flex h-full box-border flex-col py-gridui-24 text-muted\");\n\nexport const frameRailContentStyles = cva(\"gridui-frame-rail-content relative z-(--gridui-z-interaction) min-w-0 type-eyebrow bg-inherit\");\n\nexport const frameRailStickyBottomStyles = cva(\"gridui-frame-rail-sticky-bottom justify-end [&>.gridui-frame-rail-content]:sticky\");\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Rail\n * @description Rail\n */\n\nimport type { Responsive, Space } from \"../../primitives/responsive\";\nimport { resolveResponsive, spaceValue } from \"../../primitives/responsive\";\nimport { frameRailContentStyles, frameRailStickyBottomStyles, frameRailStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, CSSProperties, FC, ReactNode } from \"react\";\n\nexport type FrameRailProps = ComponentPropsWithRef<\"div\"> & {\n readonly placement?: \"start\" | \"sticky-bottom\";\n};\n\nexport const FrameRail: FC<FrameRailProps> = (props: FrameRailProps) => {\n const {\n placement = \"start\",\n children,\n className,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n className={cn(frameRailStyles(), placement === \"sticky-bottom\" && frameRailStickyBottomStyles(), className)}\n >\n <div\n className={frameRailContentStyles()}\n >\n {children}\n </div>\n </div>);\n};\n\nexport type FrameRailGroupProps = ComponentPropsWithRef<\"div\"> & {\n readonly rail?: ReactNode;\n readonly railWidth?: Responsive<Space>;\n};\n\nexport const FrameRailGroup: FC<FrameRailGroupProps> = (props: FrameRailGroupProps) => {\n const { rail, railWidth = {\n base: 0,\n md: 32,\n }, children, className, style, ...restProps } = props;\n const hasRail = rail !== undefined && rail !== null && rail !== false;\n const width = resolveResponsive(hasRail ? railWidth : 0);\n const layoutStyle: CSSProperties & {\n [key: `--gridui-${string}`]: string | number;\n } = {\n \"--gridui-rail-width-base\": spaceValue(width.base),\n \"--gridui-rail-width-md\": spaceValue(width.md),\n \"--gridui-rail-width-lg\": spaceValue(width.lg),\n \"--gridui-rail-display-base\": width.base === 0 ? \"none\" : \"block\",\n \"--gridui-rail-display-md\": width.md === 0 ? \"none\" : \"block\",\n \"--gridui-rail-display-lg\": width.lg === 0 ? \"none\" : \"block\",\n ...style,\n };\n return (<div\n {...restProps}\n className={cn(\"gridui-frame-rail-group\", className)}\n style={layoutStyle}\n >\n {hasRail ? (<div\n className=\"gridui-frame-rail-track\"\n >\n {rail}\n </div>) : null}\n <div\n className=\"gridui-frame-rail-body\"\n >\n {children}\n </div>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Page\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const pageFrameVariants = cva(\"gridui-page-frame min-h-svh\", {\n variants: {\n width: {\n narrow: \"gridui-container-narrow\",\n standard: \"gridui-container-standard\",\n wide: \"gridui-container-wide\",\n },\n },\n defaultVariants: { width: \"standard\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Page\n * @description Page\n */\n\nimport type { ContainerProps } from \"../../primitives/container/container\";\nimport type { Responsive, Space } from \"../../primitives/responsive\";\nimport { spacingStyle } from \"../../primitives/responsive\";\nimport type { FrameRailGroupProps } from \"../rail/rail\";\nimport { FrameRailGroup } from \"../rail/rail\";\nimport { frameContentStyles } from \"../style\";\nimport { pageFrameVariants } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC, ReactNode } from \"react\";\n\nexport type PageFrameProps = FrameRailGroupProps & {\n readonly width?: ContainerProps[\"width\"];\n readonly header?: ReactNode;\n readonly footer?: ReactNode;\n readonly railScope?: \"page\" | \"main\";\n readonly mainGutterStart?: Responsive<Space>;\n};\n\nexport type FrameSectionsProps = ComponentPropsWithRef<\"div\">;\n\nexport const FrameSections: FC<FrameSectionsProps> = (props: FrameSectionsProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(\"gridui-frame-sections\", className)}\n />);\n};\n\nexport const PageFrame: FC<PageFrameProps> = (props: PageFrameProps) => {\n const {\n width = \"standard\",\n header,\n footer,\n rail,\n railWidth,\n railScope = \"page\",\n mainGutterStart,\n children,\n className,\n ...restProps\n } = props;\n const railOptions = railWidth === undefined ? {} : { railWidth };\n const content = (<>\n <FrameSections>\n {children}\n </FrameSections>\n <div\n className=\"gridui-container gridui-frame-fill\"\n aria-hidden=\"true\"\n >\n <div\n className={cn(frameContentStyles())}\n />\n </div>\n </>);\n return (<FrameRailGroup\n {...restProps}\n rail={railScope === \"page\" ? rail : undefined}\n {...railOptions}\n className={cn(pageFrameVariants({ width }), className)}\n >\n {header ? (<div\n className=\"gridui-frame-page-header\"\n >\n {header}\n </div>) : null}\n <main\n className=\"gridui-frame-main\"\n style={mainGutterStart === undefined ? undefined : spacingStyle(\"main-gutter-start\", mainGutterStart)}\n >\n {railScope === \"main\" && rail !== undefined && rail !== null && rail !== false ? (<FrameRailGroup\n rail={rail}\n {...railOptions}\n className=\"gridui-frame-main-rail-group\"\n >\n {content}\n </FrameRailGroup>) : content}\n </main>\n {footer ? (<div\n className=\"gridui-frame-page-footer\"\n >\n {footer}\n </div>) : null}\n </FrameRailGroup>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Texture\n * @description Texture\n */\n\nimport type { FC } from \"react\";\n\nexport type FrameTextureStyle = \"none\" | \"grid\" | \"dots\" | \"lines\";\n\nexport type FrameTextureProps = {\n readonly texture: FrameTextureStyle;\n};\n\nexport const FrameTexture: FC<FrameTextureProps> = (props: FrameTextureProps) => {\n const { texture } = props;\n return texture === \"none\" ? null : (<div\n className=\"gridui-frame-texture\"\n data-texture={texture}\n aria-hidden=\"true\"\n inert\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame\n * @description Section\n */\n\nimport type { FrameBoundaryStyle } from \"./boundary/boundary\";\nimport { FrameBoundary } from \"./boundary/boundary\";\nimport type { FrameDecorationStyle } from \"./decoration/decoration\";\nimport { FrameDecoration, resolveFrameDecoration } from \"./decoration/decoration\";\nimport type { FrameTone } from \"./style\";\nimport { frameContentStyles, frameToneStyles } from \"./style\";\nimport type { FrameTextureStyle } from \"./texture/texture\";\nimport { FrameTexture } from \"./texture/texture\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type FrameSectionProps = ComponentPropsWithRef<\"section\"> & {\n readonly tone?: FrameTone;\n readonly boundary?: FrameBoundaryStyle;\n readonly decoration?: FrameDecorationStyle;\n readonly texture?: FrameTextureStyle;\n readonly edges?: \"frame\" | \"none\";\n};\n\nexport const FrameSection: FC<FrameSectionProps> = (props: FrameSectionProps) => {\n const {\n tone = \"neutral\",\n boundary = \"line\",\n decoration,\n texture = \"none\",\n edges = \"frame\",\n className,\n children,\n ...restProps\n } = props;\n return (<section\n {...restProps}\n className={cn(\"gridui-container gridui-frame-section\", frameToneStyles({ tone }), className)}\n data-edges={edges}\n >\n <FrameBoundary\n boundary={boundary}\n />\n <div\n className={cn(frameContentStyles(), \"gridui-frame-surface\", edges === \"none\" && \"border-x-0\")}\n >\n <FrameTexture\n texture={texture}\n />\n {children}\n <FrameDecoration\n decoration={resolveFrameDecoration(boundary, decoration)}\n />\n </div>\n </section>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Container\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const containerVariants = cva(\"gridui-container\", {\n variants: {\n width: {\n narrow: \"gridui-container-narrow\",\n standard: \"gridui-container-standard\",\n wide: \"gridui-container-wide\",\n },\n },\n defaultVariants: { width: \"standard\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Container\n * @description Container\n */\n\nimport type { ElementProps } from \"../types\";\nimport { containerVariants } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type ContainerProps = ElementProps & {\n readonly width?: \"narrow\" | \"standard\" | \"wide\";\n};\n\nexport const Container: FC<ContainerProps> = (props: ContainerProps) => {\n const { width = \"standard\", className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(containerVariants({ width }), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const gridStyles = cva(cn(\n \"gridui-grid\",\n \"grid min-w-0\",\n));\n\nexport const gridCellsStyles = cva(cn(\n \"gridui-grid-cells\",\n \"border-t border-solid border-border border-l border-solid border-border\",\n));\n\nexport const gridItemStyles = cva(cn(\n \"gridui-grid-item\",\n \"min-w-0 wrap-anywhere\",\n));\n\nexport const gridInternalStyles = cva(cn(\n \"gridui-grid-internal\",\n \"bg-border\",\n));\n\nexport const gridVariants = cva(gridStyles(), {\n variants: {\n frame: {\n none: \"\",\n cells: gridCellsStyles(),\n internal: gridInternalStyles(),\n },\n },\n defaultVariants: { frame: \"none\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Grid Item\n */\n\nimport type { Responsive, Space, Span } from \"../responsive\";\nimport { resolveResponsive, spaceValue, spanValue } from \"../responsive\";\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport { gridItemStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { FC } from \"react\";\n\nexport type GridItemProps = ElementProps & {\n readonly asChild?: boolean;\n readonly span?: Responsive<Span>;\n readonly padding?: Responsive<Space>;\n readonly align?: \"end\" | \"center\";\n};\n\nexport const GridItem: FC<GridItemProps> = (props: GridItemProps) => {\n const {\n asChild = false,\n span = 1,\n padding = 0,\n align,\n className,\n style,\n ...restProps\n } = props;\n const size = resolveResponsive(span);\n const inset = resolveResponsive(padding);\n const layoutStyle: LayoutStyle = {\n \"--gridui-span\": spanValue(size.base),\n \"--gridui-span-md\": spanValue(size.md),\n \"--gridui-span-lg\": spanValue(size.lg),\n \"--gridui-padding\": spaceValue(inset.base),\n \"--gridui-padding-md\": spaceValue(inset.md),\n \"--gridui-padding-lg\": spaceValue(inset.lg),\n ...(align ? {\n display: \"flex\",\n alignItems: align,\n } : {}),\n ...style,\n };\n\n const Component = asChild ? Slot : \"div\";\n return (<Component\n {...restProps}\n className={cn(gridItemStyles(), className)}\n style={layoutStyle}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Tracks\n */\n\nimport type { GridColumns } from \"../responsive\";\n\nexport const gridColumnCount = (columns: GridColumns): number => {\n return typeof columns === \"number\" ? columns : columns.length;\n};\n\nexport const gridTemplate = (columns: GridColumns): string => {\n if (typeof columns === \"number\") {\n return `repeat(${columns}, minmax(0, 1fr))`;\n }\n return columns.map((track) => {\n return track === \"1fr\" ? \"minmax(0, 1fr)\" : track;\n }).join(\" \");\n};\n\n// Fill incomplete rows before the next item wraps or starts a full-width row.\nexport const fillGridRowSpans = (columns: number, spans: readonly number[]): number[] => {\n let occupied = 0;\n return spans.map((span, index) => {\n if (span < 1 || span > columns) {\n throw new RangeError(\"Grid item spans must fit within the grid columns.\");\n }\n if (occupied + span > columns) {\n occupied = 0;\n }\n occupied += span;\n const next = spans[index + 1];\n if (next === undefined || occupied + next > columns) {\n const filled = span + columns - occupied;\n occupied = 0;\n return filled;\n }\n if (occupied === columns) {\n occupied = 0;\n }\n return span;\n });\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Grid\n */\n\nimport type { GridColumns, Responsive, Space } from \"../responsive\";\nimport { resolveResponsive, spaceValue } from \"../responsive\";\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport type { GridItemProps } from \"./grid-item\";\nimport { GridItem } from \"./grid-item\";\nimport { gridVariants } from \"./style\";\nimport { fillGridRowSpans, gridColumnCount, gridTemplate } from \"./tracks\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\nimport { Children, cloneElement, isValidElement } from \"react\";\n\nexport type GridProps = ElementProps & {\n readonly columns?: Responsive<GridColumns>;\n readonly fillLastRow?: boolean;\n} & ({\n readonly frame?: \"none\";\n readonly gap?: Responsive<Space>;\n} | {\n readonly frame: \"cells\" | \"internal\";\n readonly gap?: never;\n});\n\nexport const Grid: FC<GridProps> = (props: GridProps) => {\n const {\n columns = 1,\n frame = \"none\",\n gap = 16,\n fillLastRow = false,\n className,\n style,\n children,\n ...restProps\n } = props;\n const tracks = resolveResponsive(columns);\n const count = {\n base: gridColumnCount(tracks.base),\n md: gridColumnCount(tracks.md),\n lg: gridColumnCount(tracks.lg),\n };\n const spacing = resolveResponsive(frame === \"none\" ? gap : 0);\n const layoutStyle: LayoutStyle = {\n \"--gridui-columns\": count.base,\n \"--gridui-columns-md\": count.md,\n \"--gridui-columns-lg\": count.lg,\n \"--gridui-grid-template\": gridTemplate(tracks.base),\n \"--gridui-grid-template-md\": gridTemplate(tracks.md),\n \"--gridui-grid-template-lg\": gridTemplate(tracks.lg),\n \"--gridui-gap\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.base),\n \"--gridui-gap-md\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.md),\n \"--gridui-gap-lg\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.lg),\n ...style,\n };\n let content = children;\n if (fillLastRow) {\n const items = Children.toArray(children).map((child) => {\n if (!isValidElement<GridItemProps>(child) || child.type !== GridItem) {\n throw new TypeError(\"Grid fillLastRow requires direct GridItem children.\");\n }\n return child;\n });\n const spans = items.map((item) => {\n return resolveResponsive(item.props.span ?? 1);\n });\n const filled = {\n base: fillGridRowSpans(count.base, spans.map((span) => {\n return span.base === \"full\" ? count.base : span.base;\n })),\n md: fillGridRowSpans(count.md, spans.map((span) => {\n return span.md === \"full\" ? count.md : span.md;\n })),\n lg: fillGridRowSpans(count.lg, spans.map((span) => {\n return span.lg === \"full\" ? count.lg : span.lg;\n })),\n };\n content = items.map((item, index) => {\n const itemStyle: LayoutStyle = {\n \"--gridui-span\": `span ${filled.base[index]} / span ${filled.base[index]}`,\n \"--gridui-span-md\": `span ${filled.md[index]} / span ${filled.md[index]}`,\n \"--gridui-span-lg\": `span ${filled.lg[index]} / span ${filled.lg[index]}`,\n ...item.props.style,\n };\n return cloneElement(item, {\n style: itemStyle,\n });\n });\n }\n return (<div\n {...restProps}\n className={cn(gridVariants({ frame }), className)}\n style={layoutStyle}\n >\n {content}\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Row\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const rowStyles = cva(cn(\n \"gridui-row\",\n \"min-w-0\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Row\n * @description Row\n */\n\nimport type { Space } from \"../responsive\";\nimport { spaceValue } from \"../responsive\";\nimport { rowStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type RowProps = ComponentPropsWithRef<\"div\"> & {\n readonly gap?: Space;\n readonly rowGap?: Space;\n readonly align?: \"stretch\" | \"center\" | \"baseline\" | \"end\";\n readonly justify?: \"start\" | \"between\";\n readonly wrap?: boolean;\n readonly inline?: boolean;\n};\n\nexport const Row: FC<RowProps> = (props: RowProps) => {\n const {\n gap = 16,\n rowGap = gap,\n align = \"stretch\",\n justify = \"start\",\n wrap = true,\n inline = false,\n className,\n style,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n className={cn(rowStyles(), className)}\n data-inline={inline}\n style={{\n display: inline ? \"inline-flex\" : \"flex\",\n alignItems: align,\n justifyContent: justify === \"between\" ? \"space-between\" : \"flex-start\",\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n gap: `${spaceValue(rowGap)} ${spaceValue(gap)}`,\n ...style,\n }}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Stack\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const stackStyles = cva(cn(\n \"gridui-stack\",\n \"flex min-w-0 flex-col\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Stack\n * @description Stack\n */\n\nimport type { Responsive, Space } from \"../responsive\";\nimport { resolveResponsive, spaceValue } from \"../responsive\";\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport { stackStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { CSSProperties, FC } from \"react\";\n\nexport type StackProps = ElementProps & {\n readonly gap?: Responsive<Space>;\n readonly width?: \"full\";\n readonly maxWidth?: CSSProperties[\"maxWidth\"];\n readonly paddingStart?: Space;\n};\n\nexport const Stack: FC<StackProps> = (props: StackProps) => {\n const {\n gap = 16,\n width,\n maxWidth,\n paddingStart,\n className,\n style,\n ...restProps\n } = props;\n const spacing = resolveResponsive(gap);\n const layoutStyle: LayoutStyle = {\n \"--gridui-gap\": spaceValue(spacing.base),\n \"--gridui-gap-md\": spaceValue(spacing.md),\n \"--gridui-gap-lg\": spaceValue(spacing.lg),\n width: width === \"full\" ? \"100%\" : undefined,\n maxWidth,\n paddingTop: paddingStart === undefined ? undefined : spaceValue(paddingStart),\n ...style,\n };\n return (<div\n {...restProps}\n className={cn(stackStyles(), className)}\n style={layoutStyle}\n />);\n};\n"],
|
|
5
|
-
"mappings": ";AAoBO,IAAM,oBAAoB,CAAgD,UAK5E;AACD,MAAI,OAAO,UAAU,YAAY,EAAE,UAAU,QAAQ;AACjD,WAAO;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACR;AAAA,EACJ;A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A,GAAG;AAAA,EACP,IAAI;AACJ,QAAM,UAAU,kBAAkB,GAAG;AACrC,QAAM,cAA2B;AAAA,IAC7B,gBAAgB,WAAW,QAAQ,IAAI;AAAA,IACvC,mBAAmB,WAAW,QAAQ,EAAE;AAAA,IACxC,mBAAmB,WAAW,QAAQ,EAAE;AAAA,IACxC,OAAO,UAAU,SAAS,SAAS;AAAA,IACnC;AAAA,IACA,YAAY,iBAAiB,SAAY,SAAY,WAAW,YAAY;AAAA,IAC5E,GAAG;AAAA,EACP;AACA,SAAQ,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWD,KAAG,YAAY,GAAG,SAAS;AAAA,MACtC,OAAO;AAAA;AAAA,EACX;AACJ;",
|
|
6
|
-
"names": ["jsx", "cn", "cn", "cva", "cn", "jsx", "cva", "cn", "jsx", "jsxs", "cva", "cn", "jsx", "jsxs", "jsx", "cn", "jsx", "jsxs", "cva", "cn", "jsx", "cn", "cva", "cn", "jsx", "cn", "jsx", "cn", "cva", "cn", "jsx", "cn", "cva", "cn", "jsx"]
|
|
3
|
+
"sources": ["../src/frame/boundary/boundary.tsx", "../src/frame/decoration/decoration.tsx", "../src/frame/style.ts", "../src/frame/chrome/style.ts", "../src/frame/chrome/chrome.tsx", "../src/frame/rail/style.ts", "../src/frame/rail/rail.tsx", "../src/frame/page/style.ts", "../src/frame/page/page.tsx", "../src/frame/texture/texture.tsx", "../src/frame/section.tsx", "../src/primitives/container/style.ts", "../src/primitives/container/container.tsx", "../src/primitives/responsive.ts", "../src/primitives/grid/style.ts", "../src/primitives/grid/grid-item.tsx", "../src/primitives/grid/tracks.ts", "../src/primitives/grid/grid.tsx", "../src/primitives/row/style.ts", "../src/primitives/row/row.tsx", "../src/primitives/split/split.tsx", "../src/primitives/stack/style.ts", "../src/primitives/stack/stack.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Boundary\n * @description Boundary\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type FrameBoundaryStyle = \"none\" | \"line\" | \"band\" | \"stripe\" | \"space\";\n\nexport type FrameBoundaryProps = {\n readonly boundary: FrameBoundaryStyle;\n};\n\nexport const FrameBoundary: FC<FrameBoundaryProps> = (props: FrameBoundaryProps) => {\n const { boundary } = props;\n return boundary === \"none\" ? null : (<div\n className={cn(\n \"gridui-frame-boundary\",\n (boundary === \"band\" || boundary === \"stripe\") && \"gridui-frame-divider\",\n boundary === \"stripe\" && \"gridui-frame-stripe\",\n boundary === \"space\" && \"gridui-frame-space\",\n )}\n aria-hidden=\"true\"\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Decoration\n * @description Decoration\n */\n\nimport type { FrameBoundaryStyle } from \"../boundary/boundary\";\nimport type { FC } from \"react\";\n\nexport type FrameDecorationStyle = \"none\" | \"nodes\" | \"marks\" | \"corners\" | \"ticks\";\n\nexport const resolveFrameDecoration = (\n boundary: FrameBoundaryStyle,\n decoration?: FrameDecorationStyle,\n): FrameDecorationStyle => {\n return decoration ?? (boundary === \"band\" ? \"nodes\" : \"none\");\n};\n\nexport type FrameDecorationProps = {\n readonly decoration: FrameDecorationStyle;\n};\n\nexport const FrameDecoration: FC<FrameDecorationProps> = (props: FrameDecorationProps) => {\n const { decoration } = props;\n return decoration === \"none\" ? null : (<div\n className=\"gridui-frame-decoration\"\n data-decoration={decoration}\n aria-hidden=\"true\"\n inert\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport type FrameTone = \"neutral\" | \"brand\" | \"warning\" | \"danger\";\n\nexport const frameToneStyles = cva(\"\", {\n variants: {\n tone: {\n neutral: \"\",\n brand: \"gridui-frame-brand\",\n warning: \"gridui-frame-warning\",\n danger: \"gridui-frame-danger\",\n },\n },\n});\n\nexport const frameContentStyles = cva(cn(\n \"gridui-frame-content\",\n \"border-x border-solid border-border wrap-anywhere\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Chrome\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const frameChromeStyles = cva(\"gridui-frame-chrome\");\n\nexport const frameSignatureStyles = cva(cn(\n \"gridui-frame-signature flex min-w-0 items-center justify-center gap-gridui-24 py-gridui-32 px-gridui-24 overflow-hidden border-t border-solid border-border bg-transparent\",\n \"[&>svg]:h-auto [&>svg]:opacity-30 [&>span]:font-display [&>span]:leading-none [&>span]:text-transparent\",\n));\n\nexport const frameSignatureCroppedStyles = cva(\"gridui-frame-signature-cropped block pb-0 @container [&>span]:block [&>span]:text-center [&>span]:whitespace-nowrap\");\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Chrome\n * @description Chrome\n */\n\nimport type { FrameBoundaryStyle } from \"../boundary/boundary\";\nimport { FrameBoundary } from \"../boundary/boundary\";\nimport type { FrameDecorationStyle } from \"../decoration/decoration\";\nimport { FrameDecoration, resolveFrameDecoration } from \"../decoration/decoration\";\nimport type { FrameTone } from \"../style\";\nimport { frameContentStyles, frameToneStyles } from \"../style\";\nimport { frameChromeStyles, frameSignatureCroppedStyles, frameSignatureStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive, spaceValue } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, CSSProperties, FC, ReactNode } from \"react\";\n\nexport type ChromeProps = {\n readonly padding?: Responsive<Space>;\n};\n\nconst chromeStyle = (padding: Responsive<Space>): CSSProperties & {\n \"--gridui-chrome-padding\": string;\n \"--gridui-chrome-padding-md\": string;\n \"--gridui-chrome-padding-lg\": string;\n} => {\n const values = resolveResponsive(padding);\n return {\n \"--gridui-chrome-padding\": spaceValue(values.base),\n \"--gridui-chrome-padding-md\": spaceValue(values.md),\n \"--gridui-chrome-padding-lg\": spaceValue(values.lg),\n };\n};\n\nexport type FrameHeaderProps = ComponentPropsWithRef<\"header\"> & ChromeProps & {\n readonly wrap?: boolean;\n readonly gap?: Space;\n readonly justify?: \"start\" | \"between\";\n};\n\nexport const FrameHeader: FC<FrameHeaderProps> = (props: FrameHeaderProps) => {\n const { padding = {\n base: 16,\n md: 24,\n }, wrap = true, gap = 16, justify = \"between\", className, children, ...restProps } = props;\n return (<header\n {...restProps}\n className={cn(\"gridui-container gridui-frame-header\", className)}\n >\n <div\n className={cn(frameContentStyles(), frameChromeStyles())}\n data-justify={justify}\n style={{\n ...chromeStyle(padding),\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n gap: spaceValue(gap),\n }}\n >\n {children}\n </div>\n </header>);\n};\n\nexport type FrameFooterProps = ComponentPropsWithRef<\"footer\"> & ChromeProps & {\n readonly contentLayout?: \"flex\" | \"block\";\n readonly tone?: FrameTone;\n readonly boundary?: FrameBoundaryStyle;\n readonly decoration?: FrameDecorationStyle;\n readonly signature?: ReactNode;\n readonly signatureAppearance?: \"standard\" | \"cropped\";\n};\n\nexport const FrameFooter: FC<FrameFooterProps> = (props: FrameFooterProps) => {\n const { padding = {\n base: 16,\n md: 24,\n }, contentLayout = \"flex\", tone = \"neutral\", boundary = \"line\", decoration, signature, signatureAppearance = \"standard\", className, children, ...restProps } = props;\n return (<footer\n {...restProps}\n className={cn(\"gridui-container gridui-frame-footer\", frameToneStyles({\n tone,\n }), className)}\n >\n <FrameBoundary\n boundary={boundary}\n />\n <div\n className={cn(frameContentStyles(), frameChromeStyles(), \"gridui-frame-surface\")}\n data-content-layout={contentLayout}\n style={chromeStyle(padding)}\n >\n {children}\n <FrameDecoration\n decoration={resolveFrameDecoration(boundary, decoration)}\n />\n </div>\n {signature ? (<div\n className={cn(frameContentStyles(), frameSignatureStyles(), signatureAppearance === \"cropped\" && frameSignatureCroppedStyles())}\n aria-hidden=\"true\"\n inert\n >\n {signature}\n </div>) : null}\n </footer>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Rail\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const frameRailStyles = cva(\"gridui-frame-rail flex h-full box-border flex-col py-gridui-24 text-muted\");\n\nexport const frameRailContentStyles = cva(\"gridui-frame-rail-content relative z-(--gridui-z-interaction) min-w-0 type-eyebrow bg-inherit\");\n\nexport const frameRailStickyBottomStyles = cva(\"gridui-frame-rail-sticky-bottom justify-end [&>.gridui-frame-rail-content]:sticky\");\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Rail\n * @description Rail\n */\n\nimport { frameRailContentStyles, frameRailStickyBottomStyles, frameRailStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive, spaceValue } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, CSSProperties, FC, ReactNode } from \"react\";\n\nexport type FrameRailProps = ComponentPropsWithRef<\"div\"> & {\n readonly placement?: \"start\" | \"sticky-bottom\";\n};\n\nexport const FrameRail: FC<FrameRailProps> = (props: FrameRailProps) => {\n const {\n placement = \"start\",\n children,\n className,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n className={cn(frameRailStyles(), placement === \"sticky-bottom\" && frameRailStickyBottomStyles(), className)}\n >\n <div\n className={frameRailContentStyles()}\n >\n {children}\n </div>\n </div>);\n};\n\nexport type FrameRailGroupProps = ComponentPropsWithRef<\"div\"> & {\n readonly rail?: ReactNode;\n readonly railWidth?: Responsive<Space>;\n};\n\nexport const FrameRailGroup: FC<FrameRailGroupProps> = (props: FrameRailGroupProps) => {\n const { rail, railWidth = {\n base: 0,\n md: 32,\n }, children, className, style, ...restProps } = props;\n const hasRail = rail !== undefined && rail !== null && rail !== false;\n const width = resolveResponsive(hasRail ? railWidth : 0);\n const layoutStyle: CSSProperties & {\n [key: `--gridui-${string}`]: string | number;\n } = {\n \"--gridui-rail-width-base\": spaceValue(width.base),\n \"--gridui-rail-width-md\": spaceValue(width.md),\n \"--gridui-rail-width-lg\": spaceValue(width.lg),\n \"--gridui-rail-display-base\": width.base === 0 ? \"none\" : \"block\",\n \"--gridui-rail-display-md\": width.md === 0 ? \"none\" : \"block\",\n \"--gridui-rail-display-lg\": width.lg === 0 ? \"none\" : \"block\",\n ...style,\n };\n return (<div\n {...restProps}\n className={cn(\"gridui-frame-rail-group\", className)}\n style={layoutStyle}\n >\n {hasRail ? (<div\n className=\"gridui-frame-rail-track\"\n >\n {rail}\n </div>) : null}\n <div\n className=\"gridui-frame-rail-body\"\n >\n {children}\n </div>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Page\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const pageFrameVariants = cva(\"gridui-page-frame min-h-svh\", {\n variants: {\n width: {\n narrow: \"gridui-container-narrow\",\n standard: \"gridui-container-standard\",\n wide: \"gridui-container-wide\",\n },\n },\n defaultVariants: { width: \"standard\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Page\n * @description Page\n */\n\nimport type { ContainerProps } from \"../../primitives/container/container\";\nimport type { FrameRailGroupProps } from \"../rail/rail\";\nimport { FrameRailGroup } from \"../rail/rail\";\nimport { frameContentStyles } from \"../style\";\nimport { pageFrameVariants } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { spacingVariables } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC, ReactNode } from \"react\";\n\nexport type PageFrameProps = FrameRailGroupProps & {\n readonly width?: ContainerProps[\"width\"];\n readonly header?: ReactNode;\n readonly footer?: ReactNode;\n readonly railScope?: \"page\" | \"main\";\n readonly mainGutterStart?: Responsive<Space>;\n};\n\nexport type FrameSectionsProps = ComponentPropsWithRef<\"div\">;\n\nexport const FrameSections: FC<FrameSectionsProps> = (props: FrameSectionsProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(\"gridui-frame-sections\", className)}\n />);\n};\n\nexport const PageFrame: FC<PageFrameProps> = (props: PageFrameProps) => {\n const {\n width = \"standard\",\n header,\n footer,\n rail,\n railWidth,\n railScope = \"page\",\n mainGutterStart,\n children,\n className,\n ...restProps\n } = props;\n const railOptions = railWidth === undefined ? {} : { railWidth };\n const content = (<>\n <FrameSections>\n {children}\n </FrameSections>\n <div\n className=\"gridui-container gridui-frame-fill\"\n aria-hidden=\"true\"\n >\n <div\n className={cn(frameContentStyles())}\n />\n </div>\n </>);\n return (<FrameRailGroup\n {...restProps}\n rail={railScope === \"page\" ? rail : undefined}\n {...railOptions}\n className={cn(pageFrameVariants({ width }), className)}\n >\n {header ? (<div\n className=\"gridui-frame-page-header\"\n >\n {header}\n </div>) : null}\n <main\n className=\"gridui-frame-main\"\n style={mainGutterStart === undefined ? undefined : spacingVariables(\"main-gutter-start\", mainGutterStart)}\n >\n {railScope === \"main\" && rail !== undefined && rail !== null && rail !== false ? (<FrameRailGroup\n rail={rail}\n {...railOptions}\n className=\"gridui-frame-main-rail-group\"\n >\n {content}\n </FrameRailGroup>) : content}\n </main>\n {footer ? (<div\n className=\"gridui-frame-page-footer\"\n >\n {footer}\n </div>) : null}\n </FrameRailGroup>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame_Texture\n * @description Texture\n */\n\nimport type { FC } from \"react\";\n\nexport type FrameTextureStyle = \"none\" | \"grid\" | \"dots\" | \"lines\";\n\nexport type FrameTextureProps = {\n readonly texture: FrameTextureStyle;\n};\n\nexport const FrameTexture: FC<FrameTextureProps> = (props: FrameTextureProps) => {\n const { texture } = props;\n return texture === \"none\" ? null : (<div\n className=\"gridui-frame-texture\"\n data-texture={texture}\n aria-hidden=\"true\"\n inert\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Frame\n * @description Section\n */\n\nimport type { FrameBoundaryStyle } from \"./boundary/boundary\";\nimport { FrameBoundary } from \"./boundary/boundary\";\nimport type { FrameDecorationStyle } from \"./decoration/decoration\";\nimport { FrameDecoration, resolveFrameDecoration } from \"./decoration/decoration\";\nimport type { FrameTone } from \"./style\";\nimport { frameContentStyles, frameToneStyles } from \"./style\";\nimport type { FrameTextureStyle } from \"./texture/texture\";\nimport { FrameTexture } from \"./texture/texture\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { spacingVariables } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type FrameSectionProps = ComponentPropsWithRef<\"section\"> & {\n readonly tone?: FrameTone;\n readonly boundary?: FrameBoundaryStyle;\n readonly decoration?: FrameDecorationStyle;\n readonly texture?: FrameTextureStyle;\n readonly edges?: \"frame\" | \"none\";\n readonly paddingInline?: Responsive<Space>;\n readonly paddingBlock?: Responsive<Space>;\n};\n\nexport const FrameSection: FC<FrameSectionProps> = (props: FrameSectionProps) => {\n const {\n tone = \"neutral\",\n boundary = \"line\",\n decoration,\n texture = \"none\",\n edges = \"frame\",\n paddingInline = 0,\n paddingBlock = 0,\n className,\n children,\n ...restProps\n } = props;\n return (<section\n {...restProps}\n className={cn(\"gridui-container gridui-frame-section\", frameToneStyles({ tone }), className)}\n data-edges={edges}\n >\n <FrameBoundary\n boundary={boundary}\n />\n <div\n className={cn(frameContentStyles(), \"gridui-frame-surface\", edges === \"none\" && \"border-x-0\")}\n style={{\n ...spacingVariables(\"section-padding-inline\", paddingInline),\n ...spacingVariables(\"section-padding-block\", paddingBlock),\n }}\n >\n <FrameTexture\n texture={texture}\n />\n {children}\n <FrameDecoration\n decoration={resolveFrameDecoration(boundary, decoration)}\n />\n </div>\n </section>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Container\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const containerVariants = cva(\"gridui-container\", {\n variants: {\n width: {\n narrow: \"gridui-container-narrow\",\n standard: \"gridui-container-standard\",\n wide: \"gridui-container-wide\",\n },\n },\n defaultVariants: { width: \"standard\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Container\n * @description Container\n */\n\nimport type { ElementProps } from \"../types\";\nimport { containerVariants } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type ContainerProps = ElementProps & {\n readonly width?: \"narrow\" | \"standard\" | \"wide\";\n};\n\nexport const Container: FC<ContainerProps> = (props: ContainerProps) => {\n const { width = \"standard\", className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(containerVariants({ width }), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives\n * @description Responsive\n */\n\nexport type Columns = 1 | 2 | 3 | 4 | 6 | 12;\nexport type GridTrack = \"1fr\" | \"auto\";\nexport type GridColumns = Columns | readonly [GridTrack, ...GridTrack[]];\nexport type Span = Columns | 5 | 7 | 8 | 9 | 10 | 11 | \"full\";\nexport const spanValue = (value: Span): string => {\n return value === \"full\" ? \"1 / -1\" : `span ${value} / span ${value}`;\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const gridStyles = cva(cn(\n \"gridui-grid\",\n \"grid min-w-0\",\n));\n\nexport const gridCellsStyles = cva(cn(\n \"gridui-grid-cells\",\n \"border-t border-solid border-border border-l border-solid border-border\",\n));\n\nexport const gridItemStyles = cva(cn(\n \"gridui-grid-item\",\n \"min-w-0 wrap-anywhere\",\n));\n\nexport const gridInternalStyles = cva(cn(\n \"gridui-grid-internal\",\n \"bg-border\",\n));\n\nexport const gridVariants = cva(gridStyles(), {\n variants: {\n frame: {\n none: \"\",\n cells: gridCellsStyles(),\n internal: gridInternalStyles(),\n },\n },\n defaultVariants: { frame: \"none\" },\n});\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Grid Item\n */\n\nimport type { Span } from \"../responsive\";\nimport { spanValue } from \"../responsive\";\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport { gridItemStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive, spaceValue } from \"@gridui/style-utils/responsive\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { FC } from \"react\";\n\nexport type GridItemProps = ElementProps & {\n readonly asChild?: boolean;\n readonly span?: Responsive<Span>;\n readonly padding?: Responsive<Space>;\n readonly align?: \"end\" | \"center\";\n};\n\nexport const GridItem: FC<GridItemProps> = (props: GridItemProps) => {\n const {\n asChild = false,\n span = 1,\n padding = 0,\n align,\n className,\n style,\n ...restProps\n } = props;\n const size = resolveResponsive(span);\n const inset = resolveResponsive(padding);\n const layoutStyle: LayoutStyle = {\n \"--gridui-span\": spanValue(size.base),\n \"--gridui-span-md\": spanValue(size.md),\n \"--gridui-span-lg\": spanValue(size.lg),\n \"--gridui-padding\": spaceValue(inset.base),\n \"--gridui-padding-md\": spaceValue(inset.md),\n \"--gridui-padding-lg\": spaceValue(inset.lg),\n ...(align ? {\n display: \"flex\",\n alignItems: align,\n } : {}),\n ...style,\n };\n\n const Component = asChild ? Slot : \"div\";\n return (<Component\n {...restProps}\n className={cn(gridItemStyles(), className)}\n style={layoutStyle}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Tracks\n */\n\nimport type { GridColumns } from \"../responsive\";\n\nexport const gridColumnCount = (columns: GridColumns): number => {\n return typeof columns === \"number\" ? columns : columns.length;\n};\n\nexport const gridTemplate = (columns: GridColumns): string => {\n if (typeof columns === \"number\") {\n return `repeat(${columns}, minmax(0, 1fr))`;\n }\n return columns.map((track) => {\n return track === \"1fr\" ? \"minmax(0, 1fr)\" : track;\n }).join(\" \");\n};\n\n// Fill incomplete rows before the next item wraps or starts a full-width row.\nexport const fillGridRowSpans = (columns: number, spans: readonly number[]): number[] => {\n let occupied = 0;\n return spans.map((span, index) => {\n if (span < 1 || span > columns) {\n throw new RangeError(\"Grid item spans must fit within the grid columns.\");\n }\n if (occupied + span > columns) {\n occupied = 0;\n }\n occupied += span;\n const next = spans[index + 1];\n if (next === undefined || occupied + next > columns) {\n const filled = span + columns - occupied;\n occupied = 0;\n return filled;\n }\n if (occupied === columns) {\n occupied = 0;\n }\n return span;\n });\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Grid\n * @description Grid\n */\n\nimport type { GridColumns } from \"../responsive\";\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport type { GridItemProps } from \"./grid-item\";\nimport { GridItem } from \"./grid-item\";\nimport { gridVariants } from \"./style\";\nimport { fillGridRowSpans, gridColumnCount, gridTemplate } from \"./tracks\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive, spaceValue } from \"@gridui/style-utils/responsive\";\nimport type { FC } from \"react\";\nimport { Children, cloneElement, isValidElement } from \"react\";\n\nexport type GridProps = ElementProps & {\n readonly columns?: Responsive<GridColumns>;\n readonly fillLastRow?: boolean;\n} & ({\n readonly frame?: \"none\";\n readonly gap?: Responsive<Space>;\n} | {\n readonly frame: \"cells\" | \"internal\";\n readonly gap?: never;\n});\n\nexport const Grid: FC<GridProps> = (props: GridProps) => {\n const {\n columns = 1,\n frame = \"none\",\n gap = 16,\n fillLastRow = false,\n className,\n style,\n children,\n ...restProps\n } = props;\n const tracks = resolveResponsive(columns);\n const count = {\n base: gridColumnCount(tracks.base),\n md: gridColumnCount(tracks.md),\n lg: gridColumnCount(tracks.lg),\n };\n const spacing = resolveResponsive(frame === \"none\" ? gap : 0);\n const layoutStyle: LayoutStyle = {\n \"--gridui-columns\": count.base,\n \"--gridui-columns-md\": count.md,\n \"--gridui-columns-lg\": count.lg,\n \"--gridui-grid-template\": gridTemplate(tracks.base),\n \"--gridui-grid-template-md\": gridTemplate(tracks.md),\n \"--gridui-grid-template-lg\": gridTemplate(tracks.lg),\n \"--gridui-gap\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.base),\n \"--gridui-gap-md\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.md),\n \"--gridui-gap-lg\": frame === \"internal\" ? \"1px\" : spaceValue(spacing.lg),\n ...style,\n };\n let content = children;\n if (fillLastRow) {\n const items = Children.toArray(children).map((child) => {\n if (!isValidElement<GridItemProps>(child) || child.type !== GridItem) {\n throw new TypeError(\"Grid fillLastRow requires direct GridItem children.\");\n }\n return child;\n });\n const spans = items.map((item) => {\n return resolveResponsive(item.props.span ?? 1);\n });\n const filled = {\n base: fillGridRowSpans(count.base, spans.map((span) => {\n return span.base === \"full\" ? count.base : span.base;\n })),\n md: fillGridRowSpans(count.md, spans.map((span) => {\n return span.md === \"full\" ? count.md : span.md;\n })),\n lg: fillGridRowSpans(count.lg, spans.map((span) => {\n return span.lg === \"full\" ? count.lg : span.lg;\n })),\n };\n content = items.map((item, index) => {\n const itemStyle: LayoutStyle = {\n \"--gridui-span\": `span ${filled.base[index]} / span ${filled.base[index]}`,\n \"--gridui-span-md\": `span ${filled.md[index]} / span ${filled.md[index]}`,\n \"--gridui-span-lg\": `span ${filled.lg[index]} / span ${filled.lg[index]}`,\n ...item.props.style,\n };\n return cloneElement(item, {\n style: itemStyle,\n });\n });\n }\n return (<div\n {...restProps}\n className={cn(gridVariants({ frame }), className)}\n style={layoutStyle}\n >\n {content}\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Row\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const rowStyles = cva(cn(\n \"gridui-row\",\n \"min-w-0\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Row\n * @description Row\n */\n\nimport { rowStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Space } from \"@gridui/style-utils/responsive\";\nimport { spaceValue } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type RowProps = ComponentPropsWithRef<\"div\"> & {\n readonly gap?: Space;\n readonly rowGap?: Space;\n readonly align?: \"stretch\" | \"center\" | \"baseline\" | \"end\";\n readonly justify?: \"start\" | \"between\";\n readonly wrap?: boolean;\n readonly inline?: boolean;\n};\n\nexport const Row: FC<RowProps> = (props: RowProps) => {\n const {\n gap = 16,\n rowGap = gap,\n align = \"stretch\",\n justify = \"start\",\n wrap = true,\n inline = false,\n className,\n style,\n ...restProps\n } = props;\n return (<div\n {...restProps}\n className={cn(rowStyles(), className)}\n data-inline={inline}\n style={{\n display: inline ? \"inline-flex\" : \"flex\",\n alignItems: align,\n justifyContent: justify === \"between\" ? \"space-between\" : \"flex-start\",\n flexWrap: wrap ? \"wrap\" : \"nowrap\",\n gap: `${spaceValue(rowGap)} ${spaceValue(gap)}`,\n ...style,\n }}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Split\n * @description Split\n */\n\nimport type { ElementProps } from \"../types\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive } from \"@gridui/style-utils/responsive\";\nimport type { FC } from \"react\";\n\nexport type SplitDirection = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\";\n\nexport type SplitProps = ElementProps & {\n readonly direction?: Responsive<SplitDirection>;\n readonly seam?: Responsive<\"line\" | \"none\">;\n};\n\nexport const Split: FC<SplitProps> = (props: SplitProps) => {\n const { direction = \"row\", seam = \"line\", className, ...restProps } = props;\n const directions = resolveResponsive(direction);\n const seams = resolveResponsive(seam);\n return (<div\n {...restProps}\n className={cn(\"gridui-split\", className)}\n data-direction={directions.base}\n data-direction-md={directions.md}\n data-direction-lg={directions.lg}\n data-seam={seams.base}\n data-seam-md={seams.md}\n data-seam-lg={seams.lg}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Stack\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const stackStyles = cva(cn(\n \"gridui-stack\",\n \"flex min-w-0 flex-col\",\n));\n", "/**\n * @author WMXPY\n * @package Grid\n * @namespace Primitives_Stack\n * @description Stack\n */\n\nimport type { ElementProps, LayoutStyle } from \"../types\";\nimport { stackStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { Responsive, Space } from \"@gridui/style-utils/responsive\";\nimport { resolveResponsive, spaceValue } from \"@gridui/style-utils/responsive\";\nimport type { CSSProperties, FC } from \"react\";\n\nexport type StackProps = ElementProps & {\n readonly gap?: Responsive<Space>;\n readonly width?: \"full\";\n readonly maxWidth?: CSSProperties[\"maxWidth\"];\n readonly paddingStart?: Space;\n};\n\nexport const Stack: FC<StackProps> = (props: StackProps) => {\n const {\n gap = 16,\n width,\n maxWidth,\n paddingStart,\n className,\n style,\n ...restProps\n } = props;\n const spacing = resolveResponsive(gap);\n const layoutStyle: LayoutStyle = {\n \"--gridui-gap\": spaceValue(spacing.base),\n \"--gridui-gap-md\": spaceValue(spacing.md),\n \"--gridui-gap-lg\": spaceValue(spacing.lg),\n width: width === \"full\" ? \"100%\" : undefined,\n maxWidth,\n paddingTop: paddingStart === undefined ? undefined : spaceValue(paddingStart),\n ...style,\n };\n return (<div\n {...restProps}\n className={cn(stackStyles(), className)}\n style={layoutStyle}\n />);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,UAAU;AAWsB;AAFlC,IAAM,gBAAwC,CAAC,UAA8B;AAChF,QAAM,EAAE,SAAS,IAAI;AACrB,SAAO,aAAa,SAAS,OAAQ;AAAA,IAAC;AAAA;AAAA,MAClC,WAAW;AAAA,QACP;AAAA,SACC,aAAa,UAAU,aAAa,aAAa;AAAA,QAClD,aAAa,YAAY;AAAA,QACzB,aAAa,WAAW;AA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,SAAS,OAAAC,YAAW;AAEb,IAAM,cAAcA,KAAID;AAAA,EAC3B;AAAA,EACA;AACJ,CAAC;;;ACJD,SAAS,MAAAE,YAAU;AAEnB,SAAS,qBAAAC,oBAAmB,cAAAC,mBAAkB;AA8BlC,gBAAAC,aAAA;AApBL,IAAM,QAAwB,CAAC,UAAsB;AACxD,QAAM;AAAA,IACF,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACP,IAAI;AACJ,QAAM,UAAUF,mBAAkB,GAAG;AACrC,QAAM,cAA2B;AAAA,IAC7B,gBAAgBC,YAAW,QAAQ,IAAI;AAAA,IACvC,mBAAmBA,YAAW,QAAQ,EAAE;AAAA,IACxC,mBAAmBA,YAAW,QAAQ,EAAE;AAAA,IACxC,OAAO,UAAU,SAAS,SAAS;AAAA,IACnC;AAAA,IACA,YAAY,iBAAiB,SAAY,SAAYA,YAAW,YAAY;AAAA,IAC5E,GAAG;AAAA,EACP;AACA,SAAQ,gBAAAC;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWH,KAAG,YAAY,GAAG,SAAS;AAAA,MACtC,OAAO;AAAA;AAAA,EACX;AACJ;",
|
|
6
|
+
"names": ["jsx", "cn", "cn", "cva", "cn", "jsx", "cva", "cn", "resolveResponsive", "spaceValue", "jsx", "jsxs", "cva", "cn", "jsx", "jsxs", "jsx", "cn", "spacingVariables", "jsx", "jsxs", "cva", "cn", "jsx", "cn", "cva", "cn", "resolveResponsive", "spaceValue", "jsx", "cn", "resolveResponsive", "spaceValue", "jsx", "cn", "cva", "cn", "spaceValue", "jsx", "cn", "resolveResponsive", "jsx", "cn", "cva", "cn", "resolveResponsive", "spaceValue", "jsx"]
|
|
7
7
|
}
|
|
@@ -10,9 +10,10 @@ export type { GridProps } from "./grid/grid";
|
|
|
10
10
|
export { Grid } from "./grid/grid";
|
|
11
11
|
export type { GridItemProps } from "./grid/grid-item";
|
|
12
12
|
export { GridItem } from "./grid/grid-item";
|
|
13
|
-
export type { Columns, GridColumns, GridTrack,
|
|
14
|
-
export { spacingStyle } from "./responsive";
|
|
13
|
+
export type { Columns, GridColumns, GridTrack, Span } from "./responsive";
|
|
15
14
|
export type { RowProps } from "./row/row";
|
|
16
15
|
export { Row } from "./row/row";
|
|
16
|
+
export type { SplitDirection, SplitProps } from "./split/split";
|
|
17
|
+
export { Split } from "./split/split";
|
|
17
18
|
export type { StackProps } from "./stack/stack";
|
|
18
19
|
export { Stack } from "./stack/stack";
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @namespace Primitives_Grid
|
|
5
5
|
* @description Grid Item
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { Span } from "../responsive";
|
|
8
8
|
import type { ElementProps } from "../types";
|
|
9
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
9
10
|
import type { FC } from "react";
|
|
10
11
|
export type GridItemProps = ElementProps & {
|
|
11
12
|
readonly asChild?: boolean;
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* @namespace Primitives_Grid
|
|
5
5
|
* @description Grid
|
|
6
6
|
*/
|
|
7
|
-
import type { GridColumns
|
|
7
|
+
import type { GridColumns } from "../responsive";
|
|
8
8
|
import type { ElementProps } from "../types";
|
|
9
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
9
10
|
import type { FC } from "react";
|
|
10
11
|
export type GridProps = ElementProps & {
|
|
11
12
|
readonly columns?: Responsive<GridColumns>;
|
|
@@ -4,24 +4,8 @@
|
|
|
4
4
|
* @namespace Primitives
|
|
5
5
|
* @description Responsive
|
|
6
6
|
*/
|
|
7
|
-
import type { CSSProperties } from "react";
|
|
8
|
-
export type Space = 0 | 4 | 8 | 16 | 24 | 32 | 48 | 64;
|
|
9
7
|
export type Columns = 1 | 2 | 3 | 4 | 6 | 12;
|
|
10
8
|
export type GridTrack = "1fr" | "auto";
|
|
11
9
|
export type GridColumns = Columns | readonly [GridTrack, ...GridTrack[]];
|
|
12
10
|
export type Span = Columns | 5 | 7 | 8 | 9 | 10 | 11 | "full";
|
|
13
|
-
export type Responsive<T extends string | number | readonly string[]> = T | {
|
|
14
|
-
readonly base: T;
|
|
15
|
-
readonly md?: T;
|
|
16
|
-
readonly lg?: T;
|
|
17
|
-
};
|
|
18
|
-
export declare const resolveResponsive: <T extends string | number | readonly string[]>(value: Responsive<T>) => {
|
|
19
|
-
base: T;
|
|
20
|
-
md: T;
|
|
21
|
-
lg: T;
|
|
22
|
-
};
|
|
23
|
-
export declare const spaceValue: (value: Space) => string;
|
|
24
11
|
export declare const spanValue: (value: Span) => string;
|
|
25
|
-
export declare const spacingStyle: (name: string, value: Responsive<Space>) => CSSProperties & {
|
|
26
|
-
[key: `--gridui-${string}`]: string | number;
|
|
27
|
-
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @namespace Primitives_Row
|
|
5
5
|
* @description Row
|
|
6
6
|
*/
|
|
7
|
-
import type { Space } from "
|
|
7
|
+
import type { Space } from "@gridui/style-utils/responsive";
|
|
8
8
|
import type { ComponentPropsWithRef, FC } from "react";
|
|
9
9
|
export type RowProps = ComponentPropsWithRef<"div"> & {
|
|
10
10
|
readonly gap?: Space;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Grid
|
|
4
|
+
* @namespace Primitives_Split
|
|
5
|
+
* @description Split
|
|
6
|
+
*/
|
|
7
|
+
import type { ElementProps } from "../types";
|
|
8
|
+
import type { Responsive } from "@gridui/style-utils/responsive";
|
|
9
|
+
import type { FC } from "react";
|
|
10
|
+
export type SplitDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
11
|
+
export type SplitProps = ElementProps & {
|
|
12
|
+
readonly direction?: Responsive<SplitDirection>;
|
|
13
|
+
readonly seam?: Responsive<"line" | "none">;
|
|
14
|
+
};
|
|
15
|
+
export declare const Split: FC<SplitProps>;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @namespace Primitives_Stack
|
|
5
5
|
* @description Stack
|
|
6
6
|
*/
|
|
7
|
-
import type { Responsive, Space } from "../responsive";
|
|
8
7
|
import type { ElementProps } from "../types";
|
|
8
|
+
import type { Responsive, Space } from "@gridui/style-utils/responsive";
|
|
9
9
|
import type { CSSProperties, FC } from "react";
|
|
10
10
|
export type StackProps = ElementProps & {
|
|
11
11
|
readonly gap?: Responsive<Space>;
|
package/dist/styles.css
CHANGED
|
@@ -41,24 +41,15 @@
|
|
|
41
41
|
.flex-col {
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
}
|
|
44
|
-
.flex-wrap {
|
|
45
|
-
flex-wrap: wrap;
|
|
46
|
-
}
|
|
47
44
|
.items-center {
|
|
48
45
|
align-items: center;
|
|
49
46
|
}
|
|
50
|
-
.justify-between {
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
}
|
|
53
47
|
.justify-center {
|
|
54
48
|
justify-content: center;
|
|
55
49
|
}
|
|
56
50
|
.justify-end {
|
|
57
51
|
justify-content: flex-end;
|
|
58
52
|
}
|
|
59
|
-
.gap-gridui-16 {
|
|
60
|
-
gap: var(--gridui-space-16);
|
|
61
|
-
}
|
|
62
53
|
.gap-gridui-24 {
|
|
63
54
|
gap: var(--gridui-space-24);
|
|
64
55
|
}
|
|
@@ -206,6 +197,22 @@
|
|
|
206
197
|
--gridui-page-gutter-start: var(--gridui-main-gutter-start-lg, var(--gridui-page-gutter));
|
|
207
198
|
}
|
|
208
199
|
}
|
|
200
|
+
.gridui-frame-section > .gridui-frame-surface {
|
|
201
|
+
padding-inline: var(--gridui-section-padding-inline);
|
|
202
|
+
padding-block: var(--gridui-section-padding-block);
|
|
203
|
+
}
|
|
204
|
+
@media (min-width: 40rem) {
|
|
205
|
+
.gridui-frame-section > .gridui-frame-surface {
|
|
206
|
+
padding-inline: var(--gridui-section-padding-inline-md);
|
|
207
|
+
padding-block: var(--gridui-section-padding-block-md);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
@media (min-width: 64rem) {
|
|
211
|
+
.gridui-frame-section > .gridui-frame-surface {
|
|
212
|
+
padding-inline: var(--gridui-section-padding-inline-lg);
|
|
213
|
+
padding-block: var(--gridui-section-padding-block-lg);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
209
216
|
.gridui-frame-rail-group {
|
|
210
217
|
--gridui-frame-rail-width: var(--gridui-rail-width-base);
|
|
211
218
|
--gridui-frame-rail-display: var(--gridui-rail-display-base);
|
|
@@ -419,8 +426,19 @@
|
|
|
419
426
|
}
|
|
420
427
|
}
|
|
421
428
|
.gridui-frame-chrome {
|
|
429
|
+
display: flex;
|
|
430
|
+
flex-wrap: wrap;
|
|
431
|
+
gap: var(--gridui-space-16);
|
|
432
|
+
align-items: center;
|
|
433
|
+
justify-content: space-between;
|
|
422
434
|
padding: var(--gridui-chrome-padding);
|
|
423
435
|
}
|
|
436
|
+
.gridui-frame-chrome[data-justify="start"] {
|
|
437
|
+
justify-content: flex-start;
|
|
438
|
+
}
|
|
439
|
+
.gridui-frame-chrome[data-content-layout="block"] {
|
|
440
|
+
display: block;
|
|
441
|
+
}
|
|
424
442
|
.gridui-frame-signature > svg {
|
|
425
443
|
width: clamp(5rem, 18vw, 15rem);
|
|
426
444
|
}
|
|
@@ -492,6 +510,100 @@
|
|
|
492
510
|
color: var(--gridui-foreground);
|
|
493
511
|
background: var(--gridui-background);
|
|
494
512
|
}
|
|
513
|
+
.gridui-split {
|
|
514
|
+
display: flex;
|
|
515
|
+
min-width: 0;
|
|
516
|
+
min-height: 0;
|
|
517
|
+
}
|
|
518
|
+
.gridui-split > * {
|
|
519
|
+
min-width: 0;
|
|
520
|
+
min-height: 0;
|
|
521
|
+
}
|
|
522
|
+
.gridui-split[data-direction="row"] {
|
|
523
|
+
flex-direction: row;
|
|
524
|
+
}
|
|
525
|
+
.gridui-split[data-direction="column"] {
|
|
526
|
+
flex-direction: column;
|
|
527
|
+
}
|
|
528
|
+
.gridui-split[data-direction="row-reverse"] {
|
|
529
|
+
flex-direction: row-reverse;
|
|
530
|
+
}
|
|
531
|
+
.gridui-split[data-direction="column-reverse"] {
|
|
532
|
+
flex-direction: column-reverse;
|
|
533
|
+
}
|
|
534
|
+
.gridui-split[data-direction][data-seam] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
535
|
+
border: 0 solid var(--gridui-border);
|
|
536
|
+
}
|
|
537
|
+
.gridui-split[data-direction="row"][data-seam="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
538
|
+
border-inline-start-width: 1px;
|
|
539
|
+
}
|
|
540
|
+
.gridui-split[data-direction="column"][data-seam="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
541
|
+
border-block-start-width: 1px;
|
|
542
|
+
}
|
|
543
|
+
.gridui-split[data-direction="row-reverse"][data-seam="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
544
|
+
border-inline-end-width: 1px;
|
|
545
|
+
}
|
|
546
|
+
.gridui-split[data-direction="column-reverse"][data-seam="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
547
|
+
border-block-end-width: 1px;
|
|
548
|
+
}
|
|
549
|
+
@media (min-width: 40rem) {
|
|
550
|
+
.gridui-split[data-direction-md="row"] {
|
|
551
|
+
flex-direction: row;
|
|
552
|
+
}
|
|
553
|
+
.gridui-split[data-direction-md="column"] {
|
|
554
|
+
flex-direction: column;
|
|
555
|
+
}
|
|
556
|
+
.gridui-split[data-direction-md="row-reverse"] {
|
|
557
|
+
flex-direction: row-reverse;
|
|
558
|
+
}
|
|
559
|
+
.gridui-split[data-direction-md="column-reverse"] {
|
|
560
|
+
flex-direction: column-reverse;
|
|
561
|
+
}
|
|
562
|
+
.gridui-split[data-direction-md][data-seam-md] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
563
|
+
border: 0 solid var(--gridui-border);
|
|
564
|
+
}
|
|
565
|
+
.gridui-split[data-direction-md="row"][data-seam-md="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
566
|
+
border-inline-start-width: 1px;
|
|
567
|
+
}
|
|
568
|
+
.gridui-split[data-direction-md="column"][data-seam-md="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
569
|
+
border-block-start-width: 1px;
|
|
570
|
+
}
|
|
571
|
+
.gridui-split[data-direction-md="row-reverse"][data-seam-md="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
572
|
+
border-inline-end-width: 1px;
|
|
573
|
+
}
|
|
574
|
+
.gridui-split[data-direction-md="column-reverse"][data-seam-md="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
575
|
+
border-block-end-width: 1px;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
@media (min-width: 64rem) {
|
|
579
|
+
.gridui-split[data-direction-lg="row"] {
|
|
580
|
+
flex-direction: row;
|
|
581
|
+
}
|
|
582
|
+
.gridui-split[data-direction-lg="column"] {
|
|
583
|
+
flex-direction: column;
|
|
584
|
+
}
|
|
585
|
+
.gridui-split[data-direction-lg="row-reverse"] {
|
|
586
|
+
flex-direction: row-reverse;
|
|
587
|
+
}
|
|
588
|
+
.gridui-split[data-direction-lg="column-reverse"] {
|
|
589
|
+
flex-direction: column-reverse;
|
|
590
|
+
}
|
|
591
|
+
.gridui-split[data-direction-lg][data-seam-lg] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
592
|
+
border: 0 solid var(--gridui-border);
|
|
593
|
+
}
|
|
594
|
+
.gridui-split[data-direction-lg="row"][data-seam-lg="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
595
|
+
border-inline-start-width: 1px;
|
|
596
|
+
}
|
|
597
|
+
.gridui-split[data-direction-lg="column"][data-seam-lg="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
598
|
+
border-block-start-width: 1px;
|
|
599
|
+
}
|
|
600
|
+
.gridui-split[data-direction-lg="row-reverse"][data-seam-lg="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
601
|
+
border-inline-end-width: 1px;
|
|
602
|
+
}
|
|
603
|
+
.gridui-split[data-direction-lg="column-reverse"][data-seam-lg="line"] > :where(:not([hidden]) ~ :not([hidden])) {
|
|
604
|
+
border-block-end-width: 1px;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
495
607
|
}
|
|
496
608
|
@property --tw-border-style {
|
|
497
609
|
syntax: "*";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/grid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "GridUI React grid",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/style-utils": "
|
|
31
|
-
"@gridui/theme": "
|
|
30
|
+
"@gridui/style-utils": "2.0.0",
|
|
31
|
+
"@gridui/theme": "2.0.0",
|
|
32
32
|
"@radix-ui/react-slot": "1.5.0",
|
|
33
33
|
"class-variance-authority": "0.7.1"
|
|
34
34
|
},
|