@dybo-ai/design 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ function Card({
47
47
  className: cx2("dybo-glass", className),
48
48
  style: {
49
49
  padding,
50
- background: solid ? "var(--dybo-surface-card-solid)" : void 0,
50
+ background: solid ? "var(--card-bg-with-opacity)" : void 0,
51
51
  ...style
52
52
  },
53
53
  ...props
@@ -65,7 +65,7 @@ function Input({ label, error, className, id, ...props }) {
65
65
  style: {
66
66
  fontSize: "var(--dybo-font-size-sm)",
67
67
  fontWeight: "var(--dybo-font-weight-medium)",
68
- color: "var(--dybo-color-text-muted)"
68
+ color: "hsl(var(--muted-foreground))"
69
69
  },
70
70
  children: label
71
71
  }
@@ -79,10 +79,6 @@ function Input({ label, error, className, id, ...props }) {
79
79
  error ? "dybo-input--error" : void 0,
80
80
  className
81
81
  ),
82
- style: error ? {
83
- borderColor: "var(--dybo-danger)",
84
- boxShadow: "0 0 0 3px rgba(162,26,23,0.12)"
85
- } : void 0,
86
82
  ...props
87
83
  }
88
84
  ),
@@ -91,7 +87,7 @@ function Input({ label, error, className, id, ...props }) {
91
87
  {
92
88
  style: {
93
89
  fontSize: "var(--dybo-font-size-xs)",
94
- color: "var(--dybo-danger)",
90
+ color: "hsl(var(--destructive))",
95
91
  fontWeight: "var(--dybo-font-weight-medium)"
96
92
  },
97
93
  children: error
@@ -255,8 +251,8 @@ function Sidebar({
255
251
  lineHeight: 1.3
256
252
  },
257
253
  children: [
258
- /* @__PURE__ */ jsx("b", { style: { color: "#fff", fontSize: "13px" }, children: user.name }),
259
- user.email && /* @__PURE__ */ jsx("span", { style: { color: "#7f8592", fontSize: "11px" }, children: user.email })
254
+ /* @__PURE__ */ jsx("b", { style: { color: "hsl(var(--brand-white))", fontSize: "13px" }, children: user.name }),
255
+ user.email && /* @__PURE__ */ jsx("span", { style: { color: "hsl(var(--brand-white) / 0.6)", fontSize: "11px" }, children: user.email })
260
256
  ]
261
257
  }
262
258
  ),
@@ -268,8 +264,8 @@ function Sidebar({
268
264
  onClick: onLogout,
269
265
  style: {
270
266
  background: "transparent",
271
- border: "1px solid rgba(255,255,255,0.18)",
272
- color: "var(--dybo-sidebar-text)",
267
+ border: "1px solid hsl(var(--brand-white) / 0.18)",
268
+ color: "hsl(var(--brand-white) / 0.75)",
273
269
  padding: "6px 10px",
274
270
  fontSize: "12px",
275
271
  borderRadius: "8px",
@@ -322,62 +318,100 @@ function DataTable({
322
318
  rows,
323
319
  rowKey,
324
320
  onRowClick,
325
- emptyMessage = "Nenhum resultado.",
326
- className
321
+ emptyMessage = "No results.",
322
+ className,
323
+ toolbar,
324
+ sortColumn,
325
+ sortDirection,
326
+ onSort
327
327
  }) {
328
328
  function getRowKey(row, index) {
329
329
  if (!rowKey) return index;
330
330
  if (typeof rowKey === "function") return rowKey(row, index);
331
331
  return row[rowKey];
332
332
  }
333
- return /* @__PURE__ */ jsx("div", { className: cx14("dybo-table-wrap", className), children: /* @__PURE__ */ jsxs("table", { className: "dybo-table", children: [
334
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsx(
335
- "th",
336
- {
337
- className: cx14(
338
- col.align === "left" ? "left" : void 0,
339
- col.className
340
- ),
341
- children: col.label
342
- },
343
- col.key
344
- )) }) }),
345
- /* @__PURE__ */ jsx("tbody", { children: rows.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
346
- "td",
347
- {
348
- colSpan: columns.length,
349
- style: {
350
- textAlign: "center",
351
- padding: "32px",
352
- color: "var(--dybo-color-text-muted)"
353
- },
354
- children: emptyMessage
355
- }
356
- ) }) : rows.map((row, index) => /* @__PURE__ */ jsx(
357
- "tr",
358
- {
359
- className: cx14(
360
- onRowClick ? "dybo-table__row--clickable" : void 0
361
- ),
362
- onClick: onRowClick ? () => onRowClick(row) : void 0,
363
- children: columns.map((col) => {
364
- const value = row[col.key];
365
- return /* @__PURE__ */ jsx(
366
- "td",
333
+ return /* @__PURE__ */ jsxs("div", { className: cx14("dybo-table-wrap", className), children: [
334
+ toolbar && /* @__PURE__ */ jsx("div", { className: "dybo-table__toolbar", children: toolbar }),
335
+ /* @__PURE__ */ jsxs("table", { className: "dybo-table", children: [
336
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsx(
337
+ "th",
338
+ {
339
+ className: cx14(
340
+ col.align === "left" ? "left" : void 0,
341
+ col.className
342
+ ),
343
+ children: col.sortable ? /* @__PURE__ */ jsxs(
344
+ "button",
367
345
  {
368
- className: cx14(
369
- col.align === "left" ? "left" : void 0,
370
- col.className
371
- ),
372
- children: col.format ? col.format(value, row) : String(value ?? "")
373
- },
374
- col.key
375
- );
376
- })
377
- },
378
- getRowKey(row, index)
379
- )) })
380
- ] }) });
346
+ type: "button",
347
+ className: "dybo-table__sort-btn",
348
+ onClick: () => onSort?.(col.key),
349
+ children: [
350
+ col.label,
351
+ /* @__PURE__ */ jsxs(
352
+ "svg",
353
+ {
354
+ width: "14",
355
+ height: "14",
356
+ viewBox: "0 0 24 24",
357
+ fill: "none",
358
+ stroke: "currentColor",
359
+ strokeWidth: "2",
360
+ strokeLinecap: "round",
361
+ strokeLinejoin: "round",
362
+ style: {
363
+ opacity: sortColumn === col.key ? 1 : 0.45,
364
+ transform: sortColumn === col.key && sortDirection === "desc" ? "rotate(180deg)" : void 0
365
+ },
366
+ children: [
367
+ /* @__PURE__ */ jsx("path", { d: "M8 9l4 -4l4 4" }),
368
+ /* @__PURE__ */ jsx("path", { d: "M16 15l-4 4l-4 -4" })
369
+ ]
370
+ }
371
+ )
372
+ ]
373
+ }
374
+ ) : col.label
375
+ },
376
+ col.key
377
+ )) }) }),
378
+ /* @__PURE__ */ jsx("tbody", { children: rows.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
379
+ "td",
380
+ {
381
+ colSpan: columns.length,
382
+ style: {
383
+ textAlign: "center",
384
+ padding: "32px",
385
+ color: "hsl(var(--muted-foreground))"
386
+ },
387
+ children: emptyMessage
388
+ }
389
+ ) }) : rows.map((row, index) => /* @__PURE__ */ jsx(
390
+ "tr",
391
+ {
392
+ className: cx14(
393
+ onRowClick ? "dybo-table__row--clickable" : void 0
394
+ ),
395
+ onClick: onRowClick ? () => onRowClick(row) : void 0,
396
+ children: columns.map((col) => {
397
+ const value = row[col.key];
398
+ return /* @__PURE__ */ jsx(
399
+ "td",
400
+ {
401
+ className: cx14(
402
+ col.align === "left" ? "left" : void 0,
403
+ col.className
404
+ ),
405
+ children: col.format ? col.format(value, row) : String(value ?? "")
406
+ },
407
+ col.key
408
+ );
409
+ })
410
+ },
411
+ getRowKey(row, index)
412
+ )) })
413
+ ] })
414
+ ] });
381
415
  }
382
416
  var cx15 = (...c) => c.filter(Boolean).join(" ");
383
417
  function Tabs({ tabs, active, onChange, className }) {
@@ -432,7 +466,7 @@ function Select({
432
466
  style: {
433
467
  fontSize: "var(--dybo-font-size-sm)",
434
468
  fontWeight: "var(--dybo-font-weight-medium)",
435
- color: "var(--dybo-color-text-muted)"
469
+ color: "hsl(var(--muted-foreground))"
436
470
  },
437
471
  children: label
438
472
  }
@@ -441,11 +475,7 @@ function Select({
441
475
  "select",
442
476
  {
443
477
  id: selectId,
444
- className: cx17("dybo-select", className),
445
- style: error ? {
446
- borderColor: "var(--dybo-danger)",
447
- boxShadow: "0 0 0 3px rgba(162,26,23,0.12)"
448
- } : void 0,
478
+ className: cx17("dybo-select", error ? "dybo-select--error" : void 0, className),
449
479
  ...props,
450
480
  children: [
451
481
  placeholder && /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: placeholder }),
@@ -458,7 +488,7 @@ function Select({
458
488
  {
459
489
  style: {
460
490
  fontSize: "var(--dybo-font-size-xs)",
461
- color: "var(--dybo-danger)",
491
+ color: "hsl(var(--destructive))",
462
492
  fontWeight: "var(--dybo-font-weight-medium)"
463
493
  },
464
494
  children: error
@@ -577,6 +607,82 @@ function Modal({
577
607
  document.body
578
608
  );
579
609
  }
610
+ function Drawer({
611
+ open,
612
+ onClose,
613
+ title,
614
+ children,
615
+ footer,
616
+ side = "right",
617
+ width,
618
+ closeOnBackdrop = true,
619
+ hideHeader = false
620
+ }) {
621
+ useEffect(() => {
622
+ if (!open) return;
623
+ function onKeyDown(e) {
624
+ if (e.key === "Escape") onClose();
625
+ }
626
+ document.addEventListener("keydown", onKeyDown);
627
+ return () => document.removeEventListener("keydown", onKeyDown);
628
+ }, [open, onClose]);
629
+ if (!open) return null;
630
+ const panelClass = side === "left" ? "dybo-drawer-panel dybo-drawer-panel--left" : "dybo-drawer-panel dybo-drawer-panel--right";
631
+ return createPortal(
632
+ /* @__PURE__ */ jsxs(Fragment, { children: [
633
+ /* @__PURE__ */ jsx(
634
+ "div",
635
+ {
636
+ className: "dybo-drawer-backdrop",
637
+ onClick: closeOnBackdrop ? onClose : void 0,
638
+ "aria-hidden": true
639
+ }
640
+ ),
641
+ /* @__PURE__ */ jsxs(
642
+ "aside",
643
+ {
644
+ className: panelClass,
645
+ style: width !== void 0 ? { width, maxWidth: "100%" } : void 0,
646
+ "aria-modal": "true",
647
+ role: "dialog",
648
+ onClick: (e) => e.stopPropagation(),
649
+ children: [
650
+ !hideHeader && /* @__PURE__ */ jsxs("div", { className: "dybo-drawer-panel__header", children: [
651
+ title ? /* @__PURE__ */ jsx("h2", { className: "dybo-drawer-panel__title", children: title }) : /* @__PURE__ */ jsx("span", {}),
652
+ /* @__PURE__ */ jsx(
653
+ "button",
654
+ {
655
+ type: "button",
656
+ className: "dybo-drawer-panel__close",
657
+ onClick: onClose,
658
+ "aria-label": "Close",
659
+ children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
660
+ "path",
661
+ {
662
+ d: "M2 2l12 12M14 2L2 14",
663
+ stroke: "currentColor",
664
+ strokeWidth: "2",
665
+ strokeLinecap: "round"
666
+ }
667
+ ) })
668
+ }
669
+ )
670
+ ] }),
671
+ /* @__PURE__ */ jsx(
672
+ "div",
673
+ {
674
+ className: hideHeader ? "dybo-drawer-panel__body dybo-drawer-panel__body--flush" : "dybo-drawer-panel__body",
675
+ children
676
+ }
677
+ ),
678
+ footer && /* @__PURE__ */ jsx("div", { className: "dybo-drawer-panel__footer", children: footer })
679
+ ]
680
+ }
681
+ )
682
+ ] }),
683
+ document.body
684
+ );
685
+ }
580
686
  var cx19 = (...c) => c.filter(Boolean).join(" ");
581
687
  function LoginCard({
582
688
  logo,
@@ -600,7 +706,1215 @@ function LoginCard({
600
706
  children
601
707
  ] }) });
602
708
  }
709
+ var cx20 = (...c) => c.filter(Boolean).join(" ");
710
+ function OrgEntitySelector({
711
+ label,
712
+ className,
713
+ ...props
714
+ }) {
715
+ return /* @__PURE__ */ jsxs(
716
+ "button",
717
+ {
718
+ type: "button",
719
+ className: cx20("dybo-org-selector", className),
720
+ ...props,
721
+ children: [
722
+ /* @__PURE__ */ jsx("span", { className: "dybo-org-selector__label", children: label }),
723
+ /* @__PURE__ */ jsx(
724
+ "svg",
725
+ {
726
+ className: "dybo-org-selector__chevron",
727
+ width: "20",
728
+ height: "20",
729
+ viewBox: "0 0 24 24",
730
+ fill: "none",
731
+ stroke: "currentColor",
732
+ strokeWidth: "2",
733
+ strokeLinecap: "round",
734
+ strokeLinejoin: "round",
735
+ children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6l6 -6" })
736
+ }
737
+ )
738
+ ]
739
+ }
740
+ );
741
+ }
742
+ var cx21 = (...c) => c.filter(Boolean).join(" ");
743
+ function ThemeToggle({ theme, onChange, className }) {
744
+ return /* @__PURE__ */ jsxs("div", { className: cx21("dybo-theme-toggle", className), children: [
745
+ /* @__PURE__ */ jsx(
746
+ "button",
747
+ {
748
+ type: "button",
749
+ "aria-pressed": theme === "dark",
750
+ className: cx21(
751
+ "dybo-theme-toggle__btn",
752
+ theme === "dark" ? "dybo-theme-toggle__btn--active" : void 0
753
+ ),
754
+ onClick: () => onChange("dark"),
755
+ title: "Dark",
756
+ children: /* @__PURE__ */ jsx(
757
+ "svg",
758
+ {
759
+ width: "18",
760
+ height: "18",
761
+ viewBox: "0 0 24 24",
762
+ fill: "none",
763
+ stroke: "currentColor",
764
+ strokeWidth: "2",
765
+ strokeLinecap: "round",
766
+ strokeLinejoin: "round",
767
+ children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
768
+ }
769
+ )
770
+ }
771
+ ),
772
+ /* @__PURE__ */ jsx(
773
+ "button",
774
+ {
775
+ type: "button",
776
+ "aria-pressed": theme === "light",
777
+ className: cx21(
778
+ "dybo-theme-toggle__btn",
779
+ theme === "light" ? "dybo-theme-toggle__btn--active" : void 0
780
+ ),
781
+ onClick: () => onChange("light"),
782
+ title: "Light",
783
+ children: /* @__PURE__ */ jsxs(
784
+ "svg",
785
+ {
786
+ width: "18",
787
+ height: "18",
788
+ viewBox: "0 0 24 24",
789
+ fill: "none",
790
+ stroke: "currentColor",
791
+ strokeWidth: "2",
792
+ strokeLinecap: "round",
793
+ strokeLinejoin: "round",
794
+ children: [
795
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4" }),
796
+ /* @__PURE__ */ jsx("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" })
797
+ ]
798
+ }
799
+ )
800
+ }
801
+ )
802
+ ] });
803
+ }
804
+ var cx22 = (...c) => c.filter(Boolean).join(" ");
805
+ function Avatar({
806
+ initials,
807
+ size = "md",
808
+ shape = "square",
809
+ onClick,
810
+ className
811
+ }) {
812
+ const classes = cx22(
813
+ "dybo-avatar",
814
+ size === "sm" ? "dybo-avatar--sm" : "dybo-avatar--md",
815
+ size === "md" ? shape === "circle" ? "dybo-avatar--circle" : "dybo-avatar--square" : void 0,
816
+ className
817
+ );
818
+ if (onClick) {
819
+ return /* @__PURE__ */ jsx("button", { type: "button", className: classes, onClick, children: /* @__PURE__ */ jsx("span", { children: initials }) });
820
+ }
821
+ return /* @__PURE__ */ jsx("div", { className: classes, children: /* @__PURE__ */ jsx("span", { children: initials }) });
822
+ }
823
+ var cx23 = (...c) => c.filter(Boolean).join(" ");
824
+ function NotificationsButton({
825
+ unread = false,
826
+ className,
827
+ ...props
828
+ }) {
829
+ return /* @__PURE__ */ jsxs(
830
+ "button",
831
+ {
832
+ type: "button",
833
+ className: cx23("dybo-notifications-btn", className),
834
+ title: "Notifications",
835
+ ...props,
836
+ children: [
837
+ /* @__PURE__ */ jsxs(
838
+ "svg",
839
+ {
840
+ width: "20",
841
+ height: "20",
842
+ viewBox: "0 0 24 24",
843
+ fill: "none",
844
+ stroke: "currentColor",
845
+ strokeWidth: "2",
846
+ strokeLinecap: "round",
847
+ strokeLinejoin: "round",
848
+ children: [
849
+ /* @__PURE__ */ jsx("path", { d: "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" }),
850
+ /* @__PURE__ */ jsx("path", { d: "M9 17v1a3 3 0 0 0 6 0v-1" })
851
+ ]
852
+ }
853
+ ),
854
+ unread && /* @__PURE__ */ jsx("span", { className: "dybo-notifications-btn__dot" })
855
+ ]
856
+ }
857
+ );
858
+ }
859
+ var cx24 = (...c) => c.filter(Boolean).join(" ");
860
+ function PlatformSwitcher({ apps, open, onToggle, className }) {
861
+ return /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
862
+ /* @__PURE__ */ jsx(
863
+ "button",
864
+ {
865
+ type: "button",
866
+ className: "dybo-btn dybo-btn--ghost",
867
+ style: { padding: 10 },
868
+ onClick: onToggle,
869
+ "aria-expanded": open,
870
+ title: "Switch app",
871
+ children: /* @__PURE__ */ jsxs(
872
+ "svg",
873
+ {
874
+ width: "20",
875
+ height: "20",
876
+ viewBox: "0 0 24 24",
877
+ fill: "none",
878
+ stroke: "currentColor",
879
+ strokeWidth: "2",
880
+ strokeLinecap: "round",
881
+ strokeLinejoin: "round",
882
+ children: [
883
+ /* @__PURE__ */ jsx("rect", { x: "4", y: "4", width: "6", height: "6", rx: "1" }),
884
+ /* @__PURE__ */ jsx("rect", { x: "14", y: "4", width: "6", height: "6", rx: "1" }),
885
+ /* @__PURE__ */ jsx("rect", { x: "4", y: "14", width: "6", height: "6", rx: "1" }),
886
+ /* @__PURE__ */ jsx("rect", { x: "14", y: "14", width: "6", height: "6", rx: "1" })
887
+ ]
888
+ }
889
+ )
890
+ }
891
+ ),
892
+ open && /* @__PURE__ */ jsx("div", { className: cx24("dybo-platform-switcher", className), children: /* @__PURE__ */ jsx("div", { className: "dybo-platform-switcher__grid", children: apps.map((app) => /* @__PURE__ */ jsxs("a", { href: app.href, className: "dybo-platform-switcher__card", children: [
893
+ /* @__PURE__ */ jsx("span", { className: "dybo-platform-switcher__icon", children: app.icon }),
894
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
895
+ /* @__PURE__ */ jsx("span", { className: "dybo-platform-switcher__title", children: app.title }),
896
+ /* @__PURE__ */ jsx("span", { className: "dybo-platform-switcher__desc", children: app.description })
897
+ ] })
898
+ ] }, app.title)) }) })
899
+ ] });
900
+ }
901
+ var cx25 = (...c) => c.filter(Boolean).join(" ");
902
+ function UnderlineTabs({ tabs, active, onChange, className }) {
903
+ return /* @__PURE__ */ jsx("div", { className: cx25("dybo-underline-tabs", className), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsx(
904
+ "button",
905
+ {
906
+ type: "button",
907
+ role: "tab",
908
+ "aria-selected": tab.key === active,
909
+ disabled: tab.disabled,
910
+ className: "dybo-underline-tabs__tab",
911
+ onClick: () => !tab.disabled && onChange(tab.key),
912
+ children: tab.label
913
+ },
914
+ tab.key
915
+ )) });
916
+ }
917
+ var cx26 = (...c) => c.filter(Boolean).join(" ");
918
+ function FilterPills({ options, active, onChange, className }) {
919
+ return /* @__PURE__ */ jsx("div", { className: cx26("dybo-filter-pills", className), role: "tablist", children: options.map((opt) => /* @__PURE__ */ jsx(
920
+ "button",
921
+ {
922
+ type: "button",
923
+ role: "tab",
924
+ "aria-selected": opt.value === active,
925
+ className: cx26(
926
+ "dybo-filter-pill",
927
+ opt.value === active ? "dybo-filter-pill--active" : void 0
928
+ ),
929
+ onClick: () => onChange(opt.value),
930
+ children: opt.label
931
+ },
932
+ opt.value
933
+ )) });
934
+ }
935
+ var cx27 = (...c) => c.filter(Boolean).join(" ");
936
+ function Pagination({
937
+ page,
938
+ pageCount,
939
+ pageSize,
940
+ total,
941
+ pageSizeOptions = [5, 10, 25, 50, 100],
942
+ onPageChange,
943
+ onPageSizeChange,
944
+ className
945
+ }) {
946
+ const start = total === 0 ? 0 : (page - 1) * pageSize + 1;
947
+ const end = Math.min(page * pageSize, total);
948
+ return /* @__PURE__ */ jsxs("div", { className: cx27("dybo-pagination", className), children: [
949
+ /* @__PURE__ */ jsxs("p", { className: "dybo-pagination__summary", children: [
950
+ start,
951
+ "\u2013",
952
+ end,
953
+ " of ",
954
+ total
955
+ ] }),
956
+ /* @__PURE__ */ jsxs("div", { className: "dybo-pagination__controls", children: [
957
+ onPageSizeChange && /* @__PURE__ */ jsxs("label", { className: "dybo-pagination__size", children: [
958
+ /* @__PURE__ */ jsx("span", { children: "Rows per page" }),
959
+ /* @__PURE__ */ jsx(
960
+ "select",
961
+ {
962
+ className: "dybo-select",
963
+ value: pageSize,
964
+ onChange: (e) => onPageSizeChange(Number(e.target.value)),
965
+ children: pageSizeOptions.map((n) => /* @__PURE__ */ jsx("option", { value: n, children: n }, n))
966
+ }
967
+ )
968
+ ] }),
969
+ /* @__PURE__ */ jsxs("nav", { className: "dybo-pagination__nav", "aria-label": "Pagination", children: [
970
+ /* @__PURE__ */ jsx(
971
+ "button",
972
+ {
973
+ type: "button",
974
+ className: "dybo-pagination__btn",
975
+ disabled: page <= 1,
976
+ onClick: () => onPageChange(page - 1),
977
+ "aria-label": "Previous page",
978
+ children: /* @__PURE__ */ jsx(
979
+ "svg",
980
+ {
981
+ width: "16",
982
+ height: "16",
983
+ viewBox: "0 0 24 24",
984
+ fill: "none",
985
+ stroke: "currentColor",
986
+ strokeWidth: "2",
987
+ strokeLinecap: "round",
988
+ strokeLinejoin: "round",
989
+ children: /* @__PURE__ */ jsx("path", { d: "M15 6l-6 6l6 6" })
990
+ }
991
+ )
992
+ }
993
+ ),
994
+ /* @__PURE__ */ jsx(
995
+ "button",
996
+ {
997
+ type: "button",
998
+ "aria-current": "page",
999
+ className: "dybo-pagination__btn dybo-pagination__btn--active",
1000
+ children: page
1001
+ }
1002
+ ),
1003
+ /* @__PURE__ */ jsx(
1004
+ "button",
1005
+ {
1006
+ type: "button",
1007
+ className: "dybo-pagination__btn",
1008
+ disabled: page >= pageCount,
1009
+ onClick: () => onPageChange(page + 1),
1010
+ "aria-label": "Next page",
1011
+ children: /* @__PURE__ */ jsx(
1012
+ "svg",
1013
+ {
1014
+ width: "16",
1015
+ height: "16",
1016
+ viewBox: "0 0 24 24",
1017
+ fill: "none",
1018
+ stroke: "currentColor",
1019
+ strokeWidth: "2",
1020
+ strokeLinecap: "round",
1021
+ strokeLinejoin: "round",
1022
+ children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6l-6 6" })
1023
+ }
1024
+ )
1025
+ }
1026
+ )
1027
+ ] })
1028
+ ] })
1029
+ ] });
1030
+ }
1031
+ var cx28 = (...c) => c.filter(Boolean).join(" ");
1032
+ function EmptyState({
1033
+ variant = "simple",
1034
+ icon,
1035
+ title,
1036
+ description,
1037
+ className
1038
+ }) {
1039
+ if (variant === "table-row") {
1040
+ return /* @__PURE__ */ jsx("p", { className: cx28("dybo-empty-row", className), children: title ?? "No results." });
1041
+ }
1042
+ if (variant === "rich") {
1043
+ return /* @__PURE__ */ jsx("div", { className: cx28("dybo-empty--rich", className), children: /* @__PURE__ */ jsxs("div", { className: "dybo-empty__inner", children: [
1044
+ icon && /* @__PURE__ */ jsx("div", { className: "dybo-empty__icon", children: icon }),
1045
+ /* @__PURE__ */ jsx("p", { className: "dybo-empty__title", children: title ?? "No data to display" }),
1046
+ description && /* @__PURE__ */ jsx("p", { className: "dybo-empty__desc", children: description })
1047
+ ] }) });
1048
+ }
1049
+ return /* @__PURE__ */ jsx("div", { className: cx28("dybo-empty", className), children: /* @__PURE__ */ jsx("p", { className: "dybo-empty__text", children: title ?? "Available Soon" }) });
1050
+ }
1051
+ var cx29 = (...c) => c.filter(Boolean).join(" ");
1052
+ function KpiCard({
1053
+ label,
1054
+ value,
1055
+ icon,
1056
+ variant = "ghost",
1057
+ className
1058
+ }) {
1059
+ if (variant === "tile") {
1060
+ return /* @__PURE__ */ jsxs("div", { className: cx29("dybo-kpi-tile", className), children: [
1061
+ /* @__PURE__ */ jsxs("div", { children: [
1062
+ /* @__PURE__ */ jsx("span", { className: "dybo-kpi-tile__label", children: label }),
1063
+ /* @__PURE__ */ jsx("div", { className: "dybo-kpi-tile__value", children: value })
1064
+ ] }),
1065
+ icon && /* @__PURE__ */ jsx("span", { className: "dybo-kpi-tile__icon", children: icon })
1066
+ ] });
1067
+ }
1068
+ return /* @__PURE__ */ jsxs("div", { className: cx29("dybo-kpi", className), children: [
1069
+ /* @__PURE__ */ jsxs("div", { children: [
1070
+ /* @__PURE__ */ jsx("p", { className: "dybo-kpi__label", children: label }),
1071
+ /* @__PURE__ */ jsx("p", { className: "dybo-kpi__value", children: value })
1072
+ ] }),
1073
+ icon && /* @__PURE__ */ jsx("span", { className: "dybo-kpi__icon", children: icon })
1074
+ ] });
1075
+ }
1076
+ var cx30 = (...c) => c.filter(Boolean).join(" ");
1077
+ function KpiGrid({ cells, className }) {
1078
+ return /* @__PURE__ */ jsx(
1079
+ "div",
1080
+ {
1081
+ className: cx30("dybo-kpi-grid", className),
1082
+ style: { gridTemplateColumns: `repeat(${cells.length || 1}, minmax(0, 1fr))` },
1083
+ children: cells.map((cell, i) => /* @__PURE__ */ jsxs("div", { className: "dybo-kpi-grid__cell", children: [
1084
+ /* @__PURE__ */ jsx("div", { className: "dybo-kpi-grid__label", children: cell.label }),
1085
+ /* @__PURE__ */ jsx("div", { className: "dybo-kpi-grid__value", children: cell.value }),
1086
+ cell.sublabel && /* @__PURE__ */ jsx("div", { className: "dybo-kpi-grid__sublabel", children: cell.sublabel })
1087
+ ] }, i))
1088
+ }
1089
+ );
1090
+ }
1091
+ var cx31 = (...c) => c.filter(Boolean).join(" ");
1092
+ function KpiStrip({ items, className }) {
1093
+ return /* @__PURE__ */ jsx("div", { className: cx31("dybo-kpi-strip", className), children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "dybo-kpi-strip__item", children: [
1094
+ /* @__PURE__ */ jsx("span", { className: "dybo-kpi-strip__icon", children: item.icon }),
1095
+ /* @__PURE__ */ jsxs("div", { className: "dybo-kpi-strip__row", children: [
1096
+ /* @__PURE__ */ jsxs("div", { children: [
1097
+ /* @__PURE__ */ jsx("span", { className: "dybo-kpi-strip__label", children: item.label }),
1098
+ item.delta && /* @__PURE__ */ jsx("span", { className: "dybo-kpi-strip__delta", children: item.delta })
1099
+ ] }),
1100
+ /* @__PURE__ */ jsx("span", { className: "dybo-kpi-strip__value", children: item.value })
1101
+ ] })
1102
+ ] }, i)) });
1103
+ }
1104
+ var cx32 = (...c) => c.filter(Boolean).join(" ");
1105
+ function ViewToggle({ value, options, onChange, className }) {
1106
+ return /* @__PURE__ */ jsx("div", { className: cx32("dybo-view-toggle", className), children: options.map((opt) => /* @__PURE__ */ jsx(
1107
+ "button",
1108
+ {
1109
+ type: "button",
1110
+ title: opt.label,
1111
+ "aria-pressed": opt.value === value,
1112
+ className: cx32(
1113
+ "dybo-view-toggle__btn",
1114
+ opt.value === value ? "dybo-view-toggle__btn--active" : void 0
1115
+ ),
1116
+ onClick: () => onChange(opt.value),
1117
+ children: opt.icon
1118
+ },
1119
+ opt.value
1120
+ )) });
1121
+ }
1122
+ var cx33 = (...c) => c.filter(Boolean).join(" ");
1123
+ function MetadataBadge({ label, value, className }) {
1124
+ return /* @__PURE__ */ jsx("div", { className: cx33("dybo-metadata-badge", className), children: /* @__PURE__ */ jsxs("p", { children: [
1125
+ label,
1126
+ ": ",
1127
+ /* @__PURE__ */ jsx("b", { children: value })
1128
+ ] }) });
1129
+ }
1130
+ var cx34 = (...c) => c.filter(Boolean).join(" ");
1131
+ function Toast({ open, message, icon, className }) {
1132
+ if (!open) return null;
1133
+ return /* @__PURE__ */ jsx(
1134
+ "div",
1135
+ {
1136
+ style: {
1137
+ position: "fixed",
1138
+ left: "50%",
1139
+ bottom: 24,
1140
+ transform: "translateX(-50%)",
1141
+ zIndex: 80,
1142
+ width: "100%",
1143
+ maxWidth: 480,
1144
+ padding: "0 16px"
1145
+ },
1146
+ children: /* @__PURE__ */ jsxs("div", { className: cx34("dybo-toast", className), children: [
1147
+ icon && /* @__PURE__ */ jsx("span", { className: "dybo-toast__icon", children: icon }),
1148
+ /* @__PURE__ */ jsx("span", { className: "dybo-toast__text", children: message })
1149
+ ] })
1150
+ }
1151
+ );
1152
+ }
1153
+ var cx35 = (...c) => c.filter(Boolean).join(" ");
1154
+ function WarningIcon() {
1155
+ return /* @__PURE__ */ jsx(
1156
+ "svg",
1157
+ {
1158
+ width: "24",
1159
+ height: "24",
1160
+ viewBox: "0 0 24 24",
1161
+ fill: "none",
1162
+ stroke: "currentColor",
1163
+ strokeWidth: "2",
1164
+ strokeLinecap: "round",
1165
+ strokeLinejoin: "round",
1166
+ children: /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" })
1167
+ }
1168
+ );
1169
+ }
1170
+ function Banner({ variant, title, description, items, className }) {
1171
+ const modifier = variant === "warning" ? "dybo-banner--warning" : "dybo-banner--error";
1172
+ return /* @__PURE__ */ jsxs(
1173
+ "div",
1174
+ {
1175
+ className: cx35("dybo-banner", modifier, className),
1176
+ role: variant === "blocking-error" ? "alert" : void 0,
1177
+ children: [
1178
+ /* @__PURE__ */ jsx("span", { className: "dybo-banner__icon", children: /* @__PURE__ */ jsx(WarningIcon, {}) }),
1179
+ /* @__PURE__ */ jsxs("div", { className: "dybo-banner__body", children: [
1180
+ /* @__PURE__ */ jsx("span", { className: "dybo-banner__title", children: title }),
1181
+ description && /* @__PURE__ */ jsx("span", { className: "dybo-banner__desc", children: description }),
1182
+ items && items.length > 0 && /* @__PURE__ */ jsx("ul", { className: "dybo-banner__list", children: items.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) })
1183
+ ] })
1184
+ ]
1185
+ }
1186
+ );
1187
+ }
1188
+ var cx36 = (...c) => c.filter(Boolean).join(" ");
1189
+ function Accordion({
1190
+ question,
1191
+ children,
1192
+ defaultOpen = false,
1193
+ variant = "plain",
1194
+ className
1195
+ }) {
1196
+ return /* @__PURE__ */ jsxs(
1197
+ "details",
1198
+ {
1199
+ className: cx36("dybo-accordion", `dybo-accordion--${variant}`, className),
1200
+ open: defaultOpen,
1201
+ children: [
1202
+ /* @__PURE__ */ jsxs("summary", { children: [
1203
+ /* @__PURE__ */ jsx("span", { className: "dybo-accordion__q", children: question }),
1204
+ /* @__PURE__ */ jsx(
1205
+ "svg",
1206
+ {
1207
+ className: "dybo-accordion__chevron",
1208
+ width: "20",
1209
+ height: "20",
1210
+ viewBox: "0 0 24 24",
1211
+ fill: "none",
1212
+ stroke: "currentColor",
1213
+ strokeWidth: "2",
1214
+ strokeLinecap: "round",
1215
+ strokeLinejoin: "round",
1216
+ children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6l6-6" })
1217
+ }
1218
+ )
1219
+ ] }),
1220
+ /* @__PURE__ */ jsx("div", { className: "dybo-accordion__body", children })
1221
+ ]
1222
+ }
1223
+ );
1224
+ }
1225
+ var cx37 = (...c) => c.filter(Boolean).join(" ");
1226
+ function ReadOnlyField({ label, value, className }) {
1227
+ return /* @__PURE__ */ jsxs("div", { className: cx37("dybo-readonly-field", className), children: [
1228
+ /* @__PURE__ */ jsx("p", { className: "dybo-readonly-field__label", children: label }),
1229
+ /* @__PURE__ */ jsx("p", { className: "dybo-readonly-field__value", children: value })
1230
+ ] });
1231
+ }
1232
+ var cx38 = (...c) => c.filter(Boolean).join(" ");
1233
+ function SearchField({
1234
+ iconPosition = "left",
1235
+ className,
1236
+ ...props
1237
+ }) {
1238
+ return /* @__PURE__ */ jsxs("div", { className: cx38("dybo-search", `dybo-search--icon-${iconPosition}`, className), children: [
1239
+ /* @__PURE__ */ jsx("span", { className: "dybo-search__icon", children: /* @__PURE__ */ jsxs(
1240
+ "svg",
1241
+ {
1242
+ width: "16",
1243
+ height: "16",
1244
+ viewBox: "0 0 24 24",
1245
+ fill: "none",
1246
+ stroke: "currentColor",
1247
+ strokeWidth: "2",
1248
+ strokeLinecap: "round",
1249
+ strokeLinejoin: "round",
1250
+ children: [
1251
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "10", r: "7" }),
1252
+ /* @__PURE__ */ jsx("path", { d: "M21 21l-6 -6" })
1253
+ ]
1254
+ }
1255
+ ) }),
1256
+ /* @__PURE__ */ jsx("input", { type: "search", className: "dybo-search__input", ...props })
1257
+ ] });
1258
+ }
1259
+ var cx39 = (...c) => c.filter(Boolean).join(" ");
1260
+ function DateRangeTrigger({
1261
+ label,
1262
+ className,
1263
+ ...props
1264
+ }) {
1265
+ return /* @__PURE__ */ jsxs(
1266
+ "button",
1267
+ {
1268
+ type: "button",
1269
+ className: cx39("dybo-date-trigger", className),
1270
+ "aria-haspopup": "dialog",
1271
+ ...props,
1272
+ children: [
1273
+ /* @__PURE__ */ jsxs(
1274
+ "svg",
1275
+ {
1276
+ width: "18",
1277
+ height: "18",
1278
+ viewBox: "0 0 24 24",
1279
+ fill: "none",
1280
+ stroke: "currentColor",
1281
+ strokeWidth: "2",
1282
+ strokeLinecap: "round",
1283
+ strokeLinejoin: "round",
1284
+ children: [
1285
+ /* @__PURE__ */ jsx("rect", { x: "4", y: "5", width: "16", height: "16", rx: "2" }),
1286
+ /* @__PURE__ */ jsx("path", { d: "M16 3v4M8 3v4M4 11h16" })
1287
+ ]
1288
+ }
1289
+ ),
1290
+ /* @__PURE__ */ jsx("span", { children: label })
1291
+ ]
1292
+ }
1293
+ );
1294
+ }
1295
+ var cx40 = (...c) => c.filter(Boolean).join(" ");
1296
+ function UploadDropzone({
1297
+ label = "Upload Files",
1298
+ error = false,
1299
+ className,
1300
+ ...props
1301
+ }) {
1302
+ return /* @__PURE__ */ jsxs(
1303
+ "button",
1304
+ {
1305
+ type: "button",
1306
+ className: cx40(
1307
+ "dybo-dropzone",
1308
+ error ? "dybo-dropzone--error" : void 0,
1309
+ className
1310
+ ),
1311
+ ...props,
1312
+ children: [
1313
+ /* @__PURE__ */ jsx("span", { className: "dybo-dropzone__icon", children: /* @__PURE__ */ jsxs(
1314
+ "svg",
1315
+ {
1316
+ width: "20",
1317
+ height: "20",
1318
+ viewBox: "0 0 24 24",
1319
+ fill: "none",
1320
+ stroke: "currentColor",
1321
+ strokeWidth: "2",
1322
+ strokeLinecap: "round",
1323
+ strokeLinejoin: "round",
1324
+ children: [
1325
+ /* @__PURE__ */ jsx("path", { d: "M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1" }),
1326
+ /* @__PURE__ */ jsx("path", { d: "M9 15l3 -3l3 3M12 12l0 9" })
1327
+ ]
1328
+ }
1329
+ ) }),
1330
+ /* @__PURE__ */ jsx("span", { className: "dybo-dropzone__label", children: label })
1331
+ ]
1332
+ }
1333
+ );
1334
+ }
1335
+ var cx41 = (...c) => c.filter(Boolean).join(" ");
1336
+ function StatusIcon({ status }) {
1337
+ if (status === "filled") {
1338
+ return /* @__PURE__ */ jsx("span", { className: "dybo-step-nav__status dybo-step-nav__status--filled", children: /* @__PURE__ */ jsx(
1339
+ "svg",
1340
+ {
1341
+ width: "14",
1342
+ height: "14",
1343
+ viewBox: "0 0 24 24",
1344
+ fill: "none",
1345
+ stroke: "currentColor",
1346
+ strokeWidth: "2",
1347
+ strokeLinecap: "round",
1348
+ strokeLinejoin: "round",
1349
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5l10 -10" })
1350
+ }
1351
+ ) });
1352
+ }
1353
+ if (status === "extracting") {
1354
+ return /* @__PURE__ */ jsx(
1355
+ "span",
1356
+ {
1357
+ className: "dybo-step-nav__status dybo-step-nav__status--extracting",
1358
+ title: "AI Extracting",
1359
+ children: /* @__PURE__ */ jsx(
1360
+ "svg",
1361
+ {
1362
+ width: "14",
1363
+ height: "14",
1364
+ viewBox: "0 0 24 24",
1365
+ fill: "none",
1366
+ stroke: "currentColor",
1367
+ strokeWidth: "2",
1368
+ strokeLinecap: "round",
1369
+ strokeLinejoin: "round",
1370
+ children: /* @__PURE__ */ jsx("path", { d: "M12 3l1.9 4.6l4.6 1.9l-4.6 1.9l-1.9 4.6l-1.9 -4.6l-4.6 -1.9l4.6 -1.9z" })
1371
+ }
1372
+ )
1373
+ }
1374
+ );
1375
+ }
1376
+ if (status === "partial") {
1377
+ return /* @__PURE__ */ jsx(
1378
+ "span",
1379
+ {
1380
+ className: "dybo-step-nav__status dybo-step-nav__status--partial",
1381
+ title: "Partially Filled"
1382
+ }
1383
+ );
1384
+ }
1385
+ return null;
1386
+ }
1387
+ function StepNavigator({
1388
+ title,
1389
+ steps,
1390
+ activeKey,
1391
+ onStepClick,
1392
+ progressPercent,
1393
+ progressLabel,
1394
+ onSaveExit,
1395
+ onContinue,
1396
+ continueLabel = "Create",
1397
+ className
1398
+ }) {
1399
+ const filledCount = steps.filter((s) => s.status === "filled").length;
1400
+ return /* @__PURE__ */ jsxs("div", { className: cx41("dybo-step-nav", className), children: [
1401
+ /* @__PURE__ */ jsx("h3", { className: "dybo-step-nav__title", children: title }),
1402
+ /* @__PURE__ */ jsx("nav", { className: "dybo-step-nav__list", children: steps.map((step) => /* @__PURE__ */ jsxs(
1403
+ "button",
1404
+ {
1405
+ type: "button",
1406
+ className: cx41(
1407
+ "dybo-step-nav__item",
1408
+ step.key === activeKey ? "dybo-step-nav__item--active" : void 0
1409
+ ),
1410
+ onClick: () => onStepClick?.(step.key),
1411
+ children: [
1412
+ step.icon && /* @__PURE__ */ jsx("span", { className: "dybo-step-nav__item-icon", children: step.icon }),
1413
+ /* @__PURE__ */ jsxs("span", { className: "dybo-step-nav__item-text", children: [
1414
+ /* @__PURE__ */ jsx("span", { className: "dybo-step-nav__item-label", children: step.label }),
1415
+ step.sublabel && /* @__PURE__ */ jsx("span", { className: "dybo-step-nav__item-sub", children: step.sublabel })
1416
+ ] }),
1417
+ step.status && step.status !== "empty" && /* @__PURE__ */ jsx(StatusIcon, { status: step.status })
1418
+ ]
1419
+ },
1420
+ step.key
1421
+ )) }),
1422
+ /* @__PURE__ */ jsxs("div", { className: "dybo-step-nav__progress", children: [
1423
+ /* @__PURE__ */ jsxs("div", { className: "dybo-step-nav__progress-row", children: [
1424
+ /* @__PURE__ */ jsx("span", { style: { opacity: 0.64, fontWeight: 500 }, children: "Overall Progress" }),
1425
+ /* @__PURE__ */ jsxs("span", { style: { fontWeight: 700 }, children: [
1426
+ progressPercent,
1427
+ "%"
1428
+ ] })
1429
+ ] }),
1430
+ /* @__PURE__ */ jsx("div", { className: "dybo-step-nav__progress-track", children: /* @__PURE__ */ jsx(
1431
+ "div",
1432
+ {
1433
+ className: "dybo-step-nav__progress-fill",
1434
+ style: { width: `${progressPercent}%` }
1435
+ }
1436
+ ) }),
1437
+ /* @__PURE__ */ jsx("p", { className: "dybo-step-nav__progress-note", children: progressLabel ?? `${filledCount} of ${steps.length} sections filled` })
1438
+ ] }),
1439
+ (onSaveExit || onContinue) && /* @__PURE__ */ jsxs("div", { className: "dybo-step-nav__actions", children: [
1440
+ onSaveExit && /* @__PURE__ */ jsx(
1441
+ "button",
1442
+ {
1443
+ type: "button",
1444
+ className: "dybo-btn dybo-btn--secondary",
1445
+ onClick: onSaveExit,
1446
+ children: "Save & Exit"
1447
+ }
1448
+ ),
1449
+ onContinue && /* @__PURE__ */ jsx(
1450
+ "button",
1451
+ {
1452
+ type: "button",
1453
+ className: "dybo-btn dybo-btn--primary",
1454
+ onClick: onContinue,
1455
+ children: continueLabel
1456
+ }
1457
+ )
1458
+ ] })
1459
+ ] });
1460
+ }
1461
+ var cx42 = (...c) => c.filter(Boolean).join(" ");
1462
+ function DocumentTypeGrid({ options, value, onChange, className }) {
1463
+ return /* @__PURE__ */ jsx("div", { className: cx42("dybo-doc-type-grid", className), children: options.map((opt) => /* @__PURE__ */ jsxs(
1464
+ "button",
1465
+ {
1466
+ type: "button",
1467
+ disabled: opt.disabled,
1468
+ className: cx42(
1469
+ "dybo-doc-type-card",
1470
+ opt.disabled ? "dybo-doc-type-card--disabled" : void 0
1471
+ ),
1472
+ onClick: () => onChange(opt.key),
1473
+ "aria-pressed": opt.key === value,
1474
+ children: [
1475
+ opt.icon,
1476
+ /* @__PURE__ */ jsx("span", { className: "dybo-doc-type-card__label", children: opt.label }),
1477
+ opt.disabled && /* @__PURE__ */ jsx(
1478
+ "span",
1479
+ {
1480
+ style: {
1481
+ position: "absolute",
1482
+ top: 8,
1483
+ right: 8,
1484
+ padding: "2px 6px",
1485
+ borderRadius: 999,
1486
+ background: "hsl(var(--warning-background))",
1487
+ color: "hsl(var(--warning))",
1488
+ fontSize: 10,
1489
+ fontWeight: 500
1490
+ },
1491
+ children: "Available Soon"
1492
+ }
1493
+ )
1494
+ ]
1495
+ },
1496
+ opt.key
1497
+ )) });
1498
+ }
1499
+ var cx43 = (...c) => c.filter(Boolean).join(" ");
1500
+ function FilePreviewCard({
1501
+ fileName,
1502
+ uploadedBy,
1503
+ uploadedAt,
1504
+ imageSrc,
1505
+ onPrev,
1506
+ onNext,
1507
+ hasPrev = false,
1508
+ hasNext = false,
1509
+ className
1510
+ }) {
1511
+ return /* @__PURE__ */ jsxs(
1512
+ "div",
1513
+ {
1514
+ className: cx43(className),
1515
+ style: { display: "flex", flexDirection: "column", gap: 8 },
1516
+ children: [
1517
+ (onPrev || onNext) && /* @__PURE__ */ jsxs("div", { className: "dybo-file-preview-pager", role: "group", "aria-label": "Recently added", children: [
1518
+ /* @__PURE__ */ jsx("button", { type: "button", disabled: !hasPrev, onClick: onPrev, "aria-label": "Previous file", children: /* @__PURE__ */ jsx(
1519
+ "svg",
1520
+ {
1521
+ width: "16",
1522
+ height: "16",
1523
+ viewBox: "0 0 24 24",
1524
+ fill: "none",
1525
+ stroke: "currentColor",
1526
+ strokeWidth: "2",
1527
+ strokeLinecap: "round",
1528
+ strokeLinejoin: "round",
1529
+ children: /* @__PURE__ */ jsx("path", { d: "M15 6l-6 6l6 6" })
1530
+ }
1531
+ ) }),
1532
+ /* @__PURE__ */ jsx("div", { style: { height: 16, width: 1, background: "hsl(var(--border) / 0.7)" } }),
1533
+ /* @__PURE__ */ jsx("button", { type: "button", disabled: !hasNext, onClick: onNext, "aria-label": "Next file", children: /* @__PURE__ */ jsx(
1534
+ "svg",
1535
+ {
1536
+ width: "16",
1537
+ height: "16",
1538
+ viewBox: "0 0 24 24",
1539
+ fill: "none",
1540
+ stroke: "currentColor",
1541
+ strokeWidth: "2",
1542
+ strokeLinecap: "round",
1543
+ strokeLinejoin: "round",
1544
+ children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6l-6 6" })
1545
+ }
1546
+ ) })
1547
+ ] }),
1548
+ /* @__PURE__ */ jsxs("div", { className: "dybo-file-preview", children: [
1549
+ /* @__PURE__ */ jsx("p", { className: "dybo-file-preview__name", title: fileName, children: fileName }),
1550
+ /* @__PURE__ */ jsxs("div", { className: "dybo-file-preview__meta", children: [
1551
+ /* @__PURE__ */ jsxs("p", { children: [
1552
+ "Uploaded by: ",
1553
+ uploadedBy
1554
+ ] }),
1555
+ /* @__PURE__ */ jsx("p", { children: uploadedAt })
1556
+ ] }),
1557
+ imageSrc && /* @__PURE__ */ jsx("div", { className: "dybo-file-preview__image", children: /* @__PURE__ */ jsx("img", { alt: "", src: imageSrc }) })
1558
+ ] })
1559
+ ]
1560
+ }
1561
+ );
1562
+ }
1563
+ var cx44 = (...c) => c.filter(Boolean).join(" ");
1564
+ function FileReviewRow({
1565
+ fileName,
1566
+ fileSize,
1567
+ fileType,
1568
+ classification,
1569
+ location,
1570
+ status,
1571
+ onView,
1572
+ onChangeLocation,
1573
+ onApprove,
1574
+ onReject,
1575
+ className
1576
+ }) {
1577
+ return /* @__PURE__ */ jsx("div", { className: cx44("dybo-file-review", className), children: /* @__PURE__ */ jsxs("div", { className: "dybo-file-review__main", children: [
1578
+ /* @__PURE__ */ jsx("span", { className: "dybo-file-review__icon", children: /* @__PURE__ */ jsxs(
1579
+ "svg",
1580
+ {
1581
+ width: "16",
1582
+ height: "16",
1583
+ viewBox: "0 0 24 24",
1584
+ fill: "none",
1585
+ stroke: "currentColor",
1586
+ strokeWidth: "2",
1587
+ strokeLinecap: "round",
1588
+ strokeLinejoin: "round",
1589
+ children: [
1590
+ /* @__PURE__ */ jsx("path", { d: "M14 3v4a1 1 0 0 0 1 1h4" }),
1591
+ /* @__PURE__ */ jsx("path", { d: "M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2" })
1592
+ ]
1593
+ }
1594
+ ) }),
1595
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 150 }, children: [
1596
+ /* @__PURE__ */ jsxs("div", { className: "dybo-file-review__name-row", children: [
1597
+ /* @__PURE__ */ jsx("span", { className: "dybo-file-review__name", children: fileName }),
1598
+ /* @__PURE__ */ jsxs("span", { className: "dybo-file-review__size", children: [
1599
+ fileSize,
1600
+ " \xB7 ",
1601
+ fileType
1602
+ ] })
1603
+ ] }),
1604
+ /* @__PURE__ */ jsxs("div", { className: "dybo-file-review__sub", children: [
1605
+ "Classified as ",
1606
+ classification,
1607
+ " \xB7 Location: ",
1608
+ location
1609
+ ] })
1610
+ ] }),
1611
+ /* @__PURE__ */ jsxs("div", { className: "dybo-file-review__actions", children: [
1612
+ status,
1613
+ onView && /* @__PURE__ */ jsx(
1614
+ "button",
1615
+ {
1616
+ type: "button",
1617
+ title: "View file",
1618
+ className: "dybo-file-review__ic",
1619
+ onClick: onView,
1620
+ children: /* @__PURE__ */ jsxs(
1621
+ "svg",
1622
+ {
1623
+ width: "16",
1624
+ height: "16",
1625
+ viewBox: "0 0 24 24",
1626
+ fill: "none",
1627
+ stroke: "currentColor",
1628
+ strokeWidth: "2",
1629
+ strokeLinecap: "round",
1630
+ strokeLinejoin: "round",
1631
+ children: [
1632
+ /* @__PURE__ */ jsx("path", { d: "M10 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0" }),
1633
+ /* @__PURE__ */ jsx("path", { d: "M21 12c-2.4 4-5.4 6-9 6s-6.6-2-9-6c2.4-4 5.4-6 9-6s6.6 2 9 6" })
1634
+ ]
1635
+ }
1636
+ )
1637
+ }
1638
+ ),
1639
+ onChangeLocation && /* @__PURE__ */ jsx(
1640
+ "button",
1641
+ {
1642
+ type: "button",
1643
+ title: "Change location",
1644
+ className: "dybo-file-review__ic",
1645
+ onClick: onChangeLocation,
1646
+ children: /* @__PURE__ */ jsx(
1647
+ "svg",
1648
+ {
1649
+ width: "16",
1650
+ height: "16",
1651
+ viewBox: "0 0 24 24",
1652
+ fill: "none",
1653
+ stroke: "currentColor",
1654
+ strokeWidth: "2",
1655
+ strokeLinecap: "round",
1656
+ strokeLinejoin: "round",
1657
+ children: /* @__PURE__ */ jsx("path", { d: "M5 4h4l3 3h7a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-14a1 1 0 0 1-1-1v-12a1 1 0 0 1 1-1" })
1658
+ }
1659
+ )
1660
+ }
1661
+ ),
1662
+ onApprove && /* @__PURE__ */ jsx(
1663
+ "button",
1664
+ {
1665
+ type: "button",
1666
+ title: "Approve",
1667
+ className: "dybo-file-review__ic dybo-file-review__ic--approve",
1668
+ onClick: onApprove,
1669
+ children: /* @__PURE__ */ jsx(
1670
+ "svg",
1671
+ {
1672
+ width: "16",
1673
+ height: "16",
1674
+ viewBox: "0 0 24 24",
1675
+ fill: "none",
1676
+ stroke: "currentColor",
1677
+ strokeWidth: "2",
1678
+ strokeLinecap: "round",
1679
+ strokeLinejoin: "round",
1680
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5l10 -10" })
1681
+ }
1682
+ )
1683
+ }
1684
+ ),
1685
+ onReject && /* @__PURE__ */ jsx(
1686
+ "button",
1687
+ {
1688
+ type: "button",
1689
+ title: "Reject",
1690
+ className: "dybo-file-review__ic dybo-file-review__ic--reject",
1691
+ onClick: onReject,
1692
+ children: /* @__PURE__ */ jsxs(
1693
+ "svg",
1694
+ {
1695
+ width: "16",
1696
+ height: "16",
1697
+ viewBox: "0 0 24 24",
1698
+ fill: "none",
1699
+ stroke: "currentColor",
1700
+ strokeWidth: "2",
1701
+ strokeLinecap: "round",
1702
+ strokeLinejoin: "round",
1703
+ children: [
1704
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
1705
+ /* @__PURE__ */ jsx("path", { d: "M8.5 8.5l7 7" })
1706
+ ]
1707
+ }
1708
+ )
1709
+ }
1710
+ )
1711
+ ] })
1712
+ ] }) });
1713
+ }
1714
+ var cx45 = (...c) => c.filter(Boolean).join(" ");
1715
+ function RejectionReasonPanel({
1716
+ reasons,
1717
+ selectedReasons,
1718
+ onToggleReason,
1719
+ note,
1720
+ onNoteChange,
1721
+ onCancel,
1722
+ onConfirm,
1723
+ className
1724
+ }) {
1725
+ return /* @__PURE__ */ jsxs("div", { className: cx45("dybo-reject-panel", className), children: [
1726
+ /* @__PURE__ */ jsx("span", { className: "dybo-reject-panel__label", children: "Why is this file being rejected?" }),
1727
+ /* @__PURE__ */ jsx("div", { className: "dybo-reason-chips", children: reasons.map((reason) => /* @__PURE__ */ jsx(
1728
+ "button",
1729
+ {
1730
+ type: "button",
1731
+ className: cx45(
1732
+ "dybo-reason-chip",
1733
+ selectedReasons.includes(reason.key) ? "dybo-reason-chip--on" : void 0
1734
+ ),
1735
+ onClick: () => onToggleReason(reason.key),
1736
+ children: reason.label
1737
+ },
1738
+ reason.key
1739
+ )) }),
1740
+ /* @__PURE__ */ jsx(
1741
+ "textarea",
1742
+ {
1743
+ rows: 2,
1744
+ placeholder: "Add a note (optional)",
1745
+ className: "dybo-reject-panel__note",
1746
+ value: note,
1747
+ onChange: (e) => onNoteChange(e.target.value)
1748
+ }
1749
+ ),
1750
+ /* @__PURE__ */ jsxs("div", { className: "dybo-reject-panel__footer", children: [
1751
+ /* @__PURE__ */ jsxs("span", { className: "dybo-reject-panel__notice", children: [
1752
+ /* @__PURE__ */ jsxs(
1753
+ "svg",
1754
+ {
1755
+ width: "14",
1756
+ height: "14",
1757
+ viewBox: "0 0 24 24",
1758
+ fill: "none",
1759
+ stroke: "currentColor",
1760
+ strokeWidth: "2",
1761
+ strokeLinecap: "round",
1762
+ strokeLinejoin: "round",
1763
+ children: [
1764
+ /* @__PURE__ */ jsx("path", { d: "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" }),
1765
+ /* @__PURE__ */ jsx("path", { d: "M9 17v1a3 3 0 0 0 6 0v-1" })
1766
+ ]
1767
+ }
1768
+ ),
1769
+ "The recipient will be notified with this reason."
1770
+ ] }),
1771
+ /* @__PURE__ */ jsxs("div", { className: "dybo-reject-panel__actions", children: [
1772
+ /* @__PURE__ */ jsx("button", { type: "button", className: "dybo-reject-btn", onClick: onCancel, children: "Cancel" }),
1773
+ /* @__PURE__ */ jsx(
1774
+ "button",
1775
+ {
1776
+ type: "button",
1777
+ className: "dybo-reject-btn dybo-reject-btn--solid",
1778
+ onClick: onConfirm,
1779
+ children: "Reject & send"
1780
+ }
1781
+ )
1782
+ ] })
1783
+ ] })
1784
+ ] });
1785
+ }
1786
+ var cx46 = (...c) => c.filter(Boolean).join(" ");
1787
+ var defaultLabels2 = {
1788
+ processing: "Processing",
1789
+ pending: "Pending",
1790
+ editing: "Editing",
1791
+ failed: "Failed"
1792
+ };
1793
+ function QueueStatusBadge({
1794
+ status,
1795
+ className,
1796
+ children,
1797
+ ...props
1798
+ }) {
1799
+ return /* @__PURE__ */ jsx(
1800
+ "span",
1801
+ {
1802
+ className: cx46("dybo-queue-status", `dybo-queue-status--${status}`, className),
1803
+ ...props,
1804
+ children: children ?? defaultLabels2[status]
1805
+ }
1806
+ );
1807
+ }
1808
+ var cx47 = (...c) => c.filter(Boolean).join(" ");
1809
+ function TicketCard({
1810
+ id,
1811
+ signals,
1812
+ priority,
1813
+ status,
1814
+ fields,
1815
+ selected = false,
1816
+ closed = false,
1817
+ href,
1818
+ onClick,
1819
+ className
1820
+ }) {
1821
+ const classes = cx47(
1822
+ "dybo-ticket-card",
1823
+ selected ? "dybo-ticket-card--selected" : void 0,
1824
+ closed ? "dybo-ticket-card--closed" : void 0,
1825
+ className
1826
+ );
1827
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
1828
+ /* @__PURE__ */ jsxs("div", { className: "dybo-ticket-card__top", children: [
1829
+ /* @__PURE__ */ jsxs("span", { className: "dybo-ticket-card__id", children: [
1830
+ "#",
1831
+ id
1832
+ ] }),
1833
+ /* @__PURE__ */ jsx("span", { style: { marginLeft: "auto" } }),
1834
+ signals,
1835
+ priority,
1836
+ status
1837
+ ] }),
1838
+ /* @__PURE__ */ jsx("div", { className: "dybo-ticket-card__fields", children: fields.map((field) => /* @__PURE__ */ jsxs("div", { className: "dybo-ticket-card__field", children: [
1839
+ /* @__PURE__ */ jsx("span", { className: "dybo-ticket-card__field-label", children: field.label }),
1840
+ /* @__PURE__ */ jsx("span", { className: "dybo-ticket-card__field-value", children: field.value })
1841
+ ] }, field.label)) })
1842
+ ] });
1843
+ if (href) {
1844
+ return /* @__PURE__ */ jsx("a", { href, className: classes, onClick, children: content });
1845
+ }
1846
+ return /* @__PURE__ */ jsx(
1847
+ "button",
1848
+ {
1849
+ type: "button",
1850
+ className: classes,
1851
+ onClick,
1852
+ style: { textAlign: "left", width: "100%" },
1853
+ children: content
1854
+ }
1855
+ );
1856
+ }
1857
+ var cx48 = (...c) => c.filter(Boolean).join(" ");
1858
+ function ChatMessage({ author, initials, timestamp, body, mine }) {
1859
+ return /* @__PURE__ */ jsxs("div", { className: cx48("dybo-chat-message", mine ? "dybo-chat-message--mine" : void 0), children: [
1860
+ /* @__PURE__ */ jsx("div", { className: "dybo-chat-message__avatar", children: initials }),
1861
+ /* @__PURE__ */ jsxs("div", { className: "dybo-chat-message__body", children: [
1862
+ /* @__PURE__ */ jsx("div", { className: "dybo-chat-message__meta", children: mine ? /* @__PURE__ */ jsxs(Fragment, { children: [
1863
+ /* @__PURE__ */ jsx("span", { className: "dybo-chat-message__time", children: timestamp }),
1864
+ /* @__PURE__ */ jsx("span", { className: "dybo-chat-message__author", children: author })
1865
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1866
+ /* @__PURE__ */ jsx("span", { className: "dybo-chat-message__author", children: author }),
1867
+ /* @__PURE__ */ jsx("span", { className: "dybo-chat-message__time", children: timestamp })
1868
+ ] }) }),
1869
+ /* @__PURE__ */ jsx("div", { className: "dybo-chat-message__bubble", children: body })
1870
+ ] })
1871
+ ] });
1872
+ }
1873
+ function ChatThread({ messages, className }) {
1874
+ return /* @__PURE__ */ jsx("div", { className: cx48(className), style: { display: "flex", flexDirection: "column", gap: 16 }, children: messages.map((message) => /* @__PURE__ */ jsx(ChatMessage, { ...message }, message.id)) });
1875
+ }
1876
+ var cx49 = (...c) => c.filter(Boolean).join(" ");
1877
+ function InternalNoteCard({
1878
+ author,
1879
+ timestamp,
1880
+ children,
1881
+ className
1882
+ }) {
1883
+ return /* @__PURE__ */ jsxs("div", { className: cx49("dybo-internal-note", className), children: [
1884
+ /* @__PURE__ */ jsxs("div", { className: "dybo-internal-note__head", children: [
1885
+ /* @__PURE__ */ jsx("span", { className: "dybo-internal-note__author", children: author }),
1886
+ /* @__PURE__ */ jsx("span", { className: "dybo-internal-note__time", children: timestamp })
1887
+ ] }),
1888
+ /* @__PURE__ */ jsx("p", { className: "dybo-internal-note__body", children })
1889
+ ] });
1890
+ }
1891
+ var cx50 = (...c) => c.filter(Boolean).join(" ");
1892
+ function ChannelBadge({ icon, label, className }) {
1893
+ return /* @__PURE__ */ jsxs("span", { className: cx50("dybo-channel-badge", className), children: [
1894
+ icon,
1895
+ label
1896
+ ] });
1897
+ }
1898
+ var cx51 = (...c) => c.filter(Boolean).join(" ");
1899
+ function SignalBadge({ variant, children, className }) {
1900
+ return /* @__PURE__ */ jsx("span", { className: cx51(`dybo-signal--${variant}`, className), children });
1901
+ }
1902
+ var cx52 = (...c) => c.filter(Boolean).join(" ");
1903
+ function CategoryLabel({ label, color, className }) {
1904
+ const style = color ? { "--lbl-c": color } : void 0;
1905
+ return /* @__PURE__ */ jsx("span", { className: cx52("dybo-label", className), style, children: label });
1906
+ }
1907
+ var cx53 = (...c) => c.filter(Boolean).join(" ");
1908
+ function LinkedAppIndicator({ icon, appName, className }) {
1909
+ if (!appName) {
1910
+ return /* @__PURE__ */ jsx("span", { className: cx53("dybo-linked-app--empty", className), children: "\u2013" });
1911
+ }
1912
+ return /* @__PURE__ */ jsxs("span", { className: cx53("dybo-linked-app", className), children: [
1913
+ icon,
1914
+ appName
1915
+ ] });
1916
+ }
603
1917
 
604
- export { Alert, AppShell, Badge, Button, Card, DataTable, IconRail, IconRailItem, Input, LoginCard, Modal, NavItem, NavSection, NavTabs, OverviewField, OverviewGrid, PriorityBadge, ScopeTabs, Select, Sidebar, Tabs, TicketStatusBadge, TopBar };
1918
+ export { Accordion, Alert, AppShell, Avatar, Badge, Banner, Button, Card, CategoryLabel, ChannelBadge, ChatMessage, ChatThread, DataTable, DateRangeTrigger, DocumentTypeGrid, Drawer, EmptyState, FilePreviewCard, FileReviewRow, FilterPills, IconRail, IconRailItem, Input, InternalNoteCard, KpiCard, KpiGrid, KpiStrip, LinkedAppIndicator, LoginCard, MetadataBadge, Modal, NavItem, NavSection, NavTabs, NotificationsButton, OrgEntitySelector, OverviewField, OverviewGrid, Pagination, PlatformSwitcher, PriorityBadge, QueueStatusBadge, ReadOnlyField, RejectionReasonPanel, ScopeTabs, SearchField, Select, Sidebar, SignalBadge, StepNavigator, Tabs, ThemeToggle, TicketCard, TicketStatusBadge, Toast, TopBar, UnderlineTabs, UploadDropzone, ViewToggle };
605
1919
  //# sourceMappingURL=index.js.map
606
1920
  //# sourceMappingURL=index.js.map