labsense-ui-kit 1.0.39 → 1.1.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.
Files changed (150) hide show
  1. package/dist/Badge/Badge.d.ts +14 -0
  2. package/dist/Badge/index.d.ts +2 -0
  3. package/dist/Breadcrums/Breadcrums.d.ts +13 -0
  4. package/dist/Breadcrums/index.d.ts +2 -0
  5. package/dist/Buttons/index.d.ts +1 -1
  6. package/dist/Carousel/ButtonCarousel.d.ts +7 -0
  7. package/dist/Carousel/index.d.ts +2 -0
  8. package/dist/Container&Span/StyledComponents.d.ts +50 -0
  9. package/dist/Date-Time/DatePicker.d.ts +15 -0
  10. package/dist/Date-Time/index.d.ts +2 -0
  11. package/dist/Dropdown/MultiSelectDropdown.d.ts +60 -0
  12. package/dist/Dropdown/OptionComponent.d.ts +28 -0
  13. package/dist/Dropdown/SelectOption.d.ts +74 -0
  14. package/dist/Dropdown/SelectedOption.d.ts +17 -0
  15. package/dist/Dropdown/index.d.ts +5 -0
  16. package/dist/Icons/SVGs/Add.d.ts +2 -2
  17. package/dist/Icons/SVGs/AddProfile.d.ts +2 -2
  18. package/dist/Icons/SVGs/Back.d.ts +2 -2
  19. package/dist/Icons/SVGs/Bin.d.ts +2 -2
  20. package/dist/Icons/SVGs/Bulb.d.ts +2 -2
  21. package/dist/Icons/SVGs/Business.d.ts +2 -2
  22. package/dist/Icons/SVGs/CCTV_1.d.ts +2 -2
  23. package/dist/Icons/SVGs/CCTV_2.d.ts +2 -2
  24. package/dist/Icons/SVGs/CPU.d.ts +2 -2
  25. package/dist/Icons/SVGs/Calendar.d.ts +2 -2
  26. package/dist/Icons/SVGs/Circle.d.ts +2 -2
  27. package/dist/Icons/SVGs/CircularEdit.d.ts +2 -2
  28. package/dist/Icons/SVGs/CircularPause.d.ts +2 -2
  29. package/dist/Icons/SVGs/CircularPlay.d.ts +2 -2
  30. package/dist/Icons/SVGs/CircularWarning.d.ts +2 -2
  31. package/dist/Icons/SVGs/Client.d.ts +2 -2
  32. package/dist/Icons/SVGs/Close.d.ts +2 -2
  33. package/dist/Icons/SVGs/CloseCircle.d.ts +2 -2
  34. package/dist/Icons/SVGs/CloseEye.d.ts +2 -2
  35. package/dist/Icons/SVGs/Copy.d.ts +2 -2
  36. package/dist/Icons/SVGs/Cyber.d.ts +2 -2
  37. package/dist/Icons/SVGs/DocumentBadge.d.ts +2 -2
  38. package/dist/Icons/SVGs/DownArrow.d.ts +2 -2
  39. package/dist/Icons/SVGs/Download.d.ts +2 -2
  40. package/dist/Icons/SVGs/Email.d.ts +2 -2
  41. package/dist/Icons/SVGs/ExitFullScreen.d.ts +2 -2
  42. package/dist/Icons/SVGs/FPS.d.ts +2 -2
  43. package/dist/Icons/SVGs/FaceRecognition.d.ts +2 -2
  44. package/dist/Icons/SVGs/FilesBox.d.ts +2 -2
  45. package/dist/Icons/SVGs/FilledCircle.d.ts +2 -2
  46. package/dist/Icons/SVGs/FilledPin.d.ts +2 -2
  47. package/dist/Icons/SVGs/Filter_1.d.ts +2 -2
  48. package/dist/Icons/SVGs/Filter_2.d.ts +2 -2
  49. package/dist/Icons/SVGs/Forward.d.ts +2 -2
  50. package/dist/Icons/SVGs/Forward_10_Sec.d.ts +2 -2
  51. package/dist/Icons/SVGs/Free.d.ts +2 -2
  52. package/dist/Icons/SVGs/FullScreen.d.ts +2 -2
  53. package/dist/Icons/SVGs/FullVolume.d.ts +2 -2
  54. package/dist/Icons/SVGs/Grid_2x2.d.ts +2 -2
  55. package/dist/Icons/SVGs/Grid_2x2_Hollow.d.ts +2 -2
  56. package/dist/Icons/SVGs/Grid_3x3.d.ts +2 -2
  57. package/dist/Icons/SVGs/Grid_4x4.d.ts +2 -2
  58. package/dist/Icons/SVGs/Grid_5x5.d.ts +2 -2
  59. package/dist/Icons/SVGs/Hazard.d.ts +2 -2
  60. package/dist/Icons/SVGs/Hexagon.d.ts +2 -2
  61. package/dist/Icons/SVGs/History.d.ts +2 -2
  62. package/dist/Icons/SVGs/Information.d.ts +2 -2
  63. package/dist/Icons/SVGs/Key.d.ts +2 -2
  64. package/dist/Icons/SVGs/KeyDown.d.ts +2 -2
  65. package/dist/Icons/SVGs/LeftArrow.d.ts +2 -2
  66. package/dist/Icons/SVGs/Letter.d.ts +2 -2
  67. package/dist/Icons/SVGs/Live.d.ts +2 -2
  68. package/dist/Icons/SVGs/Lock.d.ts +2 -2
  69. package/dist/Icons/SVGs/Logout.d.ts +2 -2
  70. package/dist/Icons/SVGs/Maps.d.ts +2 -2
  71. package/dist/Icons/SVGs/MediumVolume.d.ts +2 -2
  72. package/dist/Icons/SVGs/Menu.d.ts +2 -2
  73. package/dist/Icons/SVGs/Mute.d.ts +2 -2
  74. package/dist/Icons/SVGs/MuteVolume.d.ts +2 -2
  75. package/dist/Icons/SVGs/NetworkStorage.d.ts +2 -2
  76. package/dist/Icons/SVGs/NoCam.d.ts +2 -2
  77. package/dist/Icons/SVGs/NoStorage.d.ts +2 -2
  78. package/dist/Icons/SVGs/Notifications.d.ts +2 -2
  79. package/dist/Icons/SVGs/OpenBin.d.ts +2 -2
  80. package/dist/Icons/SVGs/OpenEye.d.ts +2 -2
  81. package/dist/Icons/SVGs/PasswordLock.d.ts +2 -2
  82. package/dist/Icons/SVGs/Phone.d.ts +2 -2
  83. package/dist/Icons/SVGs/Pin.d.ts +2 -2
  84. package/dist/Icons/SVGs/Pin_2.d.ts +2 -2
  85. package/dist/Icons/SVGs/Play.d.ts +2 -2
  86. package/dist/Icons/SVGs/Playback.d.ts +2 -2
  87. package/dist/Icons/SVGs/PremiumBadge.d.ts +2 -2
  88. package/dist/Icons/SVGs/ProcessingBulb.d.ts +2 -2
  89. package/dist/Icons/SVGs/Profile_1.d.ts +2 -2
  90. package/dist/Icons/SVGs/Profile_2.d.ts +2 -2
  91. package/dist/Icons/SVGs/Profile_3.d.ts +2 -2
  92. package/dist/Icons/SVGs/ROI.d.ts +2 -2
  93. package/dist/Icons/SVGs/Recording.d.ts +2 -2
  94. package/dist/Icons/SVGs/Rectangle.d.ts +2 -2
  95. package/dist/Icons/SVGs/Return.d.ts +2 -2
  96. package/dist/Icons/SVGs/Rewind_10_Sec.d.ts +2 -2
  97. package/dist/Icons/SVGs/RightArrow.d.ts +2 -2
  98. package/dist/Icons/SVGs/RunAway.d.ts +2 -2
  99. package/dist/Icons/SVGs/SandTimer.d.ts +2 -2
  100. package/dist/Icons/SVGs/Search.d.ts +2 -2
  101. package/dist/Icons/SVGs/Settings.d.ts +2 -2
  102. package/dist/Icons/SVGs/Shield.d.ts +2 -2
  103. package/dist/Icons/SVGs/SlantLine.d.ts +2 -2
  104. package/dist/Icons/SVGs/SquareEdit.d.ts +2 -2
  105. package/dist/Icons/SVGs/SquareTick.d.ts +2 -2
  106. package/dist/Icons/SVGs/StorageDisks.d.ts +2 -2
  107. package/dist/Icons/SVGs/Tag.d.ts +2 -2
  108. package/dist/Icons/SVGs/Team.d.ts +2 -2
  109. package/dist/Icons/SVGs/ThreeDots.d.ts +2 -2
  110. package/dist/Icons/SVGs/ThumbsUp.d.ts +2 -2
  111. package/dist/Icons/SVGs/Tick.d.ts +2 -2
  112. package/dist/Icons/SVGs/UnPinned.d.ts +2 -2
  113. package/dist/Icons/SVGs/UpArrow.d.ts +2 -2
  114. package/dist/Icons/SVGs/Video.d.ts +2 -2
  115. package/dist/Icons/SVGs/Wallet.d.ts +2 -2
  116. package/dist/Icons/SVGs/WiFiCam.d.ts +2 -2
  117. package/dist/Icons/SVGs/Zapper.d.ts +2 -2
  118. package/dist/Icons/SVGs/index.d.ts +1 -1
  119. package/dist/Icons/index.d.ts +2 -2
  120. package/dist/Inputs/SearchBox.d.ts +15 -0
  121. package/dist/Inputs/TextArea.d.ts +16 -0
  122. package/dist/Inputs/TextField.d.ts +25 -0
  123. package/dist/Inputs/TextFieldWithDropdown.d.ts +30 -0
  124. package/dist/Inputs/index.d.ts +5 -2
  125. package/dist/Loader/CircularLoader.d.ts +2 -2
  126. package/dist/Loader/Loader.d.ts +10 -0
  127. package/dist/Loader/index.d.ts +3 -2
  128. package/dist/Pagination/Pagination.d.ts +10 -0
  129. package/dist/Pagination/index.d.ts +2 -0
  130. package/dist/ProgressBar/ProgressBar.d.ts +1 -1
  131. package/dist/ProgressBar/index.d.ts +1 -1
  132. package/dist/Sidebar/Sidebar.d.ts +23 -0
  133. package/dist/Sidebar/index.d.ts +2 -0
  134. package/dist/Table/Table.d.ts +9 -0
  135. package/dist/Table/TableCell.d.ts +4 -0
  136. package/dist/Table/TableRow.d.ts +8 -0
  137. package/dist/Table/index.d.ts +46 -0
  138. package/dist/Tabs/InternalTabs.d.ts +16 -0
  139. package/dist/Tabs/Tabs.d.ts +18 -3
  140. package/dist/Tabs/index.d.ts +3 -2
  141. package/dist/Utils/Date&Time.d.ts +10 -0
  142. package/dist/hooks/index.d.ts +4 -3
  143. package/dist/hooks/useNotification.d.ts +31 -0
  144. package/dist/index.d.ts +33 -9
  145. package/dist/index.js +3337 -404
  146. package/dist/index.js.map +1 -1
  147. package/dist/index.modern.js +3307 -404
  148. package/dist/index.modern.js.map +1 -1
  149. package/package.json +11 -5
  150. package/dist/Inputs/Input.d.ts +0 -16
package/dist/index.js CHANGED
@@ -4,11 +4,162 @@ var React = require('react');
4
4
  var React__default = _interopDefault(React);
5
5
  var styled = require('styled-components');
6
6
  var styled__default = _interopDefault(styled);
7
+ var reactRouterDom = require('react-router-dom');
8
+ var reactI18next = require('react-i18next');
9
+ var reactHotToast = require('react-hot-toast');
7
10
 
11
+ function _extends() {
12
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
13
+ for (var e = 1; e < arguments.length; e++) {
14
+ var t = arguments[e];
15
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
16
+ }
17
+ return n;
18
+ }, _extends.apply(null, arguments);
19
+ }
8
20
  function _taggedTemplateLiteralLoose(e, t) {
9
21
  return t || (t = e.slice(0)), e.raw = t, e;
10
22
  }
11
23
 
24
+ var colorVariables = {
25
+ brand: {
26
+ primary: '#4C9EEB',
27
+ secondary: '#14171A',
28
+ light: '#FFFFFF'
29
+ },
30
+ accent: {
31
+ light: '#E1E8ED',
32
+ extraLight: '#F5F8FA',
33
+ softBlue: '#D4EEFF',
34
+ extraSoftBlue: '#E4F4FF',
35
+ boldTransparent: '#5E5E5E80',
36
+ transparent: '#5E5E5E4D',
37
+ lightTransparent: '#5E5E5E23'
38
+ },
39
+ "default": {
40
+ primary: '#78B6F0',
41
+ secondary: '#C2C2C2',
42
+ tertiary: 'transparent',
43
+ error: '#F44336',
44
+ success: '#4CAF50',
45
+ warning: '#FF9800',
46
+ info: '#2159F3'
47
+ },
48
+ disabled: {
49
+ primary: '#B9DCF7',
50
+ secondary: '#DADADA',
51
+ error: '#FFEBEE',
52
+ success: '#E8F5E9',
53
+ warning: '#FFF3E0',
54
+ info: '#E3F2FD'
55
+ },
56
+ hover: {
57
+ primary: '#4C9EEB',
58
+ secondary: '#A3A3A3',
59
+ tertiary: 'transparent',
60
+ error: '#D32F2F',
61
+ success: '#388E3C',
62
+ warning: '#F57C00',
63
+ info: '#193ED2'
64
+ },
65
+ border: {
66
+ extraBold: '#657786',
67
+ bold: '#BFBFBF',
68
+ medium: '#CBCED0',
69
+ light: '#DCDCDC',
70
+ extraLight: '#E6E3E3'
71
+ },
72
+ text: {
73
+ dark: '#14171A',
74
+ medium: '#657786',
75
+ light: '#98A2AA',
76
+ white: '#FFFFFF',
77
+ success: '#1B5E20',
78
+ error: '#B71C1C',
79
+ info: '#0D30A1',
80
+ warning: '#E65100'
81
+ },
82
+ badge: {
83
+ lavender: '#E8DAFF',
84
+ papayaWhip: '#FFEDD5',
85
+ water: '#C7E3FF',
86
+ paleBlue: '#B0F0E4',
87
+ teaGreen: '#D5F7C2',
88
+ lightBlue: '#ADD8E6'
89
+ }
90
+ };
91
+ var darkColorVariables = {
92
+ brand: {
93
+ primary: '#4C9EEB',
94
+ secondary: '#FFFFFF',
95
+ light: '#1A1A1A'
96
+ },
97
+ accent: {
98
+ light: '#2F2F2F',
99
+ extraLight: '#1E1E1E',
100
+ softBlue: '#7A7A7A',
101
+ extraSoftBlue: '#2A3C50',
102
+ boldTransparent: '#AFAF80',
103
+ transparent: '#AFAF4D',
104
+ lightTransparent: '#AFAF23'
105
+ },
106
+ "default": {
107
+ primary: '#3B82F6',
108
+ secondary: '#B0B0B0',
109
+ tertiary: 'transparent',
110
+ error: '#F44336',
111
+ success: '#4CAF50',
112
+ warning: '#FF9800',
113
+ info: '#2159F3'
114
+ },
115
+ disabled: {
116
+ primary: '#B9DCF7',
117
+ secondary: '#3B3B3B',
118
+ error: '#FFEBEE',
119
+ success: '#E8F5E9',
120
+ warning: '#FFF3E0',
121
+ info: '#E3F2FD'
122
+ },
123
+ hover: {
124
+ primary: '#4C9EEB',
125
+ secondary: '#A3A3A3',
126
+ tertiary: 'transparent',
127
+ error: '#D32F2F',
128
+ success: '#388E3C',
129
+ warning: '#F57C00',
130
+ info: '#1976D2'
131
+ },
132
+ border: {
133
+ extraBold: '#657786',
134
+ bold: '#BFBFBF',
135
+ medium: '#CBCED0',
136
+ light: '#7A7A7A',
137
+ extraLight: '#E6E3E3'
138
+ },
139
+ text: {
140
+ dark: '#FFFFFF',
141
+ medium: '#C7C7C7',
142
+ light: '#A0A0A0',
143
+ white: '#FFFFFF',
144
+ success: '#1B5E20',
145
+ error: '#B71C1C',
146
+ info: '#0D30A1',
147
+ warning: '#E65100'
148
+ },
149
+ badge: {
150
+ lavender: '#E8DAFF',
151
+ papayaWhip: '#FFEDD5',
152
+ water: '#C7E3FF',
153
+ paleBlue: '#B0F0E4',
154
+ teaGreen: '#D5F7C2',
155
+ lightBlue: '#ADD8E6'
156
+ }
157
+ };
158
+ var themes = {
159
+ light: colorVariables,
160
+ dark: darkColorVariables
161
+ };
162
+
12
163
  var Add = function Add(_ref) {
13
164
  var size = _ref.size,
14
165
  color = _ref.color,
@@ -2501,8 +2652,8 @@ var Zapper = function Zapper(_ref) {
2501
2652
  var _templateObject, _templateObject2, _templateObject3;
2502
2653
  var wrapperCss = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n svg {\n overflow: visible;\n vector-effect: non-scaling-stroke;\n line,\n path,\n circle,\n ellipse,\n foreignObject,\n polygon,\n polyline,\n rect,\n text,\n textPath,\n tspan {\n vector-effect: non-scaling-stroke;\n }\n }\n"])));
2503
2654
  var IconWrapper = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: max-content;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n ", ";\n"])), function (_ref) {
2504
- var clickable = _ref.clickable;
2505
- return clickable ? 'pointer' : 'default';
2655
+ var $clickable = _ref.$clickable;
2656
+ return $clickable ? 'pointer' : 'default';
2506
2657
  }, wrapperCss);
2507
2658
  var IconWrapperForSVG = styled__default.g(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n ", ";\n"])), wrapperCss);
2508
2659
  var IconSVGs = {
@@ -2625,7 +2776,7 @@ var Icon = function Icon(_ref2) {
2625
2776
  }
2626
2777
  return React__default.createElement(IconWrapper, {
2627
2778
  onClick: onClick,
2628
- clickable: !!onClick
2779
+ "$clickable": !!onClick
2629
2780
  }, React__default.createElement(IconSVG, {
2630
2781
  size: size,
2631
2782
  color: color,
@@ -2633,156 +2784,311 @@ var Icon = function Icon(_ref2) {
2633
2784
  }));
2634
2785
  };
2635
2786
 
2636
- var colorVariables = {
2637
- brand: {
2638
- primary: "#4C9EEB",
2639
- secondary: "#14171A",
2640
- light: "#FFFFFF"
2641
- },
2642
- accent: {
2643
- light: "#E1E8ED",
2644
- extraLight: "#F5F8FA",
2645
- softBlue: "#D4EEFF",
2646
- extraSoftBlue: "#E4F4FF",
2647
- boldTransparent: '#5E5E5E80',
2648
- transparent: "#5E5E5E4D",
2649
- lightTransparent: "#5E5E5E23"
2650
- },
2651
- "default": {
2652
- primary: "#78B6F0",
2653
- secondary: '#C2C2C2',
2654
- tertiary: 'transparent',
2655
- error: "#F44336",
2656
- success: "#4CAF50",
2657
- warning: "#FF9800",
2658
- info: "#2159F3"
2659
- },
2660
- disabled: {
2661
- primary: "#B9DCF7",
2662
- secondary: '#DADADA',
2663
- error: "#FFEBEE",
2664
- success: "#E8F5E9",
2665
- warning: "#FFF3E0",
2666
- info: "#E3F2FD"
2667
- },
2668
- hover: {
2669
- primary: "#4C9EEB",
2670
- secondary: '#A3A3A3',
2671
- tertiary: 'transparent',
2672
- error: "#D32F2F",
2673
- success: "#388E3C",
2674
- warning: "#F57C00",
2675
- info: "#193ED2"
2676
- },
2677
- border: {
2678
- extraBold: "#657786",
2679
- bold: "#BFBFBF",
2680
- medium: "#CBCED0",
2681
- light: "#DCDCDC",
2682
- extraLight: "#E6E3E3"
2683
- },
2684
- text: {
2685
- dark: "#14171A",
2686
- medium: "#657786",
2687
- light: "#98A2AA",
2688
- white: "#FFFFFF",
2689
- success: "#1B5E20",
2690
- error: "#B71C1C",
2691
- info: "#0D30A1",
2692
- warning: "#E65100"
2693
- },
2694
- badge: {
2695
- lavender: '#E8DAFF',
2696
- papayaWhip: '#FFEDD5',
2697
- water: '#C7E3FF',
2698
- paleBlue: '#B0F0E4',
2699
- teaGreen: '#D5F7C2',
2700
- lightBlue: '#ADD8E6'
2701
- }
2702
- };
2703
- var darkColorVariables = {
2704
- brand: {
2705
- primary: "#4C9EEB",
2706
- secondary: "#FFFFFF",
2707
- light: "#1A1A1A"
2708
- },
2709
- accent: {
2710
- light: "#2F2F2F",
2711
- extraLight: "#1E1E1E",
2712
- softBlue: "#7A7A7A",
2713
- extraSoftBlue: "#2A3C50",
2714
- boldTransparent: '#AFAF80',
2715
- transparent: "#AFAF4D",
2716
- lightTransparent: "#AFAF23"
2717
- },
2718
- "default": {
2719
- primary: "#3B82F6",
2720
- secondary: '#B0B0B0',
2721
- tertiary: 'transparent',
2722
- error: "#F44336",
2723
- success: "#4CAF50",
2724
- warning: "#FF9800",
2725
- info: "#2159F3"
2726
- },
2727
- disabled: {
2728
- primary: "#B9DCF7",
2729
- secondary: "#3B3B3B",
2730
- error: "#FFEBEE",
2731
- success: "#E8F5E9",
2732
- warning: "#FFF3E0",
2733
- info: "#E3F2FD"
2734
- },
2735
- hover: {
2736
- primary: "#4C9EEB",
2737
- secondary: '#A3A3A3',
2738
- tertiary: 'transparent',
2739
- error: "#D32F2F",
2740
- success: "#388E3C",
2741
- warning: "#F57C00",
2742
- info: "#1976D2"
2743
- },
2744
- border: {
2745
- extraBold: "#657786",
2746
- bold: "#BFBFBF",
2747
- medium: "#CBCED0",
2748
- light: "#7A7A7A",
2749
- extraLight: "#E6E3E3"
2750
- },
2751
- text: {
2752
- dark: "#FFFFFF",
2753
- medium: "#C7C7C7",
2754
- light: "#A0A0A0",
2755
- white: "#FFFFFF",
2756
- success: "#1B5E20",
2757
- error: "#B71C1C",
2758
- info: "#0D30A1",
2759
- warning: "#E65100"
2760
- },
2761
- badge: {
2762
- lavender: '#E8DAFF',
2763
- papayaWhip: '#FFEDD5',
2764
- water: '#C7E3FF',
2765
- paleBlue: '#B0F0E4',
2766
- teaGreen: '#D5F7C2',
2767
- lightBlue: '#ADD8E6'
2768
- }
2787
+ var _templateObject$1, _templateObject2$1;
2788
+ var Container = styled__default.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex: ", ";\n flex-wrap: ", ";\n flex-direction: ", ";\n justify-content: ", ";\n align-items: ", "; \n gap: ", ";\n font-weight: ", ";\n height: ", ";\n min-height: ", ";\n max-height: ", ";\n width: ", ";\n min-width: ", ";\n max-width: ", ";\n padding: ", ";\n background: ", ";\n object-fit:", ";\n margin: ", ";\n border-radius: ", ";\n cursor: ", ";\n font-size: ", ";\n opacity: ", ";\n pointer-events: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n text-align: ", "; \n color: ", "; \n overflow: ", ";\n overflow-y: ", ";\n z-index: ", "; \n scrollbar-width: ", ";\n border: ", "; \n border-bottom: ", "; \n\n &:hover {\n background: ", ";\n color: ", ";\n }\n"])), function (_ref) {
2789
+ var $flex = _ref.$flex;
2790
+ return $flex;
2791
+ }, function (_ref2) {
2792
+ var $flexWrap = _ref2.$flexWrap;
2793
+ return $flexWrap;
2794
+ }, function (_ref3) {
2795
+ var $flexDirection = _ref3.$flexDirection;
2796
+ return $flexDirection;
2797
+ }, function (_ref4) {
2798
+ var $justifyContent = _ref4.$justifyContent;
2799
+ return $justifyContent;
2800
+ }, function (_ref5) {
2801
+ var $alignItems = _ref5.$alignItems;
2802
+ return $alignItems;
2803
+ }, function (_ref6) {
2804
+ var $gap = _ref6.$gap;
2805
+ return $gap;
2806
+ }, function (_ref7) {
2807
+ var $fontWeight = _ref7.$fontWeight;
2808
+ return $fontWeight;
2809
+ }, function (_ref8) {
2810
+ var $height = _ref8.$height;
2811
+ return $height;
2812
+ }, function (_ref9) {
2813
+ var $minHeight = _ref9.$minHeight;
2814
+ return $minHeight;
2815
+ }, function (_ref10) {
2816
+ var $maxHeight = _ref10.$maxHeight;
2817
+ return $maxHeight;
2818
+ }, function (_ref11) {
2819
+ var $width = _ref11.$width;
2820
+ return $width;
2821
+ }, function (_ref12) {
2822
+ var $minWidth = _ref12.$minWidth;
2823
+ return $minWidth;
2824
+ }, function (_ref13) {
2825
+ var $maxWidth = _ref13.$maxWidth;
2826
+ return $maxWidth;
2827
+ }, function (_ref14) {
2828
+ var $padding = _ref14.$padding;
2829
+ return $padding;
2830
+ }, function (_ref15) {
2831
+ var $background = _ref15.$background;
2832
+ return $background;
2833
+ }, function (_ref16) {
2834
+ var $objectfit = _ref16.$objectfit;
2835
+ return $objectfit;
2836
+ }, function (_ref17) {
2837
+ var $margin = _ref17.$margin;
2838
+ return $margin;
2839
+ }, function (_ref18) {
2840
+ var $borderRadius = _ref18.$borderRadius;
2841
+ return $borderRadius;
2842
+ }, function (_ref19) {
2843
+ var $cursor = _ref19.$cursor;
2844
+ return $cursor;
2845
+ }, function (_ref20) {
2846
+ var $fontSize = _ref20.$fontSize;
2847
+ return $fontSize;
2848
+ }, function (_ref21) {
2849
+ var $opacity = _ref21.$opacity;
2850
+ return $opacity;
2851
+ }, function (_ref22) {
2852
+ var $pointerEvents = _ref22.$pointerEvents;
2853
+ return $pointerEvents;
2854
+ }, function (_ref23) {
2855
+ var $position = _ref23.$position;
2856
+ return $position;
2857
+ }, function (_ref24) {
2858
+ var $top = _ref24.$top;
2859
+ return $top;
2860
+ }, function (_ref25) {
2861
+ var $bottom = _ref25.$bottom;
2862
+ return $bottom;
2863
+ }, function (_ref26) {
2864
+ var $left = _ref26.$left;
2865
+ return $left;
2866
+ }, function (_ref27) {
2867
+ var $right = _ref27.$right;
2868
+ return $right;
2869
+ }, function (_ref28) {
2870
+ var $textAlign = _ref28.$textAlign;
2871
+ return $textAlign;
2872
+ }, function (_ref29) {
2873
+ var $color = _ref29.$color;
2874
+ return $color;
2875
+ }, function (_ref30) {
2876
+ var $overflow = _ref30.$overflow;
2877
+ return $overflow || 'visible';
2878
+ }, function (_ref31) {
2879
+ var $overflowY = _ref31.$overflowY;
2880
+ return $overflowY;
2881
+ }, function (_ref32) {
2882
+ var $zIndex = _ref32.$zIndex;
2883
+ return $zIndex;
2884
+ }, function (_ref33) {
2885
+ var $scrollbarWidth = _ref33.$scrollbarWidth;
2886
+ return $scrollbarWidth;
2887
+ }, function (_ref34) {
2888
+ var $border = _ref34.$border;
2889
+ return $border;
2890
+ }, function (_ref35) {
2891
+ var $bottomborder = _ref35.$bottomborder;
2892
+ return $bottomborder;
2893
+ }, function (_ref36) {
2894
+ var $hoverBackground = _ref36.$hoverBackground;
2895
+ return $hoverBackground;
2896
+ }, function (_ref37) {
2897
+ var $hoverColor = _ref37.$hoverColor;
2898
+ return $hoverColor;
2899
+ });
2900
+ var Span = styled__default.span(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: ", ";\n text-align: ", ";\n min-width: ", ";\n width: ", ";\n overflow-wrap: ", ";\n"])), function (_ref38) {
2901
+ var $fontFamily = _ref38.$fontFamily;
2902
+ return $fontFamily ? $fontFamily : 'NotoSans, sans-serif';
2903
+ }, function (_ref39) {
2904
+ var $fontWeight = _ref39.$fontWeight;
2905
+ return $fontWeight ? $fontWeight : '500';
2906
+ }, function (_ref40) {
2907
+ var $fontSize = _ref40.$fontSize;
2908
+ return $fontSize ? $fontSize : '16px';
2909
+ }, function (_ref41) {
2910
+ var color = _ref41.color;
2911
+ return color ? color : colorVariables.text.medium;
2912
+ }, function (_ref42) {
2913
+ var $lineHeight = _ref42.$lineHeight;
2914
+ return $lineHeight ? $lineHeight : '100%';
2915
+ }, function (_ref43) {
2916
+ var $textAlign = _ref43.$textAlign;
2917
+ return $textAlign ? $textAlign : 'center';
2918
+ }, function (_ref44) {
2919
+ var $minWidth = _ref44.$minWidth;
2920
+ return $minWidth;
2921
+ }, function (_ref45) {
2922
+ var $width = _ref45.$width;
2923
+ return $width;
2924
+ }, function (_ref46) {
2925
+ var $overflowWrap = _ref46.$overflowWrap;
2926
+ return $overflowWrap;
2927
+ });
2928
+
2929
+ var _templateObject$2, _templateObject2$2;
2930
+ var TooltipWrapper = styled__default.div(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n svg {\n cursor: pointer;\n } \n"])));
2931
+ var TooltipText = styled__default.span(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteralLoose(["\n visibility: ", ";\n opacity: ", ";\n width: max-content;\n max-width: 300px;\n background-color: ", ";\n color: ", ";\n text-align: start;\n border-radius: 8px;\n padding:8px 16px;\n transition: opacity 0.2s ease-in-out;\n font-size: 12px;\n\n // position: absolute;\n // left: 0;\n // bottom: 150%;\n // white-space: pre-line;\n // position: fixed;\n // z-index: 99999;\n // transition: opacity 0.2s ease-in-out;\n // font-size: 12px;\n // pointer-events: auto;\n"])), function (_ref) {
2932
+ var $visible = _ref.$visible;
2933
+ return $visible ? 'visible' : 'hidden';
2934
+ }, function (_ref2) {
2935
+ var $visible = _ref2.$visible;
2936
+ return $visible ? 1 : 0;
2937
+ }, function (_ref3) {
2938
+ var $bgColor = _ref3.$bgColor;
2939
+ return $bgColor || colorVariables.brand.light;
2940
+ }, colorVariables.text.medium);
2941
+ var Badge = function Badge(_ref4) {
2942
+ var text = _ref4.text,
2943
+ _ref4$height = _ref4.height,
2944
+ height = _ref4$height === void 0 ? '24px' : _ref4$height,
2945
+ _ref4$fontSize = _ref4.fontSize,
2946
+ fontSize = _ref4$fontSize === void 0 ? '12px' : _ref4$fontSize,
2947
+ _ref4$padding = _ref4.padding,
2948
+ padding = _ref4$padding === void 0 ? '6px 8px' : _ref4$padding,
2949
+ background = _ref4.background,
2950
+ textColor = _ref4.textColor,
2951
+ _ref4$icon = _ref4.icon,
2952
+ icon = _ref4$icon === void 0 ? {
2953
+ icon: 'Information',
2954
+ size: 10,
2955
+ weight: '0.1px',
2956
+ color: colorVariables.text.medium
2957
+ } : _ref4$icon,
2958
+ tooltipText = _ref4.tooltipText;
2959
+ var _useState = React.useState(false),
2960
+ showTooltip = _useState[0],
2961
+ setShowTooltip = _useState[1];
2962
+ var wrapperRef = React.useRef(null);
2963
+ var _useState2 = React.useState({}),
2964
+ tooltipStyle = _useState2[0],
2965
+ setTooltipStyle = _useState2[1];
2966
+ var handleMouseEnter = function handleMouseEnter() {
2967
+ setShowTooltip(true);
2968
+ if (wrapperRef.current) {
2969
+ var rect = wrapperRef.current.getBoundingClientRect();
2970
+ setTooltipStyle({
2971
+ position: 'fixed',
2972
+ left: rect.left,
2973
+ top: rect.top - 8,
2974
+ transform: 'translateY(-100%)',
2975
+ zIndex: 10,
2976
+ pointerEvents: 'auto'
2977
+ });
2978
+ }
2979
+ };
2980
+ var handleMouseLeave = function handleMouseLeave() {
2981
+ return setShowTooltip(false);
2982
+ };
2983
+ return React__default.createElement(Container, {
2984
+ ref: wrapperRef,
2985
+ "$height": height,
2986
+ "$padding": padding,
2987
+ "$borderRadius": '4px',
2988
+ "$background": background,
2989
+ "$alignItems": 'center',
2990
+ "$justifyContent": 'center',
2991
+ "$width": 'fit-content',
2992
+ "$gap": '4px',
2993
+ "$position": 'relative'
2994
+ }, tooltipText && icon && React__default.createElement(TooltipWrapper, {
2995
+ onMouseEnter: handleMouseEnter,
2996
+ onMouseLeave: handleMouseLeave
2997
+ }, React__default.createElement(Icon, {
2998
+ icon: icon.icon,
2999
+ size: icon.size,
3000
+ weight: icon.weight,
3001
+ color: icon.color
3002
+ }), showTooltip && React__default.createElement(TooltipText, {
3003
+ "$bgColor": background,
3004
+ "$visible": showTooltip,
3005
+ style: tooltipStyle
3006
+ }, tooltipText)), React__default.createElement(Span, {
3007
+ "$fontSize": fontSize,
3008
+ "$fontWeight": '500',
3009
+ "$color": textColor,
3010
+ "$lineHeight": '12px'
3011
+ }, text));
2769
3012
  };
2770
- var themes = {
2771
- light: colorVariables,
2772
- dark: darkColorVariables
3013
+
3014
+ var _templateObject$3;
3015
+ var BreadCrum = styled__default.span(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n font-weight: 400;\n font-size: 12px;\n color: ", ";\n line-height: 100%;\n text-align: center;\n opacity: ", ";\n \n &:hover {\n text-decoration: ", ";\n cursor: ", ";\n color: ", ";\n }\n"])), function (_ref) {
3016
+ var $color = _ref.$color;
3017
+ return $color ? $color : colorVariables.text.medium;
3018
+ }, function (_ref2) {
3019
+ var $disabled = _ref2.$disabled;
3020
+ return $disabled ? '0.6' : '1';
3021
+ }, function (_ref3) {
3022
+ var $hover = _ref3.$hover,
3023
+ $disabled = _ref3.$disabled;
3024
+ return $hover && !$disabled && 'underline';
3025
+ }, function (_ref4) {
3026
+ var $hover = _ref4.$hover,
3027
+ $disabled = _ref4.$disabled;
3028
+ return $hover && !$disabled ? 'pointer' : 'default';
3029
+ }, function (_ref5) {
3030
+ var $hover = _ref5.$hover,
3031
+ $disabled = _ref5.$disabled;
3032
+ return $hover && !$disabled && colorVariables["default"].primary;
3033
+ });
3034
+ var Breadcrumbs = function Breadcrumbs(_ref6) {
3035
+ var _breadcrumbs$;
3036
+ var backLink = _ref6.backLink,
3037
+ _ref6$disabled = _ref6.disabled,
3038
+ disabled = _ref6$disabled === void 0 ? false : _ref6$disabled,
3039
+ breadcrumbs = _ref6.breadcrumbs,
3040
+ onBackClick = _ref6.onBackClick;
3041
+ var navigate = reactRouterDom.useNavigate();
3042
+ var _useState = React.useState(false),
3043
+ hovered = _useState[0],
3044
+ setHovered = _useState[1];
3045
+ return React__default.createElement(Container, {
3046
+ "$gap": '8px',
3047
+ "$justifyContent": 'center',
3048
+ "$alignItems": 'center'
3049
+ }, backLink && React__default.createElement(Span, {
3050
+ "$fontSize": '12px',
3051
+ "$fontWeight": '400',
3052
+ "$color": hovered ? 'primaryColor' : 'textColor',
3053
+ onMouseEnter: function onMouseEnter() {
3054
+ return setHovered(true);
3055
+ },
3056
+ onMouseLeave: function onMouseLeave() {
3057
+ return setHovered(false);
3058
+ },
3059
+ onClick: onBackClick
3060
+ }, (_breadcrumbs$ = breadcrumbs[0]) === null || _breadcrumbs$ === void 0 ? void 0 : _breadcrumbs$.text), breadcrumbs.map(function (breadcrumb, index) {
3061
+ return React__default.createElement(React__default.Fragment, {
3062
+ key: index
3063
+ }, index > 0 && React__default.createElement(Span, {
3064
+ "$fontSize": '12px',
3065
+ "$fontWeight": '400'
3066
+ }, React__default.createElement(Icon, {
3067
+ icon: 'RightArrow',
3068
+ size: 5,
3069
+ color: colorVariables.text.medium
3070
+ })), React__default.createElement(BreadCrum, {
3071
+ onClick: function onClick() {
3072
+ if (breadcrumb.navigateLink) navigate(breadcrumb.navigateLink);
3073
+ },
3074
+ "$hover": breadcrumb.navigateLink ? true : false,
3075
+ "$disabled": disabled,
3076
+ "$color": breadcrumb.navigateLink ? colorVariables.text.dark : colorVariables.text.medium
3077
+ }, breadcrumb.text));
3078
+ }));
2773
3079
  };
2774
3080
 
2775
- var _templateObject$1;
2776
- var fontFaces = styled.css(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n @font-face {\n font-family: 'NotoSans';\n font-weight: 200;\n font-style: normal;\n src: url('./NotoSans-ExtraLight.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 300;\n font-style: normal;\n src: url('./NotoSans-Light.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 400;\n font-style: normal;\n src: url('./NotoSans-Regular.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 400;\n font-style: italic;\n src: url('./NotoSans-italic.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 500;\n font-style: normal;\n src: url('./NotoSans-Medium.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 600;\n font-style: normal;\n src: url('./NotoSans-SemiBold.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 700;\n font-style: normal;\n src: url('./NotoSans-Bold.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 800;\n font-style: normal;\n src: url('./NotoSans-ExtraBold.woff') format('woff');\n font-display: fallback;\n }\n"])));
3081
+ var _templateObject$4;
3082
+ var fontFaces = styled.css(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n @font-face {\n font-family: 'NotoSans';\n font-weight: 200;\n font-style: normal;\n src: url('./NotoSans-ExtraLight.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 300;\n font-style: normal;\n src: url('./NotoSans-Light.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 400;\n font-style: normal;\n src: url('./NotoSans-Regular.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 400;\n font-style: italic;\n src: url('./NotoSans-italic.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 500;\n font-style: normal;\n src: url('./NotoSans-Medium.woff') format('woff');\n font-display: fallback;\n }\n\n @font-face {\n font-family: 'NotoSans';\n font-weight: 600;\n font-style: normal;\n src: url('./NotoSans-SemiBold.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 700;\n font-style: normal;\n src: url('./NotoSans-Bold.woff') format('woff');\n font-display: fallback;\n }\n @font-face {\n font-family: 'NotoSans';\n font-weight: 800;\n font-style: normal;\n src: url('./NotoSans-ExtraBold.woff') format('woff');\n font-display: fallback;\n }\n"])));
2777
3083
  var GlobalFonts = {
2778
- bold: "NotoSans, sans-serif",
2779
- regular: "NotoSans, sans-serif",
2780
- light: "NotoSans, sans-serif"
3084
+ bold: 'NotoSans, sans-serif',
3085
+ regular: 'NotoSans, sans-serif',
3086
+ light: 'NotoSans, sans-serif'
2781
3087
  };
2782
3088
 
2783
- var _templateObject$2, _templateObject2$1, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6;
2784
- var spin = styled.keyframes(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n to {\n transform: rotate(360deg);\n }\n"])));
2785
- var Spinner = styled__default.div(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n border: ", "px solid #ddd;\n border-top-color: ", ";\n border-radius: 50%;\n animation: fadeIn 0.3s ease-in-out forwards, ", " 1s linear infinite;\n"])), function (_ref) {
3089
+ var _templateObject$5, _templateObject2$3, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6;
3090
+ var spin = styled.keyframes(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n to {\n transform: rotate(360deg);\n }\n"])));
3091
+ var Spinner = styled__default.div(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n border: ", "px solid #ddd;\n border-top-color: ", ";\n border-radius: 50%;\n animation: fadeIn 0.3s ease-in-out forwards, ", " 1s linear infinite;\n"])), function (_ref) {
2786
3092
  var size = _ref.size;
2787
3093
  return size;
2788
3094
  }, function (_ref2) {
@@ -2802,7 +3108,7 @@ var LoaderWrapper = styled__default.div(_templateObject3$1 || (_templateObject3$
2802
3108
  var loaderPosition = _ref6.loaderPosition;
2803
3109
  return loaderPosition === 'left' ? '4px' : '0';
2804
3110
  });
2805
- var Container = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: ", ";\n gap: ", ";\n svg {\n cursor: ", ";\n }\n"])), function (_ref7) {
3111
+ var Container$1 = styled__default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: ", ";\n gap: ", ";\n svg {\n cursor: ", ";\n }\n"])), function (_ref7) {
2806
3112
  var iconPosition = _ref7.iconPosition;
2807
3113
  return iconPosition === 'right' ? 'row-reverse' : 'row';
2808
3114
  }, function (_ref8) {
@@ -2813,43 +3119,43 @@ var Container = styled__default.div(_templateObject4 || (_templateObject4 = _tag
2813
3119
  return cursor;
2814
3120
  });
2815
3121
  var StyledButton = styled__default.button(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n pointer-events: ", ";\n cursor: ", ";\n height: max-content;\n min-height: max-content;\n width: max-content;\n box-sizing: border-box;\n border-radius: ", ";\n outline: none;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n padding: ", ";\n\n &:focus {\n outline: none;\n }\n\n ", "\n color: ", "; \n"])), function (_ref10) {
2816
- var disabled = _ref10.disabled;
2817
- return disabled ? 'none' : 'auto';
3122
+ var $disabled = _ref10.$disabled;
3123
+ return $disabled ? 'none' : 'auto';
2818
3124
  }, function (_ref11) {
2819
- var disabled = _ref11.disabled;
2820
- return disabled ? 'not-allowed' : 'pointer';
3125
+ var $disabled = _ref11.$disabled;
3126
+ return $disabled ? 'not-allowed' : 'pointer';
2821
3127
  }, function (_ref12) {
2822
- var borderRadius = _ref12.borderRadius;
2823
- return borderRadius || '8px';
3128
+ var $borderRadius = _ref12.$borderRadius;
3129
+ return $borderRadius || '8px';
2824
3130
  }, function (_ref13) {
2825
- var size = _ref13.size,
2826
- padding = _ref13.padding;
2827
- return size === 'small' ? '8px 12.2px' : size === 'medium' ? '10px 19px' : size === 'large' ? '12px 24.5px' : size === 'custom' ? padding : '10px 16px';
3131
+ var $size = _ref13.$size,
3132
+ $padding = _ref13.$padding;
3133
+ return $size === 'small' ? '8px 12.2px' : $size === 'medium' ? '10px 19px' : $size === 'large' ? '12px 24.5px' : $size === 'custom' ? $padding : '10px 16px';
2828
3134
  }, function (_ref14) {
2829
- var _borderHover$match;
2830
- var variant = _ref14.variant,
2831
- disabled = _ref14.disabled,
2832
- borderHover = _ref14.borderHover,
2833
- borderDefault = _ref14.borderDefault,
2834
- background = _ref14.background,
2835
- color = _ref14.color;
2836
- switch (variant) {
3135
+ var _$borderHover$match;
3136
+ var $variant = _ref14.$variant,
3137
+ $disabled = _ref14.$disabled,
3138
+ $borderHover = _ref14.$borderHover,
3139
+ $borderDefault = _ref14.$borderDefault,
3140
+ $background = _ref14.$background,
3141
+ $color = _ref14.$color;
3142
+ switch ($variant) {
2837
3143
  case 'primary':
2838
- return "\n background: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.primary : "1px solid " + colorVariables["default"].primary) + ";\n &:hover {\n background: " + colorVariables.hover.primary + ";\n border: 1px solid " + colorVariables.hover.primary + ";\n }\n ";
3144
+ return "\n background: " + ($disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n color: " + colorVariables.text.white + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.primary : "1px solid " + colorVariables["default"].primary) + ";\n &:hover {\n background: " + colorVariables.hover.primary + ";\n border: 1px solid " + colorVariables.hover.primary + ";\n }\n ";
2839
3145
  case 'secondary':
2840
- return "\n background: " + (disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + "; \n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n background: " + colorVariables.hover.secondary + ";\n border: 1px solid " + colorVariables.hover.secondary + ";\n }\n ";
3146
+ return "\n background: " + ($disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + "; \n color: " + colorVariables.text.white + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n background: " + colorVariables.hover.secondary + ";\n border: 1px solid " + colorVariables.hover.secondary + ";\n }\n ";
2841
3147
  case 'tertiary':
2842
- return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: " + (borderDefault ? "" + borderDefault : "1px solid " + colorVariables["default"].tertiary) + ";\n &:hover {\n color: " + (!disabled && borderHover ? (_borderHover$match = borderHover.match(/#\w+/)) === null || _borderHover$match === void 0 ? void 0 : _borderHover$match[0] : colorVariables.hover.primary) + ";\n border: " + (borderHover ? borderHover : "1px solid " + colorVariables.hover.primary) + ";\n }\n ";
3148
+ return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + ($disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: " + ($borderDefault ? "" + $borderDefault : "1px solid " + colorVariables["default"].tertiary) + ";\n &:hover {\n color: " + (!$disabled && $borderHover ? (_$borderHover$match = $borderHover.match(/#\w+/)) === null || _$borderHover$match === void 0 ? void 0 : _$borderHover$match[0] : colorVariables.hover.primary) + ";\n border: " + ($borderHover ? $borderHover : "1px solid " + colorVariables.hover.primary) + ";\n }\n ";
2843
3149
  case 'error':
2844
- return "\n background: " + (disabled ? colorVariables.disabled.error : colorVariables["default"].error) + "; \n color: " + colorVariables.text.white + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n background: " + colorVariables.hover.error + ";\n border: 1px solid " + colorVariables.hover.error + ";\n }\n ";
3150
+ return "\n background: " + ($disabled ? colorVariables.disabled.error : colorVariables["default"].error) + "; \n color: " + colorVariables.text.white + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n background: " + colorVariables.hover.error + ";\n border: 1px solid " + colorVariables.hover.error + ";\n }\n ";
2845
3151
  case 'outline-primary':
2846
- return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.primary : "1px solid " + colorVariables["default"].primary) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.primary + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.primary + ";\n }\n ";
3152
+ return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + ($disabled ? colorVariables.disabled.primary : colorVariables["default"].primary) + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.primary : "1px solid " + colorVariables["default"].primary) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.primary + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.primary + ";\n }\n ";
2847
3153
  case 'outline-secondary':
2848
- return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.secondary + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.secondary + ";\n }\n ";
3154
+ return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + ($disabled ? colorVariables.disabled.secondary : colorVariables["default"].secondary) + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.secondary : "1px solid " + colorVariables["default"].secondary) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.secondary + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.secondary + ";\n }\n ";
2849
3155
  case 'outline-error':
2850
- return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + (disabled ? colorVariables.disabled.error : colorVariables["default"].error) + ";\n border: " + (disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.error + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.error + ";\n }\n ";
3156
+ return "\n background: " + colorVariables["default"].tertiary + ";\n color: " + ($disabled ? colorVariables.disabled.error : colorVariables["default"].error) + ";\n border: " + ($disabled ? "1px solid " + colorVariables.disabled.error : "1px solid " + colorVariables["default"].error) + ";\n &:hover{\n border: 1px solid " + colorVariables.hover.error + ";\n color: " + colorVariables.text.white + ";\n background: " + colorVariables.hover.error + ";\n }\n ";
2851
3157
  case 'custom':
2852
- return "\n background: " + background + ";\n color: " + color + ";\n border: " + ("1px solid " + borderDefault) + ";\n &:hover{\n border: 1px solid " + borderHover + ";\n color: " + color + ";\n background: " + borderHover + ";\n }\n ";
3158
+ return "\n background: " + $background + ";\n color: " + $color + ";\n border: " + ("1px solid " + $borderDefault) + ";\n &:hover{\n border: 1px solid " + $borderHover + ";\n color: " + $color + ";\n background: " + $borderHover + ";\n }\n ";
2853
3159
  default:
2854
3160
  return '';
2855
3161
  }
@@ -2914,21 +3220,21 @@ var ButtonComponent = function ButtonComponent(_ref20) {
2914
3220
  return React__default.createElement(StyledButton, {
2915
3221
  disabled: disabled,
2916
3222
  onClick: onClick,
2917
- background: background,
2918
- borderDefault: borderDefault,
2919
- borderHover: borderHover,
2920
- borderRadius: borderRadius,
2921
- size: size,
2922
- color: color,
2923
- padding: padding,
2924
- variant: variant,
3223
+ "$background": background,
3224
+ "$borderDefault": borderDefault,
3225
+ "$borderHover": borderHover,
3226
+ "$borderRadius": borderRadius,
3227
+ "$size": size,
3228
+ "$color": color,
3229
+ "$padding": padding,
3230
+ "$variant": variant,
2925
3231
  onMouseEnter: function onMouseEnter() {
2926
3232
  return setIsHovered(true);
2927
3233
  },
2928
3234
  onMouseLeave: function onMouseLeave() {
2929
3235
  return setIsHovered(false);
2930
3236
  }
2931
- }, React__default.createElement(Container, {
3237
+ }, React__default.createElement(Container$1, {
2932
3238
  iconPosition: iconPos,
2933
3239
  gap: gap,
2934
3240
  cursor: !disabled && typeof onClick === 'function' ? 'pointer' : 'default'
@@ -2956,239 +3262,1490 @@ var ButtonComponent = function ButtonComponent(_ref20) {
2956
3262
  })));
2957
3263
  };
2958
3264
 
2959
- var _templateObject$3, _templateObject2$2, _templateObject3$2;
2960
- var InputContainer = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n position: relative; \n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n display: flex; \n flex-direction : column;\n justify-content : center; \n"])), function (_ref) {
2961
- var width = _ref.width;
2962
- return width || "100%";
2963
- }, function (_ref2) {
2964
- var height = _ref2.height;
2965
- return height || "54px";
2966
- }, function (_ref3) {
2967
- var borderRadius = _ref3.borderRadius;
2968
- return borderRadius || "4px";
2969
- }, function (_ref4) {
2970
- var border = _ref4.border;
2971
- return border ? 'border' : '#657786';
2972
- }, function (_ref5) {
2973
- var backgroundColor = _ref5.backgroundColor;
2974
- return backgroundColor || 'transparent';
2975
- });
2976
- var WrittenTextAfterInput = styled__default.p(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteralLoose(["\n position: relative; \n top: 9px;\n left: 8px;\n width: auto;\n height: auto;\n font-family: NotoSans, sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 14px;\n text-align: left;\n color: #4c9eeb;\n margin: 2px;\n visibility: ", ";\n"])), function (_ref6) {
2977
- var show = _ref6.show;
2978
- return show ? "visible" : "hidden";
2979
- });
2980
- var InputBlock = styled__default.input(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n padding: ", ";\n box-sizing: border-box;\n font-family: NotoSans, sans-serif;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n text-align: left;\n outline: none;\n\n ::placeholder {\n color: ", ";\n }\n"])), function (_ref7) {
2981
- var width = _ref7.width;
2982
- return width || "100%";
2983
- }, function (_ref8) {
2984
- var height = _ref8.height;
2985
- return height || "54px";
2986
- }, function (_ref9) {
2987
- var borderRadius = _ref9.borderRadius;
2988
- return borderRadius || "4px";
2989
- }, function (_ref10) {
2990
- var borderColor = _ref10.borderColor;
2991
- return borderColor || "transparent";
2992
- }, function (_ref11) {
2993
- var backgroundColor = _ref11.backgroundColor;
2994
- return backgroundColor || "transparent";
2995
- }, function (_ref12) {
2996
- var fontColor = _ref12.fontColor;
2997
- return fontColor || "#14171A";
2998
- }, function (_ref13) {
2999
- var padding = _ref13.padding;
3000
- return padding || "8px";
3001
- }, function (_ref14) {
3002
- var fontSize = _ref14.fontSize;
3003
- return fontSize || "16px";
3004
- }, function (_ref15) {
3005
- var fontWeight = _ref15.fontWeight;
3006
- return fontWeight || 400;
3007
- }, function (_ref16) {
3008
- var lineHeight = _ref16.lineHeight;
3009
- return lineHeight || '16px';
3010
- }, function (_ref17) {
3011
- var fontColor = _ref17.fontColor;
3012
- return fontColor || "#AABBCC";
3265
+ var _templateObject$6;
3266
+ var InnerContent = styled__default.div(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n overflow-x: auto;\n scroll-behavior: smooth;\n scrollbar-width: none;\n ms-overflow-style: none;\n white-space: nowrap;\n padding: ", "; \n margin: 0 10px;\n"])), function (_ref) {
3267
+ var $isScrollable = _ref.$isScrollable;
3268
+ return $isScrollable ? '0 12px' : '0';
3013
3269
  });
3014
- var MultiFunctionInputComponent = function MultiFunctionInputComponent(_ref18) {
3015
- var label = _ref18.label,
3016
- type = _ref18.type,
3017
- placeholder = _ref18.placeholder,
3018
- width = _ref18.width,
3019
- height = _ref18.height,
3020
- borderColor = _ref18.borderColor,
3021
- backgroundColor = _ref18.backgroundColor,
3022
- fontColor = _ref18.fontColor,
3023
- fontSize = _ref18.fontSize,
3024
- value = _ref18.value,
3025
- onChange = _ref18.onChange;
3270
+ var ButtonCarousel = function ButtonCarousel(_ref2) {
3271
+ var contentLength = _ref2.contentLength,
3272
+ innerNode = _ref2.innerNode;
3273
+ var scrollRef = React.useRef(null);
3026
3274
  var _useState = React.useState(false),
3027
- blockText = _useState[0],
3028
- setBlockContent = _useState[1];
3029
- var inputRef = React.useRef(null);
3030
- var handleInputChange = function handleInputChange(e) {
3031
- setBlockContent(true);
3032
- var inputValue = e.target.value;
3033
- if (type === "phone" && inputValue.length > 10) {
3034
- inputValue = inputValue.slice(0, 10);
3275
+ isScrollable = _useState[0],
3276
+ setIsScrollable = _useState[1];
3277
+ var checkScrollable = function checkScrollable() {
3278
+ if (scrollRef.current) {
3279
+ var _scrollRef$current = scrollRef.current,
3280
+ scrollWidth = _scrollRef$current.scrollWidth,
3281
+ clientWidth = _scrollRef$current.clientWidth;
3282
+ setIsScrollable(scrollWidth > clientWidth);
3035
3283
  }
3036
- setBlockContent(inputValue.length > 0);
3037
- onChange(e);
3038
3284
  };
3039
- return React__default.createElement(InputContainer, {
3040
- width: width
3041
- }, React__default.createElement(WrittenTextAfterInput, {
3042
- show: blockText
3043
- }, label), React__default.createElement(InputBlock, {
3044
- ref: inputRef,
3045
- type: type === "phone" ? "tel" : type,
3046
- placeholder: placeholder || label,
3047
- width: width,
3048
- height: height,
3049
- borderColor: borderColor,
3050
- backgroundColor: backgroundColor,
3051
- fontColor: fontColor,
3052
- fontSize: fontSize,
3053
- value: value,
3054
- onChange: handleInputChange
3055
- }));
3056
- };
3057
-
3058
- var Tabs = function Tabs(_ref) {
3059
- return React__default.createElement("div", null, "Tab");
3060
- };
3061
-
3062
- var ProgressBar = function ProgressBar(_ref) {
3063
- var _ref$totalSteps = _ref.totalSteps,
3064
- totalSteps = _ref$totalSteps === void 0 ? 4 : _ref$totalSteps;
3065
- var _useState = React.useState(0),
3066
- currentStep = _useState[0],
3067
- setCurrentStep = _useState[1];
3068
3285
  React.useEffect(function () {
3069
- var interval = setInterval(function () {
3070
- setCurrentStep(function (prevStep) {
3071
- if (prevStep < totalSteps) {
3072
- return prevStep + 1;
3073
- } else {
3074
- clearInterval(interval);
3075
- return totalSteps;
3076
- }
3077
- });
3078
- }, 1000);
3286
+ checkScrollable();
3287
+ window.addEventListener('resize', checkScrollable);
3079
3288
  return function () {
3080
- return clearInterval(interval);
3289
+ return window.removeEventListener('resize', checkScrollable);
3081
3290
  };
3082
- }, [totalSteps]);
3083
- return React__default.createElement("div", {
3084
- style: {
3085
- width: "100%",
3086
- textAlign: "center"
3087
- }
3088
- }, React__default.createElement("p", {
3089
- style: {
3090
- fontSize: "14px",
3091
- fontWeight: "400",
3092
- marginBottom: "8px",
3093
- color: "#4C9EEB"
3094
- }
3095
- }, "Step ", currentStep, " out of ", totalSteps), React__default.createElement("div", {
3096
- style: {
3097
- width: "100%",
3098
- backgroundColor: "#f3f3f3",
3099
- borderRadius: "5px",
3100
- overflow: "hidden"
3291
+ }, [contentLength]);
3292
+ var scrollLeft = function scrollLeft() {
3293
+ if (scrollRef.current) {
3294
+ scrollRef.current.scrollBy({
3295
+ left: -150,
3296
+ behavior: 'smooth'
3297
+ });
3101
3298
  }
3102
- }, React__default.createElement("div", {
3103
- style: {
3104
- width: currentStep / totalSteps * 100 + "%",
3105
- height: "6px",
3106
- backgroundColor: "#4C9EEB",
3107
- transition: "width 0.5s ease-in-out"
3299
+ };
3300
+ var scrollRight = function scrollRight() {
3301
+ if (scrollRef.current) {
3302
+ scrollRef.current.scrollBy({
3303
+ left: 150,
3304
+ behavior: 'smooth'
3305
+ });
3108
3306
  }
3109
- })));
3307
+ };
3308
+ var handleWheelScroll = function handleWheelScroll(event) {
3309
+ if (!scrollRef.current || !isScrollable) return;
3310
+ var scrollFactor = event.deltaMode === 1 ? 50 : 3;
3311
+ var scrollAmount = event.deltaY * scrollFactor;
3312
+ scrollRef.current.scrollBy({
3313
+ left: scrollAmount,
3314
+ behavior: 'smooth'
3315
+ });
3316
+ };
3317
+ return React__default.createElement(Container, {
3318
+ "$alignItems": 'center',
3319
+ "$justifyContent": 'start',
3320
+ "$height": '26px',
3321
+ "$minHeight": '26px',
3322
+ "$position": 'relative',
3323
+ "$overflow": 'hidden',
3324
+ "$width": '100%'
3325
+ }, isScrollable && React__default.createElement(ButtonComponent, {
3326
+ icon: 'LeftArrow',
3327
+ size: 'custom',
3328
+ variant: 'tertiary',
3329
+ padding: '5px',
3330
+ borderRadius: '50%',
3331
+ onClick: scrollLeft,
3332
+ iconSize: 10,
3333
+ borderDefault: "2px solid " + colorVariables["default"].tertiary,
3334
+ borderHover: "2px solid " + colorVariables.hover.primary
3335
+ }), React__default.createElement(InnerContent, {
3336
+ "$isScrollable": isScrollable,
3337
+ ref: scrollRef,
3338
+ onWheel: handleWheelScroll
3339
+ }, innerNode), isScrollable && React__default.createElement(ButtonComponent, {
3340
+ icon: 'RightArrow',
3341
+ size: 'custom',
3342
+ variant: 'tertiary',
3343
+ padding: '5px',
3344
+ borderRadius: '50%',
3345
+ onClick: scrollRight,
3346
+ iconSize: 10,
3347
+ borderDefault: "2px solid " + colorVariables["default"].tertiary,
3348
+ borderHover: "2px solid " + colorVariables.hover.primary
3349
+ }));
3110
3350
  };
3111
3351
 
3112
- var _templateObject$4, _templateObject2$3, _templateObject3$3, _templateObject4$1;
3113
- var spin$1 = styled.keyframes(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n 0% { opacity: 1; }\n 100% { opacity: 0.3; }\n"])));
3114
- var getDotPosition = function getDotPosition(index, size) {
3115
- var angle = index * 360 / 8;
3116
- var radius = size / 2.5;
3117
- var x = radius * Math.cos(angle * Math.PI / 180);
3118
- var y = radius * Math.sin(angle * Math.PI / 180);
3119
- return "translate(" + x + "px, " + y + "px)";
3352
+ var convertToEpoch = function convertToEpoch(dateString) {
3353
+ var date = new Date(dateString);
3354
+ date.setMilliseconds(0);
3355
+ return Math.floor(date.getTime() / 1000);
3120
3356
  };
3121
- var SpinnerContainer = styled__default.div(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n position: relative;\n width: ", "px;\n height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref) {
3122
- var size = _ref.size;
3123
- return size;
3124
- }, function (_ref2) {
3125
- var size = _ref2.size;
3126
- return size;
3127
- });
3128
- var Dot = styled__default.div.attrs(function (_ref3) {
3129
- var index = _ref3.index,
3130
- size = _ref3.size;
3131
- return {
3132
- style: {
3133
- transform: getDotPosition(index, size)
3357
+ var formatDate = function formatDate(inputDate) {
3358
+ var dateObj = new Date(inputDate);
3359
+ var month = (dateObj.getMonth() + 1).toString().padStart(2, '0');
3360
+ var day = dateObj.getDate().toString().padStart(2, '0');
3361
+ return month + "/" + day;
3362
+ };
3363
+ var formatTimestamp = function formatTimestamp(input) {
3364
+ if (!input) {
3365
+ return '';
3366
+ }
3367
+ var date;
3368
+ if (typeof input === 'string') {
3369
+ var dateParts = input.split(/[/ :]/);
3370
+ var _day = parseInt(dateParts[0], 10);
3371
+ var monthStr = dateParts[1];
3372
+ var _year = parseInt(dateParts[2], 10);
3373
+ var _hours = parseInt(dateParts[3], 10);
3374
+ var _minutes = parseInt(dateParts[4], 10);
3375
+ var _month = new Date(Date.parse(monthStr + ' 1, 2021')).getMonth();
3376
+ if (isNaN(_day) || isNaN(_month) || isNaN(_year) || isNaN(_hours) || isNaN(_minutes)) {
3377
+ return '';
3134
3378
  }
3135
- };
3136
- })(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 50%;\n animation: ", " ", "s linear infinite;\n animation-delay: ", "s;\n"])), function (_ref4) {
3137
- var dotSize = _ref4.dotSize;
3138
- return dotSize;
3139
- }, function (_ref5) {
3140
- var dotSize = _ref5.dotSize;
3141
- return dotSize;
3142
- }, function (_ref6) {
3143
- var color = _ref6.color;
3144
- return color;
3145
- }, spin$1, function (_ref7) {
3146
- var speed = _ref7.speed;
3147
- return speed;
3148
- }, function (_ref8) {
3149
- var index = _ref8.index,
3150
- speed = _ref8.speed;
3151
- return index * speed / 8;
3152
- });
3153
- var SpinnerWrapper = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: max-content;\n"])));
3154
- var sizeMap = {
3155
- small: {
3156
- size: 32
3157
- },
3158
- medium: {
3159
- size: 48
3160
- },
3161
- large: {
3162
- size: 64
3379
+ date = new Date(Date.UTC(_year, _month, _day, _hours, _minutes));
3380
+ } else {
3381
+ date = input;
3163
3382
  }
3383
+ var year = date.getFullYear();
3384
+ var month = date.getMonth() + 1;
3385
+ var day = date.getDate();
3386
+ var hours = date.getHours();
3387
+ var minutes = date.getMinutes();
3388
+ return year + "/" + String(month).padStart(2, '0') + "/" + String(day).padStart(2, '0') + " - " + String(hours).padStart(2, '0') + ":" + String(minutes).padStart(2, '0');
3164
3389
  };
3165
- var CircularLoader = function CircularLoader(_ref9) {
3166
- var _ref9$size = _ref9.size,
3167
- size = _ref9$size === void 0 ? "medium" : _ref9$size,
3168
- _ref9$color = _ref9.color,
3169
- color = _ref9$color === void 0 ? "black" : _ref9$color,
3170
- _ref9$dotSize = _ref9.dotSize,
3171
- dotSize = _ref9$dotSize === void 0 ? 8 : _ref9$dotSize,
3172
- _ref9$speed = _ref9.speed,
3173
- speed = _ref9$speed === void 0 ? 1.2 : _ref9$speed,
3174
- text = _ref9.text,
3175
- customSize = _ref9.customSize;
3176
- var spinnerSize = customSize != null ? customSize : sizeMap[size].size;
3177
- return React__default.createElement(SpinnerWrapper, null, React__default.createElement(SpinnerContainer, {
3178
- size: spinnerSize,
3179
- "aria-label": "Loading animation"
3180
- }, Array.from({
3181
- length: 8
3182
- }).map(function (_, i) {
3183
- return React__default.createElement(Dot, {
3184
- key: i,
3185
- index: i,
3186
- size: spinnerSize,
3187
- dotSize: dotSize,
3188
- color: color,
3189
- speed: speed
3390
+ var formatCalendarDateTime = function formatCalendarDateTime(input) {
3391
+ if (!input) {
3392
+ return '';
3393
+ }
3394
+ var date = input;
3395
+ var timeZoneName = '';
3396
+ var dateString = date.toString();
3397
+ var match = dateString.match(/\(([^)]+)\)/);
3398
+ if (match) {
3399
+ timeZoneName = " (" + match[1] + ")";
3400
+ }
3401
+ var year = date.getFullYear();
3402
+ var month = date.getMonth() + 1;
3403
+ var day = date.getDate();
3404
+ var hours = date.getHours();
3405
+ var minutes = date.getMinutes();
3406
+ return year + "/" + String(month).padStart(2, '0') + "/" + String(day).padStart(2, '0') + " - " + String(hours).padStart(2, '0') + ":" + String(minutes).padStart(2, '0') + timeZoneName;
3407
+ };
3408
+ var timeAgo = function timeAgo(input) {
3409
+ if (!input) {
3410
+ return '';
3411
+ }
3412
+ var dateParts = input.split(/[/ :]/);
3413
+ var day = parseInt(dateParts[0], 10);
3414
+ var monthStr = dateParts[1];
3415
+ var year = parseInt(dateParts[2], 10);
3416
+ var hours = parseInt(dateParts[3], 10);
3417
+ var minutes = parseInt(dateParts[4], 10);
3418
+ var month = new Date(Date.parse(monthStr + ' 1, 2021')).getMonth() + 1;
3419
+ if (isNaN(day) || isNaN(month) || isNaN(year) || isNaN(hours) || isNaN(minutes)) {
3420
+ return '';
3421
+ }
3422
+ var date = new Date(Date.UTC(year, month - 1, day, hours, minutes));
3423
+ var now = new Date();
3424
+ var diffMs = now.getTime() - date.getTime();
3425
+ var diffMins = Math.floor(diffMs / (1000 * 60));
3426
+ var diffHours = Math.floor(diffMins / 60);
3427
+ var diffDays = Math.floor(diffHours / 24);
3428
+ var diffMonths = Math.floor(diffDays / 30);
3429
+ var diffYears = Math.floor(diffDays / 365);
3430
+ if (diffYears >= 1) {
3431
+ return diffYears + " " + ("DeviceLinks:tableText.timeAgoUnits." + (diffYears !== 1 ? 'years' : 'year'));
3432
+ } else if (diffMonths >= 1) {
3433
+ return diffMonths + " " + ("DeviceLinks:tableText.timeAgoUnits." + (diffMonths !== 1 ? 'months' : 'month'));
3434
+ } else if (diffDays >= 1) {
3435
+ return diffDays + " " + ("DeviceLinks:tableText.timeAgoUnits." + (diffDays !== 1 ? 'days' : 'day'));
3436
+ } else if (diffHours >= 1) {
3437
+ return diffHours + " " + ("DeviceLinks:tableText.timeAgoUnits." + (diffHours !== 1 ? 'hours' : 'hour'));
3438
+ } else {
3439
+ return diffMins + " " + ("DeviceLinks:tableText.timeAgoUnits." + (diffMins !== 1 ? 'mins' : 'min'));
3440
+ }
3441
+ };
3442
+ var formatEpochToIST = function formatEpochToIST(epochTime) {
3443
+ var date = new Date(epochTime * 1000);
3444
+ var options = {
3445
+ hour: '2-digit',
3446
+ minute: '2-digit',
3447
+ second: '2-digit',
3448
+ hour12: false,
3449
+ timeZone: 'Asia/Kolkata'
3450
+ };
3451
+ return new Intl.DateTimeFormat('en-GB', options).format(date);
3452
+ };
3453
+ var convertEpochToDateString = function convertEpochToDateString(epoch) {
3454
+ if (epoch === 0 || epoch === null) {
3455
+ return undefined;
3456
+ }
3457
+ var date = new Date(epoch * 1000);
3458
+ return date;
3459
+ };
3460
+ var convertEpochToOnlyDate = function convertEpochToOnlyDate(epoch) {
3461
+ var date = new Date(epoch * 1000);
3462
+ return date.toLocaleDateString('en-US', {
3463
+ month: 'short',
3464
+ day: '2-digit',
3465
+ year: 'numeric'
3466
+ });
3467
+ };
3468
+ var getSystemTimezoneAbbreviation = function getSystemTimezoneAbbreviation() {
3469
+ var date = new Date();
3470
+ var formatter = new Intl.DateTimeFormat('en-US', {
3471
+ timeZoneName: 'short'
3472
+ });
3473
+ var timeZoneNamePart = formatter.formatToParts(date).find(function (part) {
3474
+ return part.type === 'timeZoneName';
3475
+ });
3476
+ var offset = (timeZoneNamePart === null || timeZoneNamePart === void 0 ? void 0 : timeZoneNamePart.value) || 'GMT';
3477
+ var timezoneMapping = {
3478
+ 'UTC': 'UTC',
3479
+ 'GMT': 'GMT',
3480
+ 'GMT+1': 'CET',
3481
+ 'GMT+2': 'EET',
3482
+ 'GMT+5:30': 'IST',
3483
+ 'GMT+9': 'JST',
3484
+ 'GMT-5': 'EST',
3485
+ 'GMT-8': 'PST'
3486
+ };
3487
+ return timezoneMapping[offset] || offset;
3488
+ };
3489
+ var timeStringToSeconds = function timeStringToSeconds(timeString) {
3490
+ var _timeString$split$map = timeString.split(':').map(Number),
3491
+ hours = _timeString$split$map[0],
3492
+ minutes = _timeString$split$map[1],
3493
+ seconds = _timeString$split$map[2];
3494
+ return hours * 3600 + minutes * 60 + seconds;
3495
+ };
3496
+
3497
+ var _templateObject$7, _templateObject2$4, _templateObject3$2, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
3498
+ var DatePickerContainer = styled__default.div(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n"])));
3499
+ var CalendarContainer = styled__default.div(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n overflow: auto;\n display: flex;\n flex-direction: row;\n background: rgba(245, 248, 250, .95); \n position: absolute;\n border: 1px solid ", ";\n height: auto;\n width: auto;\n border-radius: 10px;\n z-index: 10;\n padding: 10px;\n top: 0px;\n right: 0px;\n gap: 16px;\n"])), colorVariables.border.medium);
3500
+ var Calendar$1 = styled__default.div(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose([""])));
3501
+ var CalendarTime = styled__default.div(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n border: 1px solid ", ";\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: 8px;\n"])), colorVariables.border.medium);
3502
+ var StartDate = styled__default.div(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding-bottom: 4px;\n"])));
3503
+ var SelectedStart = styled__default.div(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n gap: 4px;\n color: ", ";\n"])), colorVariables.text.medium);
3504
+ var CurrentDate = styled__default.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-size: 12px;\n"])));
3505
+ var CurrentTime = styled__default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n font-family: NotoSans, sans-serif;\n font-weight: 500;\n font-size: 14px;\n color: ", ";\n"])), colorVariables.text.medium);
3506
+ var Selectedtime = styled__default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n color: ", ";\n gap: 8px;\n"])), colorVariables.text.medium);
3507
+ var Line = styled__default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding-top: 10px;\n padding-bottom: 10px;\n"])));
3508
+ var Zones = styled__default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n"])));
3509
+ var CalendarHeader = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px;\n"])));
3510
+ var CalendarMonthYear = styled__default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n color: ", ";\n justify-content: center;\n align-items: center;\n"])), colorVariables.text.medium);
3511
+ var CalendarContent = styled__default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 5px;\n padding: 10px;\n"])));
3512
+ var Button = styled__default.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n background:", ";\n color: ", ";\n border: none;\n border-radius: 5px;\n padding: 5px 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n\n svg {\n cursor: pointer;\n }\n"])), colorVariables["default"].secondary, colorVariables.text.white, function (_ref) {
3513
+ var $size = _ref.$size;
3514
+ return $size ? $size + "px" : '30px';
3515
+ }, function (_ref2) {
3516
+ var $size = _ref2.$size;
3517
+ return $size ? $size + "px" : '30px';
3518
+ });
3519
+ var CalendarDates = styled__default.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n cursor: ", "; \n font-size: 12px;\n opacity: ", "; \n\n background-color: ", ";\n\n color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref3) {
3520
+ var $size = _ref3.$size;
3521
+ return $size ? $size + "px" : '30px';
3522
+ }, function (_ref4) {
3523
+ var $size = _ref4.$size;
3524
+ return $size ? $size + "px" : '30px';
3525
+ }, function (_ref5) {
3526
+ var $isFuture = _ref5.$isFuture,
3527
+ $futureDateTime = _ref5.$futureDateTime;
3528
+ return !$futureDateTime && $isFuture ? 'default' : 'pointer';
3529
+ }, function (_ref6) {
3530
+ var $isFuture = _ref6.$isFuture,
3531
+ $futureDateTime = _ref6.$futureDateTime;
3532
+ return !$futureDateTime && $isFuture ? 0.5 : 1;
3533
+ }, function (_ref7) {
3534
+ var $selected = _ref7.$selected,
3535
+ $inRange = _ref7.$inRange;
3536
+ return $selected ? colorVariables["default"].primary : $inRange ? colorVariables["default"].primary : colorVariables["default"].tertiary;
3537
+ }, function (_ref8) {
3538
+ var $selected = _ref8.$selected,
3539
+ $inRange = _ref8.$inRange;
3540
+ return $selected ? colorVariables.text.white : $inRange ? colorVariables.text.white : colorVariables.text.medium;
3541
+ }, function (_ref9) {
3542
+ var $selected = _ref9.$selected,
3543
+ $inRange = _ref9.$inRange,
3544
+ $isFuture = _ref9.$isFuture,
3545
+ $futureDateTime = _ref9.$futureDateTime;
3546
+ return !$futureDateTime && $isFuture ? 'transparent' : $selected ? colorVariables.disabled.primary : $inRange ? colorVariables.disabled.primary : colorVariables.disabled.primary;
3547
+ });
3548
+ var Year = styled__default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n font-family: NotoSans, sans-serif;\n font-weight: 500;\n font-size: 12px;\n"])));
3549
+ var Month = styled__default.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n font-family: NotoSans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n"])));
3550
+ var InputWrapper = styled__default.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 24px;\n"])));
3551
+ var TimeInputWrapper = styled__default.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n"])));
3552
+ var StyledInput = styled__default.input(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["\n outline: none;\n width: 60px;\n height: 30px;\n text-align: center;\n font-size: 16px;\n border-radius: 5px;\n background: white;\n border: 1px solid ", ";\n color: ", ";\n"])), colorVariables.border.extraBold, colorVariables.text.dark);
3553
+ var DatePicker = function DatePicker(_ref10) {
3554
+ var _renderState$startDat3, _renderState$startDat4;
3555
+ var _ref10$dateSize = _ref10.dateSize,
3556
+ dateSize = _ref10$dateSize === void 0 ? 30 : _ref10$dateSize,
3557
+ dateTime = _ref10.dateTime,
3558
+ setDateTime = _ref10.setDateTime,
3559
+ _ref10$futureDateTime = _ref10.futureDateTime,
3560
+ futureDateTime = _ref10$futureDateTime === void 0 ? true : _ref10$futureDateTime;
3561
+ var _useTranslation = reactI18next.useTranslation(),
3562
+ t = _useTranslation.t;
3563
+ var _useState = React.useState({
3564
+ startDate: dateTime.startDate || new Date(new Date().setHours(0, 0, 0, 0) - 86400000),
3565
+ endDate: dateTime.endDate || new Date(new Date().setHours(0, 0, 0, 0))
3566
+ }),
3567
+ renderState = _useState[0],
3568
+ setRenderState = _useState[1];
3569
+ var formatDate1 = function formatDate1(date) {
3570
+ return date.toLocaleDateString('en-US', {
3571
+ month: 'short',
3572
+ day: '2-digit',
3573
+ year: 'numeric'
3190
3574
  });
3191
- })), text && React__default.createElement(React__default.Fragment, null, text));
3575
+ };
3576
+ var handleDateClick = function handleDateClick(day) {
3577
+ var _renderState$startDat;
3578
+ var safeStartDate = (_renderState$startDat = renderState.startDate) != null ? _renderState$startDat : new Date();
3579
+ var clickedDate = new Date(safeStartDate.getFullYear(), safeStartDate.getMonth(), day);
3580
+ setDateTime(function (prev) {
3581
+ var newState;
3582
+ if (!prev.startDate || prev.startDate && prev.endDate) {
3583
+ newState = _extends({}, prev, {
3584
+ startDate: clickedDate,
3585
+ endDate: null
3586
+ });
3587
+ } else if (!prev.endDate && clickedDate >= prev.startDate) {
3588
+ newState = _extends({}, prev, {
3589
+ endDate: clickedDate
3590
+ });
3591
+ } else {
3592
+ newState = _extends({}, prev, {
3593
+ startDate: clickedDate,
3594
+ endDate: null
3595
+ });
3596
+ }
3597
+ return newState;
3598
+ });
3599
+ };
3600
+ var renderCalendar = function renderCalendar(dateSize) {
3601
+ var _renderState$startDat2;
3602
+ var safeCurrentDate = (_renderState$startDat2 = renderState.startDate) != null ? _renderState$startDat2 : new Date();
3603
+ var today = new Date();
3604
+ var daysInMonth = new Date(safeCurrentDate.getFullYear(), safeCurrentDate.getMonth() + 1, 0).getDate();
3605
+ var firstDay = new Date(safeCurrentDate.getFullYear(), safeCurrentDate.getMonth(), 1).getDay();
3606
+ var days = [];
3607
+ var weekDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
3608
+ days.push.apply(days, weekDays.map(function (day, index) {
3609
+ return React__default.createElement(CalendarDates, {
3610
+ key: "weekday-" + index,
3611
+ "$size": dateSize
3612
+ }, day);
3613
+ }));
3614
+ for (var i = 0; i < firstDay; i++) {
3615
+ days.push(React__default.createElement(CalendarDates, {
3616
+ key: "empty-" + i,
3617
+ "$size": dateSize
3618
+ }));
3619
+ }
3620
+ var _loop = function _loop(day) {
3621
+ var currentDay = new Date(safeCurrentDate.getFullYear(), safeCurrentDate.getMonth(), day);
3622
+ var isFuture = currentDay > today;
3623
+ var isStartSelected = Boolean(dateTime.startDate && currentDay.toDateString() === new Date(dateTime.startDate).toDateString());
3624
+ var isEndSelected = Boolean(dateTime.endDate && currentDay.toDateString() === new Date(dateTime.endDate).toDateString());
3625
+ var inRange = dateTime.startDate && dateTime.endDate ? currentDay > new Date(dateTime.startDate) && currentDay < new Date(dateTime.endDate) : false;
3626
+ days.push(React__default.createElement(CalendarDates, {
3627
+ key: day,
3628
+ "$selected": isStartSelected || isEndSelected,
3629
+ "$inRange": inRange,
3630
+ "$size": dateSize,
3631
+ "$isFuture": isFuture,
3632
+ "$futureDateTime": futureDateTime,
3633
+ onClick: futureDateTime || !isFuture ? function () {
3634
+ return handleDateClick(day);
3635
+ } : undefined
3636
+ }, day));
3637
+ };
3638
+ for (var day = 1; day <= daysInMonth; day++) {
3639
+ _loop(day);
3640
+ }
3641
+ return days;
3642
+ };
3643
+ var changeHour = function changeHour(value, isStart) {
3644
+ setDateTime(function (prev) {
3645
+ var targetDate = isStart ? prev.startDate : prev.endDate;
3646
+ if (!targetDate) return prev;
3647
+ var newDate = new Date(targetDate || new Date());
3648
+ var newHour = (newDate.getHours() + value) % 24;
3649
+ if (newHour < 0) newHour += 24;
3650
+ newDate.setHours(newHour, newDate.getMinutes(), 0, 0);
3651
+ return isStart ? _extends({}, prev, {
3652
+ startDate: newDate
3653
+ }) : _extends({}, prev, {
3654
+ endDate: newDate
3655
+ });
3656
+ });
3657
+ };
3658
+ var changeMinute = function changeMinute(value, isStart) {
3659
+ setDateTime(function (prev) {
3660
+ var targetDate = isStart ? prev.startDate : prev.endDate;
3661
+ if (!targetDate) return prev;
3662
+ var newDate = new Date(targetDate || new Date());
3663
+ var newMinutes = newDate.getMinutes() + value;
3664
+ var newHours = newDate.getHours();
3665
+ if (newMinutes >= 60) {
3666
+ if (newHours < 23) {
3667
+ newDate.setHours(newHours + 1);
3668
+ newMinutes = 0;
3669
+ } else {
3670
+ return prev;
3671
+ }
3672
+ } else if (newMinutes < 0) {
3673
+ if (newHours > 0) {
3674
+ newDate.setHours(newHours - 1);
3675
+ newMinutes = 59;
3676
+ } else {
3677
+ return prev;
3678
+ }
3679
+ }
3680
+ newDate.setMinutes(newMinutes, 0, 0);
3681
+ return isStart ? _extends({}, prev, {
3682
+ startDate: newDate
3683
+ }) : _extends({}, prev, {
3684
+ endDate: newDate
3685
+ });
3686
+ });
3687
+ };
3688
+ var handleHourChange = function handleHourChange(e, isStart) {
3689
+ var _dateTime$startDate$g, _dateTime$startDate, _dateTime$endDate$get, _dateTime$endDate;
3690
+ if (!dateTime.startDate && !dateTime.endDate) return;
3691
+ var newHour = parseInt(e.target.value, 10);
3692
+ if (isNaN(newHour)) return;
3693
+ var currentHour = isStart ? (_dateTime$startDate$g = (_dateTime$startDate = dateTime.startDate) === null || _dateTime$startDate === void 0 ? void 0 : _dateTime$startDate.getHours()) != null ? _dateTime$startDate$g : 0 : (_dateTime$endDate$get = (_dateTime$endDate = dateTime.endDate) === null || _dateTime$endDate === void 0 ? void 0 : _dateTime$endDate.getHours()) != null ? _dateTime$endDate$get : 0;
3694
+ if (newHour < 0) newHour = 0;
3695
+ if (newHour > 23) newHour = 23;
3696
+ var diff = newHour - currentHour;
3697
+ var now = new Date();
3698
+ var newDate = new Date(isStart ? dateTime.startDate || new Date() : dateTime.endDate || new Date());
3699
+ newDate.setHours(newHour);
3700
+ if (!futureDateTime && newDate > now) {
3701
+ return;
3702
+ }
3703
+ changeHour(diff, isStart);
3704
+ };
3705
+ var handleMinuteChange = function handleMinuteChange(e, isStart) {
3706
+ var _dateTime$startDate$g2, _dateTime$startDate2, _dateTime$endDate$get2, _dateTime$endDate2;
3707
+ if (!dateTime.startDate && !dateTime.endDate) return;
3708
+ var newMinute = parseInt(e.target.value, 10) || 0;
3709
+ var currentMinute = isStart ? (_dateTime$startDate$g2 = (_dateTime$startDate2 = dateTime.startDate) === null || _dateTime$startDate2 === void 0 ? void 0 : _dateTime$startDate2.getMinutes()) != null ? _dateTime$startDate$g2 : 0 : (_dateTime$endDate$get2 = (_dateTime$endDate2 = dateTime.endDate) === null || _dateTime$endDate2 === void 0 ? void 0 : _dateTime$endDate2.getMinutes()) != null ? _dateTime$endDate$get2 : 0;
3710
+ var diff = newMinute - currentMinute;
3711
+ var now = new Date();
3712
+ var newDate = new Date(isStart ? dateTime.startDate || new Date() : dateTime.endDate || new Date());
3713
+ newDate.setMinutes(newMinute);
3714
+ if (!futureDateTime && newDate > now) {
3715
+ return;
3716
+ }
3717
+ changeMinute(diff, isStart);
3718
+ };
3719
+ var formatTime = function formatTime(value) {
3720
+ return value.toString().padStart(2, '0');
3721
+ };
3722
+ return React__default.createElement(DatePickerContainer, null, React__default.createElement(CalendarContainer, {
3723
+ onClick: function onClick(e) {
3724
+ return e.stopPropagation();
3725
+ }
3726
+ }, React__default.createElement(Calendar$1, null, React__default.createElement(CalendarHeader, null, React__default.createElement(Button, {
3727
+ "$size": 38,
3728
+ onClick: function onClick() {
3729
+ setRenderState(function (prev) {
3730
+ var _prev$startDate, _prev$startDate2, _prev$startDate3, _prev$startDate4;
3731
+ return _extends({}, prev, {
3732
+ startDate: new Date(((_prev$startDate = prev.startDate) != null ? _prev$startDate : new Date()).getFullYear(), ((_prev$startDate2 = prev.startDate) != null ? _prev$startDate2 : new Date()).getMonth() - 1, 1),
3733
+ endDate: new Date(((_prev$startDate3 = prev.startDate) != null ? _prev$startDate3 : new Date()).getFullYear(), ((_prev$startDate4 = prev.startDate) != null ? _prev$startDate4 : new Date()).getMonth(), 0)
3734
+ });
3735
+ });
3736
+ }
3737
+ }, React__default.createElement(Icon, {
3738
+ icon: "LeftArrow",
3739
+ color: 'white',
3740
+ size: 12
3741
+ })), React__default.createElement(CalendarMonthYear, null, React__default.createElement(Year, null, (_renderState$startDat3 = renderState.startDate) === null || _renderState$startDat3 === void 0 ? void 0 : _renderState$startDat3.getFullYear()), React__default.createElement(Month, null, (_renderState$startDat4 = renderState.startDate) === null || _renderState$startDat4 === void 0 ? void 0 : _renderState$startDat4.toLocaleDateString('default', {
3742
+ month: 'long'
3743
+ }))), React__default.createElement(Button, {
3744
+ "$size": 38,
3745
+ onClick: function onClick() {
3746
+ setRenderState(function (prev) {
3747
+ var _prev$startDate5, _prev$startDate6, _prev$startDate7, _prev$startDate8;
3748
+ return _extends({}, prev, {
3749
+ startDate: new Date(((_prev$startDate5 = prev.startDate) != null ? _prev$startDate5 : new Date()).getFullYear(), ((_prev$startDate6 = prev.startDate) != null ? _prev$startDate6 : new Date()).getMonth() + 1, 1),
3750
+ endDate: new Date(((_prev$startDate7 = prev.startDate) != null ? _prev$startDate7 : new Date()).getFullYear(), ((_prev$startDate8 = prev.startDate) != null ? _prev$startDate8 : new Date()).getMonth() + 2, 0)
3751
+ });
3752
+ });
3753
+ }
3754
+ }, React__default.createElement(Icon, {
3755
+ icon: "RightArrow",
3756
+ color: 'white',
3757
+ size: 12
3758
+ }))), React__default.createElement(CalendarContent, null, renderCalendar(dateSize))), React__default.createElement(CalendarTime, null, React__default.createElement(StartDate, null, React__default.createElement(SelectedStart, null, React__default.createElement(CurrentDate, null, t('TimePicker_StartDate')), React__default.createElement(CurrentTime, null, React__default.createElement("p", null, dateTime.startDate ? formatDate1(dateTime.startDate) : '-'))), React__default.createElement(Selectedtime, null, React__default.createElement(CurrentDate, null, t('TimePicker_StartTime')), React__default.createElement(InputWrapper, null, React__default.createElement(TimeInputWrapper, null, React__default.createElement(StyledInput, {
3759
+ value: dateTime.startDate ? formatTime(dateTime.startDate.getHours()) : '',
3760
+ type: "number",
3761
+ onChange: function onChange(e) {
3762
+ return handleHourChange(e, true);
3763
+ }
3764
+ })), React__default.createElement(TimeInputWrapper, null, React__default.createElement(StyledInput, {
3765
+ value: dateTime.startDate ? formatTime(dateTime.startDate.getMinutes()) : '',
3766
+ type: "number",
3767
+ onChange: function onChange(e) {
3768
+ return handleMinuteChange(e, true);
3769
+ }
3770
+ }))))), React__default.createElement(Line, null, React__default.createElement("hr", null)), React__default.createElement(StartDate, null, React__default.createElement(SelectedStart, null, React__default.createElement(CurrentDate, null, t('TimePicker_EndDate')), React__default.createElement(CurrentTime, null, React__default.createElement("p", null, dateTime.endDate ? formatDate1(dateTime.endDate) : '-'))), React__default.createElement(Selectedtime, null, React__default.createElement(CurrentDate, null, t('TimePicker_EndTime')), React__default.createElement(InputWrapper, null, React__default.createElement(TimeInputWrapper, null, React__default.createElement(StyledInput, {
3771
+ value: dateTime.endDate ? formatTime(dateTime.endDate.getHours()) : '',
3772
+ type: "number",
3773
+ onChange: function onChange(e) {
3774
+ return handleHourChange(e, false);
3775
+ }
3776
+ })), React__default.createElement(TimeInputWrapper, null, React__default.createElement(StyledInput, {
3777
+ value: dateTime.endDate ? formatTime(dateTime.endDate.getMinutes()) : '',
3778
+ type: "number",
3779
+ onChange: function onChange(e) {
3780
+ return handleMinuteChange(e, false);
3781
+ }
3782
+ }))))), React__default.createElement(Line, null, React__default.createElement("hr", null)), React__default.createElement(Zones, null, React__default.createElement(CurrentTime, null, t('TimePicker_Zone')), React__default.createElement(CurrentTime, null, getSystemTimezoneAbbreviation())))));
3783
+ };
3784
+
3785
+ var _templateObject$8, _templateObject2$5, _templateObject3$3, _templateObject4$2, _templateObject5$2, _templateObject6$2;
3786
+ var OptionContainer = styled__default.div(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose([""])));
3787
+ var OptionItem = styled__default.div(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n border-bottom: ", ";\n"])), function (_ref) {
3788
+ var $optionBorder = _ref.$optionBorder,
3789
+ $isborder = _ref.$isborder;
3790
+ return $isborder ? $optionBorder || "1px solid " + colorVariables.border.extraLight : '';
3791
+ });
3792
+ var OptionLabel = styled__default.label(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n display: flex;\n gap: 8px;\n padding: 8px 12px;\n word-break: break-word;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n font-family: NotoSans, sans-serif;\n font-weight: 500;\n font-size: 14px;\n line-height: 14px;\n color: ", ";\n"])), function (_ref2) {
3793
+ var $optionColor = _ref2.$optionColor;
3794
+ switch ($optionColor) {
3795
+ case 'dark':
3796
+ return colorVariables.text.dark;
3797
+ case 'medium':
3798
+ return colorVariables.text.medium;
3799
+ case 'light':
3800
+ return colorVariables.text.light;
3801
+ case 'white':
3802
+ return colorVariables.text.white;
3803
+ case 'warning':
3804
+ return colorVariables["default"].warning;
3805
+ case 'info':
3806
+ return colorVariables["default"].info;
3807
+ case 'success':
3808
+ return colorVariables["default"].success;
3809
+ case 'error':
3810
+ return colorVariables["default"].error;
3811
+ default:
3812
+ return $optionColor || colorVariables.text.medium;
3813
+ }
3814
+ });
3815
+ var SearchContainer = styled__default.div(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: auto;\n background: ", ";\n border-bottom: ", ";\n border-radius: ", ";\n padding: 8px 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n"])), function (_ref3) {
3816
+ var $background = _ref3.$background;
3817
+ switch ($background) {
3818
+ case 'dark':
3819
+ return colorVariables.text.dark;
3820
+ case 'medium':
3821
+ return colorVariables.text.medium;
3822
+ case 'light':
3823
+ return colorVariables.text.light;
3824
+ case 'white':
3825
+ return colorVariables.text.white;
3826
+ case 'warning':
3827
+ return colorVariables["default"].warning;
3828
+ case 'info':
3829
+ return colorVariables["default"].info;
3830
+ case 'success':
3831
+ return colorVariables["default"].success;
3832
+ case 'error':
3833
+ return colorVariables["default"].error;
3834
+ default:
3835
+ return $background;
3836
+ }
3837
+ }, function (_ref4) {
3838
+ var $borderBottom = _ref4.$borderBottom;
3839
+ return $borderBottom || 'none';
3840
+ }, function (_ref5) {
3841
+ var $borderRadius = _ref5.$borderRadius;
3842
+ return $borderRadius || '8px';
3843
+ });
3844
+ var SearchBar = styled__default.input(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 14px;\n background: ", ";\n color: ", ";\n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), colorVariables["default"].tertiary, function (_ref6) {
3845
+ var $inputColor = _ref6.$inputColor;
3846
+ switch ($inputColor) {
3847
+ case 'dark':
3848
+ return colorVariables.text.dark;
3849
+ case 'medium':
3850
+ return colorVariables.text.medium;
3851
+ case 'light':
3852
+ return colorVariables.text.light;
3853
+ case 'white':
3854
+ return colorVariables.text.white;
3855
+ case 'warning':
3856
+ return colorVariables["default"].warning;
3857
+ case 'info':
3858
+ return colorVariables["default"].info;
3859
+ case 'success':
3860
+ return colorVariables["default"].success;
3861
+ case 'error':
3862
+ return colorVariables["default"].error;
3863
+ default:
3864
+ return $inputColor;
3865
+ }
3866
+ }, function (_ref7) {
3867
+ var $placeholderColor = _ref7.$placeholderColor;
3868
+ switch ($placeholderColor) {
3869
+ case 'dark':
3870
+ return colorVariables.text.dark;
3871
+ case 'medium':
3872
+ return colorVariables.text.medium;
3873
+ case 'light':
3874
+ return colorVariables.text.light;
3875
+ case 'white':
3876
+ return colorVariables.text.white;
3877
+ case 'warning':
3878
+ return colorVariables["default"].warning;
3879
+ case 'info':
3880
+ return colorVariables["default"].info;
3881
+ case 'success':
3882
+ return colorVariables["default"].success;
3883
+ case 'error':
3884
+ return colorVariables["default"].error;
3885
+ default:
3886
+ return $placeholderColor;
3887
+ }
3888
+ });
3889
+ var Text = styled__default.span(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteralLoose(["\n word-break: break-word;\n"])));
3890
+ var OptionComponent = function OptionComponent(_ref8) {
3891
+ var options = _ref8.options,
3892
+ selectedOptions = _ref8.selectedOptions,
3893
+ onChange = _ref8.onChange,
3894
+ _ref8$placeholder = _ref8.placeholder,
3895
+ placeholder = _ref8$placeholder === void 0 ? 'Search...' : _ref8$placeholder,
3896
+ placeholderColor = _ref8.placeholderColor,
3897
+ optionBorder = _ref8.optionBorder,
3898
+ optionColor = _ref8.optionColor,
3899
+ searchIcon = _ref8.searchIcon,
3900
+ searchbarTextColor = _ref8.searchbarTextColor,
3901
+ searchBoxBorder = _ref8.searchBoxBorder,
3902
+ searchBoxBorderRadius = _ref8.searchBoxBorderRadius,
3903
+ searchBoxBackground = _ref8.searchBoxBackground,
3904
+ _ref8$searchBox = _ref8.searchBox,
3905
+ searchBox = _ref8$searchBox === void 0 ? true : _ref8$searchBox,
3906
+ NoOptionsText = _ref8.NoOptionsText;
3907
+ var _useState = React.useState(''),
3908
+ searchQuery = _useState[0],
3909
+ setSearchQuery = _useState[1];
3910
+ var handleSearchChange = function handleSearchChange(e) {
3911
+ setSearchQuery(e.target.value);
3912
+ };
3913
+ var handleOptionToggle = function handleOptionToggle(currentOption) {
3914
+ var newOption = selectedOptions.includes(currentOption) ? selectedOptions.filter(function (item) {
3915
+ return item !== currentOption;
3916
+ }) : [].concat(selectedOptions, [currentOption]);
3917
+ onChange === null || onChange === void 0 ? void 0 : onChange(newOption);
3918
+ };
3919
+ var SortedOptions = [].concat(options).sort(function (a, b) {
3920
+ return a.labelText.localeCompare(b.labelText);
3921
+ }).filter(function (option) {
3922
+ return option.labelText.toLowerCase().includes(searchQuery.toLowerCase());
3923
+ });
3924
+ return React__default.createElement(Container, {
3925
+ "$flexDirection": 'column',
3926
+ "$gap": '8px',
3927
+ "$width": '100%'
3928
+ }, searchBox && React__default.createElement(SearchContainer, {
3929
+ "$borderBottom": searchBoxBorder,
3930
+ "$background": searchBoxBackground,
3931
+ "$borderRadius": searchBoxBorderRadius
3932
+ }, React__default.createElement(Icon, {
3933
+ icon: 'Search',
3934
+ size: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.size) || 16,
3935
+ color: searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.color,
3936
+ weight: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.weight) || '0px'
3937
+ }), React__default.createElement(SearchBar, {
3938
+ type: 'text',
3939
+ placeholder: placeholder,
3940
+ value: searchQuery,
3941
+ onChange: handleSearchChange,
3942
+ "$inputColor": searchbarTextColor,
3943
+ "$placeholderColor": placeholderColor
3944
+ })), React__default.createElement(OptionContainer, null, SortedOptions.length > 0 ? SortedOptions.map(function (option, id) {
3945
+ return React__default.createElement(OptionItem, {
3946
+ key: option.value,
3947
+ "$optionBorder": optionBorder,
3948
+ "$isborder": id !== SortedOptions.length - 1
3949
+ }, React__default.createElement(OptionLabel, {
3950
+ htmlFor: option.value,
3951
+ "$optionColor": optionColor
3952
+ }, React__default.createElement("input", {
3953
+ id: option.value,
3954
+ type: 'checkbox',
3955
+ checked: selectedOptions.includes(option.value),
3956
+ onChange: function onChange() {
3957
+ return handleOptionToggle(option.value);
3958
+ }
3959
+ }), React__default.createElement(Text, null, option.labelText)));
3960
+ }) : React__default.createElement(Container, {
3961
+ "$padding": '8px'
3962
+ }, React__default.createElement(Span, {
3963
+ "$fontSize": '14px'
3964
+ }, NoOptionsText))));
3965
+ };
3966
+
3967
+ var _templateObject$9, _templateObject2$6, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1;
3968
+ var DropdownContainer = styled__default.div(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n max-width: 100%;\n position: relative;\n max-height: ", ";\n"])), function (_ref) {
3969
+ var $width = _ref.$width;
3970
+ return $width || '100%';
3971
+ }, function (_ref2) {
3972
+ var $height = _ref2.$height;
3973
+ return $height || '100%';
3974
+ }, function (_ref3) {
3975
+ var $replaceLabel = _ref3.$replaceLabel;
3976
+ return $replaceLabel ? 'calc(100% - 22px)' : '';
3977
+ });
3978
+ var DropdownButton = styled__default.div(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteralLoose(["\n overflow: ", ";\n padding: ", ";\n gap: 8px;\n box-sizing: border-box;\n transition: all 0.3s ease;\n width: ", ";\n height: ", ";\n border: ", ";\n border-radius: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: ", ";\n background: ", ";\n color: ", ";\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-size: ", ";\n line-height: ", ";\n"])), function (_ref4) {
3979
+ var $replaceLabel = _ref4.$replaceLabel;
3980
+ return $replaceLabel ? 'auto' : '';
3981
+ }, function (_ref5) {
3982
+ var $size = _ref5.$size;
3983
+ switch ($size) {
3984
+ case 'small':
3985
+ return '9px 12px';
3986
+ case 'large':
3987
+ return '24px 12px';
3988
+ default:
3989
+ return '14px 12px';
3990
+ }
3991
+ }, function (_ref6) {
3992
+ var $width = _ref6.$width;
3993
+ return $width ? $width : '100%';
3994
+ }, function (_ref7) {
3995
+ var $height = _ref7.$height;
3996
+ return $height || '100%';
3997
+ }, function (_ref8) {
3998
+ var $border = _ref8.$border,
3999
+ $isOpen = _ref8.$isOpen;
4000
+ return $isOpen ? "1px solid " + colorVariables.text.dark : $border || "1px solid " + colorVariables.border.light;
4001
+ }, function (_ref9) {
4002
+ var $borderRadius = _ref9.$borderRadius;
4003
+ return $borderRadius || '8px';
4004
+ }, function (_ref10) {
4005
+ var $disabled = _ref10.$disabled;
4006
+ return $disabled ? 'not-allowed' : 'pointer';
4007
+ }, function (_ref11) {
4008
+ var $background = _ref11.$background,
4009
+ $disabled = _ref11.$disabled;
4010
+ switch ($background) {
4011
+ case 'dark':
4012
+ return $disabled ? colorVariables.disabled.secondary : colorVariables.text.dark;
4013
+ case 'medium':
4014
+ return $disabled ? colorVariables.disabled.secondary : colorVariables.text.medium;
4015
+ case 'light':
4016
+ return $disabled ? colorVariables.disabled.secondary : colorVariables.text.light;
4017
+ case 'white':
4018
+ return $disabled ? colorVariables.disabled.secondary : colorVariables.text.white;
4019
+ case 'warning':
4020
+ return $disabled ? colorVariables.disabled.secondary : colorVariables["default"].warning;
4021
+ case 'info':
4022
+ return $disabled ? colorVariables.disabled.secondary : colorVariables["default"].info;
4023
+ case 'success':
4024
+ return $disabled ? colorVariables.disabled.secondary : colorVariables["default"].success;
4025
+ case 'error':
4026
+ return $disabled ? colorVariables.disabled.secondary : colorVariables["default"].error;
4027
+ default:
4028
+ return $disabled ? colorVariables.disabled.secondary : $background;
4029
+ }
4030
+ }, function (_ref12) {
4031
+ var $color = _ref12.$color;
4032
+ return $color || colorVariables.text.medium;
4033
+ }, function (_ref13) {
4034
+ var $size = _ref13.$size;
4035
+ switch ($size) {
4036
+ case 'small':
4037
+ return '12px';
4038
+ case 'large':
4039
+ return '16px';
4040
+ default:
4041
+ return '14px';
4042
+ }
4043
+ }, function (_ref14) {
4044
+ var $size = _ref14.$size;
4045
+ switch ($size) {
4046
+ case 'small':
4047
+ return '12px';
4048
+ case 'large':
4049
+ return '16px';
4050
+ default:
4051
+ return '14px';
4052
+ }
4053
+ });
4054
+ var TitleText = styled__default.div(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n width: max-content;\n position: relative;\n font-weight: 500;\n font-size: ", ";\n line-height: ", ";\n\n color: ", ";\n"])), function (_ref15) {
4055
+ var $titleSize = _ref15.$titleSize,
4056
+ $size = _ref15.$size;
4057
+ return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
4058
+ }, function (_ref16) {
4059
+ var $titleSize = _ref16.$titleSize,
4060
+ $size = _ref16.$size;
4061
+ return $titleSize ? $titleSize + "px" : $size === 'small' ? '14px' : $size === 'large' ? '18px' : '16px';
4062
+ }, function (_ref17) {
4063
+ var $titleColor = _ref17.$titleColor;
4064
+ switch ($titleColor) {
4065
+ case 'dark':
4066
+ return colorVariables.text.dark;
4067
+ case 'medium':
4068
+ return colorVariables.text.medium;
4069
+ case 'light':
4070
+ return colorVariables.text.light;
4071
+ case 'white':
4072
+ return colorVariables.text.white;
4073
+ case 'warning':
4074
+ return colorVariables["default"].warning;
4075
+ case 'info':
4076
+ return colorVariables["default"].info;
4077
+ case 'success':
4078
+ return colorVariables["default"].success;
4079
+ case 'error':
4080
+ return colorVariables["default"].error;
4081
+ default:
4082
+ return $titleColor;
4083
+ }
4084
+ });
4085
+ var Container$2 = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n"])));
4086
+ var LabelText = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 400;\n font-style:", ";\n color: ", ";\n"])), function (_ref18) {
4087
+ var $labelStyle = _ref18.$labelStyle;
4088
+ return $labelStyle;
4089
+ }, colorVariables.text.light);
4090
+ var DropdownMenu = styled__default.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n max-height: 156px;\n padding: 4px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n width: ", ";\n background: ", ";\n display: flex;\n flex-direction: column;\n gap: 4px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n margin-top: 8px;\n overflow-y: auto;\n position: absolute;\n z-index: 2;\n scrollbar-width: thin;\n"])), colorVariables.border.light, function (_ref19) {
4091
+ var $optionsBorderRadius = _ref19.$optionsBorderRadius;
4092
+ return $optionsBorderRadius || '8px';
4093
+ }, function (_ref20) {
4094
+ var $width = _ref20.$width;
4095
+ return $width ? $width : 'max-content';
4096
+ }, function (_ref21) {
4097
+ var $menuBackground = _ref21.$menuBackground;
4098
+ return $menuBackground || colorVariables.accent.extraLight;
4099
+ });
4100
+ var SelectedOptionsWrapper = styled__default.div(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n height: 100%;\n"])));
4101
+ var SelectedOptionDiv = styled__default.div(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: ", ";\n border-radius: 4px;\n padding: 6px 8px;\n box-sizing: border-box;\n gap: 6px;\n font-family: NotoSans, sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 12px;\n color: ", ";\n"])), function (_ref22) {
4102
+ var $selectedOptionBackground = _ref22.$selectedOptionBackground,
4103
+ $disabled = _ref22.$disabled;
4104
+ switch ($selectedOptionBackground) {
4105
+ case 'dark':
4106
+ return colorVariables.text.dark;
4107
+ case 'medium':
4108
+ return colorVariables.text.medium;
4109
+ case 'light':
4110
+ return colorVariables.text.light;
4111
+ case 'white':
4112
+ return colorVariables.text.white;
4113
+ case 'warning':
4114
+ return $disabled ? colorVariables.disabled.warning : colorVariables["default"].warning;
4115
+ case 'info':
4116
+ return $disabled ? colorVariables.disabled.info : colorVariables["default"].info;
4117
+ case 'success':
4118
+ return $disabled ? colorVariables.disabled.success : colorVariables["default"].success;
4119
+ case 'error':
4120
+ return $disabled ? colorVariables.disabled.error : colorVariables["default"].error;
4121
+ default:
4122
+ return $selectedOptionBackground || colorVariables.accent.extraLight;
4123
+ }
4124
+ }, function (_ref23) {
4125
+ var $selectedOptionColor = _ref23.$selectedOptionColor;
4126
+ switch ($selectedOptionColor) {
4127
+ case 'dark':
4128
+ return colorVariables.text.dark;
4129
+ case 'medium':
4130
+ return colorVariables.text.medium;
4131
+ case 'light':
4132
+ return colorVariables.text.light;
4133
+ case 'white':
4134
+ return colorVariables.text.white;
4135
+ case 'warning':
4136
+ return colorVariables["default"].warning;
4137
+ case 'info':
4138
+ return colorVariables["default"].info;
4139
+ case 'success':
4140
+ return colorVariables["default"].success;
4141
+ case 'error':
4142
+ return colorVariables["default"].error;
4143
+ default:
4144
+ return $selectedOptionColor;
4145
+ }
4146
+ });
4147
+ var RemoveIcon = styled__default.div(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n > div {\n cursor: ", ";\n }\n"])), function (_ref24) {
4148
+ var $disabled = _ref24.$disabled;
4149
+ return $disabled ? 'not-allowed' : 'pointer';
4150
+ }, function (_ref25) {
4151
+ var removeIconBackground = _ref25.removeIconBackground,
4152
+ $type = _ref25.$type;
4153
+ return removeIconBackground ? removeIconBackground : $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
4154
+ }, function (_ref26) {
4155
+ var $disabled = _ref26.$disabled;
4156
+ return $disabled ? 'not-allowed' : 'pointer';
4157
+ });
4158
+ var TextWrapper = styled__default.div(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 4px;\n"])));
4159
+ var Asterisk = styled__default.span(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 10px;\n height: fit-content;\n position: absolute;\n top: -2px;\n right: -8px;\n"])), colorVariables["default"].error);
4160
+ var MultiSelectDropdown = function MultiSelectDropdown(_ref27) {
4161
+ var title = _ref27.title,
4162
+ titleSize = _ref27.titleSize,
4163
+ _ref27$titleColor = _ref27.titleColor,
4164
+ titleColor = _ref27$titleColor === void 0 ? colorVariables.text.dark : _ref27$titleColor,
4165
+ _ref27$labelText = _ref27.labelText,
4166
+ labelText = _ref27$labelText === void 0 ? 'Select Cameras' : _ref27$labelText,
4167
+ labelStyle = _ref27.labelStyle,
4168
+ labelColor = _ref27.labelColor,
4169
+ _ref27$replaceLabel = _ref27.replaceLabel,
4170
+ replaceLabel = _ref27$replaceLabel === void 0 ? true : _ref27$replaceLabel,
4171
+ options = _ref27.options,
4172
+ width = _ref27.width,
4173
+ optionWidth = _ref27.optionWidth,
4174
+ height = _ref27.height,
4175
+ placeholder = _ref27.placeholder,
4176
+ border = _ref27.border,
4177
+ _ref27$background = _ref27.background,
4178
+ background = _ref27$background === void 0 ? colorVariables["default"].tertiary : _ref27$background,
4179
+ selectedOptionBackground = _ref27.selectedOptionBackground,
4180
+ selectedOptionColor = _ref27.selectedOptionColor,
4181
+ _ref27$menuBackground = _ref27.menuBackground,
4182
+ menuBackground = _ref27$menuBackground === void 0 ? 'white' : _ref27$menuBackground,
4183
+ optionsBorderRadius = _ref27.optionsBorderRadius,
4184
+ borderRadius = _ref27.borderRadius,
4185
+ removeIconBackground = _ref27.removeIconBackground,
4186
+ handleSelectChange = _ref27.handleSelectChange,
4187
+ selectedOptions = _ref27.selectedOptions,
4188
+ placeholderColor = _ref27.placeholderColor,
4189
+ optionBorder = _ref27.optionBorder,
4190
+ optionColor = _ref27.optionColor,
4191
+ searchIcon = _ref27.searchIcon,
4192
+ searchbarTextColor = _ref27.searchbarTextColor,
4193
+ searchBoxBackground = _ref27.searchBoxBackground,
4194
+ searchBoxBorder = _ref27.searchBoxBorder,
4195
+ searchBoxBorderRadius = _ref27.searchBoxBorderRadius,
4196
+ size = _ref27.size,
4197
+ removeIcon = _ref27.removeIcon,
4198
+ type = _ref27.type,
4199
+ icon = _ref27.icon,
4200
+ _ref27$disabled = _ref27.disabled,
4201
+ disabled = _ref27$disabled === void 0 ? false : _ref27$disabled,
4202
+ _ref27$required = _ref27.required,
4203
+ required = _ref27$required === void 0 ? false : _ref27$required,
4204
+ _ref27$searchBox = _ref27.searchBox,
4205
+ searchBox = _ref27$searchBox === void 0 ? true : _ref27$searchBox,
4206
+ _ref27$NoOptionsText = _ref27.NoOptionsText,
4207
+ NoOptionsText = _ref27$NoOptionsText === void 0 ? 'No Options Available' : _ref27$NoOptionsText;
4208
+ var _useState = React.useState(false),
4209
+ isOpen = _useState[0],
4210
+ setIsOpen = _useState[1];
4211
+ var dropdownRef = React.useRef(null);
4212
+ var toggleDropdown = function toggleDropdown() {
4213
+ if (!disabled) setIsOpen(function (prev) {
4214
+ return !prev;
4215
+ });
4216
+ };
4217
+ React.useEffect(function () {
4218
+ var handleClickOutside = function handleClickOutside(event) {
4219
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
4220
+ setIsOpen(false);
4221
+ }
4222
+ };
4223
+ document.addEventListener('mousedown', handleClickOutside);
4224
+ return function () {
4225
+ document.removeEventListener('mousedown', handleClickOutside);
4226
+ };
4227
+ }, []);
4228
+ var selectedOptionObjects = options.filter(function (opt) {
4229
+ return selectedOptions.includes(opt.value);
4230
+ }).sort(function (a, b) {
4231
+ return a.labelText.localeCompare(b.labelText);
4232
+ });
4233
+ var handleOptionRemoval = function handleOptionRemoval(optionValue) {
4234
+ if (handleSelectChange) {
4235
+ handleSelectChange(selectedOptions.filter(function (value) {
4236
+ return value !== optionValue;
4237
+ }));
4238
+ }
4239
+ };
4240
+ return React__default.createElement(Container$2, null, title && React__default.createElement(TitleText, {
4241
+ "$titleColor": titleColor,
4242
+ "$titleSize": titleSize,
4243
+ "$size": size
4244
+ }, title, required && React__default.createElement(Asterisk, null, "*")), React__default.createElement(DropdownContainer, {
4245
+ ref: dropdownRef,
4246
+ "$width": width,
4247
+ "$height": height,
4248
+ "$replaceLabel": replaceLabel
4249
+ }, React__default.createElement(DropdownButton, {
4250
+ onClick: toggleDropdown,
4251
+ "$height": height,
4252
+ "$width": width,
4253
+ "$border": border,
4254
+ "$background": background,
4255
+ "$borderRadius": borderRadius,
4256
+ "$size": size,
4257
+ "$color": labelColor,
4258
+ "$isOpen": isOpen,
4259
+ "$disabled": disabled,
4260
+ "$replaceLabel": replaceLabel
4261
+ }, selectedOptions.length !== 0 && replaceLabel ? React__default.createElement(SelectedOptionsWrapper, null, selectedOptionObjects.map(function (option) {
4262
+ return React__default.createElement(SelectedOptionDiv, {
4263
+ key: option.value,
4264
+ "$disabled": disabled,
4265
+ "$selectedOptionBackground": selectedOptionBackground,
4266
+ "$selectedOptionColor": selectedOptionColor
4267
+ }, option.labelText, React__default.createElement(RemoveIcon, {
4268
+ removeIconBackground: removeIconBackground,
4269
+ "$type": type,
4270
+ "$disabled": disabled,
4271
+ onClick: function onClick(e) {
4272
+ e.stopPropagation();
4273
+ if (!disabled) handleOptionRemoval(option.value);
4274
+ }
4275
+ }, React__default.createElement(Icon, {
4276
+ icon: 'Close',
4277
+ size: (removeIcon === null || removeIcon === void 0 ? void 0 : removeIcon.size) || 6,
4278
+ color: removeIcon !== null && removeIcon !== void 0 && removeIcon.color || type === 'remove' ? colorVariables["default"].error : colorVariables.brand.primary,
4279
+ weight: (removeIcon === null || removeIcon === void 0 ? void 0 : removeIcon.weight) || '0'
4280
+ })));
4281
+ })) : React__default.createElement(TextWrapper, null, icon && React__default.createElement(Icon, {
4282
+ icon: icon.name || 'Tag',
4283
+ size: icon.size || 14,
4284
+ weight: icon.weight || '1',
4285
+ color: icon.color || colorVariables.text.medium
4286
+ }), React__default.createElement(LabelText, {
4287
+ "$labelStyle": labelStyle
4288
+ }, labelText)), React__default.createElement(Icon, {
4289
+ icon: isOpen ? 'UpArrow' : 'DownArrow',
4290
+ size: 7,
4291
+ weight: '2px',
4292
+ color: colorVariables.text.medium
4293
+ })), isOpen && React__default.createElement(DropdownMenu, {
4294
+ "$width": optionWidth,
4295
+ "$menuBackground": menuBackground,
4296
+ "$optionsBorderRadius": optionsBorderRadius
4297
+ }, React__default.createElement(OptionComponent, {
4298
+ options: options,
4299
+ selectedOptions: selectedOptions,
4300
+ onChange: handleSelectChange,
4301
+ placeholder: placeholder,
4302
+ placeholderColor: placeholderColor,
4303
+ optionBorder: optionBorder,
4304
+ optionColor: optionColor,
4305
+ searchIcon: searchIcon,
4306
+ searchbarTextColor: searchbarTextColor,
4307
+ searchBoxBorder: searchBoxBorder || "1px solid " + colorVariables.border.light,
4308
+ searchBoxBorderRadius: searchBoxBorderRadius || '0px',
4309
+ searchBoxBackground: searchBoxBackground,
4310
+ searchBox: searchBox,
4311
+ NoOptionsText: NoOptionsText
4312
+ }))));
4313
+ };
4314
+
4315
+ var _templateObject$a, _templateObject2$7, _templateObject3$5;
4316
+ var SelectedOptionsWrapper$1 = styled__default.div(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n"])));
4317
+ var SelectedOptionDiv$1 = styled__default.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: ", ";\n border-radius: 4px;\n padding: 6px 8px;\n box-sizing: border-box;\n gap: 6px;\n font-family: NotoSans, sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 12px;\n color: ", ";\n"])), function (_ref) {
4318
+ var $selectedOptionBackground = _ref.$selectedOptionBackground,
4319
+ $type = _ref.$type;
4320
+ return $selectedOptionBackground || $type === 'remove' ? colorVariables.disabled.error : colorVariables.accent.softBlue;
4321
+ }, function (_ref2) {
4322
+ var $selectedOptionColor = _ref2.$selectedOptionColor,
4323
+ $type = _ref2.$type;
4324
+ return $selectedOptionColor || $type === 'remove' ? colorVariables["default"].error : colorVariables.brand.primary;
4325
+ });
4326
+ var RemoveIcon$1 = styled__default.div(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["\n width: 14px;\n height: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 50%;\n box-sizing: border-box;\n background: ", ";\n"])), function (_ref3) {
4327
+ var $removeIconBackground = _ref3.$removeIconBackground,
4328
+ $type = _ref3.$type;
4329
+ return $removeIconBackground || $type === 'remove' ? '#5E5E5E24' : colorVariables.disabled.primary;
4330
+ });
4331
+ var SelectedOption = function SelectedOption(_ref4) {
4332
+ var selectedOptions = _ref4.selectedOptions,
4333
+ allOptions = _ref4.allOptions,
4334
+ selectedOptionBackground = _ref4.selectedOptionBackground,
4335
+ selectedOptionColor = _ref4.selectedOptionColor,
4336
+ removeIconBackground = _ref4.removeIconBackground,
4337
+ removeIconColor = _ref4.removeIconColor,
4338
+ onChange = _ref4.onChange,
4339
+ type = _ref4.type;
4340
+ var selectedOptionObjects = allOptions.filter(function (opt) {
4341
+ return selectedOptions.includes(opt.value);
4342
+ }).sort(function (a, b) {
4343
+ return a.labelText.localeCompare(b.labelText);
4344
+ });
4345
+ var handleOptionRemoval = function handleOptionRemoval(optionValue) {
4346
+ if (onChange) {
4347
+ onChange(selectedOptions.filter(function (value) {
4348
+ return value !== optionValue;
4349
+ }));
4350
+ }
4351
+ };
4352
+ return React__default.createElement(SelectedOptionsWrapper$1, null, selectedOptionObjects.map(function (option) {
4353
+ return React__default.createElement(SelectedOptionDiv$1, {
4354
+ key: option.value,
4355
+ "$type": type,
4356
+ "$selectedOptionBackground": selectedOptionBackground,
4357
+ "$selectedOptionColor": selectedOptionColor,
4358
+ onClick: function onClick(e) {
4359
+ e.stopPropagation();
4360
+ handleOptionRemoval(option.value);
4361
+ }
4362
+ }, option.labelText, React__default.createElement(RemoveIcon$1, {
4363
+ "$removeIconBackground": removeIconBackground,
4364
+ "$type": type,
4365
+ onClick: function onClick(e) {
4366
+ e.stopPropagation();
4367
+ handleOptionRemoval(option.value);
4368
+ }
4369
+ }, React__default.createElement(Icon, {
4370
+ icon: "Close",
4371
+ size: 6,
4372
+ color: removeIconColor || type === 'remove' ? colorVariables["default"].error : colorVariables.brand.primary
4373
+ })));
4374
+ }));
4375
+ };
4376
+
4377
+ var _templateObject$b, _templateObject2$8, _templateObject3$6, _templateObject4$4, _templateObject5$4, _templateObject6$4, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2;
4378
+ var TitleText$1 = styled__default.label(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n position: relative;\n width: max-content;\n font-weight: ", ";\n ", "\n\n color: ", ";\n"])), function (_ref) {
4379
+ var $titleWeight = _ref.$titleWeight;
4380
+ return $titleWeight || 500;
4381
+ }, function (_ref2) {
4382
+ var $size = _ref2.$size;
4383
+ switch ($size) {
4384
+ case 'small':
4385
+ return "\n font-size: 12px;\n line-height: 12px;\n ";
4386
+ case 'medium':
4387
+ return "\n font-size: 14px;\n line-height: 14px;\n ";
4388
+ case 'large':
4389
+ return "\n font-size: 16px;\n line-height: 16px;\n ";
4390
+ default:
4391
+ return "\n font-size: 14px;\n line-height: 14px;\n ";
4392
+ }
4393
+ }, function (_ref3) {
4394
+ var $titlecolor = _ref3.$titlecolor;
4395
+ switch ($titlecolor) {
4396
+ case 'dark':
4397
+ return colorVariables.text.dark;
4398
+ case 'medium':
4399
+ return colorVariables.text.medium;
4400
+ case 'light':
4401
+ return colorVariables.text.light;
4402
+ case 'white':
4403
+ return colorVariables.text.white;
4404
+ case 'warning':
4405
+ return colorVariables["default"].warning;
4406
+ case 'info':
4407
+ return colorVariables["default"].info;
4408
+ case 'success':
4409
+ return colorVariables["default"].success;
4410
+ case 'error':
4411
+ return colorVariables["default"].error;
4412
+ default:
4413
+ return $titlecolor;
4414
+ }
4415
+ });
4416
+ var DropdownContainer$1 = styled__default.div(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n width: ", ";\n max-width: 100%;\n position: relative;\n gap: 8px;\n display: flex;\n"])), function (_ref4) {
4417
+ var $width = _ref4.$width;
4418
+ return $width || '100%';
4419
+ });
4420
+ var DropdownButton$1 = styled__default.div(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: ", ";\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: ", ";\n gap: 6px;\n padding: ", ";\n background: ", ";\n font-size: ", ";\n line-height: ", ";\n"])), function (_ref5) {
4421
+ var $disabled = _ref5.$disabled;
4422
+ return $disabled ? 'not-allowed' : 'pointer';
4423
+ }, function (_ref6) {
4424
+ var $width = _ref6.$width;
4425
+ return $width ? $width : '100%';
4426
+ }, function (_ref7) {
4427
+ var $selectHeight = _ref7.$selectHeight;
4428
+ return $selectHeight || 'auto';
4429
+ }, function (_ref8) {
4430
+ var $borderRadius = _ref8.$borderRadius;
4431
+ return $borderRadius || '8px';
4432
+ }, function (_ref9) {
4433
+ var $border = _ref9.$border;
4434
+ return $border || "1px solid " + colorVariables.border.light;
4435
+ }, function (_ref10) {
4436
+ var $size = _ref10.$size;
4437
+ switch ($size) {
4438
+ case 'small':
4439
+ return '9px 12px';
4440
+ case 'large':
4441
+ return '24px 12px';
4442
+ default:
4443
+ return '13px 12px';
4444
+ }
4445
+ }, function (_ref11) {
4446
+ var $background = _ref11.$background,
4447
+ $disabled = _ref11.$disabled;
4448
+ return $disabled ? colorVariables.border.light : $background || colorVariables.accent.extraLight;
4449
+ }, function (_ref12) {
4450
+ var $size = _ref12.$size;
4451
+ switch ($size) {
4452
+ case 'small':
4453
+ return '12px';
4454
+ case 'large':
4455
+ return '16px';
4456
+ default:
4457
+ return '14px';
4458
+ }
4459
+ }, function (_ref13) {
4460
+ var $size = _ref13.$size;
4461
+ switch ($size) {
4462
+ case 'small':
4463
+ return '12px';
4464
+ case 'large':
4465
+ return '16px';
4466
+ default:
4467
+ return '14px';
4468
+ }
4469
+ });
4470
+ var Options = styled__default.div(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n padding: 5px 10px;\n width: 100%;\n font-size: ", ";\n font-weight: ", ";\n background-color: ", ";\n\n \n &:hover {\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n\n }\n\n"])), function (_ref14) {
4471
+ var $optionColor = _ref14.$optionColor,
4472
+ $optionSelected = _ref14.$optionSelected;
4473
+ return $optionSelected ? colorVariables.text.white : $optionColor || colorVariables.text.medium;
4474
+ }, function (_ref15) {
4475
+ var $optionFontSize = _ref15.$optionFontSize;
4476
+ return $optionFontSize || '14px';
4477
+ }, function (_ref16) {
4478
+ var $optionFontWeight = _ref16.$optionFontWeight;
4479
+ return $optionFontWeight || 400;
4480
+ }, function (_ref17) {
4481
+ var $optionBackgroundColor = _ref17.$optionBackgroundColor,
4482
+ $optionSelected = _ref17.$optionSelected;
4483
+ return $optionSelected ? colorVariables["default"].primary : $optionBackgroundColor || colorVariables["default"].tertiary;
4484
+ }, colorVariables.hover.primary, colorVariables.text.white);
4485
+ var LabelText$1 = styled__default.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n line-height: ", ";\n font-style: ", ";\n color: ", ";\n"])), function (_ref18) {
4486
+ var $size = _ref18.$size;
4487
+ switch ($size) {
4488
+ case 'small':
4489
+ return '14px';
4490
+ case 'large':
4491
+ return '16px';
4492
+ default:
4493
+ return '14px';
4494
+ }
4495
+ }, function (_ref19) {
4496
+ var $size = _ref19.$size;
4497
+ switch ($size) {
4498
+ case 'small':
4499
+ return '12px';
4500
+ case 'large':
4501
+ return '16px';
4502
+ default:
4503
+ return '14px';
4504
+ }
4505
+ }, function (_ref20) {
4506
+ var $fontStyle = _ref20.$fontStyle;
4507
+ return $fontStyle || '';
4508
+ }, function (_ref21) {
4509
+ var $color = _ref21.$color,
4510
+ $disabled = _ref21.$disabled;
4511
+ return $disabled ? colorVariables.text.medium : $color || colorVariables.text.medium;
4512
+ });
4513
+ var NoOptions = styled__default(Span)(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 100%;\n padding: 12px;\n font-size: 14px;\n font-weight: 400;\n"])));
4514
+ var DropdownMenu$1 = styled__default.div(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n height: auto;\n max-height: 170px;\n border: 1px solid ", ";\n border-radius: ", ";\n min-width: 100%;\n width: ", ";\n background: ", ";\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n overflow: hidden; \n position: absolute;\n z-index: 1;\n ", "\n ", "\n \n"])), colorVariables.border.light, function (_ref22) {
4515
+ var $optionsBorderRadius = _ref22.$optionsBorderRadius;
4516
+ return $optionsBorderRadius || '8px';
4517
+ }, function (_ref23) {
4518
+ var $width = _ref23.$width;
4519
+ return $width ? $width : 'max-content';
4520
+ }, function (_ref24) {
4521
+ var $menuBackground = _ref24.$menuBackground;
4522
+ return $menuBackground || colorVariables.accent.extraLight;
4523
+ }, function (_ref25) {
4524
+ var $top = _ref25.$top;
4525
+ return $top && "top: " + $top + ";";
4526
+ }, function (_ref26) {
4527
+ var $bottom = _ref26.$bottom;
4528
+ return $bottom && "bottom: " + $bottom + ";";
4529
+ });
4530
+ var OptionsWrapper = styled__default.div(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n max-height: 150px; \n overflow-y: auto; \n width: 100%;\n"])));
4531
+ var SearchContainer$1 = styled__default.div(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n width: 100%;\n background: ", ";\n border: ", ";\n border-bottom: 1px solid ", ";\n border-radius: ", ";\n padding: 10px 12px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n position: sticky;\n top: 0;\n z-index: 10; \n"])), function (_ref27) {
4532
+ var $background = _ref27.$background;
4533
+ return $background || colorVariables.accent.extraLight;
4534
+ }, function (_ref28) {
4535
+ var $border = _ref28.$border;
4536
+ return $border || 'none';
4537
+ }, colorVariables.border.light, function (_ref29) {
4538
+ var $borderRadius = _ref29.$borderRadius;
4539
+ return $borderRadius || '8px 8px 0 0';
4540
+ });
4541
+ var SearchBar$1 = styled__default.input(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: transparent;\n color: ", ";\n outline: none;\n \n &::placeholder {\n color: ", ";\n font-style: italic;\n }\n"])), function (_ref30) {
4542
+ var $inputColor = _ref30.$inputColor;
4543
+ return $inputColor || colorVariables.text.medium;
4544
+ }, function (_ref31) {
4545
+ var $placeholderColor = _ref31.$placeholderColor;
4546
+ return $placeholderColor || colorVariables.text.light;
4547
+ });
4548
+ var SelectOption = function SelectOption(_ref32) {
4549
+ var _options$find;
4550
+ var title = _ref32.title,
4551
+ titlecolor = _ref32.titlecolor,
4552
+ titleWeight = _ref32.titleWeight,
4553
+ options = _ref32.options,
4554
+ value = _ref32.value,
4555
+ onChange = _ref32.onChange,
4556
+ _ref32$disabled = _ref32.disabled,
4557
+ disabled = _ref32$disabled === void 0 ? false : _ref32$disabled,
4558
+ size = _ref32.size,
4559
+ width = _ref32.width,
4560
+ _ref32$labelText = _ref32.labelText,
4561
+ labelText = _ref32$labelText === void 0 ? 'Select' : _ref32$labelText,
4562
+ border = _ref32.border,
4563
+ background = _ref32.background,
4564
+ _ref32$padding = _ref32.padding,
4565
+ padding = _ref32$padding === void 0 ? '0px' : _ref32$padding,
4566
+ borderRadius = _ref32.borderRadius,
4567
+ optionColor = _ref32.optionColor,
4568
+ optionFontSize = _ref32.optionFontSize,
4569
+ optionFontWeight = _ref32.optionFontWeight,
4570
+ optionBackgroundColor = _ref32.optionBackgroundColor,
4571
+ menuBackground = _ref32.menuBackground,
4572
+ optionsBorderRadius = _ref32.optionsBorderRadius,
4573
+ color = _ref32.color,
4574
+ required = _ref32.required,
4575
+ _ref32$NoOptionsText = _ref32.NoOptionsText,
4576
+ NoOptionsText = _ref32$NoOptionsText === void 0 ? 'No Options Available' : _ref32$NoOptionsText,
4577
+ positionRef = _ref32.positionRef,
4578
+ fontStyle = _ref32.fontStyle,
4579
+ icon = _ref32.icon,
4580
+ _ref32$searchBox = _ref32.searchBox,
4581
+ searchBox = _ref32$searchBox === void 0 ? true : _ref32$searchBox,
4582
+ searchBoxBackground = _ref32.searchBoxBackground,
4583
+ searchBoxBorder = _ref32.searchBoxBorder,
4584
+ searchBoxBorderRadius = _ref32.searchBoxBorderRadius,
4585
+ searchIcon = _ref32.searchIcon,
4586
+ _ref32$placeholderTex = _ref32.placeholderText,
4587
+ placeholderText = _ref32$placeholderTex === void 0 ? 'Search...' : _ref32$placeholderTex,
4588
+ _ref32$iconColor = _ref32.iconColor,
4589
+ iconColor = _ref32$iconColor === void 0 ? colorVariables.text.medium : _ref32$iconColor,
4590
+ placeholderColor = _ref32.placeholderColor,
4591
+ inputColor = _ref32.inputColor,
4592
+ _ref32$iconSize = _ref32.iconSize,
4593
+ iconSize = _ref32$iconSize === void 0 ? 16 : _ref32$iconSize,
4594
+ _ref32$allowDeselect = _ref32.allowDeselect,
4595
+ allowDeselect = _ref32$allowDeselect === void 0 ? true : _ref32$allowDeselect;
4596
+ var _useState = React.useState(false),
4597
+ dropUp = _useState[0],
4598
+ setDropUp = _useState[1];
4599
+ var _useState2 = React.useState(false),
4600
+ isOpen = _useState2[0],
4601
+ setIsOpen = _useState2[1];
4602
+ var _useState3 = React.useState(''),
4603
+ searchTerm = _useState3[0],
4604
+ setSearchTerm = _useState3[1];
4605
+ var showSearchBox = searchBox && options.length > 5;
4606
+ var toggleDropdown = function toggleDropdown() {
4607
+ var refToUse = (positionRef === null || positionRef === void 0 ? void 0 : positionRef.current) || dropdownRef.current;
4608
+ if (refToUse) {
4609
+ var rect = refToUse.getBoundingClientRect();
4610
+ var windowHeight = window.innerHeight;
4611
+ var spaceBelow = windowHeight - rect.bottom;
4612
+ var spaceAbove = rect.top;
4613
+ var dropdownHeight = 95;
4614
+ if (spaceBelow < dropdownHeight && spaceAbove > dropdownHeight) {
4615
+ setDropUp(true);
4616
+ } else {
4617
+ setDropUp(false);
4618
+ }
4619
+ }
4620
+ setIsOpen(function (prev) {
4621
+ return !prev;
4622
+ });
4623
+ if (!isOpen) {
4624
+ setSearchTerm('');
4625
+ }
4626
+ };
4627
+ var dropdownRef = React.useRef(null);
4628
+ var searchInputRef = React.useRef(null);
4629
+ var handleOptionClick = function handleOptionClick(selectedValue) {
4630
+ if (value === selectedValue && allowDeselect) {
4631
+ var Event = {
4632
+ target: {
4633
+ value: '',
4634
+ name: title
4635
+ }
4636
+ };
4637
+ onChange(Event);
4638
+ } else {
4639
+ var _Event = {
4640
+ target: {
4641
+ value: selectedValue,
4642
+ name: title
4643
+ }
4644
+ };
4645
+ onChange(_Event);
4646
+ }
4647
+ setIsOpen(false);
4648
+ setSearchTerm('');
4649
+ };
4650
+ var filteredOptions = searchTerm ? options.filter(function (option) {
4651
+ return option.label.toLowerCase().includes(searchTerm.toLowerCase());
4652
+ }) : options;
4653
+ React.useEffect(function () {
4654
+ var handleClickOutside = function handleClickOutside(event) {
4655
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
4656
+ setIsOpen(false);
4657
+ setSearchTerm('');
4658
+ }
4659
+ };
4660
+ document.addEventListener('mousedown', handleClickOutside);
4661
+ return function () {
4662
+ document.removeEventListener('mousedown', handleClickOutside);
4663
+ };
4664
+ }, []);
4665
+ var label = options === null || options === void 0 ? void 0 : (_options$find = options.find(function (option) {
4666
+ return option.value === value;
4667
+ })) === null || _options$find === void 0 ? void 0 : _options$find.label;
4668
+ var handleSearchChange = function handleSearchChange(e) {
4669
+ setSearchTerm(e.target.value);
4670
+ };
4671
+ return React__default.createElement(Container, {
4672
+ "$padding": padding,
4673
+ "$flexDirection": 'column',
4674
+ "$width": '100%',
4675
+ "$gap": '8px',
4676
+ "$overflow": 'visible'
4677
+ }, title && React__default.createElement(TitleText$1, {
4678
+ "$size": size,
4679
+ htmlFor: title,
4680
+ "$titlecolor": titlecolor,
4681
+ "$titleWeight": titleWeight
4682
+ }, title, required && React__default.createElement(Asterisk, null, "*")), React__default.createElement(DropdownContainer$1, {
4683
+ ref: dropdownRef,
4684
+ "$width": width
4685
+ }, React__default.createElement(DropdownButton$1, {
4686
+ onClick: function onClick() {
4687
+ if (!disabled) toggleDropdown();
4688
+ },
4689
+ "$width": width,
4690
+ "$border": border,
4691
+ "$background": background,
4692
+ "$borderRadius": borderRadius,
4693
+ "$size": size,
4694
+ "$disabled": disabled
4695
+ }, icon && React__default.createElement(Icon, {
4696
+ icon: icon.name,
4697
+ size: icon.size || 14,
4698
+ weight: icon.weight || '1px',
4699
+ color: icon.color || colorVariables.text.medium
4700
+ }), label ? React__default.createElement(LabelText$1, {
4701
+ color: color,
4702
+ "$disabled": disabled,
4703
+ "$size": size
4704
+ }, label) : React__default.createElement(LabelText$1, {
4705
+ "$fontStyle": fontStyle ? fontStyle : 'italic',
4706
+ color: colorVariables.text.light,
4707
+ "$size": size
4708
+ }, labelText), React__default.createElement(Icon, {
4709
+ icon: isOpen ? 'UpArrow' : 'DownArrow',
4710
+ size: 7,
4711
+ color: colorVariables.text.medium
4712
+ })), isOpen && React__default.createElement(DropdownMenu$1, {
4713
+ "$width": width,
4714
+ "$menuBackground": menuBackground,
4715
+ "$optionsBorderRadius": optionsBorderRadius,
4716
+ "$optionsAvailable": options.length > 0,
4717
+ "$top": dropUp ? 'auto' : '126%',
4718
+ "$bottom": dropUp ? '126%' : 'auto'
4719
+ }, showSearchBox && React__default.createElement(SearchContainer$1, {
4720
+ "$background": searchBoxBackground,
4721
+ "$border": searchBoxBorder,
4722
+ "$borderRadius": searchBoxBorderRadius
4723
+ }, React__default.createElement(Icon, {
4724
+ icon: "Search",
4725
+ size: iconSize,
4726
+ weight: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.weight) || '0px',
4727
+ color: iconColor
4728
+ }), React__default.createElement(SearchBar$1, {
4729
+ ref: searchInputRef,
4730
+ type: "text",
4731
+ value: searchTerm,
4732
+ onChange: handleSearchChange,
4733
+ placeholder: placeholderText,
4734
+ "$inputColor": inputColor,
4735
+ "$placeholderColor": placeholderColor
4736
+ })), React__default.createElement(OptionsWrapper, null, filteredOptions.length ? filteredOptions.map(function (option) {
4737
+ return React__default.createElement(Options, {
4738
+ key: option.value,
4739
+ "$optionColor": optionColor,
4740
+ "$optionFontSize": optionFontSize || '14px',
4741
+ "$optionFontWeight": optionFontWeight,
4742
+ "$optionBackgroundColor": optionBackgroundColor,
4743
+ onClick: function onClick() {
4744
+ return handleOptionClick(option.value);
4745
+ },
4746
+ "$optionSelected": option.value === value
4747
+ }, option.label);
4748
+ }) : React__default.createElement(NoOptions, null, NoOptionsText)))));
3192
4749
  };
3193
4750
 
3194
4751
  var useClickOutside = function useClickOutside(elRef, elCallback) {
@@ -3208,9 +4765,9 @@ var useClickOutside = function useClickOutside(elRef, elCallback) {
3208
4765
  }, [elCallback, elRef]);
3209
4766
  };
3210
4767
 
3211
- var _templateObject$5, _templateObject2$4;
3212
- var ModalOverlay = styled__default.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: NotoSans, sans-serif;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
3213
- var ModalContainer = styled__default.div(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-width: ", ";\n"])), colorVariables.accent.light, function (_ref) {
4768
+ var _templateObject$c, _templateObject2$9;
4769
+ var ModalOverlay = styled__default.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: NotoSans, sans-serif;\n z-index: 9999;\n backdrop-filter: blur(4px);\n"])));
4770
+ var ModalContainer = styled__default.div(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n background: ", ";\n box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n max-width: ", ";\n"])), colorVariables.accent.light, function (_ref) {
3214
4771
  var maxWidth = _ref.maxWidth;
3215
4772
  return maxWidth ? maxWidth : '400px';
3216
4773
  });
@@ -3243,15 +4800,1391 @@ var useCustomModal = function useCustomModal(_ref3) {
3243
4800
  };
3244
4801
  };
3245
4802
 
4803
+ var useNotification = function useNotification() {
4804
+ var sendNotification = function sendNotification(_ref) {
4805
+ var type = _ref.type,
4806
+ message = _ref.message,
4807
+ promiseConfig = _ref.promiseConfig,
4808
+ customStyle = _ref.customStyle,
4809
+ _ref$clearCurrent = _ref.clearCurrent,
4810
+ clearCurrent = _ref$clearCurrent === void 0 ? false : _ref$clearCurrent;
4811
+ if (clearCurrent) {
4812
+ reactHotToast.toast.dismiss();
4813
+ }
4814
+ switch (type) {
4815
+ case 'success':
4816
+ reactHotToast.toast.success(message);
4817
+ break;
4818
+ case 'error':
4819
+ reactHotToast.toast.error(message);
4820
+ break;
4821
+ case 'info':
4822
+ reactHotToast.toast(message, {
4823
+ icon: React__default.createElement(Container, {
4824
+ "$height": '20px',
4825
+ "$width": '20px',
4826
+ "$alignItems": 'center',
4827
+ "$justifyContent": 'center',
4828
+ "$borderRadius": '100%',
4829
+ "$background": colorVariables["default"].info
4830
+ }, React__default.createElement(Icon, {
4831
+ icon: "Information",
4832
+ weight: '0px',
4833
+ size: 14,
4834
+ color: colorVariables.text.white
4835
+ })),
4836
+ style: {
4837
+ borderRadius: '8px',
4838
+ background: colorVariables.text.white,
4839
+ color: '#363636'
4840
+ }
4841
+ });
4842
+ break;
4843
+ case 'promise':
4844
+ if (promiseConfig) {
4845
+ reactHotToast.toast.promise(promiseConfig.promise, {
4846
+ loading: promiseConfig.loading,
4847
+ success: promiseConfig.success,
4848
+ error: promiseConfig.error
4849
+ }, {
4850
+ style: {
4851
+ minWidth: '300px'
4852
+ }
4853
+ });
4854
+ }
4855
+ break;
4856
+ case 'custom':
4857
+ reactHotToast.toast(message, {
4858
+ icon: React__default.createElement(Icon, {
4859
+ icon: (customStyle === null || customStyle === void 0 ? void 0 : customStyle.icon) || 'Add',
4860
+ size: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconSize,
4861
+ weight: customStyle === null || customStyle === void 0 ? void 0 : customStyle.iconWeight
4862
+ }),
4863
+ style: {
4864
+ background: customStyle === null || customStyle === void 0 ? void 0 : customStyle.background,
4865
+ color: customStyle === null || customStyle === void 0 ? void 0 : customStyle.color
4866
+ }
4867
+ });
4868
+ break;
4869
+ default:
4870
+ console.error('Invalid notification type or missing configuration!');
4871
+ }
4872
+ };
4873
+ return {
4874
+ sendNotification: sendNotification
4875
+ };
4876
+ };
4877
+
4878
+ var _templateObject$d, _templateObject2$a;
4879
+ var SearchContainer$2 = styled__default.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 100%;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n padding: 5.5px 8px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n"])), function (_ref) {
4880
+ var $background = _ref.$background;
4881
+ return $background || colorVariables["default"].tertiary;
4882
+ }, function (_ref2) {
4883
+ var $border = _ref2.$border;
4884
+ return $border || 'none';
4885
+ }, function (_ref3) {
4886
+ var $borderRadius = _ref3.$borderRadius;
4887
+ return $borderRadius || '8px';
4888
+ });
4889
+ var SearchBar$2 = styled__default.input(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n border: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 14px;\n line-height: normal;\n background: ", ";\n color: ", ";\n &::placeholder {\n color: ", ";\n font-style: italic;\n position: absolute;\n top: 1px;\n }\n"])), colorVariables["default"].tertiary, function (_ref4) {
4890
+ var $inputColor = _ref4.$inputColor;
4891
+ return $inputColor || colorVariables.text.medium;
4892
+ }, function (_ref5) {
4893
+ var $placeholderColor = _ref5.$placeholderColor;
4894
+ return $placeholderColor || colorVariables.text.light;
4895
+ });
4896
+ var SearchBox = function SearchBox(_ref6) {
4897
+ var value = _ref6.value,
4898
+ onChange = _ref6.onChange,
4899
+ _ref6$placeholder = _ref6.placeholder,
4900
+ placeholder = _ref6$placeholder === void 0 ? 'Search...' : _ref6$placeholder,
4901
+ border = _ref6.border,
4902
+ borderRadius = _ref6.borderRadius,
4903
+ _ref6$iconColor = _ref6.iconColor,
4904
+ iconColor = _ref6$iconColor === void 0 ? colorVariables.text.medium : _ref6$iconColor,
4905
+ placeholderColor = _ref6.placeholderColor,
4906
+ inputColor = _ref6.inputColor,
4907
+ _ref6$iconSize = _ref6.iconSize,
4908
+ iconSize = _ref6$iconSize === void 0 ? 16 : _ref6$iconSize,
4909
+ background = _ref6.background;
4910
+ return React__default.createElement(SearchContainer$2, {
4911
+ "$border": border,
4912
+ "$background": background,
4913
+ "$borderRadius": borderRadius
4914
+ }, React__default.createElement(Icon, {
4915
+ icon: "Search",
4916
+ size: iconSize,
4917
+ color: iconColor,
4918
+ weight: "0px"
4919
+ }), React__default.createElement(SearchBar$2, {
4920
+ type: "text",
4921
+ placeholder: placeholder,
4922
+ value: value,
4923
+ onChange: onChange,
4924
+ "$inputColor": inputColor,
4925
+ "$placeholderColor": placeholderColor
4926
+ }));
4927
+ };
4928
+
4929
+ var _templateObject$e, _templateObject2$b, _templateObject3$7, _templateObject4$5, _templateObject5$5, _templateObject6$5;
4930
+ var Container$3 = styled__default.div(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n padding: ", ";\n"])), function (_ref) {
4931
+ var $padding = _ref.$padding;
4932
+ return $padding;
4933
+ });
4934
+ var Label = styled__default.label(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n cursor: auto;\n width: 100%;\n font-weight: 500;\n position: relative;\n width: max-content;\n\n ", "\n\n color: ", ";\n"])), function (_ref2) {
4935
+ var $size = _ref2.$size;
4936
+ switch ($size) {
4937
+ case 'small':
4938
+ return "\n font-size: 12px;\n line-height: 12px;\n ";
4939
+ case 'medium':
4940
+ return "\n font-size: 14px;\n line-height: 14px;\n ";
4941
+ case 'large':
4942
+ return "\n font-size: 16px;\n line-height: 16px;\n ";
4943
+ default:
4944
+ return "\n font-size: 14px;\n line-height: 14px;\n ";
4945
+ }
4946
+ }, function (_ref3) {
4947
+ var $titlecolor = _ref3.$titlecolor;
4948
+ switch ($titlecolor) {
4949
+ case 'dark':
4950
+ return colorVariables.text.dark;
4951
+ case 'medium':
4952
+ return colorVariables.text.medium;
4953
+ case 'light':
4954
+ return colorVariables.text.light;
4955
+ case 'white':
4956
+ return colorVariables.text.white;
4957
+ case 'warning':
4958
+ return colorVariables["default"].warning;
4959
+ case 'info':
4960
+ return colorVariables["default"].info;
4961
+ case 'success':
4962
+ return colorVariables["default"].success;
4963
+ case 'error':
4964
+ return colorVariables["default"].error;
4965
+ default:
4966
+ return $titlecolor;
4967
+ }
4968
+ });
4969
+ var Input = styled__default.input(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n width: 100%;\n border: 1px solid ", ";\n border-radius: 8px;\n cursor: ", ";\n background: ", ";\n transition: all 0.3s ease;\n color: ", ";\n\n ", "\n\n &:focus {\n border: 1px solid\n ", ";\n }\n\n &::placeholder {\n color: ", ";\n font-style: italic;\n font-family: NotoSans, sans-serif;\n }\n"])), colorVariables.border.light, function (_ref4) {
4970
+ var $disabled = _ref4.$disabled;
4971
+ return $disabled ? 'not-allowed' : 'auto';
4972
+ }, function (_ref5) {
4973
+ var $disabled = _ref5.$disabled,
4974
+ $background = _ref5.$background;
4975
+ return $disabled ? colorVariables.disabled.secondary : $background;
4976
+ }, function (_ref6) {
4977
+ var $color = _ref6.$color;
4978
+ return $color;
4979
+ }, function (_ref7) {
4980
+ var $size = _ref7.$size;
4981
+ switch ($size) {
4982
+ case 'small':
4983
+ return "\n font-size: 12px;\n padding: 5px 10px;\n ";
4984
+ case 'medium':
4985
+ return "\n font-size: 14px;\n padding: 9.5px 12px;\n ";
4986
+ case 'large':
4987
+ return "\n font-size: 16px;\n padding: 9px 14px;\n ";
4988
+ default:
4989
+ return "\n font-size: 14px;\n padding: 7px 12px;\n ";
4990
+ }
4991
+ }, function (_ref8) {
4992
+ var $color = _ref8.$color;
4993
+ switch ($color) {
4994
+ case 'dark':
4995
+ return colorVariables.text.dark;
4996
+ case 'medium':
4997
+ return colorVariables.text.medium;
4998
+ case 'light':
4999
+ return colorVariables.text.light;
5000
+ case 'white':
5001
+ return colorVariables.text.white;
5002
+ case 'warning':
5003
+ return colorVariables["default"].warning;
5004
+ case 'info':
5005
+ return colorVariables["default"].info;
5006
+ case 'success':
5007
+ return colorVariables["default"].success;
5008
+ case 'error':
5009
+ return colorVariables["default"].error;
5010
+ default:
5011
+ return $color;
5012
+ }
5013
+ }, colorVariables.text.light);
5014
+ var InputWrapper$1 = styled__default.div(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n"])));
5015
+ var IconWrapper$1 = styled__default.div(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n right: 12px;\n cursor: pointer;\n\n > div {\n cursor: ", ";\n }\n"])), function (_ref9) {
5016
+ var $disabled = _ref9.$disabled;
5017
+ return $disabled ? 'not-allowed' : 'pointer';
5018
+ });
5019
+ var Asterisk$1 = styled__default.span(_templateObject6$5 || (_templateObject6$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size: 10px;\n height: fit-content;\n position: absolute;\n top: -2px;\n right: -8px;\n"])), colorVariables["default"].error);
5020
+ var InputField = function InputField(_ref10) {
5021
+ var _ref10$type = _ref10.type,
5022
+ type = _ref10$type === void 0 ? 'text' : _ref10$type,
5023
+ title = _ref10.title,
5024
+ placeholder = _ref10.placeholder,
5025
+ _ref10$disabled = _ref10.disabled,
5026
+ disabled = _ref10$disabled === void 0 ? false : _ref10$disabled,
5027
+ inputValue = _ref10.inputValue,
5028
+ onChange = _ref10.onChange,
5029
+ _ref10$size = _ref10.size,
5030
+ size = _ref10$size === void 0 ? 'medium' : _ref10$size,
5031
+ _ref10$color = _ref10.color,
5032
+ color = _ref10$color === void 0 ? colorVariables.text.dark : _ref10$color,
5033
+ _ref10$padding = _ref10.padding,
5034
+ padding = _ref10$padding === void 0 ? '0px' : _ref10$padding,
5035
+ _ref10$titlecolor = _ref10.titlecolor,
5036
+ titlecolor = _ref10$titlecolor === void 0 ? colorVariables.text.dark : _ref10$titlecolor,
5037
+ icon = _ref10.icon,
5038
+ _ref10$iconsize = _ref10.iconsize,
5039
+ iconsize = _ref10$iconsize === void 0 ? 18 : _ref10$iconsize,
5040
+ iconweight = _ref10.iconweight,
5041
+ iconcolor = _ref10.iconcolor,
5042
+ _ref10$required = _ref10.required,
5043
+ required = _ref10$required === void 0 ? false : _ref10$required,
5044
+ _ref10$background = _ref10.background,
5045
+ background = _ref10$background === void 0 ? colorVariables["default"].tertiary : _ref10$background,
5046
+ onEnter = _ref10.onEnter;
5047
+ var _useState = React.useState(disabled),
5048
+ isDisabled = _useState[0],
5049
+ setIsDisabled = _useState[1];
5050
+ var _useState2 = React.useState(type),
5051
+ inputType = _useState2[0],
5052
+ setInputType = _useState2[1];
5053
+ var handleToggleDisabled = function handleToggleDisabled() {
5054
+ setIsDisabled(function (prev) {
5055
+ return !prev;
5056
+ });
5057
+ };
5058
+ var handleShowPassword = function handleShowPassword() {
5059
+ setInputType(function (prevType) {
5060
+ return prevType === 'password' ? 'text' : 'password';
5061
+ });
5062
+ };
5063
+ React.useEffect(function () {
5064
+ setIsDisabled(disabled);
5065
+ }, [disabled]);
5066
+ return React__default.createElement(Container$3, {
5067
+ "$padding": padding
5068
+ }, title && React__default.createElement(Label, {
5069
+ "$size": size,
5070
+ htmlFor: title,
5071
+ "$titlecolor": titlecolor
5072
+ }, title, required && React__default.createElement(Asterisk$1, null, "*")), React__default.createElement(InputWrapper$1, null, React__default.createElement(Input, {
5073
+ type: inputType || 'text',
5074
+ name: title,
5075
+ id: title,
5076
+ value: inputValue,
5077
+ placeholder: placeholder,
5078
+ disabled: isDisabled,
5079
+ onChange: onChange,
5080
+ "$size": size,
5081
+ "$color": color,
5082
+ "$background": background,
5083
+ readOnly: onChange === undefined ? true : false,
5084
+ onKeyDown: function onKeyDown(e) {
5085
+ if (e.key === 'Enter') {
5086
+ if (onEnter) onEnter();
5087
+ }
5088
+ }
5089
+ }), type === 'password' && inputValue && React__default.createElement(IconWrapper$1, {
5090
+ "$disabled": disabled,
5091
+ onClick: function onClick() {
5092
+ if (!disabled) handleShowPassword();
5093
+ }
5094
+ }, React__default.createElement(Icon, {
5095
+ icon: inputType === 'password' ? 'CloseEye' : 'OpenEye',
5096
+ size: iconsize,
5097
+ weight: iconweight,
5098
+ color: iconcolor || colorVariables["default"].primary
5099
+ })), icon && type !== 'password' && React__default.createElement(IconWrapper$1, {
5100
+ onClick: handleToggleDisabled
5101
+ }, React__default.createElement(Icon, {
5102
+ icon: icon,
5103
+ size: iconsize,
5104
+ weight: iconweight,
5105
+ color: iconcolor || colorVariables["default"].primary
5106
+ }))));
5107
+ };
5108
+
5109
+ var _templateObject$f, _templateObject2$c, _templateObject3$8;
5110
+ var Container$4 = styled__default.div(_templateObject$f || (_templateObject$f = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n padding: ", ";\n"])), function (_ref) {
5111
+ var $padding = _ref.$padding;
5112
+ return $padding;
5113
+ });
5114
+ var Label$1 = styled__default.label(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n cursor: auto;\n font-weight: 500;\n position: relative;\n width: max-content;\n\n ", "\n\n color: ", ";\n"])), function (_ref2) {
5115
+ var $size = _ref2.$size;
5116
+ switch ($size) {
5117
+ case 'small':
5118
+ return 'font-size: 12px; line-height: 12px;';
5119
+ case 'medium':
5120
+ return 'font-size: 14px; line-height: 14px;';
5121
+ case 'large':
5122
+ return 'font-size: 16px; line-height: 16px;';
5123
+ default:
5124
+ return 'font-size: 14px; line-height: 14px;';
5125
+ }
5126
+ }, function (_ref3) {
5127
+ var $titlecolor = _ref3.$titlecolor;
5128
+ return $titlecolor || colorVariables.text.dark;
5129
+ });
5130
+ var TextAreaComponent = styled__default.textarea(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n width: 100%;\n border: 1px solid ", ";\n border-radius: 8px;\n cursor: ", ";\n background: ", ";\n transition: all 0.3s ease;\n color: ", ";\n resize: none;\n height: 100%;\n \n ", "\n\n &:focus {\n border-color: ", ";\n }\n\n &::placeholder {\n color: ", ";\n font-style: italic;\n font-family: NotoSans, sans-serif;\n }\n"])), colorVariables.border.light, function (_ref4) {
5131
+ var $disabled = _ref4.$disabled;
5132
+ return $disabled ? 'not-allowed' : 'auto';
5133
+ }, function (_ref5) {
5134
+ var $disabled = _ref5.$disabled,
5135
+ $background = _ref5.$background;
5136
+ return $disabled ? colorVariables.disabled.secondary : $background;
5137
+ }, function (_ref6) {
5138
+ var $color = _ref6.$color;
5139
+ return $color;
5140
+ }, function (_ref7) {
5141
+ var $size = _ref7.$size;
5142
+ switch ($size) {
5143
+ case 'small':
5144
+ return 'font-size: 12px; padding: 5px 10px;';
5145
+ case 'medium':
5146
+ return 'font-size: 14px; padding: 9px 12px;';
5147
+ case 'large':
5148
+ return 'font-size: 16px; padding: 9px 14px;';
5149
+ default:
5150
+ return 'font-size: 14px; padding: 7px 12px;';
5151
+ }
5152
+ }, function (_ref8) {
5153
+ var $color = _ref8.$color;
5154
+ return $color || colorVariables.text.dark;
5155
+ }, colorVariables.text.light);
5156
+ var TextArea = function TextArea(_ref9) {
5157
+ var title = _ref9.title,
5158
+ placeholder = _ref9.placeholder,
5159
+ _ref9$disabled = _ref9.disabled,
5160
+ disabled = _ref9$disabled === void 0 ? false : _ref9$disabled,
5161
+ inputValue = _ref9.inputValue,
5162
+ onChange = _ref9.onChange,
5163
+ _ref9$size = _ref9.size,
5164
+ size = _ref9$size === void 0 ? 'medium' : _ref9$size,
5165
+ _ref9$color = _ref9.color,
5166
+ color = _ref9$color === void 0 ? colorVariables.text.dark : _ref9$color,
5167
+ _ref9$padding = _ref9.padding,
5168
+ padding = _ref9$padding === void 0 ? '0px' : _ref9$padding,
5169
+ _ref9$titlecolor = _ref9.titlecolor,
5170
+ titlecolor = _ref9$titlecolor === void 0 ? colorVariables.text.dark : _ref9$titlecolor,
5171
+ _ref9$required = _ref9.required,
5172
+ required = _ref9$required === void 0 ? false : _ref9$required,
5173
+ _ref9$background = _ref9.background,
5174
+ background = _ref9$background === void 0 ? colorVariables["default"].tertiary : _ref9$background;
5175
+ var _useState = React.useState(disabled),
5176
+ isDisabled = _useState[0],
5177
+ setIsDisabled = _useState[1];
5178
+ React.useEffect(function () {
5179
+ setIsDisabled(disabled);
5180
+ }, [disabled]);
5181
+ return React__default.createElement(Container$4, {
5182
+ "$padding": padding
5183
+ }, title && React__default.createElement(Label$1, {
5184
+ "$size": size,
5185
+ htmlFor: title,
5186
+ "$titlecolor": titlecolor
5187
+ }, title, required && React__default.createElement(Asterisk$1, null, "*")), React__default.createElement(TextAreaComponent, {
5188
+ name: title,
5189
+ id: title,
5190
+ value: inputValue,
5191
+ placeholder: placeholder,
5192
+ disabled: isDisabled,
5193
+ onChange: onChange,
5194
+ "$size": size,
5195
+ "$color": color,
5196
+ "$background": background
5197
+ }));
5198
+ };
5199
+
5200
+ var _templateObject$g, _templateObject2$d, _templateObject3$9, _templateObject4$6, _templateObject5$6, _templateObject6$6, _templateObject7$3;
5201
+ var OptionContainer$1 = styled__default.div(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["\n z-index: 2;\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n position: absolute;\n padding: 4px;\n top: 40px;\n left: 0px;\n background: ", ";\n max-width: 192px;\n min-width: 192px;\n height: auto;\n max-height: 175px;\n"])), colorVariables.text.white);
5202
+ var OptionItem$1 = styled__default.div(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n border-radius: 8px;\n\n &:hover {\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), function (_ref) {
5203
+ var $optionSelected = _ref.$optionSelected;
5204
+ return $optionSelected ? colorVariables.text.white : colorVariables.text.medium;
5205
+ }, function (_ref2) {
5206
+ var $optionSelected = _ref2.$optionSelected;
5207
+ return $optionSelected ? colorVariables["default"].primary : colorVariables.text.white;
5208
+ }, colorVariables.hover.primary, colorVariables.text.white);
5209
+ var TotalOptionsHeader = styled__default.div(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n z-index: 2;\n background: ", ";\n color: ", ";\n height: max-content;\n padding: 8px 4px;\n gap: 4px;\n border-bottom: 1px solid ", ";\n font-size:12px;\n"])), colorVariables.text.white, colorVariables.text.light, colorVariables.text.light);
5210
+ var OptionLabel$1 = styled__default.label(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n height: max-content;\n gap: 8px;\n padding: 8px 12px;\n word-break: break-word;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n font-family: NotoSans;\n font-weight: 500;\n font-size: 14px;\n line-height: 14px;\n"])));
5211
+ var SearchContainer$3 = styled__default.div(_templateObject5$6 || (_templateObject5$6 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: auto;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n padding: 6.5px 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n"])), function (_ref3) {
5212
+ var $background = _ref3.$background;
5213
+ switch ($background) {
5214
+ case 'dark':
5215
+ return colorVariables.text.dark;
5216
+ case 'medium':
5217
+ return colorVariables.text.medium;
5218
+ case 'light':
5219
+ return colorVariables.text.light;
5220
+ case 'white':
5221
+ return colorVariables.text.white;
5222
+ case 'warning':
5223
+ return colorVariables["default"].warning;
5224
+ case 'info':
5225
+ return colorVariables["default"].info;
5226
+ case 'success':
5227
+ return colorVariables["default"].success;
5228
+ case 'error':
5229
+ return colorVariables["default"].error;
5230
+ default:
5231
+ return $background;
5232
+ }
5233
+ }, function (_ref4) {
5234
+ var $borderBottom = _ref4.$borderBottom;
5235
+ return $borderBottom || 'none';
5236
+ }, function (_ref5) {
5237
+ var $borderRadius = _ref5.$borderRadius;
5238
+ return $borderRadius || '8px';
5239
+ });
5240
+ var SearchBar$3 = styled__default.input(_templateObject6$6 || (_templateObject6$6 = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n width: 100%;\n font-family: NotoSans, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n background: ", ";\n color: ", ";\n\n &::placeholder {\n color: ", ";\n font-style: italic;\n font-size: 14px;\n }\n"])), colorVariables["default"].tertiary, function (_ref6) {
5241
+ var $inputColor = _ref6.$inputColor;
5242
+ switch ($inputColor) {
5243
+ case 'dark':
5244
+ return colorVariables.text.dark;
5245
+ case 'medium':
5246
+ return colorVariables.text.medium;
5247
+ case 'light':
5248
+ return colorVariables.text.light;
5249
+ case 'white':
5250
+ return colorVariables.text.white;
5251
+ case 'warning':
5252
+ return colorVariables["default"].warning;
5253
+ case 'info':
5254
+ return colorVariables["default"].info;
5255
+ case 'success':
5256
+ return colorVariables["default"].success;
5257
+ case 'error':
5258
+ return colorVariables["default"].error;
5259
+ default:
5260
+ return $inputColor;
5261
+ }
5262
+ }, function (_ref7) {
5263
+ var $placeholderColor = _ref7.$placeholderColor;
5264
+ switch ($placeholderColor) {
5265
+ case 'dark':
5266
+ return colorVariables.text.dark;
5267
+ case 'medium':
5268
+ return colorVariables.text.medium;
5269
+ case 'light':
5270
+ return colorVariables.text.light;
5271
+ case 'white':
5272
+ return colorVariables.text.white;
5273
+ case 'warning':
5274
+ return colorVariables["default"].warning;
5275
+ case 'info':
5276
+ return colorVariables["default"].info;
5277
+ case 'success':
5278
+ return colorVariables["default"].success;
5279
+ case 'error':
5280
+ return colorVariables["default"].error;
5281
+ default:
5282
+ return $placeholderColor;
5283
+ }
5284
+ });
5285
+ var OptionsWrapper$1 = styled__default.div(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n padding: 4px 0px;\n height: 100%;\n overflow-y: auto;\n scrollbar-width: thin;\n background: ", "\n"])), colorVariables.text.white);
5286
+ var TextFieldWithDropdown = function TextFieldWithDropdown(_ref8) {
5287
+ var options = _ref8.options,
5288
+ selectedOption = _ref8.selectedOption,
5289
+ onSelect = _ref8.onSelect,
5290
+ searchQuery = _ref8.searchQuery,
5291
+ setSearchQuery = _ref8.setSearchQuery,
5292
+ internalSearchQuery = _ref8.internalSearchQuery,
5293
+ setInternalSearchQuery = _ref8.setInternalSearchQuery,
5294
+ _ref8$placeholder = _ref8.placeholder,
5295
+ placeholder = _ref8$placeholder === void 0 ? 'Search...' : _ref8$placeholder,
5296
+ searchIcon = _ref8.searchIcon,
5297
+ _ref8$searchbarTextCo = _ref8.searchbarTextColor,
5298
+ searchbarTextColor = _ref8$searchbarTextCo === void 0 ? 'medium' : _ref8$searchbarTextCo,
5299
+ searchBoxBorder = _ref8.searchBoxBorder,
5300
+ _ref8$searchBoxBorder = _ref8.searchBoxBorderRadius,
5301
+ searchBoxBorderRadius = _ref8$searchBoxBorder === void 0 ? '6px' : _ref8$searchBoxBorder,
5302
+ _ref8$searchBox = _ref8.searchBox,
5303
+ searchBox = _ref8$searchBox === void 0 ? true : _ref8$searchBox,
5304
+ NoOptionsText = _ref8.NoOptionsText;
5305
+ var _useTranslation = reactI18next.useTranslation(),
5306
+ t = _useTranslation.t;
5307
+ var searchBoxRef = React.useRef(null);
5308
+ var _useState = React.useState(false),
5309
+ isSearchBarEnabled = _useState[0],
5310
+ setIsSearchBarEnabled = _useState[1];
5311
+ var filteredArray = options.filter(function (item) {
5312
+ return item.labelText.toLowerCase().includes(internalSearchQuery.toLowerCase().trim());
5313
+ });
5314
+ var handleSearchChange = function handleSearchChange(e) {
5315
+ var value = e.target.value.trimStart();
5316
+ setInternalSearchQuery(value);
5317
+ };
5318
+ var handleClickOutside = function handleClickOutside(event) {
5319
+ if (searchBoxRef.current && !searchBoxRef.current.contains(event.target)) {
5320
+ setIsSearchBarEnabled(false);
5321
+ }
5322
+ };
5323
+ React.useEffect(function () {
5324
+ document.addEventListener('mousedown', handleClickOutside);
5325
+ return function () {
5326
+ document.removeEventListener('mousedown', handleClickOutside);
5327
+ };
5328
+ }, []);
5329
+ return React__default.createElement(Container, {
5330
+ "$flexDirection": 'column',
5331
+ "$gap": '8px',
5332
+ "$width": '100%',
5333
+ "$position": 'relative'
5334
+ }, searchBox && React__default.createElement(SearchContainer$3, {
5335
+ "$borderBottom": searchBoxBorder,
5336
+ "$background": isSearchBarEnabled ? colorVariables.text.white : colorVariables.accent.light,
5337
+ "$borderRadius": searchBoxBorderRadius,
5338
+ ref: searchBoxRef
5339
+ }, React__default.createElement(Container, {
5340
+ "$minWidth": '14px'
5341
+ }, React__default.createElement(Icon, {
5342
+ icon: 'Search',
5343
+ size: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.size) || 14,
5344
+ color: searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.color,
5345
+ weight: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.weight) || '0px'
5346
+ })), React__default.createElement(Container, {
5347
+ onClick: function onClick() {
5348
+ return setIsSearchBarEnabled(true);
5349
+ }
5350
+ }, React__default.createElement(SearchBar$3, {
5351
+ type: 'text',
5352
+ placeholder: placeholder,
5353
+ value: internalSearchQuery,
5354
+ onChange: handleSearchChange,
5355
+ "$inputColor": searchbarTextColor,
5356
+ "$placeholderColor": isSearchBarEnabled ? colorVariables.text.light : colorVariables.text.medium,
5357
+ disabled: !!searchQuery
5358
+ })), (internalSearchQuery || searchQuery) && React__default.createElement(Icon, {
5359
+ icon: 'Close',
5360
+ size: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.size) || 10,
5361
+ color: searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.color,
5362
+ weight: (searchIcon === null || searchIcon === void 0 ? void 0 : searchIcon.weight) || '0px',
5363
+ onClick: function onClick() {
5364
+ setInternalSearchQuery('');
5365
+ setSearchQuery('');
5366
+ }
5367
+ }), isSearchBarEnabled && React__default.createElement(OptionContainer$1, null, options.length > 0 ? React__default.createElement(Container, {
5368
+ "$flexDirection": 'column'
5369
+ }, React__default.createElement(TotalOptionsHeader, null, React__default.createElement(Span, {
5370
+ "$fontSize": '12px',
5371
+ "$fontWeight": '400',
5372
+ "$color": colorVariables.text.light
5373
+ }, t('Showing_results') + " (" + filteredArray.length + " of " + (options === null || options === void 0 ? void 0 : options.length) + ")")), React__default.createElement(OptionsWrapper$1, null, filteredArray.length > 0 ? filteredArray.map(function (option) {
5374
+ return React__default.createElement(OptionItem$1, {
5375
+ key: option.value,
5376
+ "$optionSelected": option.value === selectedOption
5377
+ }, React__default.createElement(OptionLabel$1, {
5378
+ htmlFor: option.value,
5379
+ onClick: function onClick() {
5380
+ setInternalSearchQuery(option.labelText);
5381
+ setSearchQuery(option.labelText);
5382
+ setIsSearchBarEnabled(false);
5383
+ if (onSelect) onSelect(option);
5384
+ }
5385
+ }, option.labelText));
5386
+ }) : React__default.createElement(Container, {
5387
+ "$justifyContent": 'center',
5388
+ "$padding": '4px'
5389
+ }, React__default.createElement(Span, {
5390
+ "$fontSize": '12px',
5391
+ "$lineHeight": 'normal'
5392
+ }, NoOptionsText)))) : React__default.createElement(Container, {
5393
+ "$padding": '8px'
5394
+ }, React__default.createElement(Span, {
5395
+ "$fontSize": '14px'
5396
+ }, NoOptionsText)))));
5397
+ };
5398
+
5399
+ var _templateObject$h, _templateObject2$e, _templateObject3$a, _templateObject4$7;
5400
+ var spin$1 = styled.keyframes(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n 0% { opacity: 1; }\n 100% { opacity: 0.3; }\n"])));
5401
+ var getDotPosition = function getDotPosition(index, size) {
5402
+ var angle = index * 360 / 8;
5403
+ var radius = size / 2.5;
5404
+ var x = radius * Math.cos(angle * Math.PI / 180);
5405
+ var y = radius * Math.sin(angle * Math.PI / 180);
5406
+ return "translate(" + x + "px, " + y + "px)";
5407
+ };
5408
+ var SpinnerContainer = styled__default.div(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n position: relative;\n width: ", "px;\n height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref) {
5409
+ var $size = _ref.$size;
5410
+ return $size;
5411
+ }, function (_ref2) {
5412
+ var $size = _ref2.$size;
5413
+ return $size;
5414
+ });
5415
+ var Dot = styled__default.div.attrs(function (_ref3) {
5416
+ var $index = _ref3.$index,
5417
+ $size = _ref3.$size;
5418
+ return {
5419
+ style: {
5420
+ transform: getDotPosition($index, $size)
5421
+ }
5422
+ };
5423
+ })(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n background-color: ", ";\n border-radius: 50%;\n animation: ", " ", "s linear infinite;\n animation-delay: ", "s;\n"])), function (_ref4) {
5424
+ var $dotSize = _ref4.$dotSize;
5425
+ return $dotSize;
5426
+ }, function (_ref5) {
5427
+ var $dotSize = _ref5.$dotSize;
5428
+ return $dotSize;
5429
+ }, function (_ref6) {
5430
+ var $color = _ref6.$color;
5431
+ return $color;
5432
+ }, spin$1, function (_ref7) {
5433
+ var $speed = _ref7.$speed;
5434
+ return $speed;
5435
+ }, function (_ref8) {
5436
+ var $index = _ref8.$index,
5437
+ $speed = _ref8.$speed;
5438
+ return $index * $speed / 8;
5439
+ });
5440
+ var SpinnerWrapper = styled__default.div(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: max-content;\n"])));
5441
+ var sizeMap = {
5442
+ small: {
5443
+ size: 32
5444
+ },
5445
+ medium: {
5446
+ size: 48
5447
+ },
5448
+ large: {
5449
+ size: 64
5450
+ }
5451
+ };
5452
+ var CircularLoader = function CircularLoader(_ref9) {
5453
+ var _ref9$size = _ref9.size,
5454
+ size = _ref9$size === void 0 ? 'medium' : _ref9$size,
5455
+ _ref9$color = _ref9.color,
5456
+ color = _ref9$color === void 0 ? 'black' : _ref9$color,
5457
+ _ref9$dotSize = _ref9.dotSize,
5458
+ dotSize = _ref9$dotSize === void 0 ? 8 : _ref9$dotSize,
5459
+ _ref9$speed = _ref9.speed,
5460
+ speed = _ref9$speed === void 0 ? 1.2 : _ref9$speed,
5461
+ text = _ref9.text,
5462
+ customSize = _ref9.customSize;
5463
+ var spinnerSize = customSize != null ? customSize : sizeMap[size].size;
5464
+ return React__default.createElement(SpinnerWrapper, null, React__default.createElement(SpinnerContainer, {
5465
+ "$size": spinnerSize,
5466
+ "aria-label": "Loading animation"
5467
+ }, Array.from({
5468
+ length: 8
5469
+ }).map(function (_, i) {
5470
+ return React__default.createElement(Dot, {
5471
+ key: i,
5472
+ "$index": i,
5473
+ "$size": spinnerSize,
5474
+ "$dotSize": dotSize,
5475
+ "$color": color,
5476
+ "$speed": speed
5477
+ });
5478
+ })), text && React__default.createElement(React__default.Fragment, null, text));
5479
+ };
5480
+
5481
+ var _templateObject$i, _templateObject2$f;
5482
+ var spin$2 = styled.keyframes(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n to {\n transform: rotate(360deg);\n }\n"])));
5483
+ var Spinner$1 = styled__default.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n border: 5px solid #ddd;\n border-top-color: ", ";\n border-radius: 50%;\n animation: ", " 1s linear infinite;\n"])), function (_ref) {
5484
+ var $size = _ref.$size;
5485
+ return $size;
5486
+ }, function (_ref2) {
5487
+ var $size = _ref2.$size;
5488
+ return $size;
5489
+ }, function (_ref3) {
5490
+ var $color = _ref3.$color;
5491
+ return $color;
5492
+ }, spin$2);
5493
+ var Loader = function Loader(_ref4) {
5494
+ var title = _ref4.title,
5495
+ _ref4$size = _ref4.size,
5496
+ size = _ref4$size === void 0 ? 32 : _ref4$size,
5497
+ _ref4$color = _ref4.color,
5498
+ color = _ref4$color === void 0 ? colorVariables["default"].primary : _ref4$color,
5499
+ titleColor = _ref4.titleColor,
5500
+ titleSize = _ref4.titleSize;
5501
+ return React__default.createElement(Container, {
5502
+ "$alignItems": 'center',
5503
+ "$justifyContent": 'center',
5504
+ "$width": '100%',
5505
+ "$height": '100%',
5506
+ "$flexDirection": 'column',
5507
+ "$gap": '12px'
5508
+ }, React__default.createElement(Container, null, React__default.createElement(Spinner$1, {
5509
+ "$size": size,
5510
+ "$color": color
5511
+ })), title && React__default.createElement(Container, {
5512
+ "$flexDirection": 'column',
5513
+ "$gap": '12px'
5514
+ }, React__default.createElement(Container, {
5515
+ "$alignItems": 'center',
5516
+ "$justifyContent": 'center'
5517
+ }, React__default.createElement(Span, {
5518
+ "$fontWeight": '400',
5519
+ "$color": titleColor,
5520
+ "$fontSize": titleSize
5521
+ }, title))));
5522
+ };
5523
+
5524
+ var _templateObject$j;
5525
+ var PageInput = styled__default.input(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n width: 40px;\n height: 32px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 8px;\n padding: 4px;\n color: ", ";\n text-align: center;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n"])), colorVariables.accent.extraLight, colorVariables.border.light, colorVariables.text.dark);
5526
+ var Pagination = function Pagination(_ref) {
5527
+ var totalPages = _ref.totalPages,
5528
+ currentPage = _ref.currentPage,
5529
+ itemsPerPage = _ref.itemsPerPage,
5530
+ onPageChange = _ref.onPageChange,
5531
+ onItemsPerPageChange = _ref.onItemsPerPageChange;
5532
+ var _useTranslation = reactI18next.useTranslation(),
5533
+ t = _useTranslation.t;
5534
+ var _useNotification = useNotification(),
5535
+ sendNotification = _useNotification.sendNotification;
5536
+ var _useState = React.useState(currentPage.toString()),
5537
+ inputPage = _useState[0],
5538
+ setInputPage = _useState[1];
5539
+ React__default.useEffect(function () {
5540
+ setInputPage(currentPage.toString());
5541
+ }, [currentPage]);
5542
+ var handlePageChange = function handlePageChange(page) {
5543
+ if (page < 1 || page > totalPages) return;
5544
+ onPageChange(page);
5545
+ };
5546
+ var handleInputChange = function handleInputChange(e) {
5547
+ var value = e.target.value;
5548
+ if (/^(?:[1-9][0-9]*|0)?$/.test(value)) {
5549
+ setInputPage(value);
5550
+ }
5551
+ };
5552
+ var handleGoClick = function handleGoClick() {
5553
+ var page = Math.floor(Number(inputPage));
5554
+ if (!isNaN(page) && page >= 1 && page <= totalPages) {
5555
+ handlePageChange(page);
5556
+ } else {
5557
+ setInputPage(currentPage.toString());
5558
+ sendNotification({
5559
+ type: 'error',
5560
+ message: 'Invalid page number'
5561
+ });
5562
+ }
5563
+ };
5564
+ var containerRef = React.useRef(null);
5565
+ return React__default.createElement(Container, {
5566
+ "$gap": '40px',
5567
+ "$height": '100%',
5568
+ "$alignItems": 'flex-start',
5569
+ ref: containerRef
5570
+ }, React__default.createElement(Container, {
5571
+ "$gap": '16px',
5572
+ "$alignItems": 'center'
5573
+ }, React__default.createElement(Span, {
5574
+ "$fontWeight": '400',
5575
+ "$fontSize": '14px',
5576
+ "$lineHeight": '100%'
5577
+ }, t('Page')), React__default.createElement(Container, {
5578
+ "$gap": '12px',
5579
+ "$alignItems": 'center'
5580
+ }, React__default.createElement(Container, {
5581
+ "$gap": '4px',
5582
+ "$alignItems": 'center'
5583
+ }, React__default.createElement(PageInput, {
5584
+ type: 'number',
5585
+ value: inputPage,
5586
+ onChange: handleInputChange,
5587
+ min: 1,
5588
+ max: totalPages,
5589
+ onKeyDown: function onKeyDown(e) {
5590
+ if (e.key === 'Enter') handleGoClick();
5591
+ }
5592
+ }), React__default.createElement(Span, {
5593
+ "$fontWeight": '400',
5594
+ "$fontSize": '14px'
5595
+ }, "/ ", totalPages)), React__default.createElement(ButtonComponent, {
5596
+ variant: 'primary',
5597
+ disabled: inputPage.trim() === '' || isNaN(Number(inputPage)),
5598
+ onClick: handleGoClick,
5599
+ text: t('Go'),
5600
+ size: 'small'
5601
+ })), React__default.createElement(Container, {
5602
+ "$gap": '12px'
5603
+ }, React__default.createElement(ButtonComponent, {
5604
+ onClick: function onClick() {
5605
+ return handlePageChange(currentPage - 1);
5606
+ },
5607
+ disabled: currentPage === 1,
5608
+ icon: 'LeftArrow',
5609
+ iconSize: 12,
5610
+ size: 'custom',
5611
+ padding: '7px',
5612
+ variant: 'secondary',
5613
+ borderRadius: '4px',
5614
+ color: colorVariables.text.white
5615
+ }), React__default.createElement(ButtonComponent, {
5616
+ onClick: function onClick() {
5617
+ return handlePageChange(currentPage + 1);
5618
+ },
5619
+ disabled: currentPage === totalPages,
5620
+ icon: 'RightArrow',
5621
+ iconSize: 12,
5622
+ size: 'custom',
5623
+ padding: '7px',
5624
+ variant: 'secondary',
5625
+ borderRadius: '4px',
5626
+ color: colorVariables.text.white
5627
+ }))), React__default.createElement(Container, {
5628
+ "$gap": '16px',
5629
+ "$justifyContent": 'center',
5630
+ "$alignItems": 'center'
5631
+ }, React__default.createElement(Span, {
5632
+ "$fontWeight": '400',
5633
+ "$fontSize": '14px'
5634
+ }, t('Item_Per_Page')), React__default.createElement(Container, null, React__default.createElement(SelectOption, {
5635
+ width: '54px',
5636
+ size: 'small',
5637
+ value: itemsPerPage.toString(),
5638
+ onChange: function onChange(e) {
5639
+ var val = parseInt(e.target.value, 10);
5640
+ if (!isNaN(val)) {
5641
+ onItemsPerPageChange(val);
5642
+ }
5643
+ },
5644
+ options: [{
5645
+ label: '5',
5646
+ value: '5'
5647
+ }, {
5648
+ label: '10',
5649
+ value: '10'
5650
+ }, {
5651
+ label: '20',
5652
+ value: '20'
5653
+ }],
5654
+ positionRef: containerRef,
5655
+ allowDeselect: false
5656
+ }))));
5657
+ };
5658
+
5659
+ var ProgressBar = function ProgressBar(_ref) {
5660
+ var _ref$totalSteps = _ref.totalSteps,
5661
+ totalSteps = _ref$totalSteps === void 0 ? 4 : _ref$totalSteps;
5662
+ var _useState = React.useState(0),
5663
+ currentStep = _useState[0],
5664
+ setCurrentStep = _useState[1];
5665
+ React.useEffect(function () {
5666
+ var interval = setInterval(function () {
5667
+ setCurrentStep(function (prevStep) {
5668
+ if (prevStep < totalSteps) {
5669
+ return prevStep + 1;
5670
+ } else {
5671
+ clearInterval(interval);
5672
+ return totalSteps;
5673
+ }
5674
+ });
5675
+ }, 1000);
5676
+ return function () {
5677
+ return clearInterval(interval);
5678
+ };
5679
+ }, [totalSteps]);
5680
+ return React__default.createElement("div", {
5681
+ style: {
5682
+ width: '100%',
5683
+ textAlign: 'center'
5684
+ }
5685
+ }, React__default.createElement("p", {
5686
+ style: {
5687
+ fontSize: '14px',
5688
+ fontWeight: '400',
5689
+ marginBottom: '8px',
5690
+ color: '#4C9EEB'
5691
+ }
5692
+ }, "Step ", currentStep, " out of ", totalSteps), React__default.createElement("div", {
5693
+ style: {
5694
+ width: '100%',
5695
+ backgroundColor: '#f3f3f3',
5696
+ borderRadius: '5px',
5697
+ overflow: 'hidden'
5698
+ }
5699
+ }, React__default.createElement("div", {
5700
+ style: {
5701
+ width: currentStep / totalSteps * 100 + "%",
5702
+ height: '6px',
5703
+ backgroundColor: '#4C9EEB',
5704
+ transition: 'width 0.5s ease-in-out'
5705
+ }
5706
+ })));
5707
+ };
5708
+
5709
+ var _templateObject$k, _templateObject2$g, _templateObject3$b, _templateObject4$8, _templateObject5$7, _templateObject6$7;
5710
+ var SidebarContainer = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: 100vh;\n background: ", "; \n transition: width 0.3s ease-in-out;\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 20px;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n z-index: 10;\n justify-content: space-between;\n"])), function (_ref) {
5711
+ var $isExpanded = _ref.$isExpanded;
5712
+ return $isExpanded ? '225px' : '68px';
5713
+ }, function (_ref2) {
5714
+ var $background = _ref2.$background;
5715
+ return $background ? $background : colorVariables.accent.softBlue;
5716
+ });
5717
+ var SidebarItem = styled__default(reactRouterDom.NavLink)(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n color: ", ";\n transition: background 0.3s;\n\n &:hover {\n background: ", ";\n }\n"])), colorVariables.text.medium, colorVariables["default"].primary);
5718
+ var ContentWrapper = styled__default.div(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n"])));
5719
+ var IconWrapper$2 = styled__default.div(_templateObject4$8 || (_templateObject4$8 = _taggedTemplateLiteralLoose(["\n background: ", "; \n font-weight: bold;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n > div:first-child {\n cursor: pointer;\n }\n"])), function (_ref3) {
5720
+ var $selected = _ref3.$selected;
5721
+ return $selected ? colorVariables["default"].primary : colorVariables["default"].tertiary;
5722
+ });
5723
+ var Logo = styled__default.div(_templateObject5$7 || (_templateObject5$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n width: 100%;\n min-width: max-content;\n height: 32px;\n align-items: center;\n justify-content: start;\n gap: 10px;\n"])));
5724
+ var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n width: 100%;\n white-space: nowrap;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n opacity: ", ";\n visibility: ", ";\n transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;\n"])), function (_ref4) {
5725
+ var $padding = _ref4.$padding;
5726
+ return $padding;
5727
+ }, function (_ref5) {
5728
+ var $fontSize = _ref5.$fontSize;
5729
+ return $fontSize ? $fontSize : '20px';
5730
+ }, function (_ref6) {
5731
+ var $fontWeight = _ref6.$fontWeight;
5732
+ return $fontWeight ? $fontWeight : '500';
5733
+ }, function (_ref7) {
5734
+ var $color = _ref7.$color;
5735
+ return $color ? $color : colorVariables["default"].primary;
5736
+ }, function (_ref8) {
5737
+ var $isExpanded = _ref8.$isExpanded;
5738
+ return $isExpanded ? 1 : 0;
5739
+ }, function (_ref9) {
5740
+ var $isExpanded = _ref9.$isExpanded;
5741
+ return $isExpanded ? 'visible' : 'hidden';
5742
+ });
5743
+ var Sidebar = function Sidebar(_ref10) {
5744
+ var logo = _ref10.logo,
5745
+ content = _ref10.content,
5746
+ background = _ref10.background,
5747
+ ProfileContent = _ref10.ProfileContent,
5748
+ _ref10$isExpanded = _ref10.isExpanded,
5749
+ isExpanded = _ref10$isExpanded === void 0 ? false : _ref10$isExpanded,
5750
+ setIsExpanded = _ref10.setIsExpanded;
5751
+ var location = reactRouterDom.useLocation();
5752
+ var getTopLevelPathWithSlash = function getTopLevelPathWithSlash(pathname) {
5753
+ var parts = pathname.split('/').filter(String);
5754
+ return parts.length > 0 ? '/' + parts[0] : '/';
5755
+ };
5756
+ var getTopLevelPath = function getTopLevelPath(pathname) {
5757
+ var parts = pathname.split('/').filter(String);
5758
+ return parts.length > 0 ? "/" + parts[0] + "/" : '/';
5759
+ };
5760
+ var topLevelPath = getTopLevelPathWithSlash(location.pathname) || getTopLevelPath(location.pathname);
5761
+ return React__default.createElement(SidebarContainer, {
5762
+ "$background": background,
5763
+ "$isExpanded": isExpanded,
5764
+ onMouseEnter: function onMouseEnter() {
5765
+ return setIsExpanded(true);
5766
+ },
5767
+ onMouseLeave: function onMouseLeave() {
5768
+ return setIsExpanded(false);
5769
+ }
5770
+ }, logo && React__default.createElement(Logo, null, React__default.createElement(Icon, {
5771
+ icon: logo.icon
5772
+ }), React__default.createElement(TextContainer, {
5773
+ "$isExpanded": isExpanded,
5774
+ "$fontWeight": "700"
5775
+ }, logo.name)), React__default.createElement(ContentWrapper, null, content.map(function (item) {
5776
+ var isActive = item.url.includes(topLevelPath);
5777
+ return React__default.createElement(SidebarItem, {
5778
+ to: item.url,
5779
+ key: item.id
5780
+ }, React__default.createElement(IconWrapper$2, {
5781
+ "$selected": isActive
5782
+ }, React__default.createElement(Icon, {
5783
+ icon: item.icon,
5784
+ size: 20,
5785
+ weight: item.iconWeight,
5786
+ color: isActive ? colorVariables.text.white : colorVariables.text.medium
5787
+ })), React__default.createElement(TextContainer, {
5788
+ "$isExpanded": isExpanded,
5789
+ "$fontSize": "14px",
5790
+ "$padding": '0px 10px 0px 0px',
5791
+ "$color": colorVariables.text.medium
5792
+ }, item.label));
5793
+ })), ProfileContent);
5794
+ };
5795
+
5796
+ var _templateObject$l, _templateObject2$h, _templateObject3$c, _templateObject4$9;
5797
+ var ContainerWrapper = styled__default.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n height: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n min-height: ", ";\n word-break: break-word;\n"])), function (props) {
5798
+ return props.$width || 'auto';
5799
+ }, function (_ref) {
5800
+ var $minHeight = _ref.$minHeight;
5801
+ return $minHeight;
5802
+ });
5803
+ var CellContainer = styled__default.div(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n align-items:", ";\n justify-content: center;\n width: ", ";\n min-width: ", ";\n display: flex;\n flex-direction: column;\n background: ", ";\n padding: ", ";\n gap: 4px;\n height: 100%\n"])), function (props) {
5804
+ return props.$align;
5805
+ }, function (props) {
5806
+ return props.$width || 'auto';
5807
+ }, function (props) {
5808
+ return props.$minWidth;
5809
+ }, function (props) {
5810
+ return props.$background || 'inherit';
5811
+ }, function (props) {
5812
+ return props.$padding;
5813
+ });
5814
+ var MainText = styled__default.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size:", ";\n font-weight:", ";\n line-height: 100%;\n"])), function (props) {
5815
+ return props.$mtc;
5816
+ }, function (props) {
5817
+ return props.$mtfs;
5818
+ }, function (props) {
5819
+ return props.$mtw;
5820
+ });
5821
+ var SubText = styled__default.div(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-size:", ";\n font-weight:", ";\n line-height: 100%;\n"])), function (props) {
5822
+ return props.$stc;
5823
+ }, function (props) {
5824
+ return props.$stfs;
5825
+ }, function (props) {
5826
+ return props.$stw;
5827
+ });
5828
+ var TableCell = function TableCell(_ref2) {
5829
+ var maintext = _ref2.maintext,
5830
+ _ref2$maintextcolor = _ref2.maintextcolor,
5831
+ maintextcolor = _ref2$maintextcolor === void 0 ? 'inherit' : _ref2$maintextcolor,
5832
+ _ref2$maintextfontsiz = _ref2.maintextfontsize,
5833
+ maintextfontsize = _ref2$maintextfontsiz === void 0 ? '14px' : _ref2$maintextfontsiz,
5834
+ _ref2$maintextweight = _ref2.maintextweight,
5835
+ maintextweight = _ref2$maintextweight === void 0 ? '500' : _ref2$maintextweight,
5836
+ subtext = _ref2.subtext,
5837
+ _ref2$subtextcolor = _ref2.subtextcolor,
5838
+ subtextcolor = _ref2$subtextcolor === void 0 ? 'inherit' : _ref2$subtextcolor,
5839
+ _ref2$subtextfontsize = _ref2.subtextfontsize,
5840
+ subtextfontsize = _ref2$subtextfontsize === void 0 ? '10px' : _ref2$subtextfontsize,
5841
+ _ref2$subtextweight = _ref2.subtextweight,
5842
+ subtextweight = _ref2$subtextweight === void 0 ? '400' : _ref2$subtextweight,
5843
+ _ref2$alignment = _ref2.alignment,
5844
+ alignment = _ref2$alignment === void 0 ? 'center' : _ref2$alignment,
5845
+ width = _ref2.width,
5846
+ minWidth = _ref2.minWidth,
5847
+ CustomFunction = _ref2.CustomFunction,
5848
+ padding = _ref2.padding,
5849
+ minHeight = _ref2.minHeight;
5850
+ return React__default.createElement(ContainerWrapper, {
5851
+ "$width": width,
5852
+ "$minHeight": minHeight
5853
+ }, CustomFunction ? React__default.createElement(CellContainer, {
5854
+ "$align": alignment,
5855
+ "$width": width,
5856
+ "$minWidth": minWidth
5857
+ }, CustomFunction) : React__default.createElement(CellContainer, {
5858
+ "$align": alignment,
5859
+ "$width": width,
5860
+ "$minWidth": minWidth,
5861
+ "$padding": padding
5862
+ }, React__default.createElement(MainText, {
5863
+ "$mtc": maintextcolor,
5864
+ "$mtfs": maintextfontsize,
5865
+ "$mtw": maintextweight
5866
+ }, maintext), subtext && React__default.createElement(SubText, {
5867
+ "$stc": subtextcolor,
5868
+ "$stfs": subtextfontsize,
5869
+ "$stw": subtextweight
5870
+ }, subtext)));
5871
+ };
5872
+
5873
+ var _templateObject$m;
5874
+ var TableRowContainer = styled.styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n background: inherit;\n align-items:center;\n padding: 16px 12px;\n width: 100%;\n"])));
5875
+ var TableRow = function TableRow(_ref) {
5876
+ var rowconfig = _ref.rowconfig,
5877
+ tableheaderconfig = _ref.tableheaderconfig;
5878
+ var toggleChecked = function toggleChecked(index) {
5879
+ rowconfig[index]._checked = !rowconfig[index]._checked;
5880
+ };
5881
+ return React__default.createElement(Container, null, rowconfig.map(function (data, Index) {
5882
+ var _rowconfig$Index;
5883
+ return React__default.createElement(TableRowContainer, {
5884
+ key: Index
5885
+ }, tableheaderconfig.isAllSelectable && React__default.createElement(Container, {
5886
+ "$padding": '0px 16px 0px 0px',
5887
+ "$alignItems": 'center'
5888
+ }, React__default.createElement("input", {
5889
+ type: "checkbox",
5890
+ checked: rowconfig[Index]._checked,
5891
+ disabled: (_rowconfig$Index = rowconfig[Index]) === null || _rowconfig$Index === void 0 ? void 0 : _rowconfig$Index._selectable,
5892
+ onClick: function onClick() {
5893
+ return toggleChecked(Index);
5894
+ }
5895
+ })), data.rowData.map(function (cellData, cellkey) {
5896
+ var _tableheaderconfig$he;
5897
+ return React__default.createElement(TableCell, {
5898
+ key: cellkey,
5899
+ maintext: cellData.maintext,
5900
+ width: (_tableheaderconfig$he = tableheaderconfig.headerdata[cellkey]) === null || _tableheaderconfig$he === void 0 ? void 0 : _tableheaderconfig$he.width,
5901
+ background: cellData.background,
5902
+ maintextcolor: cellData.maintextcolor,
5903
+ maintextfontsize: cellData.maintextfontsize,
5904
+ maintextweight: cellData.maintextweight,
5905
+ subtext: cellData.subtext,
5906
+ subtextcolor: cellData.subtextcolor,
5907
+ subtextfontsize: cellData.subtextfontsize,
5908
+ subtextweight: cellData.subtextweight,
5909
+ alignment: cellData.alignment,
5910
+ CustomFunction: cellData.CustomFunction,
5911
+ minHeight: '30px'
5912
+ });
5913
+ }));
5914
+ }));
5915
+ };
5916
+
5917
+ var _templateObject$n, _templateObject2$i, _templateObject3$d, _templateObject4$a, _templateObject5$8;
5918
+ var TableContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n background: ", ";\n width: 100%;\n display: flex;\n overflow: hidden;\n border-radius: 8px;\n"])), colorVariables.brand.light);
5919
+ var TableHeader = styled__default.div(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n display: flex;\n background: ", ";\n color: ", ";\n min-height: 36px;\n align-items: center;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n padding: 9px 12px;\n"])), function (props) {
5920
+ return props.$hbcolor || 'transparent';
5921
+ }, function (props) {
5922
+ return props.$tcolor || 'white';
5923
+ });
5924
+ var TableContent = styled__default.div(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n svg {\n cursor: pointer;\n }\n"])));
5925
+ var TableData = styled__default.div(_templateObject4$a || (_templateObject4$a = _taggedTemplateLiteralLoose(["\n overflow: auto;\n scrollbar-width: thin;\n height: 100%;\n max-height: calc(100% - 36px);\n"])));
5926
+ var Divider = styled__default.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n height: 2px;\n background: ", ";\n"])), colorVariables.border.extraLight);
5927
+ var Table = function Table(_ref) {
5928
+ var tableObject = _ref.tableObject,
5929
+ _ref$filter = _ref.filter,
5930
+ filter = _ref$filter === void 0 ? false : _ref$filter,
5931
+ loading = _ref.loading,
5932
+ _ref$noDataText = _ref.noDataText,
5933
+ noDataText = _ref$noDataText === void 0 ? 'No Data Found!' : _ref$noDataText;
5934
+ var rowconfig = tableObject.rowconfig,
5935
+ tableheaderconfig = tableObject.tableheaderconfig;
5936
+ var _useState = React.useState(new Set()),
5937
+ collapsedRoles = _useState[0],
5938
+ setCollapsedRoles = _useState[1];
5939
+ var _useState2 = React.useState(false),
5940
+ isAllSelected = _useState2[0],
5941
+ setIsAllSelected = _useState2[1];
5942
+ var getRole = function getRole(row) {
5943
+ var _row$rowData, _row$rowData$, _row$rowData$$CustomF, _row$rowData$$CustomF2;
5944
+ return ((_row$rowData = row.rowData) === null || _row$rowData === void 0 ? void 0 : (_row$rowData$ = _row$rowData[1]) === null || _row$rowData$ === void 0 ? void 0 : (_row$rowData$$CustomF = _row$rowData$.CustomFunction) === null || _row$rowData$$CustomF === void 0 ? void 0 : (_row$rowData$$CustomF2 = _row$rowData$$CustomF.props) === null || _row$rowData$$CustomF2 === void 0 ? void 0 : _row$rowData$$CustomF2.text) || 'Unassigned';
5945
+ };
5946
+ var filteredRows = filter ? rowconfig.filter(function (row) {
5947
+ return getRole(row);
5948
+ }) : rowconfig;
5949
+ var roleGroups = {};
5950
+ filteredRows.forEach(function (row) {
5951
+ var role = getRole(row);
5952
+ if (!roleGroups[role]) roleGroups[role] = [];
5953
+ roleGroups[role].push(row);
5954
+ });
5955
+ var toggleRoleVisibility = function toggleRoleVisibility(role) {
5956
+ setCollapsedRoles(function (prev) {
5957
+ var newSet = new Set(prev);
5958
+ if (newSet.has(role)) {
5959
+ newSet["delete"](role);
5960
+ } else {
5961
+ newSet.add(role);
5962
+ }
5963
+ return newSet;
5964
+ });
5965
+ };
5966
+ var toggleSelectAll = function toggleSelectAll() {
5967
+ var newState = !isAllSelected;
5968
+ setIsAllSelected(newState);
5969
+ tableObject.rowconfig.forEach(function (row) {
5970
+ row._checked = newState;
5971
+ });
5972
+ };
5973
+ React.useEffect(function () {
5974
+ setIsAllSelected(false);
5975
+ }, [rowconfig]);
5976
+ return React__default.createElement(TableContainer, null, React__default.createElement(TableContent, null, React__default.createElement(TableHeader, {
5977
+ "$hbcolor": tableheaderconfig.headercolor,
5978
+ "$tcolor": tableheaderconfig.textcolor
5979
+ }, tableheaderconfig.isAllSelectable && React__default.createElement(Container, {
5980
+ "$padding": '0px 16px 0px 0px',
5981
+ "$alignItems": 'center'
5982
+ }, React__default.createElement("input", {
5983
+ type: 'checkbox',
5984
+ checked: isAllSelected,
5985
+ onChange: toggleSelectAll
5986
+ })), tableheaderconfig.headerdata.map(function (columndata, key) {
5987
+ var _columndata$maintext;
5988
+ return React__default.createElement(TableCell, {
5989
+ key: key,
5990
+ maintext: (_columndata$maintext = columndata.maintext) != null ? _columndata$maintext : '',
5991
+ width: columndata.width,
5992
+ alignment: columndata.alignment
5993
+ });
5994
+ })), loading ? React__default.createElement(Container, {
5995
+ "$flexDirection": 'column',
5996
+ "$alignItems": 'center',
5997
+ "$justifyContent": 'center',
5998
+ "$padding": '24px 24px'
5999
+ }, React__default.createElement(Loader, {
6000
+ title: 'Loading users'
6001
+ })) : rowconfig.length === 0 ? React__default.createElement(Container, {
6002
+ "$flexDirection": 'column',
6003
+ "$alignItems": 'center',
6004
+ "$padding": '24px 24px',
6005
+ "$justifyContent": 'center'
6006
+ }, React__default.createElement(Span, null, noDataText)) : filter ? React__default.createElement(TableData, null, Object.entries(roleGroups).map(function (_ref2) {
6007
+ var role = _ref2[0],
6008
+ rows = _ref2[1];
6009
+ return React__default.createElement(React__default.Fragment, {
6010
+ key: role
6011
+ }, React__default.createElement(Container, {
6012
+ "$justifyContent": 'space-between',
6013
+ "$padding": '9px 12px',
6014
+ "$minHeight": '30px',
6015
+ "$alignItems": 'center',
6016
+ "$background": colorVariables.accent.light,
6017
+ onClick: function onClick() {
6018
+ return toggleRoleVisibility(role);
6019
+ },
6020
+ "$cursor": 'pointer',
6021
+ "$border": "1px solid " + colorVariables.border.extraLight
6022
+ }, React__default.createElement(Span, {
6023
+ "$color": colorVariables.text.medium,
6024
+ "$fontSize": '12px',
6025
+ "$lineHeight": '100%'
6026
+ }, role, " (", rows.length, ")"), React__default.createElement(Icon, {
6027
+ size: 12,
6028
+ icon: collapsedRoles.has(role) ? 'UpArrow' : 'DownArrow'
6029
+ })), !collapsedRoles.has(role) && rows.map(function (row, index) {
6030
+ return React__default.createElement(Container, {
6031
+ key: index,
6032
+ "$flexDirection": 'column'
6033
+ }, React__default.createElement(TableRow, {
6034
+ rowconfig: [row],
6035
+ tableheaderconfig: tableheaderconfig
6036
+ }), rows.length > 1 && index < rows.length - 1 && React__default.createElement(Divider, null));
6037
+ }));
6038
+ })) : React__default.createElement(TableData, null, filteredRows.map(function (row, index) {
6039
+ return React__default.createElement(React__default.Fragment, {
6040
+ key: index
6041
+ }, React__default.createElement(TableRow, {
6042
+ rowconfig: [row],
6043
+ tableheaderconfig: tableheaderconfig
6044
+ }), filteredRows.length > 1 && index < filteredRows.length - 1 && React__default.createElement(Divider, null));
6045
+ }))));
6046
+ };
6047
+
6048
+ var _templateObject$o, _templateObject2$j, _templateObject3$e, _templateObject4$b, _templateObject5$9;
6049
+ var Container$5 = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n \n"])));
6050
+ var FirstContainer = styled__default.div(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n font-family: NotoSans, sans-serif;\n font-size: 16px;\n gap: 24px;\n border-bottom: 1px solid ", ";\n padding: ", ";\n"])), colorVariables.border.light, function (_ref) {
6051
+ var $headerPadding = _ref.$headerPadding;
6052
+ return $headerPadding ? $headerPadding : '0px';
6053
+ });
6054
+ var TabContainer = styled__default.div(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n width: auto;\n display: flex;\n align-items: center;\n cursor: ", ";\n opacity: ", ";\n gap: 8px;\n font-family: NotoSans, sans-serif;\n font-size: 14px;\n font-weight: 500;\n color: ", ";\n height: ", ";\n\n svg {\n cursor: ", ";\n }\n\n"])), function (_ref2) {
6055
+ var $disabled = _ref2.$disabled;
6056
+ return $disabled ? 'not-allowed' : 'pointer';
6057
+ }, function (_ref3) {
6058
+ var $disabled = _ref3.$disabled;
6059
+ return $disabled ? '0.6' : '1';
6060
+ }, colorVariables.text.medium, function (_ref4) {
6061
+ var $headerHeight = _ref4.$headerHeight;
6062
+ return $headerHeight ? $headerHeight : '34px';
6063
+ }, function (_ref5) {
6064
+ var $disabled = _ref5.$disabled;
6065
+ return $disabled ? 'not-allowed' : 'pointer';
6066
+ });
6067
+ var TabItemContainer = styled__default.div(_templateObject4$b || (_templateObject4$b = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n position: relative;\n gap: 8px;\n height: 100%;\n max-height: ", ";\n\n &:after {\n content: \"\";\n display: ", ";\n width: 100%;\n height: 3px;\n background: ", ";\n position: absolute;\n bottom: -1px;\n left: 0px;\n }\n"])), function (_ref6) {
6068
+ var $headerHeight = _ref6.$headerHeight;
6069
+ return $headerHeight ? $headerHeight : '34px';
6070
+ }, function (props) {
6071
+ return props.$active ? 'block' : 'none';
6072
+ }, colorVariables["default"].primary);
6073
+ var DetailsFirstContainer = styled__default.div(_templateObject5$9 || (_templateObject5$9 = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 18px;\n font-weight: 500;\n font-family: NotoSans, sans-serif;\n height: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n"])), function (props) {
6074
+ return props.$active ? colorVariables["default"].primary : colorVariables.text.medium;
6075
+ });
6076
+ var Tab = function Tab(_ref7) {
6077
+ var tabItems = _ref7.tabItems,
6078
+ _ref7$disabled = _ref7.disabled,
6079
+ disabled = _ref7$disabled === void 0 ? false : _ref7$disabled,
6080
+ headerHeight = _ref7.headerHeight,
6081
+ headerPadding = _ref7.headerPadding,
6082
+ activeTab = _ref7.activeTab,
6083
+ border = _ref7.border;
6084
+ return React__default.createElement(Container$5, {
6085
+ "$border": border
6086
+ }, React__default.createElement(FirstContainer, {
6087
+ "$headerPadding": headerPadding
6088
+ }, tabItems.map(function (tab, index) {
6089
+ return React__default.createElement(TabContainer, {
6090
+ key: index,
6091
+ onClick: function onClick() {
6092
+ if (!disabled && tab.onClick) tab.onClick();
6093
+ },
6094
+ "$disabled": disabled,
6095
+ "$headerHeight": headerHeight
6096
+ }, React__default.createElement(TabItemContainer, {
6097
+ "$active": activeTab === tab.title,
6098
+ "$headerHeight": headerHeight
6099
+ }, tab.icon && React__default.createElement(Icon, {
6100
+ color: activeTab === tab.title ? tab.activeColor : colorVariables.text.medium,
6101
+ icon: tab.icon,
6102
+ size: tab.iconSize,
6103
+ weight: tab.iconWeight
6104
+ }), React__default.createElement(DetailsFirstContainer, {
6105
+ "$active": activeTab === tab.title
6106
+ }, tab.title)));
6107
+ })), tabItems.map(function (tab, index) {
6108
+ return activeTab === tab.title && React__default.createElement(Container$5, {
6109
+ key: index
6110
+ }, tab.content);
6111
+ }));
6112
+ };
6113
+
6114
+ var InternalTabs = function InternalTabs(_ref) {
6115
+ var tabs = _ref.tabs,
6116
+ activeTab = _ref.activeTab,
6117
+ _ref$backgroundColor = _ref.backgroundColor,
6118
+ backgroundColor = _ref$backgroundColor === void 0 ? colorVariables.text.white : _ref$backgroundColor,
6119
+ _ref$activeTabBg = _ref.activeTabBg,
6120
+ activeTabBg = _ref$activeTabBg === void 0 ? colorVariables.accent.softBlue : _ref$activeTabBg,
6121
+ _ref$textColor = _ref.textColor,
6122
+ textColor = _ref$textColor === void 0 ? colorVariables["default"].primary : _ref$textColor,
6123
+ _ref$disabled = _ref.disabled,
6124
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
6125
+ return React__default.createElement(Container, {
6126
+ "$background": backgroundColor,
6127
+ "$padding": '3px',
6128
+ "$borderRadius": '4px',
6129
+ "$justifyContent": 'space-between',
6130
+ "$opacity": disabled ? 0.6 : 1
6131
+ }, tabs.map(function (tab) {
6132
+ return React__default.createElement(Container, {
6133
+ key: tab.value,
6134
+ "$borderRadius": '4px',
6135
+ "$width": '126px',
6136
+ "$justifyContent": 'center',
6137
+ "$alignItems": 'center',
6138
+ "$cursor": disabled ? 'not-allowed' : 'pointer',
6139
+ onClick: disabled ? undefined : tab.onClick,
6140
+ "$background": activeTab === tab.value ? activeTabBg : colorVariables["default"].tertiary,
6141
+ "$color": activeTab === tab.value ? textColor : colorVariables.text.medium
6142
+ }, React__default.createElement(Span, {
6143
+ "$fontSize": '14px',
6144
+ "$color": activeTab === tab.value ? textColor : colorVariables.text.medium
6145
+ }, tab.title));
6146
+ }));
6147
+ };
6148
+
6149
+ exports.Badge = Badge;
6150
+ exports.Breadcrumbs = Breadcrumbs;
3246
6151
  exports.Button = ButtonComponent;
6152
+ exports.ButtonCarousel = ButtonCarousel;
3247
6153
  exports.CircularLoader = CircularLoader;
6154
+ exports.Container = Container;
6155
+ exports.DatePicker = DatePicker;
3248
6156
  exports.Icon = Icon;
3249
- exports.Input = MultiFunctionInputComponent;
6157
+ exports.InternalTabs = InternalTabs;
6158
+ exports.Loader = Loader;
6159
+ exports.MultiSelectDropdown = MultiSelectDropdown;
6160
+ exports.OptionComponent = OptionComponent;
6161
+ exports.Pagination = Pagination;
3250
6162
  exports.ProgressBar = ProgressBar;
3251
- exports.Tabs = Tabs;
6163
+ exports.SearchBox = SearchBox;
6164
+ exports.SelectOption = SelectOption;
6165
+ exports.SelectedOption = SelectedOption;
6166
+ exports.Sidebar = Sidebar;
6167
+ exports.Span = Span;
6168
+ exports.Table = Table;
6169
+ exports.TableCell = TableCell;
6170
+ exports.TableRow = TableRow;
6171
+ exports.Tabs = Tab;
6172
+ exports.TextArea = TextArea;
6173
+ exports.TextField = InputField;
6174
+ exports.TextFieldWithDropdown = TextFieldWithDropdown;
3252
6175
  exports.colorVariables = colorVariables;
6176
+ exports.convertEpochToDateString = convertEpochToDateString;
6177
+ exports.convertEpochToOnlyDate = convertEpochToOnlyDate;
6178
+ exports.convertToEpoch = convertToEpoch;
3253
6179
  exports.darkColorVariables = darkColorVariables;
6180
+ exports.formatCalendarDateTime = formatCalendarDateTime;
6181
+ exports.formatDate = formatDate;
6182
+ exports.formatEpochToIST = formatEpochToIST;
6183
+ exports.formatTimestamp = formatTimestamp;
6184
+ exports.getSystemTimezoneAbbreviation = getSystemTimezoneAbbreviation;
3254
6185
  exports.themes = themes;
6186
+ exports.timeAgo = timeAgo;
6187
+ exports.timeStringToSeconds = timeStringToSeconds;
3255
6188
  exports.useClickOutside = useClickOutside;
3256
6189
  exports.useCustomModal = useCustomModal;
3257
6190
  //# sourceMappingURL=index.js.map