@stackone/malachite 2.51.1 → 2.51.2

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,22 +1,23 @@
1
- import { jsxs as U, jsx as h } from "react/jsx-runtime";
2
- import C, { useRef as T, useState as q, useLayoutEffect as v, useCallback as x } from "react";
3
- import se from "./CustomIcons/ArrowLeftIcon.js";
4
- import ie from "./CustomIcons/ForwardArrowIcon.js";
5
- import le from "./CustomIcons/PlusIcon.js";
6
- import { CONTENT_INSET as Dt } from "./PageLayout/constants.js";
7
- import { STRIP_RULE_PX as de, CARD_FLARE_TIP_PX as st, CARD_WIDTH_PX as ue, FLARE_CLASS as fe, CARD_FLARE_PX as K } from "./SelectableCard.js";
8
- import { revealTargetFor as Ot, pageTargetFor as pe, EDGE_EPSILON_PX as at, isCardInView as he } from "./cardStripGeometry.js";
9
- import { CardStripSlotContext as vt, PINNED_SLOT as me, SCROLLED_SLOT as be } from "./cardStripSlot.js";
10
- import { FOCUS_RING as Re } from "./focusRing.js";
11
- import { useAdoptedStyleSheet as wt } from "./useAdoptedStyleSheet.js";
12
- const ge = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]), G = '[role="radio"]', _e = "data-card-strip-scroller", Ae = "data-card-strip-trough", j = "malachite-card-strip", R = "malachite-card-strip-scroller", zt = "malachite-card-strip-fade", g = "malachite-card-strip-add-tile", it = "data-card-strip-add-slot", Yt = "[data-selectable-card-actions]", Vt = "[data-selectable-card-link], [data-selectable-card-address]", Se = 'a[href], area[href], button, input, select, textarea, iframe, [contenteditable="true"], [tabindex]', B = "data-card-strip-prev-tabindex", xe = 80, Ct = 11, H = 12, qt = "var(--malachite-shadow-default)", Le = "var(--malachite-card-strip-arrow-background, var(--malachite-card-background, #ffffff))", Ee = "var(--malachite-card-strip-arrow-border, #e8e8e8)", lt = "var(--malachite-card-strip-background, #f1f1f1)", It = "var(--malachite-radius-xxl, 14px)", Te = `${It} ${It} 0 0`, Pt = "var(--malachite-radius-xxxl, 16px)", $e = `${Pt} ${Pt} 0 0`, w = 4, ye = H + w, Mt = H, kt = xe + (Mt - w), ut = ue, De = 2 * (H + w) + ut, Oe = "var(--malachite-card-strip-divider, #dddddd)", Nt = "var(--malachite-card-strip-fade, transparent)", ve = "var(--malachite-selectable-card-hover-background, #e8e8e8)", we = "var(--malachite-card-strip-arrow-border, #e8e8e8)", Ft = "var(--malachite-selectable-card-hover-rule, #bbbbbb)", Ut = "0px 1px 0px 0px rgba(0, 0, 0, 0.4)", Ce = "var(--malachite-card-background, #ffffff)", Ie = "var(--malachite-text-primary, #0a0a0a)", Pe = "var(--malachite-card-strip-add-primary-background, var(--malachite-text-primary, #0a0a0a))", ke = "var(--malachite-card-strip-add-primary-foreground, var(--malachite-card-background, #ffffff))", Ne = "0px 1px 0px 0px rgba(10, 10, 10, 0.7)", ft = de, Bt = 16, M = 9999, Fe = 4, Ue = `
13
- .${j} {
14
- clip-path: inset(-${M}px -${M}px 0);
1
+ import { jsxs as N, jsx as m } from "react/jsx-runtime";
2
+ import F, { useRef as $, useState as Y, useLayoutEffect as I, useCallback as D } from "react";
3
+ import he from "./CustomIcons/ArrowLeftIcon.js";
4
+ import me from "./CustomIcons/ForwardArrowIcon.js";
5
+ import be from "./CustomIcons/PlusIcon.js";
6
+ import { CONTENT_INSET as Pt } from "./PageLayout/constants.js";
7
+ import { STRIP_RULE_PX as ge, CARD_FLARE_TIP_PX as mt, CARD_WIDTH_PX as Re, FLARE_CLASS as _e, CARD_FLARE_PX as rt } from "./SelectableCard.js";
8
+ import { revealTargetFor as Nt, pageTargetFor as Ae, EDGE_EPSILON_PX as pt, isCardInView as Se } from "./cardStripGeometry.js";
9
+ import { createReaderPlace as xe } from "./cardStripReader.js";
10
+ import { CardStripSlotContext as Ft, PINNED_SLOT as Ee, SCROLLED_SLOT as Le } from "./cardStripSlot.js";
11
+ import { FOCUS_RING as Te } from "./focusRing.js";
12
+ import { useAdoptedStyleSheet as Ut } from "./useAdoptedStyleSheet.js";
13
+ const ye = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"]), U = '[role="radio"]', $e = "data-card-strip-scroller", De = "data-card-strip-trough", nt = "malachite-card-strip", S = "malachite-card-strip-scroller", Qt = "malachite-card-strip-fade", x = "malachite-card-strip-add-tile", bt = "data-card-strip-add-slot", Zt = "[data-selectable-card-actions]", te = "[data-selectable-card-link], [data-selectable-card-address]", gt = 'a[href], area[href], button, input, select, textarea, iframe, [contenteditable="true"], [tabindex]', q = "data-card-strip-prev-tabindex", ve = 80, Bt = 11, V = 12, ee = "var(--malachite-shadow-default)", Oe = "var(--malachite-card-strip-arrow-background, var(--malachite-card-background, #ffffff))", we = "var(--malachite-card-strip-arrow-border, #e8e8e8)", Rt = "var(--malachite-card-strip-background, #f1f1f1)", Ht = "var(--malachite-radius-xxl, 14px)", Ce = `${Ht} ${Ht} 0 0`, Gt = "var(--malachite-radius-xxxl, 16px)", Ie = `${Gt} ${Gt} 0 0`, k = 4, ke = V + k, re = V, Xt = ve + (re - k), At = Re, Wt = 2 * (V + k) + At, Pe = "var(--malachite-card-strip-divider, #dddddd)", Mt = "var(--malachite-card-strip-fade, transparent)", Ne = "var(--malachite-selectable-card-hover-background, #e8e8e8)", Fe = "var(--malachite-card-strip-arrow-border, #e8e8e8)", zt = "var(--malachite-selectable-card-hover-rule, #bbbbbb)", Yt = "0px 1px 0px 0px rgba(0, 0, 0, 0.4)", Ue = "var(--malachite-card-background, #ffffff)", Be = "var(--malachite-text-primary, #0a0a0a)", He = "var(--malachite-card-strip-add-primary-background, var(--malachite-text-primary, #0a0a0a))", Ge = "var(--malachite-card-strip-add-primary-foreground, var(--malachite-card-background, #ffffff))", Xe = "0px 1px 0px 0px rgba(10, 10, 10, 0.7)", St = ge, qt = 16, et = 9999, We = 4, Me = `
14
+ .${nt} {
15
+ clip-path: inset(-${et}px -${et}px 0);
15
16
  }
16
- .${j}:has(:focus-visible) {
17
- clip-path: inset(-${M}px -${M}px -${Fe}px);
17
+ .${nt}:has(:focus-visible) {
18
+ clip-path: inset(-${et}px -${et}px -${We}px);
18
19
  }
19
- .${R} {
20
+ .${S} {
20
21
  display: flex;
21
22
  flex-wrap: nowrap;
22
23
  overflow-x: auto;
@@ -24,189 +25,189 @@ const ge = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "Arrow
24
25
  scroll-behavior: smooth;
25
26
  scrollbar-width: none;
26
27
  -ms-overflow-style: none;
27
- padding-block: ${Bt}px;
28
- margin-block: -${Bt}px;
28
+ padding-block: ${qt}px;
29
+ margin-block: -${qt}px;
29
30
  /* overflow-x clips both axes, so the end cards would lose a flare; the negative margin trades
30
31
  the padding back out and scroll-padding keeps the rest position at zero. */
31
- padding-inline: ${K}px;
32
- margin-inline: -${K}px;
33
- scroll-padding-inline: ${K}px;
32
+ padding-inline: ${rt}px;
33
+ margin-inline: -${rt}px;
34
+ scroll-padding-inline: ${rt}px;
34
35
  }
35
36
  /* A card focused at a faded edge has to stay readable, so the fade lifts entirely. */
36
- .${j}:has(:focus-visible) .${zt} {
37
+ .${nt}:has(:focus-visible) .${Qt} {
37
38
  display: none;
38
39
  }
39
- .${R}::-webkit-scrollbar {
40
+ .${S}::-webkit-scrollbar {
40
41
  display: none;
41
42
  }
42
43
  /* No bottom edge: the strip's rule is the baseline for the add tile as much as for a card. */
43
- .${g} > * {
44
- background: ${lt};
45
- border-radius: ${Te};
44
+ .${x} > * {
45
+ background: ${Rt};
46
+ border-radius: ${Ce};
46
47
  }
47
- .${g}:hover:not(:has(button:disabled)) > * {
48
- background: ${ve};
48
+ .${x}:hover:not(:has(button:disabled)) > * {
49
+ background: ${Ne};
49
50
  }
50
- .${g} button:active:not(:disabled) {
51
+ .${x} button:active:not(:disabled) {
51
52
  opacity: 0.8;
52
53
  }
53
- .${g}:has(button:active) > * {
54
- background: ${lt};
54
+ .${x}:has(button:active) > * {
55
+ background: ${Rt};
55
56
  }
56
- .${g}[data-emphasis='secondary'] button {
57
- border-color: ${we};
58
- box-shadow: ${qt};
57
+ .${x}[data-emphasis='secondary'] button {
58
+ border-color: ${Fe};
59
+ box-shadow: ${ee};
59
60
  }
60
- .${g}[data-emphasis='secondary']:hover:not(:has(button:disabled)) button {
61
- border-color: ${Ft};
62
- box-shadow: ${Ut};
61
+ .${x}[data-emphasis='secondary']:hover:not(:has(button:disabled)) button {
62
+ border-color: ${zt};
63
+ box-shadow: ${Yt};
63
64
  }
64
- .${g}[data-emphasis='secondary'] button:active:not(:disabled) {
65
- border-color: ${Ft};
66
- box-shadow: ${Ut};
65
+ .${x}[data-emphasis='secondary'] button:active:not(:disabled) {
66
+ border-color: ${zt};
67
+ box-shadow: ${Yt};
67
68
  }
68
- .${g}[data-emphasis='primary'] button {
69
+ .${x}[data-emphasis='primary'] button {
69
70
  border-color: transparent;
70
- box-shadow: ${Ne};
71
+ box-shadow: ${Xe};
71
72
  }
72
- .${R} > * {
73
+ .${S} > * {
73
74
  flex: 0 0 auto;
74
75
  min-width: 0;
75
76
  }
76
- .${R} > * + * {
77
- border-left: 1px solid ${Oe};
77
+ .${S} > * + * {
78
+ border-left: 1px solid ${Pe};
78
79
  }
79
- .${R}[data-snap='true'] {
80
+ .${S}[data-snap='true'] {
80
81
  scroll-snap-type: x proximity;
81
82
  }
82
- .${R}[data-snap='true'] > * {
83
+ .${S}[data-snap='true'] > * {
83
84
  scroll-snap-align: start;
84
85
  }
85
86
  @media (prefers-reduced-motion: reduce) {
86
- .${R} {
87
+ .${S} {
87
88
  scroll-behavior: auto;
88
89
  }
89
- .${R}[data-snap='true'] {
90
+ .${S}[data-snap='true'] {
90
91
  scroll-snap-type: none;
91
92
  }
92
- .${R}[data-snap='true'] > * {
93
+ .${S}[data-snap='true'] > * {
93
94
  scroll-snap-align: none;
94
95
  }
95
- }`, Be = "malachite-card-strip-style", Ge = "malachite-card-strip-add-slot", He = `
96
- .${R} > [${it}] {
96
+ }`, ze = "malachite-card-strip-style", Ye = "malachite-card-strip-add-slot", qe = `
97
+ .${S} > [${bt}] {
97
98
  display: flex;
98
99
  border-left: none;
99
100
  }
100
- [${it}] > .${g} {
101
+ [${bt}] > .${x} {
101
102
  height: 100% !important;
102
103
  padding: 0 !important;
103
104
  }
104
- `, Gt = () => typeof window > "u" || typeof window.matchMedia != "function" ? !0 : window.matchMedia("(prefers-reduced-motion: reduce)").matches, S = (e) => e.dataset.value ?? e.getAttribute("value"), ct = (e) => e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true", Kt = (e) => {
105
+ `, Ve = ["wheel", "touchstart", "pointerdown", "keydown"], Vt = () => typeof window > "u" || typeof window.matchMedia != "function" ? !0 : window.matchMedia("(prefers-reduced-motion: reduce)").matches, y = (e) => e.dataset.value ?? e.getAttribute("value"), ht = (e) => e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true", ne = (e) => {
105
106
  const a = e.parentElement;
106
- return a && a.querySelectorAll(G).length === 1 ? a : null;
107
- }, Xe = (e) => {
107
+ return a && a.querySelectorAll(U).length === 1 ? a : null;
108
+ }, Ke = (e) => {
108
109
  var a;
109
- return ((a = Kt(e)) == null ? void 0 : a.querySelector(Yt)) ?? null;
110
- }, We = (e, a) => {
111
- const s = e.closest(G);
112
- if (s)
113
- return s;
114
- if (e.closest(Yt) || e.closest(Vt))
110
+ return ((a = ne(e)) == null ? void 0 : a.querySelector(Zt)) ?? null;
111
+ }, je = (e, a) => {
112
+ const l = e.closest(U);
113
+ if (l)
114
+ return l;
115
+ if (e.closest(Zt) || e.closest(te))
115
116
  return null;
116
- let d = e;
117
- for (; d && a.contains(d); ) {
118
- const f = d.querySelectorAll(G);
119
- if (f.length === 1 && f[0].parentElement === d)
120
- return f[0];
121
- d = d.parentElement;
117
+ let f = e;
118
+ for (; f && a.contains(f); ) {
119
+ const p = f.querySelectorAll(U);
120
+ if (p.length === 1 && p[0].parentElement === f)
121
+ return p[0];
122
+ f = f.parentElement;
122
123
  }
123
124
  return null;
124
- }, ze = (e) => {
125
- var d;
126
- const a = Xe(e), s = (d = Kt(e)) == null ? void 0 : d.querySelectorAll(Vt);
125
+ }, Je = (e) => {
126
+ var f;
127
+ const a = Ke(e), l = (f = ne(e)) == null ? void 0 : f.querySelectorAll(te);
127
128
  return [
128
- ...a ? Array.from(a.querySelectorAll(Se)) : [],
129
- ...s ? Array.from(s) : []
129
+ ...a ? Array.from(a.querySelectorAll(gt)) : [],
130
+ ...l ? Array.from(l) : []
130
131
  ];
131
- }, Ye = (e) => {
132
- e.hasAttribute(B) || e.setAttribute(B, e.getAttribute("tabindex") ?? ""), e.setAttribute("tabindex", "-1");
133
- }, Ve = (e) => {
134
- if (!e.hasAttribute(B))
132
+ }, Qe = (e) => {
133
+ e.hasAttribute(q) || e.setAttribute(q, e.getAttribute("tabindex") ?? ""), e.setAttribute("tabindex", "-1");
134
+ }, Ze = (e) => {
135
+ if (!e.hasAttribute(q))
135
136
  return;
136
- const a = e.getAttribute(B);
137
- e.removeAttribute(B), a ? e.setAttribute("tabindex", a) : e.removeAttribute("tabindex");
138
- }, qe = {
137
+ const a = e.getAttribute(q);
138
+ e.removeAttribute(q), a ? e.setAttribute("tabindex", a) : e.removeAttribute("tabindex");
139
+ }, tr = {
139
140
  profile: "var(--malachite-selectable-card-selected-border, #047b43)",
140
141
  library: "var(--malachite-selectable-card-library-selected-border, #bbbbbb)",
141
142
  editing: "var(--malachite-selectable-card-pending-foreground, #96580a)"
142
- }, Me = {
143
+ }, er = {
143
144
  backgroundRepeat: "no-repeat",
144
145
  backgroundPosition: "left bottom",
145
- backgroundSize: `100% ${ft}px`
146
- }, Ht = 0.5, Xt = K - st, Ke = (e) => {
147
- const a = e.querySelector(`:scope > .${fe}`);
146
+ backgroundSize: `100% ${St}px`
147
+ }, Kt = 0.5, jt = rt - mt, rr = (e) => {
148
+ const a = e.querySelector(`:scope > .${_e}`);
148
149
  if (!a)
149
150
  return null;
150
- const { left: s, right: d } = a.getBoundingClientRect();
151
- return { left: s + Xt, right: d - Xt };
152
- }, je = (e, a, s, d) => {
151
+ const { left: l, right: f } = a.getBoundingClientRect();
152
+ return { left: l + jt, right: f - jt };
153
+ }, nr = (e, a, l, f) => {
153
154
  if (!e)
154
155
  return;
155
- const f = qe[d], $ = e.getBoundingClientRect(), I = $.left, _ = s && (a != null && a.contains(s)) ? a.getBoundingClientRect() : $, L = s == null ? void 0 : s.getBoundingClientRect(), m = s ? Ke(s) : null, J = (m == null ? void 0 : m.left) ?? (L ? L.left - st : 0), Q = (m == null ? void 0 : m.right) ?? (L ? L.right + st : 0), P = L ? Math.max(J, _.left) + Ht - I : 0, b = L ? Math.min(Q, _.right) - Ht - I : 0;
156
- e.style.backgroundImage = b > P ? `linear-gradient(to right, ${f} 0 ${P}px, transparent ${P}px ${b}px, ${f} ${b}px 100%)` : `linear-gradient(to right, ${f} 0 100%)`;
157
- }, Je = {
158
- marginInline: `calc(${Dt} * -1)`,
159
- paddingInline: Dt
160
- }, pt = {
161
- background: lt,
162
- borderRadius: $e,
163
- paddingTop: `${w}px`,
164
- paddingInline: `${w}px`,
165
- marginBottom: `${ft}px`
166
- }, Qe = {
167
- ...pt,
168
- marginInline: `${H}px`
169
- }, Ze = pt, tr = pt, er = {
170
- marginInlineStart: `${H}px`
171
- }, rr = {
156
+ const p = tr[f], w = e.getBoundingClientRect(), B = w.left, E = l && (a != null && a.contains(l)) ? a.getBoundingClientRect() : w, v = l == null ? void 0 : l.getBoundingClientRect(), _ = l ? rr(l) : null, ot = (_ == null ? void 0 : _.left) ?? (v ? v.left - mt : 0), at = (_ == null ? void 0 : _.right) ?? (v ? v.right + mt : 0), H = v ? Math.max(ot, E.left) + Kt - B : 0, A = v ? Math.min(at, E.right) - Kt - B : 0;
157
+ e.style.backgroundImage = A > H ? `linear-gradient(to right, ${p} 0 ${H}px, transparent ${H}px ${A}px, ${p} ${A}px 100%)` : `linear-gradient(to right, ${p} 0 100%)`;
158
+ }, or = {
159
+ marginInline: `calc(${Pt} * -1)`,
160
+ paddingInline: Pt
161
+ }, xt = {
162
+ background: Rt,
163
+ borderRadius: Ie,
164
+ paddingTop: `${k}px`,
165
+ paddingInline: `${k}px`,
166
+ marginBottom: `${St}px`
167
+ }, ar = {
168
+ ...xt,
169
+ marginInline: `${V}px`
170
+ }, cr = xt, sr = xt, ir = {
171
+ marginInlineStart: `${V}px`
172
+ }, lr = {
172
173
  primary: {
173
- backgroundColor: Pe,
174
- color: ke
174
+ backgroundColor: He,
175
+ color: Ge
175
176
  },
176
- secondary: { backgroundColor: Ce, color: Ie }
177
- }, jt = ({
177
+ secondary: { backgroundColor: Ue, color: Be }
178
+ }, oe = ({
178
179
  label: e,
179
180
  icon: a,
180
- onClick: s,
181
- disabled: d = !1,
182
- emphasis: f = "secondary",
183
- className: $ = ""
184
- }) => /* @__PURE__ */ h(
181
+ onClick: l,
182
+ disabled: f = !1,
183
+ emphasis: p = "secondary",
184
+ className: w = ""
185
+ }) => /* @__PURE__ */ m(
185
186
  "div",
186
187
  {
187
- className: g,
188
- "data-emphasis": f,
188
+ className: x,
189
+ "data-emphasis": p,
189
190
  style: {
190
- ...Ze,
191
- width: `${ut}px`,
192
- height: `calc(100% - ${ft}px)`
191
+ ...cr,
192
+ width: `${At}px`,
193
+ height: `calc(100% - ${St}px)`
193
194
  },
194
- children: /* @__PURE__ */ h("div", { className: "flex h-full items-center justify-center px-4", children: /* @__PURE__ */ U(
195
+ children: /* @__PURE__ */ m("div", { className: "flex h-full items-center justify-center px-4", children: /* @__PURE__ */ N(
195
196
  "button",
196
197
  {
197
198
  type: "button",
198
- onClick: s,
199
- disabled: d,
200
- style: rr[f],
201
- className: `${Re} inline-flex items-center justify-center gap-1.5 h-[var(--malachite-control-height-medium,32px)] w-[108px] px-2.5 rounded-xl border border-solid text-[length:var(--malachite-font-size-small,13px)] font-medium whitespace-nowrap ${d ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${$}`,
199
+ onClick: l,
200
+ disabled: f,
201
+ style: lr[p],
202
+ className: `${Te} inline-flex items-center justify-center gap-1.5 h-[var(--malachite-control-height-medium,32px)] w-[108px] px-2.5 rounded-xl border border-solid text-[length:var(--malachite-font-size-small,13px)] font-medium whitespace-nowrap ${f ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${w}`,
202
203
  children: [
203
- /* @__PURE__ */ h("span", { className: "inline-flex h-[13px] w-[13px] shrink-0 items-center justify-center", children: a ?? /* @__PURE__ */ h(le, { size: 13 }) }),
204
+ /* @__PURE__ */ m("span", { className: "inline-flex h-[13px] w-[13px] shrink-0 items-center justify-center", children: a ?? /* @__PURE__ */ m(be, { size: 13 }) }),
204
205
  e
205
206
  ]
206
207
  }
207
208
  ) })
208
209
  }
209
- ), dt = (e) => C.isValidElement(e) && e.type === jt, nr = (e) => C.isValidElement(e) && e.type === C.Fragment && C.Children.toArray(e.props.children).some(dt), Wt = ({ side: e, onClick: a }) => /* @__PURE__ */ h(
210
+ ), _t = (e) => F.isValidElement(e) && e.type === oe, dr = (e) => F.isValidElement(e) && e.type === F.Fragment && F.Children.toArray(e.props.children).some(_t), Jt = ({ side: e, onClick: a }) => /* @__PURE__ */ m(
210
211
  "button",
211
212
  {
212
213
  type: "button",
@@ -216,291 +217,346 @@ const ge = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "Arrow
216
217
  onClick: a,
217
218
  className: "absolute top-1/2 -translate-y-1/2 z-10 inline-flex items-center justify-center w-5 h-5 rounded-lg cursor-pointer text-[var(--malachite-text-secondary)]",
218
219
  style: {
219
- [e]: `-${ye}px`,
220
- background: Le,
221
- border: `1px solid ${Ee}`,
222
- boxShadow: qt
220
+ [e]: `-${ke}px`,
221
+ background: Oe,
222
+ border: `1px solid ${we}`,
223
+ boxShadow: ee
223
224
  },
224
- children: e === "left" ? /* @__PURE__ */ h(se, { size: Ct }) : /* @__PURE__ */ h(ie, { size: Ct })
225
+ children: e === "left" ? /* @__PURE__ */ m(he, { size: Bt }) : /* @__PURE__ */ m(me, { size: Bt })
225
226
  }
226
- ), or = ({
227
+ ), ur = ({
227
228
  value: e,
228
229
  tone: a,
229
- onChange: s,
230
- children: d,
231
- leading: f,
232
- arrows: $ = !0,
233
- fadeEdges: I = !0,
234
- snap: _ = !0,
235
- bleed: L = !1,
236
- scrollSelectedIntoView: m = !0,
237
- "aria-label": J,
238
- "aria-labelledby": Q,
239
- className: P = "",
240
- style: b
230
+ onChange: l,
231
+ children: f,
232
+ leading: p,
233
+ arrows: w = !0,
234
+ fadeEdges: B = !0,
235
+ snap: E = !0,
236
+ bleed: v = !1,
237
+ scrollSelectedIntoView: _ = !0,
238
+ "aria-label": ot,
239
+ "aria-labelledby": at,
240
+ className: H = "",
241
+ style: A
241
242
  }) => {
242
- const y = T(null), ht = T(null), k = T(null), mt = T(!1), [X, Jt] = q({ canScrollLeft: !1, canScrollRight: !1 }), [Qt, bt] = q(!1), W = T(null), Rt = T(!1);
243
- wt(y, Ue, Be), wt(y, He, Ge);
244
- const Z = C.Children.toArray(d), tt = Z.filter((t) => !dt(t)), Zt = tt.some(nr), D = tt.length > 0, z = Z.filter(dt).map(
245
- (t) => t.props.emphasis === void 0 ? C.cloneElement(t, { emphasis: D ? "secondary" : "primary" }) : t
246
- ), gt = Z.length, et = z.length;
247
- v(() => {
248
- const t = y.current;
249
- if (!t || !D || et === 0) {
250
- bt(!1);
243
+ const C = $(null), G = $(null), X = $(null), [K, ae] = Y({ canScrollLeft: !1, canScrollRight: !1 }), [Et, j] = Y("roomy"), P = $({ pinned: 0, inTrack: 0 }), J = $(null), Q = $(null), Lt = $(null), [b] = Y(xe);
244
+ Ut(C, Me, ze), Ut(C, qe, Ye);
245
+ const ct = F.Children.toArray(f), st = ct.filter((t) => !_t(t)), ce = st.some(dr), O = st.length > 0, Z = ct.filter(_t).map(
246
+ (t) => t.props.emphasis === void 0 ? F.cloneElement(t, { emphasis: O ? "secondary" : "primary" }) : t
247
+ ), Tt = ct.length, it = Z.length, W = !!p, L = Et === "unpinned" && O && W, lt = Et !== "roomy" && O;
248
+ I(() => {
249
+ const t = C.current;
250
+ if (!t || !O || it === 0 && !W) {
251
+ j("roomy");
251
252
  return;
252
253
  }
253
- const r = ht.current, { paddingLeft: o, paddingRight: i } = getComputedStyle(t), l = (parseFloat(o) || 0) + (parseFloat(i) || 0);
254
- let u = t.clientWidth - l, p = (r == null ? void 0 : r.offsetWidth) ?? 0;
255
- const n = () => {
256
- const O = p + et * ut + De;
257
- bt(u > 0 && u < O);
254
+ const r = G.current;
255
+ W ? r && (P.current.pinned = r.offsetWidth) : P.current.pinned = 0;
256
+ const { paddingLeft: c, paddingRight: o } = getComputedStyle(t), s = (parseFloat(c) || 0) + (parseFloat(o) || 0);
257
+ let d = t.clientWidth - s;
258
+ const i = () => {
259
+ const { pinned: u } = P.current;
260
+ if (d <= 0)
261
+ j("roomy");
262
+ else if (W && d < u + Wt)
263
+ j("unpinned");
264
+ else {
265
+ const R = u + it * At + Wt;
266
+ j(d < R ? "cramped" : "roomy");
267
+ }
258
268
  };
259
- n();
260
- const c = typeof ResizeObserver < "u" ? new ResizeObserver((O) => {
261
- var E, yt;
262
- for (const V of O ?? [])
263
- V.target === t ? u = V.contentRect.width : p = ((yt = (E = V.borderBoxSize) == null ? void 0 : E[0]) == null ? void 0 : yt.inlineSize) ?? V.contentRect.width + 2 * w;
264
- n();
269
+ i();
270
+ const n = typeof ResizeObserver < "u" ? new ResizeObserver((u) => {
271
+ var R, h;
272
+ for (const g of u ?? [])
273
+ g.target === t ? d = g.contentRect.width : P.current.pinned = ((h = (R = g.borderBoxSize) == null ? void 0 : R[0]) == null ? void 0 : h.inlineSize) ?? g.contentRect.width + 2 * k;
274
+ i();
265
275
  }) : null;
266
- return c == null || c.observe(t), r && (c == null || c.observe(r)), () => c == null ? void 0 : c.disconnect();
267
- }, [D, et, !!f]);
268
- const rt = Qt && D, _t = x((t) => {
269
- var o;
270
- const r = t.type === "focus" ? t.target : t.relatedTarget;
271
- Rt.current = !!(r instanceof Node && ((o = W.current) != null && o.contains(r)));
276
+ return n == null || n.observe(t), r && (n == null || n.observe(r)), () => n == null ? void 0 : n.disconnect();
277
+ }, [O, it, W, L]);
278
+ const yt = D((t) => {
279
+ const r = t.type === "focus" ? t.target : t.relatedTarget, c = [
280
+ { slot: "add", host: J.current },
281
+ { slot: "leading", host: G.current },
282
+ { slot: "leading", host: Q.current }
283
+ ], o = r instanceof HTMLElement ? c.find(({ host: s }) => s == null ? void 0 : s.contains(r)) : void 0;
284
+ Lt.current = o != null && o.host ? {
285
+ slot: o.slot,
286
+ index: Array.from(o.host.querySelectorAll(gt)).indexOf(
287
+ r
288
+ )
289
+ } : null;
272
290
  }, []);
273
- v(() => {
274
- var o;
275
- const t = W.current, r = t ? t.getRootNode().activeElement : null;
276
- Rt.current && t && !(r && t.contains(r)) && ((o = t.querySelector("button")) == null || o.focus({ preventScroll: !0 }));
277
- }, [rt]);
278
- const A = x(() => {
279
- const t = y.current;
280
- return t ? Array.from(t.querySelectorAll(G)) : [];
281
- }, []), nt = T(null), [At, te] = q(0);
282
- v(() => {
283
- const t = JSON.stringify(A().map(S));
284
- nt.current !== null && nt.current !== t && te((r) => r + 1), nt.current = t;
291
+ I(() => {
292
+ const t = Lt.current;
293
+ if (!t)
294
+ return;
295
+ const r = t.slot === "add" ? J.current : L ? Q.current : G.current, c = r ? r.getRootNode().activeElement : null;
296
+ if (!r || c && r.contains(c))
297
+ return;
298
+ const o = r.querySelectorAll(gt)[t.index] ?? r.querySelector(t.slot === "add" ? "button" : U);
299
+ o == null || o.focus({ preventScroll: !0 });
300
+ }, [lt, L]);
301
+ const T = D(() => {
302
+ const t = C.current;
303
+ return t ? Array.from(t.querySelectorAll(U)) : [];
304
+ }, []), dt = $(null), [$t, se] = Y(0);
305
+ I(() => {
306
+ const t = JSON.stringify(T().map(y));
307
+ dt.current !== null && dt.current !== t && se((r) => r + 1), dt.current = t;
285
308
  });
286
- const ot = x(
287
- () => A().filter((t) => S(t) !== null),
288
- [A]
289
- ), St = T(/* @__PURE__ */ new Set()), N = x((t, r) => {
290
- St.current.has(t) || (St.current.add(t), console.warn(r));
291
- }, []), [ee, re] = q("profile");
292
- v(() => {
293
- var r, o;
294
- const t = (o = (r = A().find((i) => S(i) === e)) == null ? void 0 : r.parentElement) == null ? void 0 : o.getAttribute("data-variant");
295
- (t === "profile" || t === "library" || t === "editing") && re(t);
296
- }, [A, e]), v(() => {
297
- const t = A(), r = ot(), i = r.find((n) => S(n) === e) ?? r.find((n) => !ct(n)) ?? null;
309
+ const ut = D(
310
+ () => T().filter((t) => y(t) !== null),
311
+ [T]
312
+ ), Dt = $(/* @__PURE__ */ new Set()), M = D((t, r) => {
313
+ Dt.current.has(t) || (Dt.current.add(t), console.warn(r));
314
+ }, []), [ie, le] = Y("profile");
315
+ I(() => {
316
+ var r, c;
317
+ const t = (c = (r = T().find((o) => y(o) === e)) == null ? void 0 : r.parentElement) == null ? void 0 : c.getAttribute("data-variant");
318
+ (t === "profile" || t === "library" || t === "editing") && le(t);
319
+ }, [T, e]), I(() => {
320
+ const t = T(), r = ut(), o = r.find((n) => y(n) === e) ?? r.find((n) => !ht(n)) ?? null;
298
321
  if (t.forEach((n) => {
299
- const c = n === i, O = c ? 0 : -1;
300
- n.tabIndex !== O && (n.tabIndex = O);
301
- for (const E of ze(n))
302
- c ? Ve(E) : Ye(E);
322
+ const u = n === o, R = u ? 0 : -1;
323
+ n.tabIndex !== R && (n.tabIndex = R);
324
+ for (const h of Je(n))
325
+ u ? Ze(h) : Qe(h);
303
326
  }), process.env.NODE_ENV === "production")
304
327
  return;
305
- r.length !== t.length && N(
328
+ r.length !== t.length && M(
306
329
  "missing-value",
307
330
  'CardStrip: a child with role="radio" has no `data-value`. It cannot be selected or reached by arrow keys, so it is excluded from the radio set. Give every card a `data-value`.'
308
331
  );
309
- const l = /* @__PURE__ */ new Set();
332
+ const s = /* @__PURE__ */ new Set();
310
333
  for (const n of r) {
311
- const c = S(n);
312
- c !== null && (l.has(c) && N(
313
- `duplicate:${c}`,
314
- `CardStrip: two cards share the data-value "${c}". Both will read as checked and only the first is selectable — data-value must be unique.`
315
- ), l.add(c));
334
+ const u = y(n);
335
+ u !== null && (s.has(u) && M(
336
+ `duplicate:${u}`,
337
+ `CardStrip: two cards share the data-value "${u}". Both will read as checked and only the first is selectable — data-value must be unique.`
338
+ ), s.add(u));
316
339
  }
317
- const u = e !== "";
318
- t.length > 0 && u && !l.has(e) && N(
340
+ const d = e !== "";
341
+ t.length > 0 && d && !s.has(e) && M(
319
342
  `unmatched:${e}`,
320
343
  `CardStrip: value "${e}" matches no card's data-value, so the group reports no selection.`
321
344
  );
322
- const p = t.filter(
345
+ const i = t.filter(
323
346
  (n) => n.getAttribute("aria-checked") === "true"
324
347
  ).length;
325
- t.length > 0 && u && p !== 1 && N(
326
- `checked:${p}`,
327
- `CardStrip: ${p} cards are aria-checked, but a radiogroup has exactly one. Drive each card's checked state from the strip's \`value\`.`
328
- ), Zt && N(
348
+ t.length > 0 && d && i !== 1 && M(
349
+ `checked:${i}`,
350
+ `CardStrip: ${i} cards are aria-checked, but a radiogroup has exactly one. Drive each card's checked state from the strip's \`value\`.`
351
+ ), ce && M(
329
352
  "wrapped-add-tile",
330
353
  "CardStrip: a CardStrip.AddTile inside a fragment is treated as a card and scrolls with them. The add tile must be a direct child of CardStrip."
331
354
  );
332
355
  });
333
- const F = x(() => {
334
- const t = A().find((r) => S(r) === e);
356
+ const z = D(() => {
357
+ const t = T().find((r) => y(r) === e);
335
358
  return t ? t.closest('[role="radio"]') ?? t : null;
336
- }, [A, e]);
337
- v(() => {
338
- if (!m)
359
+ }, [T, e]);
360
+ I(() => {
361
+ if (!_)
339
362
  return;
340
- const t = k.current, r = F();
341
- if (!t || !r || typeof t.scrollTo != "function")
363
+ const t = X.current;
364
+ if (!t || typeof t.scrollTo != "function")
342
365
  return;
343
- const o = mt.current;
344
- mt.current = !0;
345
- const i = Ot(t, r, _);
346
- i !== null && t.scrollTo({
347
- left: i,
348
- behavior: o && !Gt() ? "smooth" : "instant"
349
- });
350
- }, [F, m, _, gt, At]);
351
- const xt = a ?? ee, Lt = (b == null ? void 0 : b.background) !== void 0 || (b == null ? void 0 : b.backgroundImage) !== void 0, Y = x(() => {
352
- var p;
353
- const t = k.current;
354
- if (Lt || je(
355
- y.current,
366
+ const r = b.leadingMoved(L), c = b.newSelection(e);
367
+ if (r) {
368
+ const i = Q.current, n = i == null ? void 0 : i.nextElementSibling;
369
+ L && i && n && (P.current.inTrack = n.getBoundingClientRect().left - i.getBoundingClientRect().left);
370
+ const { inTrack: u } = P.current, R = L ? u : -u, h = b.keptFor(R);
371
+ if (R !== 0 && h !== t.scrollLeft && t.scrollTo({ left: h, behavior: "instant" }), !c && !b.selectionShowing())
372
+ return;
373
+ }
374
+ const o = z();
375
+ if (!o)
376
+ return;
377
+ const s = b.firstPlacement(), d = Nt(t, o, E);
378
+ if (d !== null) {
379
+ const i = !s && !r && !Vt();
380
+ t.scrollTo({ left: d, behavior: i ? "smooth" : "instant" }), b.revealing(Math.min(d, t.scrollWidth - t.clientWidth), i);
381
+ }
382
+ }, [
383
+ b,
384
+ e,
385
+ z,
386
+ _,
387
+ E,
388
+ Tt,
389
+ $t,
390
+ L
391
+ ]);
392
+ const vt = a ?? ie, Ot = (A == null ? void 0 : A.background) !== void 0 || (A == null ? void 0 : A.backgroundImage) !== void 0, tt = D(() => {
393
+ var i;
394
+ const t = X.current;
395
+ if (Ot || nr(
396
+ C.current,
356
397
  t,
357
- (p = A().find((n) => S(n) === e)) == null ? void 0 : p.parentElement,
358
- xt
398
+ (i = T().find((n) => y(n) === e)) == null ? void 0 : i.parentElement,
399
+ vt
359
400
  ), !t)
360
401
  return;
361
- const { scrollWidth: r, clientWidth: o, scrollLeft: i } = t, l = r > o + at, u = {
362
- canScrollLeft: l && i > at,
363
- canScrollRight: l && i + o < r - at
402
+ const { scrollWidth: r, clientWidth: c, scrollLeft: o } = t, s = r > c + pt, d = {
403
+ canScrollLeft: s && o > pt,
404
+ canScrollRight: s && o + c < r - pt
364
405
  };
365
- Jt(
366
- (n) => n.canScrollLeft === u.canScrollLeft && n.canScrollRight === u.canScrollRight ? n : u
406
+ ae(
407
+ (n) => n.canScrollLeft === d.canScrollLeft && n.canScrollRight === d.canScrollRight ? n : d
367
408
  );
368
- }, [Lt, A, xt, e]);
369
- v(() => {
370
- Y();
371
- const t = k.current;
409
+ }, [Ot, T, vt, e]);
410
+ I(() => {
411
+ tt();
412
+ const t = X.current;
372
413
  if (!t)
373
414
  return;
374
415
  const r = () => {
375
- const c = F();
376
- return c !== null && he(t, c);
377
- };
378
- let o = r();
379
- const i = () => {
380
- Y(), o = r();
381
- };
382
- t.addEventListener("scroll", i, { passive: !0 });
383
- let l = 0;
416
+ var ft;
417
+ const g = z();
418
+ return g !== null && (Se(t, g) || !!((ft = G.current) != null && ft.contains(g)));
419
+ }, c = () => b.settle(t.scrollLeft, r());
420
+ b.travelling() || c();
421
+ const o = () => {
422
+ tt(), b.scrolled(t.scrollLeft, r);
423
+ }, s = () => b.tookOver(), d = new AbortController(), i = { passive: !0, signal: d.signal };
424
+ t.addEventListener("scroll", o, i);
425
+ for (const g of Ve)
426
+ t.addEventListener(g, s, i);
427
+ let n = 0;
384
428
  const u = () => {
385
- const c = F(), E = m && o && typeof t.scrollTo == "function" && c ? Ot(t, c, _) : null;
386
- E !== null && t.scrollTo({ left: E, behavior: "instant" }), o = r();
387
- }, p = () => {
388
- if (Y(), typeof requestAnimationFrame != "function") {
429
+ const g = z(), kt = _ && b.selectionShowing() && typeof t.scrollTo == "function" && g ? Nt(t, g, E) : null;
430
+ kt !== null && t.scrollTo({ left: kt, behavior: "instant" }), c();
431
+ }, R = () => {
432
+ if (tt(), typeof requestAnimationFrame != "function") {
389
433
  u();
390
434
  return;
391
435
  }
392
- cancelAnimationFrame(l), l = requestAnimationFrame(u);
393
- }, n = typeof ResizeObserver < "u" ? new ResizeObserver(p) : null;
394
- return n == null || n.observe(t), () => {
395
- t.removeEventListener("scroll", i), n == null || n.disconnect(), typeof cancelAnimationFrame == "function" && cancelAnimationFrame(l);
436
+ cancelAnimationFrame(n), n = requestAnimationFrame(u);
437
+ }, h = typeof ResizeObserver < "u" ? new ResizeObserver(R) : null;
438
+ return h == null || h.observe(t), () => {
439
+ d.abort(), h == null || h.disconnect(), typeof cancelAnimationFrame == "function" && cancelAnimationFrame(n);
396
440
  };
397
- }, [Y, F, m, _, gt, At]);
398
- const Et = x(
441
+ }, [
442
+ tt,
443
+ b,
444
+ z,
445
+ _,
446
+ E,
447
+ Tt,
448
+ $t,
449
+ L
450
+ ]);
451
+ const wt = D(
399
452
  (t) => {
400
- const r = k.current;
453
+ const r = X.current;
401
454
  !r || typeof r.scrollBy != "function" || r.scrollBy({
402
- left: pe(r, t, _) - r.scrollLeft,
403
- behavior: Gt() ? "auto" : "smooth"
455
+ left: Ae(r, t, E) - r.scrollLeft,
456
+ behavior: Vt() ? "auto" : "smooth"
404
457
  });
405
458
  },
406
- [_]
407
- ), ne = x(
459
+ [E]
460
+ ), de = D(
408
461
  (t) => {
409
- if (!ge.has(t.key))
462
+ if (!ye.has(t.key))
410
463
  return;
411
464
  const r = t.target;
412
- if (!(r instanceof Element) || !r.closest(G))
465
+ if (!(r instanceof Element) || !r.closest(U))
413
466
  return;
414
- const o = ot().filter((n) => !ct(n));
415
- if (o.length === 0)
467
+ const c = ut().filter((n) => !ht(n));
468
+ if (c.length === 0)
416
469
  return;
417
470
  t.preventDefault();
418
- const i = o.findIndex((n) => S(n) === e);
419
- let l;
471
+ const o = c.findIndex((n) => y(n) === e);
472
+ let s;
420
473
  if (t.key === "Home")
421
- l = 0;
474
+ s = 0;
422
475
  else if (t.key === "End")
423
- l = o.length - 1;
476
+ s = c.length - 1;
424
477
  else {
425
478
  const n = t.key === "ArrowLeft" || t.key === "ArrowUp" ? -1 : 1;
426
- l = ((i === -1 ? 0 : i) + n + o.length) % o.length;
479
+ s = ((o === -1 ? 0 : o) + n + c.length) % c.length;
427
480
  }
428
- const u = o[l], p = S(u);
429
- p !== null && p !== e && s(p), u.focus();
481
+ const d = c[s], i = y(d);
482
+ i !== null && i !== e && l(i), d.focus();
430
483
  },
431
- [ot, s, e]
432
- ), oe = x(
484
+ [ut, l, e]
485
+ ), ue = D(
433
486
  (t) => {
434
487
  const r = t.target;
435
- if (!(r instanceof Element) || r.closest(`.${g}`))
488
+ if (!(r instanceof Element) || r.closest(`.${x}`))
436
489
  return;
437
- const o = y.current;
438
- if (!o)
490
+ const c = C.current;
491
+ if (!c)
439
492
  return;
440
- const i = We(r, o);
441
- if (!i || ct(i))
493
+ const o = je(r, c);
494
+ if (!o || ht(o))
442
495
  return;
443
- const l = S(i);
444
- l !== null && l !== e && s(l);
496
+ const s = y(o);
497
+ s !== null && s !== e && l(s);
445
498
  },
446
- [s, e]
447
- ), ae = $ && X.canScrollLeft, ce = $ && X.canScrollRight, Tt = I && X.canScrollLeft, $t = I && X.canScrollRight;
448
- return /* @__PURE__ */ U(
499
+ [l, e]
500
+ ), fe = w && K.canScrollLeft, pe = w && K.canScrollRight, Ct = B && K.canScrollLeft, It = B && K.canScrollRight;
501
+ return /* @__PURE__ */ N(
449
502
  "div",
450
503
  {
451
- ref: y,
452
- onKeyDown: ne,
453
- onFocus: _t,
454
- onBlur: _t,
455
- onClick: oe,
456
- className: `${j} flex items-stretch ${P}`,
504
+ ref: C,
505
+ onKeyDown: de,
506
+ onFocus: yt,
507
+ onBlur: yt,
508
+ onClick: ue,
509
+ className: `${nt} flex items-stretch ${H}`,
457
510
  style: {
458
- ...Me,
459
- ...L ? Je : null,
460
- ...b
511
+ ...er,
512
+ ...v ? or : null,
513
+ ...A
461
514
  },
462
515
  children: [
463
- /* @__PURE__ */ U(
516
+ /* @__PURE__ */ N(
464
517
  "div",
465
518
  {
466
519
  role: "radiogroup",
467
- "aria-label": J,
468
- "aria-labelledby": Q,
469
- className: D ? "flex items-stretch min-w-0" : "flex items-stretch",
520
+ "aria-label": ot,
521
+ "aria-labelledby": at,
522
+ className: O ? "flex items-stretch min-w-0" : "flex items-stretch",
470
523
  children: [
471
- f ? /* @__PURE__ */ h(vt.Provider, { value: me, children: /* @__PURE__ */ h("div", { ref: ht, className: "shrink-0", style: tr, children: f }) }) : null,
472
- D ? /* @__PURE__ */ U(
524
+ p && !L ? /* @__PURE__ */ m(Ft.Provider, { value: Ee, children: /* @__PURE__ */ m("div", { ref: G, className: "shrink-0", style: sr, children: p }) }) : null,
525
+ O ? /* @__PURE__ */ N(
473
526
  "div",
474
527
  {
475
- [Ae]: "",
528
+ [De]: "",
476
529
  className: "relative min-w-0 shrink basis-auto",
477
- style: Qe,
530
+ style: ar,
478
531
  children: [
479
- /* @__PURE__ */ U(
532
+ /* @__PURE__ */ N(
480
533
  "div",
481
534
  {
482
- ref: k,
535
+ ref: X,
483
536
  tabIndex: -1,
484
- [_e]: "",
485
- "data-snap": _ ? "true" : "false",
486
- className: R,
537
+ [$e]: "",
538
+ "data-snap": E ? "true" : "false",
539
+ className: S,
487
540
  children: [
488
- /* @__PURE__ */ h(vt.Provider, { value: be, children: tt }),
489
- rt ? /* @__PURE__ */ h("div", { ref: W, [it]: "", children: z }) : null
541
+ /* @__PURE__ */ N(Ft.Provider, { value: Le, children: [
542
+ L ? /* @__PURE__ */ m("div", { ref: Q, className: "flex", children: p }) : null,
543
+ st
544
+ ] }),
545
+ lt ? /* @__PURE__ */ m("div", { ref: J, [bt]: "", children: Z }) : null
490
546
  ]
491
547
  }
492
548
  ),
493
- ae ? /* @__PURE__ */ h(Wt, { side: "left", onClick: () => Et(-1) }) : null,
494
- ce ? /* @__PURE__ */ h(Wt, { side: "right", onClick: () => Et(1) }) : null,
495
- Tt || $t ? /* @__PURE__ */ h(
549
+ fe ? /* @__PURE__ */ m(Jt, { side: "left", onClick: () => wt(-1) }) : null,
550
+ pe ? /* @__PURE__ */ m(Jt, { side: "right", onClick: () => wt(1) }) : null,
551
+ Ct || It ? /* @__PURE__ */ m(
496
552
  "div",
497
553
  {
498
554
  "aria-hidden": !0,
499
555
  "data-card-strip-fade": "",
500
- className: `${zt} absolute pointer-events-none`,
556
+ className: `${Qt} absolute pointer-events-none`,
501
557
  style: {
502
- inset: `-${w}px -${Mt}px 0`,
503
- background: `linear-gradient(to right, ${Tt ? Nt : "transparent"} 0, transparent ${kt}px, transparent calc(100% - ${kt}px), ${$t ? Nt : "transparent"} 100%)`
558
+ inset: `-${k}px -${re}px 0`,
559
+ background: `linear-gradient(to right, ${Ct ? Mt : "transparent"} 0, transparent ${Xt}px, transparent calc(100% - ${Xt}px), ${It ? Mt : "transparent"} 100%)`
504
560
  }
505
561
  }
506
562
  ) : null
@@ -510,22 +566,22 @@ const ge = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "Arrow
510
566
  ]
511
567
  }
512
568
  ),
513
- z.length > 0 && !rt ? /* @__PURE__ */ h(
569
+ Z.length > 0 && !lt ? /* @__PURE__ */ m(
514
570
  "div",
515
571
  {
516
- ref: W,
572
+ ref: J,
517
573
  className: "shrink-0",
518
- style: !D && f ? er : void 0,
519
- children: z
574
+ style: !O && p ? ir : void 0,
575
+ children: Z
520
576
  }
521
577
  ) : null
522
578
  ]
523
579
  }
524
580
  );
525
581
  };
526
- or.AddTile = jt;
582
+ ur.AddTile = oe;
527
583
  export {
528
- or as CardStrip,
529
- or as default
584
+ ur as CardStrip,
585
+ ur as default
530
586
  };
531
587
  //# sourceMappingURL=CardStrip.js.map