@gridui/grid 2.1.4 → 2.2.1
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 +13 -13
- package/dist/{primitives/container → container}/container.d.ts +2 -2
- package/dist/{primitives/container → container}/style.d.ts +2 -2
- package/dist/dashboard-frame/dashboard-frame.d.ts +21 -0
- package/dist/dashboard-frame/style.d.ts +12 -0
- package/dist/frame-boundary/frame-boundary.d.ts +15 -0
- package/dist/frame-boundary/style.d.ts +9 -0
- package/dist/frame-footer/frame-footer.d.ts +20 -0
- package/dist/{frame/chrome → frame-footer}/style.d.ts +1 -2
- package/dist/frame-header/frame-header.d.ts +15 -0
- package/dist/frame-rail/frame-rail.d.ts +11 -0
- package/dist/{frame/rail → frame-rail}/style.d.ts +1 -1
- package/dist/{frame/rail/rail.d.ts → frame-rail-group/frame-rail-group.d.ts} +3 -7
- package/dist/frame-region/frame-region.d.ts +12 -0
- package/dist/frame-region-row/frame-region-row.d.ts +12 -0
- package/dist/{frame/section.d.ts → frame-section/frame-section.d.ts} +7 -7
- package/dist/frame-sections/frame-sections.d.ts +9 -0
- package/dist/{frame/texture/texture.d.ts → frame-texture/frame-texture.d.ts} +3 -3
- package/dist/{primitives/grid → grid}/grid.d.ts +5 -5
- package/dist/grid/responsive.d.ts +9 -0
- package/dist/{primitives/grid → grid}/style.d.ts +1 -2
- package/dist/{primitives/grid → grid}/tracks.d.ts +2 -2
- package/dist/{primitives/grid → grid-item}/grid-item.d.ts +4 -4
- package/dist/grid-item/responsive.d.ts +8 -0
- package/dist/grid-item/style.d.ts +7 -0
- package/dist/index.d.ts +44 -2
- package/dist/index.js +484 -294
- package/dist/index.js.map +4 -4
- package/dist/page-frame/page-frame.d.ts +18 -0
- package/dist/{frame/page → page-frame}/style.d.ts +2 -2
- package/dist/{primitives/row → row}/row.d.ts +2 -2
- package/dist/{primitives/row → row}/style.d.ts +1 -1
- package/dist/shared/chrome-style.d.ts +7 -0
- package/dist/shared/chrome.d.ts +16 -0
- package/dist/{frame/decoration → shared}/decoration.d.ts +3 -2
- package/dist/{frame/style.d.ts → shared/frame-style.d.ts} +2 -2
- package/dist/shared/responsive-types.d.ts +8 -0
- package/dist/shared/texture-types.d.ts +7 -0
- package/dist/{primitives → shared}/types.d.ts +1 -1
- package/dist/{primitives/split → split}/split.d.ts +4 -3
- package/dist/{primitives/stack → stack}/stack.d.ts +3 -3
- package/dist/{primitives/stack → stack}/style.d.ts +1 -1
- package/dist/styles.css +243 -32
- package/package.json +5 -10
- package/dist/frame/boundary/boundary.d.ts +0 -12
- package/dist/frame/chrome/chrome.d.ts +0 -29
- package/dist/frame/export.d.ts +0 -19
- package/dist/frame/page/page.d.ts +0 -20
- package/dist/primitives/export.d.ts +0 -19
- package/dist/primitives/responsive.d.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -1,44 +1,212 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/container/style.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
var containerVariants = cva("gridui-container", {
|
|
4
|
+
variants: {
|
|
5
|
+
width: {
|
|
6
|
+
narrow: "gridui-container-narrow",
|
|
7
|
+
standard: "gridui-container-standard",
|
|
8
|
+
wide: "gridui-container-wide"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: { width: "standard" }
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// src/container/container.tsx
|
|
2
15
|
import { cn } from "@gridui/style-utils";
|
|
3
16
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var
|
|
5
|
-
const {
|
|
6
|
-
return
|
|
17
|
+
var Container = (props) => {
|
|
18
|
+
const { width = "standard", className, ...restProps } = props;
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
7
20
|
"div",
|
|
8
21
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(boundary === "band" || boundary === "stripe") && "gridui-frame-divider",
|
|
12
|
-
boundary === "stripe" && "gridui-frame-stripe",
|
|
13
|
-
boundary === "space" && "gridui-frame-space"
|
|
14
|
-
),
|
|
15
|
-
"aria-hidden": "true"
|
|
22
|
+
...restProps,
|
|
23
|
+
className: cn(containerVariants({ width }), className)
|
|
16
24
|
}
|
|
17
25
|
);
|
|
18
26
|
};
|
|
19
27
|
|
|
20
|
-
// src/
|
|
21
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
28
|
+
// src/shared/decoration.tsx
|
|
29
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
22
30
|
var resolveFrameDecoration = (boundary, decoration) => {
|
|
23
31
|
return decoration ?? (boundary === "band" ? "nodes" : "none");
|
|
24
32
|
};
|
|
25
33
|
var FrameDecoration = (props) => {
|
|
26
|
-
const { decoration } = props;
|
|
27
|
-
|
|
34
|
+
const { decoration, side } = props;
|
|
35
|
+
if (decoration === "none") {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
if (!side) {
|
|
39
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
+
/* @__PURE__ */ jsx2(
|
|
41
|
+
FrameDecoration,
|
|
42
|
+
{
|
|
43
|
+
decoration,
|
|
44
|
+
side: "start"
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx2(
|
|
48
|
+
FrameDecoration,
|
|
49
|
+
{
|
|
50
|
+
decoration,
|
|
51
|
+
side: "end"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ jsx2(
|
|
28
57
|
"div",
|
|
29
58
|
{
|
|
30
59
|
className: "gridui-frame-decoration",
|
|
31
60
|
"data-decoration": decoration,
|
|
61
|
+
"data-side": side,
|
|
32
62
|
"aria-hidden": "true",
|
|
33
63
|
inert: true
|
|
34
64
|
}
|
|
35
65
|
);
|
|
36
66
|
};
|
|
37
67
|
|
|
38
|
-
// src/frame/style.ts
|
|
68
|
+
// src/dashboard-frame/style.ts
|
|
69
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
70
|
+
var dashboardFrameVariants = cva2("gridui-dashboard-frame", {
|
|
71
|
+
variants: {
|
|
72
|
+
startSize: {
|
|
73
|
+
none: "[--gridui-dashboard-start:0px] [--gridui-dashboard-start-minimum:0px]",
|
|
74
|
+
small: "[--gridui-dashboard-start:var(--gridui-space-8)]",
|
|
75
|
+
medium: "[--gridui-dashboard-start:var(--gridui-space-16)]",
|
|
76
|
+
large: "[--gridui-dashboard-start:var(--gridui-space-24)]"
|
|
77
|
+
},
|
|
78
|
+
endSize: {
|
|
79
|
+
none: "[--gridui-dashboard-end:0px] [--gridui-dashboard-end-minimum:0px]",
|
|
80
|
+
small: "[--gridui-dashboard-end:var(--gridui-space-8)]",
|
|
81
|
+
medium: "[--gridui-dashboard-end:var(--gridui-space-16)]",
|
|
82
|
+
large: "[--gridui-dashboard-end:var(--gridui-space-24)]"
|
|
83
|
+
},
|
|
84
|
+
compactStartSize: {
|
|
85
|
+
none: "[--gridui-dashboard-compact-start:0px] [--gridui-dashboard-compact-start-minimum:0px]",
|
|
86
|
+
small: "[--gridui-dashboard-compact-start:var(--gridui-space-8)]",
|
|
87
|
+
medium: "[--gridui-dashboard-compact-start:var(--gridui-space-16)]",
|
|
88
|
+
large: "[--gridui-dashboard-compact-start:var(--gridui-space-24)]"
|
|
89
|
+
},
|
|
90
|
+
compactEndSize: {
|
|
91
|
+
none: "[--gridui-dashboard-compact-end:0px] [--gridui-dashboard-compact-end-minimum:0px]",
|
|
92
|
+
small: "[--gridui-dashboard-compact-end:var(--gridui-space-8)]",
|
|
93
|
+
medium: "[--gridui-dashboard-compact-end:var(--gridui-space-16)]",
|
|
94
|
+
large: "[--gridui-dashboard-compact-end:var(--gridui-space-24)]"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
defaultVariants: {
|
|
98
|
+
startSize: "medium",
|
|
99
|
+
endSize: "medium",
|
|
100
|
+
compactStartSize: "small",
|
|
101
|
+
compactEndSize: "small"
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// src/dashboard-frame/dashboard-frame.tsx
|
|
39
106
|
import { cn as cn2 } from "@gridui/style-utils";
|
|
40
|
-
import {
|
|
41
|
-
var
|
|
107
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
108
|
+
var DashboardFrame = (props) => {
|
|
109
|
+
const {
|
|
110
|
+
startSize,
|
|
111
|
+
endSize,
|
|
112
|
+
compactStartSize,
|
|
113
|
+
compactEndSize,
|
|
114
|
+
decoration = "none",
|
|
115
|
+
startDecoration = decoration,
|
|
116
|
+
endDecoration = decoration,
|
|
117
|
+
children,
|
|
118
|
+
className,
|
|
119
|
+
...restProps
|
|
120
|
+
} = props;
|
|
121
|
+
return /* @__PURE__ */ jsx3(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
...restProps,
|
|
125
|
+
className: cn2(dashboardFrameVariants({
|
|
126
|
+
startSize,
|
|
127
|
+
endSize,
|
|
128
|
+
compactStartSize,
|
|
129
|
+
compactEndSize
|
|
130
|
+
}), className),
|
|
131
|
+
children: /* @__PURE__ */ jsxs2(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: "gridui-dashboard-frame-body",
|
|
135
|
+
children: [
|
|
136
|
+
children,
|
|
137
|
+
/* @__PURE__ */ jsx3(
|
|
138
|
+
FrameDecoration,
|
|
139
|
+
{
|
|
140
|
+
decoration: startDecoration,
|
|
141
|
+
side: "start"
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ jsx3(
|
|
145
|
+
FrameDecoration,
|
|
146
|
+
{
|
|
147
|
+
decoration: endDecoration,
|
|
148
|
+
side: "end"
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/frame-boundary/style.ts
|
|
159
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
160
|
+
var frameBoundaryStyles = cva3("gridui-frame-boundary", {
|
|
161
|
+
variants: {
|
|
162
|
+
boundary: {
|
|
163
|
+
none: "",
|
|
164
|
+
line: "",
|
|
165
|
+
band: "gridui-frame-divider",
|
|
166
|
+
stripe: "gridui-frame-divider gridui-frame-stripe",
|
|
167
|
+
space: "gridui-frame-space"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
defaultVariants: { boundary: "line" }
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// src/frame-boundary/frame-boundary.tsx
|
|
174
|
+
import { cn as cn3 } from "@gridui/style-utils";
|
|
175
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
176
|
+
var FrameBoundary = (props) => {
|
|
177
|
+
const { boundary = "line", extent = "content", className, ...restProps } = props;
|
|
178
|
+
return boundary === "none" ? null : /* @__PURE__ */ jsx4(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
...restProps,
|
|
182
|
+
className: cn3(frameBoundaryStyles({ boundary }), className),
|
|
183
|
+
"data-boundary": boundary,
|
|
184
|
+
"data-boundary-extent": extent,
|
|
185
|
+
"aria-hidden": "true",
|
|
186
|
+
inert: true
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// src/shared/chrome.ts
|
|
192
|
+
import { resolveResponsive, spaceValue } from "@gridui/style-utils/responsive";
|
|
193
|
+
var chromeStyle = (padding) => {
|
|
194
|
+
const values = resolveResponsive(padding);
|
|
195
|
+
return {
|
|
196
|
+
"--gridui-chrome-padding": spaceValue(values.base),
|
|
197
|
+
"--gridui-chrome-padding-md": spaceValue(values.md),
|
|
198
|
+
"--gridui-chrome-padding-lg": spaceValue(values.lg)
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// src/shared/chrome-style.ts
|
|
203
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
204
|
+
var frameChromeStyles = cva4("gridui-frame-chrome");
|
|
205
|
+
|
|
206
|
+
// src/shared/frame-style.ts
|
|
207
|
+
import { cn as cn4 } from "@gridui/style-utils";
|
|
208
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
209
|
+
var frameToneStyles = cva5("", {
|
|
42
210
|
variants: {
|
|
43
211
|
tone: {
|
|
44
212
|
neutral: "",
|
|
@@ -48,87 +216,51 @@ var frameToneStyles = cva("", {
|
|
|
48
216
|
}
|
|
49
217
|
}
|
|
50
218
|
});
|
|
51
|
-
var frameContentStyles =
|
|
219
|
+
var frameContentStyles = cva5(cn4(
|
|
52
220
|
"gridui-frame-content",
|
|
53
221
|
"border-x border-solid border-border wrap-anywhere"
|
|
54
222
|
));
|
|
55
223
|
|
|
56
|
-
// src/frame/
|
|
57
|
-
import { cn as
|
|
58
|
-
import { cva as
|
|
59
|
-
var
|
|
60
|
-
var frameSignatureStyles = cva2(cn3(
|
|
224
|
+
// src/frame-footer/style.ts
|
|
225
|
+
import { cn as cn5 } from "@gridui/style-utils";
|
|
226
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
227
|
+
var frameSignatureStyles = cva6(cn5(
|
|
61
228
|
"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",
|
|
62
229
|
"[&>svg]:h-auto [&>svg]:opacity-30 [&>span]:font-display [&>span]:leading-none [&>span]:text-transparent"
|
|
63
230
|
));
|
|
64
|
-
var frameSignatureCroppedStyles =
|
|
231
|
+
var frameSignatureCroppedStyles = cva6("gridui-frame-signature-cropped block pb-0 @container [&>span]:block [&>span]:text-center [&>span]:whitespace-nowrap");
|
|
65
232
|
|
|
66
|
-
// src/frame/
|
|
67
|
-
import { cn as
|
|
68
|
-
import {
|
|
69
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
70
|
-
var chromeStyle = (padding) => {
|
|
71
|
-
const values = resolveResponsive(padding);
|
|
72
|
-
return {
|
|
73
|
-
"--gridui-chrome-padding": spaceValue(values.base),
|
|
74
|
-
"--gridui-chrome-padding-md": spaceValue(values.md),
|
|
75
|
-
"--gridui-chrome-padding-lg": spaceValue(values.lg)
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
var FrameHeader = (props) => {
|
|
79
|
-
const { padding = {
|
|
80
|
-
base: 16,
|
|
81
|
-
md: 24
|
|
82
|
-
}, wrap = true, gap = 16, justify = "between", className, children, ...restProps } = props;
|
|
83
|
-
return /* @__PURE__ */ jsx3(
|
|
84
|
-
"header",
|
|
85
|
-
{
|
|
86
|
-
...restProps,
|
|
87
|
-
className: cn4("gridui-container gridui-frame-header", className),
|
|
88
|
-
children: /* @__PURE__ */ jsx3(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
className: cn4(frameContentStyles(), frameChromeStyles()),
|
|
92
|
-
"data-justify": justify,
|
|
93
|
-
style: {
|
|
94
|
-
...chromeStyle(padding),
|
|
95
|
-
flexWrap: wrap ? "wrap" : "nowrap",
|
|
96
|
-
gap: spaceValue(gap)
|
|
97
|
-
},
|
|
98
|
-
children
|
|
99
|
-
}
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
};
|
|
233
|
+
// src/frame-footer/frame-footer.tsx
|
|
234
|
+
import { cn as cn6 } from "@gridui/style-utils";
|
|
235
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
104
236
|
var FrameFooter = (props) => {
|
|
105
237
|
const { padding = {
|
|
106
238
|
base: 16,
|
|
107
239
|
md: 24
|
|
108
240
|
}, contentLayout = "flex", tone = "neutral", boundary = "line", decoration, signature, signatureAppearance = "standard", className, children, ...restProps } = props;
|
|
109
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ jsxs3(
|
|
110
242
|
"footer",
|
|
111
243
|
{
|
|
112
244
|
...restProps,
|
|
113
|
-
className:
|
|
245
|
+
className: cn6("gridui-container gridui-frame-footer", frameToneStyles({
|
|
114
246
|
tone
|
|
115
247
|
}), className),
|
|
116
248
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ jsx5(
|
|
118
250
|
FrameBoundary,
|
|
119
251
|
{
|
|
120
252
|
boundary
|
|
121
253
|
}
|
|
122
254
|
),
|
|
123
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ jsxs3(
|
|
124
256
|
"div",
|
|
125
257
|
{
|
|
126
|
-
className:
|
|
258
|
+
className: cn6(frameContentStyles(), frameChromeStyles(), "gridui-frame-surface"),
|
|
127
259
|
"data-content-layout": contentLayout,
|
|
128
260
|
style: chromeStyle(padding),
|
|
129
261
|
children: [
|
|
130
262
|
children,
|
|
131
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ jsx5(
|
|
132
264
|
FrameDecoration,
|
|
133
265
|
{
|
|
134
266
|
decoration: resolveFrameDecoration(boundary, decoration)
|
|
@@ -137,10 +269,10 @@ var FrameFooter = (props) => {
|
|
|
137
269
|
]
|
|
138
270
|
}
|
|
139
271
|
),
|
|
140
|
-
signature ? /* @__PURE__ */
|
|
272
|
+
signature ? /* @__PURE__ */ jsx5(
|
|
141
273
|
"div",
|
|
142
274
|
{
|
|
143
|
-
className:
|
|
275
|
+
className: cn6(frameContentStyles(), frameSignatureStyles(), signatureAppearance === "cropped" && frameSignatureCroppedStyles()),
|
|
144
276
|
"aria-hidden": "true",
|
|
145
277
|
inert: true,
|
|
146
278
|
children: signature
|
|
@@ -151,16 +283,46 @@ var FrameFooter = (props) => {
|
|
|
151
283
|
);
|
|
152
284
|
};
|
|
153
285
|
|
|
154
|
-
// src/frame/
|
|
155
|
-
import {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var
|
|
286
|
+
// src/frame-header/frame-header.tsx
|
|
287
|
+
import { cn as cn7 } from "@gridui/style-utils";
|
|
288
|
+
import { spaceValue as spaceValue2 } from "@gridui/style-utils/responsive";
|
|
289
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
290
|
+
var FrameHeader = (props) => {
|
|
291
|
+
const { padding = {
|
|
292
|
+
base: 16,
|
|
293
|
+
md: 24
|
|
294
|
+
}, wrap = true, gap = 16, justify = "between", className, children, ...restProps } = props;
|
|
295
|
+
return /* @__PURE__ */ jsx6(
|
|
296
|
+
"header",
|
|
297
|
+
{
|
|
298
|
+
...restProps,
|
|
299
|
+
className: cn7("gridui-container gridui-frame-header", className),
|
|
300
|
+
children: /* @__PURE__ */ jsx6(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
className: cn7(frameContentStyles(), frameChromeStyles()),
|
|
304
|
+
"data-justify": justify,
|
|
305
|
+
style: {
|
|
306
|
+
...chromeStyle(padding),
|
|
307
|
+
flexWrap: wrap ? "wrap" : "nowrap",
|
|
308
|
+
gap: spaceValue2(gap)
|
|
309
|
+
},
|
|
310
|
+
children
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
};
|
|
159
316
|
|
|
160
|
-
// src/frame
|
|
161
|
-
import {
|
|
162
|
-
|
|
163
|
-
|
|
317
|
+
// src/frame-rail/style.ts
|
|
318
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
319
|
+
var frameRailStyles = cva7("gridui-frame-rail flex h-full box-border flex-col py-gridui-24 text-muted");
|
|
320
|
+
var frameRailContentStyles = cva7("gridui-frame-rail-content relative z-(--gridui-z-interaction) min-w-0 type-eyebrow bg-inherit");
|
|
321
|
+
var frameRailStickyBottomStyles = cva7("gridui-frame-rail-sticky-bottom justify-end [&>.gridui-frame-rail-content]:sticky");
|
|
322
|
+
|
|
323
|
+
// src/frame-rail/frame-rail.tsx
|
|
324
|
+
import { cn as cn8 } from "@gridui/style-utils";
|
|
325
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
164
326
|
var FrameRail = (props) => {
|
|
165
327
|
const {
|
|
166
328
|
placement = "start",
|
|
@@ -168,12 +330,12 @@ var FrameRail = (props) => {
|
|
|
168
330
|
className,
|
|
169
331
|
...restProps
|
|
170
332
|
} = props;
|
|
171
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ jsx7(
|
|
172
334
|
"div",
|
|
173
335
|
{
|
|
174
336
|
...restProps,
|
|
175
|
-
className:
|
|
176
|
-
children: /* @__PURE__ */
|
|
337
|
+
className: cn8(frameRailStyles(), placement === "sticky-bottom" && frameRailStickyBottomStyles(), className),
|
|
338
|
+
children: /* @__PURE__ */ jsx7(
|
|
177
339
|
"div",
|
|
178
340
|
{
|
|
179
341
|
className: frameRailContentStyles(),
|
|
@@ -183,6 +345,11 @@ var FrameRail = (props) => {
|
|
|
183
345
|
}
|
|
184
346
|
);
|
|
185
347
|
};
|
|
348
|
+
|
|
349
|
+
// src/frame-rail-group/frame-rail-group.tsx
|
|
350
|
+
import { cn as cn9 } from "@gridui/style-utils";
|
|
351
|
+
import { resolveResponsive as resolveResponsive2, spaceValue as spaceValue3 } from "@gridui/style-utils/responsive";
|
|
352
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
186
353
|
var FrameRailGroup = (props) => {
|
|
187
354
|
const { rail, railWidth = {
|
|
188
355
|
base: 0,
|
|
@@ -191,29 +358,29 @@ var FrameRailGroup = (props) => {
|
|
|
191
358
|
const hasRail = rail !== void 0 && rail !== null && rail !== false;
|
|
192
359
|
const width = resolveResponsive2(hasRail ? railWidth : 0);
|
|
193
360
|
const layoutStyle = {
|
|
194
|
-
"--gridui-rail-width-base":
|
|
195
|
-
"--gridui-rail-width-md":
|
|
196
|
-
"--gridui-rail-width-lg":
|
|
361
|
+
"--gridui-rail-width-base": spaceValue3(width.base),
|
|
362
|
+
"--gridui-rail-width-md": spaceValue3(width.md),
|
|
363
|
+
"--gridui-rail-width-lg": spaceValue3(width.lg),
|
|
197
364
|
"--gridui-rail-display-base": width.base === 0 ? "none" : "block",
|
|
198
365
|
"--gridui-rail-display-md": width.md === 0 ? "none" : "block",
|
|
199
366
|
"--gridui-rail-display-lg": width.lg === 0 ? "none" : "block",
|
|
200
367
|
...style
|
|
201
368
|
};
|
|
202
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ jsxs4(
|
|
203
370
|
"div",
|
|
204
371
|
{
|
|
205
372
|
...restProps,
|
|
206
|
-
className:
|
|
373
|
+
className: cn9("gridui-frame-rail-group", className),
|
|
207
374
|
style: layoutStyle,
|
|
208
375
|
children: [
|
|
209
|
-
hasRail ? /* @__PURE__ */
|
|
376
|
+
hasRail ? /* @__PURE__ */ jsx8(
|
|
210
377
|
"div",
|
|
211
378
|
{
|
|
212
379
|
className: "gridui-frame-rail-track",
|
|
213
380
|
children: rail
|
|
214
381
|
}
|
|
215
382
|
) : null,
|
|
216
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ jsx8(
|
|
217
384
|
"div",
|
|
218
385
|
{
|
|
219
386
|
className: "gridui-frame-rail-body",
|
|
@@ -225,111 +392,48 @@ var FrameRailGroup = (props) => {
|
|
|
225
392
|
);
|
|
226
393
|
};
|
|
227
394
|
|
|
228
|
-
// src/frame/
|
|
229
|
-
import {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
},
|
|
238
|
-
defaultVariants: { width: "standard" }
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
// src/frame/page/page.tsx
|
|
242
|
-
import { cn as cn6 } from "@gridui/style-utils";
|
|
243
|
-
import { spacingVariables } from "@gridui/style-utils/responsive";
|
|
244
|
-
import { Fragment, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
245
|
-
var FrameSections = (props) => {
|
|
246
|
-
const { className, ...restProps } = props;
|
|
247
|
-
return /* @__PURE__ */ jsx5(
|
|
248
|
-
"div",
|
|
395
|
+
// src/frame-region/frame-region.tsx
|
|
396
|
+
import { cn as cn10 } from "@gridui/style-utils";
|
|
397
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
398
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
399
|
+
var FrameRegion = (props) => {
|
|
400
|
+
const { asChild = false, edge = "none", className, ...restProps } = props;
|
|
401
|
+
const Component = asChild ? Slot : "div";
|
|
402
|
+
return /* @__PURE__ */ jsx9(
|
|
403
|
+
Component,
|
|
249
404
|
{
|
|
250
405
|
...restProps,
|
|
251
|
-
className:
|
|
406
|
+
className: cn10("gridui-frame-region", className),
|
|
407
|
+
"data-frame-edge": edge
|
|
252
408
|
}
|
|
253
409
|
);
|
|
254
410
|
};
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
className,
|
|
266
|
-
...restProps
|
|
267
|
-
} = props;
|
|
268
|
-
const railOptions = railWidth === void 0 ? {} : { railWidth };
|
|
269
|
-
const content = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
270
|
-
/* @__PURE__ */ jsx5(FrameSections, { children }),
|
|
271
|
-
/* @__PURE__ */ jsx5(
|
|
272
|
-
"div",
|
|
273
|
-
{
|
|
274
|
-
className: "gridui-container gridui-frame-fill",
|
|
275
|
-
"aria-hidden": "true",
|
|
276
|
-
children: /* @__PURE__ */ jsx5(
|
|
277
|
-
"div",
|
|
278
|
-
{
|
|
279
|
-
className: cn6(frameContentStyles())
|
|
280
|
-
}
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
|
-
)
|
|
284
|
-
] });
|
|
285
|
-
return /* @__PURE__ */ jsxs3(
|
|
286
|
-
FrameRailGroup,
|
|
411
|
+
|
|
412
|
+
// src/frame-region-row/frame-region-row.tsx
|
|
413
|
+
import { cn as cn11 } from "@gridui/style-utils";
|
|
414
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
415
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
416
|
+
var FrameRegionRow = (props) => {
|
|
417
|
+
const { asChild = false, contentInset = 0, className, style, ...restProps } = props;
|
|
418
|
+
const Component = asChild ? Slot2 : "div";
|
|
419
|
+
return /* @__PURE__ */ jsx10(
|
|
420
|
+
Component,
|
|
287
421
|
{
|
|
288
422
|
...restProps,
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
"div",
|
|
295
|
-
{
|
|
296
|
-
className: "gridui-frame-page-header",
|
|
297
|
-
children: header
|
|
298
|
-
}
|
|
299
|
-
) : null,
|
|
300
|
-
/* @__PURE__ */ jsx5(
|
|
301
|
-
"main",
|
|
302
|
-
{
|
|
303
|
-
className: "gridui-frame-main",
|
|
304
|
-
style: mainGutterStart === void 0 ? void 0 : spacingVariables("main-gutter-start", mainGutterStart),
|
|
305
|
-
children: railScope === "main" && rail !== void 0 && rail !== null && rail !== false ? /* @__PURE__ */ jsx5(
|
|
306
|
-
FrameRailGroup,
|
|
307
|
-
{
|
|
308
|
-
rail,
|
|
309
|
-
...railOptions,
|
|
310
|
-
className: "gridui-frame-main-rail-group",
|
|
311
|
-
children: content
|
|
312
|
-
}
|
|
313
|
-
) : content
|
|
314
|
-
}
|
|
315
|
-
),
|
|
316
|
-
footer ? /* @__PURE__ */ jsx5(
|
|
317
|
-
"div",
|
|
318
|
-
{
|
|
319
|
-
className: "gridui-frame-page-footer",
|
|
320
|
-
children: footer
|
|
321
|
-
}
|
|
322
|
-
) : null
|
|
323
|
-
]
|
|
423
|
+
className: cn11("gridui-frame-region-row", className),
|
|
424
|
+
style: {
|
|
425
|
+
"--gridui-frame-region-inset": typeof contentInset === "number" ? `${contentInset}px` : contentInset,
|
|
426
|
+
...style
|
|
427
|
+
}
|
|
324
428
|
}
|
|
325
429
|
);
|
|
326
430
|
};
|
|
327
431
|
|
|
328
|
-
// src/frame
|
|
329
|
-
import { jsx as
|
|
432
|
+
// src/frame-texture/frame-texture.tsx
|
|
433
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
330
434
|
var FrameTexture = (props) => {
|
|
331
435
|
const { texture } = props;
|
|
332
|
-
return texture === "none" ? null : /* @__PURE__ */
|
|
436
|
+
return texture === "none" ? null : /* @__PURE__ */ jsx11(
|
|
333
437
|
"div",
|
|
334
438
|
{
|
|
335
439
|
className: "gridui-frame-texture",
|
|
@@ -340,10 +444,10 @@ var FrameTexture = (props) => {
|
|
|
340
444
|
);
|
|
341
445
|
};
|
|
342
446
|
|
|
343
|
-
// src/frame/section.tsx
|
|
344
|
-
import { cn as
|
|
345
|
-
import { spacingVariables
|
|
346
|
-
import { jsx as
|
|
447
|
+
// src/frame-section/frame-section.tsx
|
|
448
|
+
import { cn as cn12 } from "@gridui/style-utils";
|
|
449
|
+
import { spacingVariables } from "@gridui/style-utils/responsive";
|
|
450
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
347
451
|
var FrameSection = (props) => {
|
|
348
452
|
const {
|
|
349
453
|
tone = "neutral",
|
|
@@ -357,36 +461,36 @@ var FrameSection = (props) => {
|
|
|
357
461
|
children,
|
|
358
462
|
...restProps
|
|
359
463
|
} = props;
|
|
360
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ jsxs5(
|
|
361
465
|
"section",
|
|
362
466
|
{
|
|
363
467
|
...restProps,
|
|
364
|
-
className:
|
|
468
|
+
className: cn12("gridui-container gridui-frame-section", frameToneStyles({ tone }), className),
|
|
365
469
|
"data-edges": edges,
|
|
366
470
|
children: [
|
|
367
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ jsx12(
|
|
368
472
|
FrameBoundary,
|
|
369
473
|
{
|
|
370
474
|
boundary
|
|
371
475
|
}
|
|
372
476
|
),
|
|
373
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ jsxs5(
|
|
374
478
|
"div",
|
|
375
479
|
{
|
|
376
|
-
className:
|
|
480
|
+
className: cn12(frameContentStyles(), "gridui-frame-surface", edges === "none" && "border-x-0"),
|
|
377
481
|
style: {
|
|
378
|
-
...
|
|
379
|
-
...
|
|
482
|
+
...spacingVariables("section-padding-inline", paddingInline),
|
|
483
|
+
...spacingVariables("section-padding-block", paddingBlock)
|
|
380
484
|
},
|
|
381
485
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ jsx12(
|
|
383
487
|
FrameTexture,
|
|
384
488
|
{
|
|
385
489
|
texture
|
|
386
490
|
}
|
|
387
491
|
),
|
|
388
492
|
children,
|
|
389
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ jsx12(
|
|
390
494
|
FrameDecoration,
|
|
391
495
|
{
|
|
392
496
|
decoration: resolveFrameDecoration(boundary, decoration)
|
|
@@ -400,73 +504,38 @@ var FrameSection = (props) => {
|
|
|
400
504
|
);
|
|
401
505
|
};
|
|
402
506
|
|
|
403
|
-
// src/
|
|
404
|
-
import {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
standard: "gridui-container-standard",
|
|
410
|
-
wide: "gridui-container-wide"
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
defaultVariants: { width: "standard" }
|
|
414
|
-
});
|
|
415
|
-
|
|
416
|
-
// src/primitives/container/container.tsx
|
|
417
|
-
import { cn as cn8 } from "@gridui/style-utils";
|
|
418
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
419
|
-
var Container = (props) => {
|
|
420
|
-
const { width = "standard", className, ...restProps } = props;
|
|
421
|
-
return /* @__PURE__ */ jsx8(
|
|
507
|
+
// src/frame-sections/frame-sections.tsx
|
|
508
|
+
import { cn as cn13 } from "@gridui/style-utils";
|
|
509
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
510
|
+
var FrameSections = (props) => {
|
|
511
|
+
const { className, ...restProps } = props;
|
|
512
|
+
return /* @__PURE__ */ jsx13(
|
|
422
513
|
"div",
|
|
423
514
|
{
|
|
424
515
|
...restProps,
|
|
425
|
-
className:
|
|
516
|
+
className: cn13("gridui-frame-sections", className)
|
|
426
517
|
}
|
|
427
518
|
);
|
|
428
519
|
};
|
|
429
520
|
|
|
430
|
-
// src/
|
|
521
|
+
// src/grid-item/responsive.ts
|
|
431
522
|
var spanValue = (value) => {
|
|
432
523
|
return value === "full" ? "1 / -1" : `span ${value} / span ${value}`;
|
|
433
524
|
};
|
|
434
525
|
|
|
435
|
-
// src/
|
|
436
|
-
import { cn as
|
|
437
|
-
import { cva as
|
|
438
|
-
var
|
|
439
|
-
"gridui-grid",
|
|
440
|
-
"grid min-w-0"
|
|
441
|
-
));
|
|
442
|
-
var gridCellsStyles = cva6(cn9(
|
|
443
|
-
"gridui-grid-cells",
|
|
444
|
-
"border-t border-solid border-border border-l border-solid border-border"
|
|
445
|
-
));
|
|
446
|
-
var gridItemStyles = cva6(cn9(
|
|
526
|
+
// src/grid-item/style.ts
|
|
527
|
+
import { cn as cn14 } from "@gridui/style-utils";
|
|
528
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
529
|
+
var gridItemStyles = cva8(cn14(
|
|
447
530
|
"gridui-grid-item",
|
|
448
531
|
"min-w-0 wrap-anywhere"
|
|
449
532
|
));
|
|
450
|
-
var gridInternalStyles = cva6(cn9(
|
|
451
|
-
"gridui-grid-internal",
|
|
452
|
-
"bg-border"
|
|
453
|
-
));
|
|
454
|
-
var gridVariants = cva6(gridStyles(), {
|
|
455
|
-
variants: {
|
|
456
|
-
frame: {
|
|
457
|
-
none: "",
|
|
458
|
-
cells: gridCellsStyles(),
|
|
459
|
-
internal: gridInternalStyles()
|
|
460
|
-
}
|
|
461
|
-
},
|
|
462
|
-
defaultVariants: { frame: "none" }
|
|
463
|
-
});
|
|
464
533
|
|
|
465
|
-
// src/
|
|
466
|
-
import { cn as
|
|
467
|
-
import { resolveResponsive as resolveResponsive3, spaceValue as
|
|
468
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
469
|
-
import { jsx as
|
|
534
|
+
// src/grid-item/grid-item.tsx
|
|
535
|
+
import { cn as cn15 } from "@gridui/style-utils";
|
|
536
|
+
import { resolveResponsive as resolveResponsive3, spaceValue as spaceValue4 } from "@gridui/style-utils/responsive";
|
|
537
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
538
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
470
539
|
var GridItem = (props) => {
|
|
471
540
|
const {
|
|
472
541
|
asChild = false,
|
|
@@ -483,27 +552,53 @@ var GridItem = (props) => {
|
|
|
483
552
|
"--gridui-span": spanValue(size.base),
|
|
484
553
|
"--gridui-span-md": spanValue(size.md),
|
|
485
554
|
"--gridui-span-lg": spanValue(size.lg),
|
|
486
|
-
"--gridui-padding":
|
|
487
|
-
"--gridui-padding-md":
|
|
488
|
-
"--gridui-padding-lg":
|
|
555
|
+
"--gridui-padding": spaceValue4(inset.base),
|
|
556
|
+
"--gridui-padding-md": spaceValue4(inset.md),
|
|
557
|
+
"--gridui-padding-lg": spaceValue4(inset.lg),
|
|
489
558
|
...align ? {
|
|
490
559
|
display: "flex",
|
|
491
560
|
alignItems: align
|
|
492
561
|
} : {},
|
|
493
562
|
...style
|
|
494
563
|
};
|
|
495
|
-
const Component = asChild ?
|
|
496
|
-
return /* @__PURE__ */
|
|
564
|
+
const Component = asChild ? Slot3 : "div";
|
|
565
|
+
return /* @__PURE__ */ jsx14(
|
|
497
566
|
Component,
|
|
498
567
|
{
|
|
499
568
|
...restProps,
|
|
500
|
-
className:
|
|
569
|
+
className: cn15(gridItemStyles(), className),
|
|
501
570
|
style: layoutStyle
|
|
502
571
|
}
|
|
503
572
|
);
|
|
504
573
|
};
|
|
505
574
|
|
|
506
|
-
// src/
|
|
575
|
+
// src/grid/style.ts
|
|
576
|
+
import { cn as cn16 } from "@gridui/style-utils";
|
|
577
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
578
|
+
var gridStyles = cva9(cn16(
|
|
579
|
+
"gridui-grid",
|
|
580
|
+
"grid min-w-0"
|
|
581
|
+
));
|
|
582
|
+
var gridCellsStyles = cva9(cn16(
|
|
583
|
+
"gridui-grid-cells",
|
|
584
|
+
"border-t border-solid border-border border-l border-solid border-border"
|
|
585
|
+
));
|
|
586
|
+
var gridInternalStyles = cva9(cn16(
|
|
587
|
+
"gridui-grid-internal",
|
|
588
|
+
"bg-border"
|
|
589
|
+
));
|
|
590
|
+
var gridVariants = cva9(gridStyles(), {
|
|
591
|
+
variants: {
|
|
592
|
+
frame: {
|
|
593
|
+
none: "",
|
|
594
|
+
cells: gridCellsStyles(),
|
|
595
|
+
internal: gridInternalStyles()
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
defaultVariants: { frame: "none" }
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
// src/grid/tracks.ts
|
|
507
602
|
var gridColumnCount = (columns) => {
|
|
508
603
|
return typeof columns === "number" ? columns : columns.length;
|
|
509
604
|
};
|
|
@@ -538,11 +633,11 @@ var fillGridRowSpans = (columns, spans) => {
|
|
|
538
633
|
});
|
|
539
634
|
};
|
|
540
635
|
|
|
541
|
-
// src/
|
|
542
|
-
import { cn as
|
|
543
|
-
import { resolveResponsive as resolveResponsive4, spaceValue as
|
|
636
|
+
// src/grid/grid.tsx
|
|
637
|
+
import { cn as cn17 } from "@gridui/style-utils";
|
|
638
|
+
import { resolveResponsive as resolveResponsive4, spaceValue as spaceValue5 } from "@gridui/style-utils/responsive";
|
|
544
639
|
import { Children, cloneElement, isValidElement } from "react";
|
|
545
|
-
import { jsx as
|
|
640
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
546
641
|
var Grid = (props) => {
|
|
547
642
|
const {
|
|
548
643
|
columns = 1,
|
|
@@ -568,9 +663,9 @@ var Grid = (props) => {
|
|
|
568
663
|
"--gridui-grid-template": gridTemplate(tracks.base),
|
|
569
664
|
"--gridui-grid-template-md": gridTemplate(tracks.md),
|
|
570
665
|
"--gridui-grid-template-lg": gridTemplate(tracks.lg),
|
|
571
|
-
"--gridui-gap": frame === "internal" ? "1px" :
|
|
572
|
-
"--gridui-gap-md": frame === "internal" ? "1px" :
|
|
573
|
-
"--gridui-gap-lg": frame === "internal" ? "1px" :
|
|
666
|
+
"--gridui-gap": frame === "internal" ? "1px" : spaceValue5(spacing.base),
|
|
667
|
+
"--gridui-gap-md": frame === "internal" ? "1px" : spaceValue5(spacing.md),
|
|
668
|
+
"--gridui-gap-lg": frame === "internal" ? "1px" : spaceValue5(spacing.lg),
|
|
574
669
|
...style
|
|
575
670
|
};
|
|
576
671
|
let content = children;
|
|
@@ -607,29 +702,119 @@ var Grid = (props) => {
|
|
|
607
702
|
});
|
|
608
703
|
});
|
|
609
704
|
}
|
|
610
|
-
return /* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ jsx15(
|
|
611
706
|
"div",
|
|
612
707
|
{
|
|
613
708
|
...restProps,
|
|
614
|
-
className:
|
|
709
|
+
className: cn17(gridVariants({ frame }), className),
|
|
615
710
|
style: layoutStyle,
|
|
616
711
|
children: content
|
|
617
712
|
}
|
|
618
713
|
);
|
|
619
714
|
};
|
|
620
715
|
|
|
621
|
-
// src/
|
|
622
|
-
import {
|
|
623
|
-
|
|
624
|
-
|
|
716
|
+
// src/page-frame/style.ts
|
|
717
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
718
|
+
var pageFrameVariants = cva10("gridui-page-frame min-h-svh", {
|
|
719
|
+
variants: {
|
|
720
|
+
width: {
|
|
721
|
+
narrow: "gridui-container-narrow",
|
|
722
|
+
standard: "gridui-container-standard",
|
|
723
|
+
wide: "gridui-container-wide"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
defaultVariants: { width: "standard" }
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
// src/page-frame/page-frame.tsx
|
|
730
|
+
import { cn as cn18 } from "@gridui/style-utils";
|
|
731
|
+
import { spacingVariables as spacingVariables2 } from "@gridui/style-utils/responsive";
|
|
732
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
733
|
+
var PageFrame = (props) => {
|
|
734
|
+
const {
|
|
735
|
+
width = "standard",
|
|
736
|
+
header,
|
|
737
|
+
footer,
|
|
738
|
+
rail,
|
|
739
|
+
railWidth,
|
|
740
|
+
railScope = "page",
|
|
741
|
+
mainGutterStart,
|
|
742
|
+
children,
|
|
743
|
+
className,
|
|
744
|
+
...restProps
|
|
745
|
+
} = props;
|
|
746
|
+
const railOptions = railWidth === void 0 ? {} : { railWidth };
|
|
747
|
+
const content = /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
748
|
+
/* @__PURE__ */ jsx16(FrameSections, { children }),
|
|
749
|
+
/* @__PURE__ */ jsx16(
|
|
750
|
+
"div",
|
|
751
|
+
{
|
|
752
|
+
className: "gridui-container gridui-frame-fill",
|
|
753
|
+
"aria-hidden": "true",
|
|
754
|
+
children: /* @__PURE__ */ jsx16(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
className: cn18(frameContentStyles())
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
] });
|
|
763
|
+
return /* @__PURE__ */ jsxs6(
|
|
764
|
+
FrameRailGroup,
|
|
765
|
+
{
|
|
766
|
+
...restProps,
|
|
767
|
+
rail: railScope === "page" ? rail : void 0,
|
|
768
|
+
...railOptions,
|
|
769
|
+
className: cn18(pageFrameVariants({ width }), className),
|
|
770
|
+
children: [
|
|
771
|
+
header ? /* @__PURE__ */ jsx16(
|
|
772
|
+
"div",
|
|
773
|
+
{
|
|
774
|
+
className: "gridui-frame-page-header",
|
|
775
|
+
children: header
|
|
776
|
+
}
|
|
777
|
+
) : null,
|
|
778
|
+
/* @__PURE__ */ jsx16(
|
|
779
|
+
"main",
|
|
780
|
+
{
|
|
781
|
+
className: "gridui-frame-main",
|
|
782
|
+
style: mainGutterStart === void 0 ? void 0 : spacingVariables2("main-gutter-start", mainGutterStart),
|
|
783
|
+
children: railScope === "main" && rail !== void 0 && rail !== null && rail !== false ? /* @__PURE__ */ jsx16(
|
|
784
|
+
FrameRailGroup,
|
|
785
|
+
{
|
|
786
|
+
rail,
|
|
787
|
+
...railOptions,
|
|
788
|
+
className: "gridui-frame-main-rail-group",
|
|
789
|
+
children: content
|
|
790
|
+
}
|
|
791
|
+
) : content
|
|
792
|
+
}
|
|
793
|
+
),
|
|
794
|
+
footer ? /* @__PURE__ */ jsx16(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
className: "gridui-frame-page-footer",
|
|
798
|
+
children: footer
|
|
799
|
+
}
|
|
800
|
+
) : null
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
// src/row/style.ts
|
|
807
|
+
import { cn as cn19 } from "@gridui/style-utils";
|
|
808
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
809
|
+
var rowStyles = cva11(cn19(
|
|
625
810
|
"gridui-row",
|
|
626
811
|
"min-w-0"
|
|
627
812
|
));
|
|
628
813
|
|
|
629
|
-
// src/
|
|
630
|
-
import { cn as
|
|
631
|
-
import { spaceValue as
|
|
632
|
-
import { jsx as
|
|
814
|
+
// src/row/row.tsx
|
|
815
|
+
import { cn as cn20 } from "@gridui/style-utils";
|
|
816
|
+
import { spaceValue as spaceValue6 } from "@gridui/style-utils/responsive";
|
|
817
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
633
818
|
var Row = (props) => {
|
|
634
819
|
const {
|
|
635
820
|
gap = 16,
|
|
@@ -642,37 +827,38 @@ var Row = (props) => {
|
|
|
642
827
|
style,
|
|
643
828
|
...restProps
|
|
644
829
|
} = props;
|
|
645
|
-
return /* @__PURE__ */
|
|
830
|
+
return /* @__PURE__ */ jsx17(
|
|
646
831
|
"div",
|
|
647
832
|
{
|
|
648
833
|
...restProps,
|
|
649
|
-
className:
|
|
834
|
+
className: cn20(rowStyles(), className),
|
|
650
835
|
"data-inline": inline,
|
|
651
836
|
style: {
|
|
652
837
|
display: inline ? "inline-flex" : "flex",
|
|
653
838
|
alignItems: align,
|
|
654
839
|
justifyContent: justify === "between" ? "space-between" : "flex-start",
|
|
655
840
|
flexWrap: wrap ? "wrap" : "nowrap",
|
|
656
|
-
gap: `${
|
|
841
|
+
gap: `${spaceValue6(rowGap)} ${spaceValue6(gap)}`,
|
|
657
842
|
...style
|
|
658
843
|
}
|
|
659
844
|
}
|
|
660
845
|
);
|
|
661
846
|
};
|
|
662
847
|
|
|
663
|
-
// src/
|
|
664
|
-
import { cn as
|
|
848
|
+
// src/split/split.tsx
|
|
849
|
+
import { cn as cn21 } from "@gridui/style-utils";
|
|
665
850
|
import { resolveResponsive as resolveResponsive5 } from "@gridui/style-utils/responsive";
|
|
666
|
-
import { jsx as
|
|
851
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
667
852
|
var Split = (props) => {
|
|
668
|
-
const { direction = "row", seam = "line", className, ...restProps } = props;
|
|
853
|
+
const { direction = "row", order = "logical", seam = "line", className, ...restProps } = props;
|
|
669
854
|
const directions = resolveResponsive5(direction);
|
|
670
855
|
const seams = resolveResponsive5(seam);
|
|
671
|
-
return /* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ jsx18(
|
|
672
857
|
"div",
|
|
673
858
|
{
|
|
674
859
|
...restProps,
|
|
675
|
-
className:
|
|
860
|
+
className: cn21("gridui-split", className),
|
|
861
|
+
"data-order": order,
|
|
676
862
|
"data-direction": directions.base,
|
|
677
863
|
"data-direction-md": directions.md,
|
|
678
864
|
"data-direction-lg": directions.lg,
|
|
@@ -683,18 +869,18 @@ var Split = (props) => {
|
|
|
683
869
|
);
|
|
684
870
|
};
|
|
685
871
|
|
|
686
|
-
// src/
|
|
687
|
-
import { cn as
|
|
688
|
-
import { cva as
|
|
689
|
-
var stackStyles =
|
|
872
|
+
// src/stack/style.ts
|
|
873
|
+
import { cn as cn22 } from "@gridui/style-utils";
|
|
874
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
875
|
+
var stackStyles = cva12(cn22(
|
|
690
876
|
"gridui-stack",
|
|
691
877
|
"flex min-w-0 flex-col"
|
|
692
878
|
));
|
|
693
879
|
|
|
694
|
-
// src/
|
|
695
|
-
import { cn as
|
|
696
|
-
import { resolveResponsive as resolveResponsive6, spaceValue as
|
|
697
|
-
import { jsx as
|
|
880
|
+
// src/stack/stack.tsx
|
|
881
|
+
import { cn as cn23 } from "@gridui/style-utils";
|
|
882
|
+
import { resolveResponsive as resolveResponsive6, spaceValue as spaceValue7 } from "@gridui/style-utils/responsive";
|
|
883
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
698
884
|
var Stack = (props) => {
|
|
699
885
|
const {
|
|
700
886
|
gap = 16,
|
|
@@ -707,29 +893,33 @@ var Stack = (props) => {
|
|
|
707
893
|
} = props;
|
|
708
894
|
const spacing = resolveResponsive6(gap);
|
|
709
895
|
const layoutStyle = {
|
|
710
|
-
"--gridui-gap":
|
|
711
|
-
"--gridui-gap-md":
|
|
712
|
-
"--gridui-gap-lg":
|
|
896
|
+
"--gridui-gap": spaceValue7(spacing.base),
|
|
897
|
+
"--gridui-gap-md": spaceValue7(spacing.md),
|
|
898
|
+
"--gridui-gap-lg": spaceValue7(spacing.lg),
|
|
713
899
|
width: width === "full" ? "100%" : void 0,
|
|
714
900
|
maxWidth,
|
|
715
|
-
paddingTop: paddingStart === void 0 ? void 0 :
|
|
901
|
+
paddingTop: paddingStart === void 0 ? void 0 : spaceValue7(paddingStart),
|
|
716
902
|
...style
|
|
717
903
|
};
|
|
718
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx19(
|
|
719
905
|
"div",
|
|
720
906
|
{
|
|
721
907
|
...restProps,
|
|
722
|
-
className:
|
|
908
|
+
className: cn23(stackStyles(), className),
|
|
723
909
|
style: layoutStyle
|
|
724
910
|
}
|
|
725
911
|
);
|
|
726
912
|
};
|
|
727
913
|
export {
|
|
728
914
|
Container,
|
|
915
|
+
DashboardFrame,
|
|
916
|
+
FrameBoundary,
|
|
729
917
|
FrameFooter,
|
|
730
918
|
FrameHeader,
|
|
731
919
|
FrameRail,
|
|
732
920
|
FrameRailGroup,
|
|
921
|
+
FrameRegion,
|
|
922
|
+
FrameRegionRow,
|
|
733
923
|
FrameSection,
|
|
734
924
|
FrameSections,
|
|
735
925
|
FrameTexture,
|