baseline-kit 5.1.0 → 5.2.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/CHANGELOG.md +8 -0
- package/README.md +10 -6
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +8 -2
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +59 -54
- package/dist/index.mjs.map +1 -1
- package/dist/remix.d.ts +15 -1
- package/dist/remix.mjs +302 -307
- package/dist/remix.mjs.map +1 -1
- package/dist/{src-C3TICsw6.js → src-D0nL1BwZ.js} +9 -6
- package/dist/src-D0nL1BwZ.js.map +1 -0
- package/dist/src-R5usYJol.cjs +2 -0
- package/dist/src-R5usYJol.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/src-C-1u5WNS.cjs +0 -2
- package/dist/src-C-1u5WNS.cjs.map +0 -1
- package/dist/src-C3TICsw6.js.map +0 -1
package/dist/remix.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { clientEntry as e, ref as t } from "remix/ui";
|
|
2
|
+
import { jsx as n, jsxs as r } from "remix/ui/jsx-runtime";
|
|
3
3
|
//#region packages/core/src/config/defaults.ts
|
|
4
|
-
var
|
|
4
|
+
var i = {
|
|
5
5
|
base: 8,
|
|
6
6
|
baseline: {
|
|
7
7
|
variant: "line",
|
|
@@ -42,15 +42,15 @@ var r = {
|
|
|
42
42
|
debugging: "hidden",
|
|
43
43
|
color: "var(--bk-padder-color-theme, hsla(270, 60%, 40%, 0.6))"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, a = [
|
|
46
46
|
"baseline",
|
|
47
47
|
"guide",
|
|
48
48
|
"spacer",
|
|
49
49
|
"box",
|
|
50
50
|
"padder"
|
|
51
|
-
],
|
|
51
|
+
], o = (e) => {
|
|
52
52
|
let { parentConfig: t, base: n } = e, r = {};
|
|
53
|
-
for (let n of
|
|
53
|
+
for (let n of a) {
|
|
54
54
|
let i = e[n], a = t[n], o = {
|
|
55
55
|
...a,
|
|
56
56
|
...i
|
|
@@ -67,32 +67,32 @@ var r = {
|
|
|
67
67
|
};
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region packages/core/src/utils/parse.ts
|
|
70
|
-
function
|
|
70
|
+
function s(e) {
|
|
71
71
|
let t = e.trim().match(/^([+-]?[\d.]+)([a-zA-Z%]+)$/);
|
|
72
72
|
return t ? {
|
|
73
73
|
value: parseFloat(t[1]),
|
|
74
74
|
unit: t[2]
|
|
75
75
|
} : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function c(e, t) {
|
|
78
78
|
return e === void 0 && t !== void 0 ? `${t}px` : e === "auto" || typeof e == "string" && /^(auto|100%|0|.*(fr|vh|vw|vmin|vmax|rem))$/.test(e) ? String(e) : typeof e == "number" ? `${e}px` : e ?? "";
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region packages/core/src/utils/convert.ts
|
|
82
|
-
var
|
|
82
|
+
var l = {
|
|
83
83
|
parentSize: 0,
|
|
84
84
|
viewportWidth: 1920,
|
|
85
85
|
viewportHeight: 1080,
|
|
86
86
|
rootFontSize: 16,
|
|
87
87
|
parentFontSize: 16
|
|
88
|
-
},
|
|
88
|
+
}, u = {
|
|
89
89
|
px: 1,
|
|
90
90
|
in: 96,
|
|
91
91
|
cm: 37.8,
|
|
92
92
|
mm: 3.78,
|
|
93
93
|
pt: 1.33,
|
|
94
94
|
pc: 16
|
|
95
|
-
},
|
|
95
|
+
}, d = {
|
|
96
96
|
em: (e) => e.parentFontSize,
|
|
97
97
|
rem: (e) => e.rootFontSize,
|
|
98
98
|
vh: (e) => e.viewportHeight / 100,
|
|
@@ -101,50 +101,50 @@ var c = {
|
|
|
101
101
|
vmax: (e) => Math.max(e.viewportWidth, e.viewportHeight) / 100,
|
|
102
102
|
"%": (e) => e.parentSize / 100
|
|
103
103
|
};
|
|
104
|
-
function
|
|
104
|
+
function f(e, t) {
|
|
105
105
|
if (typeof e == "number") return e;
|
|
106
106
|
if (typeof e != "string") return null;
|
|
107
|
-
let n =
|
|
107
|
+
let n = s(e);
|
|
108
108
|
if (!n) return null;
|
|
109
109
|
let { value: r, unit: i } = n;
|
|
110
|
-
if (i in
|
|
110
|
+
if (i in u) return r * u[i];
|
|
111
111
|
if (i === "auto") return null;
|
|
112
|
-
let a =
|
|
112
|
+
let a = d[i];
|
|
113
113
|
return a ? r * a({
|
|
114
|
-
...
|
|
114
|
+
...l,
|
|
115
115
|
...t
|
|
116
116
|
}) : null;
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region packages/core/src/utils/math.ts
|
|
120
|
-
function
|
|
120
|
+
function p(e, t, n) {
|
|
121
121
|
return Math.min(Math.max(e, t), n);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function m(e) {
|
|
124
124
|
let { height: t, top: n, bottom: r, base: i } = e, a = (t ?? 0) - (n + r);
|
|
125
125
|
return Math.max(1, Math.floor(a / i));
|
|
126
126
|
}
|
|
127
127
|
//#endregion
|
|
128
128
|
//#region packages/core/src/utils/normalize.ts
|
|
129
|
-
function
|
|
129
|
+
function h(e, t = {}) {
|
|
130
130
|
let { base: n = 8, round: r = !0, clamp: i, context: a } = t;
|
|
131
131
|
if (e === "auto") return n;
|
|
132
132
|
let o = null;
|
|
133
|
-
if (typeof e == "number" ? o = e : typeof e == "string" && (o =
|
|
133
|
+
if (typeof e == "number" ? o = e : typeof e == "string" && (o = f(e, a) ?? n), o === null && (o = n), n <= 0) return o;
|
|
134
134
|
let s = r ? Math.round(o / n) * n : o;
|
|
135
|
-
return i === void 0 ? s :
|
|
135
|
+
return i === void 0 ? s : p(s, i.min ?? -Infinity, i.max ?? Infinity);
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
return !e || e[0] === void 0 && e[1] === void 0 ? t : [e[0] === void 0 ? t[0] :
|
|
137
|
+
function g(e, t, n) {
|
|
138
|
+
return !e || e[0] === void 0 && e[1] === void 0 ? t : [e[0] === void 0 ? t[0] : h(e[0], n), e[1] === void 0 ? t[1] : h(e[1], n)];
|
|
139
139
|
}
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region packages/core/src/utils/padding.ts
|
|
142
|
-
function
|
|
143
|
-
if ("padding" in e && e.padding != null) return
|
|
144
|
-
let t = "block" in e && e.block != null ?
|
|
142
|
+
function _(e) {
|
|
143
|
+
if ("padding" in e && e.padding != null) return v(e.padding);
|
|
144
|
+
let t = "block" in e && e.block != null ? y(e.block) : {
|
|
145
145
|
top: 0,
|
|
146
146
|
bottom: 0
|
|
147
|
-
}, n = "inline" in e && e.inline != null ?
|
|
147
|
+
}, n = "inline" in e && e.inline != null ? b(e.inline) : {
|
|
148
148
|
left: 0,
|
|
149
149
|
right: 0
|
|
150
150
|
};
|
|
@@ -155,7 +155,7 @@ function g(e) {
|
|
|
155
155
|
left: n.left
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function v(e) {
|
|
159
159
|
if (typeof e == "number") return {
|
|
160
160
|
top: e,
|
|
161
161
|
right: e,
|
|
@@ -183,7 +183,7 @@ function _(e) {
|
|
|
183
183
|
left: 0
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function y(e) {
|
|
187
187
|
if (typeof e == "number") return {
|
|
188
188
|
top: e,
|
|
189
189
|
bottom: e
|
|
@@ -203,7 +203,7 @@ function v(e) {
|
|
|
203
203
|
bottom: 0
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function b(e) {
|
|
207
207
|
if (typeof e == "number") return {
|
|
208
208
|
left: e,
|
|
209
209
|
right: e
|
|
@@ -225,14 +225,17 @@ function y(e) {
|
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
227
|
//#region packages/core/src/utils/snapping.ts
|
|
228
|
-
function
|
|
229
|
-
let i =
|
|
230
|
-
if (
|
|
231
|
-
if (
|
|
228
|
+
function x(e, t, n, r) {
|
|
229
|
+
let i = _({ padding: n }), a = typeof r == "string" ? r : r.mode, o = typeof r == "string" ? "bottom" : r.snapEdge ?? "bottom";
|
|
230
|
+
if (a === "none") return i;
|
|
231
|
+
if (a === "height") {
|
|
232
232
|
let n = e % t;
|
|
233
|
-
n !== 0
|
|
233
|
+
if (n !== 0) {
|
|
234
|
+
let e = t - n;
|
|
235
|
+
o === "top" ? i.top += e : i.bottom += e;
|
|
236
|
+
}
|
|
234
237
|
}
|
|
235
|
-
if (
|
|
238
|
+
if (a === "clamp") {
|
|
236
239
|
i.top %= t;
|
|
237
240
|
let n = e % t;
|
|
238
241
|
n !== 0 && (i.bottom += t - n), i.bottom %= t;
|
|
@@ -241,24 +244,24 @@ function b(e, t, n, r) {
|
|
|
241
244
|
}
|
|
242
245
|
//#endregion
|
|
243
246
|
//#region packages/core/src/utils/merge.ts
|
|
244
|
-
function
|
|
247
|
+
function S(e, t, n) {
|
|
245
248
|
let r = typeof e == "string" ? e : e.key, i = typeof e == "string" ? t : e.value, a = typeof e == "string" ? n : e.defaultStyles, o = typeof e == "object" ? e.skipDimensions : void 0;
|
|
246
249
|
return o && (o.fitContent?.includes(r) && i === "fit-content" || o.auto?.includes(r) && i === "auto" || o.fullSize?.includes(r) && (i === "100%" || i === "100vh" || i === "100vw")) || i === a[r] ? {} : { [r]: i };
|
|
247
250
|
}
|
|
248
251
|
//#endregion
|
|
249
252
|
//#region packages/core/src/validation/guide.ts
|
|
250
|
-
var ee = /^\d*\.?\d+(?:fr|px|%|em|rem|vh|vw|vmin|vmax|pt|pc|in|cm|mm)$/,
|
|
253
|
+
var ee = /^\d*\.?\d+(?:fr|px|%|em|rem|vh|vw|vmin|vmax|pt|pc|in|cm|mm)$/, C = (e) => typeof e == "number" ? Number.isFinite(e) && e >= 0 : typeof e == "string" ? e === "auto" || e === "100%" || ee.test(e) : !1, te = (e) => Array.isArray(e) && e.length > 0 && e.every(C), w = {
|
|
251
254
|
template: "none",
|
|
252
255
|
columnsCount: 0,
|
|
253
256
|
calculatedGap: 0,
|
|
254
257
|
isValid: !1
|
|
255
258
|
};
|
|
256
259
|
function ne(e, t, n) {
|
|
257
|
-
let r = t.variant ?? "line", i = t.base ?? 8, a =
|
|
260
|
+
let r = t.variant ?? "line", i = t.base ?? 8, a = h(t.gap ?? 0, {
|
|
258
261
|
base: i,
|
|
259
262
|
context: n
|
|
260
263
|
});
|
|
261
|
-
if (!e) return
|
|
264
|
+
if (!e) return w;
|
|
262
265
|
switch (r) {
|
|
263
266
|
case "line": {
|
|
264
267
|
let t = a === 0 ? 0 : a - 1, n = t + 1, r = t === 0 ? Math.max(1, Math.floor(e) + 1) : Math.max(1, Math.floor((e + 1) / n) + 1);
|
|
@@ -270,9 +273,9 @@ function ne(e, t, n) {
|
|
|
270
273
|
};
|
|
271
274
|
}
|
|
272
275
|
case "pattern": {
|
|
273
|
-
if (!t.columns || !Array.isArray(t.columns) || !te(t.columns)) return
|
|
276
|
+
if (!t.columns || !Array.isArray(t.columns) || !te(t.columns)) return w;
|
|
274
277
|
let e = t.columns.map((e) => typeof e == "number" ? `${e}px` : e);
|
|
275
|
-
return e.some((e) => e === "0" || e === "0px") ?
|
|
278
|
+
return e.some((e) => e === "0" || e === "0px") ? w : {
|
|
276
279
|
template: e.join(" "),
|
|
277
280
|
columnsCount: e.length,
|
|
278
281
|
calculatedGap: a,
|
|
@@ -281,8 +284,8 @@ function ne(e, t, n) {
|
|
|
281
284
|
}
|
|
282
285
|
case "fixed": {
|
|
283
286
|
let e = typeof t.columns == "number" ? t.columns : 0;
|
|
284
|
-
return e < 1 ?
|
|
285
|
-
template: `repeat(${e}, ${t.columnWidth ?
|
|
287
|
+
return e < 1 ? w : {
|
|
288
|
+
template: `repeat(${e}, ${t.columnWidth ? c(t.columnWidth) : "1fr"})`,
|
|
286
289
|
columnsCount: e,
|
|
287
290
|
calculatedGap: a,
|
|
288
291
|
isValid: !0
|
|
@@ -296,7 +299,7 @@ function ne(e, t, n) {
|
|
|
296
299
|
calculatedGap: a,
|
|
297
300
|
isValid: !0
|
|
298
301
|
};
|
|
299
|
-
let i = typeof r == "number" ? `${r}px` : r.toString(), o =
|
|
302
|
+
let i = typeof r == "number" ? `${r}px` : r.toString(), o = f(i, n) ?? 0, s = o > 0 ? Math.max(1, Math.floor((e + a) / (o + a))) : 1;
|
|
300
303
|
return {
|
|
301
304
|
template: `repeat(auto-fill, ${i})`,
|
|
302
305
|
columnsCount: s,
|
|
@@ -315,13 +318,13 @@ function ne(e, t, n) {
|
|
|
315
318
|
}
|
|
316
319
|
}
|
|
317
320
|
}
|
|
318
|
-
var
|
|
321
|
+
var T = (e, t, n) => {
|
|
319
322
|
let r = {};
|
|
320
323
|
return e === void 0 ? (t !== void 0 && (r.gridColumn = `span ${t}`), n !== void 0 && (r.gridRow = `span ${n}`)) : (r.gridColumn = `span ${e}`, r.gridRow = `span ${e}`), r;
|
|
321
324
|
};
|
|
322
325
|
//#endregion
|
|
323
326
|
//#region packages/core/src/descriptors/guide.ts
|
|
324
|
-
function
|
|
327
|
+
function E({ variant: e, base: t, gap: n, columns: r, columnWidth: i }) {
|
|
325
328
|
switch (e) {
|
|
326
329
|
case "line": return {
|
|
327
330
|
variant: "line",
|
|
@@ -354,7 +357,7 @@ function T({ variant: e, base: t, gap: n, columns: r, columnWidth: i }) {
|
|
|
354
357
|
base: t
|
|
355
358
|
};
|
|
356
359
|
}
|
|
357
|
-
var
|
|
360
|
+
var D = (e, t) => ({
|
|
358
361
|
"--bkgd-w": "100%",
|
|
359
362
|
"--bkgd-h": "100%",
|
|
360
363
|
"--bkgd-mw": "none",
|
|
@@ -365,45 +368,45 @@ var E = (e, t) => ({
|
|
|
365
368
|
"--bkgd-cl": t,
|
|
366
369
|
"--bkgd-g": "0"
|
|
367
370
|
});
|
|
368
|
-
function
|
|
369
|
-
let { base: t, colors: n, variant: r, align: i, width: a, height: o, columnWidth:
|
|
371
|
+
function O(e) {
|
|
372
|
+
let { base: t, colors: n, variant: r, align: i, width: a, height: o, columnWidth: s, maxWidth: l, color: u, template: d, columnsCount: f, calculatedGap: p, isVisible: m } = e, h = D(t, n.line), g = {
|
|
370
373
|
"--bkgd-cl": u ?? n.line,
|
|
371
374
|
"--bkgd-cp": u ?? n.pattern,
|
|
372
375
|
"--bkgd-ca": u ?? n.auto,
|
|
373
376
|
"--bkgd-cf": u ?? n.fixed,
|
|
374
|
-
"--bkgd-w":
|
|
375
|
-
"--bkgd-h":
|
|
376
|
-
...
|
|
377
|
+
"--bkgd-w": c(a ?? "100%"),
|
|
378
|
+
"--bkgd-h": c(o ?? "100%"),
|
|
379
|
+
...S({
|
|
377
380
|
key: "--bkgd-mw",
|
|
378
|
-
value:
|
|
381
|
+
value: c(l || "none"),
|
|
379
382
|
defaultStyles: h
|
|
380
383
|
}),
|
|
381
|
-
...
|
|
384
|
+
...S({
|
|
382
385
|
key: "--bkgd-cw",
|
|
383
|
-
value: s
|
|
386
|
+
value: c(s || "60px"),
|
|
384
387
|
defaultStyles: h
|
|
385
388
|
}),
|
|
386
|
-
...
|
|
389
|
+
...S({
|
|
387
390
|
key: "--bkgd-n",
|
|
388
391
|
value: `${f}`,
|
|
389
392
|
defaultStyles: h
|
|
390
393
|
}),
|
|
391
|
-
...
|
|
394
|
+
...S({
|
|
392
395
|
key: "--bkgd-b",
|
|
393
396
|
value: "0",
|
|
394
397
|
defaultStyles: h
|
|
395
398
|
}),
|
|
396
|
-
...
|
|
399
|
+
...S({
|
|
397
400
|
key: "--bkgd-cl",
|
|
398
401
|
value: u ?? n.line,
|
|
399
402
|
defaultStyles: h
|
|
400
403
|
}),
|
|
401
|
-
...
|
|
404
|
+
...S({
|
|
402
405
|
key: "--bkgd-g",
|
|
403
406
|
value: `${p}px`,
|
|
404
407
|
defaultStyles: h
|
|
405
408
|
}),
|
|
406
|
-
...
|
|
409
|
+
...S({
|
|
407
410
|
key: "--bkgd-j",
|
|
408
411
|
value: i || "center",
|
|
409
412
|
defaultStyles: h
|
|
@@ -423,22 +426,22 @@ function D(e) {
|
|
|
423
426
|
}
|
|
424
427
|
//#endregion
|
|
425
428
|
//#region packages/core/src/descriptors/baseline.ts
|
|
426
|
-
function
|
|
427
|
-
let { base: t, colors: n, variant: r, width: i, height: a, color: o, containerWidth:
|
|
429
|
+
function k(e) {
|
|
430
|
+
let { base: t, colors: n, variant: r, width: i, height: a, color: o, containerWidth: s, containerHeight: l, spacing: u, isVisible: d } = e, { top: f, right: p, bottom: h, left: v } = _(u), y = [
|
|
428
431
|
f,
|
|
429
|
-
|
|
430
|
-
|
|
432
|
+
p,
|
|
433
|
+
h,
|
|
431
434
|
v
|
|
432
|
-
].map((e) => e ? `${e}px` : "0").join(" "), b = y === "0 0 0 0" ? void 0 : y, x =
|
|
433
|
-
height: l > 0 ? l :
|
|
435
|
+
].map((e) => e ? `${e}px` : "0").join(" "), b = y === "0 0 0 0" ? void 0 : y, x = m({
|
|
436
|
+
height: l > 0 ? l : g([void 0, a], [s, 0])[1],
|
|
434
437
|
top: f,
|
|
435
|
-
bottom:
|
|
438
|
+
bottom: h,
|
|
436
439
|
base: t
|
|
437
440
|
});
|
|
438
441
|
return {
|
|
439
442
|
containerStyle: {
|
|
440
|
-
...i === void 0 ? {} : { "--bkbl-w":
|
|
441
|
-
...a === void 0 ? {} : { "--bkbl-h":
|
|
443
|
+
...i === void 0 ? {} : { "--bkbl-w": c(i) },
|
|
444
|
+
...a === void 0 ? {} : { "--bkbl-h": c(a) },
|
|
442
445
|
"--bkbl-cl": o ?? n.line,
|
|
443
446
|
"--bkbl-cf": o ?? n.flat,
|
|
444
447
|
"--bkbl-c": r === "line" ? "var(--bkbl-cl)" : "var(--bkbl-cf)",
|
|
@@ -456,13 +459,13 @@ function O(e) {
|
|
|
456
459
|
}
|
|
457
460
|
//#endregion
|
|
458
461
|
//#region packages/core/src/descriptors/box.ts
|
|
459
|
-
function
|
|
460
|
-
let { lineColor: t, width: n, height: r, span: i, colSpan: a, rowSpan: o, isVisible:
|
|
461
|
-
...n === void 0 ? {} : { "--bkbx-w":
|
|
462
|
-
...r === void 0 ? {} : { "--bkbx-h":
|
|
462
|
+
function A(e) {
|
|
463
|
+
let { lineColor: t, width: n, height: r, span: i, colSpan: a, rowSpan: o, isVisible: s } = e, l = {
|
|
464
|
+
...n === void 0 ? {} : { "--bkbx-w": c(n) },
|
|
465
|
+
...r === void 0 ? {} : { "--bkbx-h": c(r) },
|
|
463
466
|
"--bkbx-cl": t
|
|
464
|
-
}, u =
|
|
465
|
-
return
|
|
467
|
+
}, u = T(i, a, o), d = ["box"];
|
|
468
|
+
return s && d.push("v"), {
|
|
466
469
|
boxStyle: l,
|
|
467
470
|
gridSpanStyle: u,
|
|
468
471
|
classTokens: d
|
|
@@ -470,19 +473,19 @@ function k(e) {
|
|
|
470
473
|
}
|
|
471
474
|
//#endregion
|
|
472
475
|
//#region packages/core/src/descriptors/spacer.ts
|
|
473
|
-
function
|
|
474
|
-
let { base: t, colors: n, width: r, height: i, color: a, variant: o, isVisible:
|
|
476
|
+
function j(e) {
|
|
477
|
+
let { base: t, colors: n, width: r, height: i, color: a, variant: o, isVisible: s } = e, [l, u] = g([r, i], [0, 0], {
|
|
475
478
|
base: t,
|
|
476
479
|
suppressWarnings: !0
|
|
477
480
|
}), d = {
|
|
478
|
-
...i === void 0 ? {} : { "--bksp-h":
|
|
479
|
-
...r === void 0 ? {} : { "--bksp-w":
|
|
481
|
+
...i === void 0 ? {} : { "--bksp-h": c(u) },
|
|
482
|
+
...r === void 0 ? {} : { "--bksp-w": c(l) },
|
|
480
483
|
"--bksp-b": `${t}px`,
|
|
481
484
|
"--bksp-ct": a ?? n.text,
|
|
482
485
|
"--bksp-cl": a ?? n.line,
|
|
483
486
|
"--bksp-cf": a ?? n.flat
|
|
484
487
|
}, f = ["spr"];
|
|
485
|
-
return
|
|
488
|
+
return s && f.push(o), {
|
|
486
489
|
style: d,
|
|
487
490
|
normWidth: l,
|
|
488
491
|
normHeight: u,
|
|
@@ -491,14 +494,14 @@ function A(e) {
|
|
|
491
494
|
}
|
|
492
495
|
//#endregion
|
|
493
496
|
//#region packages/core/src/descriptors/padder.ts
|
|
494
|
-
function
|
|
495
|
-
let { base: t, color: n, width: r, height: i, padding: a, enableSpacers: o, isVisible:
|
|
496
|
-
if (r !== void 0 && r !== "fit-content" && (l["--bkpd-w"] =
|
|
497
|
+
function re(e) {
|
|
498
|
+
let { base: t, color: n, width: r, height: i, padding: a, enableSpacers: o, isVisible: s } = e, l = {};
|
|
499
|
+
if (r !== void 0 && r !== "fit-content" && (l["--bkpd-w"] = c(r)), i !== void 0 && i !== "fit-content" && (l["--bkpd-h"] = c(i)), l["--bkpd-b"] = `${t}px`, l["--bkpd-c"] = n, !o) {
|
|
497
500
|
let { top: e, right: t, bottom: n, left: r } = a;
|
|
498
501
|
(e > 0 || n > 0) && (l.paddingBlock = `${e}px ${n}px`), (r > 0 || t > 0) && (l.paddingInline = `${r}px ${t}px`);
|
|
499
502
|
}
|
|
500
503
|
let u = ["pad"];
|
|
501
|
-
return
|
|
504
|
+
return s && o && u.push("v"), {
|
|
502
505
|
containerStyle: l,
|
|
503
506
|
classTokens: u
|
|
504
507
|
};
|
|
@@ -507,8 +510,8 @@ function j(e) {
|
|
|
507
510
|
//#region packages/remix/src/Config.ts
|
|
508
511
|
function M(e) {
|
|
509
512
|
return () => {
|
|
510
|
-
let t =
|
|
511
|
-
parentConfig: e.props.__baselineConfig ?? e.context.get(N) ??
|
|
513
|
+
let t = o({
|
|
514
|
+
parentConfig: e.props.__baselineConfig ?? e.context.get(N) ?? i,
|
|
512
515
|
base: e.props.base,
|
|
513
516
|
baseline: e.props.baseline,
|
|
514
517
|
guide: e.props.guide,
|
|
@@ -531,7 +534,7 @@ var N = M, P = (e) => {
|
|
|
531
534
|
};
|
|
532
535
|
//#endregion
|
|
533
536
|
//#region packages/dom/src/measure.ts
|
|
534
|
-
function
|
|
537
|
+
function F(e, t) {
|
|
535
538
|
let n = {
|
|
536
539
|
width: 0,
|
|
537
540
|
height: 0
|
|
@@ -555,7 +558,7 @@ function re(e, t) {
|
|
|
555
558
|
}
|
|
556
559
|
//#endregion
|
|
557
560
|
//#region packages/dom/src/virtual.ts
|
|
558
|
-
function
|
|
561
|
+
function I(e, t, n) {
|
|
559
562
|
let { totalItems: r, itemHeight: i, buffer: a = 0 } = t;
|
|
560
563
|
if (!Number.isFinite(i) || i <= 0) throw Error("createVirtualTracker requires itemHeight to be greater than 0");
|
|
561
564
|
if (!Number.isFinite(r) || r < 0) throw Error("createVirtualTracker requires totalItems to be 0 or greater");
|
|
@@ -582,11 +585,11 @@ function ie(e, t, n) {
|
|
|
582
585
|
};
|
|
583
586
|
}
|
|
584
587
|
//#endregion
|
|
585
|
-
//#region packages/remix/src/shared.
|
|
586
|
-
function
|
|
588
|
+
//#region packages/remix/src/shared.tsx
|
|
589
|
+
function L(...e) {
|
|
587
590
|
return e.filter(Boolean).join(" ");
|
|
588
591
|
}
|
|
589
|
-
function
|
|
592
|
+
function R(...e) {
|
|
590
593
|
let t = {};
|
|
591
594
|
for (let n of e) if (n) {
|
|
592
595
|
if (typeof n == "string") {
|
|
@@ -597,10 +600,10 @@ function I(...e) {
|
|
|
597
600
|
}
|
|
598
601
|
return t;
|
|
599
602
|
}
|
|
600
|
-
function
|
|
603
|
+
function z(e, t, n) {
|
|
601
604
|
return e.context.get(t) ?? n;
|
|
602
605
|
}
|
|
603
|
-
function
|
|
606
|
+
function B(e, t) {
|
|
604
607
|
let n = e ?? t;
|
|
605
608
|
return {
|
|
606
609
|
isShown: n === "visible",
|
|
@@ -608,46 +611,46 @@ function R(e, t) {
|
|
|
608
611
|
debugging: n
|
|
609
612
|
};
|
|
610
613
|
}
|
|
611
|
-
var
|
|
612
|
-
function
|
|
613
|
-
|
|
614
|
-
let e =
|
|
614
|
+
var V = 40, H = /* @__PURE__ */ new WeakSet(), U = [], W = !1;
|
|
615
|
+
function G() {
|
|
616
|
+
W = !1;
|
|
617
|
+
let e = U.splice(0, V);
|
|
615
618
|
for (let t of e) {
|
|
616
619
|
if (t.signal.aborted) {
|
|
617
|
-
|
|
620
|
+
H.delete(t);
|
|
618
621
|
continue;
|
|
619
622
|
}
|
|
620
623
|
try {
|
|
621
|
-
t.update().catch(() => void 0).finally(() =>
|
|
624
|
+
t.update().catch(() => void 0).finally(() => H.delete(t));
|
|
622
625
|
} catch {
|
|
623
|
-
|
|
626
|
+
H.delete(t);
|
|
624
627
|
}
|
|
625
628
|
}
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
function W() {
|
|
629
|
-
H || (H = !0, setTimeout(typeof requestAnimationFrame == "function" ? () => requestAnimationFrame(U) : () => setTimeout(U, 0), 0));
|
|
629
|
+
U.length > 0 && K();
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
631
|
+
function K() {
|
|
632
|
+
W || (W = !0, setTimeout(typeof requestAnimationFrame == "function" ? () => requestAnimationFrame(G) : () => setTimeout(G, 0), 0));
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
634
|
+
function q(e) {
|
|
635
|
+
e.signal.aborted || H.has(e) || (H.add(e), U.push(e), K());
|
|
636
|
+
}
|
|
637
|
+
function J(t, r) {
|
|
638
|
+
let a = e(t, r);
|
|
639
|
+
return ((e) => () => {
|
|
640
|
+
let t = e.context.get(N), r = e.props.__baselineConfig ?? t ?? i;
|
|
641
|
+
return /* @__PURE__ */ n(a, {
|
|
642
|
+
...e.props,
|
|
643
|
+
__baselineConfig: r
|
|
641
644
|
});
|
|
642
645
|
});
|
|
643
646
|
}
|
|
644
|
-
function
|
|
645
|
-
let
|
|
647
|
+
function Y(e) {
|
|
648
|
+
let n = null, r, i = !1, a = 0, o = (e) => {
|
|
646
649
|
e.aborted || i || a >= 10 || (a += 1, r?.refresh(), requestAnimationFrame(() => o(e)));
|
|
647
650
|
};
|
|
648
651
|
return {
|
|
649
|
-
attach:
|
|
650
|
-
|
|
652
|
+
attach: t((t, s) => {
|
|
653
|
+
n = t, typeof ResizeObserver < "u" && (r = F(t, (t) => {
|
|
651
654
|
i = t.width > 0 || t.height > 0;
|
|
652
655
|
let n = () => {
|
|
653
656
|
s.aborted || e(t);
|
|
@@ -656,13 +659,13 @@ function q(e) {
|
|
|
656
659
|
}), queueMicrotask(() => {
|
|
657
660
|
s.aborted || (r?.refresh(), requestAnimationFrame(() => o(s)));
|
|
658
661
|
})), s.addEventListener("abort", () => {
|
|
659
|
-
r?.disconnect(), r = void 0, i = !1, a = 0,
|
|
662
|
+
r?.disconnect(), r = void 0, i = !1, a = 0, n = null;
|
|
660
663
|
}, { once: !0 });
|
|
661
664
|
}),
|
|
662
|
-
getElement: () =>
|
|
665
|
+
getElement: () => n
|
|
663
666
|
};
|
|
664
667
|
}
|
|
665
|
-
function
|
|
668
|
+
function ie(e, t, n, r = 160) {
|
|
666
669
|
let i, a = "", o = 0, s = {
|
|
667
670
|
start: 0,
|
|
668
671
|
end: 0
|
|
@@ -677,7 +680,7 @@ function J(e, t, n, r = 160) {
|
|
|
677
680
|
d !== a && (c(), a = d, o = e, s = {
|
|
678
681
|
start: 0,
|
|
679
682
|
end: e
|
|
680
|
-
}, n(s), i =
|
|
683
|
+
}, n(s), i = I(u, {
|
|
681
684
|
totalItems: e,
|
|
682
685
|
itemHeight: l,
|
|
683
686
|
buffer: r
|
|
@@ -695,185 +698,181 @@ function J(e, t, n, r = 160) {
|
|
|
695
698
|
};
|
|
696
699
|
}
|
|
697
700
|
//#endregion
|
|
698
|
-
//#region packages/remix/src/Baseline.
|
|
699
|
-
function ae(
|
|
700
|
-
let
|
|
701
|
+
//#region packages/remix/src/Baseline.tsx
|
|
702
|
+
function ae(e) {
|
|
703
|
+
let t = {
|
|
701
704
|
width: 0,
|
|
702
705
|
height: 0
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
}, a =
|
|
706
|
-
(e.width !==
|
|
707
|
-
}), o =
|
|
706
|
+
}, r = () => {
|
|
707
|
+
q(e);
|
|
708
|
+
}, a = Y((e) => {
|
|
709
|
+
(e.width !== t.width || e.height !== t.height) && (t = e, r());
|
|
710
|
+
}), o = ie(e, a.getElement, r);
|
|
708
711
|
return () => {
|
|
709
|
-
let
|
|
712
|
+
let r = e.props, s = r.__baselineConfig ?? z(e, N, i), l = r.base ?? s.base, u = r.variant ?? s.baseline.variant, d = B(r.debugging, s.baseline.debugging), f = k({
|
|
710
713
|
base: l,
|
|
711
|
-
colors:
|
|
714
|
+
colors: s.baseline.colors,
|
|
712
715
|
variant: u,
|
|
713
|
-
width:
|
|
714
|
-
height:
|
|
715
|
-
color:
|
|
716
|
-
containerWidth:
|
|
717
|
-
containerHeight:
|
|
716
|
+
width: r.width,
|
|
717
|
+
height: r.height,
|
|
718
|
+
color: r.color,
|
|
719
|
+
containerWidth: t.width,
|
|
720
|
+
containerHeight: t.height,
|
|
718
721
|
spacing: {
|
|
719
|
-
padding:
|
|
720
|
-
block:
|
|
721
|
-
inline:
|
|
722
|
+
padding: r.padding,
|
|
723
|
+
block: r.block,
|
|
724
|
+
inline: r.inline
|
|
722
725
|
},
|
|
723
726
|
isVisible: d.isShown
|
|
724
727
|
});
|
|
725
|
-
if (
|
|
726
|
-
className:
|
|
728
|
+
if (r.ssrMode) return /* @__PURE__ */ n("div", {
|
|
729
|
+
className: L("bk-bas", "bk-h", "bk-ssr", r.className),
|
|
727
730
|
"data-testid": "baseline",
|
|
728
731
|
"aria-hidden": !0,
|
|
729
|
-
style:
|
|
730
|
-
width:
|
|
731
|
-
height:
|
|
732
|
-
},
|
|
732
|
+
style: R(f.containerStyle, {
|
|
733
|
+
width: c(r.width ?? "100%"),
|
|
734
|
+
height: c(r.height ?? "100%")
|
|
735
|
+
}, r.style)
|
|
733
736
|
});
|
|
734
|
-
d.isShown &&
|
|
735
|
-
let p = o.getRange(f.rowCount), m = d.isShown ? Array.from({ length: Math.max(0, p.end - p.start) }, (
|
|
736
|
-
let r = p.start +
|
|
737
|
-
return
|
|
737
|
+
d.isShown && e.queueTask(() => o.setConfig(f.rowCount, l));
|
|
738
|
+
let p = o.getRange(f.rowCount), m = d.isShown ? Array.from({ length: Math.max(0, p.end - p.start) }, (e, t) => {
|
|
739
|
+
let r = p.start + t;
|
|
740
|
+
return /* @__PURE__ */ n("div", {
|
|
738
741
|
className: "bk-row",
|
|
739
|
-
key: r,
|
|
740
742
|
"data-row-index": r,
|
|
741
743
|
style: f.getRowStyle(r)
|
|
742
|
-
});
|
|
744
|
+
}, r);
|
|
743
745
|
}) : [];
|
|
744
|
-
return
|
|
745
|
-
className:
|
|
746
|
+
return /* @__PURE__ */ n("div", {
|
|
747
|
+
className: L(...f.classTokens.map((e) => `bk-${e}`), r.className),
|
|
746
748
|
"data-testid": "baseline",
|
|
747
749
|
"aria-hidden": !0,
|
|
748
|
-
style:
|
|
749
|
-
width:
|
|
750
|
-
height:
|
|
751
|
-
},
|
|
752
|
-
mix: typeof window > "u" ||
|
|
750
|
+
style: R(f.containerStyle, {
|
|
751
|
+
width: c(r.width ?? "100%"),
|
|
752
|
+
height: c(r.height ?? "100%")
|
|
753
|
+
}, r.style),
|
|
754
|
+
mix: typeof window > "u" || r.ssrMode ? void 0 : a.attach,
|
|
753
755
|
children: m
|
|
754
756
|
});
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
|
-
var oe =
|
|
759
|
+
var oe = J(`${import.meta.url}#Baseline`, ae);
|
|
758
760
|
//#endregion
|
|
759
|
-
//#region packages/remix/src/Guide.
|
|
760
|
-
function se(
|
|
761
|
-
let
|
|
761
|
+
//#region packages/remix/src/Guide.tsx
|
|
762
|
+
function se(e) {
|
|
763
|
+
let t = {
|
|
762
764
|
width: 0,
|
|
763
765
|
height: 0
|
|
764
|
-
},
|
|
765
|
-
|
|
766
|
-
},
|
|
767
|
-
(e.width !==
|
|
766
|
+
}, a = () => {
|
|
767
|
+
q(e);
|
|
768
|
+
}, o = Y((e) => {
|
|
769
|
+
(e.width !== t.width || e.height !== t.height) && (t = e, a());
|
|
768
770
|
});
|
|
769
771
|
return () => {
|
|
770
|
-
let
|
|
771
|
-
variant:
|
|
772
|
-
base:
|
|
773
|
-
gap:
|
|
774
|
-
columns:
|
|
775
|
-
columnWidth:
|
|
776
|
-
}),
|
|
772
|
+
let a = e.props, s = a.__baselineConfig ?? z(e, N, i), c = a.variant ?? s.guide.variant, l = B(a.debugging, s.guide.debugging), u = E({
|
|
773
|
+
variant: c,
|
|
774
|
+
base: s.base,
|
|
775
|
+
gap: a.gap ?? 0,
|
|
776
|
+
columns: a.columns,
|
|
777
|
+
columnWidth: a.columnWidth
|
|
778
|
+
}), d = ne(t.width, u, {
|
|
777
779
|
viewportWidth: typeof window > "u" ? void 0 : window.innerWidth,
|
|
778
780
|
viewportHeight: typeof window > "u" ? void 0 : window.innerHeight
|
|
779
|
-
}),
|
|
780
|
-
base:
|
|
781
|
-
colors:
|
|
782
|
-
variant:
|
|
783
|
-
align:
|
|
784
|
-
width:
|
|
785
|
-
height:
|
|
786
|
-
columnWidth:
|
|
787
|
-
maxWidth:
|
|
788
|
-
color:
|
|
789
|
-
template:
|
|
790
|
-
columnsCount:
|
|
791
|
-
calculatedGap:
|
|
792
|
-
isVisible:
|
|
781
|
+
}), f = O({
|
|
782
|
+
base: s.base,
|
|
783
|
+
colors: s.guide.colors,
|
|
784
|
+
variant: c,
|
|
785
|
+
align: a.align ?? "center",
|
|
786
|
+
width: a.width,
|
|
787
|
+
height: a.height,
|
|
788
|
+
columnWidth: a.columnWidth,
|
|
789
|
+
maxWidth: a.maxWidth,
|
|
790
|
+
color: a.color,
|
|
791
|
+
template: d.template,
|
|
792
|
+
columnsCount: d.columnsCount,
|
|
793
|
+
calculatedGap: d.calculatedGap,
|
|
794
|
+
isVisible: l.isShown
|
|
793
795
|
});
|
|
794
|
-
if (
|
|
795
|
-
className:
|
|
796
|
+
if (a.ssrMode) return /* @__PURE__ */ n("div", {
|
|
797
|
+
className: L("bk-gde", "bk-h", "bk-ssr", a.className),
|
|
796
798
|
"data-testid": "guide",
|
|
797
|
-
"data-variant":
|
|
799
|
+
"data-variant": c,
|
|
798
800
|
"aria-hidden": !0,
|
|
799
|
-
style:
|
|
800
|
-
width:
|
|
801
|
-
height:
|
|
802
|
-
maxWidth:
|
|
803
|
-
},
|
|
804
|
-
children:
|
|
801
|
+
style: R({
|
|
802
|
+
width: a.width ?? "100%",
|
|
803
|
+
height: a.height ?? "100%",
|
|
804
|
+
maxWidth: a.maxWidth ?? "none"
|
|
805
|
+
}, a.style),
|
|
806
|
+
children: a.children
|
|
805
807
|
});
|
|
806
|
-
let
|
|
807
|
-
key: n,
|
|
808
|
+
let p = !f.isLineVariant && l.isShown ? Array.from({ length: f.columnsCount }, (e, t) => /* @__PURE__ */ n("div", {
|
|
808
809
|
className: "bk-col",
|
|
809
|
-
"data-column-index":
|
|
810
|
-
"data-variant":
|
|
811
|
-
})) : null,
|
|
810
|
+
"data-column-index": t,
|
|
811
|
+
"data-variant": c
|
|
812
|
+
}, t)) : null, m = l.isShown ? /* @__PURE__ */ n("div", {
|
|
812
813
|
className: "bk-cols",
|
|
813
|
-
"data-variant":
|
|
814
|
-
children:
|
|
814
|
+
"data-variant": c,
|
|
815
|
+
children: p
|
|
815
816
|
}) : null;
|
|
816
|
-
return
|
|
817
|
-
className:
|
|
817
|
+
return /* @__PURE__ */ r("div", {
|
|
818
|
+
className: L(...f.classTokens.map((e) => `bk-${e}`), a.className),
|
|
818
819
|
"data-testid": "guide",
|
|
819
|
-
"data-variant":
|
|
820
|
+
"data-variant": c,
|
|
820
821
|
"aria-hidden": !0,
|
|
821
|
-
style:
|
|
822
|
-
mix: typeof window > "u" ||
|
|
823
|
-
children: [
|
|
822
|
+
style: R(f.containerStyle, a.style),
|
|
823
|
+
mix: typeof window > "u" || a.ssrMode ? void 0 : o.attach,
|
|
824
|
+
children: [m, a.children]
|
|
824
825
|
});
|
|
825
826
|
};
|
|
826
827
|
}
|
|
827
|
-
var ce =
|
|
828
|
+
var ce = J(`${import.meta.url}#Guide`, se);
|
|
828
829
|
//#endregion
|
|
829
|
-
//#region packages/remix/src/Spacer.
|
|
830
|
-
function le(
|
|
830
|
+
//#region packages/remix/src/Spacer.tsx
|
|
831
|
+
function le(e) {
|
|
831
832
|
return () => {
|
|
832
|
-
let
|
|
833
|
-
base:
|
|
834
|
-
colors:
|
|
835
|
-
width:
|
|
836
|
-
height:
|
|
837
|
-
color:
|
|
838
|
-
variant:
|
|
839
|
-
isVisible:
|
|
840
|
-
}),
|
|
841
|
-
key: "height",
|
|
833
|
+
let t = e.props, a = t.__baselineConfig ?? z(e, N, i), o = t.base ?? a.base, s = t.variant ?? a.spacer.variant, c = B(t.debugging, a.spacer.debugging), l = j({
|
|
834
|
+
base: o,
|
|
835
|
+
colors: a.spacer.colors,
|
|
836
|
+
width: t.width,
|
|
837
|
+
height: t.height,
|
|
838
|
+
color: t.color,
|
|
839
|
+
variant: s,
|
|
840
|
+
isVisible: c.isShown
|
|
841
|
+
}), u = c.isShown && t.indicatorNode ? [l.normHeight === 0 ? null : /* @__PURE__ */ n("span", {
|
|
842
842
|
className: "bk-indicator",
|
|
843
843
|
"aria-hidden": !0,
|
|
844
|
-
children:
|
|
845
|
-
}),
|
|
846
|
-
key: "width",
|
|
844
|
+
children: t.indicatorNode(l.normHeight, "height")
|
|
845
|
+
}, "height"), l.normWidth === 0 ? null : /* @__PURE__ */ n("span", {
|
|
847
846
|
className: "bk-indicator",
|
|
848
847
|
"aria-hidden": !0,
|
|
849
|
-
children:
|
|
850
|
-
})] : null;
|
|
851
|
-
return
|
|
852
|
-
className:
|
|
848
|
+
children: t.indicatorNode(l.normWidth, "width")
|
|
849
|
+
}, "width")] : null;
|
|
850
|
+
return /* @__PURE__ */ r("div", {
|
|
851
|
+
className: L(...l.classTokens.map((e) => `bk-${e}`), t.className),
|
|
853
852
|
"data-testid": "spacer",
|
|
854
|
-
"data-variant":
|
|
855
|
-
"data-height": `${
|
|
856
|
-
style:
|
|
857
|
-
children: [
|
|
853
|
+
"data-variant": s,
|
|
854
|
+
"data-height": `${l.normHeight}px`,
|
|
855
|
+
style: R(l.style, t.style),
|
|
856
|
+
children: [u, t.children]
|
|
858
857
|
});
|
|
859
858
|
};
|
|
860
859
|
}
|
|
861
|
-
var
|
|
860
|
+
var X = J(`${import.meta.url}#Spacer`, le), ue = X, Z = { gridColumn: "1 / -1" }, Q = { gridRow: "2 / 3" }, de = {
|
|
862
861
|
gridRow: "2 / 3",
|
|
863
862
|
gridColumn: "2 / 3"
|
|
864
863
|
};
|
|
865
|
-
function
|
|
866
|
-
let
|
|
867
|
-
|
|
864
|
+
function fe(e) {
|
|
865
|
+
let t = i.base, r = _({}), a = null, o = Y(({ height: n }) => {
|
|
866
|
+
e.props.ssrMode || a || n === 0 || (a = x(n, t, r, "height"), q(e));
|
|
868
867
|
});
|
|
869
868
|
return () => {
|
|
870
|
-
let s =
|
|
871
|
-
|
|
869
|
+
let s = e.props, c = s.__baselineConfig ?? z(e, N, i), l = B(s.debugging, c.padder.debugging);
|
|
870
|
+
t = c.base, r = _({
|
|
872
871
|
padding: s.padding,
|
|
873
872
|
block: s.block,
|
|
874
873
|
inline: s.inline
|
|
875
874
|
});
|
|
876
|
-
let u = s.ssrMode ?
|
|
875
|
+
let u = s.ssrMode ? r : a ?? r, d = typeof window > "u" || s.ssrMode ? void 0 : o.attach, f = re({
|
|
877
876
|
base: c.base,
|
|
878
877
|
color: c.padder.color,
|
|
879
878
|
width: s.width,
|
|
@@ -882,108 +881,104 @@ function Q(t) {
|
|
|
882
881
|
enableSpacers: !l.isNone,
|
|
883
882
|
isVisible: l.isShown
|
|
884
883
|
});
|
|
885
|
-
if (l.isNone) return
|
|
886
|
-
className:
|
|
884
|
+
if (l.isNone) return /* @__PURE__ */ n("div", {
|
|
885
|
+
className: L(...f.classTokens.map((e) => `bk-${e}`), s.className),
|
|
887
886
|
"data-testid": "padder",
|
|
888
887
|
mix: d,
|
|
889
|
-
style:
|
|
888
|
+
style: R(f.containerStyle, s.style),
|
|
890
889
|
children: s.children
|
|
891
890
|
});
|
|
892
|
-
let p = c.spacer.variant, m = (
|
|
891
|
+
let p = c.spacer.variant, m = (e, t) => /* @__PURE__ */ n(ue, {
|
|
893
892
|
__baselineConfig: c,
|
|
894
|
-
width:
|
|
895
|
-
height:
|
|
893
|
+
width: e === "100%" ? void 0 : e,
|
|
894
|
+
height: t === "100%" ? void 0 : t,
|
|
896
895
|
variant: p,
|
|
897
896
|
debugging: l.debugging,
|
|
898
897
|
indicatorNode: s.indicatorNode
|
|
899
898
|
}), h = [
|
|
900
|
-
u.top >= 0 ?
|
|
901
|
-
key: "top",
|
|
902
|
-
style: X,
|
|
903
|
-
children: m("100%", u.top)
|
|
904
|
-
}) : null,
|
|
905
|
-
u.left >= 0 ? e("div", {
|
|
906
|
-
key: "left",
|
|
899
|
+
u.top >= 0 ? /* @__PURE__ */ n("div", {
|
|
907
900
|
style: Z,
|
|
901
|
+
children: m("100%", u.top)
|
|
902
|
+
}, "top") : null,
|
|
903
|
+
u.left >= 0 ? /* @__PURE__ */ n("div", {
|
|
904
|
+
style: Q,
|
|
908
905
|
children: m(u.left, "100%")
|
|
909
|
-
}) : null,
|
|
910
|
-
|
|
911
|
-
key: "content",
|
|
906
|
+
}, "left") : null,
|
|
907
|
+
/* @__PURE__ */ n("div", {
|
|
912
908
|
className: "bk-pad-content",
|
|
913
909
|
"data-testid": "padder-content",
|
|
914
|
-
style:
|
|
910
|
+
style: de,
|
|
915
911
|
children: s.children
|
|
916
|
-
}),
|
|
917
|
-
u.right >= 0 ?
|
|
918
|
-
|
|
919
|
-
style: Z,
|
|
912
|
+
}, "content"),
|
|
913
|
+
u.right >= 0 ? /* @__PURE__ */ n("div", {
|
|
914
|
+
style: Q,
|
|
920
915
|
children: m(u.right, "100%")
|
|
921
|
-
}) : null,
|
|
922
|
-
u.bottom >= 0 ?
|
|
923
|
-
|
|
924
|
-
style: X,
|
|
916
|
+
}, "right") : null,
|
|
917
|
+
u.bottom >= 0 ? /* @__PURE__ */ n("div", {
|
|
918
|
+
style: Z,
|
|
925
919
|
children: m("100%", u.bottom)
|
|
926
|
-
}) : null
|
|
920
|
+
}, "bottom") : null
|
|
927
921
|
];
|
|
928
|
-
return
|
|
929
|
-
className:
|
|
922
|
+
return /* @__PURE__ */ n("div", {
|
|
923
|
+
className: L(...f.classTokens.map((e) => `bk-${e}`), s.className),
|
|
930
924
|
"data-testid": "padder",
|
|
931
925
|
mix: d,
|
|
932
|
-
style:
|
|
926
|
+
style: R(f.containerStyle, s.style),
|
|
933
927
|
children: h
|
|
934
928
|
});
|
|
935
929
|
};
|
|
936
930
|
}
|
|
937
|
-
var $ =
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
931
|
+
var $ = J(`${import.meta.url}#Padder`, fe), pe = N;
|
|
932
|
+
function me(e) {
|
|
933
|
+
let t = i.base, r = "clamp", a = "bottom", o = _({}), s = null, c = () => {
|
|
934
|
+
q(e);
|
|
935
|
+
}, l = Y((e) => {
|
|
936
|
+
r === "none" || s || e.height === 0 || (s = x(e.height, t, o, {
|
|
937
|
+
mode: r,
|
|
938
|
+
snapEdge: a
|
|
939
|
+
}), c());
|
|
945
940
|
});
|
|
946
941
|
return () => {
|
|
947
|
-
let
|
|
948
|
-
padding:
|
|
949
|
-
block:
|
|
950
|
-
inline:
|
|
942
|
+
let c = e.props, u = c.__baselineConfig ?? z(e, N, i), d = c.snapping ?? "clamp", f = c.snapEdge ?? "bottom", p = B(c.debugging, u.box.debugging), m = _({
|
|
943
|
+
padding: c.padding,
|
|
944
|
+
block: c.block,
|
|
945
|
+
inline: c.inline
|
|
951
946
|
});
|
|
952
|
-
|
|
953
|
-
let
|
|
954
|
-
base:
|
|
955
|
-
lineColor:
|
|
956
|
-
width:
|
|
957
|
-
height:
|
|
958
|
-
span:
|
|
959
|
-
colSpan:
|
|
960
|
-
rowSpan:
|
|
961
|
-
isVisible:
|
|
962
|
-
}),
|
|
963
|
-
block: [
|
|
964
|
-
inline: [
|
|
947
|
+
t = u.base, r = d, a = f, o = m;
|
|
948
|
+
let h = d === "none" ? m : s ?? m, g = A({
|
|
949
|
+
base: u.base,
|
|
950
|
+
lineColor: u.box.colors.line,
|
|
951
|
+
width: c.width,
|
|
952
|
+
height: c.height,
|
|
953
|
+
span: c.span,
|
|
954
|
+
colSpan: c.colSpan,
|
|
955
|
+
rowSpan: c.rowSpan,
|
|
956
|
+
isVisible: p.isShown
|
|
957
|
+
}), v = /* @__PURE__ */ n($, {
|
|
958
|
+
block: [h.top, h.bottom],
|
|
959
|
+
inline: [h.left, h.right],
|
|
965
960
|
width: "fit-content",
|
|
966
|
-
height:
|
|
967
|
-
debugging:
|
|
961
|
+
height: c.height,
|
|
962
|
+
debugging: p.debugging,
|
|
968
963
|
ssrMode: !0,
|
|
969
|
-
children:
|
|
964
|
+
children: c.children
|
|
970
965
|
});
|
|
971
|
-
return
|
|
972
|
-
className:
|
|
966
|
+
return /* @__PURE__ */ n("div", {
|
|
967
|
+
className: L(...g.classTokens.map((e) => `bk-${e}`), c.className),
|
|
973
968
|
"data-testid": "box",
|
|
974
|
-
style:
|
|
975
|
-
mix: typeof window > "u" ||
|
|
976
|
-
children:
|
|
977
|
-
__baselineConfig:
|
|
969
|
+
style: R(g.boxStyle, g.gridSpanStyle, c.style),
|
|
970
|
+
mix: typeof window > "u" || c.ssrMode || d === "none" ? void 0 : l.attach,
|
|
971
|
+
children: /* @__PURE__ */ n(pe, {
|
|
972
|
+
__baselineConfig: u,
|
|
978
973
|
base: 1,
|
|
979
974
|
spacer: { variant: "flat" },
|
|
980
|
-
children:
|
|
975
|
+
children: v
|
|
981
976
|
})
|
|
982
977
|
});
|
|
983
978
|
};
|
|
984
979
|
}
|
|
985
|
-
var
|
|
980
|
+
var he = J(`${import.meta.url}#Box`, me);
|
|
986
981
|
//#endregion
|
|
987
|
-
export { oe as Baseline,
|
|
982
|
+
export { oe as Baseline, he as Box, N as Config, ce as Guide, $ as Padder, X as Spacer };
|
|
988
983
|
|
|
989
984
|
//# sourceMappingURL=remix.mjs.map
|