baseline-kit 5.1.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +36 -6
- package/dist/baseline-kit.css +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +34 -3
- package/dist/core.mjs +2 -2
- package/dist/guide.cjs +1 -1
- package/dist/guide.cjs.map +1 -1
- package/dist/guide.css +1 -1
- package/dist/guide.d.ts +13 -2
- package/dist/guide.mjs +167 -113
- package/dist/guide.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +28 -15
- package/dist/index.mjs +478 -342
- package/dist/index.mjs.map +1 -1
- package/dist/remix.css +1 -1
- package/dist/remix.d.ts +33 -6
- package/dist/remix.mjs +496 -338
- package/dist/remix.mjs.map +1 -1
- package/dist/src-BczC1VWy.cjs +2 -0
- package/dist/src-BczC1VWy.cjs.map +1 -0
- package/dist/{src-C3TICsw6.js → src-CPIpvN4R.js} +64 -25
- package/dist/src-CPIpvN4R.js.map +1 -0
- package/dist/styles.css +1 -1
- 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/index.mjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { E as e, M as t, _ as n, a as r, c as i, g as a, h as o, i as s, j as c, l, n as u, o as d, r as f, s as p, t as m, u as h, v as g } from "./src-CPIpvN4R.js";
|
|
2
|
+
import * as _ from "react";
|
|
3
|
+
import { useCallback as v, useEffect as y, useLayoutEffect as b, useMemo as x, useState as S } from "react";
|
|
4
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
5
5
|
//#region packages/react/src/components/Config/Config.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
parentConfig:
|
|
12
|
-
base:
|
|
6
|
+
var E = "__baseline_kit_config_context__", D = globalThis, O = D[E] ?? (D[E] = _.createContext(t));
|
|
7
|
+
O.displayName = "ConfigContext";
|
|
8
|
+
var k = () => _.use(O);
|
|
9
|
+
function A({ children: e, base: t, domDiagnostics: n, baseline: r, guide: i, spacer: a, box: o, padder: s }) {
|
|
10
|
+
let l = k(), u = _.useMemo(() => c({
|
|
11
|
+
parentConfig: l,
|
|
12
|
+
base: t,
|
|
13
|
+
domDiagnostics: n,
|
|
13
14
|
baseline: r,
|
|
14
15
|
guide: i,
|
|
15
16
|
spacer: a,
|
|
16
17
|
box: o,
|
|
17
18
|
padder: s
|
|
18
19
|
}), [
|
|
19
|
-
|
|
20
|
+
l,
|
|
21
|
+
t,
|
|
20
22
|
n,
|
|
21
23
|
r,
|
|
22
24
|
i,
|
|
@@ -24,14 +26,14 @@ function E({ children: t, base: n, baseline: r, guide: i, spacer: a, box: o, pad
|
|
|
24
26
|
o,
|
|
25
27
|
s
|
|
26
28
|
]);
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
value:
|
|
29
|
-
children:
|
|
29
|
+
return /* @__PURE__ */ w(O, {
|
|
30
|
+
value: u,
|
|
31
|
+
children: e
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
34
|
//#endregion
|
|
33
35
|
//#region packages/dom/src/timing.ts
|
|
34
|
-
var
|
|
36
|
+
var j = (e) => {
|
|
35
37
|
let t = null, n = null;
|
|
36
38
|
return [(...r) => {
|
|
37
39
|
n = r, t !== null && cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
@@ -43,7 +45,7 @@ var D = (e) => {
|
|
|
43
45
|
};
|
|
44
46
|
//#endregion
|
|
45
47
|
//#region packages/dom/src/measure.ts
|
|
46
|
-
function
|
|
48
|
+
function M(e, t) {
|
|
47
49
|
let n = {
|
|
48
50
|
width: 0,
|
|
49
51
|
height: 0
|
|
@@ -55,7 +57,7 @@ function O(e, t) {
|
|
|
55
57
|
};
|
|
56
58
|
(i.width !== n.width || i.height !== n.height) && (n = i, t(i));
|
|
57
59
|
} catch {}
|
|
58
|
-
}, [i, a] =
|
|
60
|
+
}, [i, a] = j(r);
|
|
59
61
|
r();
|
|
60
62
|
let o = new ResizeObserver(i);
|
|
61
63
|
return o.observe(e), {
|
|
@@ -67,22 +69,22 @@ function O(e, t) {
|
|
|
67
69
|
}
|
|
68
70
|
//#endregion
|
|
69
71
|
//#region packages/react/src/hooks/useMeasure.ts
|
|
70
|
-
var
|
|
72
|
+
var N = {
|
|
71
73
|
width: 0,
|
|
72
74
|
height: 0
|
|
73
75
|
};
|
|
74
|
-
function
|
|
75
|
-
let [t, n] =
|
|
76
|
-
|
|
76
|
+
function P(e) {
|
|
77
|
+
let [t, n] = _.useState(N), r = _.useRef(null);
|
|
78
|
+
_.useLayoutEffect(() => {
|
|
77
79
|
if (typeof window > "u" || !e.current) return;
|
|
78
|
-
let t =
|
|
80
|
+
let t = M(e.current, (e) => {
|
|
79
81
|
n((t) => t.width === e.width && t.height === e.height ? t : e);
|
|
80
82
|
});
|
|
81
83
|
return r.current = t, () => {
|
|
82
84
|
t.disconnect(), r.current = null;
|
|
83
85
|
};
|
|
84
86
|
}, [e]);
|
|
85
|
-
let i =
|
|
87
|
+
let i = _.useCallback(() => {
|
|
86
88
|
r.current?.refresh();
|
|
87
89
|
}, []);
|
|
88
90
|
return {
|
|
@@ -92,7 +94,7 @@ function A(e) {
|
|
|
92
94
|
}
|
|
93
95
|
//#endregion
|
|
94
96
|
//#region packages/dom/src/virtual.ts
|
|
95
|
-
function
|
|
97
|
+
function F(e, t, n) {
|
|
96
98
|
let { totalItems: r, itemHeight: i, buffer: a = 0 } = t;
|
|
97
99
|
if (!Number.isFinite(i) || i <= 0) throw Error("createVirtualTracker requires itemHeight to be greater than 0");
|
|
98
100
|
if (!Number.isFinite(r) || r < 0) throw Error("createVirtualTracker requires totalItems to be 0 or greater");
|
|
@@ -105,7 +107,7 @@ function j(e, t, n) {
|
|
|
105
107
|
}, s = {
|
|
106
108
|
start: 0,
|
|
107
109
|
end: r
|
|
108
|
-
}, [c, l] =
|
|
110
|
+
}, [c, l] = j(() => {
|
|
109
111
|
let e = o();
|
|
110
112
|
(e.start !== s.start || e.end !== s.end) && (s = e, n(e));
|
|
111
113
|
}), u = { passive: !0 };
|
|
@@ -120,20 +122,20 @@ function j(e, t, n) {
|
|
|
120
122
|
}
|
|
121
123
|
//#endregion
|
|
122
124
|
//#region packages/react/src/hooks/useVirtual.ts
|
|
123
|
-
function
|
|
124
|
-
let i = typeof r == "number" ? r : parseInt(r, 10) || 0, [a, o] =
|
|
125
|
+
function I({ totalLines: e, lineHeight: t, containerRef: n, buffer: r = 0 }) {
|
|
126
|
+
let i = typeof r == "number" ? r : parseInt(r, 10) || 0, [a, o] = S({
|
|
125
127
|
start: 0,
|
|
126
128
|
end: e
|
|
127
|
-
}), s =
|
|
129
|
+
}), s = v((e) => {
|
|
128
130
|
o((t) => t.start === e.start && t.end === e.end ? t : e);
|
|
129
131
|
}, []);
|
|
130
|
-
return
|
|
132
|
+
return b(() => {
|
|
131
133
|
if (!n.current) return;
|
|
132
134
|
o((t) => t.start === 0 && t.end === e ? t : {
|
|
133
135
|
start: 0,
|
|
134
136
|
end: e
|
|
135
137
|
});
|
|
136
|
-
let r =
|
|
138
|
+
let r = F(n.current, {
|
|
137
139
|
totalItems: e,
|
|
138
140
|
itemHeight: t,
|
|
139
141
|
buffer: i
|
|
@@ -149,42 +151,46 @@ function M({ totalLines: e, lineHeight: t, containerRef: n, buffer: r = 0 }) {
|
|
|
149
151
|
}
|
|
150
152
|
//#endregion
|
|
151
153
|
//#region packages/react/src/hooks/useBaseline.ts
|
|
152
|
-
function
|
|
154
|
+
function L(e, { base: t = 8, snapping: r = "none", snapEdge: i = "bottom", spacing: a = {} } = {}) {
|
|
153
155
|
if (t < 1) throw Error("Base must be >= 1 for baseline alignment.");
|
|
154
|
-
let { height:
|
|
155
|
-
return
|
|
156
|
-
let e =
|
|
157
|
-
if (
|
|
156
|
+
let { height: o } = P(e), s = _.useRef(null);
|
|
157
|
+
return _.useMemo(() => {
|
|
158
|
+
let e = g({ padding: a }), c = o % t === 0;
|
|
159
|
+
if (r === "none") return {
|
|
158
160
|
padding: e,
|
|
159
161
|
isAligned: c,
|
|
160
|
-
height:
|
|
162
|
+
height: o
|
|
161
163
|
};
|
|
162
164
|
if (s.current) return {
|
|
163
165
|
padding: s.current,
|
|
164
166
|
isAligned: c,
|
|
165
|
-
height:
|
|
167
|
+
height: o
|
|
166
168
|
};
|
|
167
|
-
if (
|
|
169
|
+
if (o === 0) return {
|
|
168
170
|
padding: e,
|
|
169
171
|
isAligned: c,
|
|
170
|
-
height:
|
|
172
|
+
height: o
|
|
171
173
|
};
|
|
172
|
-
let l = o
|
|
174
|
+
let l = n(o, t, e, {
|
|
175
|
+
mode: r,
|
|
176
|
+
snapEdge: i
|
|
177
|
+
});
|
|
173
178
|
return s.current = l, {
|
|
174
179
|
padding: l,
|
|
175
180
|
isAligned: c,
|
|
176
|
-
height:
|
|
181
|
+
height: o
|
|
177
182
|
};
|
|
178
183
|
}, [
|
|
179
184
|
t,
|
|
180
|
-
|
|
185
|
+
r,
|
|
181
186
|
i,
|
|
182
|
-
a
|
|
187
|
+
a,
|
|
188
|
+
o
|
|
183
189
|
]);
|
|
184
190
|
}
|
|
185
191
|
//#endregion
|
|
186
192
|
//#region packages/dom/src/viewport.ts
|
|
187
|
-
function
|
|
193
|
+
function ee() {
|
|
188
194
|
return typeof window > "u" ? {} : {
|
|
189
195
|
viewportWidth: window.innerWidth,
|
|
190
196
|
viewportHeight: window.innerHeight
|
|
@@ -192,312 +198,402 @@ function P() {
|
|
|
192
198
|
}
|
|
193
199
|
//#endregion
|
|
194
200
|
//#region packages/react/src/hooks/useGuide.ts
|
|
195
|
-
function
|
|
196
|
-
let { width: n } =
|
|
197
|
-
return
|
|
201
|
+
function te(e, t) {
|
|
202
|
+
let { width: n } = P(e);
|
|
203
|
+
return _.useMemo(() => h(n, t, ee()), [t, n]);
|
|
198
204
|
}
|
|
199
205
|
//#endregion
|
|
200
206
|
//#region packages/react/src/hooks/useConfig.ts
|
|
201
|
-
function
|
|
202
|
-
let t =
|
|
203
|
-
return
|
|
207
|
+
function R(e) {
|
|
208
|
+
let t = k();
|
|
209
|
+
return x(() => Object.assign({
|
|
210
|
+
base: t.base,
|
|
211
|
+
domDiagnostics: t.domDiagnostics
|
|
212
|
+
}, t[e]), [t, e]);
|
|
204
213
|
}
|
|
205
214
|
//#endregion
|
|
206
215
|
//#region packages/react/src/hooks/useDebug.ts
|
|
207
|
-
function
|
|
208
|
-
return
|
|
216
|
+
function z(e, t) {
|
|
217
|
+
return x(() => a(e, t), [e, t]);
|
|
209
218
|
}
|
|
210
219
|
//#endregion
|
|
211
220
|
//#region packages/react/src/hooks/useIsClient.ts
|
|
212
|
-
function
|
|
213
|
-
let [e, t] =
|
|
214
|
-
return
|
|
221
|
+
function B() {
|
|
222
|
+
let [e, t] = S(!1);
|
|
223
|
+
return y(() => {
|
|
215
224
|
t(!0);
|
|
216
225
|
}, []), e;
|
|
217
226
|
}
|
|
218
227
|
//#endregion
|
|
219
228
|
//#region packages/react/src/utils/ssr.tsx
|
|
220
|
-
function
|
|
221
|
-
return
|
|
229
|
+
function ne({ children: e, fallback: t = null }) {
|
|
230
|
+
return B() ? /* @__PURE__ */ w(C, { children: e }) : /* @__PURE__ */ w(C, { children: t });
|
|
222
231
|
}
|
|
223
232
|
//#endregion
|
|
224
233
|
//#region packages/react/src/utils/merge.ts
|
|
225
|
-
function
|
|
234
|
+
function V(...e) {
|
|
226
235
|
return Object.assign({}, ...e.filter(Boolean));
|
|
227
236
|
}
|
|
228
|
-
function
|
|
237
|
+
function H(...e) {
|
|
229
238
|
return (t) => {
|
|
230
239
|
e.forEach((e) => {
|
|
231
240
|
e && (typeof e == "function" ? e(t) : Object.assign(e, { current: t }));
|
|
232
241
|
});
|
|
233
242
|
};
|
|
234
243
|
}
|
|
235
|
-
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region packages/react/src/utils/dom.ts
|
|
246
|
+
function U(e, t) {
|
|
247
|
+
return Object.fromEntries(Object.entries(e).filter(([e, n]) => t[e] !== n));
|
|
248
|
+
}
|
|
249
|
+
var re = /* @__PURE__ */ new Set([
|
|
250
|
+
"id",
|
|
251
|
+
"title",
|
|
252
|
+
"role",
|
|
253
|
+
"tabIndex",
|
|
254
|
+
"lang",
|
|
255
|
+
"dir",
|
|
256
|
+
"hidden"
|
|
257
|
+
]);
|
|
258
|
+
function W(e) {
|
|
259
|
+
return Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || re.has(e)));
|
|
260
|
+
}
|
|
261
|
+
var G = {
|
|
236
262
|
bas: "bas_4Emvv",
|
|
263
|
+
line: "line_jXAw3",
|
|
264
|
+
flat: "flat_DwUeJ",
|
|
265
|
+
compact: "compact_CjR0G",
|
|
237
266
|
v: "v_lNfeX",
|
|
238
267
|
h: "h_PbNDU",
|
|
239
268
|
row: "row_J1Wva",
|
|
240
269
|
ssr: "ssr_PQAP-"
|
|
241
|
-
},
|
|
242
|
-
let
|
|
243
|
-
base:
|
|
244
|
-
colors:
|
|
245
|
-
variant:
|
|
246
|
-
width:
|
|
247
|
-
height:
|
|
248
|
-
color:
|
|
249
|
-
containerWidth:
|
|
250
|
-
containerHeight:
|
|
251
|
-
spacing:
|
|
252
|
-
isVisible:
|
|
270
|
+
}, ie = _.memo(function({ className: e, debugging: n, style: i, variant: a, height: s, width: c, base: l, color: u, ...f }) {
|
|
271
|
+
let p = R("baseline"), m = a ?? p.variant, { isShown: h } = z(n, p.debugging), g = _.useRef(null), { width: v, height: y } = P(g), b = l || p.base, x = _.useMemo(() => d({
|
|
272
|
+
base: b,
|
|
273
|
+
colors: p.colors,
|
|
274
|
+
variant: m,
|
|
275
|
+
width: c,
|
|
276
|
+
height: s,
|
|
277
|
+
color: u,
|
|
278
|
+
containerWidth: v,
|
|
279
|
+
containerHeight: y,
|
|
280
|
+
spacing: f,
|
|
281
|
+
isVisible: h
|
|
253
282
|
}), [
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
283
|
+
b,
|
|
284
|
+
p.colors,
|
|
285
|
+
m,
|
|
286
|
+
c,
|
|
258
287
|
s,
|
|
259
|
-
o,
|
|
260
|
-
l,
|
|
261
|
-
h,
|
|
262
|
-
g,
|
|
263
288
|
u,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
289
|
+
v,
|
|
290
|
+
y,
|
|
291
|
+
f,
|
|
292
|
+
h
|
|
293
|
+
]), S = r({
|
|
294
|
+
base: b,
|
|
295
|
+
contentHeight: x.contentHeight,
|
|
296
|
+
domDiagnostics: p.domDiagnostics,
|
|
297
|
+
className: e,
|
|
298
|
+
style: i
|
|
299
|
+
}), { start: C, end: T } = I({
|
|
300
|
+
totalLines: x.rowCount,
|
|
301
|
+
lineHeight: b,
|
|
302
|
+
containerRef: g,
|
|
269
303
|
buffer: 160
|
|
270
|
-
}),
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
304
|
+
}), E = _.useMemo(() => V(U({
|
|
305
|
+
...x.containerStyle,
|
|
306
|
+
...S ? { "--bkbl-b": `${b}px` } : {}
|
|
307
|
+
}, {
|
|
308
|
+
"--bkbl-w": "100%",
|
|
309
|
+
"--bkbl-h": "100%",
|
|
310
|
+
"--bkbl-b": "8px",
|
|
311
|
+
"--bkbl-cl": t.baseline.colors.line,
|
|
312
|
+
"--bkbl-cf": t.baseline.colors.flat,
|
|
313
|
+
"--bkbl-c": m === "line" ? "var(--bkbl-cl)" : "var(--bkbl-cf)"
|
|
314
|
+
}), i), [
|
|
315
|
+
x.containerStyle,
|
|
316
|
+
i,
|
|
317
|
+
m,
|
|
318
|
+
b,
|
|
319
|
+
S
|
|
320
|
+
]);
|
|
321
|
+
return /* @__PURE__ */ w("div", {
|
|
322
|
+
ref: g,
|
|
323
|
+
"data-testid": p.domDiagnostics ? "baseline" : void 0,
|
|
274
324
|
"aria-hidden": "true",
|
|
275
|
-
className:
|
|
276
|
-
style:
|
|
277
|
-
...
|
|
278
|
-
children:
|
|
279
|
-
let n = t +
|
|
280
|
-
return /* @__PURE__ */
|
|
281
|
-
className:
|
|
282
|
-
"data-row-index": n,
|
|
283
|
-
style:
|
|
325
|
+
className: o(...x.classTokens.map((e) => G[e]), G[m], S && G.compact, e),
|
|
326
|
+
style: E,
|
|
327
|
+
...W(f),
|
|
328
|
+
children: h && !S && Array.from({ length: T - C }, (e, t) => {
|
|
329
|
+
let n = t + C;
|
|
330
|
+
return /* @__PURE__ */ w("div", {
|
|
331
|
+
className: G.row,
|
|
332
|
+
"data-row-index": p.domDiagnostics ? n : void 0,
|
|
333
|
+
style: x.getRowStyle(n)
|
|
284
334
|
}, n);
|
|
285
335
|
})
|
|
286
336
|
});
|
|
287
|
-
}),
|
|
288
|
-
let
|
|
289
|
-
if (!
|
|
290
|
-
className:
|
|
337
|
+
}), ae = _.memo(function({ className: t, debugging: n, style: r, variant: i, height: a, width: s, base: c, color: l, ssrMode: u = !1, ...d }) {
|
|
338
|
+
let f = R("baseline"), p = i ?? f.variant, m = c ?? f.base, { isShown: h } = z(n, f.debugging);
|
|
339
|
+
if (!h) return /* @__PURE__ */ w("div", {
|
|
340
|
+
className: o(G.bas, G.h, G[p], t),
|
|
291
341
|
style: r,
|
|
292
|
-
"data-testid": "baseline",
|
|
342
|
+
"data-testid": f.domDiagnostics ? "baseline" : void 0,
|
|
293
343
|
"aria-hidden": "true",
|
|
294
|
-
...
|
|
344
|
+
...W(d)
|
|
295
345
|
});
|
|
296
|
-
let
|
|
297
|
-
className:
|
|
298
|
-
style: {
|
|
299
|
-
width:
|
|
300
|
-
height: a ?? "100%"
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
346
|
+
let g = /* @__PURE__ */ w("div", {
|
|
347
|
+
className: o(G.bas, G.h, G.ssr, G[p], t),
|
|
348
|
+
style: V(U({
|
|
349
|
+
width: e(s ?? "100%"),
|
|
350
|
+
height: e(a ?? "100%")
|
|
351
|
+
}, {
|
|
352
|
+
width: "100%",
|
|
353
|
+
height: "100%"
|
|
354
|
+
}), r),
|
|
355
|
+
"data-testid": f.domDiagnostics ? "baseline" : void 0,
|
|
356
|
+
"aria-hidden": "true",
|
|
357
|
+
...W(d)
|
|
305
358
|
});
|
|
306
|
-
return
|
|
307
|
-
fallback:
|
|
308
|
-
children: /* @__PURE__ */
|
|
309
|
-
className:
|
|
310
|
-
debugging:
|
|
359
|
+
return u ? g : /* @__PURE__ */ w(ne, {
|
|
360
|
+
fallback: g,
|
|
361
|
+
children: /* @__PURE__ */ w(ie, {
|
|
362
|
+
className: t,
|
|
363
|
+
debugging: n,
|
|
311
364
|
style: r,
|
|
312
|
-
variant:
|
|
365
|
+
variant: p,
|
|
313
366
|
height: a,
|
|
314
|
-
width:
|
|
315
|
-
base:
|
|
316
|
-
color:
|
|
317
|
-
...
|
|
367
|
+
width: s,
|
|
368
|
+
base: m,
|
|
369
|
+
color: l,
|
|
370
|
+
...d
|
|
318
371
|
})
|
|
319
372
|
});
|
|
320
|
-
}),
|
|
373
|
+
}), K = {
|
|
321
374
|
gde: "gde_4PKz3",
|
|
322
375
|
v: "v_yAvN0",
|
|
323
376
|
h: "h_XcWcy",
|
|
324
377
|
line: "line_UaLjW",
|
|
325
378
|
cols: "cols_ibtT4",
|
|
326
379
|
col: "col_QPSDI",
|
|
380
|
+
pattern: "pattern_8ihi5",
|
|
381
|
+
auto: "auto_xzTBc",
|
|
382
|
+
fixed: "fixed_g2rOO",
|
|
383
|
+
compactFixed: "compactFixed_C3AMS",
|
|
327
384
|
ssr: "ssr_4UN4k"
|
|
328
|
-
},
|
|
329
|
-
let
|
|
330
|
-
if (!
|
|
331
|
-
className:
|
|
385
|
+
}, oe = _.memo(function({ className: t, debugging: n, style: r, variant: i, align: a = "center", gap: s, height: c, width: l, columns: u, columnWidth: d, maxWidth: f, color: p, children: m, ssrMode: h = !1, ...g }) {
|
|
386
|
+
let _ = R("guide"), v = i ?? _.variant, y = typeof s == "number" ? s : 0, { isShown: b } = z(n, _.debugging);
|
|
387
|
+
if (!b) return /* @__PURE__ */ w("div", {
|
|
388
|
+
className: o(K.gde, K.h, K[v], t),
|
|
332
389
|
style: r,
|
|
333
|
-
"data-testid": "guide",
|
|
334
|
-
"data-variant": _,
|
|
390
|
+
"data-testid": _.domDiagnostics ? "guide" : void 0,
|
|
391
|
+
"data-variant": _.domDiagnostics ? v : void 0,
|
|
335
392
|
"aria-hidden": "true",
|
|
336
|
-
...
|
|
337
|
-
children:
|
|
393
|
+
...g,
|
|
394
|
+
children: m
|
|
338
395
|
});
|
|
339
|
-
let x = /* @__PURE__ */
|
|
340
|
-
className:
|
|
341
|
-
style: {
|
|
342
|
-
width:
|
|
343
|
-
height:
|
|
344
|
-
maxWidth:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
396
|
+
let x = /* @__PURE__ */ w("div", {
|
|
397
|
+
className: o(K.gde, K.h, K.ssr, K[v], t),
|
|
398
|
+
style: V(U({
|
|
399
|
+
width: e(l ?? "100%"),
|
|
400
|
+
height: e(c ?? "100%"),
|
|
401
|
+
maxWidth: e(f ?? "none")
|
|
402
|
+
}, {
|
|
403
|
+
width: "100%",
|
|
404
|
+
height: "100%",
|
|
405
|
+
maxWidth: "none"
|
|
406
|
+
}), r),
|
|
407
|
+
"data-testid": _.domDiagnostics ? "guide" : void 0,
|
|
408
|
+
"data-variant": _.domDiagnostics ? v : void 0,
|
|
349
409
|
"aria-hidden": "true",
|
|
350
|
-
|
|
410
|
+
...g,
|
|
411
|
+
children: m
|
|
351
412
|
});
|
|
352
|
-
return
|
|
413
|
+
return h ? x : /* @__PURE__ */ w(ne, {
|
|
353
414
|
fallback: x,
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
className:
|
|
356
|
-
debugging:
|
|
415
|
+
children: /* @__PURE__ */ w(se, {
|
|
416
|
+
className: t,
|
|
417
|
+
debugging: n,
|
|
357
418
|
style: r,
|
|
358
|
-
variant:
|
|
419
|
+
variant: v,
|
|
359
420
|
align: a,
|
|
360
|
-
gap:
|
|
361
|
-
height:
|
|
362
|
-
width:
|
|
363
|
-
columns:
|
|
364
|
-
columnWidth:
|
|
365
|
-
maxWidth:
|
|
366
|
-
color:
|
|
367
|
-
...
|
|
368
|
-
children:
|
|
421
|
+
gap: y,
|
|
422
|
+
height: c,
|
|
423
|
+
width: l,
|
|
424
|
+
columns: u,
|
|
425
|
+
columnWidth: d,
|
|
426
|
+
maxWidth: f,
|
|
427
|
+
color: p,
|
|
428
|
+
...g,
|
|
429
|
+
children: m
|
|
369
430
|
})
|
|
370
431
|
});
|
|
371
|
-
}),
|
|
372
|
-
let
|
|
373
|
-
|
|
374
|
-
let C = a ??
|
|
432
|
+
}), se = _.memo(function({ className: e, debugging: n, style: r, variant: a, align: s = "center", gap: c, height: u, width: d, columns: f, columnWidth: m, maxWidth: h, color: g, children: v, ...y }) {
|
|
433
|
+
let b = R("guide"), { isShown: x } = z(n, b.debugging), S = _.useRef(null);
|
|
434
|
+
P(S);
|
|
435
|
+
let C = a ?? b.variant, E = typeof c == "number" ? c : 0, { template: D, columnsCount: O, calculatedGap: k } = te(S, _.useMemo(() => i({
|
|
375
436
|
variant: C,
|
|
376
|
-
base:
|
|
377
|
-
gap:
|
|
378
|
-
columns:
|
|
379
|
-
columnWidth:
|
|
437
|
+
base: b.base,
|
|
438
|
+
gap: E,
|
|
439
|
+
columns: f,
|
|
440
|
+
columnWidth: m
|
|
380
441
|
}), [
|
|
381
442
|
C,
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
])),
|
|
387
|
-
base: v.base,
|
|
388
|
-
colors: v.colors,
|
|
443
|
+
b.base,
|
|
444
|
+
E,
|
|
445
|
+
f,
|
|
446
|
+
m
|
|
447
|
+
])), A = p({
|
|
389
448
|
variant: C,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
449
|
+
columns: f,
|
|
450
|
+
columnWidth: m,
|
|
451
|
+
gap: E,
|
|
452
|
+
align: s,
|
|
453
|
+
domDiagnostics: b.domDiagnostics,
|
|
454
|
+
className: e,
|
|
455
|
+
style: r
|
|
456
|
+
}), j = _.useMemo(() => l({
|
|
457
|
+
base: b.base,
|
|
458
|
+
colors: b.colors,
|
|
459
|
+
variant: C,
|
|
460
|
+
align: s || "center",
|
|
461
|
+
width: d,
|
|
462
|
+
height: u,
|
|
463
|
+
columnWidth: m,
|
|
464
|
+
maxWidth: h,
|
|
465
|
+
color: g,
|
|
466
|
+
template: D,
|
|
467
|
+
columnsCount: O,
|
|
468
|
+
calculatedGap: k,
|
|
469
|
+
isVisible: x
|
|
400
470
|
}), [
|
|
401
|
-
|
|
402
|
-
|
|
471
|
+
b.base,
|
|
472
|
+
b.colors,
|
|
403
473
|
C,
|
|
404
|
-
|
|
474
|
+
s,
|
|
475
|
+
d,
|
|
405
476
|
u,
|
|
406
|
-
l,
|
|
407
|
-
f,
|
|
408
477
|
m,
|
|
409
478
|
h,
|
|
410
|
-
|
|
411
|
-
E,
|
|
479
|
+
g,
|
|
412
480
|
D,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
481
|
+
O,
|
|
482
|
+
k,
|
|
483
|
+
x
|
|
484
|
+
]), M = _.useMemo(() => V(U(j.containerStyle, {
|
|
485
|
+
"--bkgd-w": "100%",
|
|
486
|
+
"--bkgd-h": "100%",
|
|
487
|
+
"--bkgd-mw": "none",
|
|
488
|
+
"--bkgd-cw": "60px",
|
|
489
|
+
"--bkgd-n": "12",
|
|
490
|
+
"--bkgd-b": "0",
|
|
491
|
+
"--bkgd-cl": t.guide.colors.line,
|
|
492
|
+
"--bkgd-cp": t.guide.colors.pattern,
|
|
493
|
+
"--bkgd-ca": t.guide.colors.auto,
|
|
494
|
+
"--bkgd-cf": t.guide.colors.fixed,
|
|
495
|
+
"--bkgd-g": "0px",
|
|
496
|
+
"--bkgd-j": "center",
|
|
497
|
+
"--bkgd-t": "none",
|
|
498
|
+
"--bkgd-line-color": "var(--bkgd-cl)"
|
|
499
|
+
}), r), [j.containerStyle, r]);
|
|
500
|
+
return /* @__PURE__ */ T("div", {
|
|
416
501
|
ref: S,
|
|
417
|
-
"data-testid": "guide",
|
|
502
|
+
"data-testid": b.domDiagnostics ? "guide" : void 0,
|
|
418
503
|
"aria-hidden": "true",
|
|
419
|
-
className:
|
|
420
|
-
"data-variant":
|
|
421
|
-
style:
|
|
422
|
-
...
|
|
423
|
-
children: [
|
|
424
|
-
className:
|
|
425
|
-
"data-variant":
|
|
426
|
-
children: !
|
|
427
|
-
className:
|
|
428
|
-
"data-column-index": t,
|
|
429
|
-
"data-variant":
|
|
504
|
+
className: o(...j.classTokens.map((e) => K[e]), !j.classTokens.includes(C) && K[C], e),
|
|
505
|
+
"data-variant": b.domDiagnostics ? C : void 0,
|
|
506
|
+
style: M,
|
|
507
|
+
...y,
|
|
508
|
+
children: [x && /* @__PURE__ */ w("div", {
|
|
509
|
+
className: o(K.cols, K[C], A && K.compactFixed),
|
|
510
|
+
"data-variant": b.domDiagnostics ? C : void 0,
|
|
511
|
+
children: !j.isLineVariant && !A && Array.from({ length: j.columnsCount }, (e, t) => /* @__PURE__ */ w("div", {
|
|
512
|
+
className: o(K.col, K[C]),
|
|
513
|
+
"data-column-index": b.domDiagnostics ? t : void 0,
|
|
514
|
+
"data-variant": b.domDiagnostics ? C : void 0
|
|
430
515
|
}, t))
|
|
431
|
-
}),
|
|
516
|
+
}), v]
|
|
432
517
|
});
|
|
433
|
-
}),
|
|
434
|
-
function
|
|
435
|
-
if (
|
|
518
|
+
}), q = typeof window > "u";
|
|
519
|
+
function ce(e, t) {
|
|
520
|
+
if (q) return t;
|
|
436
521
|
try {
|
|
437
522
|
return e();
|
|
438
523
|
} catch {
|
|
439
524
|
return t;
|
|
440
525
|
}
|
|
441
526
|
}
|
|
442
|
-
function
|
|
443
|
-
return !e ||
|
|
527
|
+
function J(e, t, n) {
|
|
528
|
+
return !e || q ? t : n;
|
|
444
529
|
}
|
|
445
|
-
var
|
|
530
|
+
var Y = {
|
|
446
531
|
spr: "spr_syfhf",
|
|
447
532
|
line: "line_nzGsp",
|
|
448
533
|
flat: "flat_XJWHt",
|
|
449
534
|
indicator: "indicator_inw1x"
|
|
450
|
-
},
|
|
451
|
-
let h =
|
|
452
|
-
base:
|
|
535
|
+
}, X = _.memo(function({ height: e, width: n, indicatorNode: r, debugging: i, variant: a, base: s, color: c, className: l, style: d, children: f, ssrMode: p = !1, ...m }) {
|
|
536
|
+
let h = _.useRef(null), g = R("spacer"), { isShown: v } = z(i, g.debugging), y = a ?? g.variant, b = s ?? g.base, x = B(), S = _.useMemo(() => u({
|
|
537
|
+
base: b,
|
|
453
538
|
colors: g.colors,
|
|
454
|
-
width:
|
|
539
|
+
width: n,
|
|
455
540
|
height: e,
|
|
456
541
|
color: c,
|
|
457
|
-
variant:
|
|
458
|
-
isVisible:
|
|
542
|
+
variant: y,
|
|
543
|
+
isVisible: v
|
|
459
544
|
}), [
|
|
460
|
-
|
|
545
|
+
b,
|
|
461
546
|
g.colors,
|
|
462
|
-
|
|
547
|
+
n,
|
|
463
548
|
e,
|
|
464
549
|
c,
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
]),
|
|
468
|
-
if (!
|
|
469
|
-
let e =
|
|
470
|
-
return /* @__PURE__ */
|
|
471
|
-
className:
|
|
550
|
+
y,
|
|
551
|
+
v
|
|
552
|
+
]), E = J(x && !p, !1, v && r !== void 0), D = _.useMemo(() => {
|
|
553
|
+
if (!E) return null;
|
|
554
|
+
let e = S.normWidth, t = S.normHeight;
|
|
555
|
+
return /* @__PURE__ */ T(C, { children: [t !== 0 && /* @__PURE__ */ w("span", {
|
|
556
|
+
className: Y.indicator,
|
|
472
557
|
"aria-hidden": "true",
|
|
473
558
|
children: r(t, "height")
|
|
474
|
-
}, "height"), e !== 0 && /* @__PURE__ */
|
|
475
|
-
className:
|
|
559
|
+
}, "height"), e !== 0 && /* @__PURE__ */ w("span", {
|
|
560
|
+
className: Y.indicator,
|
|
476
561
|
"aria-hidden": "true",
|
|
477
562
|
children: r(e, "width")
|
|
478
563
|
}, "width")] });
|
|
479
564
|
}, [
|
|
480
|
-
|
|
565
|
+
E,
|
|
481
566
|
r,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
]),
|
|
485
|
-
|
|
567
|
+
S.normWidth,
|
|
568
|
+
S.normHeight
|
|
569
|
+
]), O = _.useMemo(() => V(U(S.style, {
|
|
570
|
+
"--bksp-w": "var(--bk-wf, 100%)",
|
|
571
|
+
"--bksp-h": "var(--bk-hf, auto)",
|
|
572
|
+
"--bksp-b": "8px",
|
|
573
|
+
"--bksp-cl": t.spacer.colors.line,
|
|
574
|
+
"--bksp-cf": t.spacer.colors.flat,
|
|
575
|
+
"--bksp-ct": t.spacer.colors.text
|
|
576
|
+
}), d), [S.style, d]);
|
|
577
|
+
return /* @__PURE__ */ T("div", {
|
|
486
578
|
ref: h,
|
|
487
|
-
"data-testid": "spacer",
|
|
488
|
-
className:
|
|
489
|
-
"data-variant":
|
|
490
|
-
"data-height": typeof
|
|
491
|
-
style:
|
|
579
|
+
"data-testid": g.domDiagnostics ? "spacer" : void 0,
|
|
580
|
+
className: o(...S.classTokens.map((e) => Y[e]), l),
|
|
581
|
+
"data-variant": g.domDiagnostics ? y : void 0,
|
|
582
|
+
"data-height": g.domDiagnostics ? typeof S.normHeight == "number" ? `${S.normHeight}px` : S.normHeight : void 0,
|
|
583
|
+
style: O,
|
|
492
584
|
...m,
|
|
493
|
-
children: [
|
|
585
|
+
children: [D, f]
|
|
494
586
|
});
|
|
495
|
-
}),
|
|
587
|
+
}), Z = {
|
|
496
588
|
pad: "pad_NizuS",
|
|
497
589
|
content: "content_xFX0U",
|
|
590
|
+
topEdge: "topEdge_7hMCE",
|
|
591
|
+
leftEdge: "leftEdge_1Dc-j",
|
|
592
|
+
rightEdge: "rightEdge_P7r9Z",
|
|
593
|
+
bottomEdge: "bottomEdge_PfOep",
|
|
498
594
|
v: "v_dowAz"
|
|
499
|
-
},
|
|
500
|
-
let r = e || "line", i = t || "none", a = (e, t) => /* @__PURE__ */
|
|
595
|
+
}, le = (e, t, n) => {
|
|
596
|
+
let r = e || "line", i = t || "none", a = (e, t) => /* @__PURE__ */ w(X, {
|
|
501
597
|
variant: r,
|
|
502
598
|
debugging: t === 0 || e === 0 ? "none" : i,
|
|
503
599
|
indicatorNode: n,
|
|
@@ -505,132 +601,172 @@ var J = {
|
|
|
505
601
|
width: e === "100%" ? void 0 : e
|
|
506
602
|
});
|
|
507
603
|
return a.displayName = "PadderSpacer", a;
|
|
508
|
-
},
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}, $ = p.memo(p.forwardRef(function({ children: e, className: t, debugging: i, height: a, indicatorNode: o, style: s, width: c, ssrMode: l = !1, ...u }, d) {
|
|
512
|
-
let m = I("padder"), { variant: h } = I("spacer"), g = p.useMemo(() => r(u), [u]), { isShown: _, isNone: v, debugging: S } = L(i, m.debugging), C = !v, w = R(), T = p.useRef(null), E = N(T, {
|
|
513
|
-
base: m.base,
|
|
604
|
+
}, Q = _.memo(_.forwardRef(function({ children: e, className: n, debugging: r, height: i, indicatorNode: a, style: s, width: c, ssrMode: l = !1, preserveContentHost: u = !1, ...d }, f) {
|
|
605
|
+
let p = R("padder"), { variant: h } = R("spacer"), v = _.useMemo(() => g(d), [d]), { isShown: y, isNone: b, debugging: x } = z(r, p.debugging), S = !b, E = B(), D = _.useRef(null), O = L(D, {
|
|
606
|
+
base: p.base,
|
|
514
607
|
snapping: "height",
|
|
515
|
-
spacing:
|
|
516
|
-
}),
|
|
517
|
-
top:
|
|
518
|
-
right:
|
|
519
|
-
bottom:
|
|
520
|
-
left:
|
|
521
|
-
} }, { padding:
|
|
522
|
-
base:
|
|
523
|
-
color:
|
|
608
|
+
spacing: v
|
|
609
|
+
}), k = { padding: {
|
|
610
|
+
top: v.top || 0,
|
|
611
|
+
right: v.right || 0,
|
|
612
|
+
bottom: v.bottom || 0,
|
|
613
|
+
left: v.left || 0
|
|
614
|
+
} }, { padding: A } = J(E && !l, k, O), j = H(f, D), M = _.useMemo(() => m({
|
|
615
|
+
base: p.base,
|
|
616
|
+
color: p.color,
|
|
524
617
|
width: c,
|
|
525
|
-
height:
|
|
526
|
-
padding:
|
|
527
|
-
enableSpacers:
|
|
528
|
-
isVisible:
|
|
618
|
+
height: i,
|
|
619
|
+
padding: A,
|
|
620
|
+
enableSpacers: S,
|
|
621
|
+
isVisible: y
|
|
529
622
|
}), [
|
|
530
|
-
|
|
531
|
-
|
|
623
|
+
p.base,
|
|
624
|
+
p.color,
|
|
532
625
|
c,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
C,
|
|
536
|
-
_
|
|
537
|
-
]), j = p.useMemo(() => B(A.containerStyle, s), [A.containerStyle, s]), M = p.useMemo(() => re(h, S, o), [
|
|
538
|
-
h,
|
|
626
|
+
i,
|
|
627
|
+
A,
|
|
539
628
|
S,
|
|
540
|
-
|
|
629
|
+
y
|
|
630
|
+
]), N = _.useMemo(() => V(U(M.containerStyle, {
|
|
631
|
+
"--bkpd-w": "fit-content",
|
|
632
|
+
"--bkpd-h": "fit-content",
|
|
633
|
+
"--bkpd-b": "8px",
|
|
634
|
+
"--bkpd-c": t.padder.color
|
|
635
|
+
}), s), [M.containerStyle, s]), P = _.useMemo(() => le(h, x, a), [
|
|
636
|
+
h,
|
|
637
|
+
x,
|
|
638
|
+
a
|
|
541
639
|
]);
|
|
542
|
-
return
|
|
543
|
-
ref:
|
|
544
|
-
"data-testid": "padder",
|
|
545
|
-
className:
|
|
546
|
-
style:
|
|
640
|
+
return S ? /* @__PURE__ */ T("div", {
|
|
641
|
+
ref: j,
|
|
642
|
+
"data-testid": p.domDiagnostics ? "padder" : void 0,
|
|
643
|
+
className: o(...M.classTokens.map((e) => Z[e]), n),
|
|
644
|
+
style: N,
|
|
645
|
+
...W(d),
|
|
547
646
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
|
|
550
|
-
children:
|
|
551
|
-
}),
|
|
552
|
-
|
|
553
|
-
children:
|
|
647
|
+
/* @__PURE__ */ T(C, { children: [A.top > 0 && /* @__PURE__ */ w("div", {
|
|
648
|
+
className: Z.topEdge,
|
|
649
|
+
children: P("100%", A.top)
|
|
650
|
+
}), A.left > 0 && /* @__PURE__ */ w("div", {
|
|
651
|
+
className: Z.leftEdge,
|
|
652
|
+
children: P(A.left, "100%")
|
|
554
653
|
})] }),
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
-
"data-testid": "padder-content",
|
|
557
|
-
className:
|
|
558
|
-
style: ie,
|
|
654
|
+
/* @__PURE__ */ w("div", {
|
|
655
|
+
"data-testid": p.domDiagnostics ? "padder-content" : void 0,
|
|
656
|
+
className: Z.content,
|
|
559
657
|
children: e
|
|
560
|
-
}),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
|
|
563
|
-
children:
|
|
564
|
-
}),
|
|
565
|
-
|
|
566
|
-
children:
|
|
658
|
+
}, "content"),
|
|
659
|
+
/* @__PURE__ */ T(C, { children: [A.right > 0 && /* @__PURE__ */ w("div", {
|
|
660
|
+
className: Z.rightEdge,
|
|
661
|
+
children: P(A.right, "100%")
|
|
662
|
+
}), A.bottom > 0 && /* @__PURE__ */ w("div", {
|
|
663
|
+
className: Z.bottomEdge,
|
|
664
|
+
children: P("100%", A.bottom)
|
|
567
665
|
})] })
|
|
568
666
|
]
|
|
569
|
-
}) : /* @__PURE__ */
|
|
570
|
-
ref:
|
|
571
|
-
"data-testid": "padder",
|
|
572
|
-
className:
|
|
573
|
-
style:
|
|
574
|
-
|
|
667
|
+
}) : /* @__PURE__ */ w("div", {
|
|
668
|
+
ref: j,
|
|
669
|
+
"data-testid": p.domDiagnostics ? "padder" : void 0,
|
|
670
|
+
className: o(...M.classTokens.map((e) => Z[e]), n),
|
|
671
|
+
style: N,
|
|
672
|
+
...W(d),
|
|
673
|
+
children: u ? /* @__PURE__ */ w("div", {
|
|
674
|
+
"data-testid": p.domDiagnostics ? "padder-content" : void 0,
|
|
675
|
+
className: Z.content,
|
|
676
|
+
children: e
|
|
677
|
+
}, "content") : e
|
|
575
678
|
});
|
|
576
|
-
})),
|
|
679
|
+
})), ue = Q, de = Q, $ = {
|
|
577
680
|
box: "box_sPqFs",
|
|
578
|
-
v: "v_ZrZ5j"
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
681
|
+
v: "v_ZrZ5j",
|
|
682
|
+
padderVisible: "padderVisible_zft5p",
|
|
683
|
+
separatePadder: "separatePadder_BmOqc"
|
|
684
|
+
}, fe = _.memo(_.forwardRef(function({ children: e, snapping: n = "clamp", snapEdge: r = "bottom", debugging: i, className: a, colSpan: c, rowSpan: l, span: u, width: d, height: p, style: m, ssrMode: h = !1, ...v }, y) {
|
|
685
|
+
let b = R("box"), x = R("padder"), { isShown: S, debugging: C } = z(i, b.debugging), T = B(), E = _.useRef(null), { top: D, bottom: O, left: k, right: j } = g(v), M = L(E, {
|
|
686
|
+
base: b.base,
|
|
687
|
+
snapping: n,
|
|
688
|
+
snapEdge: r,
|
|
583
689
|
spacing: {
|
|
584
|
-
top:
|
|
585
|
-
bottom:
|
|
586
|
-
left:
|
|
587
|
-
right:
|
|
690
|
+
top: D,
|
|
691
|
+
bottom: O,
|
|
692
|
+
left: k,
|
|
693
|
+
right: j
|
|
588
694
|
}
|
|
589
|
-
}), { padding:
|
|
590
|
-
top:
|
|
591
|
-
right:
|
|
592
|
-
bottom:
|
|
593
|
-
left:
|
|
594
|
-
} },
|
|
595
|
-
base:
|
|
596
|
-
lineColor:
|
|
597
|
-
width:
|
|
598
|
-
height:
|
|
599
|
-
span:
|
|
600
|
-
colSpan:
|
|
601
|
-
rowSpan:
|
|
602
|
-
isVisible:
|
|
695
|
+
}), { padding: N } = J(T && !h, { padding: {
|
|
696
|
+
top: D || 0,
|
|
697
|
+
right: j || 0,
|
|
698
|
+
bottom: O || 0,
|
|
699
|
+
left: k || 0
|
|
700
|
+
} }, M), P = _.useMemo(() => f({
|
|
701
|
+
base: b.base,
|
|
702
|
+
lineColor: b.colors.line,
|
|
703
|
+
width: d,
|
|
704
|
+
height: p,
|
|
705
|
+
span: u,
|
|
706
|
+
colSpan: c,
|
|
707
|
+
rowSpan: l,
|
|
708
|
+
isVisible: S
|
|
603
709
|
}), [
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
l,
|
|
710
|
+
b.base,
|
|
711
|
+
b.colors.line,
|
|
607
712
|
d,
|
|
713
|
+
p,
|
|
714
|
+
u,
|
|
608
715
|
c,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
716
|
+
l,
|
|
717
|
+
S
|
|
718
|
+
]), F = s({
|
|
719
|
+
className: a,
|
|
720
|
+
style: m,
|
|
721
|
+
width: d
|
|
722
|
+
}), I = _.useMemo(() => V(U(P.boxStyle, {
|
|
723
|
+
"--bkbx-w": "fit-content",
|
|
724
|
+
"--bkbx-h": "fit-content",
|
|
725
|
+
"--bkbx-cl": t.box.colors.line
|
|
726
|
+
}), F ? void 0 : V(U({
|
|
727
|
+
...N.top > 0 || N.bottom > 0 ? { gridTemplateRows: `${N.top}px 1fr ${N.bottom}px` } : {},
|
|
728
|
+
...N.left > 0 || N.right > 0 ? { gridTemplateColumns: `${N.left}px 1fr ${N.right}px` } : {}
|
|
729
|
+
}, {
|
|
730
|
+
gridTemplateRows: "auto 1fr auto",
|
|
731
|
+
gridTemplateColumns: "auto 1fr auto"
|
|
732
|
+
}), S ? U({ "--bkpd-c": x.color }, { "--bkpd-c": t.padder.color }) : void 0), m), [
|
|
733
|
+
P.boxStyle,
|
|
734
|
+
F,
|
|
735
|
+
m,
|
|
736
|
+
x.color,
|
|
737
|
+
S,
|
|
738
|
+
N.top,
|
|
739
|
+
N.right,
|
|
740
|
+
N.bottom,
|
|
741
|
+
N.left
|
|
742
|
+
]);
|
|
743
|
+
return /* @__PURE__ */ w("div", {
|
|
744
|
+
ref: H(y, E),
|
|
745
|
+
"data-testid": b.domDiagnostics ? "box" : void 0,
|
|
746
|
+
className: o(...P.classTokens.map((e) => $[e]), F && $.separatePadder, S && !F && $.padderVisible, a),
|
|
747
|
+
style: V(I, P.gridSpanStyle),
|
|
748
|
+
...W(v),
|
|
749
|
+
children: /* @__PURE__ */ w(A, {
|
|
619
750
|
base: 1,
|
|
620
751
|
spacer: { variant: "flat" },
|
|
621
|
-
children: /* @__PURE__ */
|
|
622
|
-
block: [
|
|
623
|
-
inline: [
|
|
752
|
+
children: F ? /* @__PURE__ */ w(de, {
|
|
753
|
+
block: [N.top, N.bottom],
|
|
754
|
+
inline: [N.left, N.right],
|
|
624
755
|
width: "fit-content",
|
|
625
|
-
height:
|
|
626
|
-
debugging:
|
|
756
|
+
height: p,
|
|
757
|
+
debugging: C,
|
|
758
|
+
preserveContentHost: !0,
|
|
627
759
|
ssrMode: !0,
|
|
628
760
|
children: e
|
|
761
|
+
}) : /* @__PURE__ */ w("div", {
|
|
762
|
+
"data-testid": b.domDiagnostics ? "padder-content" : void 0,
|
|
763
|
+
className: Z.content,
|
|
764
|
+
children: e
|
|
629
765
|
})
|
|
630
766
|
})
|
|
631
767
|
});
|
|
632
768
|
}));
|
|
633
769
|
//#endregion
|
|
634
|
-
export {
|
|
770
|
+
export { ae as Baseline, fe as Box, A as Config, oe as Guide, ue as Padder, X as Spacer, q as isSSR, ce as safeClientValue };
|
|
635
771
|
|
|
636
772
|
//# sourceMappingURL=index.mjs.map
|