@ikatec/nebula-react 1.0.13 → 1.0.15

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
@@ -8,6 +8,7 @@ var jsxRuntime = require('react/jsx-runtime');
8
8
  var PopoverPrimitive = require('@radix-ui/react-popover');
9
9
  var LabelPrimitive = require('@radix-ui/react-label');
10
10
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
11
+ var lucideReact = require('lucide-react');
11
12
  var SeparatorPrimitive = require('@radix-ui/react-separator');
12
13
  var Select = require('react-select');
13
14
  var Creatable = require('react-select/creatable');
@@ -23,6 +24,9 @@ var TabsPrimitive = require('@radix-ui/react-tabs');
23
24
  var sonner = require('sonner');
24
25
  var RPNInput = require('react-phone-number-input');
25
26
  var flags = require('react-phone-number-input/flags');
27
+ var dateFns = require('date-fns');
28
+ var reactDayPicker = require('react-day-picker');
29
+ var locale = require('react-day-picker/locale');
26
30
 
27
31
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
28
32
 
@@ -435,14 +439,26 @@ var Label = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @_
435
439
  }
436
440
  ));
437
441
  Label.displayName = LabelPrimitive__namespace.Root.displayName;
438
- var Table = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds relative w-full overflow-auto border rounded-2xl border-table-border bg-table-background", children: /* @__PURE__ */ jsxRuntime.jsx(
439
- "table",
440
- {
441
- ref,
442
- className: cn("w-full caption-bottom text-sm", className),
443
- ...props
442
+ var Table = React8__namespace.forwardRef(({ className, noCardWrapper = false, ...props }, ref) => {
443
+ if (noCardWrapper) {
444
+ return /* @__PURE__ */ jsxRuntime.jsx(
445
+ "table",
446
+ {
447
+ ref,
448
+ className: cn("w-full caption-bottom text-sm", className),
449
+ ...props
450
+ }
451
+ );
444
452
  }
445
- ) }));
453
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds relative w-full overflow-auto border rounded-2xl border-table-border bg-table-background", children: /* @__PURE__ */ jsxRuntime.jsx(
454
+ "table",
455
+ {
456
+ ref,
457
+ className: cn("w-full caption-bottom text-sm", className),
458
+ ...props
459
+ }
460
+ ) });
461
+ });
446
462
  Table.displayName = "Table";
447
463
  var TableHeader = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
448
464
  TableHeader.displayName = "TableHeader";
@@ -469,7 +485,7 @@ var TableFooter = React8__namespace.forwardRef(({ className, ...props }, ref) =>
469
485
  TableFooter.displayName = "TableFooter";
470
486
  var variants2 = {
471
487
  variant: {
472
- first: "bg-table-cell-background-first-layer",
488
+ first: "bg-transparent",
473
489
  second: "bg-table-cell-background-second-layer"
474
490
  }
475
491
  };
@@ -523,193 +539,6 @@ var TableCell = React8__namespace.forwardRef(({ className, ...props }, ref) => /
523
539
  TableCell.displayName = "TableCell";
524
540
  var TableCaption = React8__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: cn("mt-4 text-sm", className), ...props }));
525
541
  TableCaption.displayName = "TableCaption";
526
-
527
- // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
528
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
529
- var mergeClasses = (...classes) => classes.filter((className, index, array) => {
530
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
531
- }).join(" ").trim();
532
-
533
- // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
534
- var defaultAttributes = {
535
- xmlns: "http://www.w3.org/2000/svg",
536
- width: 24,
537
- height: 24,
538
- viewBox: "0 0 24 24",
539
- fill: "none",
540
- stroke: "currentColor",
541
- strokeWidth: 2,
542
- strokeLinecap: "round",
543
- strokeLinejoin: "round"
544
- };
545
-
546
- // ../../node_modules/lucide-react/dist/esm/Icon.js
547
- var Icon = React8.forwardRef(
548
- ({
549
- color: color2 = "currentColor",
550
- size: size4 = 24,
551
- strokeWidth = 2,
552
- absoluteStrokeWidth,
553
- className = "",
554
- children,
555
- iconNode,
556
- ...rest
557
- }, ref) => {
558
- return React8.createElement(
559
- "svg",
560
- {
561
- ref,
562
- ...defaultAttributes,
563
- width: size4,
564
- height: size4,
565
- stroke: color2,
566
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
567
- className: mergeClasses("lucide", className),
568
- ...rest
569
- },
570
- [
571
- ...iconNode.map(([tag, attrs]) => React8.createElement(tag, attrs)),
572
- ...Array.isArray(children) ? children : [children]
573
- ]
574
- );
575
- }
576
- );
577
-
578
- // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
579
- var createLucideIcon = (iconName, iconNode) => {
580
- const Component = React8.forwardRef(
581
- ({ className, ...props }, ref) => React8.createElement(Icon, {
582
- ref,
583
- iconNode,
584
- className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
585
- ...props
586
- })
587
- );
588
- Component.displayName = `${iconName}`;
589
- return Component;
590
- };
591
-
592
- // ../../node_modules/lucide-react/dist/esm/icons/check.js
593
- var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
594
- var Check = createLucideIcon("Check", __iconNode);
595
-
596
- // ../../node_modules/lucide-react/dist/esm/icons/chevron-down.js
597
- var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
598
- var ChevronDown = createLucideIcon("ChevronDown", __iconNode2);
599
-
600
- // ../../node_modules/lucide-react/dist/esm/icons/chevron-left.js
601
- var __iconNode3 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
602
- var ChevronLeft = createLucideIcon("ChevronLeft", __iconNode3);
603
-
604
- // ../../node_modules/lucide-react/dist/esm/icons/chevron-right.js
605
- var __iconNode4 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
606
- var ChevronRight = createLucideIcon("ChevronRight", __iconNode4);
607
-
608
- // ../../node_modules/lucide-react/dist/esm/icons/chevrons-left.js
609
- var __iconNode5 = [
610
- ["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
611
- ["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
612
- ];
613
- var ChevronsLeft = createLucideIcon("ChevronsLeft", __iconNode5);
614
-
615
- // ../../node_modules/lucide-react/dist/esm/icons/chevrons-right.js
616
- var __iconNode6 = [
617
- ["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
618
- ["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
619
- ];
620
- var ChevronsRight = createLucideIcon("ChevronsRight", __iconNode6);
621
-
622
- // ../../node_modules/lucide-react/dist/esm/icons/circle-check-big.js
623
- var __iconNode7 = [
624
- ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
625
- ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
626
- ];
627
- var CircleCheckBig = createLucideIcon("CircleCheckBig", __iconNode7);
628
-
629
- // ../../node_modules/lucide-react/dist/esm/icons/circle-x.js
630
- var __iconNode8 = [
631
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
632
- ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
633
- ["path", { d: "m9 9 6 6", key: "z0biqf" }]
634
- ];
635
- var CircleX = createLucideIcon("CircleX", __iconNode8);
636
-
637
- // ../../node_modules/lucide-react/dist/esm/icons/circle.js
638
- var __iconNode9 = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
639
- var Circle = createLucideIcon("Circle", __iconNode9);
640
-
641
- // ../../node_modules/lucide-react/dist/esm/icons/ellipsis.js
642
- var __iconNode10 = [
643
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
644
- ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
645
- ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
646
- ];
647
- var Ellipsis = createLucideIcon("Ellipsis", __iconNode10);
648
-
649
- // ../../node_modules/lucide-react/dist/esm/icons/eye-off.js
650
- var __iconNode11 = [
651
- [
652
- "path",
653
- {
654
- d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
655
- key: "ct8e1f"
656
- }
657
- ],
658
- ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
659
- [
660
- "path",
661
- {
662
- d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
663
- key: "13bj9a"
664
- }
665
- ],
666
- ["path", { d: "m2 2 20 20", key: "1ooewy" }]
667
- ];
668
- var EyeOff = createLucideIcon("EyeOff", __iconNode11);
669
-
670
- // ../../node_modules/lucide-react/dist/esm/icons/eye.js
671
- var __iconNode12 = [
672
- [
673
- "path",
674
- {
675
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
676
- key: "1nclc0"
677
- }
678
- ],
679
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
680
- ];
681
- var Eye = createLucideIcon("Eye", __iconNode12);
682
-
683
- // ../../node_modules/lucide-react/dist/esm/icons/info.js
684
- var __iconNode13 = [
685
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
686
- ["path", { d: "M12 16v-4", key: "1dtifu" }],
687
- ["path", { d: "M12 8h.01", key: "e9boi3" }]
688
- ];
689
- var Info = createLucideIcon("Info", __iconNode13);
690
-
691
- // ../../node_modules/lucide-react/dist/esm/icons/minus.js
692
- var __iconNode14 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
693
- var Minus = createLucideIcon("Minus", __iconNode14);
694
-
695
- // ../../node_modules/lucide-react/dist/esm/icons/phone.js
696
- var __iconNode15 = [
697
- [
698
- "path",
699
- {
700
- d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",
701
- key: "foiqr5"
702
- }
703
- ]
704
- ];
705
- var Phone = createLucideIcon("Phone", __iconNode15);
706
-
707
- // ../../node_modules/lucide-react/dist/esm/icons/x.js
708
- var __iconNode16 = [
709
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
710
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
711
- ];
712
- var X = createLucideIcon("X", __iconNode16);
713
542
  var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
714
543
  var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
715
544
  var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
@@ -742,7 +571,7 @@ var DropdownMenuSubTrigger = React8__namespace.forwardRef(({ className, inset, c
742
571
  ...props,
743
572
  children: [
744
573
  children,
745
- /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "nebula-ds ml-auto size-4" })
574
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nebula-ds ml-auto size-4" })
746
575
  ]
747
576
  }
748
577
  ));
@@ -867,7 +696,7 @@ var DropdownMenuCheckboxItem = React8__namespace.forwardRef(({ className, childr
867
696
  checked,
868
697
  ...props,
869
698
  children: [
870
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { className: "nebula-ds absolute left-4 h-11 w-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Check, { className: "nebula-ds h-4 w-4" }) }),
699
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { className: "nebula-ds absolute left-4 h-11 w-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nebula-ds h-4 w-4" }) }),
871
700
  children
872
701
  ]
873
702
  }
@@ -903,7 +732,7 @@ var DropdownMenuRadioItem = React8__namespace.forwardRef(({ className, children,
903
732
  ),
904
733
  ...props,
905
734
  children: [
906
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { className: "nebula-ds absolute left-4 flex h-11 w-2 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Circle, { className: "nebula-ds h-2 w-2 fill-current" }) }),
735
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { className: "nebula-ds absolute left-4 flex h-11 w-2 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "nebula-ds h-2 w-2 fill-current" }) }),
907
736
  children
908
737
  ]
909
738
  }
@@ -1315,15 +1144,22 @@ var messages3 = {
1315
1144
  };
1316
1145
  var input_phone_default = messages3;
1317
1146
 
1147
+ // src/i18n/messages/en/time-picker.ts
1148
+ var messages4 = {
1149
+ label: "Time"
1150
+ };
1151
+ var time_picker_default = messages4;
1152
+
1318
1153
  // src/i18n/messages/en/index.ts
1319
1154
  var enMessages = {
1320
1155
  pagination: pagination_default,
1321
1156
  inputSelect: input_select_default,
1322
- inputPhone: input_phone_default
1157
+ inputPhone: input_phone_default,
1158
+ timePicker: time_picker_default
1323
1159
  };
1324
1160
 
1325
1161
  // src/i18n/messages/es/pagination.ts
1326
- var messages4 = {
1162
+ var messages5 = {
1327
1163
  totalResultsLabel(pagesSize, totalResults) {
1328
1164
  if (totalResults < pagesSize) {
1329
1165
  pagesSize = totalResults;
@@ -1334,16 +1170,16 @@ var messages4 = {
1334
1170
  return `P\xE1gina ${currentPage} de ${totalPages}`;
1335
1171
  }
1336
1172
  };
1337
- var pagination_default2 = messages4;
1173
+ var pagination_default2 = messages5;
1338
1174
 
1339
1175
  // src/i18n/messages/es/input-select.ts
1340
- var messages5 = {
1176
+ var messages6 = {
1341
1177
  noOptions: "No hay opciones disponibles"
1342
1178
  };
1343
- var input_select_default2 = messages5;
1179
+ var input_select_default2 = messages6;
1344
1180
 
1345
1181
  // src/i18n/messages/es/input-phone.ts
1346
- var messages6 = {
1182
+ var messages7 = {
1347
1183
  countries: {
1348
1184
  empty: "Seleccionar",
1349
1185
  AF: "Afganist\xE1n",
@@ -1593,17 +1429,24 @@ var messages6 = {
1593
1429
  ZW: "Zimbabue"
1594
1430
  }
1595
1431
  };
1596
- var input_phone_default2 = messages6;
1432
+ var input_phone_default2 = messages7;
1433
+
1434
+ // src/i18n/messages/es/time-picker.ts
1435
+ var messages8 = {
1436
+ label: "Tiempo"
1437
+ };
1438
+ var time_picker_default2 = messages8;
1597
1439
 
1598
1440
  // src/i18n/messages/es/index.ts
1599
1441
  var esMessages = {
1600
1442
  pagination: pagination_default2,
1601
1443
  inputSelect: input_select_default2,
1602
- inputPhone: input_phone_default2
1444
+ inputPhone: input_phone_default2,
1445
+ timePicker: time_picker_default2
1603
1446
  };
1604
1447
 
1605
1448
  // src/i18n/messages/pt-br/pagination.ts
1606
- var messages7 = {
1449
+ var messages9 = {
1607
1450
  totalResultsLabel(pagesSize, totalResults) {
1608
1451
  if (totalResults < pagesSize) {
1609
1452
  pagesSize = totalResults;
@@ -1614,16 +1457,16 @@ var messages7 = {
1614
1457
  return `P\xE1gina ${currentPage} de ${totalPages}`;
1615
1458
  }
1616
1459
  };
1617
- var pagination_default3 = messages7;
1460
+ var pagination_default3 = messages9;
1618
1461
 
1619
1462
  // src/i18n/messages/pt-br/input-select.ts
1620
- var messages8 = {
1463
+ var messages10 = {
1621
1464
  noOptions: "Nenhuma op\xE7\xE3o dispon\xEDvel"
1622
1465
  };
1623
- var input_select_default3 = messages8;
1466
+ var input_select_default3 = messages10;
1624
1467
 
1625
1468
  // src/i18n/messages/pt-br/input-phone.ts
1626
- var messages9 = {
1469
+ var messages11 = {
1627
1470
  countries: {
1628
1471
  empty: "Selecione",
1629
1472
  AF: "Afeganist\xE3o",
@@ -1873,13 +1716,20 @@ var messages9 = {
1873
1716
  ZW: "Zimb\xE1bue"
1874
1717
  }
1875
1718
  };
1876
- var input_phone_default3 = messages9;
1719
+ var input_phone_default3 = messages11;
1720
+
1721
+ // src/i18n/messages/pt-br/time-picker.ts
1722
+ var messages12 = {
1723
+ label: "Hor\xE1rio"
1724
+ };
1725
+ var time_picker_default3 = messages12;
1877
1726
 
1878
1727
  // src/i18n/messages/pt-br/index.ts
1879
1728
  var ptBrMessages = {
1880
1729
  pagination: pagination_default3,
1881
1730
  inputSelect: input_select_default3,
1882
- inputPhone: input_phone_default3
1731
+ inputPhone: input_phone_default3,
1732
+ timePicker: time_picker_default3
1883
1733
  };
1884
1734
 
1885
1735
  // src/i18n/message-storage-handler.ts
@@ -1904,7 +1754,7 @@ var setNebulaLanguage = (language) => {
1904
1754
  }
1905
1755
  localStorage.setItem(getNebulaI18nStorageKey(), language);
1906
1756
  };
1907
- var messages10 = /* @__PURE__ */ new Map([
1757
+ var messages13 = /* @__PURE__ */ new Map([
1908
1758
  [null, enMessages],
1909
1759
  [void 0, enMessages],
1910
1760
  ["en-US", enMessages],
@@ -1922,14 +1772,14 @@ var NebulaI18nProvider = ({
1922
1772
  () => customI18nStorageKey ?? localStorageKey,
1923
1773
  [customI18nStorageKey]
1924
1774
  );
1925
- const [messages11, setMessages] = React8.useState(
1926
- messages10.get(getNebulaLanguage()) ?? messages10.get("en-US")
1775
+ const [messages14, setMessages] = React8.useState(
1776
+ messages13.get(getNebulaLanguage()) ?? messages13.get("en-US")
1927
1777
  );
1928
1778
  const handleStorageChange = React8.useCallback(
1929
1779
  ({ detail }) => {
1930
1780
  if (detail.key === storageKey) {
1931
1781
  setMessages(
1932
- messages10.get(detail.value) ?? messages10.get("en-US")
1782
+ messages13.get(detail.value) ?? messages13.get("en-US")
1933
1783
  );
1934
1784
  }
1935
1785
  },
@@ -1969,7 +1819,16 @@ var NebulaI18nProvider = ({
1969
1819
  localStorage.removeItem(localStorageKey);
1970
1820
  localStorage.setItem(customNebulaI18nStorageKey, customI18nStorageKey);
1971
1821
  }, [customI18nStorageKey]);
1972
- return /* @__PURE__ */ jsxRuntime.jsx(NebulaI18nContext.Provider, { value: { messages: messages11 }, children });
1822
+ return /* @__PURE__ */ jsxRuntime.jsx(
1823
+ NebulaI18nContext.Provider,
1824
+ {
1825
+ value: {
1826
+ messages: messages14,
1827
+ locale: getNebulaLanguage()
1828
+ },
1829
+ children
1830
+ }
1831
+ );
1973
1832
  };
1974
1833
  var useNebulaI18n = () => {
1975
1834
  const context = React8.useContext(NebulaI18nContext);
@@ -1986,7 +1845,7 @@ var Pagination = ({
1986
1845
  onChangePage,
1987
1846
  ...props
1988
1847
  }) => {
1989
- const { messages: messages11 } = useNebulaI18n();
1848
+ const { messages: messages14 } = useNebulaI18n();
1990
1849
  const totalPages = React8.useMemo(() => {
1991
1850
  return Math.ceil(total / (pageSize || 1));
1992
1851
  }, [total, pageSize]);
@@ -2019,13 +1878,13 @@ var Pagination = ({
2019
1878
  }, [totalPages, pageSize, total]);
2020
1879
  const totalResultsLabel = React8.useMemo(() => {
2021
1880
  if (page === totalPages) {
2022
- return messages11.pagination.totalResultsLabel(lastPageSize, total);
1881
+ return messages14.pagination.totalResultsLabel(lastPageSize, total);
2023
1882
  }
2024
- return messages11.pagination.totalResultsLabel(pageSize, total);
2025
- }, [messages11.pagination, pageSize, total, page, totalPages, lastPageSize]);
1883
+ return messages14.pagination.totalResultsLabel(pageSize, total);
1884
+ }, [messages14.pagination, pageSize, total, page, totalPages, lastPageSize]);
2026
1885
  const currentPageLabel = React8.useMemo(
2027
- () => messages11.pagination.currentPageLabel(normalizedPage, totalPages),
2028
- [messages11.pagination, normalizedPage, totalPages]
1886
+ () => messages14.pagination.currentPageLabel(normalizedPage, totalPages),
1887
+ [messages14.pagination, normalizedPage, totalPages]
2029
1888
  );
2030
1889
  return /* @__PURE__ */ jsxRuntime.jsxs(
2031
1890
  "nav",
@@ -2145,7 +2004,7 @@ var PaginationButtonFirstPage = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx
2145
2004
  "aria-label": "Go to previous chunk",
2146
2005
  "data-testid": "nebula-pagination-button-first-page",
2147
2006
  ...props,
2148
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronsLeft, { className: "nebula-ds h-4 w-4" })
2007
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsLeft, { className: "nebula-ds h-4 w-4" })
2149
2008
  }
2150
2009
  );
2151
2010
  PaginationButtonFirstPage.displayName = "PaginationButtonFirstPage";
@@ -2157,7 +2016,7 @@ var PaginationButtonPreviousPage = ({
2157
2016
  "aria-label": "Go to previous page",
2158
2017
  "data-testid": "nebula-pagination-button-previous-page",
2159
2018
  ...props,
2160
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft, { className: "nebula-ds h-4" })
2019
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "nebula-ds h-4" })
2161
2020
  }
2162
2021
  );
2163
2022
  PaginationButtonPreviousPage.displayName = "PaginationButtonPreviousPage";
@@ -2169,7 +2028,7 @@ var PaginationButtonNextPage = ({
2169
2028
  "aria-label": "Go to next page",
2170
2029
  "data-testid": "nebula-pagination-button-next-page",
2171
2030
  ...props,
2172
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "nebula-ds h-4" })
2031
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "nebula-ds h-4" })
2173
2032
  }
2174
2033
  );
2175
2034
  PaginationButtonNextPage.displayName = "PaginationButtonNextPage";
@@ -2179,7 +2038,7 @@ var PaginationButtonLastPage = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
2179
2038
  "aria-label": "Go to next chunk",
2180
2039
  "data-testid": "nebula-pagination-button-last-page",
2181
2040
  ...props,
2182
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronsRight, { className: "nebula-ds h-4 w-4" })
2041
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsRight, { className: "nebula-ds h-4 w-4" })
2183
2042
  }
2184
2043
  );
2185
2044
  PaginationButtonLastPage.displayName = "PaginationButtonLastPage";
@@ -2219,23 +2078,23 @@ var Tag = React8__namespace.forwardRef(
2219
2078
  children: [
2220
2079
  color2 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(tagVariantsConfig({ color: color2 })) }),
2221
2080
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds text-tag-text text-xs font-medium px-1 leading-none", children }),
2222
- onDelete && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onDelete, children: /* @__PURE__ */ jsxRuntime.jsx(CircleX, { className: "nebula-ds w-3 h-3 block rounded-sm text-tag-icon" }) })
2081
+ onDelete && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onDelete, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { className: "nebula-ds w-3 h-3 block rounded-sm text-tag-icon" }) })
2223
2082
  ]
2224
2083
  }
2225
2084
  );
2226
2085
  }
2227
2086
  );
2228
2087
  Tag.displayName = "Tag";
2229
- var DropdownIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: "16px" }) });
2088
+ var DropdownIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: "16px" }) });
2230
2089
  var ClearIndicator = (props) => /* @__PURE__ */ jsxRuntime.jsx(
2231
2090
  Select.components.ClearIndicator,
2232
2091
  {
2233
2092
  ...props,
2234
2093
  className: cn(props.className, "cursor-pointer"),
2235
- children: /* @__PURE__ */ jsxRuntime.jsx(X, { size: "16px" })
2094
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: "16px" })
2236
2095
  }
2237
2096
  );
2238
- var MultiValueRemove = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(CircleX, { size: "16px" }) });
2097
+ var MultiValueRemove = (props) => /* @__PURE__ */ jsxRuntime.jsx(Select.components.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { size: "16px" }) });
2239
2098
  var Option = (props) => {
2240
2099
  const { isSelected, data, innerRef, innerProps } = props;
2241
2100
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2261,7 +2120,7 @@ var Option = (props) => {
2261
2120
  }
2262
2121
  ),
2263
2122
  children: [
2264
- isSelected && /* @__PURE__ */ jsxRuntime.jsx(Check, { size: "16px" }),
2123
+ isSelected && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: "16px" }),
2265
2124
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: data.label })
2266
2125
  ]
2267
2126
  }
@@ -2298,7 +2157,7 @@ var createStyledSelect = (BaseSelect, displayName) => {
2298
2157
  isError = false,
2299
2158
  ...props
2300
2159
  }) => {
2301
- const { messages: messages11 } = useNebulaI18n();
2160
+ const { messages: messages14 } = useNebulaI18n();
2302
2161
  const customClassNames = React8.useMemo(() => {
2303
2162
  return {
2304
2163
  control: (props2) => controlStyles(props2, isError),
@@ -2345,7 +2204,7 @@ var createStyledSelect = (BaseSelect, displayName) => {
2345
2204
  isDisabled: disabled,
2346
2205
  components: customComponents,
2347
2206
  classNames: customClassNames,
2348
- noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children: messages11.inputSelect.noOptions }),
2207
+ noOptionsMessage: () => /* @__PURE__ */ jsxRuntime.jsx("p", { children: messages14.inputSelect.noOptions }),
2349
2208
  ...props
2350
2209
  }
2351
2210
  );
@@ -2361,7 +2220,15 @@ var StyledAsyncCreatable = createStyledSelect(
2361
2220
  "AsyncCreatable"
2362
2221
  );
2363
2222
  var InputText = React8__namespace.forwardRef(
2364
- ({ className, icon, isError = false, onClean, ...props }, ref) => {
2223
+ ({
2224
+ className,
2225
+ icon,
2226
+ isError = false,
2227
+ onClean,
2228
+ iconPlacement = "start",
2229
+ disabled,
2230
+ ...props
2231
+ }, ref) => {
2365
2232
  const initialInputType = props.type || "text";
2366
2233
  const [type, setType] = React8__namespace.useState(initialInputType);
2367
2234
  const iconClass = {
@@ -2369,60 +2236,79 @@ var InputText = React8__namespace.forwardRef(
2369
2236
  "text-inputText-icon-default focus:text-inputText-icon-focus": !isError && !props.value,
2370
2237
  "text-inputText-icon-filled focus:text-inputText-icon-filled": !isError && !!props.value
2371
2238
  };
2372
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds relative w-full", children: [
2373
- icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds absolute left-4 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(
2374
- "span",
2375
- {
2376
- className: cn(
2377
- "w-4 h-4 flex items-center justify-center disabled:text-inputText-icon-disabled",
2378
- iconClass
2239
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2240
+ "div",
2241
+ {
2242
+ className: cn("relative w-full", {
2243
+ "pointer-events-none": disabled
2244
+ }),
2245
+ children: [
2246
+ /* @__PURE__ */ jsxRuntime.jsx(
2247
+ "input",
2248
+ {
2249
+ ref,
2250
+ className: cn(
2251
+ "w-full h-10 outline-none rounded-input text-sm leading-none font-medium",
2252
+ "bg-inputText-background-default disabled:bg-inputText-background-disabled",
2253
+ "border border-inputText-border-default focus:ring-[3px] focus:ring-inputText-border-focus focus:border-inputText-border-focus",
2254
+ "text-inputText-text-filled focus:text-inputText-text-focus placeholder:text-inputText-text-default disabled:text-inputText-text-disabled",
2255
+ "disabled:cursor-not-allowed",
2256
+ {
2257
+ "pl-10 pr-4": !!icon && iconPlacement === "start",
2258
+ "pr-10 pl-4": !!icon && iconPlacement === "end" && initialInputType !== "password",
2259
+ "px-4": !icon,
2260
+ "border-inputText-border-danger focus:border-inputText-border-danger focus:ring-button-danger-border-focus": isError
2261
+ },
2262
+ className
2263
+ ),
2264
+ ...props,
2265
+ disabled,
2266
+ type
2267
+ }
2379
2268
  ),
2380
- children: icon
2381
- }
2382
- ) }),
2383
- /* @__PURE__ */ jsxRuntime.jsx(
2384
- "input",
2385
- {
2386
- ref,
2387
- className: cn(
2388
- "w-full h-10 outline-none rounded-input text-sm leading-none font-medium",
2389
- "bg-inputText-background-default disabled:bg-inputText-background-disabled",
2390
- "border border-inputText-border-default focus:ring-[3px] focus:ring-inputText-border-focus focus:border-inputText-border-focus",
2391
- "text-inputText-text-filled focus:text-inputText-text-focus placeholder:text-inputText-text-default disabled:text-inputText-text-disabled",
2392
- "disabled:cursor-not-allowed",
2269
+ onClean && props.value && /* @__PURE__ */ jsxRuntime.jsx(
2270
+ "button",
2393
2271
  {
2394
- "pl-10 pr-4": !!icon,
2395
- "px-4": !icon,
2396
- "border-inputText-border-danger focus:border-inputText-border-danger focus:ring-button-danger-border-focus": isError
2397
- },
2398
- className
2272
+ type: "button",
2273
+ className: cn("absolute top-1/2 transform -translate-y-1/2", {
2274
+ "right-10": initialInputType === "password" || iconPlacement === "end",
2275
+ "right-4": initialInputType === "text" && iconPlacement === "start"
2276
+ }),
2277
+ onClick: onClean,
2278
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { className: cn("w-4 h-4", iconClass) })
2279
+ }
2399
2280
  ),
2400
- ...props,
2401
- type
2402
- }
2403
- ),
2404
- onClean && props.value && /* @__PURE__ */ jsxRuntime.jsx(
2405
- "button",
2406
- {
2407
- type: "button",
2408
- className: cn("absolute top-1/2 transform -translate-y-1/2", {
2409
- "right-10": initialInputType === "password",
2410
- "right-4": initialInputType === "text"
2411
- }),
2412
- onClick: onClean,
2413
- children: /* @__PURE__ */ jsxRuntime.jsx(CircleX, { className: cn("w-4 h-4", iconClass) })
2414
- }
2415
- ),
2416
- initialInputType === "password" && /* @__PURE__ */ jsxRuntime.jsx(
2417
- "button",
2418
- {
2419
- type: "button",
2420
- className: "nebula-ds absolute right-4 top-1/2 transform -translate-y-1/2",
2421
- onClick: () => setType((prev) => prev === "text" ? "password" : "text"),
2422
- children: type === "text" ? /* @__PURE__ */ jsxRuntime.jsx(Eye, { className: cn("w-4 h-4", iconClass) }) : /* @__PURE__ */ jsxRuntime.jsx(EyeOff, { className: cn("w-4 h-4", iconClass) })
2423
- }
2424
- )
2425
- ] });
2281
+ initialInputType === "password" && /* @__PURE__ */ jsxRuntime.jsx(
2282
+ "button",
2283
+ {
2284
+ type: "button",
2285
+ className: "nebula-ds absolute right-4 top-1/2 transform -translate-y-1/2",
2286
+ onClick: () => setType((prev) => prev === "text" ? "password" : "text"),
2287
+ children: type === "text" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: cn("w-4 h-4", iconClass) }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: cn("w-4 h-4", iconClass) })
2288
+ }
2289
+ ),
2290
+ icon && /* @__PURE__ */ jsxRuntime.jsx(
2291
+ "span",
2292
+ {
2293
+ className: cn("absolute top-1/2 transform -translate-y-1/2", {
2294
+ "left-4": iconPlacement === "start",
2295
+ "right-4": iconPlacement === "end" && initialInputType !== "password"
2296
+ }),
2297
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2298
+ "span",
2299
+ {
2300
+ className: cn(
2301
+ "w-4 h-4 flex items-center justify-center disabled:text-inputText-icon-disabled",
2302
+ iconClass
2303
+ ),
2304
+ children: icon
2305
+ }
2306
+ )
2307
+ }
2308
+ )
2309
+ ]
2310
+ }
2311
+ );
2426
2312
  }
2427
2313
  );
2428
2314
  InputText.displayName = "InputText";
@@ -2496,7 +2382,7 @@ var DialogContent = React8__namespace.forwardRef(({ className, children, portal
2496
2382
  right-4
2497
2383
  top-4`,
2498
2384
  children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", icon: true, children: [
2499
- /* @__PURE__ */ jsxRuntime.jsx(X, { className: "nebula-ds !h-4 !w-4 !text-dialog-icon" }),
2385
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "nebula-ds !h-4 !w-4 !text-dialog-icon" }),
2500
2386
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds sr-only", children: "Close" })
2501
2387
  ] })
2502
2388
  }
@@ -2687,7 +2573,7 @@ var Checkbox = React8__namespace.forwardRef(({ className, ...props }, ref) => /*
2687
2573
  CheckboxPrimitive__namespace.Indicator,
2688
2574
  {
2689
2575
  className: cn("flex items-center justify-center text-current"),
2690
- children: props.variant === "multiselect" ? /* @__PURE__ */ jsxRuntime.jsx(Minus, { className: "nebula-ds h-3 w-3" }) : /* @__PURE__ */ jsxRuntime.jsx(Check, { className: "nebula-ds h-3 w-3" })
2576
+ children: props.variant === "multiselect" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "nebula-ds h-3 w-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "nebula-ds h-3 w-3" })
2691
2577
  }
2692
2578
  )
2693
2579
  }
@@ -2749,7 +2635,7 @@ var DrawerHeader = ({
2749
2635
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds bg-drawer-header-background text-drawer-header-title flex w-full min-h-16 items-start gap-2 p-4 border-b border-drawer-header-border", children: [
2750
2636
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex gap-2", children: [
2751
2637
  /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { size: "sm", variant: "ghost", icon: true, tabIndex: -1, children: [
2752
- /* @__PURE__ */ jsxRuntime.jsx(X, { className: "nebula-ds !h-4 !w-4" }),
2638
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "nebula-ds !h-4 !w-4" }),
2753
2639
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds sr-only", children: "Close" })
2754
2640
  ] }) }),
2755
2641
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2877,7 +2763,7 @@ var BreadcrumbSeparator = ({
2877
2763
  "aria-hidden": "true",
2878
2764
  className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
2879
2765
  ...props,
2880
- children: children ?? /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, {})
2766
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, {})
2881
2767
  }
2882
2768
  );
2883
2769
  BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
@@ -2895,7 +2781,7 @@ var BreadcrumbEllipsis = ({
2895
2781
  ),
2896
2782
  ...props,
2897
2783
  children: [
2898
- /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { className: "nebula-ds h-3 w-3" }),
2784
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "nebula-ds h-3 w-3" }),
2899
2785
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds sr-only", children: "More" })
2900
2786
  ]
2901
2787
  }
@@ -3048,7 +2934,7 @@ function AccordionTrigger({
3048
2934
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3049
2935
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds flex flex-col gap-2", children }),
3050
2936
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds flex items-center justify-center w-5 h-5", children: /* @__PURE__ */ jsxRuntime.jsx(
3051
- ChevronDown,
2937
+ lucideReact.ChevronDown,
3052
2938
  {
3053
2939
  "data-slot": "accordion-icon",
3054
2940
  className: "nebula-ds text-accordion-icon w-4 h-4"
@@ -3218,6 +3104,7 @@ var Box = ({
3218
3104
  "bg-box-background-secondary": variant3 === "secondary"
3219
3105
  },
3220
3106
  {
3107
+ "p-0": paddingSize === "none",
3221
3108
  "p-4": paddingSize === "sm",
3222
3109
  "p-6": paddingSize === "md",
3223
3110
  "p-8": paddingSize === "lg",
@@ -3251,9 +3138,9 @@ function ToastComponent({
3251
3138
  size: 20
3252
3139
  }) : null;
3253
3140
  const typeIcons = {
3254
- success: /* @__PURE__ */ jsxRuntime.jsx(CircleCheckBig, { className: "nebula-ds text-toast-icon-default", size: 20 }),
3255
- error: /* @__PURE__ */ jsxRuntime.jsx(CircleX, { className: "nebula-ds text-toast-icon-error", size: 20 }),
3256
- info: /* @__PURE__ */ jsxRuntime.jsx(Info, { className: "nebula-ds text-toast-icon-default", size: 20 }),
3141
+ success: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckBig, { className: "nebula-ds text-toast-icon-default", size: 20 }),
3142
+ error: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleX, { className: "nebula-ds text-toast-icon-error", size: 20 }),
3143
+ info: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "nebula-ds text-toast-icon-default", size: 20 }),
3257
3144
  custom: CustomIcon
3258
3145
  };
3259
3146
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds w-[400px] bg-toast-background border border-toast-border rounded-xl p-4 flex items-start justify-start gap-2 shadow-md", children: [
@@ -3273,7 +3160,7 @@ function ToastComponent({
3273
3160
  }
3274
3161
  ) })
3275
3162
  ] }),
3276
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => sonner.toast.dismiss(t), children: /* @__PURE__ */ jsxRuntime.jsx(X, { className: "nebula-ds text-toast-icon-default", size: 20 }) })
3163
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => sonner.toast.dismiss(t), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "nebula-ds text-toast-icon-default", size: 20 }) })
3277
3164
  ] });
3278
3165
  }
3279
3166
  function success(message, options) {
@@ -3320,13 +3207,13 @@ function custom(message, options) {
3320
3207
  }
3321
3208
  );
3322
3209
  }
3323
- async function promise(promise2, messages11, options) {
3210
+ async function promise(promise2, messages14, options) {
3324
3211
  const loadingToast = sonner.toast.custom(
3325
3212
  (t) => /* @__PURE__ */ jsxRuntime.jsx(
3326
3213
  ToastComponent,
3327
3214
  {
3328
3215
  type: "info",
3329
- message: messages11.loading,
3216
+ message: messages14.loading,
3330
3217
  options,
3331
3218
  t
3332
3219
  }
@@ -3340,7 +3227,7 @@ async function promise(promise2, messages11, options) {
3340
3227
  ToastComponent,
3341
3228
  {
3342
3229
  type: "success",
3343
- message: messages11.success,
3230
+ message: messages14.success,
3344
3231
  options,
3345
3232
  t
3346
3233
  }
@@ -3355,7 +3242,7 @@ async function promise(promise2, messages11, options) {
3355
3242
  ToastComponent,
3356
3243
  {
3357
3244
  type: "error",
3358
- message: messages11.error,
3245
+ message: messages14.error,
3359
3246
  options,
3360
3247
  t
3361
3248
  }
@@ -3525,12 +3412,12 @@ var CountrySelect = ({
3525
3412
  const handleSelect = (event) => {
3526
3413
  onChange(event.target.value);
3527
3414
  };
3528
- const { messages: messages11 } = useNebulaI18n();
3529
- const { countries } = messages11.inputPhone;
3415
+ const { messages: messages14 } = useNebulaI18n();
3416
+ const { countries } = messages14.inputPhone;
3530
3417
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds rounded-s-[20px] relative inline-flex items-center self-stretch py-2 ps-4 pe-2 transition-[color,box-shadow] outline-none has-disabled:pointer-events-none has-disabled:opacity-50", children: [
3531
3418
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds inline-flex items-center gap-1", "aria-hidden": "true", children: [
3532
3419
  /* @__PURE__ */ jsxRuntime.jsx(FlagComponent, { country: value, countryName: value, "aria-hidden": "true" }),
3533
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds text-inputText-text-filled focus:text-inputText-text-focus", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 16, "aria-hidden": "true" }) })
3420
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds text-inputText-text-filled focus:text-inputText-text-focus", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { size: 16, "aria-hidden": "true" }) })
3534
3421
  ] }),
3535
3422
  /* @__PURE__ */ jsxRuntime.jsxs(
3536
3423
  "select",
@@ -3554,7 +3441,7 @@ var CountrySelect = ({
3554
3441
  };
3555
3442
  var FlagComponent = ({ country, countryName }) => {
3556
3443
  const Flag = flags__default.default[country];
3557
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds w-5 overflow-hidden rounded-sm", children: Flag ? /* @__PURE__ */ jsxRuntime.jsx(Flag, { title: countryName }) : /* @__PURE__ */ jsxRuntime.jsx(Phone, { size: 16, "aria-hidden": "true" }) });
3444
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds w-5 overflow-hidden rounded-sm", children: Flag ? /* @__PURE__ */ jsxRuntime.jsx(Flag, { title: countryName }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PhoneIcon, { size: 16, "aria-hidden": "true" }) });
3558
3445
  };
3559
3446
  var PhoneInput = React8__namespace.default.forwardRef(({ className, ...props }, ref) => {
3560
3447
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex items-center justify-center rounded-e-[20px] w-full", children: [
@@ -3662,6 +3549,741 @@ var Skeleton = React8__namespace.default.forwardRef(
3662
3549
  }
3663
3550
  );
3664
3551
  Skeleton.displayName = "Skeleton";
3552
+ var MONTHS = [
3553
+ "01/01",
3554
+ "02/01",
3555
+ "03/01",
3556
+ "04/01",
3557
+ "05/01",
3558
+ "06/01",
3559
+ "07/01",
3560
+ "08/01",
3561
+ "09/01",
3562
+ "10/01",
3563
+ "11/01",
3564
+ "12/01"
3565
+ ];
3566
+ var localeByi18nKey = {
3567
+ es: locale.es,
3568
+ "en-US": locale.enUS,
3569
+ "pt-BR": locale.ptBR
3570
+ };
3571
+ var Calendar = ({
3572
+ numberOfMonths = 1,
3573
+ hideNavigation = false,
3574
+ month,
3575
+ onNextClick,
3576
+ onPrevClick,
3577
+ components: calendarComponents,
3578
+ ...props
3579
+ }) => {
3580
+ const { locale } = useNebulaI18n();
3581
+ const [selectedMonth, setSelectedMonth] = React8.useState(/* @__PURE__ */ new Date());
3582
+ const [showMonthGridSelection, setShowMonthGridSelection] = React8.useState(false);
3583
+ const isRange = props.mode === "range";
3584
+ const currentMonth = React8.useMemo(
3585
+ () => month ?? selectedMonth,
3586
+ [month, selectedMonth]
3587
+ );
3588
+ const handleSelectMonthByOption = React8.useCallback(
3589
+ (monthOption) => {
3590
+ setShowMonthGridSelection(false);
3591
+ const calendarDate = currentMonth;
3592
+ currentMonth.setMonth(monthOption.getMonth());
3593
+ if (typeof month !== "undefined") {
3594
+ onNextClick?.(calendarDate);
3595
+ } else {
3596
+ setSelectedMonth(calendarDate);
3597
+ }
3598
+ },
3599
+ [currentMonth, month, onNextClick]
3600
+ );
3601
+ const components2 = React8.useMemo(() => {
3602
+ return {
3603
+ Day(props2) {
3604
+ const {
3605
+ selected,
3606
+ range_end: rangeEnd,
3607
+ range_start: rangeStart
3608
+ } = props2.modifiers;
3609
+ const isSaturday = props2.day.date.getDay() === 0;
3610
+ const isSunday = props2.day.date.getDay() === 6;
3611
+ return /* @__PURE__ */ jsxRuntime.jsx(
3612
+ "td",
3613
+ {
3614
+ ...props2,
3615
+ className: cn(props2.className, "!w-9 !h-9 !p-0", {
3616
+ "rounded-r-full": isSunday && selected || rangeEnd,
3617
+ "rounded-l-full": isSaturday && selected || rangeStart,
3618
+ "!bg-calendar-rowSelected-background [&>button]:!border-none": selected && isRange
3619
+ })
3620
+ }
3621
+ );
3622
+ },
3623
+ DayButton(props2) {
3624
+ const {
3625
+ outside,
3626
+ today,
3627
+ selected,
3628
+ range_middle: rangeMiddle,
3629
+ range_end: rangeEnd,
3630
+ range_start: rangeStart
3631
+ } = props2.modifiers;
3632
+ return /* @__PURE__ */ jsxRuntime.jsx(
3633
+ "button",
3634
+ {
3635
+ ...props2,
3636
+ tabIndex: 0,
3637
+ className: cn(props2.className, "!w-9 !h-9", {
3638
+ "!text-calendar-day-color": !outside,
3639
+ "!text-calendar-outsideDay-color !opacity-1": outside,
3640
+ "!bg-calendar-daySelected-background !border-calendar-daySelected-background !text-calendar-daySelected-color rounded-full": (selected || rangeEnd || rangeStart) && !rangeMiddle
3641
+ }),
3642
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3643
+ "div",
3644
+ {
3645
+ className: cn({
3646
+ "flex flex-col relative items-center text-inherit": today
3647
+ }),
3648
+ children: [
3649
+ /* @__PURE__ */ jsxRuntime.jsx(
3650
+ Paragraph,
3651
+ {
3652
+ size: "md",
3653
+ className: "!font-medium !text-inherit text-center",
3654
+ children: props2.children
3655
+ }
3656
+ ),
3657
+ today && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds !bg-calendar-today-dotColor w-1 h-1 rounded-full absolute -bottom-[2px]" })
3658
+ ]
3659
+ }
3660
+ )
3661
+ }
3662
+ );
3663
+ },
3664
+ MonthCaption({ calendarMonth, displayIndex, ...rest }) {
3665
+ const handleNextMonth = () => {
3666
+ const newMonth = dateFns.addMonths(
3667
+ calendarMonth.date,
3668
+ props.pagedNavigation || numberOfMonths === 1 ? 1 : 0
3669
+ );
3670
+ if (typeof month !== "undefined") {
3671
+ onNextClick?.(newMonth);
3672
+ return;
3673
+ }
3674
+ setSelectedMonth(newMonth);
3675
+ };
3676
+ const handlePreviousMonth = () => {
3677
+ const newMonth = dateFns.addMonths(
3678
+ calendarMonth.date,
3679
+ props.pagedNavigation ? -2 : -1
3680
+ );
3681
+ if (typeof month !== "undefined") {
3682
+ onPrevClick?.(newMonth);
3683
+ return;
3684
+ }
3685
+ setSelectedMonth(newMonth);
3686
+ };
3687
+ const handleToggleShowMonthGridSelection = () => {
3688
+ setShowMonthGridSelection((s) => !s);
3689
+ };
3690
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3691
+ "div",
3692
+ {
3693
+ className: cn("flex justify-between items-center !h-9", {
3694
+ "ps-3": numberOfMonths === 1
3695
+ }),
3696
+ children: [
3697
+ !hideNavigation && numberOfMonths > 1 && /* @__PURE__ */ jsxRuntime.jsx(
3698
+ Button,
3699
+ {
3700
+ icon: true,
3701
+ size: "sm",
3702
+ variant: "ghost",
3703
+ onClick: handlePreviousMonth,
3704
+ className: cn({
3705
+ "pointer-events-none invisible": displayIndex === 1
3706
+ }),
3707
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: "nebula-ds !w-[unset] !h-[unset]" })
3708
+ }
3709
+ ),
3710
+ /* @__PURE__ */ jsxRuntime.jsx(
3711
+ "div",
3712
+ {
3713
+ ...rest,
3714
+ className: cn(
3715
+ rest.className,
3716
+ "!h-auto select-none ",
3717
+ numberOfMonths > 1 && "pointer-events-none"
3718
+ ),
3719
+ role: "button",
3720
+ onClick: handleToggleShowMonthGridSelection,
3721
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Space, { size: "xs", className: "nebula-ds items-center", children: [
3722
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "nebula-ds !text-calendar-month-label !text-sm !font-semibold", children: dateFns.formatDate(calendarMonth.date, "LLL yyyy", {
3723
+ locale: localeByi18nKey[locale ?? "en-US"]
3724
+ }).replace(/^./, (char) => char.toUpperCase()) }),
3725
+ numberOfMonths === 1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "nebula-ds !text-calendar-month-selectionChevron" })
3726
+ ] })
3727
+ }
3728
+ ),
3729
+ !hideNavigation && numberOfMonths === 1 && !showMonthGridSelection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex gap-x-1", children: [
3730
+ /* @__PURE__ */ jsxRuntime.jsx(
3731
+ Button,
3732
+ {
3733
+ icon: true,
3734
+ size: "sm",
3735
+ variant: "ghost",
3736
+ onClick: handlePreviousMonth,
3737
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: "nebula-ds !w-[unset] !h-[unset] !text-calendar-month-navigator" })
3738
+ }
3739
+ ),
3740
+ /* @__PURE__ */ jsxRuntime.jsx(
3741
+ Button,
3742
+ {
3743
+ icon: true,
3744
+ size: "sm",
3745
+ variant: "ghost",
3746
+ onClick: handleNextMonth,
3747
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "nebula-ds !w-[unset] !h-[unset] !text-calendar-month-navigator" })
3748
+ }
3749
+ )
3750
+ ] }),
3751
+ !hideNavigation && numberOfMonths > 1 && /* @__PURE__ */ jsxRuntime.jsx(
3752
+ Button,
3753
+ {
3754
+ icon: true,
3755
+ size: "sm",
3756
+ variant: "ghost",
3757
+ onClick: handleNextMonth,
3758
+ className: cn({
3759
+ "pointer-events-none invisible": displayIndex !== numberOfMonths - 1
3760
+ }),
3761
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "nebula-ds !w-[unset] !h-[unset]" })
3762
+ }
3763
+ )
3764
+ ]
3765
+ }
3766
+ );
3767
+ },
3768
+ MonthGrid(props2) {
3769
+ if (!showMonthGridSelection) {
3770
+ return /* @__PURE__ */ jsxRuntime.jsx("table", { ...props2 });
3771
+ }
3772
+ return /* @__PURE__ */ jsxRuntime.jsx(
3773
+ Box,
3774
+ {
3775
+ className: "nebula-ds z-40 !p-0 flex gap-2 flex-col justify-between w-full",
3776
+ border: false,
3777
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "nebula-ds z-40 grid grid-cols-2 gap-1 bg-inherit pt-2", children: MONTHS.map((monthOption) => {
3778
+ const monthOptionAsDate = new Date(monthOption);
3779
+ const isSelectedMonth = month ? month.getMonth() === monthOptionAsDate.getMonth() : monthOptionAsDate.getMonth() === currentMonth.getMonth();
3780
+ const monthLabel = dateFns.formatDate(monthOptionAsDate, "LLLL", {
3781
+ locale: localeByi18nKey[locale ?? "en-US"]
3782
+ });
3783
+ return /* @__PURE__ */ jsxRuntime.jsx(
3784
+ Button,
3785
+ {
3786
+ variant: isSelectedMonth ? "primary" : "secondary",
3787
+ type: "button",
3788
+ className: cn("rounded-lg", {
3789
+ "border-neutral-200 dark:border-neutral-800": !isSelectedMonth
3790
+ }),
3791
+ size: "md",
3792
+ onClick: () => handleSelectMonthByOption(monthOptionAsDate),
3793
+ children: monthLabel
3794
+ },
3795
+ monthLabel
3796
+ );
3797
+ }) })
3798
+ }
3799
+ );
3800
+ },
3801
+ Months(props2) {
3802
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props2, className: cn(props2.className, "gap-2 flex p-2") });
3803
+ },
3804
+ Month(props2) {
3805
+ return /* @__PURE__ */ jsxRuntime.jsx(
3806
+ "div",
3807
+ {
3808
+ ...props2,
3809
+ className: cn(
3810
+ props2.className,
3811
+ "[&:not(:last-child)]:pr-2 [&:not(:last-child)]:border-neutral-200 [&:not(:last-child)]:border-r dark:[&:not(:last-child)]:border-neutral-800"
3812
+ )
3813
+ }
3814
+ );
3815
+ },
3816
+ Week(props2) {
3817
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3818
+ /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props2, className: cn(props2.className) }),
3819
+ /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "nebula-ds h-1 last:h-0" })
3820
+ ] });
3821
+ },
3822
+ Weekdays(props2) {
3823
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", { ...props2 });
3824
+ },
3825
+ Weekday(props2) {
3826
+ return /* @__PURE__ */ jsxRuntime.jsx(
3827
+ "th",
3828
+ {
3829
+ ...props2,
3830
+ className: cn(
3831
+ props2.className,
3832
+ "font-medium text-xs !text-calendar-weekDay-color"
3833
+ ),
3834
+ children: String(props2.children)?.toUpperCase()?.[0]
3835
+ }
3836
+ );
3837
+ },
3838
+ Footer(props2) {
3839
+ if (showMonthGridSelection) return void 0;
3840
+ return /* @__PURE__ */ jsxRuntime.jsx(
3841
+ "div",
3842
+ {
3843
+ ...props2,
3844
+ className: cn(props2.className, "p-3 border-t border-t-box-border")
3845
+ }
3846
+ );
3847
+ },
3848
+ ...calendarComponents
3849
+ };
3850
+ }, [
3851
+ calendarComponents,
3852
+ isRange,
3853
+ currentMonth,
3854
+ handleSelectMonthByOption,
3855
+ hideNavigation,
3856
+ locale,
3857
+ month,
3858
+ numberOfMonths,
3859
+ onNextClick,
3860
+ onPrevClick,
3861
+ props.pagedNavigation,
3862
+ showMonthGridSelection
3863
+ ]);
3864
+ return /* @__PURE__ */ jsxRuntime.jsx(
3865
+ Box,
3866
+ {
3867
+ border: true,
3868
+ className: cn("p-0 w-fit", numberOfMonths === 1 && "w-[270px]"),
3869
+ shadow: "md",
3870
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3871
+ reactDayPicker.DayPicker,
3872
+ {
3873
+ showOutsideDays: true,
3874
+ mode: "single",
3875
+ animate: false,
3876
+ ...props,
3877
+ month: month ?? selectedMonth,
3878
+ hideNavigation: true,
3879
+ numberOfMonths: Math.min(Math.max(numberOfMonths, 1), 2),
3880
+ components: components2,
3881
+ locale: localeByi18nKey[locale ?? "en-US"],
3882
+ footer: showMonthGridSelection ? void 0 : props.footer
3883
+ }
3884
+ )
3885
+ }
3886
+ );
3887
+ };
3888
+
3889
+ // src/utils/valid-date-format.ts
3890
+ function dateFormatIsValid(dateStr, locale) {
3891
+ const regexBR = /^(?:(?:31\/(0[13578]|1[02]))\/(?:\d{4})|(?:29|30)\/(0[13-9]|1[0-2])\/(?:\d{4})|29\/02\/(?:\d\d(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)|(?:0[1-9]|1\d|2[0-8])\/(0[1-9]|1[0-2])\/(?:\d{4}))$/;
3892
+ const regexUS = /^(?:(?:(0[13578]|1[02])\/31)\/(?:\d{4})|(?:(0[13-9]|1[0-2])\/(29|30))\/(?:\d{4})|(?:02\/29)\/(?:\d\d(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)|(?:(0[1-9]|1[0-2])\/(0[1-9]|1\d|2[0-8]))\/(?:\d{4}))$/;
3893
+ const regex = locale === "en-US" ? regexUS : regexBR;
3894
+ return regex.test(dateStr);
3895
+ }
3896
+ function timeFormatIsValid(timeStr) {
3897
+ const regex = /^(?:[01]\d|2[0-3]):[0-5]\d$/;
3898
+ return regex.test(timeStr);
3899
+ }
3900
+ var InputDatePickerSingle = ({
3901
+ portal,
3902
+ placeholder,
3903
+ className,
3904
+ value,
3905
+ onChange,
3906
+ numberOfMonths = 1,
3907
+ onClean,
3908
+ ...rest
3909
+ }) => {
3910
+ const [popoverIsOpen, setPopoverIsOpen] = React8.useState(false);
3911
+ const [innerDate, setInnerDate] = React8.useState(
3912
+ value ? new Date(value) : void 0
3913
+ );
3914
+ const { locale } = useNebulaI18n();
3915
+ const [month, setMonth] = React8.useState(/* @__PURE__ */ new Date());
3916
+ const handleClearValue = () => {
3917
+ setInnerDate(void 0);
3918
+ setMonth(/* @__PURE__ */ new Date());
3919
+ };
3920
+ const handleInnerInputChange = (text) => {
3921
+ const dateSlice = text.substring(0, 10).trim();
3922
+ onChange?.(text);
3923
+ if (!text) {
3924
+ handleClearValue();
3925
+ return;
3926
+ }
3927
+ const [day, month2, year] = [
3928
+ locale !== "en-US" ? dateSlice.substring(0, 2) : dateSlice.substring(3, 5),
3929
+ locale === "en-US" ? dateSlice.substring(0, 2) : dateSlice.substring(3, 5),
3930
+ dateSlice.substring(6)
3931
+ ];
3932
+ if ([day, month2, year].some((value2) => !value2) || !dateFormatIsValid(dateSlice, locale)) {
3933
+ handleClearValue();
3934
+ return;
3935
+ }
3936
+ const date = new Date(Number(year), Number(month2) - 1, Number(day));
3937
+ if (!dateFns.isValid(new Date(date))) {
3938
+ handleClearValue();
3939
+ return;
3940
+ }
3941
+ setInnerDate(date);
3942
+ };
3943
+ const handleKeyDown = (e) => {
3944
+ if ((e.altKey || e.ctrlKey || e.metaKey) && e.key !== "z") return;
3945
+ const allowedKeys = [
3946
+ "Backspace",
3947
+ "Delete",
3948
+ "Tab",
3949
+ "ArrowLeft",
3950
+ "ArrowRight",
3951
+ "Home",
3952
+ "End",
3953
+ "/"
3954
+ ];
3955
+ if (!allowedKeys.includes(e.key) && !/^[0-9]$/.test(e.key)) {
3956
+ e.preventDefault();
3957
+ }
3958
+ };
3959
+ const handleCalendarSelect = (date) => {
3960
+ const dateToStr = Intl.DateTimeFormat(locale ?? "en-US", {
3961
+ month: "2-digit",
3962
+ year: "numeric",
3963
+ day: "2-digit"
3964
+ }).format(date);
3965
+ setInnerDate(date);
3966
+ onChange?.(dateToStr);
3967
+ };
3968
+ const normalizedCalendarDate = React8.useMemo(() => {
3969
+ return dateFns.isValid(innerDate) ? innerDate : void 0;
3970
+ }, [innerDate]);
3971
+ React8.useEffect(() => {
3972
+ if (innerDate) setMonth(innerDate);
3973
+ }, [innerDate]);
3974
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: popoverIsOpen, onOpenChange: setPopoverIsOpen, children: [
3975
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { className, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3976
+ "div",
3977
+ {
3978
+ onClick: (e) => e.preventDefault(),
3979
+ onFocus: (e) => e.preventDefault(),
3980
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3981
+ InputText,
3982
+ {
3983
+ placeholder,
3984
+ value,
3985
+ className,
3986
+ onChange: (e) => handleInnerInputChange(e.target.value),
3987
+ onKeyDown: handleKeyDown,
3988
+ icon: /* @__PURE__ */ jsxRuntime.jsx(
3989
+ lucideReact.CalendarIcon,
3990
+ {
3991
+ tabIndex: 0,
3992
+ role: "button",
3993
+ onClick: () => setPopoverIsOpen((s) => !s),
3994
+ onKeyUp: (e) => {
3995
+ if (e.key === "Enter") {
3996
+ setPopoverIsOpen((s) => !s);
3997
+ }
3998
+ },
3999
+ className: "nebula-ds cursor-pointer"
4000
+ }
4001
+ ),
4002
+ iconPlacement: "end",
4003
+ onKeyUp: (e) => {
4004
+ if (e.key === "ArrowDown") {
4005
+ setPopoverIsOpen(true);
4006
+ }
4007
+ },
4008
+ maxLength: 10,
4009
+ onClean: onClean ? () => {
4010
+ onClean();
4011
+ handleClearValue();
4012
+ } : void 0,
4013
+ ...rest
4014
+ }
4015
+ )
4016
+ }
4017
+ ) }),
4018
+ /* @__PURE__ */ jsxRuntime.jsx(
4019
+ PopoverContent,
4020
+ {
4021
+ portal,
4022
+ side: "bottom",
4023
+ className: "nebula-ds p-0 border-none bg-transparent shadow-none",
4024
+ align: "start",
4025
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4026
+ Calendar,
4027
+ {
4028
+ required: false,
4029
+ mode: "single",
4030
+ numberOfMonths,
4031
+ selected: normalizedCalendarDate,
4032
+ onSelect: handleCalendarSelect,
4033
+ month,
4034
+ onPrevClick: setMonth,
4035
+ onNextClick: setMonth
4036
+ }
4037
+ )
4038
+ }
4039
+ )
4040
+ ] });
4041
+ };
4042
+ var InputTime = React8.forwardRef(
4043
+ ({ value = "", onChange, placeholder = "--:--", ...rest }, ref) => {
4044
+ const [displayValue, setDisplayValue] = React8.useState(value);
4045
+ const handleKeyDown = (e) => {
4046
+ const currentValue = e.currentTarget.value;
4047
+ if ((e.altKey || e.ctrlKey || e.metaKey) && e.key !== "z") return;
4048
+ const allowedKeys = [
4049
+ "Backspace",
4050
+ "Delete",
4051
+ "Tab",
4052
+ "ArrowLeft",
4053
+ "ArrowRight",
4054
+ "Home",
4055
+ "End",
4056
+ ":"
4057
+ ];
4058
+ if (!allowedKeys.includes(e.key) && !/^[0-9]$/.test(e.key)) {
4059
+ e.preventDefault();
4060
+ }
4061
+ if (currentValue.indexOf(":") > -1 && e.key === ":" || e.key === ":" && currentValue.length < 2) {
4062
+ e.preventDefault();
4063
+ }
4064
+ };
4065
+ const handleInput = (value2) => {
4066
+ if (value2.startsWith(":")) return;
4067
+ let clean = value2.replace(/\D/g, "");
4068
+ if (clean.length === 2) {
4069
+ clean = String(
4070
+ Math.min(Math.max(parseInt(clean || "0", 10), 0), 23)
4071
+ ).padStart(2, "0");
4072
+ }
4073
+ if (clean.length === 4) {
4074
+ let h = parseInt(clean.slice(0, 2) || "0", 10);
4075
+ let m = parseInt(clean.slice(2, 4) || "0", 10);
4076
+ h = Math.min(Math.max(h, 0), 23);
4077
+ m = Math.min(Math.max(m, 0), 59);
4078
+ const value24h = `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}`;
4079
+ setDisplayValue(value24h);
4080
+ onChange?.(value24h);
4081
+ } else {
4082
+ setDisplayValue(value2);
4083
+ onChange?.(value2);
4084
+ }
4085
+ };
4086
+ React8.useEffect(() => {
4087
+ if (!value) {
4088
+ setDisplayValue("");
4089
+ }
4090
+ }, [value]);
4091
+ return /* @__PURE__ */ jsxRuntime.jsx(
4092
+ InputText,
4093
+ {
4094
+ ref,
4095
+ type: "text",
4096
+ value: displayValue,
4097
+ placeholder,
4098
+ ...rest,
4099
+ onChange: (e) => handleInput(e.target.value),
4100
+ onKeyDown: handleKeyDown,
4101
+ maxLength: 5,
4102
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClockIcon, {})
4103
+ }
4104
+ );
4105
+ }
4106
+ );
4107
+ InputTime.displayName = "InputTime";
4108
+ var InputDateTimePickerSingle = ({
4109
+ portal,
4110
+ placeholder,
4111
+ className,
4112
+ value,
4113
+ onChange,
4114
+ numberOfMonths = 1,
4115
+ onClean,
4116
+ ...rest
4117
+ }) => {
4118
+ const [popoverIsOpen, setPopoverIsOpen] = React8.useState(false);
4119
+ const [innerTimeValue, setInnerTimeValue] = React8.useState();
4120
+ const [innerDate, setInnerDate] = React8.useState(
4121
+ value ? new Date(value) : void 0
4122
+ );
4123
+ const { locale, messages: messages14 } = useNebulaI18n();
4124
+ const [month, setMonth] = React8.useState(/* @__PURE__ */ new Date());
4125
+ const inputTimeRef = React8.useRef(null);
4126
+ const handleClearValue = () => {
4127
+ setInnerTimeValue("");
4128
+ setInnerDate(void 0);
4129
+ setMonth(/* @__PURE__ */ new Date());
4130
+ };
4131
+ const handleInnerInputChange = (text) => {
4132
+ const dateSlice = text.substring(0, 11).trim();
4133
+ const hourSlice = text.substring(11).trim();
4134
+ onChange?.(text);
4135
+ if (!text) {
4136
+ handleClearValue();
4137
+ return;
4138
+ }
4139
+ const [day, month2, year] = [
4140
+ locale !== "en-US" ? dateSlice.substring(0, 2) : dateSlice.substring(3, 5),
4141
+ locale === "en-US" ? dateSlice.substring(0, 2) : dateSlice.substring(3, 5),
4142
+ dateSlice.substring(6)
4143
+ ];
4144
+ if ([day, month2, year].some((value2) => !value2) || !dateFormatIsValid(dateSlice, locale)) {
4145
+ handleClearValue();
4146
+ return;
4147
+ }
4148
+ if (!timeFormatIsValid(hourSlice)) {
4149
+ setInnerTimeValue("");
4150
+ } else {
4151
+ setInnerTimeValue(hourSlice);
4152
+ }
4153
+ const date = new Date(Number(year), Number(month2) - 1, Number(day));
4154
+ if (!dateFns.isValid(new Date(date))) {
4155
+ handleClearValue();
4156
+ return;
4157
+ }
4158
+ setInnerDate(date);
4159
+ };
4160
+ const handleOnChangeTime = (newTime) => {
4161
+ const [date = ""] = value?.split(" ") ?? [];
4162
+ setInnerTimeValue(newTime);
4163
+ if (date && !dateFormatIsValid(date, locale)) {
4164
+ handleClearValue();
4165
+ }
4166
+ onChange?.(date + " " + newTime);
4167
+ };
4168
+ const handleKeyDown = (e) => {
4169
+ if ((e.altKey || e.ctrlKey || e.metaKey) && e.key !== "z") return;
4170
+ const allowedKeys = [
4171
+ "Backspace",
4172
+ "Delete",
4173
+ "Tab",
4174
+ "ArrowLeft",
4175
+ "ArrowRight",
4176
+ "Home",
4177
+ "End",
4178
+ ":",
4179
+ "/",
4180
+ " "
4181
+ ];
4182
+ if (!allowedKeys.includes(e.key) && !/^[0-9]$/.test(e.key)) {
4183
+ e.preventDefault();
4184
+ }
4185
+ };
4186
+ const handleCalendarSelect = (date) => {
4187
+ const dateToStr = Intl.DateTimeFormat(locale ?? "en-US", {
4188
+ month: "2-digit",
4189
+ year: "numeric",
4190
+ day: "2-digit"
4191
+ }).format(date);
4192
+ setInnerDate(date);
4193
+ onChange?.([dateToStr, innerTimeValue].filter(Boolean).join(" "));
4194
+ if (!innerTimeValue) {
4195
+ setTimeout(() => inputTimeRef.current?.focus(), 100);
4196
+ }
4197
+ };
4198
+ const normalizedCalendarDate = React8.useMemo(() => {
4199
+ return dateFns.isValid(innerDate) ? innerDate : void 0;
4200
+ }, [innerDate]);
4201
+ React8.useEffect(() => {
4202
+ if (innerDate) setMonth(innerDate);
4203
+ }, [innerDate]);
4204
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: popoverIsOpen, onOpenChange: setPopoverIsOpen, children: [
4205
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { className, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
4206
+ "div",
4207
+ {
4208
+ onClick: (e) => e.preventDefault(),
4209
+ onFocus: (e) => e.preventDefault(),
4210
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4211
+ InputText,
4212
+ {
4213
+ placeholder,
4214
+ value,
4215
+ className,
4216
+ onChange: (e) => handleInnerInputChange(e.target.value),
4217
+ onKeyDown: handleKeyDown,
4218
+ icon: /* @__PURE__ */ jsxRuntime.jsx(
4219
+ lucideReact.CalendarIcon,
4220
+ {
4221
+ tabIndex: 0,
4222
+ role: "button",
4223
+ onClick: () => setPopoverIsOpen((s) => !s),
4224
+ onKeyUp: (e) => {
4225
+ if (e.key === "Enter") {
4226
+ setPopoverIsOpen((s) => !s);
4227
+ }
4228
+ },
4229
+ className: "nebula-ds cursor-pointer"
4230
+ }
4231
+ ),
4232
+ iconPlacement: "end",
4233
+ onKeyUp: (e) => {
4234
+ if (e.key === "ArrowDown") {
4235
+ setPopoverIsOpen(true);
4236
+ }
4237
+ },
4238
+ maxLength: 16,
4239
+ onClean: onClean ? () => {
4240
+ onClean();
4241
+ handleClearValue();
4242
+ } : void 0,
4243
+ ...rest
4244
+ }
4245
+ )
4246
+ }
4247
+ ) }),
4248
+ /* @__PURE__ */ jsxRuntime.jsx(
4249
+ PopoverContent,
4250
+ {
4251
+ portal,
4252
+ side: "bottom",
4253
+ className: "nebula-ds p-0 border-none bg-transparent shadow-none",
4254
+ align: "start",
4255
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4256
+ Calendar,
4257
+ {
4258
+ required: false,
4259
+ mode: "single",
4260
+ numberOfMonths,
4261
+ selected: normalizedCalendarDate,
4262
+ onSelect: handleCalendarSelect,
4263
+ month,
4264
+ onPrevClick: setMonth,
4265
+ onNextClick: setMonth,
4266
+ footer: /* @__PURE__ */ jsxRuntime.jsxs(Space, { className: "nebula-ds items-center", children: [
4267
+ /* @__PURE__ */ jsxRuntime.jsxs(Label, { children: [
4268
+ messages14.timePicker.label,
4269
+ ":"
4270
+ ] }),
4271
+ /* @__PURE__ */ jsxRuntime.jsx(
4272
+ InputTime,
4273
+ {
4274
+ placeholder: "00:00",
4275
+ value: innerTimeValue,
4276
+ onChange: handleOnChangeTime,
4277
+ ref: inputTimeRef
4278
+ }
4279
+ )
4280
+ ] })
4281
+ }
4282
+ )
4283
+ }
4284
+ )
4285
+ ] });
4286
+ };
3665
4287
 
3666
4288
  // src/tailwind.ts
3667
4289
  function content({ base = "./" } = {}) {
@@ -3672,36 +4294,6 @@ var tailwind = {
3672
4294
  content
3673
4295
  // plugin: () => require("tailwindcss")("node_modules/@nebulareact/dist/tailwind.config.js"),
3674
4296
  };
3675
- /*! Bundled license information:
3676
-
3677
- lucide-react/dist/esm/shared/src/utils.js:
3678
- lucide-react/dist/esm/defaultAttributes.js:
3679
- lucide-react/dist/esm/Icon.js:
3680
- lucide-react/dist/esm/createLucideIcon.js:
3681
- lucide-react/dist/esm/icons/check.js:
3682
- lucide-react/dist/esm/icons/chevron-down.js:
3683
- lucide-react/dist/esm/icons/chevron-left.js:
3684
- lucide-react/dist/esm/icons/chevron-right.js:
3685
- lucide-react/dist/esm/icons/chevrons-left.js:
3686
- lucide-react/dist/esm/icons/chevrons-right.js:
3687
- lucide-react/dist/esm/icons/circle-check-big.js:
3688
- lucide-react/dist/esm/icons/circle-x.js:
3689
- lucide-react/dist/esm/icons/circle.js:
3690
- lucide-react/dist/esm/icons/ellipsis.js:
3691
- lucide-react/dist/esm/icons/eye-off.js:
3692
- lucide-react/dist/esm/icons/eye.js:
3693
- lucide-react/dist/esm/icons/info.js:
3694
- lucide-react/dist/esm/icons/minus.js:
3695
- lucide-react/dist/esm/icons/phone.js:
3696
- lucide-react/dist/esm/icons/x.js:
3697
- lucide-react/dist/esm/lucide-react.js:
3698
- (**
3699
- * @license lucide-react v0.476.0 - ISC
3700
- *
3701
- * This source code is licensed under the ISC license.
3702
- * See the LICENSE file in the root directory of this source tree.
3703
- *)
3704
- */
3705
4297
 
3706
4298
  exports.Accordion = Accordion;
3707
4299
  exports.AccordionContent = AccordionContent;
@@ -3741,6 +4333,7 @@ exports.BreadcrumbList = BreadcrumbList;
3741
4333
  exports.BreadcrumbPage = BreadcrumbPage;
3742
4334
  exports.BreadcrumbSeparator = BreadcrumbSeparator;
3743
4335
  exports.Button = Button;
4336
+ exports.Calendar = Calendar;
3744
4337
  exports.Caption = Caption;
3745
4338
  exports.Checkbox = Checkbox;
3746
4339
  exports.Creatable = StyledCreatable;
@@ -3779,8 +4372,11 @@ exports.DropdownMenuSubContent = DropdownMenuSubContent;
3779
4372
  exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
3780
4373
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
3781
4374
  exports.Heading = Heading;
4375
+ exports.InputDatePickerSingle = InputDatePickerSingle;
4376
+ exports.InputDateTimePickerSingle = InputDateTimePickerSingle;
3782
4377
  exports.InputPhone = InputPhone;
3783
4378
  exports.InputText = InputText;
4379
+ exports.InputTime = InputTime;
3784
4380
  exports.Label = Label;
3785
4381
  exports.Link = Link;
3786
4382
  exports.NebulaI18nProvider = NebulaI18nProvider;
@@ -3818,7 +4414,8 @@ exports.buttonSizeEnum = buttonSizeEnum;
3818
4414
  exports.buttonVariantEnum = buttonVariantEnum;
3819
4415
  exports.buttonVariantsConfig = buttonVariantsConfig;
3820
4416
  exports.getNebulaLanguage = getNebulaLanguage;
3821
- exports.messages = messages10;
4417
+ exports.localeByi18nKey = localeByi18nKey;
4418
+ exports.messages = messages13;
3822
4419
  exports.separatorVariants = separatorVariants;
3823
4420
  exports.setNebulaLanguage = setNebulaLanguage;
3824
4421
  exports.tagVariantsEnum = tagVariantsEnum;