@helpwave/hightide 0.1.17 → 0.1.19

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 (261) hide show
  1. package/dist/components/branding/HelpwaveBadge.js +7 -7
  2. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  3. package/dist/components/branding/HelpwaveBadge.mjs +7 -7
  4. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  5. package/dist/components/date/DatePicker.js +65 -38
  6. package/dist/components/date/DatePicker.js.map +1 -1
  7. package/dist/components/date/DatePicker.mjs +54 -27
  8. package/dist/components/date/DatePicker.mjs.map +1 -1
  9. package/dist/components/date/DayPicker.js +3 -3
  10. package/dist/components/date/DayPicker.js.map +1 -1
  11. package/dist/components/date/DayPicker.mjs +3 -3
  12. package/dist/components/date/DayPicker.mjs.map +1 -1
  13. package/dist/components/date/TimePicker.js +4 -4
  14. package/dist/components/date/TimePicker.js.map +1 -1
  15. package/dist/components/date/TimePicker.mjs +4 -4
  16. package/dist/components/date/TimePicker.mjs.map +1 -1
  17. package/dist/components/date/YearMonthPicker.js +46 -19
  18. package/dist/components/date/YearMonthPicker.js.map +1 -1
  19. package/dist/components/date/YearMonthPicker.mjs +44 -17
  20. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  21. package/dist/components/dialogs/ConfirmDialog.js +32 -28
  22. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  23. package/dist/components/dialogs/ConfirmDialog.mjs +18 -14
  24. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  25. package/dist/components/icons-and-geometry/Avatar.js +2 -2
  26. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  27. package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
  28. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  29. package/dist/components/icons-and-geometry/Ring.js +2 -2
  30. package/dist/components/icons-and-geometry/Ring.js.map +1 -1
  31. package/dist/components/icons-and-geometry/Ring.mjs +2 -2
  32. package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
  33. package/dist/components/layout-and-navigation/BreadCrumb.js +1 -1
  34. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  35. package/dist/components/layout-and-navigation/BreadCrumb.mjs +1 -1
  36. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  37. package/dist/components/layout-and-navigation/Carousel.js +84 -15
  38. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  39. package/dist/components/layout-and-navigation/Carousel.mjs +76 -7
  40. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  41. package/dist/components/layout-and-navigation/Chip.js +1 -1
  42. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  43. package/dist/components/layout-and-navigation/Chip.mjs +1 -1
  44. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  45. package/dist/components/layout-and-navigation/Expandable.d.mts +7 -1
  46. package/dist/components/layout-and-navigation/Expandable.d.ts +7 -1
  47. package/dist/components/layout-and-navigation/Expandable.js +36 -9
  48. package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
  49. package/dist/components/layout-and-navigation/Expandable.mjs +36 -10
  50. package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
  51. package/dist/components/layout-and-navigation/FAQSection.js +34 -11
  52. package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
  53. package/dist/components/layout-and-navigation/FAQSection.mjs +36 -13
  54. package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
  55. package/dist/components/layout-and-navigation/Overlay.js +92 -19
  56. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  57. package/dist/components/layout-and-navigation/Overlay.mjs +81 -8
  58. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  59. package/dist/components/layout-and-navigation/Pagination.js +82 -10
  60. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  61. package/dist/components/layout-and-navigation/Pagination.mjs +79 -7
  62. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  63. package/dist/components/layout-and-navigation/SearchableList.js +127 -26
  64. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  65. package/dist/components/layout-and-navigation/SearchableList.mjs +126 -25
  66. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  67. package/dist/components/layout-and-navigation/StepperBar.js +22 -16
  68. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  69. package/dist/components/layout-and-navigation/StepperBar.mjs +19 -13
  70. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  71. package/dist/components/layout-and-navigation/TextImage.js +7 -3
  72. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  73. package/dist/components/layout-and-navigation/TextImage.mjs +7 -3
  74. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  75. package/dist/components/layout-and-navigation/Tile.d.mts +2 -2
  76. package/dist/components/layout-and-navigation/Tile.d.ts +2 -2
  77. package/dist/components/layout-and-navigation/Tile.js +7 -7
  78. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  79. package/dist/components/layout-and-navigation/Tile.mjs +7 -7
  80. package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
  81. package/dist/components/loading-states/ErrorComponent.js +1 -1
  82. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  83. package/dist/components/loading-states/ErrorComponent.mjs +1 -1
  84. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  85. package/dist/components/loading-states/LoadingAndErrorComponent.js +6 -2
  86. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
  87. package/dist/components/loading-states/LoadingAndErrorComponent.mjs +6 -2
  88. package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
  89. package/dist/components/loading-states/LoadingAnimation.js +5 -1
  90. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  91. package/dist/components/loading-states/LoadingAnimation.mjs +5 -1
  92. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  93. package/dist/components/loading-states/LoadingButton.js +8 -6
  94. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  95. package/dist/components/loading-states/LoadingButton.mjs +8 -6
  96. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  97. package/dist/components/modals/ConfirmModal.js +32 -28
  98. package/dist/components/modals/ConfirmModal.js.map +1 -1
  99. package/dist/components/modals/ConfirmModal.mjs +18 -14
  100. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  101. package/dist/components/modals/DiscardChangesModal.js +28 -24
  102. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  103. package/dist/components/modals/DiscardChangesModal.mjs +18 -14
  104. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  105. package/dist/components/modals/InputModal.js +32 -29
  106. package/dist/components/modals/InputModal.js.map +1 -1
  107. package/dist/components/modals/InputModal.mjs +18 -15
  108. package/dist/components/modals/InputModal.mjs.map +1 -1
  109. package/dist/components/modals/LanguageModal.js +728 -435
  110. package/dist/components/modals/LanguageModal.js.map +1 -1
  111. package/dist/components/modals/LanguageModal.mjs +728 -431
  112. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  113. package/dist/components/modals/ThemeModal.js +732 -439
  114. package/dist/components/modals/ThemeModal.js.map +1 -1
  115. package/dist/components/modals/ThemeModal.mjs +731 -434
  116. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  117. package/dist/components/properties/CheckboxProperty.js +110 -35
  118. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  119. package/dist/components/properties/CheckboxProperty.mjs +110 -35
  120. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  121. package/dist/components/properties/DateProperty.js +118 -42
  122. package/dist/components/properties/DateProperty.js.map +1 -1
  123. package/dist/components/properties/DateProperty.mjs +114 -38
  124. package/dist/components/properties/DateProperty.mjs.map +1 -1
  125. package/dist/components/properties/MultiSelectProperty.d.mts +10 -3
  126. package/dist/components/properties/MultiSelectProperty.d.ts +10 -3
  127. package/dist/components/properties/MultiSelectProperty.js +915 -464
  128. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  129. package/dist/components/properties/MultiSelectProperty.mjs +920 -465
  130. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  131. package/dist/components/properties/NumberProperty.js +101 -19
  132. package/dist/components/properties/NumberProperty.js.map +1 -1
  133. package/dist/components/properties/NumberProperty.mjs +101 -19
  134. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  135. package/dist/components/properties/PropertyBase.js +103 -20
  136. package/dist/components/properties/PropertyBase.js.map +1 -1
  137. package/dist/components/properties/PropertyBase.mjs +99 -16
  138. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  139. package/dist/components/properties/SelectProperty.d.mts +9 -2
  140. package/dist/components/properties/SelectProperty.d.ts +9 -2
  141. package/dist/components/properties/SelectProperty.js +682 -244
  142. package/dist/components/properties/SelectProperty.js.map +1 -1
  143. package/dist/components/properties/SelectProperty.mjs +686 -244
  144. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  145. package/dist/components/properties/TextProperty.js +133 -47
  146. package/dist/components/properties/TextProperty.js.map +1 -1
  147. package/dist/components/properties/TextProperty.mjs +133 -47
  148. package/dist/components/properties/TextProperty.mjs.map +1 -1
  149. package/dist/components/table/Table.js +285 -186
  150. package/dist/components/table/Table.js.map +1 -1
  151. package/dist/components/table/Table.mjs +270 -167
  152. package/dist/components/table/Table.mjs.map +1 -1
  153. package/dist/components/table/TableFilterButton.js +179 -79
  154. package/dist/components/table/TableFilterButton.js.map +1 -1
  155. package/dist/components/table/TableFilterButton.mjs +160 -56
  156. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  157. package/dist/components/table/TableSortButton.js +72 -3
  158. package/dist/components/table/TableSortButton.js.map +1 -1
  159. package/dist/components/table/TableSortButton.mjs +72 -3
  160. package/dist/components/table/TableSortButton.mjs.map +1 -1
  161. package/dist/components/user-action/Button.d.mts +15 -2
  162. package/dist/components/user-action/Button.d.ts +15 -2
  163. package/dist/components/user-action/Button.js +12 -12
  164. package/dist/components/user-action/Button.js.map +1 -1
  165. package/dist/components/user-action/Button.mjs +12 -12
  166. package/dist/components/user-action/Button.mjs.map +1 -1
  167. package/dist/components/user-action/Checkbox.js +6 -15
  168. package/dist/components/user-action/Checkbox.js.map +1 -1
  169. package/dist/components/user-action/Checkbox.mjs +6 -15
  170. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  171. package/dist/components/user-action/CopyToClipboardWrapper.js +6 -2
  172. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  173. package/dist/components/user-action/CopyToClipboardWrapper.mjs +6 -2
  174. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  175. package/dist/components/user-action/DateAndTimePicker.js +79 -48
  176. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  177. package/dist/components/user-action/DateAndTimePicker.mjs +65 -34
  178. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  179. package/dist/components/user-action/Input.js +0 -1
  180. package/dist/components/user-action/Input.js.map +1 -1
  181. package/dist/components/user-action/Input.mjs +0 -1
  182. package/dist/components/user-action/Input.mjs.map +1 -1
  183. package/dist/components/user-action/Menu.d.mts +11 -6
  184. package/dist/components/user-action/Menu.d.ts +11 -6
  185. package/dist/components/user-action/Menu.js +128 -31
  186. package/dist/components/user-action/Menu.js.map +1 -1
  187. package/dist/components/user-action/Menu.mjs +134 -33
  188. package/dist/components/user-action/Menu.mjs.map +1 -1
  189. package/dist/components/user-action/MultiSelect.d.mts +17 -7
  190. package/dist/components/user-action/MultiSelect.d.ts +17 -7
  191. package/dist/components/user-action/MultiSelect.js +796 -376
  192. package/dist/components/user-action/MultiSelect.js.map +1 -1
  193. package/dist/components/user-action/MultiSelect.mjs +781 -357
  194. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  195. package/dist/components/user-action/ScrollPicker.js +2 -2
  196. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  197. package/dist/components/user-action/ScrollPicker.mjs +2 -2
  198. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  199. package/dist/components/user-action/SearchBar.d.mts +14 -0
  200. package/dist/components/user-action/SearchBar.d.ts +14 -0
  201. package/dist/components/user-action/SearchBar.js +673 -0
  202. package/dist/components/user-action/SearchBar.js.map +1 -0
  203. package/dist/components/user-action/SearchBar.mjs +637 -0
  204. package/dist/components/user-action/SearchBar.mjs.map +1 -0
  205. package/dist/components/user-action/Select.d.mts +18 -5
  206. package/dist/components/user-action/Select.d.ts +18 -5
  207. package/dist/components/user-action/Select.js +764 -356
  208. package/dist/components/user-action/Select.js.map +1 -1
  209. package/dist/components/user-action/Select.mjs +761 -350
  210. package/dist/components/user-action/Select.mjs.map +1 -1
  211. package/dist/components/user-action/Textarea.d.mts +1 -1
  212. package/dist/components/user-action/Textarea.d.ts +1 -1
  213. package/dist/components/user-action/Textarea.js +13 -4
  214. package/dist/components/user-action/Textarea.js.map +1 -1
  215. package/dist/components/user-action/Textarea.mjs +13 -4
  216. package/dist/components/user-action/Textarea.mjs.map +1 -1
  217. package/dist/components/user-action/ToggleableInput.js +2 -3
  218. package/dist/components/user-action/ToggleableInput.js.map +1 -1
  219. package/dist/components/user-action/ToggleableInput.mjs +2 -3
  220. package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
  221. package/dist/css/globals.css +251 -113
  222. package/dist/css/uncompiled/globals.css +19 -13
  223. package/dist/css/uncompiled/theme/colors-component.css +12 -3
  224. package/dist/css/uncompiled/theme/colors-semantic.css +10 -7
  225. package/dist/css/uncompiled/utitlity/animation.css +70 -1
  226. package/dist/css/uncompiled/utitlity/general.css +16 -0
  227. package/dist/hooks/useDelay.js +0 -1
  228. package/dist/hooks/useDelay.js.map +1 -1
  229. package/dist/hooks/useDelay.mjs +0 -1
  230. package/dist/hooks/useDelay.mjs.map +1 -1
  231. package/dist/hooks/usePopoverPosition.d.mts +15 -0
  232. package/dist/hooks/usePopoverPosition.d.ts +15 -0
  233. package/dist/hooks/usePopoverPosition.js +81 -0
  234. package/dist/hooks/usePopoverPosition.js.map +1 -0
  235. package/dist/hooks/usePopoverPosition.mjs +57 -0
  236. package/dist/hooks/usePopoverPosition.mjs.map +1 -0
  237. package/dist/hooks/useSearch.d.mts +7 -2
  238. package/dist/hooks/useSearch.d.ts +7 -2
  239. package/dist/hooks/useSearch.js +44 -15
  240. package/dist/hooks/useSearch.js.map +1 -1
  241. package/dist/hooks/useSearch.mjs +45 -16
  242. package/dist/hooks/useSearch.mjs.map +1 -1
  243. package/dist/index.d.mts +6 -4
  244. package/dist/index.d.ts +6 -4
  245. package/dist/index.js +1102 -820
  246. package/dist/index.js.map +1 -1
  247. package/dist/index.mjs +1001 -719
  248. package/dist/index.mjs.map +1 -1
  249. package/dist/localization/defaults/form.d.mts +2 -0
  250. package/dist/localization/defaults/form.d.ts +2 -0
  251. package/dist/localization/defaults/form.js +4 -0
  252. package/dist/localization/defaults/form.js.map +1 -1
  253. package/dist/localization/defaults/form.mjs +4 -0
  254. package/dist/localization/defaults/form.mjs.map +1 -1
  255. package/dist/util/simpleSearch.d.mts +1 -1
  256. package/dist/util/simpleSearch.d.ts +1 -1
  257. package/dist/util/simpleSearch.js +4 -1
  258. package/dist/util/simpleSearch.js.map +1 -1
  259. package/dist/util/simpleSearch.mjs +4 -1
  260. package/dist/util/simpleSearch.mjs.map +1 -1
  261. package/package.json +1 -1
@@ -86,9 +86,9 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
86
86
  };
87
87
 
88
88
  // src/components/user-action/Select.tsx
89
- import { ChevronDown, ChevronUp } from "lucide-react";
90
- import { useEffect as useEffect8, useRef as useRef2, useState as useState6 } from "react";
91
- import clsx6 from "clsx";
89
+ import { useCallback as useCallback5 } from "react";
90
+ import { useEffect as useEffect11, useState as useState9 } from "react";
91
+ import clsx8 from "clsx";
92
92
 
93
93
  // src/components/user-action/Label.tsx
94
94
  import clsx from "clsx";
@@ -108,22 +108,388 @@ var Label = ({
108
108
  return /* @__PURE__ */ jsx2("label", { ...props, className: clsx(styleMapping[labelType], className), children: children ? children : name });
109
109
  };
110
110
 
111
- // src/components/layout-and-navigation/SearchableList.tsx
112
- import { Search } from "lucide-react";
111
+ // src/components/layout-and-navigation/Tile.tsx
112
+ import clsx2 from "clsx";
113
+ import { Check } from "lucide-react";
114
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
115
+ var Tile = ({
116
+ title,
117
+ description,
118
+ onClick,
119
+ isSelected = false,
120
+ disabled = false,
121
+ prefix,
122
+ suffix,
123
+ normalClassName = "hover:bg-primary/40 cursor-pointer",
124
+ selectedClassName = " bg-primary/20",
125
+ disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
126
+ className
127
+ }) => {
128
+ return /* @__PURE__ */ jsxs(
129
+ "div",
130
+ {
131
+ className: clsx2(
132
+ "flex-row-2 w-full items-center",
133
+ {
134
+ [normalClassName]: !!onClick && !disabled,
135
+ [selectedClassName]: isSelected && !disabled,
136
+ [disabledClassName]: disabled
137
+ },
138
+ className
139
+ ),
140
+ onClick: disabled ? void 0 : onClick,
141
+ children: [
142
+ prefix,
143
+ /* @__PURE__ */ jsxs("div", { className: "flex-col-0 w-full", children: [
144
+ /* @__PURE__ */ jsx3("h4", { className: clsx2(title.className ?? "textstyle-title-normal"), children: title.value }),
145
+ !!description && /* @__PURE__ */ jsx3("span", { className: clsx2(description.className ?? "textstyle-description"), children: description.value })
146
+ ] }),
147
+ suffix ?? (isSelected ? /* @__PURE__ */ jsx3(Check, { size: 24 }) : void 0)
148
+ ]
149
+ }
150
+ );
151
+ };
152
+
153
+ // src/components/layout-and-navigation/Expandable.tsx
154
+ import { forwardRef, useCallback as useCallback2, useEffect as useEffect3, useState as useState3 } from "react";
155
+ import { ChevronDown } from "lucide-react";
156
+ import clsx3 from "clsx";
157
+
158
+ // src/util/noop.ts
159
+ var noop = () => void 0;
160
+
161
+ // src/components/layout-and-navigation/Expandable.tsx
162
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
163
+ var ExpansionIcon = ({ isExpanded, className }) => {
164
+ return /* @__PURE__ */ jsx4(
165
+ ChevronDown,
166
+ {
167
+ className: clsx3(
168
+ "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
169
+ { "rotate-180": isExpanded },
170
+ className
171
+ )
172
+ }
173
+ );
174
+ };
175
+ var Expandable = forwardRef(function Expandable2({
176
+ children,
177
+ label,
178
+ icon,
179
+ isExpanded = false,
180
+ onChange = noop,
181
+ clickOnlyOnHeader = true,
182
+ disabled = false,
183
+ className,
184
+ headerClassName,
185
+ contentClassName
186
+ }, ref) {
187
+ const defaultIcon = useCallback2((expanded) => /* @__PURE__ */ jsx4(ExpansionIcon, { isExpanded: expanded }), []);
188
+ icon ??= defaultIcon;
189
+ return /* @__PURE__ */ jsxs2(
190
+ "div",
191
+ {
192
+ ref,
193
+ className: clsx3("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
194
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
195
+ children: [
196
+ /* @__PURE__ */ jsxs2(
197
+ "div",
198
+ {
199
+ className: clsx3(
200
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
201
+ {
202
+ "group-hover:brightness-97": !isExpanded,
203
+ "hover:brightness-97": isExpanded && !disabled,
204
+ "cursor-pointer": clickOnlyOnHeader && !disabled
205
+ },
206
+ headerClassName
207
+ ),
208
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
209
+ children: [
210
+ label,
211
+ icon(isExpanded)
212
+ ]
213
+ }
214
+ ),
215
+ /* @__PURE__ */ jsx4(
216
+ "div",
217
+ {
218
+ className: clsx3(
219
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
220
+ {
221
+ "max-h-96 opacity-100 pb-2": isExpanded,
222
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
223
+ },
224
+ contentClassName
225
+ ),
226
+ children
227
+ }
228
+ )
229
+ ]
230
+ }
231
+ );
232
+ });
233
+ var ExpandableUncontrolled = forwardRef(function ExpandableUncontrolled2({
234
+ isExpanded,
235
+ onChange = noop,
236
+ ...props
237
+ }, ref) {
238
+ const [usedIsExpanded, setUsedIsExpanded] = useState3(isExpanded);
239
+ useEffect3(() => {
240
+ setUsedIsExpanded(isExpanded);
241
+ }, [isExpanded]);
242
+ return /* @__PURE__ */ jsx4(
243
+ Expandable,
244
+ {
245
+ ...props,
246
+ ref,
247
+ isExpanded: usedIsExpanded,
248
+ onChange: (value) => {
249
+ onChange(value);
250
+ setUsedIsExpanded(value);
251
+ }
252
+ }
253
+ );
254
+ });
255
+
256
+ // src/components/user-action/Menu.tsx
257
+ import {
258
+ useEffect as useEffect6,
259
+ useRef,
260
+ useState as useState5
261
+ } from "react";
113
262
  import clsx4 from "clsx";
114
263
 
264
+ // src/hooks/useOutsideClick.ts
265
+ import { useEffect as useEffect4 } from "react";
266
+ var useOutsideClick = (refs, handler) => {
267
+ useEffect4(() => {
268
+ const listener = (event) => {
269
+ if (event.target === null) return;
270
+ if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
271
+ return;
272
+ }
273
+ handler();
274
+ };
275
+ document.addEventListener("mousedown", listener);
276
+ document.addEventListener("touchstart", listener);
277
+ return () => {
278
+ document.removeEventListener("mousedown", listener);
279
+ document.removeEventListener("touchstart", listener);
280
+ };
281
+ }, [refs, handler]);
282
+ };
283
+
284
+ // src/hooks/useHoverState.ts
285
+ import { useEffect as useEffect5, useState as useState4 } from "react";
286
+ var defaultUseHoverStateProps = {
287
+ closingDelay: 200,
288
+ isDisabled: false
289
+ };
290
+ var useHoverState = (props = void 0) => {
291
+ const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
292
+ const [isHovered, setIsHovered] = useState4(false);
293
+ const [timer, setTimer] = useState4();
294
+ const onMouseEnter = () => {
295
+ if (isDisabled) {
296
+ return;
297
+ }
298
+ clearTimeout(timer);
299
+ setIsHovered(true);
300
+ };
301
+ const onMouseLeave = () => {
302
+ if (isDisabled) {
303
+ return;
304
+ }
305
+ setTimer(setTimeout(() => {
306
+ setIsHovered(false);
307
+ }, closingDelay));
308
+ };
309
+ useEffect5(() => {
310
+ if (timer) {
311
+ return () => {
312
+ clearTimeout(timer);
313
+ };
314
+ }
315
+ });
316
+ useEffect5(() => {
317
+ if (timer) {
318
+ clearTimeout(timer);
319
+ }
320
+ }, [isDisabled]);
321
+ return {
322
+ isHovered,
323
+ setIsHovered,
324
+ handlers: { onMouseEnter, onMouseLeave }
325
+ };
326
+ };
327
+
328
+ // src/util/PropsWithFunctionChildren.ts
329
+ var resolve = (children, bag) => {
330
+ if (typeof children === "function") {
331
+ return children(bag);
332
+ }
333
+ return children ?? void 0;
334
+ };
335
+ var BagFunctionUtil = {
336
+ resolve
337
+ };
338
+
339
+ // src/hooks/usePopoverPosition.ts
340
+ var defaultPopoverPositionOptions = {
341
+ edgePadding: 16,
342
+ outerGap: 4,
343
+ horizontalAlignment: "leftInside",
344
+ verticalAlignment: "bottomOutside",
345
+ disabled: false
346
+ };
347
+ var usePopoverPosition = (trigger, options) => {
348
+ const {
349
+ edgePadding,
350
+ outerGap,
351
+ verticalAlignment,
352
+ horizontalAlignment,
353
+ disabled
354
+ } = { ...defaultPopoverPositionOptions, ...options };
355
+ if (disabled || !trigger) {
356
+ return {};
357
+ }
358
+ const left = {
359
+ leftOutside: trigger.left - outerGap,
360
+ leftInside: trigger.left,
361
+ rightOutside: trigger.right + outerGap,
362
+ rightInside: trigger.right,
363
+ center: trigger.left + trigger.width / 2
364
+ }[horizontalAlignment];
365
+ const top = {
366
+ topOutside: trigger.top - outerGap,
367
+ topInside: trigger.top,
368
+ bottomOutside: trigger.bottom + outerGap,
369
+ bottomInside: trigger.bottom,
370
+ center: trigger.top + trigger.height / 2
371
+ }[verticalAlignment];
372
+ const translateX = {
373
+ leftOutside: "-100%",
374
+ leftInside: void 0,
375
+ rightOutside: void 0,
376
+ rightInside: "-100%",
377
+ center: "-50%"
378
+ }[horizontalAlignment];
379
+ const translateY = {
380
+ topOutside: "-100%",
381
+ topInside: void 0,
382
+ bottomOutside: void 0,
383
+ bottomInside: "-100%",
384
+ center: "-50%"
385
+ }[verticalAlignment];
386
+ return {
387
+ left: Math.max(left, edgePadding),
388
+ top: Math.max(top, edgePadding),
389
+ translate: [translateX ?? "0", translateY ?? "0"].join(" ")
390
+ };
391
+ };
392
+
393
+ // src/components/user-action/Menu.tsx
394
+ import { createPortal } from "react-dom";
395
+ import { Fragment, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
396
+ function getScrollableParents(element) {
397
+ const scrollables = [];
398
+ let parent = element.parentElement;
399
+ while (parent) {
400
+ scrollables.push(parent);
401
+ parent = parent.parentElement;
402
+ }
403
+ return scrollables;
404
+ }
405
+ var Menu = ({
406
+ trigger,
407
+ children,
408
+ alignmentHorizontal = "leftInside",
409
+ alignmentVertical = "bottomOutside",
410
+ showOnHover = false,
411
+ disabled = false,
412
+ menuClassName = ""
413
+ }) => {
414
+ const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
415
+ const triggerRef = useRef(null);
416
+ const menuRef = useRef(null);
417
+ useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
418
+ const [isHidden, setIsHidden] = useState5(true);
419
+ const bag = {
420
+ isOpen,
421
+ close: () => setIsOpen(false),
422
+ toggleOpen: () => setIsOpen((prevState) => !prevState),
423
+ disabled
424
+ };
425
+ const menuPosition = usePopoverPosition(
426
+ triggerRef.current?.getBoundingClientRect(),
427
+ { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
428
+ );
429
+ useEffect6(() => {
430
+ if (!isOpen) return;
431
+ const triggerEl = triggerRef.current;
432
+ if (!triggerEl) return;
433
+ const scrollableParents = getScrollableParents(triggerEl);
434
+ const close = () => setIsOpen(false);
435
+ scrollableParents.forEach((parent) => {
436
+ parent.addEventListener("scroll", close);
437
+ });
438
+ window.addEventListener("resize", close);
439
+ return () => {
440
+ scrollableParents.forEach((parent) => {
441
+ parent.removeEventListener("scroll", close);
442
+ });
443
+ window.removeEventListener("resize", close);
444
+ };
445
+ }, [isOpen, setIsOpen]);
446
+ useEffect6(() => {
447
+ if (isOpen) {
448
+ setIsHidden(false);
449
+ }
450
+ }, [isOpen]);
451
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
452
+ trigger(bag, triggerRef),
453
+ createPortal(/* @__PURE__ */ jsx5(
454
+ "div",
455
+ {
456
+ ref: menuRef,
457
+ onClick: (e) => e.stopPropagation(),
458
+ className: clsx4(
459
+ "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
460
+ {
461
+ "animate-pop-in": isOpen,
462
+ "animate-pop-out": !isOpen,
463
+ "hidden": isHidden
464
+ },
465
+ menuClassName
466
+ ),
467
+ onAnimationEnd: () => {
468
+ if (!isOpen) {
469
+ setIsHidden(true);
470
+ }
471
+ },
472
+ style: {
473
+ ...menuPosition
474
+ },
475
+ children: BagFunctionUtil.resolve(children, bag)
476
+ }
477
+ ), document.body)
478
+ ] });
479
+ };
480
+
115
481
  // src/components/user-action/Input.tsx
116
- import { forwardRef, useEffect as useEffect5, useImperativeHandle, useRef, useState as useState4 } from "react";
117
- import clsx2 from "clsx";
482
+ import { forwardRef as forwardRef2, useEffect as useEffect9, useImperativeHandle, useRef as useRef2, useState as useState7 } from "react";
483
+ import clsx5 from "clsx";
118
484
 
119
485
  // src/hooks/useDelay.ts
120
- import { useEffect as useEffect3, useState as useState3 } from "react";
486
+ import { useEffect as useEffect7, useState as useState6 } from "react";
121
487
  var defaultOptions = {
122
488
  delay: 3e3,
123
489
  disabled: false
124
490
  };
125
491
  function useDelay(options) {
126
- const [timer, setTimer] = useState3(void 0);
492
+ const [timer, setTimer] = useState6(void 0);
127
493
  const { delay, disabled } = {
128
494
  ...defaultOptions,
129
495
  ...options
@@ -142,28 +508,24 @@ function useDelay(options) {
142
508
  setTimer(void 0);
143
509
  }, delay));
144
510
  };
145
- useEffect3(() => {
511
+ useEffect7(() => {
146
512
  return () => {
147
513
  clearTimeout(timer);
148
514
  };
149
515
  }, [timer]);
150
- useEffect3(() => {
516
+ useEffect7(() => {
151
517
  if (disabled) {
152
518
  clearTimeout(timer);
153
519
  setTimer(void 0);
154
520
  }
155
521
  }, [disabled, timer]);
156
- console.log(timer);
157
522
  return { restartTimer, clearTimer, hasActiveTimer: !!timer };
158
523
  }
159
524
 
160
- // src/util/noop.ts
161
- var noop = () => void 0;
162
-
163
525
  // src/hooks/useFocusManagement.ts
164
- import { useCallback as useCallback2 } from "react";
526
+ import { useCallback as useCallback3 } from "react";
165
527
  function useFocusManagement() {
166
- const getFocusableElements = useCallback2(() => {
528
+ const getFocusableElements = useCallback3(() => {
167
529
  return Array.from(
168
530
  document.querySelectorAll(
169
531
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -172,7 +534,7 @@ function useFocusManagement() {
172
534
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
173
535
  );
174
536
  }, []);
175
- const getNextFocusElement = useCallback2(() => {
537
+ const getNextFocusElement = useCallback3(() => {
176
538
  const elements = getFocusableElements();
177
539
  if (elements.length === 0) {
178
540
  return void 0;
@@ -184,11 +546,11 @@ function useFocusManagement() {
184
546
  }
185
547
  return nextElement;
186
548
  }, [getFocusableElements]);
187
- const focusNext = useCallback2(() => {
549
+ const focusNext = useCallback3(() => {
188
550
  const nextElement = getNextFocusElement();
189
551
  nextElement?.focus();
190
552
  }, [getNextFocusElement]);
191
- const getPreviousFocusElement = useCallback2(() => {
553
+ const getPreviousFocusElement = useCallback3(() => {
192
554
  const elements = getFocusableElements();
193
555
  if (elements.length === 0) {
194
556
  return void 0;
@@ -204,7 +566,7 @@ function useFocusManagement() {
204
566
  }
205
567
  return previousElement;
206
568
  }, [getFocusableElements]);
207
- const focusPrevious = useCallback2(() => {
569
+ const focusPrevious = useCallback3(() => {
208
570
  const previousElement = getPreviousFocusElement();
209
571
  if (previousElement) previousElement.focus();
210
572
  }, [getPreviousFocusElement]);
@@ -218,10 +580,10 @@ function useFocusManagement() {
218
580
  }
219
581
 
220
582
  // src/hooks/useFocusOnceVisible.ts
221
- import React, { useEffect as useEffect4 } from "react";
583
+ import React, { useEffect as useEffect8 } from "react";
222
584
  var useFocusOnceVisible = (ref, disable = false) => {
223
585
  const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
224
- useEffect4(() => {
586
+ useEffect8(() => {
225
587
  if (disable || hasUsedFocus) {
226
588
  return;
227
589
  }
@@ -241,9 +603,9 @@ var useFocusOnceVisible = (ref, disable = false) => {
241
603
  };
242
604
 
243
605
  // src/components/user-action/Input.tsx
244
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
606
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
245
607
  var getInputClassName = ({ disabled = false, hasError = false }) => {
246
- return clsx2(
608
+ return clsx5(
247
609
  "px-2 py-1.5 rounded-md border-2",
248
610
  {
249
611
  "bg-surface text-on-surface hover:border-primary focus:border-primary": !disabled && !hasError,
@@ -257,7 +619,7 @@ var defaultEditCompleteOptions = {
257
619
  afterDelay: true,
258
620
  delay: 2500
259
621
  };
260
- var Input = forwardRef(function Input2({
622
+ var Input = forwardRef2(function Input2({
261
623
  id,
262
624
  type = "text",
263
625
  value,
@@ -280,7 +642,7 @@ var Input = forwardRef(function Input2({
280
642
  restartTimer,
281
643
  clearTimer
282
644
  } = useDelay({ delay, disabled: !afterDelay });
283
- const innerRef = useRef(null);
645
+ const innerRef = useRef2(null);
284
646
  const { focusNext } = useFocusManagement();
285
647
  useFocusOnceVisible(innerRef, !autoFocus);
286
648
  useImperativeHandle(forwardedRef, () => innerRef.current);
@@ -291,9 +653,9 @@ var Input = forwardRef(function Input2({
291
653
  focusNext();
292
654
  }
293
655
  };
294
- return /* @__PURE__ */ jsxs("div", { className: clsx2({ "w-full": expanded }, containerClassName), children: [
295
- label && /* @__PURE__ */ jsx3(Label, { ...label, htmlFor: id, className: clsx2("mb-1", label.className) }),
296
- /* @__PURE__ */ jsx3(
656
+ return /* @__PURE__ */ jsxs4("div", { className: clsx5({ "w-full": expanded }, containerClassName), children: [
657
+ label && /* @__PURE__ */ jsx6(Label, { ...label, htmlFor: id, className: clsx5("mb-1", label.className) }),
658
+ /* @__PURE__ */ jsx6(
297
659
  "input",
298
660
  {
299
661
  ...restProps,
@@ -302,7 +664,7 @@ var Input = forwardRef(function Input2({
302
664
  id,
303
665
  type,
304
666
  disabled,
305
- className: clsx2(getInputClassName({ disabled }), className),
667
+ className: clsx5(getInputClassName({ disabled }), className),
306
668
  onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
307
669
  onBlur: (event) => {
308
670
  onBlur?.(event);
@@ -332,7 +694,7 @@ var Input = forwardRef(function Input2({
332
694
  )
333
695
  ] });
334
696
  });
335
- var FormInput = forwardRef(function FormInput2({
697
+ var FormInput = forwardRef2(function FormInput2({
336
698
  id,
337
699
  labelText,
338
700
  errorText,
@@ -344,206 +706,33 @@ var FormInput = forwardRef(function FormInput2({
344
706
  disabled,
345
707
  ...restProps
346
708
  }, ref) {
347
- const input = /* @__PURE__ */ jsx3(
709
+ const input = /* @__PURE__ */ jsx6(
348
710
  "input",
349
711
  {
350
712
  ...restProps,
351
713
  ref,
352
714
  id,
353
715
  disabled,
354
- className: clsx2(
716
+ className: clsx5(
355
717
  getInputClassName({ disabled, hasError: !!errorText }),
356
718
  className
357
719
  )
358
720
  }
359
721
  );
360
- return /* @__PURE__ */ jsxs("div", { className: clsx2("flex flex-col gap-y-1", containerClassName), children: [
361
- labelText && /* @__PURE__ */ jsxs("label", { htmlFor: id, className: clsx2("textstyle-label-md", labelClassName), children: [
722
+ return /* @__PURE__ */ jsxs4("div", { className: clsx5("flex flex-col gap-y-1", containerClassName), children: [
723
+ labelText && /* @__PURE__ */ jsxs4("label", { htmlFor: id, className: clsx5("textstyle-label-md", labelClassName), children: [
362
724
  labelText,
363
- required && /* @__PURE__ */ jsx3("span", { className: "text-primary font-bold", children: "*" })
725
+ required && /* @__PURE__ */ jsx6("span", { className: "text-primary font-bold", children: "*" })
364
726
  ] }),
365
727
  input,
366
- errorText && /* @__PURE__ */ jsx3("label", { htmlFor: id, className: clsx2("text-negative", errorClassName), children: errorText })
728
+ errorText && /* @__PURE__ */ jsx6("label", { htmlFor: id, className: clsx5("text-negative", errorClassName), children: errorText })
367
729
  ] });
368
730
  });
369
731
 
370
- // src/components/user-action/Button.tsx
371
- import clsx3 from "clsx";
372
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
373
- var ButtonColorUtil = {
374
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
375
- text: ["primary", "negative", "neutral"],
376
- outline: ["primary"]
377
- };
378
- var IconButtonUtil = {
379
- icon: [...ButtonColorUtil.solid, "transparent"]
380
- };
381
- var paddingMapping = {
382
- small: "btn-sm",
383
- medium: "btn-md",
384
- large: "btn-lg"
385
- };
386
- var iconPaddingMapping = {
387
- tiny: "icon-btn-xs",
388
- small: "icon-btn-sm",
389
- medium: "icon-btn-md",
390
- large: "icon-btn-lg"
391
- };
392
- var ButtonUtil = {
393
- paddingMapping,
394
- iconPaddingMapping
395
- };
396
- var SolidButton = ({
397
- children,
398
- disabled = false,
399
- color = "primary",
400
- size = "medium",
401
- startIcon,
402
- endIcon,
403
- onClick,
404
- className,
405
- ...restProps
406
- }) => {
407
- const colorClasses = {
408
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
409
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
410
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
411
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
412
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
413
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
414
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
415
- }[color];
416
- const iconColorClasses = {
417
- primary: "text-button-solid-primary-icon",
418
- secondary: "text-button-solid-secondary-icon",
419
- tertiary: "text-button-solid-tertiary-icon",
420
- positive: "text-button-solid-positive-icon",
421
- warning: "text-button-solid-warning-icon",
422
- negative: "text-button-solid-negative-icon",
423
- neutral: "text-button-solid-neutral-icon"
424
- }[color];
425
- return /* @__PURE__ */ jsxs2(
426
- "button",
427
- {
428
- onClick: disabled ? void 0 : onClick,
429
- disabled: disabled || onClick === void 0,
430
- className: clsx3(
431
- {
432
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
433
- [clsx3(colorClasses, "hover:brightness-90")]: !disabled
434
- },
435
- ButtonUtil.paddingMapping[size],
436
- className
437
- ),
438
- ...restProps,
439
- children: [
440
- startIcon && /* @__PURE__ */ jsx4(
441
- "span",
442
- {
443
- className: clsx3({
444
- [iconColorClasses]: !disabled,
445
- [`text-disabled-icon`]: disabled
446
- }),
447
- children: startIcon
448
- }
449
- ),
450
- children,
451
- endIcon && /* @__PURE__ */ jsx4(
452
- "span",
453
- {
454
- className: clsx3({
455
- [iconColorClasses]: !disabled,
456
- [`text-disabled-icon`]: disabled
457
- }),
458
- children: endIcon
459
- }
460
- )
461
- ]
462
- }
463
- );
464
- };
465
- var IconButton = ({
466
- children,
467
- disabled = false,
468
- color = "primary",
469
- size = "medium",
470
- onClick,
471
- className,
472
- ...restProps
473
- }) => {
474
- const colorClasses = {
475
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
476
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
477
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
478
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
479
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
480
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
481
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
482
- transparent: "bg-transparent"
483
- }[color];
484
- return /* @__PURE__ */ jsx4(
485
- "button",
486
- {
487
- onClick: disabled ? void 0 : onClick,
488
- disabled: disabled || onClick === void 0,
489
- className: clsx3(
490
- {
491
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
492
- "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
493
- "hover:bg-button-text-hover-background": !disabled && color === "transparent",
494
- [clsx3(colorClasses, "hover:brightness-90")]: !disabled
495
- },
496
- ButtonUtil.iconPaddingMapping[size],
497
- className
498
- ),
499
- ...restProps,
500
- children
501
- }
502
- );
503
- };
504
-
505
- // src/hooks/useSearch.ts
506
- import { useEffect as useEffect6, useMemo, useState as useState5 } from "react";
507
-
508
- // src/util/simpleSearch.ts
509
- var MultiSearchWithMapping = (search, objects, mapping) => {
510
- return objects.filter((object) => {
511
- const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
512
- if (!mappedSearchKeywords) {
513
- return true;
514
- }
515
- return !!mappedSearchKeywords.find((value) => value.includes(search.toLowerCase().trim()));
516
- });
517
- };
518
-
519
- // src/hooks/useSearch.ts
520
- var useSearch = ({
521
- list,
522
- initialSearch,
523
- searchMapping
524
- }) => {
525
- const [items, setItems] = useState5(list);
526
- const [search, setSearch] = useState5(initialSearch);
527
- useEffect6(() => {
528
- setItems(list);
529
- }, [list]);
530
- const result = useMemo(
531
- () => MultiSearchWithMapping(search, items, searchMapping),
532
- [search, items, searchMapping]
533
- );
534
- return {
535
- result,
536
- hasResult: result.length > 0,
537
- allItems: items,
538
- setItems,
539
- search,
540
- setSearch
541
- };
542
- };
543
-
544
732
  // src/localization/defaults/form.ts
545
733
  var formTranslation = {
546
734
  en: {
735
+ add: "Add",
547
736
  all: "All",
548
737
  apply: "Apply",
549
738
  back: "Back",
@@ -556,6 +745,7 @@ var formTranslation = {
556
745
  confirm: "Confirm",
557
746
  copy: "Copy",
558
747
  copied: "Copied",
748
+ create: "Create",
559
749
  decline: "Decline",
560
750
  delete: "Delete",
561
751
  discard: "Discard",
@@ -598,6 +788,7 @@ var formTranslation = {
598
788
  yes: "Yes"
599
789
  },
600
790
  de: {
791
+ add: "Hinzuf\xFCgen",
601
792
  all: "Alle",
602
793
  apply: "Anwenden",
603
794
  back: "Zur\xFCck",
@@ -610,6 +801,7 @@ var formTranslation = {
610
801
  confirm: "Best\xE4tigen",
611
802
  copy: "Kopieren",
612
803
  copied: "Kopiert",
804
+ create: "Erstellen",
613
805
  decline: "Ablehnen",
614
806
  delete: "L\xF6schen",
615
807
  discard: "Verwerfen",
@@ -653,241 +845,346 @@ var formTranslation = {
653
845
  }
654
846
  };
655
847
 
656
- // src/components/layout-and-navigation/SearchableList.tsx
657
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
658
- var defaultSearchableListTranslation = {
659
- en: {
660
- nothingFound: "Nothing found"
661
- },
662
- de: {
663
- nothingFound: "Nichts gefunden"
664
- }
848
+ // src/components/user-action/Button.tsx
849
+ import { forwardRef as forwardRef3 } from "react";
850
+ import clsx6 from "clsx";
851
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
852
+ var ButtonColorUtil = {
853
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
854
+ text: ["primary", "negative", "neutral"],
855
+ outline: ["primary"]
665
856
  };
666
- var SearchableList = ({
667
- overwriteTranslation,
668
- list,
669
- initialSearch = "",
670
- searchMapping,
671
- autoFocus,
672
- minimumItemsForSearch = 6,
673
- itemMapper,
674
- className,
675
- resultListClassName
676
- }) => {
677
- const translation = useTranslation([defaultSearchableListTranslation, formTranslation], overwriteTranslation);
678
- const { result, hasResult, search, setSearch } = useSearch({ list, initialSearch, searchMapping });
679
- return /* @__PURE__ */ jsxs3("div", { className: clsx4("col gap-y-2", className), children: [
680
- list.length > minimumItemsForSearch && /* @__PURE__ */ jsxs3("div", { className: "row justify-between gap-x-4 items-center", children: [
681
- /* @__PURE__ */ jsx5(
682
- Input,
683
- {
684
- value: search,
685
- onChangeText: setSearch,
686
- placeholder: translation("search"),
687
- autoFocus,
688
- className: "w-full"
689
- }
690
- ),
691
- /* @__PURE__ */ jsx5(IconButton, { color: "neutral", disabled: search.length === 0, children: /* @__PURE__ */ jsx5(Search, { className: "w-full h-full" }) })
692
- ] }),
693
- hasResult ? /* @__PURE__ */ jsx5("div", { className: clsx4("col gap-y-1", resultListClassName), children: result.map(itemMapper) }) : /* @__PURE__ */ jsx5("div", { className: "row text-description py-2 px-2", children: translation("nothingFound") })
694
- ] });
857
+ var IconButtonUtil = {
858
+ icon: [...ButtonColorUtil.solid, "transparent"]
695
859
  };
696
-
697
- // src/components/layout-and-navigation/Tile.tsx
698
- import clsx5 from "clsx";
699
- import { Check } from "lucide-react";
700
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
701
- var Tile = ({
702
- title,
703
- description,
860
+ var paddingMapping = {
861
+ small: "btn-sm",
862
+ medium: "btn-md",
863
+ large: "btn-lg"
864
+ };
865
+ var iconPaddingMapping = {
866
+ tiny: "icon-btn-xs",
867
+ small: "icon-btn-sm",
868
+ medium: "icon-btn-md",
869
+ large: "icon-btn-lg"
870
+ };
871
+ var ButtonUtil = {
872
+ paddingMapping,
873
+ iconPaddingMapping
874
+ };
875
+ var SolidButton = forwardRef3(function SolidButton2({
876
+ children,
877
+ disabled = false,
878
+ color = "primary",
879
+ size = "medium",
880
+ startIcon,
881
+ endIcon,
704
882
  onClick,
705
- isSelected = false,
706
- isDisabled = false,
707
- prefix,
708
- suffix,
709
- normalClassName = "hover:bg-primary/40 cursor-pointer",
710
- selectedClassName = " bg-primary/20",
711
- disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
712
- className
713
- }) => {
714
- return /* @__PURE__ */ jsxs4(
715
- "div",
883
+ className,
884
+ ...restProps
885
+ }, ref) {
886
+ const colorClasses = {
887
+ primary: "bg-button-solid-primary-background text-button-solid-primary-text",
888
+ secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
889
+ tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
890
+ positive: "bg-button-solid-positive-background text-button-solid-positive-text",
891
+ warning: "bg-button-solid-warning-background text-button-solid-warning-text",
892
+ negative: "bg-button-solid-negative-background text-button-solid-negative-text",
893
+ neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
894
+ }[color];
895
+ const iconColorClasses = {
896
+ primary: "text-button-solid-primary-icon",
897
+ secondary: "text-button-solid-secondary-icon",
898
+ tertiary: "text-button-solid-tertiary-icon",
899
+ positive: "text-button-solid-positive-icon",
900
+ warning: "text-button-solid-warning-icon",
901
+ negative: "text-button-solid-negative-icon",
902
+ neutral: "text-button-solid-neutral-icon"
903
+ }[color];
904
+ return /* @__PURE__ */ jsxs5(
905
+ "button",
716
906
  {
717
- className: clsx5(
718
- "row gap-x-2 w-full items-center",
907
+ ref,
908
+ onClick,
909
+ disabled,
910
+ className: clsx6(
719
911
  {
720
- [normalClassName]: !!onClick && !isDisabled,
721
- [selectedClassName]: isSelected && !isDisabled,
722
- [disabledClassName]: isDisabled
912
+ "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
913
+ [clsx6(colorClasses, "hover:brightness-90")]: !disabled
723
914
  },
915
+ ButtonUtil.paddingMapping[size],
724
916
  className
725
917
  ),
726
- onClick: isDisabled ? void 0 : onClick,
918
+ ...restProps,
727
919
  children: [
728
- prefix,
729
- /* @__PURE__ */ jsxs4("div", { className: "col gap-y-0 w-full", children: [
730
- /* @__PURE__ */ jsx6("h4", { className: clsx5(title.className ?? "textstyle-title-normal"), children: title.value }),
731
- !!description && /* @__PURE__ */ jsx6("span", { className: clsx5(description.className ?? "textstyle-description"), children: description.value })
732
- ] }),
733
- suffix ?? (isSelected ? /* @__PURE__ */ jsx6(Check, { size: 24 }) : void 0)
920
+ startIcon && /* @__PURE__ */ jsx7(
921
+ "span",
922
+ {
923
+ className: clsx6({
924
+ [iconColorClasses]: !disabled,
925
+ [`text-disabled-icon`]: disabled
926
+ }),
927
+ children: startIcon
928
+ }
929
+ ),
930
+ children,
931
+ endIcon && /* @__PURE__ */ jsx7(
932
+ "span",
933
+ {
934
+ className: clsx6({
935
+ [iconColorClasses]: !disabled,
936
+ [`text-disabled-icon`]: disabled
937
+ }),
938
+ children: endIcon
939
+ }
940
+ )
734
941
  ]
735
942
  }
736
943
  );
944
+ });
945
+ var IconButton = ({
946
+ children,
947
+ disabled = false,
948
+ color = "primary",
949
+ size = "medium",
950
+ className,
951
+ ...restProps
952
+ }) => {
953
+ const colorClasses = {
954
+ primary: "bg-button-solid-primary-background text-button-solid-primary-text",
955
+ secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
956
+ tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
957
+ positive: "bg-button-solid-positive-background text-button-solid-positive-text",
958
+ warning: "bg-button-solid-warning-background text-button-solid-warning-text",
959
+ negative: "bg-button-solid-negative-background text-button-solid-negative-text",
960
+ neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
961
+ transparent: "bg-transparent"
962
+ }[color];
963
+ return /* @__PURE__ */ jsx7(
964
+ "button",
965
+ {
966
+ disabled,
967
+ className: clsx6(
968
+ {
969
+ "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
970
+ "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
971
+ "hover:bg-button-text-hover-background": !disabled && color === "transparent",
972
+ [clsx6(colorClasses, "hover:brightness-90")]: !disabled
973
+ },
974
+ ButtonUtil.iconPaddingMapping[size],
975
+ className
976
+ ),
977
+ ...restProps,
978
+ children
979
+ }
980
+ );
737
981
  };
738
982
 
739
- // src/hooks/useOutsideClick.ts
740
- import { useEffect as useEffect7 } from "react";
741
- var useOutsideClick = (refs, handler) => {
742
- useEffect7(() => {
743
- const listener = (event) => {
744
- if (event.target === null) return;
745
- if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
746
- return;
983
+ // src/components/user-action/SearchBar.tsx
984
+ import { Search } from "lucide-react";
985
+ import { clsx as clsx7 } from "clsx";
986
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
987
+ var SearchBar = ({
988
+ placeholder,
989
+ onSearch,
990
+ disableOnSearch,
991
+ containerClassName,
992
+ ...inputProps
993
+ }) => {
994
+ const translation = useTranslation([formTranslation]);
995
+ return /* @__PURE__ */ jsxs6("div", { className: clsx7("flex-row-2 justify-between items-center", containerClassName), children: [
996
+ /* @__PURE__ */ jsx8(
997
+ Input,
998
+ {
999
+ ...inputProps,
1000
+ placeholder: placeholder ?? translation("search")
747
1001
  }
748
- handler();
749
- };
750
- document.addEventListener("mousedown", listener);
751
- document.addEventListener("touchstart", listener);
752
- return () => {
753
- document.removeEventListener("mousedown", listener);
754
- document.removeEventListener("touchstart", listener);
755
- };
756
- }, [refs, handler]);
1002
+ ),
1003
+ onSearch && /* @__PURE__ */ jsx8(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ jsx8(Search, { className: "w-full h-full" }) })
1004
+ ] });
1005
+ };
1006
+
1007
+ // src/hooks/useSearch.ts
1008
+ import { useCallback as useCallback4, useEffect as useEffect10, useMemo, useState as useState8 } from "react";
1009
+
1010
+ // src/util/simpleSearch.ts
1011
+ var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
1012
+ return objects.filter((object) => {
1013
+ const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
1014
+ if (!mappedSearchKeywords) {
1015
+ return true;
1016
+ }
1017
+ return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
1018
+ });
1019
+ };
1020
+
1021
+ // src/hooks/useSearch.ts
1022
+ var useSearch = ({
1023
+ list,
1024
+ initialSearch,
1025
+ searchMapping,
1026
+ additionalSearchTags,
1027
+ isSearchInstant = true,
1028
+ sortingFunction,
1029
+ filter,
1030
+ disabled = false
1031
+ }) => {
1032
+ const [search, setSearch] = useState8(initialSearch ?? "");
1033
+ const [result, setResult] = useState8(list);
1034
+ const searchTags = useMemo(() => additionalSearchTags ?? [], [additionalSearchTags]);
1035
+ const updateSearch = useCallback4((newSearch) => {
1036
+ const usedSearch = newSearch ?? search;
1037
+ if (newSearch) {
1038
+ setSearch(search);
1039
+ }
1040
+ setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
1041
+ }, [searchTags, list, search, searchMapping]);
1042
+ useEffect10(() => {
1043
+ if (isSearchInstant) {
1044
+ setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
1045
+ }
1046
+ }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
1047
+ const filteredResult = useMemo(() => {
1048
+ if (!filter) {
1049
+ return result;
1050
+ }
1051
+ return result.filter(filter);
1052
+ }, [result, filter]);
1053
+ const sortedAndFilteredResult = useMemo(() => {
1054
+ if (!sortingFunction) {
1055
+ return filteredResult;
1056
+ }
1057
+ return filteredResult.sort(sortingFunction);
1058
+ }, [filteredResult, sortingFunction]);
1059
+ const usedResult = useMemo(() => {
1060
+ if (!disabled) {
1061
+ return sortedAndFilteredResult;
1062
+ }
1063
+ return list;
1064
+ }, [disabled, list, sortedAndFilteredResult]);
1065
+ return {
1066
+ result: usedResult,
1067
+ hasResult: usedResult.length > 0,
1068
+ allItems: list,
1069
+ updateSearch,
1070
+ search,
1071
+ setSearch
1072
+ };
757
1073
  };
758
1074
 
759
1075
  // src/components/user-action/Select.tsx
760
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
1076
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1077
+ var SelectTile = ({
1078
+ className,
1079
+ disabledClassName,
1080
+ title,
1081
+ ...restProps
1082
+ }) => {
1083
+ return /* @__PURE__ */ jsx9(
1084
+ Tile,
1085
+ {
1086
+ ...restProps,
1087
+ className: clsx8("px-2 py-1 rounded-md", className),
1088
+ disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
1089
+ title: { ...title, className: title.className ?? "font-semibold" }
1090
+ }
1091
+ );
1092
+ };
761
1093
  var Select = ({
762
1094
  value,
763
1095
  label,
764
1096
  options,
765
1097
  onChange,
766
1098
  hintText = "",
767
- isDisabled,
768
- isSearchEnabled = false,
1099
+ selectedDisplayOverwrite,
1100
+ searchOptions,
1101
+ additionalItems,
769
1102
  className,
770
- selectedDisplayOverwrite
1103
+ triggerClassName,
1104
+ hintTextClassName,
1105
+ ...menuProps
771
1106
  }) => {
772
- const triggerRef = useRef2(null);
773
- const menuRef = useRef2(null);
774
- const [isOpen, setIsOpen] = useState6(false);
775
- useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
776
1107
  const selectedOption = options.find((option) => option.value === value);
777
1108
  if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
778
1109
  console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
779
1110
  }
780
1111
  const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
781
- return /* @__PURE__ */ jsxs5("div", { className: clsx6(className), children: [
782
- label && /* @__PURE__ */ jsx7(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx6("mb-1", label.className) }),
783
- /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
784
- /* @__PURE__ */ jsxs5(
785
- "button",
786
- {
787
- ref: triggerRef,
788
- className: clsx6(
789
- "btn-md justify-between w-full border-2",
790
- {
791
- "rounded-b-lg": !open,
792
- "bg-menu-background border-menu-border hover:border-primary": !isDisabled,
793
- "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": isDisabled
794
- }
795
- ),
796
- onClick: () => setIsOpen(!isOpen),
797
- disabled: isDisabled,
798
- children: [
799
- !isShowingHint && /* @__PURE__ */ jsx7("span", { className: "font-semibold text-menu-text", children: selectedDisplayOverwrite ?? selectedOption?.label }),
800
- isShowingHint && /* @__PURE__ */ jsx7("span", { className: "textstyle-description", children: hintText }),
801
- isOpen ? /* @__PURE__ */ jsx7(ChevronUp, {}) : /* @__PURE__ */ jsx7(ChevronDown, {})
802
- ]
803
- }
804
- ),
805
- isOpen && /* @__PURE__ */ jsx7(
806
- "div",
807
- {
808
- ref: menuRef,
809
- className: "absolute w-full z-10 rounded-lg mt-0.5 bg-menu-background text-menu-text shadow-around-lg max-h-[500px] overflow-y-auto p-2",
810
- children: /* @__PURE__ */ jsx7(
811
- SearchableList,
812
- {
813
- list: options,
814
- minimumItemsForSearch: isSearchEnabled ? void 0 : options.length,
815
- searchMapping: (item) => item.searchTags,
816
- itemMapper: (option, index) => /* @__PURE__ */ jsx7(
817
- Tile,
1112
+ const { result, search, setSearch } = useSearch({
1113
+ list: options,
1114
+ searchMapping: useCallback5((item) => item.searchTags, []),
1115
+ ...searchOptions
1116
+ });
1117
+ return /* @__PURE__ */ jsxs7("div", { className: clsx8(className), children: [
1118
+ label && /* @__PURE__ */ jsx9(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx8("mb-1", label.className) }),
1119
+ /* @__PURE__ */ jsx9(
1120
+ Menu,
1121
+ {
1122
+ ...menuProps,
1123
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ jsxs7(
1124
+ "button",
1125
+ {
1126
+ ref,
1127
+ className: clsx8(
1128
+ "btn-md justify-between w-full border-2",
1129
+ {
1130
+ "rounded-b-lg": !open,
1131
+ "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
1132
+ "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
1133
+ },
1134
+ triggerClassName
1135
+ ),
1136
+ onClick: toggleOpen,
1137
+ disabled,
1138
+ children: [
1139
+ !isShowingHint && /* @__PURE__ */ jsx9("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
1140
+ isShowingHint && /* @__PURE__ */ jsx9("span", { className: clsx8("textstyle-description", hintTextClassName), children: hintText }),
1141
+ /* @__PURE__ */ jsx9(ExpansionIcon, { isExpanded: isOpen })
1142
+ ]
1143
+ }
1144
+ ),
1145
+ menuClassName: clsx8("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
1146
+ children: (bag) => {
1147
+ const { close } = bag;
1148
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1149
+ !searchOptions?.disabled && /* @__PURE__ */ jsx9(
1150
+ SearchBar,
1151
+ {
1152
+ value: search,
1153
+ onChangeText: setSearch,
1154
+ autoFocus: true
1155
+ }
1156
+ ),
1157
+ /* @__PURE__ */ jsxs7("div", { className: "flex-col-2 overflow-y-auto", children: [
1158
+ result.map((option, index) => /* @__PURE__ */ jsx9(
1159
+ SelectTile,
818
1160
  {
819
- isSelected: selectedOption?.value === option.value,
820
- className: "px-2 py-1 rounded-md",
821
- disabledClassName: "text-disabled-text cursor-not-allowed",
822
- title: { value: option.label, className: "font-semibold" },
1161
+ isSelected: option === selectedOption,
1162
+ title: { value: option.label },
823
1163
  onClick: () => {
824
1164
  onChange(option.value);
825
- setIsOpen(false);
1165
+ close();
826
1166
  },
827
- isDisabled: option.disabled
1167
+ disabled: option.disabled
828
1168
  },
829
1169
  index
830
- )
831
- }
832
- )
1170
+ )),
1171
+ additionalItems && additionalItems({ ...bag, search, selected: value })
1172
+ ] })
1173
+ ] });
833
1174
  }
834
- )
835
- ] })
1175
+ }
1176
+ )
836
1177
  ] });
837
1178
  };
838
1179
 
839
1180
  // src/components/layout-and-navigation/Overlay.tsx
840
- import { useEffect as useEffect10, useRef as useRef3, useState as useState8 } from "react";
1181
+ import { useEffect as useEffect12, useRef as useRef3, useState as useState10 } from "react";
841
1182
  import ReactDOM from "react-dom";
842
- import clsx8 from "clsx";
843
-
844
- // src/hooks/useHoverState.ts
845
- import { useEffect as useEffect9, useState as useState7 } from "react";
846
- var defaultUseHoverStateProps = {
847
- closingDelay: 200,
848
- isDisabled: false
849
- };
850
- var useHoverState = (props = void 0) => {
851
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
852
- const [isHovered, setIsHovered] = useState7(false);
853
- const [timer, setTimer] = useState7();
854
- const onMouseEnter = () => {
855
- if (isDisabled) {
856
- return;
857
- }
858
- clearTimeout(timer);
859
- setIsHovered(true);
860
- };
861
- const onMouseLeave = () => {
862
- if (isDisabled) {
863
- return;
864
- }
865
- setTimer(setTimeout(() => {
866
- setIsHovered(false);
867
- }, closingDelay));
868
- };
869
- useEffect9(() => {
870
- if (timer) {
871
- return () => {
872
- clearTimeout(timer);
873
- };
874
- }
875
- });
876
- useEffect9(() => {
877
- if (timer) {
878
- clearTimeout(timer);
879
- }
880
- }, [isDisabled]);
881
- return {
882
- isHovered,
883
- setIsHovered,
884
- handlers: { onMouseEnter, onMouseLeave }
885
- };
886
- };
1183
+ import clsx10 from "clsx";
887
1184
 
888
1185
  // src/components/user-action/Tooltip.tsx
889
- import { clsx as clsx7 } from "clsx";
890
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1186
+ import { clsx as clsx9 } from "clsx";
1187
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
891
1188
  var Tooltip = ({
892
1189
  tooltip,
893
1190
  children,
@@ -917,17 +1214,17 @@ var Tooltip = ({
917
1214
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
918
1215
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
919
1216
  };
920
- return /* @__PURE__ */ jsxs6(
1217
+ return /* @__PURE__ */ jsxs8(
921
1218
  "div",
922
1219
  {
923
- className: clsx7("relative inline-block", containerClassName),
1220
+ className: clsx9("relative inline-block", containerClassName),
924
1221
  ...handlers,
925
1222
  children: [
926
1223
  children,
927
- isHovered && /* @__PURE__ */ jsxs6(
1224
+ isHovered && /* @__PURE__ */ jsxs8(
928
1225
  "div",
929
1226
  {
930
- className: clsx7(
1227
+ className: clsx9(
931
1228
  `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
932
1229
  animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
933
1230
  positionClasses[position],
@@ -936,10 +1233,10 @@ var Tooltip = ({
936
1233
  style: { zIndex, animationDelay: animationDelay + "ms" },
937
1234
  children: [
938
1235
  tooltip,
939
- /* @__PURE__ */ jsx8(
1236
+ /* @__PURE__ */ jsx10(
940
1237
  "div",
941
1238
  {
942
- className: clsx7(`absolute w-0 h-0`, triangleClasses[position]),
1239
+ className: clsx9(`absolute w-0 h-0`, triangleClasses[position]),
943
1240
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
944
1241
  }
945
1242
  )
@@ -953,24 +1250,24 @@ var Tooltip = ({
953
1250
 
954
1251
  // src/components/layout-and-navigation/Overlay.tsx
955
1252
  import { X } from "lucide-react";
956
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1253
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
957
1254
  var Overlay = ({
958
1255
  children,
959
1256
  isOpen,
960
1257
  onBackgroundClick,
961
1258
  backgroundClassName
962
1259
  }) => {
963
- const [root, setRoot] = useState8();
964
- useEffect10(() => {
1260
+ const [root, setRoot] = useState10();
1261
+ useEffect12(() => {
965
1262
  setRoot(document.body);
966
1263
  }, []);
967
1264
  if (!root || !isOpen) return null;
968
1265
  return ReactDOM.createPortal(
969
- /* @__PURE__ */ jsxs7("div", { className: clsx8("fixed inset-0 z-[9999]"), children: [
970
- /* @__PURE__ */ jsx9(
1266
+ /* @__PURE__ */ jsxs9("div", { className: clsx10("fixed inset-0 z-[9999]"), children: [
1267
+ /* @__PURE__ */ jsx11(
971
1268
  "div",
972
1269
  {
973
- className: clsx8("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
1270
+ className: clsx10("fixed inset-0 h-screen w-screen bg-overlay-shadow", backgroundClassName),
974
1271
  onClick: onBackgroundClick
975
1272
  }
976
1273
  ),
@@ -998,21 +1295,21 @@ var OverlayHeader = ({
998
1295
  }) => {
999
1296
  const translation = useTranslation([defaultModalHeaderTranslation], overwriteTranslation);
1000
1297
  const hasTitleRow = !!title || !!titleText || !!onClose;
1001
- const titleRow = /* @__PURE__ */ jsxs7("div", { className: "row justify-between items-start gap-x-8", children: [
1002
- title ?? /* @__PURE__ */ jsx9(
1298
+ const titleRow = /* @__PURE__ */ jsxs9("div", { className: "flex-row-8 justify-between items-start", children: [
1299
+ title ?? /* @__PURE__ */ jsx11(
1003
1300
  "h2",
1004
1301
  {
1005
- className: clsx8("textstyle-title-lg", {
1302
+ className: clsx10("textstyle-title-lg", {
1006
1303
  "mb-1": description || descriptionText
1007
1304
  }),
1008
1305
  children: titleText
1009
1306
  }
1010
1307
  ),
1011
- !!onClose && /* @__PURE__ */ jsx9(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ jsx9(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ jsx9(X, { className: "w-full h-full" }) }) })
1308
+ !!onClose && /* @__PURE__ */ jsx11(Tooltip, { tooltip: translation("close"), children: /* @__PURE__ */ jsx11(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ jsx11(X, { className: "w-full h-full" }) }) })
1012
1309
  ] });
1013
- return /* @__PURE__ */ jsxs7("div", { className: "col", children: [
1310
+ return /* @__PURE__ */ jsxs9("div", { className: "flex-col-2", children: [
1014
1311
  hasTitleRow && titleRow,
1015
- description ?? (descriptionText && /* @__PURE__ */ jsx9("span", { className: "textstyle-description", children: descriptionText }))
1312
+ description ?? (descriptionText && /* @__PURE__ */ jsx11("span", { className: "textstyle-description", children: descriptionText }))
1016
1313
  ] });
1017
1314
  };
1018
1315
  var Modal = ({
@@ -1024,7 +1321,7 @@ var Modal = ({
1024
1321
  headerProps
1025
1322
  }) => {
1026
1323
  const ref = useRef3(null);
1027
- useEffect10(() => {
1324
+ useEffect12(() => {
1028
1325
  if (!isOpen) return;
1029
1326
  const modal = ref.current;
1030
1327
  if (!modal) {
@@ -1061,25 +1358,25 @@ var Modal = ({
1061
1358
  overlayStack = overlayStack.filter((m) => m !== modal);
1062
1359
  };
1063
1360
  }, [isOpen, onClose]);
1064
- return /* @__PURE__ */ jsx9(
1361
+ return /* @__PURE__ */ jsx11(
1065
1362
  Overlay,
1066
1363
  {
1067
1364
  isOpen,
1068
1365
  onBackgroundClick: onClose,
1069
1366
  backgroundClassName,
1070
- children: /* @__PURE__ */ jsxs7(
1367
+ children: /* @__PURE__ */ jsxs9(
1071
1368
  "div",
1072
1369
  {
1073
1370
  ref,
1074
1371
  tabIndex: -1,
1075
- className: clsx8(
1076
- "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
1372
+ className: clsx10(
1373
+ "flex-col-2 fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl animate-pop-in",
1077
1374
  className
1078
1375
  ),
1079
1376
  role: "dialog",
1080
1377
  "aria-modal": true,
1081
1378
  children: [
1082
- /* @__PURE__ */ jsx9(OverlayHeader, { ...headerProps, onClose }),
1379
+ /* @__PURE__ */ jsx11(OverlayHeader, { ...headerProps, onClose }),
1083
1380
  children
1084
1381
  ]
1085
1382
  }
@@ -1089,7 +1386,7 @@ var Modal = ({
1089
1386
  };
1090
1387
 
1091
1388
  // src/components/modals/LanguageModal.tsx
1092
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1389
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1093
1390
  var defaultLanguageModalTranslation = {
1094
1391
  en: {
1095
1392
  language: "Language",
@@ -1112,7 +1409,7 @@ var LanguageModal = ({
1112
1409
  }) => {
1113
1410
  const { language, setLanguage } = useLanguage();
1114
1411
  const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
1115
- return /* @__PURE__ */ jsx10(
1412
+ return /* @__PURE__ */ jsx12(
1116
1413
  Modal,
1117
1414
  {
1118
1415
  headerProps: {
@@ -1122,8 +1419,8 @@ var LanguageModal = ({
1122
1419
  },
1123
1420
  onClose,
1124
1421
  ...modalProps,
1125
- children: /* @__PURE__ */ jsxs8("div", { className: "w-64", children: [
1126
- /* @__PURE__ */ jsx10(
1422
+ children: /* @__PURE__ */ jsxs10("div", { className: "w-64", children: [
1423
+ /* @__PURE__ */ jsx12(
1127
1424
  Select,
1128
1425
  {
1129
1426
  className: "mt-2",
@@ -1132,7 +1429,7 @@ var LanguageModal = ({
1132
1429
  onChange: (language2) => setLanguage(language2)
1133
1430
  }
1134
1431
  ),
1135
- /* @__PURE__ */ jsx10("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ jsx10(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
1432
+ /* @__PURE__ */ jsx12("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx12(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
1136
1433
  ] })
1137
1434
  }
1138
1435
  );