@cntrl-site/components 1.0.118-alpha.9 → 1.0.119

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.
@@ -1,32 +1,32 @@
1
- import { jsx as c, jsxs as x, Fragment as R } from "react/jsx-runtime";
2
- import { useMemo as po } from "react";
3
- import { S as uo } from "./SvgImage-B5mR9y6q.mjs";
1
+ import { jsx as c, jsxs as w, Fragment as R } from "react/jsx-runtime";
2
+ import { useMemo as wo } from "react";
3
+ import { S as xo } from "./SvgImage-B5mR9y6q.mjs";
4
4
  import { s as t } from "./scalingValue-C9JH5L6O.mjs";
5
- import { b as mo } from "./buildColorVars-CLyWQm5K.mjs";
6
- import { u as xo } from "./useScopedStyles-DhBG3557.mjs";
7
- import { o as wo, t as go } from "./textStylesToCss-05Mn6I_2.mjs";
8
- const yo = {
5
+ import { b as yo } from "./buildColorVars-CLyWQm5K.mjs";
6
+ import { u as ko } from "./useScopedStyles-DhBG3557.mjs";
7
+ import { o as Co, t as So } from "./textStylesToCss-05Mn6I_2.mjs";
8
+ const No = {
9
9
  backgroundColor: "background-color",
10
10
  textColor: "text-color",
11
11
  borderColor: "border-color",
12
12
  iconColor: "icon-color",
13
13
  boxShadowColor: "box-shadow-color",
14
14
  innerBoxShadowColor: "inner-box-shadow-color"
15
- }, ko = ["hover", "active"], B = {
15
+ }, To = ["hover", "active"], Ao = (o) => !!o && o.includes("gradient("), I = {
16
16
  left: "flex-start",
17
17
  center: "center",
18
18
  right: "flex-end"
19
19
  };
20
- function Co(o, e) {
21
- const n = o.currentTarget, a = n.getBoundingClientRect(), l = o.clientY - a.top > a.height / 2;
22
- n.classList.toggle(`${e}-reveal-from-bottom`, l);
20
+ function Bo(o, e) {
21
+ const n = o.currentTarget, a = n.getBoundingClientRect(), i = o.clientY - a.top > a.height / 2;
22
+ n.classList.toggle(`${e}-reveal-from-bottom`, i);
23
23
  }
24
- function So(o, e) {
25
- const n = o.currentTarget, a = n.getBoundingClientRect(), l = o.clientY < a.top + a.height / 2;
26
- n.classList.toggle(`${e}-reveal-from-bottom`, l);
24
+ function Ro(o, e) {
25
+ const n = o.currentTarget, a = n.getBoundingClientRect(), i = o.clientY < a.top + a.height / 2;
26
+ n.classList.toggle(`${e}-reveal-from-bottom`, i);
27
27
  }
28
- function No(o) {
29
- const e = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-box-shadow-color, transparent)`, n = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-inner-box-shadow-color, transparent)`, a = `${e}, ${n}`, l = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-hover-box-shadow-color, var(--${o}-box-shadow-color, transparent))`, r = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-hover-inner-box-shadow-color, var(--${o}-inner-box-shadow-color, transparent))`, $ = `${l}, ${r}`, i = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-active-box-shadow-color, var(--${o}-box-shadow-color, transparent))`, h = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-active-inner-box-shadow-color, var(--${o}-inner-box-shadow-color, transparent))`, u = `${i}, ${h}`, w = `0 4px 12px rgba(0, 0, 0, 0.15), ${n}`, N = `.${o}-button:focus-visible, a:focus-visible .${o}-button`, T = `.${o}-button:hover, ${N}`, v = (f) => `.${o}-hover-effect-${f}:hover, .${o}-hover-effect-${f}:focus-visible, a:focus-visible .${o}-hover-effect-${f}`;
28
+ function Io(o) {
29
+ const e = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-box-shadow-color, transparent)`, n = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-inner-box-shadow-color, transparent)`, a = `${e}, ${n}`, i = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-hover-box-shadow-color, var(--${o}-box-shadow-color, transparent))`, r = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-hover-inner-box-shadow-color, var(--${o}-inner-box-shadow-color, transparent))`, $ = `${i}, ${r}`, s = `var(--${o}-box-shadow-x, 0) var(--${o}-box-shadow-y, 0) var(--${o}-box-shadow-blur, 0) var(--${o}-box-shadow-spread, 0) var(--${o}-active-box-shadow-color, var(--${o}-box-shadow-color, transparent))`, b = `inset var(--${o}-inner-box-shadow-x, 0) var(--${o}-inner-box-shadow-y, 0) var(--${o}-inner-box-shadow-blur, 0) var(--${o}-inner-box-shadow-spread, 0) var(--${o}-active-inner-box-shadow-color, var(--${o}-inner-box-shadow-color, transparent))`, m = `${s}, ${b}`, x = `0 4px 12px rgba(0, 0, 0, 0.15), ${n}`, N = `.${o}-button:focus-visible, a:focus-visible .${o}-button`, T = `.${o}-button:hover, ${N}`, d = (h) => `.${o}-hover-effect-${h}:hover, .${o}-hover-effect-${h}:focus-visible, a:focus-visible .${o}-hover-effect-${h}`;
30
30
  return `
31
31
  .${o}-root {
32
32
  line-height: 0;
@@ -42,7 +42,7 @@ function No(o) {
42
42
  box-sizing: border-box;
43
43
  border-style: solid;
44
44
  border-color: var(--${o}-border-color);
45
- background-color: var(--${o}-background-color);
45
+ background: var(--${o}-background-color);
46
46
  color: var(--${o}-text-color);
47
47
  -webkit-backdrop-filter: var(--${o}-backdrop-blur, none);
48
48
  backdrop-filter: var(--${o}-backdrop-blur, none);
@@ -59,14 +59,14 @@ function No(o) {
59
59
  .${o}-wrapper.${o}-editing .${o}-button {
60
60
  transition: color 250ms, background-color 250ms, border-color 250ms, transform 250ms;
61
61
  }
62
- ${v("scale-up")},
62
+ ${d("scale-up")},
63
63
  .${o}-wrapper.${o}-state-hover .${o}-hover-effect-scale-up {
64
64
  transform: scale(1.05);
65
65
  }
66
- ${v("lift")},
66
+ ${d("lift")},
67
67
  .${o}-wrapper.${o}-state-hover .${o}-hover-effect-lift {
68
68
  transform: translateY(-2px);
69
- box-shadow: ${w};
69
+ box-shadow: ${x};
70
70
  }
71
71
  .${o}-hover-effect-reveal,
72
72
  .${o}-hover-effect-swipe {
@@ -86,7 +86,7 @@ ${v("lift")},
86
86
  content: '';
87
87
  position: absolute;
88
88
  inset: 0;
89
- background-color: var(--${o}-hover-background-color, var(--${o}-background-color));
89
+ background: var(--${o}-hover-background-color, var(--${o}-background-color));
90
90
  pointer-events: none;
91
91
  z-index: 0;
92
92
  transform: scaleY(0);
@@ -113,7 +113,7 @@ a:focus-visible .${o}-hover-effect-reveal.${o}-reveal-from-bottom::before,
113
113
  content: '';
114
114
  position: absolute;
115
115
  inset: 0;
116
- background-color: var(--${o}-hover-background-color, var(--${o}-background-color));
116
+ background: var(--${o}-hover-background-color, var(--${o}-background-color));
117
117
  pointer-events: none;
118
118
  z-index: 0;
119
119
  transform: translateX(-100%);
@@ -125,11 +125,11 @@ a:focus-visible .${o}-hover-effect-swipe::before,
125
125
  .${o}-wrapper.${o}-state-hover .${o}-hover-effect-swipe::before {
126
126
  transform: translateX(0);
127
127
  }
128
- ${v("reveal")},
128
+ ${d("reveal")},
129
129
  .${o}-wrapper.${o}-state-hover .${o}-hover-effect-reveal,
130
- ${v("swipe")},
130
+ ${d("swipe")},
131
131
  .${o}-wrapper.${o}-state-hover .${o}-hover-effect-swipe {
132
- background-color: var(--${o}-background-color);
132
+ background: var(--${o}-background-color);
133
133
  }
134
134
  .${o}-hover-effect-content-roll {
135
135
  position: relative;
@@ -191,15 +191,17 @@ a:focus-visible .${o}-hover-effect-content-roll .${o}-content-roll-layer-hover,
191
191
  opacity: 1;
192
192
  }
193
193
  ${T} {
194
- background-color: var(--${o}-hover-background-color, var(--${o}-background-color));
194
+ background: var(--${o}-hover-background-color, var(--${o}-background-color));
195
195
  color: var(--${o}-hover-text-color, var(--${o}-text-color));
196
196
  border-color: var(--${o}-hover-border-color, var(--${o}-border-color));
197
+ --${o}-border-fill: var(--${o}-hover-border-color, var(--${o}-border-color));
197
198
  box-shadow: ${$};
198
199
  }
199
200
  .${o}-wrapper.${o}-state-hover .${o}-button {
200
- background-color: var(--${o}-hover-background-color, var(--${o}-background-color));
201
+ background: var(--${o}-hover-background-color, var(--${o}-background-color));
201
202
  color: var(--${o}-hover-text-color, var(--${o}-text-color));
202
203
  border-color: var(--${o}-hover-border-color, var(--${o}-border-color));
204
+ --${o}-border-fill: var(--${o}-hover-border-color, var(--${o}-border-color));
203
205
  box-shadow: ${$};
204
206
  }
205
207
  .${o}-button:focus,
@@ -210,16 +212,60 @@ a:focus-visible:has(.${o}-button) {
210
212
  }
211
213
  .${o}-button:active,
212
214
  a:active .${o}-button {
213
- background-color: var(--${o}-active-background-color, var(--${o}-background-color));
215
+ background: var(--${o}-active-background-color, var(--${o}-background-color));
214
216
  color: var(--${o}-active-text-color, var(--${o}-text-color));
215
217
  border-color: var(--${o}-active-border-color, var(--${o}-border-color));
216
- box-shadow: ${u};
218
+ --${o}-border-fill: var(--${o}-active-border-color, var(--${o}-border-color));
219
+ box-shadow: ${m};
217
220
  }
218
221
  .${o}-wrapper.${o}-state-active .${o}-button {
219
- background-color: var(--${o}-active-background-color, var(--${o}-background-color));
222
+ background: var(--${o}-active-background-color, var(--${o}-background-color));
220
223
  color: var(--${o}-active-text-color, var(--${o}-text-color));
221
224
  border-color: var(--${o}-active-border-color, var(--${o}-border-color));
222
- box-shadow: ${u};
225
+ --${o}-border-fill: var(--${o}-active-border-color, var(--${o}-border-color));
226
+ box-shadow: ${m};
227
+ }
228
+ /* Gradient border: CSS borders can't take gradients with radius, so the transparent border is covered by a masked ring. */
229
+ .${o}-border-gradient {
230
+ position: relative;
231
+ }
232
+ .${o}-border-gradient::after {
233
+ content: '';
234
+ position: absolute;
235
+ inset: calc(var(--${o}-stroke) * -1);
236
+ padding: var(--${o}-stroke);
237
+ border-radius: inherit;
238
+ background: var(--${o}-border-fill, var(--${o}-border-color));
239
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
240
+ -webkit-mask-composite: xor;
241
+ mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
242
+ pointer-events: none;
243
+ z-index: 2;
244
+ }
245
+ /* overflow would clip the ring, so these effects clip their moving parts instead */
246
+ .${o}-border-gradient.${o}-hover-effect-reveal,
247
+ .${o}-border-gradient.${o}-hover-effect-swipe,
248
+ .${o}-border-gradient.${o}-hover-effect-content-roll {
249
+ overflow: visible;
250
+ }
251
+ .${o}-border-gradient.${o}-hover-effect-reveal::before,
252
+ .${o}-border-gradient.${o}-hover-effect-swipe::before {
253
+ border-radius: max(0px, calc(var(--${o}-radius) - var(--${o}-stroke)));
254
+ }
255
+ .${o}-border-gradient.${o}-hover-effect-swipe::before {
256
+ transform: none;
257
+ clip-path: inset(0 100% 0 0);
258
+ transition: clip-path 250ms;
259
+ }
260
+ .${o}-border-gradient.${o}-hover-effect-swipe:hover::before,
261
+ .${o}-border-gradient.${o}-hover-effect-swipe:focus-visible::before,
262
+ a:focus-visible .${o}-border-gradient.${o}-hover-effect-swipe::before,
263
+ .${o}-wrapper.${o}-state-hover .${o}-border-gradient.${o}-hover-effect-swipe::before {
264
+ clip-path: inset(0);
265
+ }
266
+ /* clip the roll at the padding edge, where the button itself would have clipped it */
267
+ .${o}-border-gradient .${o}-content-roll-viewport {
268
+ clip-path: var(--${o}-roll-clip);
223
269
  }
224
270
  .${o}-text {
225
271
  display: block;
@@ -271,20 +317,20 @@ a:active .${o}-button .${o}-icon-image,
271
317
  }
272
318
  `;
273
319
  }
274
- function I(o, e, n = "", a, l) {
320
+ function L(o, e, n = "", a, i) {
275
321
  const r = e();
276
- return /* @__PURE__ */ x("span", { className: `${o}-content-roll-wrap ${n}`.trim(), style: a, children: [
277
- /* @__PURE__ */ c("span", { className: `${o}-content-roll-spacer`, "aria-hidden": "true", style: l, children: r }),
278
- /* @__PURE__ */ x("span", { className: `${o}-content-roll-viewport`, children: [
279
- /* @__PURE__ */ c("span", { className: `${o}-content-roll-layer`, style: l, children: e() }),
280
- /* @__PURE__ */ c("span", { className: `${o}-content-roll-layer ${o}-content-roll-layer-hover`, "aria-hidden": "true", style: l, children: e() })
322
+ return /* @__PURE__ */ w("span", { className: `${o}-content-roll-wrap ${n}`.trim(), style: a, children: [
323
+ /* @__PURE__ */ c("span", { className: `${o}-content-roll-spacer`, "aria-hidden": "true", style: i, children: r }),
324
+ /* @__PURE__ */ w("span", { className: `${o}-content-roll-viewport`, children: [
325
+ /* @__PURE__ */ c("span", { className: `${o}-content-roll-layer`, style: i, children: e() }),
326
+ /* @__PURE__ */ c("span", { className: `${o}-content-roll-layer ${o}-content-roll-layer-hover`, "aria-hidden": "true", style: i, children: e() })
281
327
  ] })
282
328
  ] });
283
329
  }
284
- function H(o, e, n = "fill", a = 100, l = 0, r) {
330
+ function X(o, e, n = "fill", a = 100, i = 0, r) {
285
331
  if (!e) return null;
286
332
  const $ = /* @__PURE__ */ c(
287
- uo,
333
+ xo,
288
334
  {
289
335
  url: e,
290
336
  fill: `var(--${o}-icon-color)`,
@@ -302,70 +348,70 @@ function H(o, e, n = "fill", a = 100, l = 0, r) {
302
348
  children: $
303
349
  }
304
350
  );
305
- if (n === "fixed" && l > 0) {
306
- const i = t(l, r);
307
- return /* @__PURE__ */ c("span", { className: `${o}-icon`, style: { width: i, height: i }, "aria-hidden": "true", children: $ });
351
+ if (n === "fixed" && i > 0) {
352
+ const s = t(i, r);
353
+ return /* @__PURE__ */ c("span", { className: `${o}-icon`, style: { width: s, height: s }, "aria-hidden": "true", children: $ });
308
354
  }
309
355
  return /* @__PURE__ */ c("span", { className: `${o}-icon ${o}-icon-fill`, "aria-hidden": "true", children: $ });
310
356
  }
311
- function Oo({ settings: o, isEditor: e, isPreviewMode: n, activeEvent: a, hasLink: l }) {
312
- const { prefix: r } = xo(), $ = po(() => No(r), [r]), {
313
- type: i = "a",
314
- label: h = "Button",
315
- icon: u,
316
- alignment: w = "center",
357
+ function Wo({ settings: o, isEditor: e, isPreviewMode: n, activeEvent: a, hasLink: i }) {
358
+ const { prefix: r } = ko(), $ = wo(() => Io(r), [r]), {
359
+ type: s = "a",
360
+ label: b = "Button",
361
+ icon: m,
362
+ alignment: x = "center",
317
363
  alignA: N,
318
364
  order: T = "text-icon",
319
- gap: v = 0,
320
- iconSize: f = 0,
321
- iconWidthC: L = 0,
322
- dimensions: W = !1,
323
- padding: g = { top: 0, right: 0, bottom: 0, left: 0 },
324
- cornerRadius: _ = 0,
365
+ gap: d = 0,
366
+ iconSize: h = 0,
367
+ iconWidthC: O = 0,
368
+ dimensions: K = !1,
369
+ padding: v = { top: 0, right: 0, bottom: 0, left: 0 },
370
+ cornerRadius: Y = 0,
325
371
  boxShadow: y = { top: 0, left: 0, right: 0, bottom: 0 },
326
- boxShadowColor: j = "rgba(0, 0, 0, 0)",
372
+ boxShadowColor: q = "rgba(0, 0, 0, 0)",
327
373
  innerBoxShadow: k = { top: 0, left: 0, right: 0, bottom: 0 },
328
- innerBoxShadowColor: V = "rgba(0, 0, 0, 0)",
329
- stroke: D = 0,
330
- blur: Y = 0,
331
- backgroundColor: X = "#000000",
332
- textColor: F = "#ffffff",
333
- borderColor: G = "#ffffff",
334
- iconColor: K = "#ffffff",
335
- hoverEffect: b = "none",
336
- fontFamily: q,
337
- fontSettings: d,
338
- fontSize: J,
339
- lineHeight: Q,
340
- letterSpacing: U = 0,
341
- wordSpacing: Z = 0,
342
- textAppearance: E,
343
- stateOverrides: P,
344
- minWidth: oo = 0,
345
- minHeight: eo = 0,
346
- width: ro = 0,
347
- height: to = 0
348
- } = o, no = mo(r, {
349
- backgroundColor: X,
350
- textColor: F,
351
- borderColor: G,
352
- iconColor: K,
353
- boxShadowColor: j,
354
- innerBoxShadowColor: V
355
- }, yo, ko, P), ao = a && a !== "default" ? `${r}-state-${a}` : "", lo = e && !n ? `${r}-editing` : "", co = b !== "none" && (!e || n || a === "hover") ? `${r}-hover-effect-${b}` : "", io = b === "reveal" || b === "swipe", C = b === "content-roll", M = b === "reveal" && (!e || n), so = W === !0, p = i === "a" ? N ?? w : w, m = i === "c", $o = i !== "b", vo = {
374
+ innerBoxShadowColor: J = "rgba(0, 0, 0, 0)",
375
+ stroke: F = 0,
376
+ blur: z = 0,
377
+ backgroundColor: Q = "#000000",
378
+ textColor: M = "#ffffff",
379
+ borderColor: H = "#ffffff",
380
+ iconColor: U = "#ffffff",
381
+ hoverEffect: f = "none",
382
+ fontFamily: Z,
383
+ fontSettings: p,
384
+ fontSize: E,
385
+ lineHeight: P,
386
+ letterSpacing: oo = 0,
387
+ wordSpacing: eo = 0,
388
+ textAppearance: ro,
389
+ stateOverrides: j,
390
+ minWidth: to = 0,
391
+ minHeight: no = 0,
392
+ width: ao = 0,
393
+ height: lo = 0
394
+ } = o, io = yo(r, {
395
+ backgroundColor: Q,
396
+ textColor: M,
397
+ borderColor: H,
398
+ iconColor: U,
399
+ boxShadowColor: q,
400
+ innerBoxShadowColor: J
401
+ }, No, To, j), co = a && a !== "default" ? `${r}-state-${a}` : "", so = e && !n ? `${r}-editing` : "", $o = f !== "none" && (!e || n || a === "hover") ? `${r}-hover-effect-${f}` : "", vo = f === "reveal" || f === "swipe", C = f === "content-roll", V = f === "reveal" && (!e || n), A = F > 0 && [H, ...Object.values(j ?? {}).map((l) => l == null ? void 0 : l.borderColor)].some(Ao), bo = A ? `${r}-border-gradient` : "", W = t(F, e), _ = `max(1px, round(down, ${W}, 1px))`, ho = K === !0, u = s === "a" ? N ?? x : x, g = s === "c", fo = s !== "b", po = {
356
402
  fontSettings: {
357
- fontFamily: q,
358
- fontWeight: (d == null ? void 0 : d.fontWeight) ?? 400,
359
- fontStyle: (d == null ? void 0 : d.fontStyle) ?? "normal"
403
+ fontFamily: Z,
404
+ fontWeight: (p == null ? void 0 : p.fontWeight) ?? 400,
405
+ fontStyle: (p == null ? void 0 : p.fontStyle) ?? "normal"
360
406
  },
361
- fontSize: J ?? 0.01,
362
- lineHeight: Q,
363
- letterSpacing: U,
364
- wordSpacing: Z,
365
- textAppearance: E,
366
- color: F
367
- }, ho = {
368
- ...$o ? wo(go(vo, e)) : {},
407
+ fontSize: E ?? 0.01,
408
+ lineHeight: P,
409
+ letterSpacing: oo,
410
+ wordSpacing: eo,
411
+ textAppearance: ro,
412
+ color: M
413
+ }, uo = {
414
+ ...fo ? Co(So(po, e)) : {},
369
415
  [`--${r}-box-shadow-x`]: t(y.left, e),
370
416
  [`--${r}-box-shadow-y`]: t(y.top, e),
371
417
  [`--${r}-box-shadow-blur`]: t(y.right, e),
@@ -374,78 +420,89 @@ function Oo({ settings: o, isEditor: e, isPreviewMode: n, activeEvent: a, hasLin
374
420
  [`--${r}-inner-box-shadow-y`]: t(k.top, e),
375
421
  [`--${r}-inner-box-shadow-blur`]: t(k.right, e),
376
422
  [`--${r}-inner-box-shadow-spread`]: t(k.bottom, e),
377
- [`--${r}-backdrop-blur`]: Y > 0 ? `blur(${t(Y, e)})` : void 0,
378
- paddingTop: t(g.top, e),
379
- paddingRight: t(g.right, e),
380
- paddingBottom: t(g.bottom, e),
381
- paddingLeft: t(g.left, e),
382
- borderRadius: t(_, e),
383
- borderWidth: t(D, e),
384
- ...m ? {} : {
385
- justifyContent: B[p],
386
- textAlign: p
423
+ [`--${r}-backdrop-blur`]: z > 0 ? `blur(${t(z, e)})` : void 0,
424
+ paddingTop: t(v.top, e),
425
+ paddingRight: t(v.right, e),
426
+ paddingBottom: t(v.bottom, e),
427
+ paddingLeft: t(v.left, e),
428
+ borderRadius: t(Y, e),
429
+ borderWidth: A ? _ : W,
430
+ // Like a CSS border: the background stops at it, and the ring paints over it
431
+ ...A ? {
432
+ [`--${r}-stroke`]: _,
433
+ [`--${r}-radius`]: t(Y, e),
434
+ [`--${r}-roll-clip`]: `inset(${[v.top, v.right, v.bottom, v.left].map((l) => `calc(${t(l, e)} * -1)`).join(" ")})`,
435
+ borderColor: "transparent",
436
+ backgroundClip: "padding-box"
437
+ } : {
438
+ // A gradient background spans the border box, so it doesn't repeat under a see-through border
439
+ backgroundOrigin: "border-box"
440
+ },
441
+ ...g ? {} : {
442
+ justifyContent: I[u],
443
+ textAlign: u
387
444
  },
388
- ...m && !C ? { gap: t(v, e) } : {},
389
- ...so ? {
390
- width: t(ro, e),
391
- height: t(to, e)
445
+ ...g && !C ? { gap: t(d, e) } : {},
446
+ ...ho ? {
447
+ width: t(ao, e),
448
+ height: t(lo, e)
392
449
  } : {
393
- minWidth: t(oo, e),
394
- minHeight: t(eo, e),
395
- ...m ? { width: "100%" } : {}
450
+ minWidth: t(to, e),
451
+ minHeight: t(no, e),
452
+ ...g ? { width: "100%" } : {}
396
453
  }
397
454
  };
398
455
  let S;
399
- const A = {
456
+ const B = {
400
457
  display: "inline-flex",
401
458
  alignItems: "center",
402
- justifyContent: m ? B[p] : B[i === "a" ? p : "center"],
403
- gap: m ? t(v, e) : void 0,
459
+ justifyContent: g ? I[u] : I[s === "a" ? u : "center"],
460
+ gap: g ? t(d, e) : void 0,
404
461
  width: "100%",
405
462
  height: "100%",
406
- ...i === "a" ? { textAlign: p } : {}
463
+ ...s === "a" ? { textAlign: u } : {}
407
464
  };
408
- if (i === "b") {
409
- const s = () => H(r, u, f > 0 ? "fixed" : "fill", 100, f, e);
410
- S = C ? I(r, s, `${r}-icon-roll`, void 0, A) : s();
411
- } else if (i === "c") {
412
- const s = () => {
413
- const O = /* @__PURE__ */ c(
465
+ if (s === "b") {
466
+ const l = () => X(r, m, h > 0 ? "fixed" : "fill", 100, h, e);
467
+ S = C ? L(r, l, `${r}-icon-roll`, void 0, B) : l();
468
+ } else if (s === "c") {
469
+ const l = () => {
470
+ const G = /* @__PURE__ */ c(
414
471
  "span",
415
472
  {
416
473
  className: `${r}-text`,
417
- style: { textAlign: p },
418
- children: h
474
+ style: { textAlign: u },
475
+ children: b
419
476
  }
420
- ), z = H(r, u, L > 0 ? "fixed" : "fill", 100, L, e);
421
- return T === "icon-text" ? /* @__PURE__ */ x(R, { children: [
422
- z,
423
- O
424
- ] }) : /* @__PURE__ */ x(R, { children: [
425
- O,
426
- z
477
+ ), D = X(r, m, O > 0 ? "fixed" : "fill", 100, O, e);
478
+ return T === "icon-text" ? /* @__PURE__ */ w(R, { children: [
479
+ D,
480
+ G
481
+ ] }) : /* @__PURE__ */ w(R, { children: [
482
+ G,
483
+ D
427
484
  ] });
428
485
  };
429
- S = C ? I(r, s, `${r}-icon-text-roll`, void 0, A) : s();
486
+ S = C ? L(r, l, `${r}-icon-text-roll`, void 0, B) : l();
430
487
  } else
431
- S = C ? I(r, () => h, `${r}-label-roll`, void 0, A) : io ? /* @__PURE__ */ c("span", { className: `${r}-button-inner`, children: h }) : h;
432
- const fo = M ? (s) => Co(s, r) : void 0, bo = M ? (s) => So(s, r) : void 0;
433
- return /* @__PURE__ */ x(R, { children: [
488
+ S = C ? L(r, () => b, `${r}-label-roll`, void 0, B) : vo ? /* @__PURE__ */ c("span", { className: `${r}-button-inner`, children: b }) : b;
489
+ const mo = V ? (l) => Bo(l, r) : void 0, go = V ? (l) => Ro(l, r) : void 0;
490
+ return /* @__PURE__ */ w(R, { children: [
434
491
  /* @__PURE__ */ c("style", { dangerouslySetInnerHTML: { __html: $ } }),
435
- /* @__PURE__ */ c("div", { className: `${r}-root`, style: no, children: /* @__PURE__ */ c("div", { className: `${r}-wrapper ${ao} ${lo}`.trim(), children: /* @__PURE__ */ c(
492
+ /* @__PURE__ */ c("div", { className: `${r}-root`, style: io, children: /* @__PURE__ */ c("div", { className: `${r}-wrapper ${co} ${so}`.trim(), children: /* @__PURE__ */ c(
436
493
  "div",
437
494
  {
438
- className: `${r}-button ${co}`.trim(),
439
- style: ho,
440
- onMouseEnter: fo,
441
- onMouseLeave: bo,
495
+ className: `${r}-button ${$o} ${bo}`.trim(),
496
+ style: uo,
497
+ onMouseEnter: mo,
498
+ onMouseLeave: go,
442
499
  role: "button",
443
- tabIndex: l || e && !n ? void 0 : 0,
500
+ tabIndex: i || e && !n ? void 0 : 0,
444
501
  children: S
445
502
  }
446
503
  ) }) })
447
504
  ] });
448
505
  }
449
506
  export {
450
- Oo as SimpleButton
507
+ Wo as SimpleButton
451
508
  };
@@ -1,8 +1,8 @@
1
- import { ControlSlider as e } from "./ControlSlider-BBAXRDLP.mjs";
1
+ import { ControlSlider as e } from "./ControlSlider-DqKfaKMG.mjs";
2
2
  import { ImageRevealSlider as t } from "./ImageRevealSlider-DifEXySR.mjs";
3
3
  import { LightboxGallery as i } from "./Lightbox-BY99NS14.mjs";
4
- import { C as o, F as r, O as p, M as n, a as l, T as s, b as a, G as c, c as y, H as g, L as m, d, e as u, f as b, S as h, W as f, g as v, h as C, i as x, j as S, B as k, P as I, k as j } from "./ChroniclesComponent-Bf8jxaas.mjs";
5
- const E = {
4
+ import { C as o, F as r, O as p, M as n, a as l, T as s, b as a, G as c, H as y, L as g, c as m, d, e as u, S as b, W as h, f, g as v, h as C, i as x, B as S, P as k, j as I } from "./ChroniclesComponent-D_YAkpJZ.mjs";
5
+ const j = {
6
6
  element: e,
7
7
  id: "control-slider",
8
8
  name: "Slider",
@@ -615,7 +615,7 @@ const E = {
615
615
  },
616
616
  required: ["settings", "content", "styles"]
617
617
  }
618
- }, A = {
618
+ }, E = {
619
619
  element: t,
620
620
  id: "control-image-reveal",
621
621
  name: "Click Gallery",
@@ -939,7 +939,7 @@ const E = {
939
939
  }
940
940
  }
941
941
  }
942
- }, w = {
942
+ }, A = {
943
943
  element: i,
944
944
  id: "lightbox",
945
945
  name: "Lightbox",
@@ -2019,11 +2019,11 @@ const E = {
2019
2019
  },
2020
2020
  required: ["settings", "content", "styles"]
2021
2021
  }
2022
- }, H = [
2022
+ }, F = [
2023
+ j,
2023
2024
  E,
2024
- A,
2025
2025
  o,
2026
- w,
2026
+ A,
2027
2027
  r,
2028
2028
  p,
2029
2029
  n,
@@ -2044,12 +2044,11 @@ const E = {
2044
2044
  x,
2045
2045
  S,
2046
2046
  k,
2047
- I,
2048
- j
2047
+ I
2049
2048
  ];
2050
2049
  export {
2051
- E as C,
2052
- w as L,
2053
- A as a,
2054
- H as c
2050
+ j as C,
2051
+ A as L,
2052
+ E as a,
2053
+ F as c
2055
2054
  };