@jack.winter/pancake-ui 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ var d = Object.freeze({
34
34
  space40: 40,
35
35
  space8: 8
36
36
  }), p = Object.freeze({
37
+ radius4: 4,
37
38
  radius12: 12,
38
39
  radius16: 16,
39
40
  radius20: 20,
@@ -66,6 +67,7 @@ var d = Object.freeze({
66
67
  size104: 104,
67
68
  size112: 112,
68
69
  size320: 320,
70
+ size480: 480,
69
71
  size560: 560
70
72
  }), h = Object.freeze({
71
73
  borderDefault: 1,
@@ -73,89 +75,89 @@ var d = Object.freeze({
73
75
  }), g = Object.freeze({
74
76
  opacityDisabled: .4,
75
77
  opacityOverlay: .5
76
- }), _ = (e) => Object.freeze(e), v = Object.freeze({
77
- body: _({
78
- fontFamily: "Inter, sans-serif",
78
+ }), _ = "Inter, sans-serif", v = (e) => Object.freeze(e), y = Object.freeze({
79
+ body: v({
80
+ fontFamily: _,
79
81
  fontSize: 14,
80
82
  fontWeight: "400",
81
83
  fontStyle: "normal",
82
- lineHeight: "16.8px",
84
+ lineHeight: "20px",
83
85
  letterSpacing: 0
84
86
  }),
85
- bodyStrong: _({
86
- fontFamily: "Inter, sans-serif",
87
- fontSize: 15,
87
+ bodyStrong: v({
88
+ fontFamily: _,
89
+ fontSize: 14,
88
90
  fontWeight: "600",
89
91
  fontStyle: "normal",
90
- lineHeight: "18px",
92
+ lineHeight: "20px",
91
93
  letterSpacing: 0
92
94
  }),
93
- caption: _({
94
- fontFamily: "Inter, sans-serif",
95
- fontSize: 11,
95
+ caption: v({
96
+ fontFamily: _,
97
+ fontSize: 12,
96
98
  fontWeight: "400",
97
99
  fontStyle: "normal",
98
- lineHeight: "13.2px",
100
+ lineHeight: "16px",
99
101
  letterSpacing: 0
100
102
  }),
101
- display: _({
102
- fontFamily: "Inter, sans-serif",
103
+ display: v({
104
+ fontFamily: _,
103
105
  fontSize: 28,
104
106
  fontWeight: "700",
105
107
  fontStyle: "normal",
106
- lineHeight: "33.6px",
108
+ lineHeight: "36px",
107
109
  letterSpacing: 0
108
110
  }),
109
- heading: _({
110
- fontFamily: "Inter, sans-serif",
111
+ heading: v({
112
+ fontFamily: _,
111
113
  fontSize: 18,
112
114
  fontWeight: "700",
113
115
  fontStyle: "normal",
114
- lineHeight: "21.6px",
116
+ lineHeight: "24px",
115
117
  letterSpacing: 0
116
118
  }),
117
- label: _({
118
- fontFamily: "Inter, sans-serif",
119
+ label: v({
120
+ fontFamily: _,
119
121
  fontSize: 12,
120
122
  fontWeight: "600",
121
123
  fontStyle: "normal",
122
- lineHeight: "14.4px",
124
+ lineHeight: "16px",
123
125
  letterSpacing: 0
124
126
  }),
125
- micro: _({
126
- fontFamily: "Inter, sans-serif",
127
+ micro: v({
128
+ fontFamily: _,
127
129
  fontSize: 10,
128
130
  fontWeight: "600",
129
131
  fontStyle: "normal",
130
132
  lineHeight: "12px",
131
133
  letterSpacing: 0
132
134
  }),
133
- section: _({
134
- fontFamily: "Inter, sans-serif",
135
+ section: v({
136
+ fontFamily: _,
135
137
  fontSize: 20,
136
138
  fontWeight: "700",
137
139
  fontStyle: "normal",
138
- lineHeight: "24px",
140
+ lineHeight: "28px",
139
141
  letterSpacing: 0
140
142
  }),
141
- title: _({
142
- fontFamily: "Inter, sans-serif",
143
- fontSize: 25,
143
+ title: v({
144
+ fontFamily: _,
145
+ fontSize: 24,
144
146
  fontWeight: "700",
145
147
  fontStyle: "normal",
146
- lineHeight: "30px",
148
+ lineHeight: "32px",
147
149
  letterSpacing: 0
148
150
  })
149
151
  });
150
152
  // src/components/Surface/Surface.tsx
151
- function y({ className: e = "", ...n }) {
153
+ function b({ className: e = "", ...n }) {
152
154
  return /* @__PURE__ */ t("div", {
153
155
  className: `pancake-surface ${e}`,
154
156
  ...n
155
157
  });
156
158
  }
157
159
  // src/components/Button/Button.tsx
158
- function b({ variant: e = "primary", size: r = 48, loading: i = !1, disabled: a = !1, type: o = "button", className: s = "", children: c, ...l }) {
160
+ function x({ variant: e = "primary", size: r = 36, loading: i = !1, disabled: a = !1, type: o = "button", className: s = "", children: c, ...l }) {
159
161
  return /* @__PURE__ */ n("button", {
160
162
  ...l,
161
163
  type: o,
@@ -169,7 +171,7 @@ function b({ variant: e = "primary", size: r = 48, loading: i = !1, disabled: a
169
171
  });
170
172
  }
171
173
  // src/components/Checkbox/Checkbox.tsx
172
- function x({ label: e, onCheckedChange: r, onChange: i, id: a, className: s = "", ...c }) {
174
+ function S({ label: e, onCheckedChange: r, onChange: i, id: a, className: s = "", ...c }) {
173
175
  let l = o(), u = a ?? l;
174
176
  return /* @__PURE__ */ n("label", {
175
177
  className: "pancake-checkbox-label",
@@ -185,9 +187,26 @@ function x({ label: e, onCheckedChange: r, onChange: i, id: a, className: s = ""
185
187
  }), /* @__PURE__ */ t("span", { children: e })]
186
188
  });
187
189
  }
190
+ // src/components/TextField/field.shared.ts
191
+ function C({ generatedId: e, error: t, helperText: n, describedBy: r, invalid: i }) {
192
+ let a = `${e}-description`, o = t || n;
193
+ return {
194
+ id: a,
195
+ text: o,
196
+ describedBy: [r, o ? a : void 0].filter(Boolean).join(" ") || void 0,
197
+ invalid: t ? !0 : i,
198
+ live: t ? "assertive" : "polite"
199
+ };
200
+ }
188
201
  // src/components/TextField/TextField.tsx
189
- function S({ label: e, type: r = "text", helperText: i, error: a, id: s, className: c = "", required: l, "aria-describedby": u, "aria-invalid": d, ...f }) {
190
- let p = o(), m = s ?? p, h = `${p}-description`, g = a || i;
202
+ function w({ label: e, type: r = "text", helperText: i, error: a, id: s, className: c = "", required: l, "aria-describedby": u, "aria-invalid": d, ...f }) {
203
+ let p = o(), m = s ?? p, h = C({
204
+ generatedId: p,
205
+ error: a,
206
+ helperText: i,
207
+ describedBy: u,
208
+ invalid: d
209
+ });
191
210
  return /* @__PURE__ */ n("div", {
192
211
  className: "pancake-field",
193
212
  children: [
@@ -204,70 +223,71 @@ function S({ label: e, type: r = "text", helperText: i, error: a, id: s, classNa
204
223
  id: m,
205
224
  type: r,
206
225
  required: l,
207
- "aria-invalid": a ? !0 : d,
208
- "aria-describedby": [u, g ? h : void 0].filter(Boolean).join(" ") || void 0,
226
+ "aria-invalid": h.invalid,
227
+ "aria-describedby": h.describedBy,
209
228
  className: `pancake-field-input ${c}`
210
229
  }),
211
- g && /* @__PURE__ */ t("p", {
212
- id: h,
230
+ h.text && /* @__PURE__ */ t("p", {
231
+ id: h.id,
213
232
  className: "pancake-field-description",
214
- "aria-live": a ? "assertive" : "polite",
215
- children: g
233
+ "aria-live": h.live,
234
+ children: h.text
216
235
  })
217
236
  ]
218
237
  });
219
238
  }
220
239
  // src/components/layout/layout.shared.ts
221
- var C = {
240
+ var T = {
222
241
  start: "flex-start",
223
242
  center: "center",
224
243
  end: "flex-end",
225
244
  stretch: "stretch"
226
- }, w = {
245
+ }, E = {
227
246
  start: "flex-start",
228
247
  center: "center",
229
248
  end: "flex-end",
230
249
  "space-between": "space-between"
231
- }, T = (e) => `var(--spacing-pancake-${f[e]})`;
250
+ }, D = (e) => `var(--spacing-pancake-${f[e]})`;
232
251
  // src/components/layout/Stack.tsx
233
- function E({ gap: e = "space16", padding: n, align: r = "stretch", justify: i = "start", className: a = "", style: o, ...s }) {
252
+ function O({ gap: e = "space16", padding: n, align: r = "stretch", justify: i = "start", className: a = "", style: o, ...s }) {
234
253
  return /* @__PURE__ */ t("div", {
235
254
  ...s,
236
255
  className: `pancake-stack ${a}`,
237
256
  style: {
238
- gap: T(e),
239
- padding: n ? T(n) : void 0,
240
- alignItems: C[r],
241
- justifyContent: w[i],
257
+ gap: D(e),
258
+ padding: n ? D(n) : void 0,
259
+ alignItems: T[r],
260
+ justifyContent: E[i],
242
261
  ...o
243
262
  }
244
263
  });
245
264
  }
246
265
  // src/components/layout/Inline.tsx
247
- function D({ gap: e = "space12", padding: n, align: r = "center", justify: i = "start", wrap: a = !0, className: o = "", style: s, ...c }) {
266
+ function k({ gap: e = "space12", padding: n, align: r = "center", justify: i = "start", wrap: a = !0, className: o = "", style: s, ...c }) {
248
267
  return /* @__PURE__ */ t("div", {
249
268
  ...c,
250
269
  className: `pancake-inline ${o}`,
251
270
  style: {
252
- gap: T(e),
253
- padding: n ? T(n) : void 0,
254
- alignItems: C[r],
255
- justifyContent: w[i],
271
+ gap: D(e),
272
+ padding: n ? D(n) : void 0,
273
+ alignItems: T[r],
274
+ justifyContent: E[i],
256
275
  flexWrap: a ? "wrap" : "nowrap",
257
276
  ...s
258
277
  }
259
278
  });
260
279
  }
280
+ // src/foundations/kebab.ts
281
+ var A = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
261
282
  // src/components/layout/Text.tsx
262
- var O = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
263
- function k({ as: e = "span", variant: t = "body", color: n = "ink", className: r = "", style: a, ...o }) {
264
- let s = `--text-pancake-${O(t)}`, c = {
283
+ function j({ as: e = "span", variant: t = "body", color: n = "ink", className: r = "", style: a, ...o }) {
284
+ let s = `--text-pancake-${A(t)}`, c = {
265
285
  fontFamily: "var(--font-pancake)",
266
286
  fontSize: `var(${s})`,
267
287
  lineHeight: `var(${s}--line-height)`,
268
288
  fontWeight: `var(${s}--font-weight)`,
269
289
  letterSpacing: `var(${s}--letter-spacing)`,
270
- color: `var(--color-pancake-${O(n)})`,
290
+ color: `var(--color-pancake-${A(n)})`,
271
291
  ...a
272
292
  };
273
293
  return i(e, {
@@ -277,18 +297,18 @@ function k({ as: e = "span", variant: t = "body", color: n = "ink", className: r
277
297
  });
278
298
  }
279
299
  // src/components/identity/Avatar.tsx
280
- function A(e) {
300
+ function M(e) {
281
301
  return e.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => Array.from(e)[0]).join("").toLocaleUpperCase() || "?";
282
302
  }
283
- function j({ src: e, name: n }) {
303
+ function N({ src: e, name: n }) {
284
304
  let [r, i] = u(!1);
285
- return r ? A(n) : /* @__PURE__ */ t("img", {
305
+ return r ? M(n) : /* @__PURE__ */ t("img", {
286
306
  src: e,
287
307
  alt: "",
288
308
  onError: () => i(!0)
289
309
  });
290
310
  }
291
- function M({ name: e, src: n, size: r = 40, decorative: i = !1, className: a = "", style: o, ...s }) {
311
+ function P({ name: e, src: n, size: r = 40, decorative: i = !1, className: a = "", style: o, ...s }) {
292
312
  return /* @__PURE__ */ t("span", {
293
313
  ...s,
294
314
  className: `pancake-avatar ${a}`,
@@ -300,21 +320,21 @@ function M({ name: e, src: n, size: r = 40, decorative: i = !1, className: a = "
300
320
  role: i ? void 0 : "img",
301
321
  "aria-label": i ? void 0 : e,
302
322
  "aria-hidden": i || void 0,
303
- children: n ? /* @__PURE__ */ t(j, {
323
+ children: n ? /* @__PURE__ */ t(N, {
304
324
  src: n,
305
325
  name: e
306
- }, n) : A(e)
326
+ }, n) : M(e)
307
327
  });
308
328
  }
309
329
  // src/components/identity/AvatarGroup.tsx
310
- function N({ items: e, max: r = 4, size: i = 40, className: a = "", "aria-label": o = "People", ...s }) {
330
+ function F({ items: e, max: r = 4, size: i = 40, className: a = "", "aria-label": o = "People", ...s }) {
311
331
  if (!Number.isInteger(r) || r < 1) throw RangeError("AvatarGroup max must be a positive integer.");
312
332
  let c = e.slice(0, r), l = e.slice(r);
313
333
  return /* @__PURE__ */ n("ul", {
314
334
  ...s,
315
335
  "aria-label": o,
316
336
  className: `pancake-avatar-group ${a}`,
317
- children: [c.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(M, {
337
+ children: [c.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(P, {
318
338
  name: e.name,
319
339
  src: e.src,
320
340
  size: i
@@ -331,14 +351,14 @@ function N({ items: e, max: r = 4, size: i = 40, className: a = "", "aria-label"
331
351
  });
332
352
  }
333
353
  // src/components/feedback/StatusChip.tsx
334
- function P({ tone: e = "neutral", className: n = "", ...r }) {
354
+ function ee({ tone: e = "neutral", className: n = "", ...r }) {
335
355
  return /* @__PURE__ */ t("span", {
336
356
  ...r,
337
357
  className: `pancake-status-chip pancake-tone-${e} ${n}`
338
358
  });
339
359
  }
340
360
  // src/components/feedback/BannerToast.tsx
341
- function ee({ title: e, children: r, tone: i = "info", onDismiss: a, dismissLabel: o = "Dismiss notification", className: s = "", ...c }) {
361
+ function te({ title: e, children: r, tone: i = "info", onDismiss: a, dismissLabel: o = "Dismiss notification", className: s = "", ...c }) {
342
362
  return /* @__PURE__ */ n("div", {
343
363
  ...c,
344
364
  role: i === "error" ? "alert" : "status",
@@ -367,7 +387,7 @@ function ee({ title: e, children: r, tone: i = "info", onDismiss: a, dismissLabe
367
387
  });
368
388
  }
369
389
  // src/components/feedback/EmptyState.tsx
370
- function te({ title: e, description: r, icon: i, action: a, className: o = "", ...s }) {
390
+ function ne({ title: e, description: r, icon: i, action: a, className: o = "", ...s }) {
371
391
  return /* @__PURE__ */ n("div", {
372
392
  ...s,
373
393
  className: `pancake-empty-state ${o}`,
@@ -393,7 +413,7 @@ function te({ title: e, description: r, icon: i, action: a, className: o = "", .
393
413
  });
394
414
  }
395
415
  // src/components/navigation/SectionHeader.tsx
396
- function ne({ title: e, description: r, action: i, headingLevel: a = 2, className: o = "", ...s }) {
416
+ function re({ title: e, description: r, action: i, headingLevel: a = 2, className: o = "", ...s }) {
397
417
  let c = `h${a}`;
398
418
  return /* @__PURE__ */ n("div", {
399
419
  ...s,
@@ -414,7 +434,7 @@ function ne({ title: e, description: r, action: i, headingLevel: a = 2, classNam
414
434
  });
415
435
  }
416
436
  // src/components/navigation/AppHeader.tsx
417
- function F({ title: e, description: r, leading: i, trailing: a, className: o = "", ...s }) {
437
+ function I({ title: e, description: r, leading: i, trailing: a, className: o = "", ...s }) {
418
438
  return /* @__PURE__ */ n("header", {
419
439
  ...s,
420
440
  className: `pancake-app-header ${o}`,
@@ -441,7 +461,7 @@ function F({ title: e, description: r, leading: i, trailing: a, className: o = "
441
461
  });
442
462
  }
443
463
  // src/components/navigation/BottomNavigation.tsx
444
- function I({ items: e, activeId: r, className: i = "", "aria-label": a = "Main navigation", ...o }) {
464
+ function L({ items: e, activeId: r, className: i = "", "aria-label": a = "Main navigation", ...o }) {
445
465
  return /* @__PURE__ */ t("nav", {
446
466
  ...o,
447
467
  "aria-label": a,
@@ -457,7 +477,7 @@ function I({ items: e, activeId: r, className: i = "", "aria-label": a = "Main n
457
477
  });
458
478
  }
459
479
  // src/components/navigation/SegmentedControl.tsx
460
- function L({ label: e, options: r, value: i, defaultValue: a, onValueChange: s, name: c, disabled: l, required: u, className: d = "", ...f }) {
480
+ function R({ label: e, options: r, value: i, defaultValue: a, onValueChange: s, name: c, disabled: l, required: u, className: d = "", ...f }) {
461
481
  let p = o();
462
482
  return /* @__PURE__ */ n("fieldset", {
463
483
  ...f,
@@ -485,29 +505,38 @@ function L({ label: e, options: r, value: i, defaultValue: a, onValueChange: s,
485
505
  });
486
506
  }
487
507
  // src/components/navigation/StepProgress.tsx
488
- function R({ steps: e, currentStep: r, className: i = "", "aria-label": a = "Progress", ...o }) {
508
+ function z({ steps: e, currentStep: r, className: i = "", "aria-label": a = "Progress", ...o }) {
489
509
  if (!Number.isInteger(r) || r < 0 || r > e.length || e.length === 0) throw Error("StepProgress requires steps and a currentStep from 0 through steps.length (complete).");
490
510
  return /* @__PURE__ */ t("ol", {
491
511
  ...o,
492
512
  "aria-label": a,
493
513
  className: `pancake-step-progress ${i}`,
494
- children: e.map((e, i) => /* @__PURE__ */ n("li", {
495
- "aria-current": r === i ? "step" : void 0,
496
- "data-complete": i < r || void 0,
497
- children: [/* @__PURE__ */ t("span", {
498
- className: "pancake-step-number",
499
- "aria-hidden": "true",
500
- children: i < r ? "✓" : i + 1
501
- }), /* @__PURE__ */ n("span", { children: [e, i < r && /* @__PURE__ */ t("span", {
502
- className: "pancake-navigation-sr-only",
503
- children: " (complete)"
504
- })] })]
505
- }, `${i}-${e}`))
514
+ children: e.map((e, i) => {
515
+ let a = i < r;
516
+ return /* @__PURE__ */ n("li", {
517
+ "aria-current": r === i ? "step" : void 0,
518
+ "data-complete": a || void 0,
519
+ children: [/* @__PURE__ */ t("span", {
520
+ className: "pancake-step-number",
521
+ "aria-hidden": "true",
522
+ children: a ? "✓" : i + 1
523
+ }), /* @__PURE__ */ n("span", { children: [e, a && /* @__PURE__ */ t("span", {
524
+ className: "pancake-navigation-sr-only",
525
+ children: " (complete)"
526
+ })] })]
527
+ }, `${i}-${e}`);
528
+ })
506
529
  });
507
530
  }
508
531
  // src/components/Textarea/Textarea.tsx
509
- function z({ label: e, rows: r = 4, helperText: i, error: a, id: s, className: c = "", required: l, "aria-describedby": u, "aria-invalid": d, ...f }) {
510
- let p = o(), m = s ?? p, h = `${p}-description`, g = a || i;
532
+ function B({ label: e, rows: r = 4, helperText: i, error: a, id: s, className: c = "", required: l, "aria-describedby": u, "aria-invalid": d, ...f }) {
533
+ let p = o(), m = s ?? p, h = C({
534
+ generatedId: p,
535
+ error: a,
536
+ helperText: i,
537
+ describedBy: u,
538
+ invalid: d
539
+ });
511
540
  return /* @__PURE__ */ n("div", {
512
541
  className: "pancake-field",
513
542
  children: [
@@ -524,22 +553,28 @@ function z({ label: e, rows: r = 4, helperText: i, error: a, id: s, className: c
524
553
  id: m,
525
554
  rows: r,
526
555
  required: l,
527
- "aria-invalid": a ? !0 : d,
528
- "aria-describedby": [u, g ? h : void 0].filter(Boolean).join(" ") || void 0,
556
+ "aria-invalid": h.invalid,
557
+ "aria-describedby": h.describedBy,
529
558
  className: `pancake-field-input pancake-textarea ${c}`
530
559
  }),
531
- g && /* @__PURE__ */ t("p", {
532
- id: h,
560
+ h.text && /* @__PURE__ */ t("p", {
561
+ id: h.id,
533
562
  className: "pancake-field-description",
534
- "aria-live": a ? "assertive" : "polite",
535
- children: g
563
+ "aria-live": h.live,
564
+ children: h.text
536
565
  })
537
566
  ]
538
567
  });
539
568
  }
540
569
  // src/components/Select/Select.tsx
541
- function B({ label: e, helperText: r, error: i, id: a, className: s = "", required: c, "aria-describedby": l, "aria-invalid": u, ...d }) {
542
- let f = o(), p = a ?? f, m = `${f}-description`, h = i || r;
570
+ function V({ label: e, helperText: r, error: i, id: a, className: s = "", required: c, "aria-describedby": l, "aria-invalid": u, ...d }) {
571
+ let f = o(), p = a ?? f, m = C({
572
+ generatedId: f,
573
+ error: i,
574
+ helperText: r,
575
+ describedBy: l,
576
+ invalid: u
577
+ });
543
578
  return /* @__PURE__ */ n("div", {
544
579
  className: "pancake-field",
545
580
  children: [
@@ -557,8 +592,8 @@ function B({ label: e, helperText: r, error: i, id: a, className: s = "", requir
557
592
  ...d,
558
593
  id: p,
559
594
  required: c,
560
- "aria-invalid": i ? !0 : u,
561
- "aria-describedby": [l, h ? m : void 0].filter(Boolean).join(" ") || void 0,
595
+ "aria-invalid": m.invalid,
596
+ "aria-describedby": m.describedBy,
562
597
  className: `pancake-field-input pancake-select ${s}`
563
598
  }), /* @__PURE__ */ t("span", {
564
599
  className: "pancake-select-chevron",
@@ -566,18 +601,18 @@ function B({ label: e, helperText: r, error: i, id: a, className: s = "", requir
566
601
  children: "⌄"
567
602
  })]
568
603
  }),
569
- h && /* @__PURE__ */ t("p", {
570
- id: m,
604
+ m.text && /* @__PURE__ */ t("p", {
605
+ id: m.id,
571
606
  className: "pancake-field-description",
572
- "aria-live": i ? "assertive" : "polite",
573
- children: h
607
+ "aria-live": m.live,
608
+ children: m.text
574
609
  })
575
610
  ]
576
611
  });
577
612
  }
578
613
  // src/components/Button/IconButton.tsx
579
- function V({ label: e, children: n, loading: r = !1, className: i = "", ...a }) {
580
- return /* @__PURE__ */ t(b, {
614
+ function H({ label: e, children: n, loading: r = !1, className: i = "", ...a }) {
615
+ return /* @__PURE__ */ t(x, {
581
616
  ...a,
582
617
  loading: r,
583
618
  "aria-label": e,
@@ -590,15 +625,15 @@ function V({ label: e, children: n, loading: r = !1, className: i = "", ...a })
590
625
  });
591
626
  }
592
627
  // src/components/Button/ButtonLink.tsx
593
- function H({ variant: e = "primary", size: n = 48, className: r = "", ...i }) {
628
+ function U({ variant: e = "primary", size: n = 36, className: r = "", ...i }) {
594
629
  return /* @__PURE__ */ t("a", {
595
630
  ...i,
596
631
  className: `pancake-button pancake-button--${e} pancake-button--${n} pancake-button-link ${r}`
597
632
  });
598
633
  }
599
634
  // src/components/Dialog/Dialog.tsx
600
- function U({ open: e, onOpenChange: r, title: i, description: a, closeLabel: u = "Close dialog", children: d, ref: f, className: p = "", onCancel: m, onClose: h, "aria-describedby": g, ..._ }) {
601
- let v = l(null), y = o();
635
+ function W({ open: e, onOpenChange: r, title: i, description: a, closeLabel: u = "Close dialog", children: d, ref: f, className: p = "", onCancel: m, onClose: h, "aria-describedby": g, ..._ }) {
636
+ let v = l(null), y = o(), b = `${y}-title`, x = `${y}-description`;
602
637
  return s(f, () => v.current, []), c(() => {
603
638
  let t = v.current;
604
639
  if (t) return e && !t.open ? t.showModal() : !e && t.open && t.close(), () => {
@@ -608,36 +643,38 @@ function U({ open: e, onOpenChange: r, title: i, description: a, closeLabel: u =
608
643
  ..._,
609
644
  ref: v,
610
645
  className: `pancake-dialog ${p}`,
611
- "aria-labelledby": `${y}-title`,
612
- "aria-describedby": [g, a ? `${y}-description` : void 0].filter(Boolean).join(" ") || void 0,
646
+ "aria-labelledby": b,
647
+ "aria-describedby": [g, a ? x : void 0].filter(Boolean).join(" ") || void 0,
613
648
  onCancel: (e) => {
614
649
  m?.(e);
615
650
  let t = e.defaultPrevented;
616
651
  e.preventDefault(), t || r(!1);
617
652
  },
618
653
  onClose: (t) => {
619
- h?.(t), e && !t.currentTarget.open && r(!1);
654
+ h?.(t);
655
+ let n = t.currentTarget.open;
656
+ e && !n && r(!1);
620
657
  },
621
- children: /* @__PURE__ */ n(E, { children: [
622
- /* @__PURE__ */ n(D, {
658
+ children: /* @__PURE__ */ n(O, { children: [
659
+ /* @__PURE__ */ n(k, {
623
660
  justify: "space-between",
624
661
  align: "start",
625
662
  wrap: !1,
626
- children: [/* @__PURE__ */ t(k, {
627
- id: `${y}-title`,
663
+ children: [/* @__PURE__ */ t(j, {
664
+ id: b,
628
665
  as: "h2",
629
666
  variant: "heading",
630
667
  children: i
631
- }), /* @__PURE__ */ t(V, {
668
+ }), /* @__PURE__ */ t(H, {
632
669
  label: u,
633
670
  variant: "ghost",
634
- size: 40,
671
+ size: 32,
635
672
  onClick: () => r(!1),
636
673
  children: "×"
637
674
  })]
638
675
  }),
639
- a && /* @__PURE__ */ t(k, {
640
- id: `${y}-description`,
676
+ a && /* @__PURE__ */ t(j, {
677
+ id: x,
641
678
  as: "p",
642
679
  color: "muted",
643
680
  children: a
@@ -647,7 +684,7 @@ function U({ open: e, onOpenChange: r, title: i, description: a, closeLabel: u =
647
684
  });
648
685
  }
649
686
  // src/components/RadioGroup/RadioGroup.tsx
650
- function W({ label: e, options: r, value: i, defaultValue: a, onValueChange: s, required: c, helperText: l, error: u, name: d, disabled: f, className: p = "", "aria-describedby": m, "aria-invalid": h, ...g }) {
687
+ function G({ label: e, options: r, value: i, defaultValue: a, onValueChange: s, required: c, helperText: l, error: u, name: d, disabled: f, className: p = "", "aria-describedby": m, "aria-invalid": h, ...g }) {
651
688
  let _ = o(), v = `${_}-description`, y = u || l, b = [m, y ? v : void 0].filter(Boolean).join(" ") || void 0;
652
689
  return /* @__PURE__ */ n("fieldset", {
653
690
  ...g,
@@ -663,7 +700,7 @@ function W({ label: e, options: r, value: i, defaultValue: a, onValueChange: s,
663
700
  /* @__PURE__ */ t("div", {
664
701
  className: "pancake-radio-options",
665
702
  children: r.map((e, r) => {
666
- let o = `${_}-option-${r}`;
703
+ let o = `${_}-label-${r}`, l = `${_}-option-${r}`;
667
704
  return /* @__PURE__ */ n("label", {
668
705
  className: "pancake-radio-option",
669
706
  children: [/* @__PURE__ */ t("input", {
@@ -674,8 +711,8 @@ function W({ label: e, options: r, value: i, defaultValue: a, onValueChange: s,
674
711
  value: e.value,
675
712
  disabled: e.disabled,
676
713
  required: c,
677
- "aria-labelledby": `${_}-label-${r}`,
678
- "aria-describedby": e.description ? o : void 0,
714
+ "aria-labelledby": o,
715
+ "aria-describedby": e.description ? l : void 0,
679
716
  checked: i === void 0 ? void 0 : i === e.value,
680
717
  defaultChecked: i === void 0 ? a === e.value : void 0,
681
718
  onChange: (t) => {
@@ -684,10 +721,10 @@ function W({ label: e, options: r, value: i, defaultValue: a, onValueChange: s,
684
721
  }), /* @__PURE__ */ n("span", {
685
722
  className: "pancake-radio-copy",
686
723
  children: [/* @__PURE__ */ t("span", {
687
- id: `${_}-label-${r}`,
724
+ id: o,
688
725
  children: e.label
689
726
  }), e.description && /* @__PURE__ */ t("span", {
690
- id: o,
727
+ id: l,
691
728
  className: "pancake-radio-description",
692
729
  children: e.description
693
730
  })]
@@ -704,7 +741,7 @@ function W({ label: e, options: r, value: i, defaultValue: a, onValueChange: s,
704
741
  });
705
742
  }
706
743
  // src/components/Switch/Switch.tsx
707
- function G({ label: e, onChange: r, onCheckedChange: i, id: a, className: s = "", ...c }) {
744
+ function K({ label: e, onChange: r, onCheckedChange: i, id: a, className: s = "", ...c }) {
708
745
  let l = o(), u = a ?? l;
709
746
  return /* @__PURE__ */ n("label", {
710
747
  className: "pancake-switch-label",
@@ -722,9 +759,9 @@ function G({ label: e, onChange: r, onCheckedChange: i, id: a, className: s = ""
722
759
  });
723
760
  }
724
761
  // src/components/Tabs/Tabs.tsx
725
- function K({ label: e, items: r, value: i, defaultValue: a, onValueChange: s, orientation: c = "horizontal", activation: l = "automatic", className: d = "", ...f }) {
726
- let p = o(), [m, h] = u(a), [g, _] = u(), v = r.filter((e) => !e.disabled), y = i ?? m, b = v.find((e) => e.value === y)?.value ?? v[0]?.value, x = v.find((e) => e.value === g)?.value ?? b, S = (e) => {
727
- e !== b && (i === void 0 && h(e), s?.(e));
762
+ function q({ label: e, items: r, value: i, defaultValue: a, onValueChange: s, orientation: c = "horizontal", activation: l = "automatic", className: d = "", ...f }) {
763
+ let p = o(), m = (e) => `${p}-tab-${e}`, h = (e) => `${p}-panel-${e}`, [g, _] = u(a), [v, y] = u(), b = r.filter((e) => !e.disabled), x = i ?? g, S = b.find((e) => e.value === x)?.value ?? b[0]?.value, C = b.find((e) => e.value === v)?.value ?? S, w = (e) => {
764
+ e !== S && (i === void 0 && _(e), s?.(e));
728
765
  };
729
766
  return /* @__PURE__ */ n("div", {
730
767
  ...f,
@@ -735,41 +772,41 @@ function K({ label: e, items: r, value: i, defaultValue: a, onValueChange: s, or
735
772
  "aria-label": e,
736
773
  "aria-orientation": c,
737
774
  onBlur: (e) => {
738
- e.currentTarget.contains(e.relatedTarget) || _(void 0);
775
+ e.currentTarget.contains(e.relatedTarget) || y(void 0);
739
776
  },
740
777
  children: r.map((e, n) => /* @__PURE__ */ t("button", {
741
- id: `${p}-tab-${n}`,
778
+ id: m(n),
742
779
  className: "pancake-tabs-tab",
743
780
  type: "button",
744
781
  role: "tab",
745
- "aria-selected": e.value === b,
746
- "aria-controls": `${p}-panel-${n}`,
747
- tabIndex: !e.disabled && e.value === x ? 0 : -1,
782
+ "aria-selected": e.value === S,
783
+ "aria-controls": h(n),
784
+ tabIndex: !e.disabled && e.value === C ? 0 : -1,
748
785
  disabled: e.disabled,
749
- onFocus: () => _(e.value),
750
- onClick: () => S(e.value),
786
+ onFocus: () => y(e.value),
787
+ onClick: () => w(e.value),
751
788
  onKeyDown: (t) => {
752
- let n = c === "vertical", i = getComputedStyle(t.currentTarget).direction === "rtl", a = n ? "ArrowUp" : i ? "ArrowRight" : "ArrowLeft", o = n ? "ArrowDown" : i ? "ArrowLeft" : "ArrowRight", s = v.findIndex((t) => t.value === e.value), u;
753
- if (t.key === "Home" ? u = v[0] : t.key === "End" ? u = v.at(-1) : t.key === o ? u = v[(s + 1) % v.length] : t.key === a && (u = v[(s - 1 + v.length) % v.length]), !u) return;
789
+ let n = c === "vertical", i = getComputedStyle(t.currentTarget).direction === "rtl", a = n ? "ArrowUp" : i ? "ArrowRight" : "ArrowLeft", o = n ? "ArrowDown" : i ? "ArrowLeft" : "ArrowRight", s = b.findIndex((t) => t.value === e.value), u;
790
+ if (t.key === "Home" ? u = b[0] : t.key === "End" ? u = b.at(-1) : t.key === o ? u = b[(s + 1) % b.length] : t.key === a && (u = b[(s - 1 + b.length) % b.length]), !u) return;
754
791
  t.preventDefault();
755
792
  let d = r.indexOf(u);
756
- t.currentTarget.ownerDocument.getElementById(`${p}-tab-${d}`)?.focus(), l === "automatic" && S(u.value);
793
+ t.currentTarget.ownerDocument.getElementById(m(d))?.focus(), l === "automatic" && w(u.value);
757
794
  },
758
795
  children: e.label
759
796
  }, e.value))
760
797
  }), r.map((e, n) => /* @__PURE__ */ t("div", {
761
- id: `${p}-panel-${n}`,
798
+ id: h(n),
762
799
  className: "pancake-tabs-panel",
763
800
  role: "tabpanel",
764
- "aria-labelledby": `${p}-tab-${n}`,
765
- hidden: e.value !== b,
801
+ "aria-labelledby": m(n),
802
+ hidden: e.value !== S,
766
803
  tabIndex: 0,
767
804
  children: e.content
768
805
  }, e.value))]
769
806
  });
770
807
  }
771
808
  // src/components/Disclosure/Disclosure.tsx
772
- function q({ summary: e, children: r, open: i, defaultOpen: a = !1, onOpenChange: o, onToggle: s, onClick: c, className: d = "", ...f }) {
809
+ function J({ summary: e, children: r, open: i, defaultOpen: a = !1, onOpenChange: o, onToggle: s, onClick: c, className: d = "", ...f }) {
773
810
  let [p] = u(a), m = l(p);
774
811
  return /* @__PURE__ */ n("details", {
775
812
  ...f,
@@ -794,7 +831,7 @@ function q({ summary: e, children: r, open: i, defaultOpen: a = !1, onOpenChange
794
831
  });
795
832
  }
796
833
  // src/components/progress/Progress.tsx
797
- function J({ label: e, value: r, max: i = 100, id: a, className: s = "", ...c }) {
834
+ function Y({ label: e, value: r, max: i = 100, id: a, className: s = "", ...c }) {
798
835
  let l = o(), u = a ?? l;
799
836
  return /* @__PURE__ */ n("div", {
800
837
  className: "pancake-progress-field",
@@ -812,7 +849,7 @@ function J({ label: e, value: r, max: i = 100, id: a, className: s = "", ...c })
812
849
  });
813
850
  }
814
851
  // src/components/progress/LoadingIndicator.tsx
815
- function Y({ label: e, className: r = "", ...i }) {
852
+ function ie({ label: e, className: r = "", ...i }) {
816
853
  return /* @__PURE__ */ n("div", {
817
854
  "aria-atomic": "true",
818
855
  ...i,
@@ -830,8 +867,14 @@ function Y({ label: e, className: r = "", ...i }) {
830
867
  });
831
868
  }
832
869
  // src/components/FileField/FileField.tsx
833
- function X({ label: e, helperText: r, error: i, id: a, className: s = "", required: c, "aria-describedby": l, "aria-invalid": u, ...d }) {
834
- let f = o(), p = a ?? f, m = `${f}-description`, h = i || r;
870
+ function ae({ label: e, helperText: r, error: i, id: a, className: s = "", required: c, "aria-describedby": l, "aria-invalid": u, ...d }) {
871
+ let f = o(), p = a ?? f, m = C({
872
+ generatedId: f,
873
+ error: i,
874
+ helperText: r,
875
+ describedBy: l,
876
+ invalid: u
877
+ });
835
878
  return /* @__PURE__ */ n("div", {
836
879
  className: "pancake-field",
837
880
  children: [
@@ -848,21 +891,21 @@ function X({ label: e, helperText: r, error: i, id: a, className: s = "", requir
848
891
  id: p,
849
892
  type: "file",
850
893
  required: c,
851
- "aria-invalid": i ? !0 : u,
852
- "aria-describedby": [l, h ? m : void 0].filter(Boolean).join(" ") || void 0,
894
+ "aria-invalid": m.invalid,
895
+ "aria-describedby": m.describedBy,
853
896
  className: `pancake-field-input pancake-file-field ${s}`
854
897
  }),
855
- h && /* @__PURE__ */ t("p", {
856
- id: m,
898
+ m.text && /* @__PURE__ */ t("p", {
899
+ id: m.id,
857
900
  className: "pancake-field-description",
858
- "aria-live": i ? "assertive" : "polite",
859
- children: h
901
+ "aria-live": m.live,
902
+ children: m.text
860
903
  })
861
904
  ]
862
905
  });
863
906
  }
864
907
  // src/components/Popover/Popover.tsx
865
- function re({ label: e, onOpenChange: n, onToggle: r, className: i = "", ...a }) {
908
+ function oe({ label: e, onOpenChange: n, onToggle: r, className: i = "", ...a }) {
866
909
  let o = l(!1);
867
910
  return /* @__PURE__ */ t("div", {
868
911
  ...a,
@@ -877,41 +920,43 @@ function re({ label: e, onOpenChange: n, onToggle: r, className: i = "", ...a })
877
920
  });
878
921
  }
879
922
  // src/components/DropdownMenu/menuKeyboard.ts
880
- function Z(e) {
923
+ function X(e) {
881
924
  return Array.from(e.querySelectorAll("[role=\"menuitem\"]"));
882
925
  }
883
- function Q() {
884
- let e = "", t = 0;
885
- return (n, r) => {
886
- if (n.defaultPrevented) return;
887
- let i = n.currentTarget, a = Z(i), o = a.indexOf(i.ownerDocument.activeElement), s;
888
- if (n.key === "Tab") i.hidePopover(), r?.focus();
926
+ var se = 500;
927
+ function Z(e) {
928
+ let t = "", n = 0;
929
+ return (r, i) => {
930
+ if (r.defaultPrevented) return;
931
+ let a = r.currentTarget, o = X(a), s = o.indexOf(a.ownerDocument.activeElement), c;
932
+ if (r.key === "Tab") a.hidePopover(), i?.focus();
889
933
  else {
890
- if (n.key === "ArrowDown") s = a[(o + 1) % a.length];
891
- else if (n.key === "ArrowUp") s = a[(o - 1 + a.length) % a.length];
892
- else if (n.key === "Home") s = a[0];
893
- else if (n.key === "End") s = a.at(-1);
894
- else if (n.key === " " && n.target instanceof HTMLAnchorElement) {
895
- n.preventDefault(), n.target.click();
934
+ if (r.key === "ArrowDown") c = o[(s + 1) % o.length];
935
+ else if (r.key === "ArrowUp") c = o[(s - 1 + o.length) % o.length];
936
+ else if (r.key === "Home") c = o[0];
937
+ else if (r.key === "End") c = o.at(-1);
938
+ else if (r.key === " " && r.target instanceof HTMLAnchorElement) {
939
+ r.preventDefault(), r.target.click();
896
940
  return;
897
- } else if (n.key.length === 1 && !n.ctrlKey && !n.metaKey && !n.altKey && n.key !== " ") {
898
- let r = Date.now();
899
- e = r - t > 500 ? n.key : e + n.key, t = r;
900
- let i = [...e].every((t) => t === e[0]) ? e[0] : e;
901
- s = a.slice(o + 1).concat(a.slice(0, o + 1)).find((e) => e.textContent?.trim().toLocaleLowerCase().startsWith(i.toLocaleLowerCase())), n.preventDefault();
941
+ } else if (r.key.length === 1 && !r.ctrlKey && !r.metaKey && !r.altKey && r.key !== " ") {
942
+ let i = e();
943
+ t = i - n > se ? r.key : t + r.key, n = i;
944
+ let a = [...t].every((e) => e === t[0]) ? t[0] : t;
945
+ c = o.slice(s + 1).concat(o.slice(0, s + 1)).find((e) => e.textContent?.trim().toLocaleLowerCase().startsWith(a.toLocaleLowerCase())), r.preventDefault();
902
946
  }
903
- s && (n.preventDefault(), s.focus());
947
+ c && (r.preventDefault(), c.focus());
904
948
  }
905
949
  };
906
950
  }
907
951
  // src/components/DropdownMenu/DropdownMenu.tsx
908
- function ie({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggle: p, onKeyDown: m, ref: h, className: g = "", ..._ }) {
909
- let v = o(), y = l(null), x = l(null), [S, C] = u(!1), w = l(!1), T = l(Q()), E = l(void 0);
952
+ var Q = () => Date.now();
953
+ function ce({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggle: p, onKeyDown: m, ref: h, className: g = "", ..._ }) {
954
+ let v = o(), y = l(null), b = l(null), [S, C] = u(!1), w = l(!1), T = l(Z(Q)), E = l(void 0);
910
955
  return c(() => {
911
- y.current?.matches(":popover-open") && E.current !== void 0 && !a.some((e) => e.id === E.current) && (Z(y.current)[0]?.focus(), a.length || y.current.hidePopover());
912
- }, [a]), s(h, () => y.current, []), s(d.ref, () => x.current, []), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(b, {
956
+ y.current?.matches(":popover-open") && E.current !== void 0 && !a.some((e) => e.id === E.current) && (X(y.current)[0]?.focus(), a.length || y.current.hidePopover());
957
+ }, [a]), s(h, () => y.current, []), s(d.ref, () => b.current, []), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(x, {
913
958
  ...d,
914
- ref: x,
959
+ ref: b,
915
960
  type: "button",
916
961
  disabled: d.disabled || a.length === 0,
917
962
  popoverTarget: v,
@@ -919,11 +964,11 @@ function ie({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggl
919
964
  "aria-expanded": S,
920
965
  "aria-controls": v,
921
966
  onClick: (e) => {
922
- d.onClick?.(e), !e.defaultPrevented && y.current && (e.preventDefault(), y.current.matches(":popover-open") ? y.current.hidePopover() : (e.currentTarget.focus(), y.current.showPopover({ source: e.currentTarget }), y.current.matches(":popover-open") && Z(y.current)[0]?.focus()));
967
+ d.onClick?.(e), !e.defaultPrevented && y.current && (e.preventDefault(), y.current.matches(":popover-open") ? y.current.hidePopover() : (e.currentTarget.focus(), y.current.showPopover({ source: e.currentTarget }), y.current.matches(":popover-open") && X(y.current)[0]?.focus()));
923
968
  },
924
969
  onKeyDown: (e) => {
925
970
  if (d.onKeyDown?.(e), !e.defaultPrevented && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), y.current?.showPopover({ source: e.currentTarget }), y.current?.matches(":popover-open"))) {
926
- let t = Z(y.current);
971
+ let t = X(y.current);
927
972
  (e.key === "ArrowUp" ? t.at(-1) : t[0])?.focus();
928
973
  }
929
974
  },
@@ -938,10 +983,10 @@ function ie({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggl
938
983
  className: `pancake-popover pancake-dropdown-menu ${g}`,
939
984
  onToggle: (e) => {
940
985
  let t = e.currentTarget.matches(":popover-open");
941
- C(t), t || (T.current = Q()), t && e.currentTarget.ownerDocument.activeElement === x.current && Z(e.currentTarget)[0]?.focus(), t !== w.current && (w.current = t, f?.(t)), p?.(e);
986
+ C(t), t || (T.current = Z(Q)), t && e.currentTarget.ownerDocument.activeElement === b.current && X(e.currentTarget)[0]?.focus(), t !== w.current && (w.current = t, f?.(t)), p?.(e);
942
987
  },
943
988
  onKeyDown: (e) => {
944
- m?.(e), T.current(e, x.current);
989
+ m?.(e), T.current(e, b.current);
945
990
  },
946
991
  children: a.map((e) => {
947
992
  let t = {
@@ -953,7 +998,7 @@ function ie({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggl
953
998
  E.current = e.id;
954
999
  },
955
1000
  onClick: (t) => {
956
- e.disabled ? t.preventDefault() : (y.current?.hidePopover(), x.current?.focus(), e.type === "action" && e.onSelect());
1001
+ e.disabled ? t.preventDefault() : (y.current?.hidePopover(), b.current?.focus(), e.type === "action" && e.onSelect());
957
1002
  }
958
1003
  };
959
1004
  return e.type === "link" ? /* @__PURE__ */ i("a", {
@@ -972,13 +1017,14 @@ function ie({ label: r, items: a, triggerProps: d = {}, onOpenChange: f, onToggl
972
1017
  })] });
973
1018
  }
974
1019
  // src/components/Tooltip/useTooltip.ts
1020
+ var le = 150;
975
1021
  function $() {
976
1022
  let e = l(null), t = l(null), n = l(!1), r = l(!1), i = l(!1), o = l(!1), s = l(void 0), c = () => clearTimeout(s.current), u = () => {
977
1023
  c(), t.current?.matches(":popover-open") && t.current.hidePopover();
978
1024
  }, d = () => {
979
1025
  c(), !i.current && !o.current && e.current && t.current && t.current.showPopover({ source: e.current });
980
1026
  }, f = () => {
981
- c(), !n.current && !r.current && (i.current = !1, s.current = setTimeout(u, 150));
1027
+ c(), !n.current && !r.current && (i.current = !1, s.current = setTimeout(u, le));
982
1028
  };
983
1029
  return a(() => {
984
1030
  let n = e.current.ownerDocument, r = (e) => {
@@ -1010,7 +1056,7 @@ function $() {
1010
1056
  };
1011
1057
  }
1012
1058
  // src/components/Tooltip/Tooltip.tsx
1013
- function ae({ content: e, children: i, onOpenChange: a, onToggle: c, ref: u, className: d = "", ...f }) {
1059
+ function ue({ content: e, children: i, onOpenChange: a, onToggle: c, ref: u, className: d = "", ...f }) {
1014
1060
  let p = o(), { anchor: m, panel: h, handlers: g } = $(), _ = l(!1);
1015
1061
  return s(u, () => h.current, [h]), /* @__PURE__ */ n("span", {
1016
1062
  ref: m,
@@ -1036,7 +1082,7 @@ function ae({ content: e, children: i, onOpenChange: a, onToggle: c, ref: u, cla
1036
1082
  });
1037
1083
  }
1038
1084
  // src/components/Table/Table.tsx
1039
- function oe({ caption: e, children: r, className: i = "", ...a }) {
1085
+ function de({ caption: e, children: r, className: i = "", ...a }) {
1040
1086
  let s = o();
1041
1087
  return /* @__PURE__ */ t("div", {
1042
1088
  className: "pancake-table-scroll",
@@ -1054,12 +1100,13 @@ function oe({ caption: e, children: r, className: i = "", ...a }) {
1054
1100
  });
1055
1101
  }
1056
1102
  // src/components/Pagination/paginationPages.ts
1057
- function se(e, t) {
1103
+ var fe = 7;
1104
+ function pe(e, t) {
1058
1105
  let n = Number.isFinite(t) ? Math.min(2 ** 53 - 1, Math.max(0, Math.trunc(t))) : 0, r = n ? Math.min(n, Math.max(1, Math.trunc(Number.isFinite(e) ? e : 1))) : 0;
1059
1106
  return {
1060
1107
  count: n,
1061
1108
  current: r,
1062
- pages: n <= 7 ? Array.from({ length: n }, (e, t) => t + 1) : [.../* @__PURE__ */ new Set([
1109
+ pages: n <= fe ? Array.from({ length: n }, (e, t) => t + 1) : [.../* @__PURE__ */ new Set([
1063
1110
  1,
1064
1111
  r - 1,
1065
1112
  r,
@@ -1069,31 +1116,31 @@ function se(e, t) {
1069
1116
  };
1070
1117
  }
1071
1118
  // src/components/Pagination/Pagination.tsx
1072
- function ce({ label: e, page: r, pageCount: i, labels: a = {}, getPageHref: o, onPageChange: s, linkProps: c, className: l = "", ...u }) {
1073
- let { count: d, current: f, pages: p } = se(r, i), m = a.page ?? ((e) => `Page ${e}`), h = a.previous ?? "Previous", g = a.next ?? "Next", _ = (e, n, r, i = !1, a = !1) => {
1074
- let l = a && e === f;
1119
+ function me({ label: e, page: r, pageCount: i, labels: a = {}, getPageHref: o, onPageChange: s, linkProps: c, className: l = "", ...u }) {
1120
+ let { count: d, current: f, pages: p } = pe(r, i), m = a.page ?? ((e) => `Page ${e}`), h = a.previous ?? "Previous", g = a.next ?? "Next", _ = (e, n, r, i = !1) => {
1121
+ let a = e === f;
1075
1122
  return o ? i ? /* @__PURE__ */ t("span", {
1076
- className: "pancake-button pancake-button--secondary pancake-button--40 pancake-pagination-control pancake-pagination-unavailable",
1123
+ className: "pancake-button pancake-button--secondary pancake-button--32 pancake-pagination-control pancake-pagination-unavailable",
1077
1124
  "aria-disabled": "true",
1078
1125
  children: n
1079
- }) : /* @__PURE__ */ t(H, {
1126
+ }) : /* @__PURE__ */ t(U, {
1080
1127
  target: c?.target,
1081
1128
  rel: c?.rel,
1082
1129
  href: o(e),
1083
- size: 40,
1084
- variant: l ? "primary" : "secondary",
1130
+ size: 32,
1131
+ variant: a ? "primary" : "secondary",
1085
1132
  className: "pancake-pagination-control",
1086
1133
  "aria-label": r,
1087
- "aria-current": l ? "page" : void 0,
1134
+ "aria-current": a ? "page" : void 0,
1088
1135
  children: n
1089
- }) : /* @__PURE__ */ t(b, {
1136
+ }) : /* @__PURE__ */ t(x, {
1090
1137
  type: "button",
1091
- size: 40,
1092
- variant: l ? "primary" : "secondary",
1138
+ size: 32,
1139
+ variant: a ? "primary" : "secondary",
1093
1140
  className: "pancake-pagination-control",
1094
1141
  disabled: i,
1095
1142
  "aria-label": r,
1096
- "aria-current": l ? "page" : void 0,
1143
+ "aria-current": a ? "page" : void 0,
1097
1144
  onClick: () => {
1098
1145
  e !== f && s?.(e);
1099
1146
  },
@@ -1112,10 +1159,10 @@ function ce({ label: e, page: r, pageCount: i, labels: a = {}, getPageHref: o, o
1112
1159
  "aria-hidden": "true",
1113
1160
  className: "pancake-pagination-gap",
1114
1161
  children: "…"
1115
- }, `gap-${e}`)] : [], /* @__PURE__ */ t("li", { children: _(e, e, m(e), !1, !0) }, e)]),
1162
+ }, `gap-${e}`)] : [], /* @__PURE__ */ t("li", { children: _(e, e, m(e)) }, e)]),
1116
1163
  /* @__PURE__ */ t("li", { children: _(f + 1, g, g, f >= d) })
1117
1164
  ]
1118
1165
  })
1119
1166
  });
1120
1167
  }
1121
- export { F as AppHeader, M as Avatar, N as AvatarGroup, ee as BannerToast, I as BottomNavigation, b as Button, H as ButtonLink, x as Checkbox, U as Dialog, q as Disclosure, ie as DropdownMenu, te as EmptyState, X as FileField, V as IconButton, D as Inline, Y as LoadingIndicator, ce as Pagination, re as Popover, J as Progress, W as RadioGroup, ne as SectionHeader, L as SegmentedControl, B as Select, E as Stack, P as StatusChip, R as StepProgress, y as Surface, G as Switch, oe as Table, K as Tabs, k as Text, S as TextField, z as Textarea, ae as Tooltip, h as borders, d as colors, g as opacity, p as radii, m as sizing, f as spacing, v as typography };
1168
+ export { I as AppHeader, P as Avatar, F as AvatarGroup, te as BannerToast, L as BottomNavigation, x as Button, U as ButtonLink, S as Checkbox, W as Dialog, J as Disclosure, ce as DropdownMenu, ne as EmptyState, ae as FileField, H as IconButton, k as Inline, ie as LoadingIndicator, me as Pagination, oe as Popover, Y as Progress, G as RadioGroup, re as SectionHeader, R as SegmentedControl, V as Select, O as Stack, ee as StatusChip, z as StepProgress, b as Surface, K as Switch, de as Table, q as Tabs, j as Text, w as TextField, B as Textarea, ue as Tooltip, h as borders, d as colors, g as opacity, p as radii, m as sizing, f as spacing, y as typography };