@kjaniec-dev/ui 0.9.2 → 0.9.3

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.cjs CHANGED
@@ -115,20 +115,17 @@ var Badge = React52__namespace.forwardRef(
115
115
  ] })
116
116
  );
117
117
  Badge.displayName = "Badge";
118
- var alertVariants = classVarianceAuthority.cva(
119
- "flex gap-3 items-start p-[0.9rem_1.1rem] rounded-kj-md border text-sm",
120
- {
121
- variants: {
122
- variant: {
123
- info: "bg-info-surface border-info/30",
124
- success: "bg-success-surface border-success/30",
125
- warning: "bg-warning-surface border-warning/30",
126
- danger: "bg-danger-surface border-danger/30"
127
- }
128
- },
129
- defaultVariants: { variant: "info" }
130
- }
131
- );
118
+ var alertVariants = classVarianceAuthority.cva("flex gap-3 items-start p-[0.9rem_1.1rem] rounded-kj-md border text-sm", {
119
+ variants: {
120
+ variant: {
121
+ info: "bg-info-surface border-info/30",
122
+ success: "bg-success-surface border-success/30",
123
+ warning: "bg-warning-surface border-warning/30",
124
+ danger: "bg-danger-surface border-danger/30"
125
+ }
126
+ },
127
+ defaultVariants: { variant: "info" }
128
+ });
132
129
  var iconColor = {
133
130
  info: "text-info",
134
131
  success: "text-success",
@@ -137,7 +134,16 @@ var iconColor = {
137
134
  };
138
135
  var Alert = React52__namespace.forwardRef(
139
136
  ({ className, variant = "info", icon, title, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props, children: [
140
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("shrink-0 mt-0.5 [&_svg]:h-[1.15rem] [&_svg]:w-[1.15rem]", iconColor[variant ?? "info"]), children: icon }),
137
+ icon && /* @__PURE__ */ jsxRuntime.jsx(
138
+ "span",
139
+ {
140
+ className: cn(
141
+ "shrink-0 mt-0.5 [&_svg]:h-[1.15rem] [&_svg]:w-[1.15rem]",
142
+ iconColor[variant ?? "info"]
143
+ ),
144
+ children: icon
145
+ }
146
+ ),
141
147
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-foreground", children: [
142
148
  title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-bold m-0 mb-0.5 text-sm", children: title }),
143
149
  children && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 opacity-85", children })
@@ -193,10 +199,18 @@ var Progress = React52__namespace.forwardRef(
193
199
  );
194
200
  Progress.displayName = "Progress";
195
201
  var Label = React52__namespace.forwardRef(
196
- ({ className, required, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("label", { ref, className: cn("text-[0.8rem] font-semibold text-foreground", className), ...props, children: [
197
- children,
198
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger", children: " *" })
199
- ] })
202
+ ({ className, required, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
203
+ "label",
204
+ {
205
+ ref,
206
+ className: cn("text-[0.8rem] font-semibold text-foreground", className),
207
+ ...props,
208
+ children: [
209
+ children,
210
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger", children: " *" })
211
+ ]
212
+ }
213
+ )
200
214
  );
201
215
  Label.displayName = "Label";
202
216
  var Hint = React52__namespace.forwardRef(
@@ -222,11 +236,7 @@ var FormField = React52__namespace.forwardRef(
222
236
  const child = React52__namespace.Children.only(children);
223
237
  const clonedChild = React52__namespace.cloneElement(child, {
224
238
  id: child.props.id ?? id,
225
- "aria-describedby": cn(
226
- hint && hintId,
227
- error && errorId,
228
- child.props["aria-describedby"]
229
- ) || void 0,
239
+ "aria-describedby": cn(hint && hintId, error && errorId, child.props["aria-describedby"]) || void 0,
230
240
  "aria-invalid": error ? "true" : void 0,
231
241
  required: child.props.required ?? required
232
242
  });
@@ -362,11 +372,21 @@ var ProgressRing = React52__namespace.forwardRef(
362
372
  ProgressRing.displayName = "ProgressRing";
363
373
  var ProgressRingField = React52__namespace.forwardRef(
364
374
  ({ label, hint, error, required, fieldClassName, ...ringProps }, ref) => {
365
- return /* @__PURE__ */ jsxRuntime.jsx(FormField, { label, hint, error, required, className: fieldClassName, children: /* @__PURE__ */ jsxRuntime.jsx(ProgressRing, { ref, "aria-label": ringProps["aria-label"] ?? label, ...ringProps }) });
375
+ return /* @__PURE__ */ jsxRuntime.jsx(
376
+ FormField,
377
+ {
378
+ label,
379
+ hint,
380
+ error,
381
+ required,
382
+ className: fieldClassName,
383
+ children: /* @__PURE__ */ jsxRuntime.jsx(ProgressRing, { ref, "aria-label": ringProps["aria-label"] ?? label, ...ringProps })
384
+ }
385
+ );
366
386
  }
367
387
  );
368
388
  ProgressRingField.displayName = "ProgressRingField";
369
- var baseField = "w-full font-sans text-sm text-foreground bg-surface border rounded-kj-md px-[0.85rem] transition-[border-color,box-shadow] duration-150 placeholder:text-muted-foreground focus:outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/30 disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed";
389
+ var baseField = "w-full font-sans text-sm text-foreground bg-surface border rounded-kj-md px-[0.85rem] transition-[border-color,box-shadow] duration-150 placeholder:text-muted-foreground hover:border-control-border-hover focus:outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/30 disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed";
370
390
  var Input = React52__namespace.forwardRef(
371
391
  ({ className, error, leadingIcon, ...props }, ref) => {
372
392
  const field = /* @__PURE__ */ jsxRuntime.jsx(
@@ -454,11 +474,33 @@ var Checkbox = React52__namespace.forwardRef(
454
474
  ({ className, label, id, ...props }, ref) => {
455
475
  const autoId = React52__namespace.useId();
456
476
  const inputId = id ?? autoId;
457
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: cn("inline-flex items-center gap-2.5 cursor-pointer text-sm select-none", className), children: [
458
- /* @__PURE__ */ jsxRuntime.jsx("input", { ref, id: inputId, type: "checkbox", className: "peer sr-only", ...props }),
459
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grid place-items-center h-[1.15rem] w-[1.15rem] shrink-0 rounded-[0.4rem] border-[1.5px] border-input bg-surface transition-all duration-150 peer-checked:bg-primary peer-checked:border-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 peer-checked:[&_svg]:opacity-100 peer-checked:[&_svg]:scale-100", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round", className: "h-3 w-3 text-primary-foreground opacity-0 scale-50 transition-all duration-150", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" }) }) }),
460
- label
461
- ] });
477
+ return /* @__PURE__ */ jsxRuntime.jsxs(
478
+ "label",
479
+ {
480
+ htmlFor: inputId,
481
+ className: cn(
482
+ "inline-flex items-center gap-2.5 cursor-pointer text-sm select-none",
483
+ className
484
+ ),
485
+ children: [
486
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ref, id: inputId, type: "checkbox", className: "peer sr-only", ...props }),
487
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grid place-items-center h-[1.15rem] w-[1.15rem] shrink-0 rounded-[0.4rem] border-[1.5px] border-input bg-surface transition-all duration-150 peer-checked:bg-primary peer-checked:border-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 peer-checked:[&_svg]:opacity-100 peer-checked:[&_svg]:scale-100", children: /* @__PURE__ */ jsxRuntime.jsx(
488
+ "svg",
489
+ {
490
+ viewBox: "0 0 24 24",
491
+ fill: "none",
492
+ stroke: "currentColor",
493
+ strokeWidth: 3,
494
+ strokeLinecap: "round",
495
+ strokeLinejoin: "round",
496
+ className: "h-3 w-3 text-primary-foreground opacity-0 scale-50 transition-all duration-150",
497
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" })
498
+ }
499
+ ) }),
500
+ label
501
+ ]
502
+ }
503
+ );
462
504
  }
463
505
  );
464
506
  Checkbox.displayName = "Checkbox";
@@ -466,11 +508,21 @@ var Radio = React52__namespace.forwardRef(
466
508
  ({ className, label, id, ...props }, ref) => {
467
509
  const autoId = React52__namespace.useId();
468
510
  const inputId = id ?? autoId;
469
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: cn("inline-flex items-center gap-2.5 cursor-pointer text-sm select-none", className), children: [
470
- /* @__PURE__ */ jsxRuntime.jsx("input", { ref, id: inputId, type: "radio", className: "peer sr-only", ...props }),
471
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grid place-items-center h-[1.15rem] w-[1.15rem] shrink-0 rounded-full border-[1.5px] border-input bg-surface transition-all duration-150 peer-checked:bg-primary peer-checked:border-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 peer-checked:[&>span]:opacity-100 peer-checked:[&>span]:scale-100", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2 w-2 rounded-full bg-primary-foreground opacity-0 scale-[0.4] transition-all duration-150" }) }),
472
- label
473
- ] });
511
+ return /* @__PURE__ */ jsxRuntime.jsxs(
512
+ "label",
513
+ {
514
+ htmlFor: inputId,
515
+ className: cn(
516
+ "inline-flex items-center gap-2.5 cursor-pointer text-sm select-none",
517
+ className
518
+ ),
519
+ children: [
520
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ref, id: inputId, type: "radio", className: "peer sr-only", ...props }),
521
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "grid place-items-center h-[1.15rem] w-[1.15rem] shrink-0 rounded-full border-[1.5px] border-input bg-surface transition-all duration-150 peer-checked:bg-primary peer-checked:border-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 peer-checked:[&>span]:opacity-100 peer-checked:[&>span]:scale-100", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2 w-2 rounded-full bg-primary-foreground opacity-0 scale-[0.4] transition-all duration-150" }) }),
522
+ label
523
+ ]
524
+ }
525
+ );
474
526
  }
475
527
  );
476
528
  Radio.displayName = "Radio";
@@ -501,19 +553,37 @@ var Switch = React52__namespace.forwardRef(
501
553
  ({ className, label, id, ...props }, ref) => {
502
554
  const autoId = React52__namespace.useId();
503
555
  const inputId = id ?? autoId;
504
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: cn("inline-flex items-center gap-2.5 cursor-pointer text-sm select-none", className), children: [
505
- /* @__PURE__ */ jsxRuntime.jsx("input", { ref, id: inputId, type: "checkbox", role: "switch", className: "peer sr-only", ...props }),
506
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative h-[1.45rem] w-[2.6rem] shrink-0 rounded-full bg-input transition-colors duration-200 peer-checked:bg-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:h-[calc(1.45rem-4px)] after:w-[calc(1.45rem-4px)] after:rounded-full after:bg-white after:shadow-kj-sm after:transition-transform after:duration-200 peer-checked:after:translate-x-[1.15rem]" }),
507
- label
508
- ] });
556
+ return /* @__PURE__ */ jsxRuntime.jsxs(
557
+ "label",
558
+ {
559
+ htmlFor: inputId,
560
+ className: cn(
561
+ "inline-flex items-center gap-2.5 cursor-pointer text-sm select-none",
562
+ className
563
+ ),
564
+ children: [
565
+ /* @__PURE__ */ jsxRuntime.jsx(
566
+ "input",
567
+ {
568
+ ref,
569
+ id: inputId,
570
+ type: "checkbox",
571
+ role: "switch",
572
+ className: "peer sr-only",
573
+ ...props
574
+ }
575
+ ),
576
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative h-[1.45rem] w-[2.6rem] shrink-0 rounded-full bg-input transition-colors duration-200 peer-checked:bg-primary peer-focus-visible:ring-[3px] peer-focus-visible:ring-ring/35 after:content-[''] after:absolute after:top-0.5 after:left-0.5 after:h-[calc(1.45rem-4px)] after:w-[calc(1.45rem-4px)] after:rounded-full after:bg-white after:shadow-kj-sm after:transition-transform after:duration-200 peer-checked:after:translate-x-[1.15rem]" }),
577
+ label
578
+ ]
579
+ }
580
+ );
509
581
  }
510
582
  );
511
583
  Switch.displayName = "Switch";
512
584
  var Slider = React52__namespace.forwardRef(
513
585
  ({ className, style, value, defaultValue, min = 0, max = 100, onChange, ...props }, ref) => {
514
- const [localValue, setLocalValue] = React52__namespace.useState(
515
- Number(defaultValue ?? value ?? 50)
516
- );
586
+ const [localValue, setLocalValue] = React52__namespace.useState(Number(defaultValue ?? value ?? 50));
517
587
  const isControlled = value !== void 0;
518
588
  const currentVal = isControlled ? Number(value) : localValue;
519
589
  const numMin = Number(min);
@@ -650,13 +720,9 @@ var CardHeader = React52__namespace.forwardRef(
650
720
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-[1.35rem] flex flex-col gap-1", className), ...props })
651
721
  );
652
722
  CardHeader.displayName = "CardHeader";
653
- var CardTitle = React52__namespace.forwardRef(
654
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("m-0 text-base font-bold tracking-[-0.01em]", className), ...props, children })
655
- );
723
+ var CardTitle = React52__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("m-0 text-base font-bold tracking-[-0.01em]", className), ...props, children }));
656
724
  CardTitle.displayName = "CardTitle";
657
- var CardDescription = React52__namespace.forwardRef(
658
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("m-0 text-[0.85rem] text-muted-foreground", className), ...props })
659
- );
725
+ var CardDescription = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("m-0 text-[0.85rem] text-muted-foreground", className), ...props }));
660
726
  CardDescription.displayName = "CardDescription";
661
727
  var CardContent = React52__namespace.forwardRef(
662
728
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("px-[1.35rem] pb-[1.35rem]", className), ...props })
@@ -667,7 +733,10 @@ var CardFooter = React52__namespace.forwardRef(
667
733
  "div",
668
734
  {
669
735
  ref,
670
- className: cn("flex gap-2.5 px-[1.35rem] py-[1.1rem] border-t border-border bg-muted/40", className),
736
+ className: cn(
737
+ "flex gap-2.5 px-[1.35rem] py-[1.1rem] border-t border-border bg-muted/40",
738
+ className
739
+ ),
671
740
  ...props
672
741
  }
673
742
  )
@@ -715,7 +784,15 @@ var avatarVariants = classVarianceAuthority.cva(
715
784
  );
716
785
  var Avatar = React52__namespace.forwardRef(
717
786
  ({ className, size, tone, src, alt, status, children, ...props }, ref) => {
718
- const node = /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: cn(avatarVariants({ size, tone }), "overflow-hidden", className), ...props, children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "h-full w-full object-cover" }) : children });
787
+ const node = /* @__PURE__ */ jsxRuntime.jsx(
788
+ "span",
789
+ {
790
+ ref,
791
+ className: cn(avatarVariants({ size, tone }), "overflow-hidden", className),
792
+ ...props,
793
+ children: src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "h-full w-full object-cover" }) : children
794
+ }
795
+ );
719
796
  if (!status) return node;
720
797
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex", children: [
721
798
  node,
@@ -734,7 +811,14 @@ function useTabs() {
734
811
  if (!ctx) throw new Error("Tabs.* must be used within <Tabs>");
735
812
  return ctx;
736
813
  }
737
- function Tabs({ value, defaultValue, onValueChange, className, children, ...props }) {
814
+ function Tabs({
815
+ value,
816
+ defaultValue,
817
+ onValueChange,
818
+ className,
819
+ children,
820
+ ...props
821
+ }) {
738
822
  const [internal, setInternal] = React52__namespace.useState(defaultValue ?? "");
739
823
  const uid = React52__namespace.useId();
740
824
  const current = value ?? internal;
@@ -844,7 +928,13 @@ var TabsContent = React52__namespace.forwardRef(
844
928
  );
845
929
  TabsContent.displayName = "TabsContent";
846
930
  var AccordionContext = React52__namespace.createContext(null);
847
- function Accordion({ type = "single", defaultValue = [], className, children, ...props }) {
931
+ function Accordion({
932
+ type = "single",
933
+ defaultValue = [],
934
+ className,
935
+ children,
936
+ ...props
937
+ }) {
848
938
  const [open, setOpen] = React52__namespace.useState(defaultValue);
849
939
  const toggle = React52__namespace.useCallback(
850
940
  (v) => {
@@ -856,72 +946,97 @@ function Accordion({ type = "single", defaultValue = [], className, children, ..
856
946
  },
857
947
  [type]
858
948
  );
859
- return /* @__PURE__ */ jsxRuntime.jsx(AccordionContext.Provider, { value: { open, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("border border-border rounded-kj-lg overflow-hidden", className), ...props, children }) });
949
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionContext.Provider, { value: { open, toggle }, children: /* @__PURE__ */ jsxRuntime.jsx(
950
+ "div",
951
+ {
952
+ className: cn("border border-border rounded-kj-lg overflow-hidden", className),
953
+ ...props,
954
+ children
955
+ }
956
+ ) });
860
957
  }
861
958
  var ItemContext = React52__namespace.createContext("");
862
959
  var AccordionItem = React52__namespace.forwardRef(
863
- ({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ItemContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("border-t border-border first:border-t-0", className), ...props }) })
960
+ ({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ItemContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
961
+ "div",
962
+ {
963
+ ref,
964
+ className: cn("border-t border-border first:border-t-0", className),
965
+ ...props
966
+ }
967
+ ) })
864
968
  );
865
969
  AccordionItem.displayName = "AccordionItem";
866
- var AccordionTrigger = React52__namespace.forwardRef(
867
- ({ className, children, ...props }, ref) => {
868
- const ctx = React52__namespace.useContext(AccordionContext);
869
- const value = React52__namespace.useContext(ItemContext);
870
- const isOpen = ctx.open.includes(value);
871
- return /* @__PURE__ */ jsxRuntime.jsxs(
872
- "button",
873
- {
874
- ref,
875
- type: "button",
876
- "aria-expanded": isOpen,
877
- onClick: () => ctx.toggle(value),
878
- className: cn(
879
- "w-full flex justify-between items-center gap-4 text-left px-[1.2rem] py-4 bg-card text-foreground text-[0.9rem] font-semibold cursor-pointer hover:bg-muted transition-colors",
880
- className
881
- ),
882
- ...props,
883
- children: [
884
- children,
885
- /* @__PURE__ */ jsxRuntime.jsx(
886
- "svg",
887
- {
888
- className: cn("shrink-0 text-muted-foreground transition-transform duration-200", isOpen && "rotate-180"),
889
- width: 18,
890
- height: 18,
891
- viewBox: "0 0 24 24",
892
- fill: "none",
893
- stroke: "currentColor",
894
- strokeWidth: 2,
895
- strokeLinecap: "round",
896
- strokeLinejoin: "round",
897
- children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" })
898
- }
899
- )
900
- ]
901
- }
902
- );
903
- }
904
- );
970
+ var AccordionTrigger = React52__namespace.forwardRef(({ className, children, ...props }, ref) => {
971
+ const ctx = React52__namespace.useContext(AccordionContext);
972
+ const value = React52__namespace.useContext(ItemContext);
973
+ const isOpen = ctx.open.includes(value);
974
+ return /* @__PURE__ */ jsxRuntime.jsxs(
975
+ "button",
976
+ {
977
+ ref,
978
+ type: "button",
979
+ "aria-expanded": isOpen,
980
+ onClick: () => ctx.toggle(value),
981
+ className: cn(
982
+ "w-full flex justify-between items-center gap-4 text-left px-[1.2rem] py-4 bg-card text-foreground text-[0.9rem] font-semibold cursor-pointer hover:bg-muted transition-colors",
983
+ className
984
+ ),
985
+ ...props,
986
+ children: [
987
+ children,
988
+ /* @__PURE__ */ jsxRuntime.jsx(
989
+ "svg",
990
+ {
991
+ className: cn(
992
+ "shrink-0 text-muted-foreground transition-transform duration-200",
993
+ isOpen && "rotate-180"
994
+ ),
995
+ width: 18,
996
+ height: 18,
997
+ viewBox: "0 0 24 24",
998
+ fill: "none",
999
+ stroke: "currentColor",
1000
+ strokeWidth: 2,
1001
+ strokeLinecap: "round",
1002
+ strokeLinejoin: "round",
1003
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" })
1004
+ }
1005
+ )
1006
+ ]
1007
+ }
1008
+ );
1009
+ });
905
1010
  AccordionTrigger.displayName = "AccordionTrigger";
906
- var AccordionContent = React52__namespace.forwardRef(
907
- ({ className, children, ...props }, ref) => {
908
- const ctx = React52__namespace.useContext(AccordionContext);
909
- const value = React52__namespace.useContext(ItemContext);
910
- const isOpen = ctx.open.includes(value);
911
- return /* @__PURE__ */ jsxRuntime.jsx(
912
- "div",
913
- {
914
- ref,
915
- className: cn("grid transition-[grid-template-rows] duration-200 ease-out", isOpen ? "[grid-template-rows:1fr]" : "[grid-template-rows:0fr]"),
916
- ...props,
917
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("px-[1.2rem] pt-3 pb-4 text-[0.85rem] text-muted-foreground", className), children }) })
918
- }
919
- );
920
- }
921
- );
1011
+ var AccordionContent = React52__namespace.forwardRef(({ className, children, ...props }, ref) => {
1012
+ const ctx = React52__namespace.useContext(AccordionContext);
1013
+ const value = React52__namespace.useContext(ItemContext);
1014
+ const isOpen = ctx.open.includes(value);
1015
+ return /* @__PURE__ */ jsxRuntime.jsx(
1016
+ "div",
1017
+ {
1018
+ ref,
1019
+ className: cn(
1020
+ "grid transition-[grid-template-rows] duration-200 ease-out",
1021
+ isOpen ? "[grid-template-rows:1fr]" : "[grid-template-rows:0fr]"
1022
+ ),
1023
+ ...props,
1024
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
1025
+ "div",
1026
+ {
1027
+ className: cn("px-[1.2rem] pt-3 pb-4 text-[0.85rem] text-muted-foreground", className),
1028
+ children
1029
+ }
1030
+ ) })
1031
+ }
1032
+ );
1033
+ });
922
1034
  AccordionContent.displayName = "AccordionContent";
923
1035
  var MenuContext = React52__namespace.createContext(null);
924
- function DropdownMenu({ children, className }) {
1036
+ function DropdownMenu({
1037
+ children,
1038
+ className
1039
+ }) {
925
1040
  const [open, setOpen] = React52__namespace.useState(false);
926
1041
  const ref = React52__namespace.useRef(null);
927
1042
  React52__namespace.useEffect(() => {
@@ -972,14 +1087,21 @@ var DropdownMenuTrigger = React52__namespace.forwardRef(({ onClick, asChild, ...
972
1087
  );
973
1088
  });
974
1089
  DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
975
- function DropdownMenuContent({ className, align = "start", children, ...props }) {
1090
+ function DropdownMenuContent({
1091
+ className,
1092
+ align = "start",
1093
+ children,
1094
+ ...props
1095
+ }) {
976
1096
  const ctx = React52__namespace.useContext(MenuContext);
977
1097
  const ref = React52__namespace.useRef(null);
978
1098
  React52__namespace.useEffect(() => {
979
1099
  if (!ctx.open) return;
980
1100
  const container = ref.current;
981
1101
  if (container) {
982
- const items = Array.from(container.querySelectorAll('[role="menuitem"]'));
1102
+ const items = Array.from(
1103
+ container.querySelectorAll('[role="menuitem"]')
1104
+ );
983
1105
  if (items.length > 0) {
984
1106
  setTimeout(() => items[0].focus(), 50);
985
1107
  }
@@ -1055,7 +1177,16 @@ function DropdownMenuSeparator({ className }) {
1055
1177
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-px bg-border my-1.5", className), role: "separator" });
1056
1178
  }
1057
1179
  var Breadcrumb = React52__namespace.forwardRef(
1058
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, "aria-label": "Breadcrumb", className: cn("flex items-center gap-1.5 text-[0.85rem] text-muted-foreground", className), ...props, children })
1180
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1181
+ "nav",
1182
+ {
1183
+ ref,
1184
+ "aria-label": "Breadcrumb",
1185
+ className: cn("flex items-center gap-1.5 text-[0.85rem] text-muted-foreground", className),
1186
+ ...props,
1187
+ children
1188
+ }
1189
+ )
1059
1190
  );
1060
1191
  Breadcrumb.displayName = "Breadcrumb";
1061
1192
  var BreadcrumbItem = React52__namespace.forwardRef(
@@ -1063,7 +1194,18 @@ var BreadcrumbItem = React52__namespace.forwardRef(
1063
1194
  if (current) {
1064
1195
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-current": "page", className: cn("text-foreground font-semibold", className), children });
1065
1196
  }
1066
- return /* @__PURE__ */ jsxRuntime.jsx("a", { ref, className: cn("text-inherit no-underline hover:text-foreground transition-colors", className), ...props, children });
1197
+ return /* @__PURE__ */ jsxRuntime.jsx(
1198
+ "a",
1199
+ {
1200
+ ref,
1201
+ className: cn(
1202
+ "text-inherit no-underline hover:text-foreground transition-colors",
1203
+ className
1204
+ ),
1205
+ ...props,
1206
+ children
1207
+ }
1208
+ );
1067
1209
  }
1068
1210
  );
1069
1211
  BreadcrumbItem.displayName = "BreadcrumbItem";
@@ -1084,11 +1226,34 @@ function paginate(page, pageCount) {
1084
1226
  items.push(pageCount);
1085
1227
  return items;
1086
1228
  }
1087
- var Chevron = ({ dir }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: dir === "left" ? "15 18 9 12 15 6" : "9 18 15 12 9 6" }) });
1229
+ var Chevron = ({ dir }) => /* @__PURE__ */ jsxRuntime.jsx(
1230
+ "svg",
1231
+ {
1232
+ width: 16,
1233
+ height: 16,
1234
+ viewBox: "0 0 24 24",
1235
+ fill: "none",
1236
+ stroke: "currentColor",
1237
+ strokeWidth: 2,
1238
+ strokeLinecap: "round",
1239
+ strokeLinejoin: "round",
1240
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: dir === "left" ? "15 18 9 12 15 6" : "9 18 15 12 9 6" })
1241
+ }
1242
+ );
1088
1243
  function Pagination({ page, pageCount, onPageChange, className }) {
1089
1244
  const items = paginate(page, pageCount);
1090
1245
  return /* @__PURE__ */ jsxRuntime.jsxs("nav", { "aria-label": "Paginacja", className: cn("flex items-center gap-1", className), children: [
1091
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Previous", disabled: page <= 1, onClick: () => onPageChange(page - 1), children: /* @__PURE__ */ jsxRuntime.jsx(Chevron, { dir: "left" }) }),
1246
+ /* @__PURE__ */ jsxRuntime.jsx(
1247
+ Button,
1248
+ {
1249
+ variant: "ghost",
1250
+ size: "icon-sm",
1251
+ "aria-label": "Previous",
1252
+ disabled: page <= 1,
1253
+ onClick: () => onPageChange(page - 1),
1254
+ children: /* @__PURE__ */ jsxRuntime.jsx(Chevron, { dir: "left" })
1255
+ }
1256
+ ),
1092
1257
  items.map(
1093
1258
  (it, i) => it === "\u2026" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-1 text-muted-foreground select-none", children: "\u2026" }, `e${i}`) : /* @__PURE__ */ jsxRuntime.jsx(
1094
1259
  Button,
@@ -1102,7 +1267,17 @@ function Pagination({ page, pageCount, onPageChange, className }) {
1102
1267
  it
1103
1268
  )
1104
1269
  ),
1105
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Next", disabled: page >= pageCount, onClick: () => onPageChange(page + 1), children: /* @__PURE__ */ jsxRuntime.jsx(Chevron, { dir: "right" }) })
1270
+ /* @__PURE__ */ jsxRuntime.jsx(
1271
+ Button,
1272
+ {
1273
+ variant: "ghost",
1274
+ size: "icon-sm",
1275
+ "aria-label": "Next",
1276
+ disabled: page >= pageCount,
1277
+ onClick: () => onPageChange(page + 1),
1278
+ children: /* @__PURE__ */ jsxRuntime.jsx(Chevron, { dir: "right" })
1279
+ }
1280
+ )
1106
1281
  ] });
1107
1282
  }
1108
1283
  var BottomNavigation = React52__namespace.forwardRef(
@@ -1178,24 +1353,26 @@ var BottomNavigation = React52__namespace.forwardRef(
1178
1353
  );
1179
1354
  BottomNavigation.displayName = "BottomNavigation";
1180
1355
  var TableWrap = React52__namespace.forwardRef(
1181
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("w-full max-w-full overflow-x-auto border border-border rounded-kj-lg", className), ...props })
1356
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1357
+ "div",
1358
+ {
1359
+ ref,
1360
+ className: cn(
1361
+ "w-full max-w-full overflow-x-auto border border-border rounded-kj-lg",
1362
+ className
1363
+ ),
1364
+ ...props
1365
+ }
1366
+ )
1182
1367
  );
1183
1368
  TableWrap.displayName = "TableWrap";
1184
- var Table = React52__namespace.forwardRef(
1185
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("w-full border-collapse text-[0.85rem]", className), ...props })
1186
- );
1369
+ var Table = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("table", { ref, className: cn("w-full border-collapse text-[0.85rem]", className), ...props }));
1187
1370
  Table.displayName = "Table";
1188
- var TableHeader = React52__namespace.forwardRef(
1189
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className, ...props })
1190
- );
1371
+ var TableHeader = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className, ...props }));
1191
1372
  TableHeader.displayName = "TableHeader";
1192
- var TableBody = React52__namespace.forwardRef(
1193
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className, ...props })
1194
- );
1373
+ var TableBody = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className, ...props }));
1195
1374
  TableBody.displayName = "TableBody";
1196
- var TableRow = React52__namespace.forwardRef(
1197
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: cn("transition-colors hover:bg-muted/50", className), ...props })
1198
- );
1375
+ var TableRow = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tr", { ref, className: cn("transition-colors hover:bg-muted/50", className), ...props }));
1199
1376
  TableRow.displayName = "TableRow";
1200
1377
  var TableHead = React52__namespace.forwardRef(
1201
1378
  ({ className, numeric, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1249,7 +1426,14 @@ function Tooltip({ content, children, className }) {
1249
1426
  );
1250
1427
  }
1251
1428
  var ModalContext = React52__namespace.createContext(null);
1252
- function Modal({ open, onClose, children, width = 440, className, showClose = true }) {
1429
+ function Modal({
1430
+ open,
1431
+ onClose,
1432
+ children,
1433
+ width = 440,
1434
+ className,
1435
+ showClose = true
1436
+ }) {
1253
1437
  const titleId = React52__namespace.useId();
1254
1438
  const descId = React52__namespace.useId();
1255
1439
  const containerRef = React52__namespace.useRef(null);
@@ -1345,7 +1529,20 @@ function Modal({ open, onClose, children, width = 440, className, showClose = tr
1345
1529
  onClick: onClose,
1346
1530
  "aria-label": "Close",
1347
1531
  className: "absolute top-4 right-4 p-1.5 rounded-kj-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
1348
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
1532
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1533
+ "svg",
1534
+ {
1535
+ width: 16,
1536
+ height: 16,
1537
+ viewBox: "0 0 24 24",
1538
+ fill: "none",
1539
+ stroke: "currentColor",
1540
+ strokeWidth: 2.5,
1541
+ strokeLinecap: "round",
1542
+ strokeLinejoin: "round",
1543
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
1544
+ }
1545
+ )
1349
1546
  }
1350
1547
  ),
1351
1548
  children
@@ -1355,33 +1552,102 @@ function Modal({ open, onClose, children, width = 440, className, showClose = tr
1355
1552
  }
1356
1553
  );
1357
1554
  }
1358
- function ModalTitle({ className, id, children, ...props }) {
1359
- const ctx = React52__namespace.useContext(ModalContext);
1360
- return /* @__PURE__ */ jsxRuntime.jsx("h3", { id: id ?? ctx?.titleId, className: cn("m-0 mb-2 text-[1.15rem] font-bold tracking-[-0.01em] text-foreground", className), ...props, children });
1361
- }
1362
- function ModalDescription({ className, id, ...props }) {
1555
+ function ModalTitle({
1556
+ className,
1557
+ id,
1558
+ children,
1559
+ ...props
1560
+ }) {
1363
1561
  const ctx = React52__namespace.useContext(ModalContext);
1364
- return /* @__PURE__ */ jsxRuntime.jsx("p", { id: id ?? ctx?.descId, className: cn("m-0 text-[0.9rem] text-muted-foreground", className), ...props });
1365
- }
1366
- function ModalActions({ className, ...props }) {
1367
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-2.5 justify-end mt-6", className), ...props });
1368
- }
1369
- var ToastContext = React52__namespace.createContext(null);
1562
+ return /* @__PURE__ */ jsxRuntime.jsx(
1563
+ "h3",
1564
+ {
1565
+ id: id ?? ctx?.titleId,
1566
+ className: cn(
1567
+ "m-0 mb-2 text-[1.15rem] font-bold tracking-[-0.01em] text-foreground",
1568
+ className
1569
+ ),
1570
+ ...props,
1571
+ children
1572
+ }
1573
+ );
1574
+ }
1575
+ function ModalDescription({
1576
+ className,
1577
+ id,
1578
+ ...props
1579
+ }) {
1580
+ const ctx = React52__namespace.useContext(ModalContext);
1581
+ return /* @__PURE__ */ jsxRuntime.jsx(
1582
+ "p",
1583
+ {
1584
+ id: id ?? ctx?.descId,
1585
+ className: cn("m-0 text-[0.9rem] text-muted-foreground", className),
1586
+ ...props
1587
+ }
1588
+ );
1589
+ }
1590
+ function ModalActions({ className, ...props }) {
1591
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex gap-2.5 justify-end mt-6", className), ...props });
1592
+ }
1593
+ var ToastContext = React52__namespace.createContext(null);
1370
1594
  function useToast() {
1371
1595
  const ctx = React52__namespace.useContext(ToastContext);
1372
1596
  if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
1373
1597
  return ctx;
1374
1598
  }
1375
1599
  var icons = {
1376
- default: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "text-primary", children: [
1377
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1378
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16v-4M12 8h.01" })
1379
- ] }),
1380
- success: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "text-success", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" }) }),
1381
- danger: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "text-danger", children: [
1382
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1383
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 9-6 6M9 9l6 6" })
1384
- ] })
1600
+ default: /* @__PURE__ */ jsxRuntime.jsxs(
1601
+ "svg",
1602
+ {
1603
+ width: 18,
1604
+ height: 18,
1605
+ viewBox: "0 0 24 24",
1606
+ fill: "none",
1607
+ stroke: "currentColor",
1608
+ strokeWidth: 2,
1609
+ strokeLinecap: "round",
1610
+ strokeLinejoin: "round",
1611
+ className: "text-primary",
1612
+ children: [
1613
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1614
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16v-4M12 8h.01" })
1615
+ ]
1616
+ }
1617
+ ),
1618
+ success: /* @__PURE__ */ jsxRuntime.jsx(
1619
+ "svg",
1620
+ {
1621
+ width: 18,
1622
+ height: 18,
1623
+ viewBox: "0 0 24 24",
1624
+ fill: "none",
1625
+ stroke: "currentColor",
1626
+ strokeWidth: 2,
1627
+ strokeLinecap: "round",
1628
+ strokeLinejoin: "round",
1629
+ className: "text-success",
1630
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" })
1631
+ }
1632
+ ),
1633
+ danger: /* @__PURE__ */ jsxRuntime.jsxs(
1634
+ "svg",
1635
+ {
1636
+ width: 18,
1637
+ height: 18,
1638
+ viewBox: "0 0 24 24",
1639
+ fill: "none",
1640
+ stroke: "currentColor",
1641
+ strokeWidth: 2,
1642
+ strokeLinecap: "round",
1643
+ strokeLinejoin: "round",
1644
+ className: "text-danger",
1645
+ children: [
1646
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1647
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 9-6 6M9 9l6 6" })
1648
+ ]
1649
+ }
1650
+ )
1385
1651
  };
1386
1652
  var toneBorder = {
1387
1653
  default: "border-l-primary",
@@ -1515,20 +1781,11 @@ var SectionHeader = React52__namespace.forwardRef(
1515
1781
  ),
1516
1782
  ...props,
1517
1783
  children: children ? children : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1518
- /* @__PURE__ */ jsxRuntime.jsxs(
1519
- "div",
1520
- {
1521
- className: cn(
1522
- "space-y-2",
1523
- isCentered && "flex flex-col items-center"
1524
- ),
1525
- children: [
1526
- kicker && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderKicker, { children: kicker }),
1527
- title && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderTitle, { as: headingLevel, children: title }),
1528
- description && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderDescription, { children: description })
1529
- ]
1530
- }
1531
- ),
1784
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", isCentered && "flex flex-col items-center"), children: [
1785
+ kicker && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderKicker, { children: kicker }),
1786
+ title && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderTitle, { as: headingLevel, children: title }),
1787
+ description && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderDescription, { children: description })
1788
+ ] }),
1532
1789
  actions && /* @__PURE__ */ jsxRuntime.jsx(SectionHeaderActions, { className: cn(isCentered && "justify-center mt-4"), children: actions })
1533
1790
  ] })
1534
1791
  }
@@ -1574,7 +1831,13 @@ var MetricCard = React52__namespace.forwardRef(
1574
1831
  ] }),
1575
1832
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2.5 mb-1.5", children: [
1576
1833
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl font-bold tracking-tight text-foreground", children: value }),
1577
- trend && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.75rem] font-bold px-2 py-0.5 rounded-full border", trendColor), children: trend })
1834
+ trend && /* @__PURE__ */ jsxRuntime.jsx(
1835
+ "span",
1836
+ {
1837
+ className: cn("text-[0.75rem] font-bold px-2 py-0.5 rounded-full border", trendColor),
1838
+ children: trend
1839
+ }
1840
+ )
1578
1841
  ] }),
1579
1842
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: description })
1580
1843
  ] });
@@ -1648,130 +1911,160 @@ function DataTable({
1648
1911
  };
1649
1912
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 w-full", className), children: [
1650
1913
  toolbar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3", children: toolbar }),
1651
- /* @__PURE__ */ jsxRuntime.jsxs(TableWrap, { className: "relative overflow-x-auto overflow-y-hidden [scroll-behavior:smooth] [-webkit-overflow-scrolling:touch]", ...props, children: [
1652
- /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
1653
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1654
- isSelectionActive && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "w-12 px-4 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
1655
- "input",
1656
- {
1657
- type: "checkbox",
1658
- ref: headerCheckboxRef,
1659
- checked: allSelected,
1660
- onChange: handleSelectAll,
1661
- "aria-label": "Select all rows",
1662
- className: "h-4 w-4 rounded border-input text-primary focus:ring-ring"
1663
- }
1664
- ) }) }),
1665
- columns.map((col, idx) => {
1666
- const alignClass = {
1667
- left: "text-left",
1668
- center: "text-center",
1669
- right: "text-right"
1670
- }[col.align || "left"];
1671
- const isSortable = col.sortable && onSort && col.sortKey;
1672
- const isSortedActive = sortBy && col.sortKey === sortBy;
1673
- const ariaSort = isSortable ? isSortedActive ? sortDirection === "asc" ? "ascending" : "descending" : "none" : void 0;
1674
- return /* @__PURE__ */ jsxRuntime.jsx(
1675
- TableHead,
1676
- {
1677
- className: cn(
1678
- alignClass,
1679
- isSortable && "p-0 hover:bg-muted/30 transition-colors",
1680
- col.className
1681
- ),
1682
- "aria-sort": ariaSort,
1683
- children: isSortable ? /* @__PURE__ */ jsxRuntime.jsxs(
1684
- "button",
1914
+ /* @__PURE__ */ jsxRuntime.jsxs(
1915
+ TableWrap,
1916
+ {
1917
+ className: "relative overflow-x-auto overflow-y-hidden [scroll-behavior:smooth] [-webkit-overflow-scrolling:touch]",
1918
+ ...props,
1919
+ children: [
1920
+ /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
1921
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { children: [
1922
+ isSelectionActive && /* @__PURE__ */ jsxRuntime.jsx(TableHead, { className: "w-12 px-4 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
1923
+ "input",
1924
+ {
1925
+ type: "checkbox",
1926
+ ref: headerCheckboxRef,
1927
+ checked: allSelected,
1928
+ onChange: handleSelectAll,
1929
+ "aria-label": "Select all rows",
1930
+ className: "h-4 w-4 rounded border-input text-primary focus:ring-ring"
1931
+ }
1932
+ ) }) }),
1933
+ columns.map((col, idx) => {
1934
+ const alignClass = {
1935
+ left: "text-left",
1936
+ center: "text-center",
1937
+ right: "text-right"
1938
+ }[col.align || "left"];
1939
+ const isSortable = col.sortable && onSort && col.sortKey;
1940
+ const isSortedActive = sortBy && col.sortKey === sortBy;
1941
+ const ariaSort = isSortable ? isSortedActive ? sortDirection === "asc" ? "ascending" : "descending" : "none" : void 0;
1942
+ return /* @__PURE__ */ jsxRuntime.jsx(
1943
+ TableHead,
1685
1944
  {
1686
- type: "button",
1687
- onClick: () => {
1688
- if (!col.sortKey) return;
1689
- const nextDirection = isSortedActive && sortDirection === "asc" ? "desc" : "asc";
1690
- onSort(col.sortKey, nextDirection);
1691
- },
1692
1945
  className: cn(
1693
- "w-full px-4 py-3 flex items-center gap-1.5 font-semibold text-[0.72rem] uppercase tracking-[0.05em] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 transition-colors cursor-pointer",
1946
+ alignClass,
1947
+ isSortable && "p-0 hover:bg-muted/30 transition-colors",
1948
+ col.className
1949
+ ),
1950
+ "aria-sort": ariaSort,
1951
+ children: isSortable ? /* @__PURE__ */ jsxRuntime.jsxs(
1952
+ "button",
1694
1953
  {
1695
- "justify-start text-left": col.align === "left" || !col.align,
1696
- "justify-center text-center": col.align === "center",
1697
- "justify-end text-right": col.align === "right"
1954
+ type: "button",
1955
+ onClick: () => {
1956
+ if (!col.sortKey) return;
1957
+ const nextDirection = isSortedActive && sortDirection === "asc" ? "desc" : "asc";
1958
+ onSort(col.sortKey, nextDirection);
1959
+ },
1960
+ className: cn(
1961
+ "w-full px-4 py-3 flex items-center gap-1.5 font-semibold text-[0.72rem] uppercase tracking-[0.05em] text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 transition-colors cursor-pointer",
1962
+ {
1963
+ "justify-start text-left": col.align === "left" || !col.align,
1964
+ "justify-center text-center": col.align === "center",
1965
+ "justify-end text-right": col.align === "right"
1966
+ }
1967
+ ),
1968
+ children: [
1969
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: col.header }),
1970
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground shrink-0 select-none", children: isSortedActive ? sortDirection === "asc" ? "\u25B2" : "\u25BC" : "\u21C5" })
1971
+ ]
1698
1972
  }
1699
- ),
1700
- children: [
1701
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: col.header }),
1702
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground shrink-0 select-none", children: isSortedActive ? sortDirection === "asc" ? "\u25B2" : "\u25BC" : "\u21C5" })
1703
- ]
1704
- }
1705
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("inline-flex items-center gap-1.5", alignClass === "text-right" && "justify-end w-full"), children: col.header })
1706
- },
1707
- idx
1708
- );
1709
- })
1710
- ] }) }),
1711
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: loading && data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length + (isSelectionActive ? 1 : 0), className: "h-64 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center gap-3", children: [
1712
- /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 32 }),
1713
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading dataset..." })
1714
- ] }) }) }) : error ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length + (isSelectionActive ? 1 : 0), className: "p-8", children: /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "danger", title: "Error loading data", children: error }) }) }) : data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length + (isSelectionActive ? 1 : 0), className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1715
- EmptyState,
1716
- {
1717
- title: emptyTitle,
1718
- description: emptyDescription,
1719
- action: emptyAction,
1720
- className: "border-none bg-transparent rounded-none py-16"
1721
- }
1722
- ) }) }) : data.map((row, rowIdx) => {
1723
- const rowKey = getRowId(row, rowIdx);
1724
- const isSelected = isSelectionActive && selectedRows.has(rowKey);
1725
- return /* @__PURE__ */ jsxRuntime.jsxs(
1726
- TableRow,
1727
- {
1728
- onClick: () => onRowClick && onRowClick(row),
1729
- className: cn(
1730
- onRowClick && "cursor-pointer hover:bg-muted/40 transition-colors",
1731
- isSelected && "bg-primary/5 hover:bg-primary/10"
1732
- ),
1733
- children: [
1734
- isSelectionActive && /* @__PURE__ */ jsxRuntime.jsx(
1735
- TableCell,
1736
- {
1737
- className: "w-12 px-4 text-center",
1738
- onClick: (e) => {
1739
- e.stopPropagation();
1740
- },
1741
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
1742
- "input",
1973
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1974
+ "div",
1743
1975
  {
1744
- type: "checkbox",
1745
- checked: isSelected,
1746
- onChange: (e) => handleSelectRow(row, rowIdx, e.target.checked),
1747
- "aria-label": `Select row ${rowIdx + 1}`,
1748
- className: "h-4 w-4 rounded border-input text-primary focus:ring-ring"
1976
+ className: cn(
1977
+ "inline-flex items-center gap-1.5",
1978
+ alignClass === "text-right" && "justify-end w-full"
1979
+ ),
1980
+ children: col.header
1749
1981
  }
1750
- ) })
1751
- }
1752
- ),
1753
- columns.map((col, colIdx) => {
1754
- const alignClass = {
1755
- left: "text-left",
1756
- center: "text-center",
1757
- right: "text-right"
1758
- }[col.align || "left"];
1759
- return /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cn(alignClass, col.className), children: col.accessor(row) }, colIdx);
1760
- })
1761
- ]
1762
- },
1763
- rowKey
1764
- );
1765
- }) })
1766
- ] }),
1767
- loading && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-background/50 backdrop-blur-[1px] grid place-items-center z-10 transition-opacity duration-150", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 36 }) })
1768
- ] }),
1982
+ )
1983
+ },
1984
+ idx
1985
+ );
1986
+ })
1987
+ ] }) }),
1988
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: loading && data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(
1989
+ TableCell,
1990
+ {
1991
+ colSpan: columns.length + (isSelectionActive ? 1 : 0),
1992
+ className: "h-64 text-center",
1993
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center gap-3", children: [
1994
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 32 }),
1995
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading dataset..." })
1996
+ ] })
1997
+ }
1998
+ ) }) : error ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length + (isSelectionActive ? 1 : 0), className: "p-8", children: /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "danger", title: "Error loading data", children: error }) }) }) : data.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: columns.length + (isSelectionActive ? 1 : 0), className: "p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
1999
+ EmptyState,
2000
+ {
2001
+ title: emptyTitle,
2002
+ description: emptyDescription,
2003
+ action: emptyAction,
2004
+ className: "border-none bg-transparent rounded-none py-16"
2005
+ }
2006
+ ) }) }) : data.map((row, rowIdx) => {
2007
+ const rowKey = getRowId(row, rowIdx);
2008
+ const isSelected = isSelectionActive && selectedRows.has(rowKey);
2009
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2010
+ TableRow,
2011
+ {
2012
+ onClick: () => onRowClick && onRowClick(row),
2013
+ className: cn(
2014
+ onRowClick && "cursor-pointer hover:bg-muted/40 transition-colors",
2015
+ isSelected && "bg-primary/5 hover:bg-primary/10"
2016
+ ),
2017
+ children: [
2018
+ isSelectionActive && /* @__PURE__ */ jsxRuntime.jsx(
2019
+ TableCell,
2020
+ {
2021
+ className: "w-12 px-4 text-center",
2022
+ onClick: (e) => {
2023
+ e.stopPropagation();
2024
+ },
2025
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
2026
+ "input",
2027
+ {
2028
+ type: "checkbox",
2029
+ checked: isSelected,
2030
+ onChange: (e) => handleSelectRow(row, rowIdx, e.target.checked),
2031
+ "aria-label": `Select row ${rowIdx + 1}`,
2032
+ className: "h-4 w-4 rounded border-input text-primary focus:ring-ring"
2033
+ }
2034
+ ) })
2035
+ }
2036
+ ),
2037
+ columns.map((col, colIdx) => {
2038
+ const alignClass = {
2039
+ left: "text-left",
2040
+ center: "text-center",
2041
+ right: "text-right"
2042
+ }[col.align || "left"];
2043
+ return /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cn(alignClass, col.className), children: col.accessor(row) }, colIdx);
2044
+ })
2045
+ ]
2046
+ },
2047
+ rowKey
2048
+ );
2049
+ }) })
2050
+ ] }),
2051
+ loading && data.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-background/50 backdrop-blur-[1px] grid place-items-center z-10 transition-opacity duration-150", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 36 }) })
2052
+ ]
2053
+ }
2054
+ ),
1769
2055
  pagination && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end w-full", children: pagination })
1770
2056
  ] });
1771
2057
  }
1772
2058
  DataTable.displayName = "DataTable";
1773
2059
  var ErrorState = React52__namespace.forwardRef(
1774
- ({ className, title = "Wyst\u0105pi\u0142 b\u0142\u0105d", message, onRetry, retryLabel = "Spr\xF3buj ponownie", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
2060
+ ({
2061
+ className,
2062
+ title = "Wyst\u0105pi\u0142 b\u0142\u0105d",
2063
+ message,
2064
+ onRetry,
2065
+ retryLabel = "Spr\xF3buj ponownie",
2066
+ ...props
2067
+ }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
1775
2068
  "div",
1776
2069
  {
1777
2070
  ref,
@@ -1781,7 +2074,24 @@ var ErrorState = React52__namespace.forwardRef(
1781
2074
  ),
1782
2075
  ...props,
1783
2076
  children: [
1784
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-danger-surface border border-danger/30 text-danger mb-4", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", className: "h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" }) }) }),
2077
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-danger-surface border border-danger/30 text-danger mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(
2078
+ "svg",
2079
+ {
2080
+ fill: "none",
2081
+ stroke: "currentColor",
2082
+ strokeWidth: 2.5,
2083
+ viewBox: "0 0 24 24",
2084
+ className: "h-6 w-6",
2085
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2086
+ "path",
2087
+ {
2088
+ strokeLinecap: "round",
2089
+ strokeLinejoin: "round",
2090
+ d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"
2091
+ }
2092
+ )
2093
+ }
2094
+ ) }),
1785
2095
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground mb-1", children: title }),
1786
2096
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground max-w-sm mb-6 leading-relaxed", children: message }),
1787
2097
  onRetry && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "danger", onClick: onRetry, children: retryLabel })
@@ -1791,12 +2101,14 @@ var ErrorState = React52__namespace.forwardRef(
1791
2101
  );
1792
2102
  ErrorState.displayName = "ErrorState";
1793
2103
  var Skeleton = React52__namespace.forwardRef(
1794
- ({ className, variant = "rectangular", width, height, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2104
+ ({ className, variant = "rectangular", animation = "shimmer", width, height, style, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1795
2105
  "div",
1796
2106
  {
1797
2107
  ref,
1798
2108
  className: cn(
1799
- "animate-pulse bg-muted/40",
2109
+ "bg-muted-foreground/15 dark:bg-muted-foreground/20",
2110
+ animation === "pulse" && "animate-pulse",
2111
+ animation === "shimmer" && "relative overflow-hidden after:absolute after:inset-0 after:-translate-x-full after:animate-[kjshimmer_2s_ease-in-out_infinite_alternate] after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent",
1800
2112
  variant === "text" && "h-3 w-4/5 rounded-sm my-1.5",
1801
2113
  variant === "circular" && "rounded-full",
1802
2114
  variant === "rectangular" && "rounded-kj-md",
@@ -1848,7 +2160,16 @@ var DashboardShell = React52__namespace.forwardRef(
1848
2160
  mobileSidebar ? "hidden md:flex" : "w-full md:flex",
1849
2161
  sidebarWidth
1850
2162
  ),
1851
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("sticky top-0 w-full flex flex-col", mobileSidebar ? "h-screen" : "h-auto md:h-screen"), children: sidebar })
2163
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2164
+ "div",
2165
+ {
2166
+ className: cn(
2167
+ "sticky top-0 w-full flex flex-col",
2168
+ mobileSidebar ? "h-screen" : "h-auto md:h-screen"
2169
+ ),
2170
+ children: sidebar
2171
+ }
2172
+ )
1852
2173
  }
1853
2174
  ),
1854
2175
  mobileSidebar && mobileOpen && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1870,7 +2191,20 @@ var DashboardShell = React52__namespace.forwardRef(
1870
2191
  type: "button",
1871
2192
  onClick: () => setMobileOpen(false),
1872
2193
  className: "p-1 rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
1873
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
2194
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2195
+ "svg",
2196
+ {
2197
+ width: 16,
2198
+ height: 16,
2199
+ viewBox: "0 0 24 24",
2200
+ fill: "none",
2201
+ stroke: "currentColor",
2202
+ strokeWidth: 2.5,
2203
+ strokeLinecap: "round",
2204
+ strokeLinejoin: "round",
2205
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
2206
+ }
2207
+ )
1874
2208
  }
1875
2209
  )
1876
2210
  ] }),
@@ -1896,11 +2230,24 @@ var DashboardShell = React52__namespace.forwardRef(
1896
2230
  onClick: () => setMobileOpen(true),
1897
2231
  className: "md:hidden p-1.5 -ml-1.5 rounded-kj-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
1898
2232
  "aria-label": "Open navigation",
1899
- children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
1900
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
1901
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
1902
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
1903
- ] })
2233
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2234
+ "svg",
2235
+ {
2236
+ width: 20,
2237
+ height: 20,
2238
+ viewBox: "0 0 24 24",
2239
+ fill: "none",
2240
+ stroke: "currentColor",
2241
+ strokeWidth: 2.5,
2242
+ strokeLinecap: "round",
2243
+ strokeLinejoin: "round",
2244
+ children: [
2245
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
2246
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
2247
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
2248
+ ]
2249
+ }
2250
+ )
1904
2251
  }
1905
2252
  ),
1906
2253
  topbar
@@ -1931,7 +2278,18 @@ var SettingsLayout = React52__namespace.forwardRef(
1931
2278
  );
1932
2279
  SettingsLayout.displayName = "SettingsLayout";
1933
2280
  var DetailPageLayout = React52__namespace.forwardRef(
1934
- ({ className, title, description, backHref, backLabel = "Back", onBackClick, actions, aside, children, ...props }, ref) => {
2281
+ ({
2282
+ className,
2283
+ title,
2284
+ description,
2285
+ backHref,
2286
+ backLabel = "Back",
2287
+ onBackClick,
2288
+ actions,
2289
+ aside,
2290
+ children,
2291
+ ...props
2292
+ }, ref) => {
1935
2293
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-6 w-full", className), ...props, children: [
1936
2294
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
1937
2295
  (backHref || onBackClick) && /* @__PURE__ */ jsxRuntime.jsx("div", { children: backHref ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1943,7 +2301,24 @@ var DetailPageLayout = React52__namespace.forwardRef(
1943
2301
  "-ml-3 h-8 text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5"
1944
2302
  ),
1945
2303
  children: [
1946
- /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) }),
2304
+ /* @__PURE__ */ jsxRuntime.jsx(
2305
+ "svg",
2306
+ {
2307
+ viewBox: "0 0 24 24",
2308
+ fill: "none",
2309
+ stroke: "currentColor",
2310
+ strokeWidth: "2.5",
2311
+ className: "h-4 w-4",
2312
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2313
+ "path",
2314
+ {
2315
+ strokeLinecap: "round",
2316
+ strokeLinejoin: "round",
2317
+ d: "M15.75 19.5 8.25 12l7.5-7.5"
2318
+ }
2319
+ )
2320
+ }
2321
+ ),
1947
2322
  backLabel
1948
2323
  ]
1949
2324
  }
@@ -1955,7 +2330,24 @@ var DetailPageLayout = React52__namespace.forwardRef(
1955
2330
  className: "-ml-3 h-8 text-muted-foreground hover:text-foreground",
1956
2331
  onClick: onBackClick,
1957
2332
  children: [
1958
- /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "h-4 w-4 mr-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) }),
2333
+ /* @__PURE__ */ jsxRuntime.jsx(
2334
+ "svg",
2335
+ {
2336
+ viewBox: "0 0 24 24",
2337
+ fill: "none",
2338
+ stroke: "currentColor",
2339
+ strokeWidth: "2.5",
2340
+ className: "h-4 w-4 mr-1.5",
2341
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2342
+ "path",
2343
+ {
2344
+ strokeLinecap: "round",
2345
+ strokeLinejoin: "round",
2346
+ d: "M15.75 19.5 8.25 12l7.5-7.5"
2347
+ }
2348
+ )
2349
+ }
2350
+ ),
1959
2351
  backLabel
1960
2352
  ]
1961
2353
  }
@@ -1977,7 +2369,15 @@ var DetailPageLayout = React52__namespace.forwardRef(
1977
2369
  );
1978
2370
  DetailPageLayout.displayName = "DetailPageLayout";
1979
2371
  var TableToolbar = React52__namespace.forwardRef(
1980
- ({ className, searchQuery, onSearchChange, searchPlaceholder = "Search...", actions, filters, ...props }, ref) => {
2372
+ ({
2373
+ className,
2374
+ searchQuery,
2375
+ onSearchChange,
2376
+ searchPlaceholder = "Search...",
2377
+ actions,
2378
+ filters,
2379
+ ...props
2380
+ }, ref) => {
1981
2381
  return /* @__PURE__ */ jsxRuntime.jsxs(
1982
2382
  "div",
1983
2383
  {
@@ -1997,7 +2397,24 @@ var TableToolbar = React52__namespace.forwardRef(
1997
2397
  value: searchQuery,
1998
2398
  onChange: (e) => onSearchChange(e.target.value),
1999
2399
  className: "sm:w-64",
2000
- leadingIcon: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" }) })
2400
+ leadingIcon: /* @__PURE__ */ jsxRuntime.jsx(
2401
+ "svg",
2402
+ {
2403
+ viewBox: "0 0 24 24",
2404
+ fill: "none",
2405
+ stroke: "currentColor",
2406
+ strokeWidth: "2.5",
2407
+ className: "h-4 w-4",
2408
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2409
+ "path",
2410
+ {
2411
+ strokeLinecap: "round",
2412
+ strokeLinejoin: "round",
2413
+ d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
2414
+ }
2415
+ )
2416
+ }
2417
+ )
2001
2418
  }
2002
2419
  ),
2003
2420
  filters && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: filters })
@@ -2107,14 +2524,8 @@ function Drawer({
2107
2524
  };
2108
2525
  }, [open, onClose]);
2109
2526
  const sideClasses = {
2110
- right: cn(
2111
- "right-0 h-full border-l",
2112
- open ? "translate-x-0" : "translate-x-full"
2113
- ),
2114
- left: cn(
2115
- "left-0 h-full border-r",
2116
- open ? "translate-x-0" : "-translate-x-full"
2117
- )
2527
+ right: cn("right-0 h-full border-l", open ? "translate-x-0" : "translate-x-full"),
2528
+ left: cn("left-0 h-full border-r", open ? "translate-x-0" : "-translate-x-full")
2118
2529
  }[side];
2119
2530
  return /* @__PURE__ */ jsxRuntime.jsx(
2120
2531
  "div",
@@ -2153,7 +2564,20 @@ function Drawer({
2153
2564
  onClick: onClose,
2154
2565
  "aria-label": "Close",
2155
2566
  className: "p-1.5 rounded-kj-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
2156
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
2567
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2568
+ "svg",
2569
+ {
2570
+ width: 16,
2571
+ height: 16,
2572
+ viewBox: "0 0 24 24",
2573
+ fill: "none",
2574
+ stroke: "currentColor",
2575
+ strokeWidth: 2.5,
2576
+ strokeLinecap: "round",
2577
+ strokeLinejoin: "round",
2578
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
2579
+ }
2580
+ )
2157
2581
  }
2158
2582
  )
2159
2583
  ] }),
@@ -2165,7 +2589,12 @@ function Drawer({
2165
2589
  );
2166
2590
  }
2167
2591
  Drawer.displayName = "Drawer";
2168
- function CommandPalette({ open, onClose, items, placeholder = "Type a command or search..." }) {
2592
+ function CommandPalette({
2593
+ open,
2594
+ onClose,
2595
+ items,
2596
+ placeholder = "Type a command or search..."
2597
+ }) {
2169
2598
  const [search, setSearch] = React52__namespace.useState("");
2170
2599
  const [activeIndex, setActiveIndex] = React52__namespace.useState(0);
2171
2600
  const containerRef = React52__namespace.useRef(null);
@@ -2198,10 +2627,14 @@ function CommandPalette({ open, onClose, items, placeholder = "Type a command or
2198
2627
  }
2199
2628
  if (e.key === "ArrowDown") {
2200
2629
  e.preventDefault();
2201
- setActiveIndex((prev) => filteredItems.length === 0 ? 0 : (prev + 1) % filteredItems.length);
2630
+ setActiveIndex(
2631
+ (prev) => filteredItems.length === 0 ? 0 : (prev + 1) % filteredItems.length
2632
+ );
2202
2633
  } else if (e.key === "ArrowUp") {
2203
2634
  e.preventDefault();
2204
- setActiveIndex((prev) => filteredItems.length === 0 ? 0 : (prev - 1 + filteredItems.length) % filteredItems.length);
2635
+ setActiveIndex(
2636
+ (prev) => filteredItems.length === 0 ? 0 : (prev - 1 + filteredItems.length) % filteredItems.length
2637
+ );
2205
2638
  } else if (e.key === "Enter") {
2206
2639
  e.preventDefault();
2207
2640
  if (filteredItems[activeIndex]) {
@@ -2244,7 +2677,24 @@ function CommandPalette({ open, onClose, items, placeholder = "Type a command or
2244
2677
  className: "w-[95vw] max-w-lg bg-surface border border-border rounded-kj-xl shadow-kj-lg flex flex-col overflow-hidden max-h-[500px]",
2245
2678
  children: [
2246
2679
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b border-border flex items-center gap-2", children: [
2247
- /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "h-5 w-5 text-muted-foreground shrink-0 ml-1", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" }) }),
2680
+ /* @__PURE__ */ jsxRuntime.jsx(
2681
+ "svg",
2682
+ {
2683
+ viewBox: "0 0 24 24",
2684
+ fill: "none",
2685
+ stroke: "currentColor",
2686
+ strokeWidth: "2.5",
2687
+ className: "h-5 w-5 text-muted-foreground shrink-0 ml-1",
2688
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2689
+ "path",
2690
+ {
2691
+ strokeLinecap: "round",
2692
+ strokeLinejoin: "round",
2693
+ d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
2694
+ }
2695
+ )
2696
+ }
2697
+ ),
2248
2698
  /* @__PURE__ */ jsxRuntime.jsx(
2249
2699
  "input",
2250
2700
  {
@@ -2274,54 +2724,72 @@ function CommandPalette({ open, onClose, items, placeholder = "Type a command or
2274
2724
  role: "listbox",
2275
2725
  "aria-label": "Commands",
2276
2726
  className: "space-y-4",
2277
- children: Object.entries(groups).map(([cat, itemsInCat]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "group", "aria-labelledby": `cmd-cat-${cat}`, className: "space-y-1", children: [
2278
- /* @__PURE__ */ jsxRuntime.jsx(
2279
- "div",
2280
- {
2281
- id: `cmd-cat-${cat}`,
2282
- className: "px-3 py-1 text-[0.65rem] font-bold uppercase tracking-wider text-muted-foreground",
2283
- children: cat
2284
- }
2285
- ),
2286
- itemsInCat.map((item) => {
2287
- const currentIdx = absoluteItemIndex++;
2288
- const isActive = currentIdx === activeIndex;
2289
- return /* @__PURE__ */ jsxRuntime.jsxs(
2290
- "div",
2291
- {
2292
- id: `cmd-item-${currentIdx}`,
2293
- role: "option",
2294
- "aria-selected": isActive,
2295
- onClick: () => {
2296
- item.action();
2297
- onClose();
2298
- },
2299
- className: cn(
2300
- "flex items-center justify-between gap-3 px-3 py-2.5 rounded-kj-md cursor-pointer select-none transition-colors",
2301
- isActive ? "bg-primary/10 text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2302
- ),
2303
- children: [
2304
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
2305
- item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground [&_svg]:h-[1.1rem] [&_svg]:w-[1.1rem]", children: item.icon }),
2306
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex flex-col", children: [
2307
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[0.85rem] font-semibold", isActive ? "text-primary" : "text-foreground"), children: item.title }),
2308
- item.subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.75rem] text-muted-foreground truncate", children: item.subtitle })
2309
- ] })
2310
- ] }),
2311
- item.shortcut && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: item.shortcut.map((sc, scIdx) => /* @__PURE__ */ jsxRuntime.jsx(
2312
- "kbd",
2313
- {
2314
- className: "px-1.5 py-0.5 rounded border border-border bg-subtle text-[10px] font-mono leading-none shadow-kj-xs text-muted-foreground",
2315
- children: sc
2727
+ children: Object.entries(groups).map(([cat, itemsInCat]) => /* @__PURE__ */ jsxRuntime.jsxs(
2728
+ "div",
2729
+ {
2730
+ role: "group",
2731
+ "aria-labelledby": `cmd-cat-${cat}`,
2732
+ className: "space-y-1",
2733
+ children: [
2734
+ /* @__PURE__ */ jsxRuntime.jsx(
2735
+ "div",
2736
+ {
2737
+ id: `cmd-cat-${cat}`,
2738
+ className: "px-3 py-1 text-[0.65rem] font-bold uppercase tracking-wider text-muted-foreground",
2739
+ children: cat
2740
+ }
2741
+ ),
2742
+ itemsInCat.map((item) => {
2743
+ const currentIdx = absoluteItemIndex++;
2744
+ const isActive = currentIdx === activeIndex;
2745
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2746
+ "div",
2747
+ {
2748
+ id: `cmd-item-${currentIdx}`,
2749
+ role: "option",
2750
+ "aria-selected": isActive,
2751
+ onClick: () => {
2752
+ item.action();
2753
+ onClose();
2316
2754
  },
2317
- scIdx
2318
- )) })
2319
- ]
2320
- },
2321
- item.id
2322
- );
2323
- })
2324
- ] }, cat))
2755
+ className: cn(
2756
+ "flex items-center justify-between gap-3 px-3 py-2.5 rounded-kj-md cursor-pointer select-none transition-colors",
2757
+ isActive ? "bg-primary/10 text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2758
+ ),
2759
+ children: [
2760
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
2761
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground [&_svg]:h-[1.1rem] [&_svg]:w-[1.1rem]", children: item.icon }),
2762
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex flex-col", children: [
2763
+ /* @__PURE__ */ jsxRuntime.jsx(
2764
+ "span",
2765
+ {
2766
+ className: cn(
2767
+ "text-[0.85rem] font-semibold",
2768
+ isActive ? "text-primary" : "text-foreground"
2769
+ ),
2770
+ children: item.title
2771
+ }
2772
+ ),
2773
+ item.subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.75rem] text-muted-foreground truncate", children: item.subtitle })
2774
+ ] })
2775
+ ] }),
2776
+ item.shortcut && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: item.shortcut.map((sc, scIdx) => /* @__PURE__ */ jsxRuntime.jsx(
2777
+ "kbd",
2778
+ {
2779
+ className: "px-1.5 py-0.5 rounded border border-border bg-subtle text-[10px] font-mono leading-none shadow-kj-xs text-muted-foreground",
2780
+ children: sc
2781
+ },
2782
+ scIdx
2783
+ )) })
2784
+ ]
2785
+ },
2786
+ item.id
2787
+ );
2788
+ })
2789
+ ]
2790
+ },
2791
+ cat
2792
+ ))
2325
2793
  }
2326
2794
  ) }),
2327
2795
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2.5 border-t border-border bg-subtle flex items-center justify-between text-[11px] text-muted-foreground font-medium", children: [
@@ -2332,7 +2800,8 @@ function CommandPalette({ open, onClose, items, placeholder = "Type a command or
2332
2800
  ] }),
2333
2801
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
2334
2802
  /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "font-mono text-[9px] px-1 border rounded bg-surface", children: "Enter" }),
2335
- " Select"
2803
+ " ",
2804
+ "Select"
2336
2805
  ] })
2337
2806
  ] }),
2338
2807
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -2354,10 +2823,16 @@ function SidebarNav({ className, groups, currentHref, ...props }) {
2354
2823
  const isActive = item.active || item.href && currentHref && currentHref === item.href;
2355
2824
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2356
2825
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5 min-w-0", children: [
2357
- item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
2358
- "[&_svg]:h-[1.1rem] [&_svg]:w-[1.1rem] shrink-0",
2359
- isActive ? "text-primary" : "text-muted-foreground group-hover:text-foreground"
2360
- ), children: item.icon }),
2826
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx(
2827
+ "span",
2828
+ {
2829
+ className: cn(
2830
+ "[&_svg]:h-[1.1rem] [&_svg]:w-[1.1rem] shrink-0",
2831
+ isActive ? "text-primary" : "text-muted-foreground group-hover:text-foreground"
2832
+ ),
2833
+ children: item.icon
2834
+ }
2835
+ ),
2361
2836
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: item.label })
2362
2837
  ] }),
2363
2838
  item.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 flex items-center justify-center", children: item.badge })
@@ -2369,16 +2844,7 @@ function SidebarNav({ className, groups, currentHref, ...props }) {
2369
2844
  if (item.href) {
2370
2845
  return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: itemClass, children: content }, item.id);
2371
2846
  }
2372
- return /* @__PURE__ */ jsxRuntime.jsx(
2373
- "button",
2374
- {
2375
- type: "button",
2376
- onClick: item.onClick,
2377
- className: itemClass,
2378
- children: content
2379
- },
2380
- item.id
2381
- );
2847
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: item.onClick, className: itemClass, children: content }, item.id);
2382
2848
  }) })
2383
2849
  ] }, groupIdx)) });
2384
2850
  }
@@ -2574,7 +3040,20 @@ function BottomSheet({
2574
3040
  onClick: onClose,
2575
3041
  "aria-label": "Close",
2576
3042
  className: "absolute top-4 right-4 p-1.5 rounded-kj-sm text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer z-10",
2577
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
3043
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3044
+ "svg",
3045
+ {
3046
+ width: 16,
3047
+ height: 16,
3048
+ viewBox: "0 0 24 24",
3049
+ fill: "none",
3050
+ stroke: "currentColor",
3051
+ strokeWidth: 2.5,
3052
+ strokeLinecap: "round",
3053
+ strokeLinejoin: "round",
3054
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
3055
+ }
3056
+ )
2578
3057
  }
2579
3058
  ),
2580
3059
  children
@@ -2587,19 +3066,49 @@ function BottomSheet({
2587
3066
  function BottomSheetHeader({ className, ...props }) {
2588
3067
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("p-6 flex flex-col gap-1.5 border-b border-border", className), ...props });
2589
3068
  }
2590
- function BottomSheetTitle({ className, id, children, ...props }) {
3069
+ function BottomSheetTitle({
3070
+ className,
3071
+ id,
3072
+ children,
3073
+ ...props
3074
+ }) {
2591
3075
  const ctx = React52__namespace.useContext(BottomSheetContext);
2592
- return /* @__PURE__ */ jsxRuntime.jsx("h2", { id: id ?? ctx?.titleId, className: cn("m-0 text-[1.15rem] font-bold tracking-[-0.01em]", className), ...props, children });
3076
+ return /* @__PURE__ */ jsxRuntime.jsx(
3077
+ "h2",
3078
+ {
3079
+ id: id ?? ctx?.titleId,
3080
+ className: cn("m-0 text-[1.15rem] font-bold tracking-[-0.01em]", className),
3081
+ ...props,
3082
+ children
3083
+ }
3084
+ );
2593
3085
  }
2594
- function BottomSheetDescription({ className, id, ...props }) {
3086
+ function BottomSheetDescription({
3087
+ className,
3088
+ id,
3089
+ ...props
3090
+ }) {
2595
3091
  const ctx = React52__namespace.useContext(BottomSheetContext);
2596
- return /* @__PURE__ */ jsxRuntime.jsx("p", { id: id ?? ctx?.descId, className: cn("m-0 text-[0.9rem] text-muted-foreground", className), ...props });
2597
- }
2598
- function BottomSheetContent({ className, ...props }) {
3092
+ return /* @__PURE__ */ jsxRuntime.jsx(
3093
+ "p",
3094
+ {
3095
+ id: id ?? ctx?.descId,
3096
+ className: cn("m-0 text-[0.9rem] text-muted-foreground", className),
3097
+ ...props
3098
+ }
3099
+ );
3100
+ }
3101
+ function BottomSheetContent({ className, ...props }) {
2599
3102
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("p-6 overflow-y-auto flex-1", className), ...props });
2600
3103
  }
2601
3104
  function BottomSheetFooter({ className, ...props }) {
2602
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("p-6 border-t border-border flex gap-2.5 justify-end mt-auto", className), ...props });
3105
+ return /* @__PURE__ */ jsxRuntime.jsx(
3106
+ "div",
3107
+ {
3108
+ className: cn("p-6 border-t border-border flex gap-2.5 justify-end mt-auto", className),
3109
+ ...props
3110
+ }
3111
+ );
2603
3112
  }
2604
3113
  var kbdVariants = classVarianceAuthority.cva(
2605
3114
  "inline-flex items-center justify-center font-mono font-medium text-muted-foreground bg-muted border border-border border-b-2 rounded-kj-sm select-none",
@@ -2678,7 +3187,11 @@ var CodeBlock = React52__namespace.forwardRef(
2678
3187
  }
2679
3188
  );
2680
3189
  CodeBlock.displayName = "CodeBlock";
2681
- function Separator({ orientation = "horizontal", decorative = true, className }) {
3190
+ function Separator({
3191
+ orientation = "horizontal",
3192
+ decorative = true,
3193
+ className
3194
+ }) {
2682
3195
  const semanticProps = decorative ? { role: "none", "aria-hidden": true } : { role: "separator", "aria-orientation": orientation };
2683
3196
  return /* @__PURE__ */ jsxRuntime.jsx(
2684
3197
  "div",
@@ -2996,7 +3509,18 @@ var Combobox = React52__namespace.forwardRef(
2996
3509
  removeValue(value);
2997
3510
  },
2998
3511
  className: "rounded-full p-0.5 leading-none hover:bg-primary/20",
2999
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 6l12 12M18 6L6 18" }) })
3512
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3513
+ "svg",
3514
+ {
3515
+ viewBox: "0 0 24 24",
3516
+ className: "h-3 w-3",
3517
+ fill: "none",
3518
+ stroke: "currentColor",
3519
+ strokeWidth: "2.5",
3520
+ strokeLinecap: "round",
3521
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 6l12 12M18 6L6 18" })
3522
+ }
3523
+ )
3000
3524
  }
3001
3525
  )
3002
3526
  ]
@@ -3027,7 +3551,19 @@ var Combobox = React52__namespace.forwardRef(
3027
3551
  ),
3028
3552
  name && multiple && selected.map((v) => /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: v }, v)),
3029
3553
  name && !multiple && /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: selected[0] ?? "" }),
3030
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" }) }) })
3554
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(
3555
+ "svg",
3556
+ {
3557
+ viewBox: "0 0 24 24",
3558
+ className: "h-4 w-4",
3559
+ fill: "none",
3560
+ stroke: "currentColor",
3561
+ strokeWidth: "2.5",
3562
+ strokeLinecap: "round",
3563
+ strokeLinejoin: "round",
3564
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" })
3565
+ }
3566
+ ) })
3031
3567
  ]
3032
3568
  }
3033
3569
  ),
@@ -3080,7 +3616,19 @@ var Combobox = React52__namespace.forwardRef(
3080
3616
  ),
3081
3617
  children: [
3082
3618
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: opt.label }),
3083
- isSelected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4 text-primary shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m5 12 5 5L20 7" }) })
3619
+ isSelected && /* @__PURE__ */ jsxRuntime.jsx(
3620
+ "svg",
3621
+ {
3622
+ viewBox: "0 0 24 24",
3623
+ className: "h-4 w-4 text-primary shrink-0",
3624
+ fill: "none",
3625
+ stroke: "currentColor",
3626
+ strokeWidth: "2.5",
3627
+ strokeLinecap: "round",
3628
+ strokeLinejoin: "round",
3629
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m5 12 5 5L20 7" })
3630
+ }
3631
+ )
3084
3632
  ]
3085
3633
  },
3086
3634
  opt.value
@@ -3148,7 +3696,10 @@ function toISODateString(d) {
3148
3696
  const day = String(d.getDate()).padStart(2, "0");
3149
3697
  return `${y}-${m}-${day}`;
3150
3698
  }
3151
- var monthLabelFormat = new Intl.DateTimeFormat(void 0, { month: "long", year: "numeric" });
3699
+ var monthLabelFormat = new Intl.DateTimeFormat(void 0, {
3700
+ month: "long",
3701
+ year: "numeric"
3702
+ });
3152
3703
  var fullDateFormat = new Intl.DateTimeFormat(void 0, { dateStyle: "full" });
3153
3704
  var weekdayShortFormat = new Intl.DateTimeFormat(void 0, { weekday: "short" });
3154
3705
  var weekdayLongFormat = new Intl.DateTimeFormat(void 0, { weekday: "long" });
@@ -3156,146 +3707,421 @@ var weekdayLabels = Array.from({ length: 7 }, (_, i) => {
3156
3707
  const d = addDays(startOfWeek(/* @__PURE__ */ new Date()), i);
3157
3708
  return { key: i, short: weekdayShortFormat.format(d), long: weekdayLongFormat.format(d) };
3158
3709
  });
3159
- var CalendarGrid = React52__namespace.forwardRef(function CalendarGrid2({ viewMonth, isDayDisabled, cellState, onSelectDay, onFocusDay, initialFocusDate, className }, ref) {
3160
- const gridDays = React52__namespace.useMemo(() => buildGridDays(viewMonth), [viewMonth]);
3710
+ var CalendarGrid = React52__namespace.forwardRef(
3711
+ function CalendarGrid2({ viewMonth, isDayDisabled, cellState, onSelectDay, onFocusDay, initialFocusDate, className }, ref) {
3712
+ const gridDays = React52__namespace.useMemo(() => buildGridDays(viewMonth), [viewMonth]);
3713
+ const inViewMonth = (d) => d.getMonth() === viewMonth.getMonth() && d.getFullYear() === viewMonth.getFullYear();
3714
+ const [focusedDate, setFocusedDate] = React52__namespace.useState(() => startOfDay(initialFocusDate));
3715
+ const pendingFocusRef = React52__namespace.useRef(false);
3716
+ const gridRef = React52__namespace.useRef(null);
3717
+ const rovingTarget = inViewMonth(focusedDate) && !isDayDisabled(focusedDate) ? focusedDate : gridDays.find((d) => inViewMonth(d) && !isDayDisabled(d)) ?? gridDays.find((d) => inViewMonth(d)) ?? gridDays[0];
3718
+ const moveFocusTo = (next, viaKeyboard) => {
3719
+ pendingFocusRef.current = viaKeyboard;
3720
+ setFocusedDate(next);
3721
+ onFocusDay?.(next);
3722
+ };
3723
+ React52__namespace.useEffect(() => {
3724
+ if (!pendingFocusRef.current) return;
3725
+ pendingFocusRef.current = false;
3726
+ const el = gridRef.current?.querySelector(
3727
+ `[data-date="${dateKey(rovingTarget)}"]`
3728
+ );
3729
+ el?.focus();
3730
+ }, [rovingTarget]);
3731
+ const step = (from, delta) => {
3732
+ let next = addDays(from, delta);
3733
+ let guard = 0;
3734
+ while (isDayDisabled(next) && guard < 1e3) {
3735
+ next = addDays(next, delta);
3736
+ guard++;
3737
+ }
3738
+ return isDayDisabled(next) ? from : next;
3739
+ };
3740
+ const selectDay = (d) => {
3741
+ if (isDayDisabled(d)) return;
3742
+ moveFocusTo(d, false);
3743
+ onSelectDay(d);
3744
+ };
3745
+ const onGridKeyDown = (e) => {
3746
+ switch (e.key) {
3747
+ case "ArrowRight":
3748
+ e.preventDefault();
3749
+ moveFocusTo(step(rovingTarget, 1), true);
3750
+ break;
3751
+ case "ArrowLeft":
3752
+ e.preventDefault();
3753
+ moveFocusTo(step(rovingTarget, -1), true);
3754
+ break;
3755
+ case "ArrowDown":
3756
+ e.preventDefault();
3757
+ moveFocusTo(step(rovingTarget, 7), true);
3758
+ break;
3759
+ case "ArrowUp":
3760
+ e.preventDefault();
3761
+ moveFocusTo(step(rovingTarget, -7), true);
3762
+ break;
3763
+ case "Home": {
3764
+ e.preventDefault();
3765
+ const target = startOfWeek(rovingTarget);
3766
+ moveFocusTo(isDayDisabled(target) ? step(target, 1) : target, true);
3767
+ break;
3768
+ }
3769
+ case "End": {
3770
+ e.preventDefault();
3771
+ const target = addDays(startOfWeek(rovingTarget), 6);
3772
+ moveFocusTo(isDayDisabled(target) ? step(target, -1) : target, true);
3773
+ break;
3774
+ }
3775
+ case "PageUp": {
3776
+ e.preventDefault();
3777
+ const target = e.shiftKey ? addYearsClamped(rovingTarget, -1) : addMonthsClamped(rovingTarget, -1);
3778
+ moveFocusTo(isDayDisabled(target) ? step(target, -1) : target, true);
3779
+ break;
3780
+ }
3781
+ case "PageDown": {
3782
+ e.preventDefault();
3783
+ const target = e.shiftKey ? addYearsClamped(rovingTarget, 1) : addMonthsClamped(rovingTarget, 1);
3784
+ moveFocusTo(isDayDisabled(target) ? step(target, 1) : target, true);
3785
+ break;
3786
+ }
3787
+ case "Enter":
3788
+ case " ":
3789
+ e.preventDefault();
3790
+ selectDay(rovingTarget);
3791
+ break;
3792
+ }
3793
+ };
3794
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs(
3795
+ "div",
3796
+ {
3797
+ ref: gridRef,
3798
+ role: "grid",
3799
+ "aria-label": monthLabelFormat.format(viewMonth),
3800
+ onKeyDown: onGridKeyDown,
3801
+ children: [
3802
+ /* @__PURE__ */ jsxRuntime.jsx("div", { role: "row", className: "grid grid-cols-7", children: weekdayLabels.map((w) => /* @__PURE__ */ jsxRuntime.jsx(
3803
+ "div",
3804
+ {
3805
+ role: "columnheader",
3806
+ "aria-label": w.long,
3807
+ className: "h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",
3808
+ children: w.short
3809
+ },
3810
+ w.key
3811
+ )) }),
3812
+ Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ jsxRuntime.jsx("div", { role: "row", className: "grid grid-cols-7", children: gridDays.slice(week * 7, week * 7 + 7).map((day) => {
3813
+ if (!inViewMonth(day)) {
3814
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "gridcell", "aria-hidden": "true", className: "h-9" }, dateKey(day));
3815
+ }
3816
+ const disabled = isDayDisabled(day);
3817
+ const state = cellState(day);
3818
+ const isRoving = isSameDay(day, rovingTarget);
3819
+ const isEndpoint = !!(state.selected || state.rangeStart || state.rangeEnd);
3820
+ return /* @__PURE__ */ jsxRuntime.jsx(
3821
+ "button",
3822
+ {
3823
+ type: "button",
3824
+ role: "gridcell",
3825
+ "data-date": dateKey(day),
3826
+ tabIndex: isRoving ? 0 : -1,
3827
+ "aria-selected": isEndpoint,
3828
+ "aria-disabled": disabled || void 0,
3829
+ "aria-label": fullDateFormat.format(day),
3830
+ onMouseEnter: () => onFocusDay?.(day),
3831
+ onClick: () => selectDay(day),
3832
+ className: cn(
3833
+ "h-9 w-9 mx-auto flex items-center justify-center text-sm",
3834
+ state.inRange && !isEndpoint ? "rounded-none" : "rounded-full",
3835
+ "focus:outline-none focus:ring-[3px] focus:ring-ring/30",
3836
+ disabled && "text-muted-foreground opacity-40 cursor-not-allowed",
3837
+ !disabled && isEndpoint && "bg-primary text-primary-foreground",
3838
+ !disabled && state.inRange && !isEndpoint && "bg-primary/15 text-foreground",
3839
+ !disabled && !isEndpoint && !state.inRange && state.today && "ring-1 ring-primary text-primary font-medium",
3840
+ !disabled && !isEndpoint && !state.inRange && !state.today && "text-foreground hover:bg-muted"
3841
+ ),
3842
+ children: day.getDate()
3843
+ },
3844
+ dateKey(day)
3845
+ );
3846
+ }) }, week))
3847
+ ]
3848
+ }
3849
+ ) });
3850
+ }
3851
+ );
3852
+ CalendarGrid.displayName = "CalendarGrid";
3853
+ var Calendar = React52__namespace.forwardRef(function Calendar2({
3854
+ value,
3855
+ defaultValue,
3856
+ onChange,
3857
+ month,
3858
+ defaultMonth,
3859
+ onMonthChange,
3860
+ min,
3861
+ max,
3862
+ disabledDates,
3863
+ className
3864
+ }, ref) {
3865
+ const controlled = value !== void 0;
3866
+ const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue);
3867
+ const selected = controlled ? value : internalValue;
3868
+ const monthControlled = month !== void 0;
3869
+ const [internalMonth, setInternalMonth] = React52__namespace.useState(
3870
+ () => startOfMonth(month ?? defaultMonth ?? selected ?? /* @__PURE__ */ new Date())
3871
+ );
3872
+ const viewMonth = monthControlled ? startOfMonth(month) : internalMonth;
3873
+ const setViewMonth = (next) => {
3874
+ const normalized = startOfMonth(next);
3875
+ if (!monthControlled) setInternalMonth(normalized);
3876
+ onMonthChange?.(normalized);
3877
+ };
3878
+ const isDayDisabled = React52__namespace.useCallback(
3879
+ (d) => {
3880
+ if (min && d < startOfDay(min)) return true;
3881
+ if (max && d > startOfDay(max)) return true;
3882
+ return disabledDates?.(d) ?? false;
3883
+ },
3884
+ [min, max, disabledDates]
3885
+ );
3886
+ const commitValue = (d) => {
3887
+ if (!controlled) setInternalValue(d);
3888
+ onChange?.(d);
3889
+ };
3890
+ const today = /* @__PURE__ */ new Date();
3891
+ const cellState = (d) => ({
3892
+ selected: selected ? isSameDay(d, selected) : false,
3893
+ today: isSameDay(d, today)
3894
+ });
3161
3895
  const inViewMonth = (d) => d.getMonth() === viewMonth.getMonth() && d.getFullYear() === viewMonth.getFullYear();
3162
- const [focusedDate, setFocusedDate] = React52__namespace.useState(() => startOfDay(initialFocusDate));
3163
- const pendingFocusRef = React52__namespace.useRef(false);
3164
- const gridRef = React52__namespace.useRef(null);
3165
- const rovingTarget = inViewMonth(focusedDate) && !isDayDisabled(focusedDate) ? focusedDate : gridDays.find((d) => inViewMonth(d) && !isDayDisabled(d)) ?? gridDays.find((d) => inViewMonth(d)) ?? gridDays[0];
3166
- const moveFocusTo = (next, viaKeyboard) => {
3167
- pendingFocusRef.current = viaKeyboard;
3168
- setFocusedDate(next);
3169
- onFocusDay?.(next);
3896
+ const handleFocusDay = (d) => {
3897
+ if (!inViewMonth(d)) setViewMonth(d);
3898
+ };
3899
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("w-[280px] select-none", className), children: [
3900
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
3901
+ /* @__PURE__ */ jsxRuntime.jsx(
3902
+ "button",
3903
+ {
3904
+ type: "button",
3905
+ "aria-label": "Previous month",
3906
+ onClick: () => setViewMonth(addMonths(viewMonth, -1)),
3907
+ className: "p-1.5 rounded-kj-sm text-muted-foreground hover:bg-muted hover:text-foreground",
3908
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3909
+ "svg",
3910
+ {
3911
+ viewBox: "0 0 24 24",
3912
+ className: "h-4 w-4",
3913
+ fill: "none",
3914
+ stroke: "currentColor",
3915
+ strokeWidth: "2.5",
3916
+ strokeLinecap: "round",
3917
+ strokeLinejoin: "round",
3918
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" })
3919
+ }
3920
+ )
3921
+ }
3922
+ ),
3923
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(viewMonth) }),
3924
+ /* @__PURE__ */ jsxRuntime.jsx(
3925
+ "button",
3926
+ {
3927
+ type: "button",
3928
+ "aria-label": "Next month",
3929
+ onClick: () => setViewMonth(addMonths(viewMonth, 1)),
3930
+ className: "p-1.5 rounded-kj-sm text-muted-foreground hover:bg-muted hover:text-foreground",
3931
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3932
+ "svg",
3933
+ {
3934
+ viewBox: "0 0 24 24",
3935
+ className: "h-4 w-4",
3936
+ fill: "none",
3937
+ stroke: "currentColor",
3938
+ strokeWidth: "2.5",
3939
+ strokeLinecap: "round",
3940
+ strokeLinejoin: "round",
3941
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
3942
+ }
3943
+ )
3944
+ }
3945
+ )
3946
+ ] }),
3947
+ /* @__PURE__ */ jsxRuntime.jsx(
3948
+ CalendarGrid,
3949
+ {
3950
+ viewMonth,
3951
+ isDayDisabled,
3952
+ cellState,
3953
+ onSelectDay: commitValue,
3954
+ onFocusDay: handleFocusDay,
3955
+ initialFocusDate: selected ?? /* @__PURE__ */ new Date()
3956
+ }
3957
+ )
3958
+ ] });
3959
+ });
3960
+ Calendar.displayName = "Calendar";
3961
+ var displayFormat = new Intl.DateTimeFormat(void 0, { dateStyle: "medium" });
3962
+ var DatePicker = React52__namespace.forwardRef(function DatePicker2({
3963
+ value,
3964
+ defaultValue,
3965
+ onChange,
3966
+ min,
3967
+ max,
3968
+ disabledDates,
3969
+ placeholder = "Pick a date\u2026",
3970
+ disabled = false,
3971
+ error = false,
3972
+ required = false,
3973
+ className,
3974
+ id,
3975
+ name,
3976
+ "aria-describedby": describedBy
3977
+ }, ref) {
3978
+ const controlled = value !== void 0;
3979
+ const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue);
3980
+ const selected = controlled ? value : internalValue;
3981
+ const [open, setOpen] = React52__namespace.useState(false);
3982
+ const containerRef = React52__namespace.useRef(null);
3983
+ const triggerRef = React52__namespace.useRef(null);
3984
+ const setTriggerRef = (node) => {
3985
+ triggerRef.current = node;
3986
+ if (typeof ref === "function") ref(node);
3987
+ else if (ref) ref.current = node;
3988
+ };
3989
+ const commitValue = (d) => {
3990
+ if (!controlled) setInternalValue(d);
3991
+ onChange?.(d);
3992
+ };
3993
+ const closePopup = React52__namespace.useCallback(() => setOpen(false), []);
3994
+ const openPopup = () => {
3995
+ if (!disabled) setOpen(true);
3996
+ };
3997
+ const handleCalendarChange = (d) => {
3998
+ commitValue(d);
3999
+ closePopup();
4000
+ triggerRef.current?.focus();
3170
4001
  };
3171
4002
  React52__namespace.useEffect(() => {
3172
- if (!pendingFocusRef.current) return;
3173
- pendingFocusRef.current = false;
3174
- const el = gridRef.current?.querySelector(`[data-date="${dateKey(rovingTarget)}"]`);
3175
- el?.focus();
3176
- }, [rovingTarget]);
3177
- const step = (from, delta) => {
3178
- let next = addDays(from, delta);
3179
- let guard = 0;
3180
- while (isDayDisabled(next) && guard < 1e3) {
3181
- next = addDays(next, delta);
3182
- guard++;
4003
+ if (!open) return;
4004
+ const onDown = (e) => {
4005
+ if (containerRef.current && !containerRef.current.contains(e.target)) closePopup();
4006
+ };
4007
+ document.addEventListener("mousedown", onDown);
4008
+ return () => document.removeEventListener("mousedown", onDown);
4009
+ }, [open, closePopup]);
4010
+ const onTriggerKeyDown = (e) => {
4011
+ if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
4012
+ e.preventDefault();
4013
+ openPopup();
4014
+ } else if (e.key === "Escape" && open) {
4015
+ e.preventDefault();
4016
+ closePopup();
3183
4017
  }
3184
- return isDayDisabled(next) ? from : next;
3185
4018
  };
3186
- const selectDay = (d) => {
3187
- if (isDayDisabled(d)) return;
3188
- moveFocusTo(d, false);
3189
- onSelectDay(d);
3190
- };
3191
- const onGridKeyDown = (e) => {
3192
- switch (e.key) {
3193
- case "ArrowRight":
3194
- e.preventDefault();
3195
- moveFocusTo(step(rovingTarget, 1), true);
3196
- break;
3197
- case "ArrowLeft":
3198
- e.preventDefault();
3199
- moveFocusTo(step(rovingTarget, -1), true);
3200
- break;
3201
- case "ArrowDown":
3202
- e.preventDefault();
3203
- moveFocusTo(step(rovingTarget, 7), true);
3204
- break;
3205
- case "ArrowUp":
3206
- e.preventDefault();
3207
- moveFocusTo(step(rovingTarget, -7), true);
3208
- break;
3209
- case "Home": {
3210
- e.preventDefault();
3211
- const target = startOfWeek(rovingTarget);
3212
- moveFocusTo(isDayDisabled(target) ? step(target, 1) : target, true);
3213
- break;
3214
- }
3215
- case "End": {
3216
- e.preventDefault();
3217
- const target = addDays(startOfWeek(rovingTarget), 6);
3218
- moveFocusTo(isDayDisabled(target) ? step(target, -1) : target, true);
3219
- break;
3220
- }
3221
- case "PageUp": {
3222
- e.preventDefault();
3223
- const target = e.shiftKey ? addYearsClamped(rovingTarget, -1) : addMonthsClamped(rovingTarget, -1);
3224
- moveFocusTo(isDayDisabled(target) ? step(target, -1) : target, true);
3225
- break;
3226
- }
3227
- case "PageDown": {
3228
- e.preventDefault();
3229
- const target = e.shiftKey ? addYearsClamped(rovingTarget, 1) : addMonthsClamped(rovingTarget, 1);
3230
- moveFocusTo(isDayDisabled(target) ? step(target, 1) : target, true);
3231
- break;
3232
- }
3233
- case "Enter":
3234
- case " ":
3235
- e.preventDefault();
3236
- selectDay(rovingTarget);
3237
- break;
4019
+ const onPanelKeyDown = (e) => {
4020
+ if (e.key === "Escape") {
4021
+ e.preventDefault();
4022
+ closePopup();
4023
+ triggerRef.current?.focus();
3238
4024
  }
3239
4025
  };
3240
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: gridRef, role: "grid", "aria-label": monthLabelFormat.format(viewMonth), onKeyDown: onGridKeyDown, children: [
3241
- /* @__PURE__ */ jsxRuntime.jsx("div", { role: "row", className: "grid grid-cols-7", children: weekdayLabels.map((w) => /* @__PURE__ */ jsxRuntime.jsx(
4026
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative inline-block w-full", className), children: [
4027
+ /* @__PURE__ */ jsxRuntime.jsxs(
4028
+ "button",
4029
+ {
4030
+ ref: setTriggerRef,
4031
+ type: "button",
4032
+ id,
4033
+ disabled,
4034
+ "aria-haspopup": "grid",
4035
+ "aria-expanded": open,
4036
+ "aria-invalid": error || void 0,
4037
+ "aria-required": required || void 0,
4038
+ "aria-describedby": describedBy,
4039
+ onClick: () => open ? closePopup() : openPopup(),
4040
+ onKeyDown: onTriggerKeyDown,
4041
+ className: cn(
4042
+ "w-full flex items-center justify-between gap-2 border rounded-kj-md bg-surface text-left text-sm",
4043
+ "pl-[0.85rem] pr-3 py-[calc(0.6rem*var(--kj-density,1))]",
4044
+ "transition-[border-color,box-shadow] duration-150",
4045
+ "focus:outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/30",
4046
+ disabled && "bg-muted text-muted-foreground cursor-not-allowed",
4047
+ error ? "border-danger" : "border-input",
4048
+ !selected && "text-muted-foreground"
4049
+ ),
4050
+ children: [
4051
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: selected ? displayFormat.format(selected) : placeholder }),
4052
+ /* @__PURE__ */ jsxRuntime.jsxs(
4053
+ "svg",
4054
+ {
4055
+ viewBox: "0 0 24 24",
4056
+ className: "h-4 w-4 text-muted-foreground shrink-0",
4057
+ fill: "none",
4058
+ stroke: "currentColor",
4059
+ strokeWidth: "2",
4060
+ strokeLinecap: "round",
4061
+ strokeLinejoin: "round",
4062
+ children: [
4063
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
4064
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 10h18M8 2v4M16 2v4" })
4065
+ ]
4066
+ }
4067
+ )
4068
+ ]
4069
+ }
4070
+ ),
4071
+ name && /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: selected ? toISODateString(selected) : "" }),
4072
+ open && /* @__PURE__ */ jsxRuntime.jsx(
3242
4073
  "div",
3243
4074
  {
3244
- role: "columnheader",
3245
- "aria-label": w.long,
3246
- className: "h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",
3247
- children: w.short
3248
- },
3249
- w.key
3250
- )) }),
3251
- Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ jsxRuntime.jsx("div", { role: "row", className: "grid grid-cols-7", children: gridDays.slice(week * 7, week * 7 + 7).map((day) => {
3252
- if (!inViewMonth(day)) {
3253
- return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "gridcell", "aria-hidden": "true", className: "h-9" }, dateKey(day));
4075
+ onKeyDown: onPanelKeyDown,
4076
+ className: "absolute z-40 top-[calc(100%+6px)] left-0 bg-surface border border-border rounded-kj-md shadow-kj-lg p-3 animate-[kjpop_.12s_ease]",
4077
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4078
+ Calendar,
4079
+ {
4080
+ value: selected,
4081
+ onChange: handleCalendarChange,
4082
+ min,
4083
+ max,
4084
+ disabledDates
4085
+ }
4086
+ )
3254
4087
  }
3255
- const disabled = isDayDisabled(day);
3256
- const state = cellState(day);
3257
- const isRoving = isSameDay(day, rovingTarget);
3258
- const isEndpoint = !!(state.selected || state.rangeStart || state.rangeEnd);
3259
- return /* @__PURE__ */ jsxRuntime.jsx(
3260
- "button",
3261
- {
3262
- type: "button",
3263
- role: "gridcell",
3264
- "data-date": dateKey(day),
3265
- tabIndex: isRoving ? 0 : -1,
3266
- "aria-selected": isEndpoint,
3267
- "aria-disabled": disabled || void 0,
3268
- "aria-label": fullDateFormat.format(day),
3269
- onMouseEnter: () => onFocusDay?.(day),
3270
- onClick: () => selectDay(day),
3271
- className: cn(
3272
- "h-9 w-9 mx-auto flex items-center justify-center text-sm",
3273
- state.inRange && !isEndpoint ? "rounded-none" : "rounded-full",
3274
- "focus:outline-none focus:ring-[3px] focus:ring-ring/30",
3275
- disabled && "text-muted-foreground opacity-40 cursor-not-allowed",
3276
- !disabled && isEndpoint && "bg-primary text-primary-foreground",
3277
- !disabled && state.inRange && !isEndpoint && "bg-primary/15 text-foreground",
3278
- !disabled && !isEndpoint && !state.inRange && state.today && "ring-1 ring-primary text-primary font-medium",
3279
- !disabled && !isEndpoint && !state.inRange && !state.today && "text-foreground hover:bg-muted"
3280
- ),
3281
- children: day.getDate()
3282
- },
3283
- dateKey(day)
3284
- );
3285
- }) }, week))
3286
- ] }) });
4088
+ )
4089
+ ] });
3287
4090
  });
3288
- CalendarGrid.displayName = "CalendarGrid";
3289
- var Calendar = React52__namespace.forwardRef(
3290
- function Calendar2({ value, defaultValue, onChange, month, defaultMonth, onMonthChange, min, max, disabledDates, className }, ref) {
4091
+ DatePicker.displayName = "DatePicker";
4092
+ var DatePickerField = React52__namespace.forwardRef(
4093
+ function DatePickerField2({ label, hint, error, required, className, ...props }, ref) {
4094
+ return /* @__PURE__ */ jsxRuntime.jsx(FormField, { label, hint, error, required, className, children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, { ref, error: !!error, ...props }) });
4095
+ }
4096
+ );
4097
+ DatePickerField.displayName = "DatePickerField";
4098
+ function isBetweenExclusive(d, lo, hi) {
4099
+ const t = startOfDay(d).getTime();
4100
+ return t > startOfDay(lo).getTime() && t < startOfDay(hi).getTime();
4101
+ }
4102
+ var RangeCalendar = React52__namespace.forwardRef(
4103
+ function RangeCalendar2({
4104
+ value,
4105
+ defaultValue,
4106
+ onChange,
4107
+ month,
4108
+ defaultMonth,
4109
+ onMonthChange,
4110
+ min,
4111
+ max,
4112
+ disabledDates,
4113
+ singleMonth,
4114
+ className
4115
+ }, ref) {
3291
4116
  const controlled = value !== void 0;
3292
- const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue);
3293
- const selected = controlled ? value : internalValue;
4117
+ const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue ?? {});
4118
+ const range2 = controlled ? value : internalValue;
3294
4119
  const monthControlled = month !== void 0;
3295
4120
  const [internalMonth, setInternalMonth] = React52__namespace.useState(
3296
- () => startOfMonth(month ?? defaultMonth ?? selected ?? /* @__PURE__ */ new Date())
4121
+ () => startOfMonth(month ?? defaultMonth ?? range2.start ?? /* @__PURE__ */ new Date())
3297
4122
  );
3298
- const viewMonth = monthControlled ? startOfMonth(month) : internalMonth;
4123
+ const leftMonth = monthControlled ? startOfMonth(month) : internalMonth;
4124
+ const rightMonth = addMonths(leftMonth, 1);
3299
4125
  const setViewMonth = (next) => {
3300
4126
  const normalized = startOfMonth(next);
3301
4127
  if (!monthControlled) setInternalMonth(normalized);
@@ -3309,221 +4135,11 @@ var Calendar = React52__namespace.forwardRef(
3309
4135
  },
3310
4136
  [min, max, disabledDates]
3311
4137
  );
3312
- const commitValue = (d) => {
3313
- if (!controlled) setInternalValue(d);
3314
- onChange?.(d);
3315
- };
3316
- const today = /* @__PURE__ */ new Date();
3317
- const cellState = (d) => ({
3318
- selected: selected ? isSameDay(d, selected) : false,
3319
- today: isSameDay(d, today)
3320
- });
3321
- const inViewMonth = (d) => d.getMonth() === viewMonth.getMonth() && d.getFullYear() === viewMonth.getFullYear();
3322
- const handleFocusDay = (d) => {
3323
- if (!inViewMonth(d)) setViewMonth(d);
3324
- };
3325
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("w-[280px] select-none", className), children: [
3326
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
3327
- /* @__PURE__ */ jsxRuntime.jsx(
3328
- "button",
3329
- {
3330
- type: "button",
3331
- "aria-label": "Previous month",
3332
- onClick: () => setViewMonth(addMonths(viewMonth, -1)),
3333
- className: "p-1.5 rounded-kj-sm text-muted-foreground hover:bg-muted hover:text-foreground",
3334
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) })
3335
- }
3336
- ),
3337
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(viewMonth) }),
3338
- /* @__PURE__ */ jsxRuntime.jsx(
3339
- "button",
3340
- {
3341
- type: "button",
3342
- "aria-label": "Next month",
3343
- onClick: () => setViewMonth(addMonths(viewMonth, 1)),
3344
- className: "p-1.5 rounded-kj-sm text-muted-foreground hover:bg-muted hover:text-foreground",
3345
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) })
3346
- }
3347
- )
3348
- ] }),
3349
- /* @__PURE__ */ jsxRuntime.jsx(
3350
- CalendarGrid,
3351
- {
3352
- viewMonth,
3353
- isDayDisabled,
3354
- cellState,
3355
- onSelectDay: commitValue,
3356
- onFocusDay: handleFocusDay,
3357
- initialFocusDate: selected ?? /* @__PURE__ */ new Date()
3358
- }
3359
- )
3360
- ] });
3361
- }
3362
- );
3363
- Calendar.displayName = "Calendar";
3364
- var displayFormat = new Intl.DateTimeFormat(void 0, { dateStyle: "medium" });
3365
- var DatePicker = React52__namespace.forwardRef(
3366
- function DatePicker2({
3367
- value,
3368
- defaultValue,
3369
- onChange,
3370
- min,
3371
- max,
3372
- disabledDates,
3373
- placeholder = "Pick a date\u2026",
3374
- disabled = false,
3375
- error = false,
3376
- required = false,
3377
- className,
3378
- id,
3379
- name,
3380
- "aria-describedby": describedBy
3381
- }, ref) {
3382
- const controlled = value !== void 0;
3383
- const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue);
3384
- const selected = controlled ? value : internalValue;
3385
- const [open, setOpen] = React52__namespace.useState(false);
3386
- const containerRef = React52__namespace.useRef(null);
3387
- const triggerRef = React52__namespace.useRef(null);
3388
- const setTriggerRef = (node) => {
3389
- triggerRef.current = node;
3390
- if (typeof ref === "function") ref(node);
3391
- else if (ref) ref.current = node;
3392
- };
3393
- const commitValue = (d) => {
3394
- if (!controlled) setInternalValue(d);
3395
- onChange?.(d);
3396
- };
3397
- const closePopup = React52__namespace.useCallback(() => setOpen(false), []);
3398
- const openPopup = () => {
3399
- if (!disabled) setOpen(true);
3400
- };
3401
- const handleCalendarChange = (d) => {
3402
- commitValue(d);
3403
- closePopup();
3404
- triggerRef.current?.focus();
3405
- };
3406
- React52__namespace.useEffect(() => {
3407
- if (!open) return;
3408
- const onDown = (e) => {
3409
- if (containerRef.current && !containerRef.current.contains(e.target)) closePopup();
3410
- };
3411
- document.addEventListener("mousedown", onDown);
3412
- return () => document.removeEventListener("mousedown", onDown);
3413
- }, [open, closePopup]);
3414
- const onTriggerKeyDown = (e) => {
3415
- if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
3416
- e.preventDefault();
3417
- openPopup();
3418
- } else if (e.key === "Escape" && open) {
3419
- e.preventDefault();
3420
- closePopup();
3421
- }
3422
- };
3423
- const onPanelKeyDown = (e) => {
3424
- if (e.key === "Escape") {
3425
- e.preventDefault();
3426
- closePopup();
3427
- triggerRef.current?.focus();
3428
- }
3429
- };
3430
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative inline-block w-full", className), children: [
3431
- /* @__PURE__ */ jsxRuntime.jsxs(
3432
- "button",
3433
- {
3434
- ref: setTriggerRef,
3435
- type: "button",
3436
- id,
3437
- disabled,
3438
- "aria-haspopup": "grid",
3439
- "aria-expanded": open,
3440
- "aria-invalid": error || void 0,
3441
- "aria-required": required || void 0,
3442
- "aria-describedby": describedBy,
3443
- onClick: () => open ? closePopup() : openPopup(),
3444
- onKeyDown: onTriggerKeyDown,
3445
- className: cn(
3446
- "w-full flex items-center justify-between gap-2 border rounded-kj-md bg-surface text-left text-sm",
3447
- "pl-[0.85rem] pr-3 py-[calc(0.6rem*var(--kj-density,1))]",
3448
- "transition-[border-color,box-shadow] duration-150",
3449
- "focus:outline-none focus:border-ring focus:ring-[3px] focus:ring-ring/30",
3450
- disabled && "bg-muted text-muted-foreground cursor-not-allowed",
3451
- error ? "border-danger" : "border-input",
3452
- !selected && "text-muted-foreground"
3453
- ),
3454
- children: [
3455
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: selected ? displayFormat.format(selected) : placeholder }),
3456
- /* @__PURE__ */ jsxRuntime.jsxs(
3457
- "svg",
3458
- {
3459
- viewBox: "0 0 24 24",
3460
- className: "h-4 w-4 text-muted-foreground shrink-0",
3461
- fill: "none",
3462
- stroke: "currentColor",
3463
- strokeWidth: "2",
3464
- strokeLinecap: "round",
3465
- strokeLinejoin: "round",
3466
- children: [
3467
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
3468
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 10h18M8 2v4M16 2v4" })
3469
- ]
3470
- }
3471
- )
3472
- ]
3473
- }
3474
- ),
3475
- name && /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: selected ? toISODateString(selected) : "" }),
3476
- open && /* @__PURE__ */ jsxRuntime.jsx(
3477
- "div",
3478
- {
3479
- onKeyDown: onPanelKeyDown,
3480
- className: "absolute z-40 top-[calc(100%+6px)] left-0 bg-surface border border-border rounded-kj-md shadow-kj-lg p-3 animate-[kjpop_.12s_ease]",
3481
- children: /* @__PURE__ */ jsxRuntime.jsx(Calendar, { value: selected, onChange: handleCalendarChange, min, max, disabledDates })
3482
- }
3483
- )
3484
- ] });
3485
- }
3486
- );
3487
- DatePicker.displayName = "DatePicker";
3488
- var DatePickerField = React52__namespace.forwardRef(
3489
- function DatePickerField2({ label, hint, error, required, className, ...props }, ref) {
3490
- return /* @__PURE__ */ jsxRuntime.jsx(FormField, { label, hint, error, required, className, children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, { ref, error: !!error, ...props }) });
3491
- }
3492
- );
3493
- DatePickerField.displayName = "DatePickerField";
3494
- function isBetweenExclusive(d, lo, hi) {
3495
- const t = startOfDay(d).getTime();
3496
- return t > startOfDay(lo).getTime() && t < startOfDay(hi).getTime();
3497
- }
3498
- var RangeCalendar = React52__namespace.forwardRef(
3499
- function RangeCalendar2({ value, defaultValue, onChange, month, defaultMonth, onMonthChange, min, max, disabledDates, singleMonth, className }, ref) {
3500
- const controlled = value !== void 0;
3501
- const [internalValue, setInternalValue] = React52__namespace.useState(defaultValue ?? {});
3502
- const range2 = controlled ? value : internalValue;
3503
- const monthControlled = month !== void 0;
3504
- const [internalMonth, setInternalMonth] = React52__namespace.useState(
3505
- () => startOfMonth(month ?? defaultMonth ?? range2.start ?? /* @__PURE__ */ new Date())
3506
- );
3507
- const leftMonth = monthControlled ? startOfMonth(month) : internalMonth;
3508
- const rightMonth = addMonths(leftMonth, 1);
3509
- const setViewMonth = (next) => {
3510
- const normalized = startOfMonth(next);
3511
- if (!monthControlled) setInternalMonth(normalized);
3512
- onMonthChange?.(normalized);
3513
- };
3514
- const isDayDisabled = React52__namespace.useCallback(
3515
- (d) => {
3516
- if (min && d < startOfDay(min)) return true;
3517
- if (max && d > startOfDay(max)) return true;
3518
- return disabledDates?.(d) ?? false;
3519
- },
3520
- [min, max, disabledDates]
3521
- );
3522
- const [pendingStart, setPendingStart] = React52__namespace.useState(void 0);
3523
- const [hoverDate, setHoverDate] = React52__namespace.useState(void 0);
3524
- const commitRange = (next) => {
3525
- if (!controlled) setInternalValue(next);
3526
- onChange?.(next);
4138
+ const [pendingStart, setPendingStart] = React52__namespace.useState(void 0);
4139
+ const [hoverDate, setHoverDate] = React52__namespace.useState(void 0);
4140
+ const commitRange = (next) => {
4141
+ if (!controlled) setInternalValue(next);
4142
+ onChange?.(next);
3527
4143
  };
3528
4144
  const handleSelectDay = (d) => {
3529
4145
  const day = startOfDay(d);
@@ -3581,48 +4197,70 @@ var RangeCalendar = React52__namespace.forwardRef(
3581
4197
  "aria-label": direction === "prev" ? "Previous month" : "Next month",
3582
4198
  onClick: () => setViewMonth(addMonths(leftMonth, direction === "prev" ? -1 : 1)),
3583
4199
  className: "p-1.5 rounded-kj-sm text-muted-foreground hover:bg-muted hover:text-foreground",
3584
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: direction === "prev" ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) })
3585
- }
3586
- );
3587
- const showSingleMonth = singleMonth;
3588
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-col sm:flex-row gap-4 sm:gap-6 select-none max-w-full overflow-hidden", className), children: [
3589
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full sm:w-[280px]", children: [
3590
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
3591
- navButton("prev"),
3592
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(leftMonth) }),
3593
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: showSingleMonth ? "" : "sm:hidden", children: navButton("next") })
3594
- ] }),
3595
- /* @__PURE__ */ jsxRuntime.jsx(
3596
- CalendarGrid,
3597
- {
3598
- viewMonth: leftMonth,
3599
- isDayDisabled,
3600
- cellState,
3601
- onSelectDay: handleSelectDay,
3602
- onFocusDay: handleFocusDay,
3603
- initialFocusDate: pendingStart ?? range2.start ?? /* @__PURE__ */ new Date()
3604
- }
3605
- )
3606
- ] }),
3607
- !showSingleMonth && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:block w-[280px]", children: [
3608
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
3609
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-[26px]", "aria-hidden": "true" }),
3610
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(rightMonth) }),
3611
- navButton("next")
3612
- ] }),
3613
- /* @__PURE__ */ jsxRuntime.jsx(
3614
- CalendarGrid,
4200
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4201
+ "svg",
3615
4202
  {
3616
- viewMonth: rightMonth,
3617
- isDayDisabled,
3618
- cellState,
3619
- onSelectDay: handleSelectDay,
3620
- onFocusDay: handleFocusDay,
3621
- initialFocusDate: pendingStart ?? range2.start ?? /* @__PURE__ */ new Date()
4203
+ viewBox: "0 0 24 24",
4204
+ className: "h-4 w-4",
4205
+ fill: "none",
4206
+ stroke: "currentColor",
4207
+ strokeWidth: "2.5",
4208
+ strokeLinecap: "round",
4209
+ strokeLinejoin: "round",
4210
+ children: direction === "prev" ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
3622
4211
  }
3623
4212
  )
3624
- ] })
3625
- ] });
4213
+ }
4214
+ );
4215
+ const showSingleMonth = singleMonth;
4216
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4217
+ "div",
4218
+ {
4219
+ ref,
4220
+ className: cn(
4221
+ "flex flex-col sm:flex-row gap-4 sm:gap-6 select-none max-w-full overflow-hidden",
4222
+ className
4223
+ ),
4224
+ children: [
4225
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full sm:w-[280px]", children: [
4226
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
4227
+ navButton("prev"),
4228
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(leftMonth) }),
4229
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: showSingleMonth ? "" : "sm:hidden", children: navButton("next") })
4230
+ ] }),
4231
+ /* @__PURE__ */ jsxRuntime.jsx(
4232
+ CalendarGrid,
4233
+ {
4234
+ viewMonth: leftMonth,
4235
+ isDayDisabled,
4236
+ cellState,
4237
+ onSelectDay: handleSelectDay,
4238
+ onFocusDay: handleFocusDay,
4239
+ initialFocusDate: pendingStart ?? range2.start ?? /* @__PURE__ */ new Date()
4240
+ }
4241
+ )
4242
+ ] }),
4243
+ !showSingleMonth && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:block w-[280px]", children: [
4244
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
4245
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-[26px]", "aria-hidden": "true" }),
4246
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: monthLabelFormat.format(rightMonth) }),
4247
+ navButton("next")
4248
+ ] }),
4249
+ /* @__PURE__ */ jsxRuntime.jsx(
4250
+ CalendarGrid,
4251
+ {
4252
+ viewMonth: rightMonth,
4253
+ isDayDisabled,
4254
+ cellState,
4255
+ onSelectDay: handleSelectDay,
4256
+ onFocusDay: handleFocusDay,
4257
+ initialFocusDate: pendingStart ?? range2.start ?? /* @__PURE__ */ new Date()
4258
+ }
4259
+ )
4260
+ ] })
4261
+ ]
4262
+ }
4263
+ );
3626
4264
  }
3627
4265
  );
3628
4266
  RangeCalendar.displayName = "RangeCalendar";
@@ -3744,15 +4382,38 @@ var DateRangePicker = React52__namespace.forwardRef(
3744
4382
  }
3745
4383
  ),
3746
4384
  name && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3747
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name: `${name}Start`, value: selected.start ? toISODateString(selected.start) : "" }),
3748
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name: `${name}End`, value: selected.end ? toISODateString(selected.end) : "" })
4385
+ /* @__PURE__ */ jsxRuntime.jsx(
4386
+ "input",
4387
+ {
4388
+ type: "hidden",
4389
+ name: `${name}Start`,
4390
+ value: selected.start ? toISODateString(selected.start) : ""
4391
+ }
4392
+ ),
4393
+ /* @__PURE__ */ jsxRuntime.jsx(
4394
+ "input",
4395
+ {
4396
+ type: "hidden",
4397
+ name: `${name}End`,
4398
+ value: selected.end ? toISODateString(selected.end) : ""
4399
+ }
4400
+ )
3749
4401
  ] }),
3750
4402
  open && /* @__PURE__ */ jsxRuntime.jsx(
3751
4403
  "div",
3752
4404
  {
3753
4405
  onKeyDown: onPanelKeyDown,
3754
4406
  className: "absolute z-40 top-[calc(100%+6px)] left-0 sm:left-auto right-0 sm:right-auto max-w-[calc(100vw-2rem)] bg-surface border border-border rounded-kj-md shadow-kj-lg p-3 animate-[kjpop_.12s_ease]",
3755
- children: /* @__PURE__ */ jsxRuntime.jsx(RangeCalendar, { value: selected, onChange: handleRangeChange, min, max, disabledDates })
4407
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4408
+ RangeCalendar,
4409
+ {
4410
+ value: selected,
4411
+ onChange: handleRangeChange,
4412
+ min,
4413
+ max,
4414
+ disabledDates
4415
+ }
4416
+ )
3756
4417
  }
3757
4418
  )
3758
4419
  ] });
@@ -3765,108 +4426,118 @@ var DateRangePickerField = React52__namespace.forwardRef(
3765
4426
  }
3766
4427
  );
3767
4428
  DateRangePickerField.displayName = "DateRangePickerField";
3768
- var Dropzone = React52__namespace.forwardRef(
3769
- function Dropzone2({
3770
- onFiles,
3771
- accept,
3772
- multiple = true,
3773
- disabled = false,
3774
- className,
3775
- children,
3776
- id,
3777
- "aria-describedby": describedBy,
3778
- "aria-invalid": ariaInvalid,
3779
- "aria-required": ariaRequired
3780
- }, ref) {
3781
- const inputRef = React52__namespace.useRef(null);
3782
- const [dragActive, setDragActive] = React52__namespace.useState(false);
3783
- const dragCounter = React52__namespace.useRef(0);
3784
- const invalid = ariaInvalid === true || ariaInvalid === "true";
3785
- const openPicker = () => {
3786
- if (!disabled) inputRef.current?.click();
3787
- };
3788
- const handleInputChange = (e) => {
3789
- const files = e.target.files ? Array.from(e.target.files) : [];
3790
- if (files.length > 0) onFiles(files);
3791
- e.target.value = "";
3792
- };
3793
- const handleDragEnter = (e) => {
3794
- e.preventDefault();
3795
- if (disabled) return;
3796
- dragCounter.current += 1;
3797
- setDragActive(true);
3798
- };
3799
- const handleDragOver = (e) => {
3800
- e.preventDefault();
3801
- };
3802
- const handleDragLeave = (e) => {
3803
- e.preventDefault();
3804
- if (disabled) return;
3805
- dragCounter.current -= 1;
3806
- if (dragCounter.current <= 0) {
3807
- dragCounter.current = 0;
3808
- setDragActive(false);
3809
- }
3810
- };
3811
- const handleDrop = (e) => {
3812
- e.preventDefault();
4429
+ var Dropzone = React52__namespace.forwardRef(function Dropzone2({
4430
+ onFiles,
4431
+ accept,
4432
+ multiple = true,
4433
+ disabled = false,
4434
+ className,
4435
+ children,
4436
+ id,
4437
+ "aria-describedby": describedBy,
4438
+ "aria-invalid": ariaInvalid,
4439
+ "aria-required": ariaRequired
4440
+ }, ref) {
4441
+ const inputRef = React52__namespace.useRef(null);
4442
+ const [dragActive, setDragActive] = React52__namespace.useState(false);
4443
+ const dragCounter = React52__namespace.useRef(0);
4444
+ const invalid = ariaInvalid === true || ariaInvalid === "true";
4445
+ const openPicker = () => {
4446
+ if (!disabled) inputRef.current?.click();
4447
+ };
4448
+ const handleInputChange = (e) => {
4449
+ const files = e.target.files ? Array.from(e.target.files) : [];
4450
+ if (files.length > 0) onFiles(files);
4451
+ e.target.value = "";
4452
+ };
4453
+ const handleDragEnter = (e) => {
4454
+ e.preventDefault();
4455
+ if (disabled) return;
4456
+ dragCounter.current += 1;
4457
+ setDragActive(true);
4458
+ };
4459
+ const handleDragOver = (e) => {
4460
+ e.preventDefault();
4461
+ };
4462
+ const handleDragLeave = (e) => {
4463
+ e.preventDefault();
4464
+ if (disabled) return;
4465
+ dragCounter.current -= 1;
4466
+ if (dragCounter.current <= 0) {
3813
4467
  dragCounter.current = 0;
3814
4468
  setDragActive(false);
3815
- if (disabled) return;
3816
- const files = e.dataTransfer?.files ? Array.from(e.dataTransfer.files) : [];
3817
- if (files.length > 0) onFiles(files);
3818
- };
3819
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), children: [
3820
- /* @__PURE__ */ jsxRuntime.jsx(
3821
- "button",
3822
- {
3823
- ref,
3824
- type: "button",
3825
- id,
3826
- disabled,
3827
- "aria-describedby": describedBy,
3828
- "aria-invalid": ariaInvalid,
3829
- "aria-required": ariaRequired,
3830
- "data-drag-active": dragActive || void 0,
3831
- onClick: openPicker,
3832
- onDragEnter: handleDragEnter,
3833
- onDragOver: handleDragOver,
3834
- onDragLeave: handleDragLeave,
3835
- onDrop: handleDrop,
3836
- className: cn(
3837
- "w-full flex flex-col items-center justify-center gap-2 rounded-kj-md border-2 border-dashed px-6 py-8 text-center text-sm transition-colors",
3838
- "focus:outline-none focus:ring-[3px] focus:ring-ring/30",
3839
- disabled ? "border-input bg-muted text-muted-foreground cursor-not-allowed" : dragActive ? "border-primary bg-primary/5 text-foreground cursor-pointer" : invalid ? "border-danger bg-surface text-muted-foreground hover:text-foreground cursor-pointer" : "border-input bg-surface text-muted-foreground hover:border-primary hover:text-foreground cursor-pointer"
4469
+ }
4470
+ };
4471
+ const handleDrop = (e) => {
4472
+ e.preventDefault();
4473
+ dragCounter.current = 0;
4474
+ setDragActive(false);
4475
+ if (disabled) return;
4476
+ const files = e.dataTransfer?.files ? Array.from(e.dataTransfer.files) : [];
4477
+ if (files.length > 0) onFiles(files);
4478
+ };
4479
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", className), children: [
4480
+ /* @__PURE__ */ jsxRuntime.jsx(
4481
+ "button",
4482
+ {
4483
+ ref,
4484
+ type: "button",
4485
+ id,
4486
+ disabled,
4487
+ "aria-describedby": describedBy,
4488
+ "aria-invalid": ariaInvalid,
4489
+ "aria-required": ariaRequired,
4490
+ "data-drag-active": dragActive || void 0,
4491
+ onClick: openPicker,
4492
+ onDragEnter: handleDragEnter,
4493
+ onDragOver: handleDragOver,
4494
+ onDragLeave: handleDragLeave,
4495
+ onDrop: handleDrop,
4496
+ className: cn(
4497
+ "w-full flex flex-col items-center justify-center gap-2 rounded-kj-md border-2 border-dashed px-6 py-8 text-center text-sm transition-colors",
4498
+ "focus:outline-none focus:ring-[3px] focus:ring-ring/30",
4499
+ disabled ? "border-input bg-muted text-muted-foreground cursor-not-allowed" : dragActive ? "border-primary bg-primary/5 text-foreground cursor-pointer" : invalid ? "border-danger bg-surface text-muted-foreground hover:text-foreground cursor-pointer" : "border-input bg-surface text-muted-foreground hover:border-primary hover:text-foreground cursor-pointer"
4500
+ ),
4501
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4502
+ /* @__PURE__ */ jsxRuntime.jsxs(
4503
+ "svg",
4504
+ {
4505
+ viewBox: "0 0 24 24",
4506
+ className: "h-7 w-7",
4507
+ fill: "none",
4508
+ stroke: "currentColor",
4509
+ strokeWidth: "1.5",
4510
+ strokeLinecap: "round",
4511
+ strokeLinejoin: "round",
4512
+ children: [
4513
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16V4M7 9l5-5 5 5" }),
4514
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 16v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3" })
4515
+ ]
4516
+ }
3840
4517
  ),
3841
- children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3842
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", className: "h-7 w-7", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
3843
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16V4M7 9l5-5 5 5" }),
3844
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 16v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3" })
3845
- ] }),
3846
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
3847
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: "Drag and drop files here" }),
3848
- ", or click to browse"
3849
- ] })
4518
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
4519
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: "Drag and drop files here" }),
4520
+ ", or click to browse"
3850
4521
  ] })
3851
- }
3852
- ),
3853
- /* @__PURE__ */ jsxRuntime.jsx(
3854
- "input",
3855
- {
3856
- ref: inputRef,
3857
- type: "file",
3858
- accept,
3859
- multiple,
3860
- disabled,
3861
- onChange: handleInputChange,
3862
- className: "sr-only",
3863
- tabIndex: -1,
3864
- "aria-hidden": "true"
3865
- }
3866
- )
3867
- ] });
3868
- }
3869
- );
4522
+ ] })
4523
+ }
4524
+ ),
4525
+ /* @__PURE__ */ jsxRuntime.jsx(
4526
+ "input",
4527
+ {
4528
+ ref: inputRef,
4529
+ type: "file",
4530
+ accept,
4531
+ multiple,
4532
+ disabled,
4533
+ onChange: handleInputChange,
4534
+ className: "sr-only",
4535
+ tabIndex: -1,
4536
+ "aria-hidden": "true"
4537
+ }
4538
+ )
4539
+ ] });
4540
+ });
3870
4541
  Dropzone.displayName = "Dropzone";
3871
4542
 
3872
4543
  // src/components/file-upload-internals.ts
@@ -3931,108 +4602,130 @@ function validateFiles(files, { accept, maxSize, maxFiles, existingCount = 0, mu
3931
4602
  return { accepted, rejected };
3932
4603
  }
3933
4604
  function FileIcon({ className }) {
3934
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", className, fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
3935
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
3936
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2v6h6" })
3937
- ] });
3938
- }
3939
- var FileUpload = React52__namespace.forwardRef(
3940
- function FileUpload2({
3941
- value,
3942
- defaultValue,
3943
- onChange,
3944
- onReject,
3945
- accept,
3946
- maxSize,
3947
- maxFiles,
3948
- multiple = true,
3949
- disabled = false,
3950
- error = false,
3951
- required = false,
3952
- className,
3953
- id,
3954
- "aria-describedby": describedBy
3955
- }, ref) {
3956
- const controlled = value !== void 0;
3957
- const [internalItems, setInternalItems] = React52__namespace.useState(defaultValue ?? []);
3958
- const items = controlled ? value : internalItems;
3959
- const commit = (next) => {
3960
- if (!controlled) setInternalItems(next);
3961
- onChange?.(next);
3962
- };
3963
- const handleFiles = (files) => {
3964
- const { accepted, rejected } = validateFiles(files, {
4605
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4606
+ "svg",
4607
+ {
4608
+ viewBox: "0 0 24 24",
4609
+ className,
4610
+ fill: "none",
4611
+ stroke: "currentColor",
4612
+ strokeWidth: "1.5",
4613
+ strokeLinecap: "round",
4614
+ strokeLinejoin: "round",
4615
+ children: [
4616
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
4617
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 2v6h6" })
4618
+ ]
4619
+ }
4620
+ );
4621
+ }
4622
+ var FileUpload = React52__namespace.forwardRef(function FileUpload2({
4623
+ value,
4624
+ defaultValue,
4625
+ onChange,
4626
+ onReject,
4627
+ accept,
4628
+ maxSize,
4629
+ maxFiles,
4630
+ multiple = true,
4631
+ disabled = false,
4632
+ error = false,
4633
+ required = false,
4634
+ className,
4635
+ id,
4636
+ "aria-describedby": describedBy
4637
+ }, ref) {
4638
+ const controlled = value !== void 0;
4639
+ const [internalItems, setInternalItems] = React52__namespace.useState(defaultValue ?? []);
4640
+ const items = controlled ? value : internalItems;
4641
+ const commit = (next) => {
4642
+ if (!controlled) setInternalItems(next);
4643
+ onChange?.(next);
4644
+ };
4645
+ const handleFiles = (files) => {
4646
+ const { accepted, rejected } = validateFiles(files, {
4647
+ accept,
4648
+ maxSize,
4649
+ maxFiles,
4650
+ existingCount: items.length,
4651
+ multiple
4652
+ });
4653
+ if (rejected.length > 0) onReject?.(rejected);
4654
+ if (accepted.length === 0) return;
4655
+ const newItems = accepted.map((file) => ({
4656
+ id: generateId(),
4657
+ file,
4658
+ status: "pending"
4659
+ }));
4660
+ commit(multiple ? [...items, ...newItems] : newItems.slice(0, 1));
4661
+ };
4662
+ const removeItem = (itemId) => {
4663
+ commit(items.filter((it) => it.id !== itemId));
4664
+ };
4665
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full flex flex-col gap-3", className), children: [
4666
+ /* @__PURE__ */ jsxRuntime.jsx(
4667
+ Dropzone,
4668
+ {
4669
+ ref,
4670
+ onFiles: handleFiles,
3965
4671
  accept,
3966
- maxSize,
3967
- maxFiles,
3968
- existingCount: items.length,
3969
- multiple
3970
- });
3971
- if (rejected.length > 0) onReject?.(rejected);
3972
- if (accepted.length === 0) return;
3973
- const newItems = accepted.map((file) => ({
3974
- id: generateId(),
3975
- file,
3976
- status: "pending"
3977
- }));
3978
- commit(multiple ? [...items, ...newItems] : newItems.slice(0, 1));
3979
- };
3980
- const removeItem = (itemId) => {
3981
- commit(items.filter((it) => it.id !== itemId));
3982
- };
3983
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full flex flex-col gap-3", className), children: [
3984
- /* @__PURE__ */ jsxRuntime.jsx(
3985
- Dropzone,
3986
- {
3987
- ref,
3988
- onFiles: handleFiles,
3989
- accept,
3990
- multiple,
3991
- disabled,
3992
- id,
3993
- "aria-describedby": describedBy,
3994
- "aria-invalid": error || void 0,
3995
- "aria-required": required || void 0
3996
- }
3997
- ),
3998
- items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
3999
- "li",
4000
- {
4001
- className: "flex items-center gap-3 rounded-kj-md border border-border bg-surface px-3 py-2",
4002
- children: [
4003
- /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" }),
4004
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
4005
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
4006
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-foreground", children: item.file.name }),
4007
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatBytes(item.file.size) })
4008
- ] }),
4009
- item.status === "uploading" && item.progress != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1.5 flex items-center gap-2", children: [
4010
- /* @__PURE__ */ jsxRuntime.jsx(Progress, { value: item.progress, className: "h-1.5" }),
4011
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
4012
- Math.round(item.progress),
4013
- "%"
4014
- ] })
4015
- ] }),
4016
- item.status === "success" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-xs text-success", children: "Uploaded" }),
4017
- item.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-xs text-danger", children: item.error ?? "Upload failed" })
4672
+ multiple,
4673
+ disabled,
4674
+ id,
4675
+ "aria-describedby": describedBy,
4676
+ "aria-invalid": error || void 0,
4677
+ "aria-required": required || void 0
4678
+ }
4679
+ ),
4680
+ items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
4681
+ "li",
4682
+ {
4683
+ className: "flex items-center gap-3 rounded-kj-md border border-border bg-surface px-3 py-2",
4684
+ children: [
4685
+ /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" }),
4686
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
4687
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
4688
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm text-foreground", children: item.file.name }),
4689
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatBytes(item.file.size) })
4018
4690
  ] }),
4019
- !disabled && /* @__PURE__ */ jsxRuntime.jsx(
4020
- "button",
4021
- {
4022
- type: "button",
4023
- "aria-label": `Remove ${item.file.name}`,
4024
- onClick: () => removeItem(item.id),
4025
- className: "shrink-0 rounded-kj-sm p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4026
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
4027
- }
4028
- )
4029
- ]
4030
- },
4031
- item.id
4032
- )) })
4033
- ] });
4034
- }
4035
- );
4691
+ item.status === "uploading" && item.progress != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1.5 flex items-center gap-2", children: [
4692
+ /* @__PURE__ */ jsxRuntime.jsx(Progress, { value: item.progress, className: "h-1.5" }),
4693
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
4694
+ Math.round(item.progress),
4695
+ "%"
4696
+ ] })
4697
+ ] }),
4698
+ item.status === "success" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-xs text-success", children: "Uploaded" }),
4699
+ item.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 block text-xs text-danger", children: item.error ?? "Upload failed" })
4700
+ ] }),
4701
+ !disabled && /* @__PURE__ */ jsxRuntime.jsx(
4702
+ "button",
4703
+ {
4704
+ type: "button",
4705
+ "aria-label": `Remove ${item.file.name}`,
4706
+ onClick: () => removeItem(item.id),
4707
+ className: "shrink-0 rounded-kj-sm p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
4708
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4709
+ "svg",
4710
+ {
4711
+ viewBox: "0 0 24 24",
4712
+ className: "h-4 w-4",
4713
+ fill: "none",
4714
+ stroke: "currentColor",
4715
+ strokeWidth: "2",
4716
+ strokeLinecap: "round",
4717
+ strokeLinejoin: "round",
4718
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
4719
+ }
4720
+ )
4721
+ }
4722
+ )
4723
+ ]
4724
+ },
4725
+ item.id
4726
+ )) })
4727
+ ] });
4728
+ });
4036
4729
  FileUpload.displayName = "FileUpload";
4037
4730
  var FileUploadField = React52__namespace.forwardRef(
4038
4731
  function FileUploadField2({ label, hint, error, required, className, ...props }, ref) {
@@ -4077,16 +4770,7 @@ var TimelineItem = React52__namespace.forwardRef(
4077
4770
  align === "right" && "grid-cols-[1fr_auto] text-right",
4078
4771
  align === "alternate" && "md:grid-cols-[1fr_auto_1fr] grid-cols-[auto_1fr]"
4079
4772
  );
4080
- return /* @__PURE__ */ jsxRuntime.jsx(TimelineItemContext.Provider, { value: { isEven, align, isLast }, children: /* @__PURE__ */ jsxRuntime.jsx(
4081
- "div",
4082
- {
4083
- ref,
4084
- role: "listitem",
4085
- className: cn(gridClass, className),
4086
- ...props,
4087
- children
4088
- }
4089
- ) });
4773
+ return /* @__PURE__ */ jsxRuntime.jsx(TimelineItemContext.Provider, { value: { isEven, align, isLast }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, role: "listitem", className: cn(gridClass, className), ...props, children }) });
4090
4774
  }
4091
4775
  );
4092
4776
  TimelineItem.displayName = "TimelineItem";
@@ -4166,51 +4850,53 @@ var TimelineContent = React52__namespace.forwardRef(
4166
4850
  }
4167
4851
  );
4168
4852
  TimelineContent.displayName = "TimelineContent";
4169
- var TimelineTitle = React52__namespace.forwardRef(
4170
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4171
- "h4",
4172
- {
4173
- ref,
4174
- className: cn("m-0 text-sm font-semibold tracking-[-0.01em] text-foreground", className),
4175
- ...props,
4176
- children
4177
- }
4178
- )
4179
- );
4853
+ var TimelineTitle = React52__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4854
+ "h4",
4855
+ {
4856
+ ref,
4857
+ className: cn("m-0 text-sm font-semibold tracking-[-0.01em] text-foreground", className),
4858
+ ...props,
4859
+ children
4860
+ }
4861
+ ));
4180
4862
  TimelineTitle.displayName = "TimelineTitle";
4181
- var TimelineTime = React52__namespace.forwardRef(
4182
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4183
- "time",
4184
- {
4185
- ref,
4186
- className: cn("text-[0.75rem] text-muted-foreground font-normal", className),
4187
- ...props
4188
- }
4189
- )
4190
- );
4863
+ var TimelineTime = React52__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4864
+ "time",
4865
+ {
4866
+ ref,
4867
+ className: cn("text-[0.75rem] text-muted-foreground font-normal", className),
4868
+ ...props
4869
+ }
4870
+ ));
4191
4871
  TimelineTime.displayName = "TimelineTime";
4192
4872
  function useStepper({ initialStep = 0, stepsCount }) {
4193
4873
  const safeStepsCount = Math.max(1, stepsCount);
4194
4874
  const [activeStep, setActiveStep] = React52__namespace.useState(initialStep);
4195
4875
  const [completedSteps, setCompletedSteps] = React52__namespace.useState([]);
4196
- const setStep = React52__namespace.useCallback((step) => {
4197
- if (step >= 0 && step < safeStepsCount) {
4198
- setActiveStep(step);
4199
- }
4200
- }, [safeStepsCount]);
4876
+ const setStep = React52__namespace.useCallback(
4877
+ (step) => {
4878
+ if (step >= 0 && step < safeStepsCount) {
4879
+ setActiveStep(step);
4880
+ }
4881
+ },
4882
+ [safeStepsCount]
4883
+ );
4201
4884
  const nextStep = React52__namespace.useCallback(() => {
4202
4885
  setActiveStep((prev) => Math.min(prev + 1, safeStepsCount - 1));
4203
4886
  }, [safeStepsCount]);
4204
4887
  const prevStep = React52__namespace.useCallback(() => {
4205
4888
  setActiveStep((prev) => Math.max(prev - 1, 0));
4206
4889
  }, []);
4207
- const completeStep = React52__namespace.useCallback((step) => {
4208
- setCompletedSteps((prev) => {
4209
- if (step < 0 || step >= safeStepsCount) return prev;
4210
- if (prev.includes(step)) return prev;
4211
- return [...prev, step].sort((a, b) => a - b);
4212
- });
4213
- }, [safeStepsCount]);
4890
+ const completeStep = React52__namespace.useCallback(
4891
+ (step) => {
4892
+ setCompletedSteps((prev) => {
4893
+ if (step < 0 || step >= safeStepsCount) return prev;
4894
+ if (prev.includes(step)) return prev;
4895
+ return [...prev, step].sort((a, b) => a - b);
4896
+ });
4897
+ },
4898
+ [safeStepsCount]
4899
+ );
4214
4900
  const uncompleteStep = React52__namespace.useCallback((step) => {
4215
4901
  setCompletedSteps((prev) => prev.filter((s) => s !== step));
4216
4902
  }, []);
@@ -4234,7 +4920,17 @@ function useStepper({ initialStep = 0, stepsCount }) {
4234
4920
  var StepperContext = React52__namespace.createContext(null);
4235
4921
  var StepperItemContext = React52__namespace.createContext(null);
4236
4922
  var Stepper = React52__namespace.forwardRef(
4237
- ({ value, defaultValue, onValueChange, orientation = "horizontal", responsive = true, linear = true, children, className, ...props }, ref) => {
4923
+ ({
4924
+ value,
4925
+ defaultValue,
4926
+ onValueChange,
4927
+ orientation = "horizontal",
4928
+ responsive = true,
4929
+ linear = true,
4930
+ children,
4931
+ className,
4932
+ ...props
4933
+ }, ref) => {
4238
4934
  const [localValue, setLocalValue] = React52__namespace.useState(defaultValue ?? 0);
4239
4935
  const isControlled = value !== void 0;
4240
4936
  const activeStep = isControlled ? value : localValue;
@@ -4255,7 +4951,9 @@ var Stepper = React52__namespace.forwardRef(
4255
4951
  if (linear) {
4256
4952
  setCompletedSteps((prev) => {
4257
4953
  const priorSteps = steps.filter((s) => s < step);
4258
- const nextCompleted = Array.from(/* @__PURE__ */ new Set([...prev, ...priorSteps])).sort((a, b) => a - b);
4954
+ const nextCompleted = Array.from(/* @__PURE__ */ new Set([...prev, ...priorSteps])).sort(
4955
+ (a, b) => a - b
4956
+ );
4259
4957
  return nextCompleted;
4260
4958
  });
4261
4959
  }
@@ -4274,7 +4972,17 @@ var Stepper = React52__namespace.forwardRef(
4274
4972
  unregisterStep,
4275
4973
  steps
4276
4974
  }),
4277
- [activeStep, orientation, responsive, linear, setStep, completedSteps, registerStep, unregisterStep, steps]
4975
+ [
4976
+ activeStep,
4977
+ orientation,
4978
+ responsive,
4979
+ linear,
4980
+ setStep,
4981
+ completedSteps,
4982
+ registerStep,
4983
+ unregisterStep,
4984
+ steps
4985
+ ]
4278
4986
  );
4279
4987
  return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
4280
4988
  "div",
@@ -4512,7 +5220,11 @@ var AppShellBanner = React52__namespace.forwardRef(
4512
5220
  "div",
4513
5221
  {
4514
5222
  ref,
4515
- className: cn("px-4 py-2 text-sm font-medium text-center flex items-center justify-center relative z-30", variantClass, className),
5223
+ className: cn(
5224
+ "px-4 py-2 text-sm font-medium text-center flex items-center justify-center relative z-30",
5225
+ variantClass,
5226
+ className
5227
+ ),
4516
5228
  ...props,
4517
5229
  children: [
4518
5230
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children }),
@@ -4523,7 +5235,20 @@ var AppShellBanner = React52__namespace.forwardRef(
4523
5235
  onClick: onClose,
4524
5236
  className: "p-1 rounded opacity-80 hover:opacity-100 transition-opacity ml-2 cursor-pointer",
4525
5237
  "aria-label": "Close banner",
4526
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
5238
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5239
+ "svg",
5240
+ {
5241
+ width: 14,
5242
+ height: 14,
5243
+ viewBox: "0 0 24 24",
5244
+ fill: "none",
5245
+ stroke: "currentColor",
5246
+ strokeWidth: 2.5,
5247
+ strokeLinecap: "round",
5248
+ strokeLinejoin: "round",
5249
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
5250
+ }
5251
+ )
4527
5252
  }
4528
5253
  )
4529
5254
  ]
@@ -4593,11 +5318,24 @@ var AppShellHeader = React52__namespace.forwardRef(
4593
5318
  onClick: () => setMobileOpen(true),
4594
5319
  className: "md:hidden p-2 -ml-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
4595
5320
  "aria-label": "Open navigation",
4596
- children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: [
4597
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
4598
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
4599
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
4600
- ] })
5321
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
5322
+ "svg",
5323
+ {
5324
+ width: 20,
5325
+ height: 20,
5326
+ viewBox: "0 0 24 24",
5327
+ fill: "none",
5328
+ stroke: "currentColor",
5329
+ strokeWidth: 2.5,
5330
+ strokeLinecap: "round",
5331
+ strokeLinejoin: "round",
5332
+ children: [
5333
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
5334
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
5335
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
5336
+ ]
5337
+ }
5338
+ )
4601
5339
  }
4602
5340
  ),
4603
5341
  children
@@ -4630,7 +5368,20 @@ var AppShellHeader = React52__namespace.forwardRef(
4630
5368
  onClick: () => setMobileOpen(false),
4631
5369
  className: "p-1 rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
4632
5370
  "aria-label": "Close navigation",
4633
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
5371
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5372
+ "svg",
5373
+ {
5374
+ width: 16,
5375
+ height: 16,
5376
+ viewBox: "0 0 24 24",
5377
+ fill: "none",
5378
+ stroke: "currentColor",
5379
+ strokeWidth: 2.5,
5380
+ strokeLinecap: "round",
5381
+ strokeLinejoin: "round",
5382
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
5383
+ }
5384
+ )
4634
5385
  }
4635
5386
  )
4636
5387
  ] }),
@@ -4655,7 +5406,12 @@ var AppShellMain = React52__namespace.forwardRef(
4655
5406
  "main",
4656
5407
  {
4657
5408
  ref,
4658
- className: cn("flex-1", padded && "px-4 sm:px-6 lg:px-8 py-4 sm:py-6 md:py-12", widthClass, className),
5409
+ className: cn(
5410
+ "flex-1",
5411
+ padded && "px-4 sm:px-6 lg:px-8 py-4 sm:py-6 md:py-12",
5412
+ widthClass,
5413
+ className
5414
+ ),
4659
5415
  ...props,
4660
5416
  children
4661
5417
  }
@@ -4700,7 +5456,10 @@ var AppShell = React52__namespace.forwardRef(
4700
5456
  "div",
4701
5457
  {
4702
5458
  ref,
4703
- className: cn("min-h-screen bg-canvas text-foreground flex flex-col antialiased", className),
5459
+ className: cn(
5460
+ "min-h-screen bg-canvas text-foreground flex flex-col antialiased",
5461
+ className
5462
+ ),
4704
5463
  ...props,
4705
5464
  children: [
4706
5465
  banner && /* @__PURE__ */ jsxRuntime.jsx(AppShellBanner, { children: banner }),
@@ -4856,9 +5615,6 @@ var Rating = React52__namespace.forwardRef(
4856
5615
  ref,
4857
5616
  role: readOnly ? "img" : "radiogroup",
4858
5617
  tabIndex: disabled || readOnly ? -1 : 0,
4859
- "aria-valuenow": displayValue,
4860
- "aria-valuemin": 0,
4861
- "aria-valuemax": max,
4862
5618
  "aria-disabled": disabled || void 0,
4863
5619
  "aria-readonly": readOnly || void 0,
4864
5620
  "aria-label": ariaLabel || (readOnly ? `Rated ${displayValue} out of ${max}` : "Rating"),
@@ -4877,10 +5633,7 @@ var Rating = React52__namespace.forwardRef(
4877
5633
  name && /* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name, value: currentValue }),
4878
5634
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center gap-0.5", children: Array.from({ length: max }, (_, index) => {
4879
5635
  const starIndex = index + 1;
4880
- const fillFraction = Math.max(
4881
- 0,
4882
- Math.min(1, displayValue - index)
4883
- );
5636
+ const fillFraction = Math.max(0, Math.min(1, displayValue - index));
4884
5637
  const gradientId = `rating-grad-${instanceId}-${index}-${Math.round(
4885
5638
  fillFraction * 100
4886
5639
  )}`;
@@ -4919,46 +5672,24 @@ var Rating = React52__namespace.forwardRef(
4919
5672
  className: "w-full h-full",
4920
5673
  xmlns: "http://www.w3.org/2000/svg",
4921
5674
  children: [
4922
- fillFraction > 0 && fillFraction < 1 && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
4923
- "linearGradient",
4924
- {
4925
- id: gradientId,
4926
- x1: "0%",
4927
- y1: "0%",
4928
- x2: "100%",
4929
- y2: "0%",
4930
- children: [
4931
- isCssColor(color) ? /* @__PURE__ */ jsxRuntime.jsx(
4932
- "stop",
4933
- {
4934
- offset: `${fillFraction * 100}%`,
4935
- stopColor: color
4936
- }
4937
- ) : /* @__PURE__ */ jsxRuntime.jsx(
4938
- "stop",
4939
- {
4940
- offset: `${fillFraction * 100}%`,
4941
- stopColor: "currentColor",
4942
- className: color
4943
- }
4944
- ),
4945
- isCssColor(emptyColor) ? /* @__PURE__ */ jsxRuntime.jsx(
4946
- "stop",
4947
- {
4948
- offset: `${fillFraction * 100}%`,
4949
- stopColor: emptyColor
4950
- }
4951
- ) : /* @__PURE__ */ jsxRuntime.jsx(
4952
- "stop",
4953
- {
4954
- offset: `${fillFraction * 100}%`,
4955
- stopColor: "currentColor",
4956
- className: emptyColor
4957
- }
4958
- )
4959
- ]
4960
- }
4961
- ) }),
5675
+ fillFraction > 0 && fillFraction < 1 && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
5676
+ isCssColor(color) ? /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: `${fillFraction * 100}%`, stopColor: color }) : /* @__PURE__ */ jsxRuntime.jsx(
5677
+ "stop",
5678
+ {
5679
+ offset: `${fillFraction * 100}%`,
5680
+ stopColor: "currentColor",
5681
+ className: color
5682
+ }
5683
+ ),
5684
+ isCssColor(emptyColor) ? /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: `${fillFraction * 100}%`, stopColor: emptyColor }) : /* @__PURE__ */ jsxRuntime.jsx(
5685
+ "stop",
5686
+ {
5687
+ offset: `${fillFraction * 100}%`,
5688
+ stopColor: "currentColor",
5689
+ className: emptyColor
5690
+ }
5691
+ )
5692
+ ] }) }),
4962
5693
  /* @__PURE__ */ jsxRuntime.jsx(
4963
5694
  "path",
4964
5695
  {
@@ -5023,16 +5754,7 @@ var RatingField = React52__namespace.forwardRef(
5023
5754
  );
5024
5755
  RatingField.displayName = "RatingField";
5025
5756
  var RatingSummary = React52__namespace.forwardRef(
5026
- ({
5027
- average,
5028
- totalCount,
5029
- distribution,
5030
- max = 5,
5031
- size = "md",
5032
- icon = "star",
5033
- className,
5034
- ...props
5035
- }, ref) => {
5757
+ ({ average, totalCount, distribution, max = 5, size = "md", icon = "star", className, ...props }, ref) => {
5036
5758
  const formattedAverage = Number.isInteger(average) ? average.toString() : average.toFixed(1);
5037
5759
  const formattedTotalCount = totalCount.toLocaleString();
5038
5760
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5145,7 +5867,15 @@ var PricingCard = React52__namespace.forwardRef(
5145
5867
  children: included ? "\u2713" : "\u2715"
5146
5868
  }
5147
5869
  ),
5148
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(included ? "text-foreground" : "text-muted-foreground line-through opacity-70"), children: text })
5870
+ /* @__PURE__ */ jsxRuntime.jsx(
5871
+ "span",
5872
+ {
5873
+ className: cn(
5874
+ included ? "text-foreground" : "text-muted-foreground line-through opacity-70"
5875
+ ),
5876
+ children: text
5877
+ }
5878
+ )
5149
5879
  ] }, idx);
5150
5880
  }) }),
5151
5881
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto pt-2", children: cta ? cta : ctaHref ? (
@@ -5341,9 +6071,7 @@ function useInboxState(initial) {
5341
6071
  const [items, setItems] = React52__namespace.useState(initial);
5342
6072
  const unreadCount = items.filter((i) => !i.read).length;
5343
6073
  const markRead = React52__namespace.useCallback((id) => {
5344
- setItems(
5345
- (prev) => prev.map((item) => item.id === id ? { ...item, read: true } : item)
5346
- );
6074
+ setItems((prev) => prev.map((item) => item.id === id ? { ...item, read: true } : item));
5347
6075
  }, []);
5348
6076
  const markAllRead = React52__namespace.useCallback(() => {
5349
6077
  setItems((prev) => prev.map((item) => ({ ...item, read: true })));
@@ -5476,7 +6204,16 @@ function NotificationItem({ item, onDismiss, className }) {
5476
6204
  }
5477
6205
  ) : item.avatarFallback ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-7 h-7 rounded-full bg-primary/20 text-primary text-[10px] font-bold flex items-center justify-center flex-shrink-0 select-none", children: item.avatarFallback }) : item.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 text-primary", children: item.icon }) : null;
5478
6206
  const textBlock = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
5479
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm leading-snug", item.read ? "text-muted-foreground" : "text-foreground"), children: item.title }),
6207
+ /* @__PURE__ */ jsxRuntime.jsx(
6208
+ "p",
6209
+ {
6210
+ className: cn(
6211
+ "text-sm leading-snug",
6212
+ item.read ? "text-muted-foreground" : "text-foreground"
6213
+ ),
6214
+ children: item.title
6215
+ }
6216
+ ),
5480
6217
  item.body && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5 truncate", children: item.body }),
5481
6218
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: formatRelativeTime(item.timestamp) })
5482
6219
  ] });
@@ -5563,10 +6300,24 @@ function InboxContent({
5563
6300
  if (!ctx.open) return null;
5564
6301
  const allRead = items.length === 0 || items.every((i) => i.read);
5565
6302
  const defaultEmptyState = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-10 px-5 text-center", children: [
5566
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center mb-3 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
5567
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
5568
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
5569
- ] }) }),
6303
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center mb-3 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs(
6304
+ "svg",
6305
+ {
6306
+ width: 18,
6307
+ height: 18,
6308
+ viewBox: "0 0 24 24",
6309
+ fill: "none",
6310
+ stroke: "currentColor",
6311
+ strokeWidth: 1.5,
6312
+ strokeLinecap: "round",
6313
+ strokeLinejoin: "round",
6314
+ "aria-hidden": "true",
6315
+ children: [
6316
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
6317
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
6318
+ ]
6319
+ }
6320
+ ) }),
5570
6321
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: "All caught up" }),
5571
6322
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: "No new notifications" })
5572
6323
  ] });
@@ -5608,21 +6359,7 @@ function InboxContent({
5608
6359
  }
5609
6360
  )
5610
6361
  ] }),
5611
- items.length === 0 ? emptyState ?? defaultEmptyState : /* @__PURE__ */ jsxRuntime.jsx(
5612
- "div",
5613
- {
5614
- className: "overflow-y-auto",
5615
- style: { maxHeight },
5616
- children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
5617
- NotificationItem,
5618
- {
5619
- item,
5620
- onDismiss
5621
- },
5622
- item.id
5623
- ))
5624
- }
5625
- ),
6362
+ items.length === 0 ? emptyState ?? defaultEmptyState : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto", style: { maxHeight }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NotificationItem, { item, onDismiss }, item.id)) }),
5626
6363
  items.length > 0 && viewAllHref && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border px-3.5 py-2.5 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
5627
6364
  "a",
5628
6365
  {
@@ -5751,30 +6488,32 @@ function hslToHex(h, s, l) {
5751
6488
  };
5752
6489
  return `#${toHex(r)}${toHex(g)}${toHex(b)}`.toUpperCase();
5753
6490
  }
5754
- var ColorPickerSwatch = React52__namespace.forwardRef(({ color, selected = false, size = "md", className, style, ...props }, ref) => {
5755
- const sizeClasses2 = {
5756
- sm: "w-5 h-5",
5757
- md: "w-7 h-7",
5758
- lg: "w-9 h-9"
5759
- };
5760
- return /* @__PURE__ */ jsxRuntime.jsx(
5761
- "button",
5762
- {
5763
- ref,
5764
- type: "button",
5765
- "aria-pressed": selected,
5766
- style: { backgroundColor: color, ...style },
5767
- className: cn(
5768
- "relative shrink-0 rounded-full border border-border/50 shadow-sm transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary flex items-center justify-center text-white text-xs font-bold",
5769
- sizeClasses2[size],
5770
- selected && "ring-2 ring-primary ring-offset-2 ring-offset-surface",
5771
- className
5772
- ),
5773
- ...props,
5774
- children: selected && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2713" })
5775
- }
5776
- );
5777
- });
6491
+ var ColorPickerSwatch = React52__namespace.forwardRef(
6492
+ ({ color, selected = false, size = "md", className, style, ...props }, ref) => {
6493
+ const sizeClasses2 = {
6494
+ sm: "w-5 h-5",
6495
+ md: "w-7 h-7",
6496
+ lg: "w-9 h-9"
6497
+ };
6498
+ return /* @__PURE__ */ jsxRuntime.jsx(
6499
+ "button",
6500
+ {
6501
+ ref,
6502
+ type: "button",
6503
+ "aria-pressed": selected,
6504
+ style: { backgroundColor: color, ...style },
6505
+ className: cn(
6506
+ "relative shrink-0 rounded-full border border-border/50 shadow-sm transition-transform hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary flex items-center justify-center text-white text-xs font-bold",
6507
+ sizeClasses2[size],
6508
+ selected && "ring-2 ring-primary ring-offset-2 ring-offset-surface",
6509
+ className
6510
+ ),
6511
+ ...props,
6512
+ children: selected && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2713" })
6513
+ }
6514
+ );
6515
+ }
6516
+ );
5778
6517
  ColorPickerSwatch.displayName = "ColorPickerSwatch";
5779
6518
  var ColorPicker = React52__namespace.forwardRef(
5780
6519
  ({
@@ -5788,9 +6527,7 @@ var ColorPicker = React52__namespace.forwardRef(
5788
6527
  ...props
5789
6528
  }, ref) => {
5790
6529
  const isControlled = value !== void 0;
5791
- const [localColor, setLocalColor] = React52__namespace.useState(
5792
- normalizeHex(defaultValue)
5793
- );
6530
+ const [localColor, setLocalColor] = React52__namespace.useState(normalizeHex(defaultValue));
5794
6531
  const color = isControlled ? normalizeHex(value) : localColor;
5795
6532
  const [hexInputValue, setHexInputValue] = React52__namespace.useState(color);
5796
6533
  React52__namespace.useEffect(() => {
@@ -5928,14 +6665,16 @@ var ColorPicker = React52__namespace.forwardRef(
5928
6665
  }
5929
6666
  );
5930
6667
  ColorPicker.displayName = "ColorPicker";
5931
- var ColorPickerField = React52__namespace.forwardRef(({ label, hint, error, required, ...props }, ref) => {
5932
- return /* @__PURE__ */ jsxRuntime.jsxs(Field, { children: [
5933
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { required, children: label }),
5934
- /* @__PURE__ */ jsxRuntime.jsx(ColorPicker, { ref, ...props }),
5935
- hint && /* @__PURE__ */ jsxRuntime.jsx(Hint, { children: hint }),
5936
- error && /* @__PURE__ */ jsxRuntime.jsx(Hint, { error: true, children: error })
5937
- ] });
5938
- });
6668
+ var ColorPickerField = React52__namespace.forwardRef(
6669
+ ({ label, hint, error, required, ...props }, ref) => {
6670
+ return /* @__PURE__ */ jsxRuntime.jsxs(Field, { children: [
6671
+ label && /* @__PURE__ */ jsxRuntime.jsx(Label, { required, children: label }),
6672
+ /* @__PURE__ */ jsxRuntime.jsx(ColorPicker, { ref, ...props }),
6673
+ hint && /* @__PURE__ */ jsxRuntime.jsx(Hint, { children: hint }),
6674
+ error && /* @__PURE__ */ jsxRuntime.jsx(Hint, { error: true, children: error })
6675
+ ] });
6676
+ }
6677
+ );
5939
6678
  ColorPickerField.displayName = "ColorPickerField";
5940
6679
  var COLUMN_CLASSES = {
5941
6680
  2: "grid-cols-2",
@@ -6060,7 +6799,20 @@ function ImageGallery({
6060
6799
  onClick: handleClose,
6061
6800
  "aria-label": "Close",
6062
6801
  className: "p-2 rounded-full text-white/80 hover:text-white hover:bg-white/10 transition-colors cursor-pointer",
6063
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" }) })
6802
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6803
+ "svg",
6804
+ {
6805
+ width: 20,
6806
+ height: 20,
6807
+ viewBox: "0 0 24 24",
6808
+ fill: "none",
6809
+ stroke: "currentColor",
6810
+ strokeWidth: 2.5,
6811
+ strokeLinecap: "round",
6812
+ strokeLinejoin: "round",
6813
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6 6 18M6 6l12 12" })
6814
+ }
6815
+ )
6064
6816
  }
6065
6817
  )
6066
6818
  ] }),
@@ -6072,7 +6824,20 @@ function ImageGallery({
6072
6824
  onClick: handlePrev,
6073
6825
  "aria-label": "Previous image",
6074
6826
  className: "p-3 rounded-full text-white/80 hover:text-white hover:bg-white/10 transition-colors cursor-pointer z-10 shrink-0",
6075
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" }) })
6827
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6828
+ "svg",
6829
+ {
6830
+ width: 24,
6831
+ height: 24,
6832
+ viewBox: "0 0 24 24",
6833
+ fill: "none",
6834
+ stroke: "currentColor",
6835
+ strokeWidth: 2.5,
6836
+ strokeLinecap: "round",
6837
+ strokeLinejoin: "round",
6838
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15 18-6-6 6-6" })
6839
+ }
6840
+ )
6076
6841
  }
6077
6842
  ),
6078
6843
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex flex-col items-center justify-center h-full min-h-0 px-2 select-none", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -6090,7 +6855,20 @@ function ImageGallery({
6090
6855
  onClick: handleNext,
6091
6856
  "aria-label": "Next image",
6092
6857
  className: "p-3 rounded-full text-white/80 hover:text-white hover:bg-white/10 transition-colors cursor-pointer z-10 shrink-0",
6093
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" }) })
6858
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6859
+ "svg",
6860
+ {
6861
+ width: 24,
6862
+ height: 24,
6863
+ viewBox: "0 0 24 24",
6864
+ fill: "none",
6865
+ stroke: "currentColor",
6866
+ strokeWidth: 2.5,
6867
+ strokeLinecap: "round",
6868
+ strokeLinejoin: "round",
6869
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
6870
+ }
6871
+ )
6094
6872
  }
6095
6873
  )
6096
6874
  ] }),
@@ -6129,7 +6907,9 @@ function useInPostScript(options = {}) {
6129
6907
  }
6130
6908
  if (!scriptPromise) {
6131
6909
  scriptPromise = new Promise((resolve, reject) => {
6132
- let scriptTag = document.querySelector(`script[src="${scriptUrl}"]`);
6910
+ let scriptTag = document.querySelector(
6911
+ `script[src="${scriptUrl}"]`
6912
+ );
6133
6913
  if (!scriptTag) {
6134
6914
  scriptTag = document.createElement("script");
6135
6915
  scriptTag.src = scriptUrl;
@@ -6139,7 +6919,9 @@ function useInPostScript(options = {}) {
6139
6919
  scriptTag.addEventListener("load", () => resolve());
6140
6920
  scriptTag.addEventListener(
6141
6921
  "error",
6142
- (err) => reject(err instanceof Error ? err : new Error("Failed to load InPost GeoWidget SDK script"))
6922
+ (err) => reject(
6923
+ err instanceof Error ? err : new Error("Failed to load InPost GeoWidget SDK script")
6924
+ )
6143
6925
  );
6144
6926
  });
6145
6927
  }
@@ -6164,7 +6946,12 @@ var MOCK_POINTS = [
6164
6946
  {
6165
6947
  name: "WAW01M",
6166
6948
  address: { line1: "ul. Towarowa 5", line2: "00-838 Warszawa" },
6167
- address_details: { city: "Warszawa", street: "Towarowa", building_number: "5", post_code: "00-838" },
6949
+ address_details: {
6950
+ city: "Warszawa",
6951
+ street: "Towarowa",
6952
+ building_number: "5",
6953
+ post_code: "00-838"
6954
+ },
6168
6955
  location: { latitude: 52.2297, longitude: 21.0122 },
6169
6956
  type: ["parcel_locker"],
6170
6957
  status: "Operating",
@@ -6173,7 +6960,12 @@ var MOCK_POINTS = [
6173
6960
  {
6174
6961
  name: "KRA02N",
6175
6962
  address: { line1: "ul. Floria\u0144ska 12", line2: "31-021 Krak\xF3w" },
6176
- address_details: { city: "Krak\xF3w", street: "Floria\u0144ska", building_number: "12", post_code: "31-021" },
6963
+ address_details: {
6964
+ city: "Krak\xF3w",
6965
+ street: "Floria\u0144ska",
6966
+ building_number: "12",
6967
+ post_code: "31-021"
6968
+ },
6177
6969
  location: { latitude: 50.0647, longitude: 19.945 },
6178
6970
  type: ["parcel_locker"],
6179
6971
  status: "Operating",
@@ -6191,7 +6983,12 @@ var MOCK_POINTS = [
6191
6983
  {
6192
6984
  name: "POZ04S",
6193
6985
  address: { line1: "ul. P\xF3\u0142wiejska 42", line2: "61-888 Pozna\u0144" },
6194
- address_details: { city: "Pozna\u0144", street: "P\xF3\u0142wiejska", building_number: "42", post_code: "61-888" },
6986
+ address_details: {
6987
+ city: "Pozna\u0144",
6988
+ street: "P\xF3\u0142wiejska",
6989
+ building_number: "42",
6990
+ post_code: "61-888"
6991
+ },
6195
6992
  location: { latitude: 52.4064, longitude: 16.9252 },
6196
6993
  type: ["parcel_locker"],
6197
6994
  status: "Operating",
@@ -6291,7 +7088,8 @@ var InPostGeowidget = ({
6291
7088
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[0.7rem] font-black bg-slate-950 text-amber-400 px-2.5 py-0.5 rounded-md uppercase tracking-wider shadow-sm", children: "Tryb Pokazowy" })
6292
7089
  ] }),
6293
7090
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-slate-950 font-bold leading-relaxed opacity-95", children: [
6294
- "Wybierz punkt z listy poni\u017Cej. Do za\u0142adowania produkcyjnej mapy przeka\u017C prop ",
7091
+ "Wybierz punkt z listy poni\u017Cej. Do za\u0142adowania produkcyjnej mapy przeka\u017C prop",
7092
+ " ",
6295
7093
  /* @__PURE__ */ jsxRuntime.jsx("code", { className: "bg-slate-950 text-amber-400 px-1.5 py-0.5 rounded font-mono text-[0.72rem] font-black", children: 'token="TWOJ_TOKEN"' }),
6296
7094
  "."
6297
7095
  ] })
@@ -6321,17 +7119,35 @@ var InPostGeowidget = ({
6321
7119
  children: [
6322
7120
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
6323
7121
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "font-black text-base flex items-center gap-2", children: [
6324
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: isSelected ? "text-primary-foreground font-black" : "text-foreground font-black", children: [
6325
- "Paczkomat\xAE ",
6326
- p.name
6327
- ] }),
6328
- p.location_description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[0.72rem] px-2.5 py-0.5 rounded-full font-bold ${isSelected ? "bg-primary-hover text-primary-foreground" : "bg-muted text-primary"}`, children: p.location_description })
7122
+ /* @__PURE__ */ jsxRuntime.jsxs(
7123
+ "span",
7124
+ {
7125
+ className: isSelected ? "text-primary-foreground font-black" : "text-foreground font-black",
7126
+ children: [
7127
+ "Paczkomat\xAE ",
7128
+ p.name
7129
+ ]
7130
+ }
7131
+ ),
7132
+ p.location_description && /* @__PURE__ */ jsxRuntime.jsx(
7133
+ "span",
7134
+ {
7135
+ className: `text-[0.72rem] px-2.5 py-0.5 rounded-full font-bold ${isSelected ? "bg-primary-hover text-primary-foreground" : "bg-muted text-primary"}`,
7136
+ children: p.location_description
7137
+ }
7138
+ )
6329
7139
  ] }),
6330
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `text-xs font-bold ${isSelected ? "text-primary-foreground/90" : "text-muted-foreground"}`, children: [
6331
- p.address.line1,
6332
- ", ",
6333
- p.address.line2
6334
- ] })
7140
+ /* @__PURE__ */ jsxRuntime.jsxs(
7141
+ "div",
7142
+ {
7143
+ className: `text-xs font-bold ${isSelected ? "text-primary-foreground/90" : "text-muted-foreground"}`,
7144
+ children: [
7145
+ p.address.line1,
7146
+ ", ",
7147
+ p.address.line2
7148
+ ]
7149
+ }
7150
+ )
6335
7151
  ] }),
6336
7152
  /* @__PURE__ */ jsxRuntime.jsx(
6337
7153
  "button",
@@ -6437,7 +7253,13 @@ var InPostGeowidgetModal = ({
6437
7253
  children: [
6438
7254
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5 min-w-0", children: [
6439
7255
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-black text-[0.7rem] bg-amber-400 text-slate-950 px-2.5 py-1 rounded-md shadow-sm tracking-tight uppercase border border-amber-500/40 shrink-0 group-hover:scale-105 transition-transform", children: "InPost" }),
6440
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `truncate font-bold text-sm ${isOutline ? "text-foreground group-hover:text-primary" : ""}`, children: selectedCode ? `Paczkomat\xAE ${selectedCode}` : triggerText })
7256
+ /* @__PURE__ */ jsxRuntime.jsx(
7257
+ "span",
7258
+ {
7259
+ className: `truncate font-bold text-sm ${isOutline ? "text-foreground group-hover:text-primary" : ""}`,
7260
+ children: selectedCode ? `Paczkomat\xAE ${selectedCode}` : triggerText
7261
+ }
7262
+ )
6441
7263
  ] }),
6442
7264
  /* @__PURE__ */ jsxRuntime.jsx(
6443
7265
  "span",