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