@soroush.tech/styled-system 6.0.0-alpha.2 → 6.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background.d.cts +2 -2
- package/dist/background.d.mts +2 -2
- package/dist/border.d.cts +2 -2
- package/dist/border.d.mts +2 -2
- package/dist/color.d.cts +2 -2
- package/dist/color.d.mts +2 -2
- package/dist/flexbox.d.cts +2 -2
- package/dist/flexbox.d.mts +2 -2
- package/dist/grid-CvJv0uga.cjs +198 -0
- package/dist/grid-Du9HrjII.mjs +168 -0
- package/dist/grid.cjs +1 -2
- package/dist/grid.d.cts +3 -3
- package/dist/grid.d.mts +3 -3
- package/dist/grid.mjs +2 -2
- package/dist/{index-CnVRmFIZ.d.mts → index--7PfXEZf.d.mts} +1 -1
- package/dist/{index-B7YL_4tg.d.cts → index-BDUZ7qQu.d.cts} +1 -1
- package/dist/{index-BvyUTPw5.d.mts → index-BQUTi5eL.d.mts} +1 -1
- package/dist/{index-fuBvJDhs.d.mts → index-BTZ4J3Ql.d.mts} +1 -1
- package/dist/{index-ILo8rb05.d.cts → index-BUX09rTq.d.cts} +1 -1
- package/dist/{index-Dpqn1WzM.d.cts → index-BUa_KRfs.d.cts} +1 -1
- package/dist/{index-CpS2pkHD.d.cts → index-BVNmdtmk.d.cts} +1 -1
- package/dist/index-BZI1xwTA.d.cts +55 -0
- package/dist/{index-D8sNCYCo.d.mts → index-BZs9fI-P.d.mts} +1 -1
- package/dist/{index-kkyge37R.d.mts → index-Bhpc-68J.d.mts} +1 -1
- package/dist/{index-C8kegqfi.d.cts → index-BqZjtkzF.d.cts} +1 -1
- package/dist/{index-PoT1oV9X.d.cts → index-C56_VCbD.d.cts} +1 -1
- package/dist/{index-eWVK6SXF.d.cts → index-DGGFii8s.d.cts} +1 -1
- package/dist/{index-BgSrVqHI.d.mts → index-DXURX22V.d.mts} +1 -1
- package/dist/{index-4_E8pg8R.d.mts → index-DYc5_RYF.d.mts} +1 -1
- package/dist/{index-BnfK4WNL.d.mts → index-D_XDxNlm.d.mts} +1 -1
- package/dist/{index-IfEDsoFj.d.cts → index-Di8gHXKt.d.cts} +1 -1
- package/dist/{index-DbwnL32Q.d.mts → index-Dr5JeEjc.d.mts} +1 -1
- package/dist/{index-CnHK2xHk.d.cts → index-Dv3K2IAS.d.cts} +1 -1
- package/dist/{index-DOzfQDfG.d.cts → index-DwJSd01p.d.cts} +1 -1
- package/dist/index-Np-KvYhu.d.mts +55 -0
- package/dist/{index-Xh-lC-ge.d.mts → index-mSyoGVmz.d.mts} +1 -1
- package/dist/index.cjs +1 -2
- package/dist/index.d.cts +13 -13
- package/dist/index.d.mts +13 -13
- package/dist/index.mjs +2 -2
- package/dist/layout.d.cts +2 -2
- package/dist/layout.d.mts +2 -2
- package/dist/position.d.cts +2 -2
- package/dist/position.d.mts +2 -2
- package/dist/{presets-B4QR0tKt.mjs → presets-Cxa2Xoxa.mjs} +1 -1
- package/dist/{presets-Da2kvQPo.cjs → presets-mePesdYM.cjs} +1 -1
- package/dist/prop-types.cjs +1 -1
- package/dist/prop-types.mjs +1 -1
- package/dist/props.cjs +1 -1
- package/dist/props.mjs +1 -1
- package/dist/shadow.d.cts +2 -2
- package/dist/shadow.d.mts +2 -2
- package/dist/should-forward-prop.cjs +1 -1
- package/dist/should-forward-prop.mjs +1 -1
- package/dist/space.d.cts +2 -2
- package/dist/space.d.mts +2 -2
- package/dist/{types-Cj6Jx5LX.d.cts → types-Cl2haWqC.d.cts} +6 -6
- package/dist/{types-Cj6Jx5LX.d.mts → types-Cl2haWqC.d.mts} +6 -6
- package/dist/typography.d.cts +2 -2
- package/dist/typography.d.mts +2 -2
- package/dist/variant.d.cts +2 -2
- package/dist/variant.d.mts +2 -2
- package/package.json +1 -1
- package/dist/grid-CAuvylKs.mjs +0 -158
- package/dist/grid-Cv-XGWcr.cjs +0 -194
- package/dist/index-C0X-fL6a.d.mts +0 -55
- package/dist/index-DHAamdKa.d.cts +0 -55
package/dist/grid-CAuvylKs.mjs
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { o as responsiveQueries } from "./media-Bho3l7WK.mjs";
|
|
2
|
-
import { get, system } from "./core.mjs";
|
|
3
|
-
//#region src/grid/grid.ts
|
|
4
|
-
const spaceScale = [
|
|
5
|
-
0,
|
|
6
|
-
4,
|
|
7
|
-
8,
|
|
8
|
-
16,
|
|
9
|
-
32,
|
|
10
|
-
64,
|
|
11
|
-
128,
|
|
12
|
-
256,
|
|
13
|
-
512
|
|
14
|
-
];
|
|
15
|
-
const grid = system({
|
|
16
|
-
gridGap: {
|
|
17
|
-
property: "gridGap",
|
|
18
|
-
scale: "space",
|
|
19
|
-
defaultScale: spaceScale
|
|
20
|
-
},
|
|
21
|
-
gridColumnGap: {
|
|
22
|
-
property: "gridColumnGap",
|
|
23
|
-
scale: "space",
|
|
24
|
-
defaultScale: spaceScale
|
|
25
|
-
},
|
|
26
|
-
gridRowGap: {
|
|
27
|
-
property: "gridRowGap",
|
|
28
|
-
scale: "space",
|
|
29
|
-
defaultScale: spaceScale
|
|
30
|
-
},
|
|
31
|
-
gridColumn: true,
|
|
32
|
-
gridRow: true,
|
|
33
|
-
gridAutoFlow: true,
|
|
34
|
-
gridAutoColumns: true,
|
|
35
|
-
gridAutoRows: true,
|
|
36
|
-
gridTemplateColumns: true,
|
|
37
|
-
gridTemplateRows: true,
|
|
38
|
-
gridTemplateAreas: true,
|
|
39
|
-
gridArea: true
|
|
40
|
-
});
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/grid/layoutGrid.ts
|
|
43
|
-
const spaceValue = (theme, value) => {
|
|
44
|
-
const resolved = get(theme, `space.${value}`, value);
|
|
45
|
-
return typeof resolved === "number" ? `${resolved}px` : resolved;
|
|
46
|
-
};
|
|
47
|
-
const frameDeclarations = (theme, { margin, mode, maxWidth }) => {
|
|
48
|
-
const width = mode === "fixed" && maxWidth !== void 0 ? spaceValue(theme, maxWidth) : void 0;
|
|
49
|
-
return {
|
|
50
|
-
paddingInline: margin === void 0 ? void 0 : spaceValue(theme, margin),
|
|
51
|
-
maxWidth: width ?? "none",
|
|
52
|
-
marginInline: width === void 0 ? 0 : `max(0px, calc((100% - ${width}) / 2))`
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
const columnDeclarations = (theme, display, { columns, gutter }) => {
|
|
56
|
-
const gap = gutter === void 0 ? void 0 : spaceValue(theme, gutter);
|
|
57
|
-
return {
|
|
58
|
-
"--layout-columns": columns,
|
|
59
|
-
"--layout-gutter": gap,
|
|
60
|
-
gridTemplateColumns: display === "grid" && columns !== void 0 ? `repeat(${columns}, minmax(0, 1fr))` : void 0,
|
|
61
|
-
columnGap: gap
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
const declarations = (theme, parts, entry) => {
|
|
65
|
-
const styles = Object.assign({}, ...parts.map((part) => part === "frame" ? frameDeclarations(theme, entry) : columnDeclarations(theme, part, entry)));
|
|
66
|
-
return Object.fromEntries(Object.entries(styles).filter(([, value]) => value !== void 0));
|
|
67
|
-
};
|
|
68
|
-
const DISPLAY = {
|
|
69
|
-
frame: {},
|
|
70
|
-
grid: { display: "grid" },
|
|
71
|
-
flex: {
|
|
72
|
-
display: "flex",
|
|
73
|
-
flexDirection: "row",
|
|
74
|
-
flexWrap: "wrap"
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const layoutStyles = (theme, value, parts) => {
|
|
78
|
-
if (!value) return {};
|
|
79
|
-
const breakpoints = get(theme, "breakpoints", {});
|
|
80
|
-
const layout = get(theme, "layout", {});
|
|
81
|
-
const fields = typeof value === "object" ? Object.entries(value) : [];
|
|
82
|
-
const everywhere = Object.fromEntries(fields.filter(([, field]) => typeof field !== "object"));
|
|
83
|
-
const overrides = Object.fromEntries(fields.filter(([, field]) => typeof field === "object"));
|
|
84
|
-
const hasEverywhere = Object.keys(everywhere).length > 0;
|
|
85
|
-
const { keyed } = responsiveQueries(breakpoints);
|
|
86
|
-
const styles = Object.assign({}, ...parts.map((part) => DISPLAY[part]));
|
|
87
|
-
let themed = {};
|
|
88
|
-
let overridden = false;
|
|
89
|
-
for (const key of Object.keys(breakpoints)) {
|
|
90
|
-
const layer = layout[key]?.content;
|
|
91
|
-
const named = Object.hasOwn(overrides, key) ? overrides[key] : void 0;
|
|
92
|
-
const override = hasEverywhere || named ? {
|
|
93
|
-
...everywhere,
|
|
94
|
-
...named
|
|
95
|
-
} : void 0;
|
|
96
|
-
themed = {
|
|
97
|
-
...themed,
|
|
98
|
-
...layer
|
|
99
|
-
};
|
|
100
|
-
if (layer || override || overridden) {
|
|
101
|
-
const block = declarations(theme, parts, {
|
|
102
|
-
...themed,
|
|
103
|
-
...override
|
|
104
|
-
});
|
|
105
|
-
const media = keyed.get(key);
|
|
106
|
-
if (media) styles[media] = block;
|
|
107
|
-
else Object.assign(styles, block);
|
|
108
|
-
}
|
|
109
|
-
overridden = override !== void 0;
|
|
110
|
-
}
|
|
111
|
-
return styles;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* The layout grid from `theme.layout`, per breakpoint: each breakpoint's `content` (columns,
|
|
115
|
-
* margin, gutter, fluid or fixed), inherited mobile-first. A field in `value` replaces the
|
|
116
|
-
* theme's at every breakpoint (`{ gutter: 8 }`); an entry under a breakpoint name replaces it
|
|
117
|
-
* there only, on top of those fields (`{ gutter: 8, md: { columns: 6 } }`), and the next
|
|
118
|
-
* breakpoint is back to the theme. Every written block carries the full set, so no block
|
|
119
|
-
* inherits a stale `max-width`. The layout owns what it writes - an explicit `gap`, padding or
|
|
120
|
-
* `maxWidth` on the same element does not override it; rows take `rowGap`.
|
|
121
|
-
*/
|
|
122
|
-
const layoutGridStyles = (theme, value, display = "grid") => layoutStyles(theme, value, [display, "frame"]);
|
|
123
|
-
const layoutParser = (part) => Object.assign((props) => layoutStyles(props.theme, props.layout, [part]), {
|
|
124
|
-
config: {},
|
|
125
|
-
propNames: ["layout"],
|
|
126
|
-
cache: {}
|
|
127
|
-
});
|
|
128
|
-
/**
|
|
129
|
-
* The `layout` prop as the page frame alone: the margin and, in fixed mode, the centred max
|
|
130
|
-
* width per breakpoint - no columns, and `display` is left alone. Compose it with `layoutGrid`
|
|
131
|
-
* or `layoutFlex` for the columns; {@link layoutGridStyles} writes both in a style function.
|
|
132
|
-
*/
|
|
133
|
-
const layoutFrame = layoutParser("frame");
|
|
134
|
-
/** The `layout` prop's columns on a grid container: tracks, gutter, `--layout-*` variables. */
|
|
135
|
-
const layoutGrid = layoutParser("grid");
|
|
136
|
-
/** The `layout` prop's columns on a flex container: a wrapping row with the same gutter. */
|
|
137
|
-
const layoutFlex = layoutParser("flex");
|
|
138
|
-
const flexSpan = (n) => {
|
|
139
|
-
const columns = "var(--layout-columns)";
|
|
140
|
-
const gutter = "var(--layout-gutter)";
|
|
141
|
-
return `0 0 calc((100% - (${columns} - 1) * ${gutter}) / ${columns} * ${n} + ${n - 1} * ${gutter})`;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* The `span` prop: how many layout-grid columns an element takes. It writes both
|
|
145
|
-
* `grid-column: span N` (read by a Grid parent) and a flex basis from the parent's
|
|
146
|
-
* `--layout-columns` / `--layout-gutter` (read by a Flex parent); each container ignores the
|
|
147
|
-
* other's property. `span="full"` takes the whole row whatever the column count - in any grid,
|
|
148
|
-
* layout grid or not. Responsive like any prop: `span={{ xs: 'full', md: 6 }}`.
|
|
149
|
-
*/
|
|
150
|
-
const span = system({ span: (n) => n === "full" ? {
|
|
151
|
-
gridColumn: "1 / -1",
|
|
152
|
-
flex: "0 0 100%"
|
|
153
|
-
} : {
|
|
154
|
-
gridColumn: `span ${n}`,
|
|
155
|
-
flex: flexSpan(n)
|
|
156
|
-
} });
|
|
157
|
-
//#endregion
|
|
158
|
-
export { span as a, layoutGridStyles as i, layoutFrame as n, grid as o, layoutGrid as r, layoutFlex as t };
|
package/dist/grid-Cv-XGWcr.cjs
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
const require_media = require("./media-DSJdRy_k.cjs");
|
|
2
|
-
const require_core = require("./core.cjs");
|
|
3
|
-
//#region src/grid/grid.ts
|
|
4
|
-
const spaceScale = [
|
|
5
|
-
0,
|
|
6
|
-
4,
|
|
7
|
-
8,
|
|
8
|
-
16,
|
|
9
|
-
32,
|
|
10
|
-
64,
|
|
11
|
-
128,
|
|
12
|
-
256,
|
|
13
|
-
512
|
|
14
|
-
];
|
|
15
|
-
const config = {
|
|
16
|
-
gridGap: {
|
|
17
|
-
property: "gridGap",
|
|
18
|
-
scale: "space",
|
|
19
|
-
defaultScale: spaceScale
|
|
20
|
-
},
|
|
21
|
-
gridColumnGap: {
|
|
22
|
-
property: "gridColumnGap",
|
|
23
|
-
scale: "space",
|
|
24
|
-
defaultScale: spaceScale
|
|
25
|
-
},
|
|
26
|
-
gridRowGap: {
|
|
27
|
-
property: "gridRowGap",
|
|
28
|
-
scale: "space",
|
|
29
|
-
defaultScale: spaceScale
|
|
30
|
-
},
|
|
31
|
-
gridColumn: true,
|
|
32
|
-
gridRow: true,
|
|
33
|
-
gridAutoFlow: true,
|
|
34
|
-
gridAutoColumns: true,
|
|
35
|
-
gridAutoRows: true,
|
|
36
|
-
gridTemplateColumns: true,
|
|
37
|
-
gridTemplateRows: true,
|
|
38
|
-
gridTemplateAreas: true,
|
|
39
|
-
gridArea: true
|
|
40
|
-
};
|
|
41
|
-
const grid = require_core.system(config);
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/grid/layoutGrid.ts
|
|
44
|
-
const spaceValue = (theme, value) => {
|
|
45
|
-
const resolved = require_core.get(theme, `space.${value}`, value);
|
|
46
|
-
return typeof resolved === "number" ? `${resolved}px` : resolved;
|
|
47
|
-
};
|
|
48
|
-
const frameDeclarations = (theme, { margin, mode, maxWidth }) => {
|
|
49
|
-
const width = mode === "fixed" && maxWidth !== void 0 ? spaceValue(theme, maxWidth) : void 0;
|
|
50
|
-
return {
|
|
51
|
-
paddingInline: margin === void 0 ? void 0 : spaceValue(theme, margin),
|
|
52
|
-
maxWidth: width ?? "none",
|
|
53
|
-
marginInline: width === void 0 ? 0 : `max(0px, calc((100% - ${width}) / 2))`
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
const columnDeclarations = (theme, display, { columns, gutter }) => {
|
|
57
|
-
const gap = gutter === void 0 ? void 0 : spaceValue(theme, gutter);
|
|
58
|
-
return {
|
|
59
|
-
"--layout-columns": columns,
|
|
60
|
-
"--layout-gutter": gap,
|
|
61
|
-
gridTemplateColumns: display === "grid" && columns !== void 0 ? `repeat(${columns}, minmax(0, 1fr))` : void 0,
|
|
62
|
-
columnGap: gap
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const declarations = (theme, parts, entry) => {
|
|
66
|
-
const styles = Object.assign({}, ...parts.map((part) => part === "frame" ? frameDeclarations(theme, entry) : columnDeclarations(theme, part, entry)));
|
|
67
|
-
return Object.fromEntries(Object.entries(styles).filter(([, value]) => value !== void 0));
|
|
68
|
-
};
|
|
69
|
-
const DISPLAY = {
|
|
70
|
-
frame: {},
|
|
71
|
-
grid: { display: "grid" },
|
|
72
|
-
flex: {
|
|
73
|
-
display: "flex",
|
|
74
|
-
flexDirection: "row",
|
|
75
|
-
flexWrap: "wrap"
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const layoutStyles = (theme, value, parts) => {
|
|
79
|
-
if (!value) return {};
|
|
80
|
-
const breakpoints = require_core.get(theme, "breakpoints", {});
|
|
81
|
-
const layout = require_core.get(theme, "layout", {});
|
|
82
|
-
const fields = typeof value === "object" ? Object.entries(value) : [];
|
|
83
|
-
const everywhere = Object.fromEntries(fields.filter(([, field]) => typeof field !== "object"));
|
|
84
|
-
const overrides = Object.fromEntries(fields.filter(([, field]) => typeof field === "object"));
|
|
85
|
-
const hasEverywhere = Object.keys(everywhere).length > 0;
|
|
86
|
-
const { keyed } = require_media.responsiveQueries(breakpoints);
|
|
87
|
-
const styles = Object.assign({}, ...parts.map((part) => DISPLAY[part]));
|
|
88
|
-
let themed = {};
|
|
89
|
-
let overridden = false;
|
|
90
|
-
for (const key of Object.keys(breakpoints)) {
|
|
91
|
-
const layer = layout[key]?.content;
|
|
92
|
-
const named = Object.hasOwn(overrides, key) ? overrides[key] : void 0;
|
|
93
|
-
const override = hasEverywhere || named ? {
|
|
94
|
-
...everywhere,
|
|
95
|
-
...named
|
|
96
|
-
} : void 0;
|
|
97
|
-
themed = {
|
|
98
|
-
...themed,
|
|
99
|
-
...layer
|
|
100
|
-
};
|
|
101
|
-
if (layer || override || overridden) {
|
|
102
|
-
const block = declarations(theme, parts, {
|
|
103
|
-
...themed,
|
|
104
|
-
...override
|
|
105
|
-
});
|
|
106
|
-
const media = keyed.get(key);
|
|
107
|
-
if (media) styles[media] = block;
|
|
108
|
-
else Object.assign(styles, block);
|
|
109
|
-
}
|
|
110
|
-
overridden = override !== void 0;
|
|
111
|
-
}
|
|
112
|
-
return styles;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* The layout grid from `theme.layout`, per breakpoint: each breakpoint's `content` (columns,
|
|
116
|
-
* margin, gutter, fluid or fixed), inherited mobile-first. A field in `value` replaces the
|
|
117
|
-
* theme's at every breakpoint (`{ gutter: 8 }`); an entry under a breakpoint name replaces it
|
|
118
|
-
* there only, on top of those fields (`{ gutter: 8, md: { columns: 6 } }`), and the next
|
|
119
|
-
* breakpoint is back to the theme. Every written block carries the full set, so no block
|
|
120
|
-
* inherits a stale `max-width`. The layout owns what it writes - an explicit `gap`, padding or
|
|
121
|
-
* `maxWidth` on the same element does not override it; rows take `rowGap`.
|
|
122
|
-
*/
|
|
123
|
-
const layoutGridStyles = (theme, value, display = "grid") => layoutStyles(theme, value, [display, "frame"]);
|
|
124
|
-
const layoutParser = (part) => Object.assign((props) => layoutStyles(props.theme, props.layout, [part]), {
|
|
125
|
-
config: {},
|
|
126
|
-
propNames: ["layout"],
|
|
127
|
-
cache: {}
|
|
128
|
-
});
|
|
129
|
-
/**
|
|
130
|
-
* The `layout` prop as the page frame alone: the margin and, in fixed mode, the centred max
|
|
131
|
-
* width per breakpoint - no columns, and `display` is left alone. Compose it with `layoutGrid`
|
|
132
|
-
* or `layoutFlex` for the columns; {@link layoutGridStyles} writes both in a style function.
|
|
133
|
-
*/
|
|
134
|
-
const layoutFrame = layoutParser("frame");
|
|
135
|
-
/** The `layout` prop's columns on a grid container: tracks, gutter, `--layout-*` variables. */
|
|
136
|
-
const layoutGrid = layoutParser("grid");
|
|
137
|
-
/** The `layout` prop's columns on a flex container: a wrapping row with the same gutter. */
|
|
138
|
-
const layoutFlex = layoutParser("flex");
|
|
139
|
-
const flexSpan = (n) => {
|
|
140
|
-
const columns = "var(--layout-columns)";
|
|
141
|
-
const gutter = "var(--layout-gutter)";
|
|
142
|
-
return `0 0 calc((100% - (${columns} - 1) * ${gutter}) / ${columns} * ${n} + ${n - 1} * ${gutter})`;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* The `span` prop: how many layout-grid columns an element takes. It writes both
|
|
146
|
-
* `grid-column: span N` (read by a Grid parent) and a flex basis from the parent's
|
|
147
|
-
* `--layout-columns` / `--layout-gutter` (read by a Flex parent); each container ignores the
|
|
148
|
-
* other's property. `span="full"` takes the whole row whatever the column count - in any grid,
|
|
149
|
-
* layout grid or not. Responsive like any prop: `span={{ xs: 'full', md: 6 }}`.
|
|
150
|
-
*/
|
|
151
|
-
const span = require_core.system({ span: (n) => n === "full" ? {
|
|
152
|
-
gridColumn: "1 / -1",
|
|
153
|
-
flex: "0 0 100%"
|
|
154
|
-
} : {
|
|
155
|
-
gridColumn: `span ${n}`,
|
|
156
|
-
flex: flexSpan(n)
|
|
157
|
-
} });
|
|
158
|
-
//#endregion
|
|
159
|
-
Object.defineProperty(exports, "grid", {
|
|
160
|
-
enumerable: true,
|
|
161
|
-
get: function() {
|
|
162
|
-
return grid;
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
Object.defineProperty(exports, "layoutFlex", {
|
|
166
|
-
enumerable: true,
|
|
167
|
-
get: function() {
|
|
168
|
-
return layoutFlex;
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(exports, "layoutFrame", {
|
|
172
|
-
enumerable: true,
|
|
173
|
-
get: function() {
|
|
174
|
-
return layoutFrame;
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
Object.defineProperty(exports, "layoutGrid", {
|
|
178
|
-
enumerable: true,
|
|
179
|
-
get: function() {
|
|
180
|
-
return layoutGrid;
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
Object.defineProperty(exports, "layoutGridStyles", {
|
|
184
|
-
enumerable: true,
|
|
185
|
-
get: function() {
|
|
186
|
-
return layoutGridStyles;
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
Object.defineProperty(exports, "span", {
|
|
190
|
-
enumerable: true,
|
|
191
|
-
get: function() {
|
|
192
|
-
return span;
|
|
193
|
-
}
|
|
194
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { a as Parser, l as StyleObject } from "./index-IulNhyDt.mjs";
|
|
2
|
-
import "./types-Cj6Jx5LX.mjs";
|
|
3
|
-
//#region src/grid/grid.d.ts
|
|
4
|
-
declare const grid: Parser;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/grid/layoutGrid.d.ts
|
|
7
|
-
/** The layout grid at one breakpoint - the `content` part of a `theme.layout` entry. */
|
|
8
|
-
interface LayoutGridEntry {
|
|
9
|
-
/** Equal columns. */
|
|
10
|
-
columns?: number;
|
|
11
|
-
/** Inline padding - a `theme.space` key or a CSS length. */
|
|
12
|
-
margin?: string | number;
|
|
13
|
-
/** Gap between columns - a `theme.space` key or a CSS length. */
|
|
14
|
-
gutter?: string | number;
|
|
15
|
-
/** `fluid` spans the space; `fixed` is a container centred at `maxWidth`. */
|
|
16
|
-
mode?: 'fluid' | 'fixed';
|
|
17
|
-
maxWidth?: string | number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* `true` for the theme's layout grid, or an entry: its fields replace the theme's at every
|
|
21
|
-
* breakpoint, and entries under breakpoint names replace it at that breakpoint only.
|
|
22
|
-
*/
|
|
23
|
-
type LayoutGridValue = boolean | Record<string, LayoutGridEntry | LayoutGridEntry[keyof LayoutGridEntry]>;
|
|
24
|
-
/** The container a layout grid is drawn on: column tracks, or a wrapping flex row. */
|
|
25
|
-
type LayoutGridDisplay = 'grid' | 'flex';
|
|
26
|
-
/**
|
|
27
|
-
* The layout grid from `theme.layout`, per breakpoint: each breakpoint's `content` (columns,
|
|
28
|
-
* margin, gutter, fluid or fixed), inherited mobile-first. A field in `value` replaces the
|
|
29
|
-
* theme's at every breakpoint (`{ gutter: 8 }`); an entry under a breakpoint name replaces it
|
|
30
|
-
* there only, on top of those fields (`{ gutter: 8, md: { columns: 6 } }`), and the next
|
|
31
|
-
* breakpoint is back to the theme. Every written block carries the full set, so no block
|
|
32
|
-
* inherits a stale `max-width`. The layout owns what it writes - an explicit `gap`, padding or
|
|
33
|
-
* `maxWidth` on the same element does not override it; rows take `rowGap`.
|
|
34
|
-
*/
|
|
35
|
-
declare const layoutGridStyles: (theme: unknown, value: LayoutGridValue | undefined, display?: LayoutGridDisplay) => StyleObject;
|
|
36
|
-
/**
|
|
37
|
-
* The `layout` prop as the page frame alone: the margin and, in fixed mode, the centred max
|
|
38
|
-
* width per breakpoint - no columns, and `display` is left alone. Compose it with `layoutGrid`
|
|
39
|
-
* or `layoutFlex` for the columns; {@link layoutGridStyles} writes both in a style function.
|
|
40
|
-
*/
|
|
41
|
-
declare const layoutFrame: Parser;
|
|
42
|
-
/** The `layout` prop's columns on a grid container: tracks, gutter, `--layout-*` variables. */
|
|
43
|
-
declare const layoutGrid: Parser;
|
|
44
|
-
/** The `layout` prop's columns on a flex container: a wrapping row with the same gutter. */
|
|
45
|
-
declare const layoutFlex: Parser;
|
|
46
|
-
/**
|
|
47
|
-
* The `span` prop: how many layout-grid columns an element takes. It writes both
|
|
48
|
-
* `grid-column: span N` (read by a Grid parent) and a flex basis from the parent's
|
|
49
|
-
* `--layout-columns` / `--layout-gutter` (read by a Flex parent); each container ignores the
|
|
50
|
-
* other's property. `span="full"` takes the whole row whatever the column count - in any grid,
|
|
51
|
-
* layout grid or not. Responsive like any prop: `span={{ xs: 'full', md: 6 }}`.
|
|
52
|
-
*/
|
|
53
|
-
declare const span: Parser;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { layoutFrame as a, span as c, layoutFlex as i, grid as l, LayoutGridEntry as n, layoutGrid as o, LayoutGridValue as r, layoutGridStyles as s, LayoutGridDisplay as t };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { a as Parser, l as StyleObject } from "./index-iVqAMF2L.cjs";
|
|
2
|
-
import "./types-Cj6Jx5LX.cjs";
|
|
3
|
-
//#region src/grid/grid.d.ts
|
|
4
|
-
declare const grid: Parser;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/grid/layoutGrid.d.ts
|
|
7
|
-
/** The layout grid at one breakpoint - the `content` part of a `theme.layout` entry. */
|
|
8
|
-
interface LayoutGridEntry {
|
|
9
|
-
/** Equal columns. */
|
|
10
|
-
columns?: number;
|
|
11
|
-
/** Inline padding - a `theme.space` key or a CSS length. */
|
|
12
|
-
margin?: string | number;
|
|
13
|
-
/** Gap between columns - a `theme.space` key or a CSS length. */
|
|
14
|
-
gutter?: string | number;
|
|
15
|
-
/** `fluid` spans the space; `fixed` is a container centred at `maxWidth`. */
|
|
16
|
-
mode?: 'fluid' | 'fixed';
|
|
17
|
-
maxWidth?: string | number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* `true` for the theme's layout grid, or an entry: its fields replace the theme's at every
|
|
21
|
-
* breakpoint, and entries under breakpoint names replace it at that breakpoint only.
|
|
22
|
-
*/
|
|
23
|
-
type LayoutGridValue = boolean | Record<string, LayoutGridEntry | LayoutGridEntry[keyof LayoutGridEntry]>;
|
|
24
|
-
/** The container a layout grid is drawn on: column tracks, or a wrapping flex row. */
|
|
25
|
-
type LayoutGridDisplay = 'grid' | 'flex';
|
|
26
|
-
/**
|
|
27
|
-
* The layout grid from `theme.layout`, per breakpoint: each breakpoint's `content` (columns,
|
|
28
|
-
* margin, gutter, fluid or fixed), inherited mobile-first. A field in `value` replaces the
|
|
29
|
-
* theme's at every breakpoint (`{ gutter: 8 }`); an entry under a breakpoint name replaces it
|
|
30
|
-
* there only, on top of those fields (`{ gutter: 8, md: { columns: 6 } }`), and the next
|
|
31
|
-
* breakpoint is back to the theme. Every written block carries the full set, so no block
|
|
32
|
-
* inherits a stale `max-width`. The layout owns what it writes - an explicit `gap`, padding or
|
|
33
|
-
* `maxWidth` on the same element does not override it; rows take `rowGap`.
|
|
34
|
-
*/
|
|
35
|
-
declare const layoutGridStyles: (theme: unknown, value: LayoutGridValue | undefined, display?: LayoutGridDisplay) => StyleObject;
|
|
36
|
-
/**
|
|
37
|
-
* The `layout` prop as the page frame alone: the margin and, in fixed mode, the centred max
|
|
38
|
-
* width per breakpoint - no columns, and `display` is left alone. Compose it with `layoutGrid`
|
|
39
|
-
* or `layoutFlex` for the columns; {@link layoutGridStyles} writes both in a style function.
|
|
40
|
-
*/
|
|
41
|
-
declare const layoutFrame: Parser;
|
|
42
|
-
/** The `layout` prop's columns on a grid container: tracks, gutter, `--layout-*` variables. */
|
|
43
|
-
declare const layoutGrid: Parser;
|
|
44
|
-
/** The `layout` prop's columns on a flex container: a wrapping row with the same gutter. */
|
|
45
|
-
declare const layoutFlex: Parser;
|
|
46
|
-
/**
|
|
47
|
-
* The `span` prop: how many layout-grid columns an element takes. It writes both
|
|
48
|
-
* `grid-column: span N` (read by a Grid parent) and a flex basis from the parent's
|
|
49
|
-
* `--layout-columns` / `--layout-gutter` (read by a Flex parent); each container ignores the
|
|
50
|
-
* other's property. `span="full"` takes the whole row whatever the column count - in any grid,
|
|
51
|
-
* layout grid or not. Responsive like any prop: `span={{ xs: 'full', md: 6 }}`.
|
|
52
|
-
*/
|
|
53
|
-
declare const span: Parser;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { layoutFrame as a, span as c, layoutFlex as i, grid as l, LayoutGridEntry as n, layoutGrid as o, LayoutGridValue as r, layoutGridStyles as s, LayoutGridDisplay as t };
|