@dimasbaguspm/versaur 0.0.27 → 0.0.28

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,7 +1,7 @@
1
1
  import { c as cva, j as jsxRuntimeExports, a as cn } from "./index-DOdDlCoL.js";
2
2
  import * as React from "react";
3
3
  import React__default, { forwardRef, useState, useEffect, useCallback, useRef, createContext, useContext } from "react";
4
- import { X, ChevronLeft, ChevronRight, ImageOff } from "lucide-react";
4
+ import { X, ChevronLeft, ChevronRight, XIcon, ImageOff } from "lucide-react";
5
5
  import { S as Skeleton } from "./skeleton-BNZyaRjo.js";
6
6
  const alertVariants = cva(
7
7
  "relative flex items-center gap-2 rounded-md p-2 text-sm transition-all duration-200",
@@ -146,18 +146,18 @@ const alertVariants = cva(
146
146
  color: t = "neutral",
147
147
  icon: r,
148
148
  className: s,
149
- children: n,
150
- ...i
149
+ children: i,
150
+ ...n
151
151
  }, o) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
152
152
  "div",
153
153
  {
154
154
  ref: o,
155
155
  role: "alert",
156
156
  className: cn(alertVariants({ variant: e, color: t }), s),
157
- ...i,
157
+ ...n,
158
158
  children: [
159
159
  r && /* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, { children: r }),
160
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: n })
160
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: i })
161
161
  ]
162
162
  }
163
163
  )
@@ -226,15 +226,15 @@ const alertVariants = cva(
226
226
  className: t,
227
227
  color: r = "primary",
228
228
  fontSize: s = "base",
229
- fontWeight: n = "medium",
230
- quiet: i = !1,
229
+ fontWeight: i = "medium",
230
+ quiet: n = !1,
231
231
  ...o
232
232
  }, a) => /* @__PURE__ */ jsxRuntimeExports.jsx(
233
233
  "a",
234
234
  {
235
235
  ref: a,
236
236
  className: cn(
237
- anchorVariants({ color: r, fontSize: s, fontWeight: n, quiet: i }),
237
+ anchorVariants({ color: r, fontSize: s, fontWeight: i, quiet: n }),
238
238
  t
239
239
  ),
240
240
  ...o,
@@ -285,19 +285,19 @@ const alertVariants = cva(
285
285
  size: t = "md",
286
286
  shape: r = "circle",
287
287
  className: s,
288
- children: n,
289
- ...i
288
+ children: i,
289
+ ...n
290
290
  }, o) => /* @__PURE__ */ jsxRuntimeExports.jsx(
291
291
  "div",
292
292
  {
293
293
  ref: o,
294
294
  className: cn(avatarVariants({ variant: e, size: t, shape: r }), s),
295
- ...i,
296
- children: n
295
+ ...n,
296
+ children: i
297
297
  }
298
298
  )
299
299
  ), AvatarImage = forwardRef(
300
- ({ src: e, alt: t, className: r, onError: s, ...n }, i) => {
300
+ ({ src: e, alt: t, className: r, onError: s, ...i }, n) => {
301
301
  const [o, a] = useState(!1);
302
302
  useEffect(() => {
303
303
  a(!1);
@@ -311,12 +311,12 @@ const alertVariants = cva(
311
311
  return o ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
312
312
  "img",
313
313
  {
314
- ref: i,
314
+ ref: n,
315
315
  src: e,
316
316
  alt: t,
317
317
  className: cn(avatarImageVariants(), r),
318
318
  onError: l,
319
- ...n
319
+ ...i
320
320
  }
321
321
  );
322
322
  }
@@ -484,13 +484,13 @@ const alertVariants = cva(
484
484
  shape: t = "square",
485
485
  color: r = "primary",
486
486
  size: s = "md",
487
- iconLeft: n,
488
- iconRight: i,
487
+ iconLeft: i,
488
+ iconRight: n,
489
489
  className: o,
490
490
  children: a,
491
491
  ...l
492
492
  }, c) => {
493
- const d = !(a != null && a !== "") && !!(n || i);
493
+ const d = !(a != null && a !== "") && !!(i || n);
494
494
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
495
495
  "span",
496
496
  {
@@ -508,13 +508,13 @@ const alertVariants = cva(
508
508
  ...l,
509
509
  children: d ? (
510
510
  // Icon-only mode: display only the icon
511
- n || i
511
+ i || n
512
512
  ) : (
513
513
  // Normal mode: display icon(s) and text
514
514
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
515
- n,
515
+ i,
516
516
  a,
517
- i
517
+ n
518
518
  ] })
519
519
  )
520
520
  }
@@ -537,13 +537,13 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
537
537
  }
538
538
  }), BrandLogo = forwardRef(
539
539
  ({ shape: e = "square", size: t, ...r }, s) => {
540
- const i = {
540
+ const n = {
541
541
  square: SvgSpenicleSquare,
542
542
  rounded: SvgSpenicleRounded,
543
543
  circle: SvgSpenicleCircle
544
544
  }[e] || SvgSpenicleSquare;
545
545
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
546
- i,
546
+ n,
547
547
  {
548
548
  ref: s,
549
549
  ...r,
@@ -552,10 +552,10 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
552
552
  );
553
553
  }
554
554
  ), Brand = forwardRef(
555
- ({ name: e = "spenicle", size: t = "md", shape: r, ...s }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
555
+ ({ name: e = "spenicle", size: t = "md", shape: r, ...s }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
556
556
  "span",
557
557
  {
558
- ref: n,
558
+ ref: i,
559
559
  className: cn("inline-flex items-center gap-2"),
560
560
  ...s,
561
561
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(BrandLogo, { shape: r, size: t, "aria-hidden": "true" })
@@ -616,8 +616,8 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
616
616
  className: t,
617
617
  variant: r = "primary",
618
618
  size: s = "md",
619
- disabled: n = !1,
620
- type: i = "button",
619
+ disabled: i = !1,
620
+ type: n = "button",
621
621
  children: o,
622
622
  ...a
623
623
  }, l) {
@@ -625,11 +625,11 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
625
625
  "button",
626
626
  {
627
627
  ref: l,
628
- type: i,
628
+ type: n,
629
629
  className: cn(buttonVariants({ variant: r, size: s }), t),
630
- disabled: n,
631
- "aria-disabled": n,
632
- inert: n ? !0 : void 0,
630
+ disabled: i,
631
+ "aria-disabled": i,
632
+ inert: i ? !0 : void 0,
633
633
  ...a,
634
634
  children: o
635
635
  }
@@ -703,7 +703,7 @@ const SvgSpenicleSquare = (e) => /* @__PURE__ */ React.createElement("svg", { wi
703
703
  }
704
704
  );
705
705
  function useFloatingPosition(e, t = "1rem") {
706
- const r = useRef(null), [s, n] = useState({}), [i, o] = useState("fixed bottom-4 right-4"), a = useCallback(() => {
706
+ const r = useRef(null), [s, i] = useState({}), [n, o] = useState("fixed bottom-4 right-4"), a = useCallback(() => {
707
707
  const c = r.current;
708
708
  if (!c) return;
709
709
  const h = c.getBoundingClientRect().height > window.innerHeight;
@@ -717,7 +717,7 @@ function useFloatingPosition(e, t = "1rem") {
717
717
  position: "fixed",
718
718
  bottom: t,
719
719
  zIndex: 50
720
- }, p = `fixed bottom-4 ${e}-4`), n(d), o(p);
720
+ }, p = `fixed bottom-4 ${e}-4`), i(d), o(p);
721
721
  }, [e, t]);
722
722
  return useEffect(() => {
723
723
  a();
@@ -732,20 +732,20 @@ function useFloatingPosition(e, t = "1rem") {
732
732
  r.current = c, c && a();
733
733
  },
734
734
  [a]
735
- ), s, i];
735
+ ), s, n];
736
736
  }
737
737
  const ButtonFloat = forwardRef(
738
738
  function({
739
739
  className: t,
740
740
  variant: r = "primary",
741
741
  size: s = "md",
742
- side: n = "right",
743
- offset: i = "1rem",
742
+ side: i = "right",
743
+ offset: n = "1rem",
744
744
  ...o
745
745
  }, a) {
746
746
  const [l, c, x] = useFloatingPosition(
747
- n,
748
- i
747
+ i,
748
+ n
749
749
  ), [h, d] = useState(!1);
750
750
  return useEffect(() => {
751
751
  d(!0);
@@ -883,13 +883,13 @@ const buttonIconVariants = cva(
883
883
  size: "md",
884
884
  color: "primary"
885
885
  }
886
- }), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: s = "md", className: n, ...i }, o) {
886
+ }), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: s = "md", className: i, ...n }, o) {
887
887
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
888
888
  t,
889
889
  {
890
890
  ref: o,
891
- className: iconVariants({ color: r, size: s, className: n }),
892
- ...i
891
+ className: iconVariants({ color: r, size: s, className: i }),
892
+ ...n
893
893
  }
894
894
  );
895
895
  }), ButtonIcon = React__default.forwardRef(
@@ -897,8 +897,8 @@ const buttonIconVariants = cva(
897
897
  className: t,
898
898
  variant: r = "primary",
899
899
  size: s = "md",
900
- shape: n = "rounded",
901
- disabled: i = !1,
900
+ shape: i = "rounded",
901
+ disabled: n = !1,
902
902
  as: o,
903
903
  "aria-label": a,
904
904
  ...l
@@ -912,14 +912,14 @@ const buttonIconVariants = cva(
912
912
  buttonIconVariants({
913
913
  variant: r,
914
914
  size: s,
915
- shape: n
915
+ shape: i
916
916
  }),
917
917
  t
918
918
  ),
919
- disabled: i,
920
- "aria-disabled": i,
919
+ disabled: n,
920
+ "aria-disabled": n,
921
921
  "aria-label": a,
922
- inert: i ? !0 : void 0,
922
+ inert: n ? !0 : void 0,
923
923
  ...l,
924
924
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
925
925
  Icon,
@@ -1048,8 +1048,8 @@ const BUTTONS = [
1048
1048
  onChange: t,
1049
1049
  disabled: r,
1050
1050
  className: s,
1051
- "aria-label": n
1052
- }, i) => {
1051
+ "aria-label": i
1052
+ }, n) => {
1053
1053
  const { input: o, inputRef: a, handleButton: l, handleInput: c } = useCalculator({
1054
1054
  initialValue: e,
1055
1055
  disabled: r,
@@ -1058,9 +1058,9 @@ const BUTTONS = [
1058
1058
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1059
1059
  "div",
1060
1060
  {
1061
- ref: i,
1061
+ ref: n,
1062
1062
  className: cn(calculatorRootVariants({ disabled: r }), s),
1063
- "aria-label": n || "Calculator",
1063
+ "aria-label": i || "Calculator",
1064
1064
  role: "region",
1065
1065
  children: [
1066
1066
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -1178,8 +1178,8 @@ const textVariants = cva("", {
1178
1178
  color: t = "ghost",
1179
1179
  hasUnderline: r = !1,
1180
1180
  isCapitalize: s = !1,
1181
- align: n = "left",
1182
- italic: i = !1,
1181
+ align: i = "left",
1182
+ italic: n = !1,
1183
1183
  clamp: o = "none",
1184
1184
  ellipsis: a = !1,
1185
1185
  fontSize: l,
@@ -1208,8 +1208,8 @@ const textVariants = cva("", {
1208
1208
  color: t,
1209
1209
  hasUnderline: r,
1210
1210
  isCapitalize: s,
1211
- align: n,
1212
- italic: i,
1211
+ align: i,
1212
+ italic: n,
1213
1213
  clamp: o,
1214
1214
  ellipsis: a,
1215
1215
  // @ts-expect-error - `as` is not a valid variant
@@ -1267,7 +1267,7 @@ const CalendarHeader = () => {
1267
1267
  ] })
1268
1268
  ] });
1269
1269
  }, CalendarWeekdays = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 px-4 text-ghost-500 mb-3", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((e) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fontSize: "xs", color: "ghost", align: "center", children: e }, e)) }), CalendarDaysSingle = () => {
1270
- const e = useCalendarContext(), { year: t, month: r, value: s, onChange: n, setMonth: i, setYear: o } = e, a = (g, m) => new Date(g, m + 1, 0).getDate(), c = ((g, m) => new Date(g, m, 1).getDay())(t, r), x = a(t, r), h = r - 1 < 0 ? 11 : r - 1, d = r === 0 ? t - 1 : t, p = a(t, h), y = r === 11 ? 0 : r + 1, f = r === 11 ? t + 1 : t, v = [];
1270
+ const e = useCalendarContext(), { year: t, month: r, value: s, onChange: i, setMonth: n, setYear: o } = e, a = (g, m) => new Date(g, m + 1, 0).getDate(), c = ((g, m) => new Date(g, m, 1).getDay())(t, r), x = a(t, r), h = r - 1 < 0 ? 11 : r - 1, d = r === 0 ? t - 1 : t, p = a(t, h), y = r === 11 ? 0 : r + 1, f = r === 11 ? t + 1 : t, v = [];
1271
1271
  for (let g = 0; g < c; g++) {
1272
1272
  const m = p - c + g + 1;
1273
1273
  v.push(
@@ -1279,7 +1279,7 @@ const CalendarHeader = () => {
1279
1279
  "aria-label": "Previous month day",
1280
1280
  variant: "ghost",
1281
1281
  onClick: () => {
1282
- n?.(new Date(d, h, m)), i(h), o(d);
1282
+ i?.(new Date(d, h, m)), n(h), o(d);
1283
1283
  }
1284
1284
  },
1285
1285
  "prev-" + g
@@ -1307,7 +1307,7 @@ const CalendarHeader = () => {
1307
1307
  "aria-label": `Select ${t}-${r + 1}-${g}`,
1308
1308
  "aria-current": m ? "date" : void 0,
1309
1309
  onClick: () => {
1310
- n?.(new Date(t, r, g));
1310
+ i?.(new Date(t, r, g));
1311
1311
  }
1312
1312
  },
1313
1313
  g
@@ -1325,7 +1325,7 @@ const CalendarHeader = () => {
1325
1325
  "aria-label": "Next month day",
1326
1326
  variant: "ghost",
1327
1327
  onClick: () => {
1328
- n?.(new Date(f, y, g + 1)), i(y), o(f);
1328
+ i?.(new Date(f, y, g + 1)), n(y), o(f);
1329
1329
  }
1330
1330
  },
1331
1331
  "next-" + g
@@ -1333,7 +1333,7 @@ const CalendarHeader = () => {
1333
1333
  );
1334
1334
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 gap-2 px-4 pb-4", children: v });
1335
1335
  }, CalendarDaysRange = () => {
1336
- const { year: e, month: t, value: r, onChange: s, setMonth: n, setYear: i } = useCalendarContext(), o = (u, b) => new Date(u, b + 1, 0).getDate(), l = ((u, b) => new Date(u, b, 1).getDay())(e, t), c = o(e, t), x = t - 1 < 0 ? 11 : t - 1, h = t === 0 ? e - 1 : e, d = o(e, x), p = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e, f = [], v = () => {
1336
+ const { year: e, month: t, value: r, onChange: s, setMonth: i, setYear: n } = useCalendarContext(), o = (u, b) => new Date(u, b + 1, 0).getDate(), l = ((u, b) => new Date(u, b, 1).getDay())(e, t), c = o(e, t), x = t - 1 < 0 ? 11 : t - 1, h = t === 0 ? e - 1 : e, d = o(e, x), p = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e, f = [], v = () => {
1337
1337
  if (!Array.isArray(r)) return [null, null];
1338
1338
  const [u, b] = r;
1339
1339
  return !u && !b ? [null, null] : u && b ? u <= b ? [u, b] : [b, u] : [u, b];
@@ -1353,7 +1353,7 @@ const CalendarHeader = () => {
1353
1353
  "aria-label": "Previous month day",
1354
1354
  variant: "ghost",
1355
1355
  onClick: () => {
1356
- s?.([null, null]), n(x), i(h);
1356
+ s?.([null, null]), i(x), n(h);
1357
1357
  }
1358
1358
  },
1359
1359
  "prev-" + u
@@ -1408,7 +1408,7 @@ const CalendarHeader = () => {
1408
1408
  "aria-label": "Next month day",
1409
1409
  variant: "ghost",
1410
1410
  onClick: () => {
1411
- s?.([null, null]), n(p), i(y);
1411
+ s?.([null, null]), i(p), n(y);
1412
1412
  }
1413
1413
  },
1414
1414
  "next-" + u
@@ -1424,21 +1424,21 @@ function useCalendar({
1424
1424
  type: t,
1425
1425
  onChange: r,
1426
1426
  initialYear: s,
1427
- initialMonth: n
1427
+ initialMonth: i
1428
1428
  }) {
1429
- const [i, o] = useState(n), [a, l] = useState(s), [c, x] = useState([
1429
+ const [n, o] = useState(i), [a, l] = useState(s), [c, x] = useState([
1430
1430
  null,
1431
1431
  null
1432
1432
  ]);
1433
1433
  let h = e;
1434
1434
  t === "range" && !e && (h = c);
1435
1435
  const d = useCallback(() => {
1436
- const f = i === 0 ? 11 : i - 1, v = i === 0 ? a - 1 : a;
1436
+ const f = n === 0 ? 11 : n - 1, v = n === 0 ? a - 1 : a;
1437
1437
  o(f), l(v), t === "single" && r?.(new Date(v, f, 1));
1438
- }, [i, a, t, r]), p = useCallback(() => {
1439
- const f = i === 11 ? 0 : i + 1, v = i === 11 ? a + 1 : a;
1438
+ }, [n, a, t, r]), p = useCallback(() => {
1439
+ const f = n === 11 ? 0 : n + 1, v = n === 11 ? a + 1 : a;
1440
1440
  o(f), l(v), t === "single" && r?.(new Date(v, f, 1));
1441
- }, [i, a, t, r]), y = useCallback(
1441
+ }, [n, a, t, r]), y = useCallback(
1442
1442
  (f) => {
1443
1443
  t === "single" ? r?.(f) : t === "range" && (x(f), r?.(f));
1444
1444
  },
@@ -1446,7 +1446,7 @@ function useCalendar({
1446
1446
  );
1447
1447
  return {
1448
1448
  year: a,
1449
- month: i,
1449
+ month: n,
1450
1450
  value: h,
1451
1451
  setMonth: o,
1452
1452
  setYear: l,
@@ -1460,14 +1460,14 @@ const CalendarRoot = ({
1460
1460
  onChange: t,
1461
1461
  className: r,
1462
1462
  type: s = "single",
1463
- ...n
1463
+ ...i
1464
1464
  }) => {
1465
- const i = /* @__PURE__ */ new Date(), o = useCalendar({
1465
+ const n = /* @__PURE__ */ new Date(), o = useCalendar({
1466
1466
  value: e,
1467
1467
  onChange: t,
1468
1468
  type: s,
1469
- initialYear: i.getFullYear(),
1470
- initialMonth: i.getMonth()
1469
+ initialYear: n.getFullYear(),
1470
+ initialMonth: n.getMonth()
1471
1471
  });
1472
1472
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1473
1473
  CalendarContext.Provider,
@@ -1481,7 +1481,7 @@ const CalendarRoot = ({
1481
1481
  setYear: o.setYear,
1482
1482
  onChange: o.onChange
1483
1483
  },
1484
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("select-none", r), ...n, children: [
1484
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("select-none", r), ...i, children: [
1485
1485
  /* @__PURE__ */ jsxRuntimeExports.jsx(CalendarHeader, {}),
1486
1486
  /* @__PURE__ */ jsxRuntimeExports.jsx(CalendarWeekdays, {}),
1487
1487
  /* @__PURE__ */ jsxRuntimeExports.jsx(CalendarDays, {})
@@ -1545,12 +1545,12 @@ const CalendarRoot = ({
1545
1545
  }
1546
1546
  }
1547
1547
  ), Tile = forwardRef(
1548
- ({ variant: e = "white", size: t = "md", shape: r = "rounded", className: s, ...n }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1548
+ ({ variant: e = "white", size: t = "md", shape: r = "rounded", className: s, ...i }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1549
1549
  "div",
1550
1550
  {
1551
- ref: i,
1551
+ ref: n,
1552
1552
  className: cn(tileVariants({ variant: e, size: t, shape: r }), s),
1553
- ...n
1553
+ ...i
1554
1554
  }
1555
1555
  )
1556
1556
  ), Card = forwardRef(
@@ -1559,8 +1559,8 @@ const CalendarRoot = ({
1559
1559
  shape: t = "rounded",
1560
1560
  avatar: r,
1561
1561
  title: s,
1562
- subtitle: n,
1563
- badge: i,
1562
+ subtitle: i,
1563
+ badge: n,
1564
1564
  supplementaryInfo: o,
1565
1565
  className: a,
1566
1566
  ...l
@@ -1573,18 +1573,83 @@ const CalendarRoot = ({
1573
1573
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4", children: [
1574
1574
  r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r }),
1575
1575
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
1576
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("mb-4", !i && !o && "mb-0"), children: [
1576
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cn("mb-4", !n && !o && "mb-0"), children: [
1577
1577
  s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h3", fontSize: "base", fontWeight: "semibold", children: s }),
1578
- n && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "xs", color: "gray", children: n })
1578
+ i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "xs", color: "gray", children: i })
1579
1579
  ] }),
1580
- (i || o) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
1581
- i,
1580
+ (n || o) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
1581
+ n,
1582
1582
  o && o
1583
1583
  ] })
1584
1584
  ] })
1585
1585
  ] })
1586
1586
  }
1587
1587
  )
1588
+ ), filterChipVariants = cva(
1589
+ "inline-flex items-center gap-1.5 rounded-full font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none select-none cursor-pointer text-sm leading-none",
1590
+ {
1591
+ variants: {
1592
+ variant: {
1593
+ // Core variants using Versaur color system
1594
+ primary: "bg-primary text-white hover:bg-primary/90 focus-visible:ring-primary-light focus-visible:ring-offset-white shadow-sm",
1595
+ secondary: "bg-secondary text-white hover:bg-secondary/90 focus-visible:ring-secondary-light focus-visible:ring-offset-white shadow-sm",
1596
+ tertiary: "bg-tertiary text-white hover:bg-tertiary/90 focus-visible:ring-tertiary-light focus-visible:ring-offset-white shadow-sm",
1597
+ ghost: "bg-ghost-soft text-foreground hover:bg-ghost-light focus-visible:ring-ghost-light focus-visible:ring-offset-white",
1598
+ neutral: "bg-neutral text-foreground hover:bg-neutral/80 focus-visible:ring-foreground-light focus-visible:ring-offset-white",
1599
+ // Outline variants
1600
+ "primary-outline": "border border-primary text-primary bg-white hover:bg-primary-soft focus-visible:ring-primary-light focus-visible:ring-offset-white",
1601
+ "secondary-outline": "border border-secondary text-secondary bg-white hover:bg-secondary-soft focus-visible:ring-secondary-light focus-visible:ring-offset-white",
1602
+ "tertiary-outline": "border border-tertiary text-tertiary bg-white hover:bg-tertiary-soft focus-visible:ring-tertiary-light focus-visible:ring-offset-white",
1603
+ "ghost-outline": "border border-ghost text-ghost bg-white hover:bg-ghost-soft focus-visible:ring-ghost-light focus-visible:ring-offset-white",
1604
+ "neutral-outline": "border border-neutral text-foreground bg-white hover:bg-neutral/20 focus-visible:ring-foreground-light focus-visible:ring-offset-white",
1605
+ // Semantic variants
1606
+ success: "bg-success text-white hover:bg-success/90 focus-visible:ring-success-light focus-visible:ring-offset-white shadow-sm",
1607
+ "success-outline": "border border-success text-success bg-white hover:bg-success-soft focus-visible:ring-success-light focus-visible:ring-offset-white",
1608
+ info: "bg-info text-white hover:bg-info/90 focus-visible:ring-info-light focus-visible:ring-offset-white shadow-sm",
1609
+ "info-outline": "border border-info text-info bg-white hover:bg-info-soft focus-visible:ring-info-light focus-visible:ring-offset-white",
1610
+ warning: "bg-warning text-white hover:bg-warning/90 focus-visible:ring-warning-light focus-visible:ring-offset-white shadow-sm",
1611
+ "warning-outline": "border border-warning text-warning bg-white hover:bg-warning-soft focus-visible:ring-warning-light focus-visible:ring-offset-white",
1612
+ danger: "bg-danger text-white hover:bg-danger/90 focus-visible:ring-danger-light focus-visible:ring-offset-white shadow-sm",
1613
+ "danger-outline": "border border-danger text-danger bg-white hover:bg-danger-soft focus-visible:ring-danger-light focus-visible:ring-offset-white"
1614
+ },
1615
+ size: {
1616
+ sm: "h-7 px-3 text-xs",
1617
+ md: "h-8 px-4 text-sm",
1618
+ lg: "h-9 px-5 text-sm"
1619
+ }
1620
+ },
1621
+ defaultVariants: {
1622
+ variant: "neutral-outline",
1623
+ size: "md"
1624
+ }
1625
+ }
1626
+ ), FilterChip = React__default.forwardRef(
1627
+ function e({
1628
+ className: t,
1629
+ variant: r = "neutral-outline",
1630
+ size: s = "md",
1631
+ disabled: i = !1,
1632
+ children: n,
1633
+ ...o
1634
+ }, a) {
1635
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1636
+ "button",
1637
+ {
1638
+ ref: a,
1639
+ type: "button",
1640
+ className: cn(filterChipVariants({ variant: r, size: s }), t),
1641
+ disabled: i,
1642
+ "aria-disabled": i,
1643
+ "aria-label": `${n}, removable`,
1644
+ inert: i ? !0 : void 0,
1645
+ ...o,
1646
+ children: [
1647
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0", children: n }),
1648
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size: s === "lg" ? "md" : "sm" })
1649
+ ]
1650
+ }
1651
+ );
1652
+ }
1588
1653
  ), noResultsVariants = cva(
1589
1654
  "flex flex-col items-center justify-center text-center border border-border rounded-lg bg-background",
1590
1655
  {
@@ -1611,12 +1676,12 @@ const CalendarRoot = ({
1611
1676
  ), noResultsSubtitleVariants = cva(
1612
1677
  "text-foreground-light mb-6 max-w-md"
1613
1678
  ), NoResults = React__default.forwardRef(
1614
- function e({ icon: t, title: r, subtitle: s, action: n, className: i, hasGrayBackground: o, ...a }, l) {
1679
+ function e({ icon: t, title: r, subtitle: s, action: i, className: n, hasGrayBackground: o, ...a }, l) {
1615
1680
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1616
1681
  "section",
1617
1682
  {
1618
1683
  ref: l,
1619
- className: cn(noResultsVariants({ hasGrayBackground: o }), i),
1684
+ className: cn(noResultsVariants({ hasGrayBackground: o }), n),
1620
1685
  role: "status",
1621
1686
  "aria-label": "No results found",
1622
1687
  ...a,
@@ -1626,7 +1691,7 @@ const CalendarRoot = ({
1626
1691
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h2", className: noResultsTitleVariants(), children: r })
1627
1692
  ] }),
1628
1693
  s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", className: noResultsSubtitleVariants(), children: s }),
1629
- n && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: n })
1694
+ i && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: i })
1630
1695
  ]
1631
1696
  }
1632
1697
  );
@@ -1702,7 +1767,7 @@ const getTableColumnClass = (e) => {
1702
1767
  }
1703
1768
  }, TableHeader = forwardRef(
1704
1769
  ({ children: e, className: t, ...r }, s) => {
1705
- const { columns: n } = useTableContext();
1770
+ const { columns: i } = useTableContext();
1706
1771
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1707
1772
  "div",
1708
1773
  {
@@ -1714,7 +1779,7 @@ const getTableColumnClass = (e) => {
1714
1779
  "div",
1715
1780
  {
1716
1781
  role: "row",
1717
- className: cn("grid gap-4", getTableColumnClass(n)),
1782
+ className: cn("grid gap-4", getTableColumnClass(i)),
1718
1783
  children: e
1719
1784
  }
1720
1785
  )
@@ -1725,7 +1790,7 @@ const getTableColumnClass = (e) => {
1725
1790
  ({ children: e, className: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "rowgroup", ref: s, className: cn(t), ...r, children: e })
1726
1791
  ), TableFooter = forwardRef(
1727
1792
  ({ children: e, className: t, ...r }, s) => {
1728
- const { columns: n } = useTableContext();
1793
+ const { columns: i } = useTableContext();
1729
1794
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1730
1795
  "div",
1731
1796
  {
@@ -1737,7 +1802,7 @@ const getTableColumnClass = (e) => {
1737
1802
  "div",
1738
1803
  {
1739
1804
  role: "row",
1740
- className: cn("grid gap-4", getTableColumnClass(n)),
1805
+ className: cn("grid gap-4", getTableColumnClass(i)),
1741
1806
  children: e
1742
1807
  }
1743
1808
  )
@@ -1746,14 +1811,14 @@ const getTableColumnClass = (e) => {
1746
1811
  }
1747
1812
  ), TableRow = forwardRef(
1748
1813
  ({ children: e, className: t, ...r }, s) => {
1749
- const { columns: n } = useTableContext();
1814
+ const { columns: i } = useTableContext();
1750
1815
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1751
1816
  "div",
1752
1817
  {
1753
1818
  role: "row",
1754
1819
  className: cn(
1755
1820
  "grid gap-4",
1756
- getTableColumnClass(n),
1821
+ getTableColumnClass(i),
1757
1822
  "border-b border-border last:border-0",
1758
1823
  t
1759
1824
  ),
@@ -1764,7 +1829,7 @@ const getTableColumnClass = (e) => {
1764
1829
  );
1765
1830
  }
1766
1831
  ), TableColumn = forwardRef(
1767
- ({ as: e = "td", span: t, align: r = "left", children: s, className: n, ...i }, o) => {
1832
+ ({ as: e = "td", span: t, align: r = "left", children: s, className: i, ...n }, o) => {
1768
1833
  const a = e === "th" ? "columnheader" : "cell";
1769
1834
  let l = "text-left";
1770
1835
  return r === "center" ? l = "text-center" : r === "right" && (l = "text-right"), /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -1778,9 +1843,9 @@ const getTableColumnClass = (e) => {
1778
1843
  getRowSpanClass(t),
1779
1844
  l,
1780
1845
  "truncate overflow-hidden whitespace-nowrap",
1781
- n
1846
+ i
1782
1847
  ),
1783
- ...i,
1848
+ ...n,
1784
1849
  children: s
1785
1850
  }
1786
1851
  );
@@ -1812,10 +1877,10 @@ const getTableColumnClass = (e) => {
1812
1877
  }
1813
1878
  )
1814
1879
  ), TableRoot = forwardRef(
1815
- ({ children: e, className: t, columns: r = 12, ...s }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableProvider, { value: { columns: r }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1880
+ ({ children: e, className: t, columns: r = 12, ...s }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableProvider, { value: { columns: r }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1816
1881
  "div",
1817
1882
  {
1818
- ref: n,
1883
+ ref: i,
1819
1884
  role: "table",
1820
1885
  className: cn(
1821
1886
  // Versaur design system: border, background, shadow, rounded, spacing
@@ -1867,19 +1932,19 @@ function getColSpan(e = 4) {
1867
1932
  return "col-span-4";
1868
1933
  }
1869
1934
  }
1870
- const DescriptionListItem = forwardRef(function e({ children: t, className: r, span: s = 4, ...n }, i) {
1935
+ const DescriptionListItem = forwardRef(function e({ children: t, className: r, span: s = 4, ...i }, n) {
1871
1936
  const o = getColSpan(s);
1872
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: i, className: cn(o, r), ...n, children: t });
1937
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: n, className: cn(o, r), ...i, children: t });
1873
1938
  }), DescriptionListTerm = forwardRef(function e({ children: t, ...r }, s) {
1874
1939
  return /* @__PURE__ */ jsxRuntimeExports.jsx("dt", { ref: s, ...r, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "sm", fontWeight: "medium", color: "gray", children: t }) });
1875
- }), DescriptionListDetails = forwardRef(function e({ children: t, color: r = "black", ...s }, n) {
1876
- return /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { ref: n, ...s, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "base", fontWeight: "medium", color: r, children: t }) });
1940
+ }), DescriptionListDetails = forwardRef(function e({ children: t, color: r = "black", ...s }, i) {
1941
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("dd", { ref: i, ...s, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "base", fontWeight: "medium", color: r, children: t }) });
1877
1942
  }), DescriptionListRoot = forwardRef(
1878
- function e({ children: t, className: r, ...s }, n) {
1943
+ function e({ children: t, className: r, ...s }, i) {
1879
1944
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1880
1945
  "dl",
1881
1946
  {
1882
- ref: n,
1947
+ ref: i,
1883
1948
  className: cn("grid grid-cols-12 gap-y-4", r),
1884
1949
  ...s,
1885
1950
  children: t
@@ -1892,20 +1957,20 @@ const DescriptionListItem = forwardRef(function e({ children: t, className: r, s
1892
1957
  Details: DescriptionListDetails
1893
1958
  });
1894
1959
  function useImage({ src: e }) {
1895
- const [t, r] = useState(!1), [s, n] = useState(!1), i = useRef(!1), o = () => {
1960
+ const [t, r] = useState(!1), [s, i] = useState(!1), n = useRef(!1), o = () => {
1896
1961
  r(!0);
1897
1962
  }, a = () => {
1898
- n(!0);
1963
+ i(!0);
1899
1964
  };
1900
1965
  return useEffect(() => {
1901
1966
  if (!e) return;
1902
1967
  const l = new Image();
1903
1968
  return l.src = e, l.onload = () => {
1904
- i.current || r(!0);
1969
+ n.current || r(!0);
1905
1970
  }, l.onerror = () => {
1906
- i.current || n(!0);
1971
+ n.current || i(!0);
1907
1972
  }, () => {
1908
- i.current = !0;
1973
+ n.current = !0;
1909
1974
  };
1910
1975
  }, [e]), {
1911
1976
  loaded: t,
@@ -1972,13 +2037,13 @@ function BaseImageSkeleton({
1972
2037
  shape: t,
1973
2038
  size: r,
1974
2039
  height: s,
1975
- width: n
2040
+ width: i
1976
2041
  }) {
1977
2042
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1978
2043
  Skeleton,
1979
2044
  {
1980
2045
  className: cn(imageAtomVariants({ shape: t, size: r }), e),
1981
- style: { height: s, width: n }
2046
+ style: { height: s, width: i }
1982
2047
  }
1983
2048
  );
1984
2049
  }
@@ -1987,15 +2052,15 @@ function BaseImageFallback({
1987
2052
  width: t,
1988
2053
  height: r,
1989
2054
  className: s,
1990
- style: n,
1991
- shape: i,
2055
+ style: i,
2056
+ shape: n,
1992
2057
  size: o
1993
2058
  }) {
1994
2059
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1995
2060
  "div",
1996
2061
  {
1997
- className: imageAtomVariants({ shape: i, size: o, className: s }),
1998
- style: { width: t, height: r, ...n },
2062
+ className: imageAtomVariants({ shape: n, size: o, className: s }),
2063
+ style: { width: t, height: r, ...i },
1999
2064
  "aria-label": e,
2000
2065
  role: "img",
2001
2066
  children: [
@@ -2018,8 +2083,8 @@ const BaseImage = forwardRef(
2018
2083
  alt: t,
2019
2084
  onLoad: r,
2020
2085
  onError: s,
2021
- width: n,
2022
- height: i,
2086
+ width: i,
2087
+ height: n,
2023
2088
  loading: o = "lazy",
2024
2089
  position: a = "cover",
2025
2090
  size: l = "auto",
@@ -2029,7 +2094,7 @@ const BaseImage = forwardRef(
2029
2094
  }, d) => {
2030
2095
  const { loaded: p, errored: y, handleLoad: f, handleError: v } = useImage({
2031
2096
  src: e
2032
- }), w = typeof n == "number" ? n : Number(n), g = typeof i == "number" ? i : Number(i);
2097
+ }), w = typeof i == "number" ? i : Number(i), g = typeof n == "number" ? n : Number(n);
2033
2098
  return !p && !y ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2034
2099
  BaseImageSkeleton,
2035
2100
  {
@@ -2078,6 +2143,7 @@ export {
2078
2143
  Badge as B,
2079
2144
  Calculator as C,
2080
2145
  DescriptionList as D,
2146
+ FilterChip as F,
2081
2147
  Icon as I,
2082
2148
  NoResults as N,
2083
2149
  Table as T,