@helpwave/hightide 0.1.21 → 0.1.22

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 (193) hide show
  1. package/dist/components/date/DatePicker.js +11 -1
  2. package/dist/components/date/DatePicker.js.map +1 -1
  3. package/dist/components/date/DatePicker.mjs +11 -1
  4. package/dist/components/date/DatePicker.mjs.map +1 -1
  5. package/dist/components/date/DayPicker.js.map +1 -1
  6. package/dist/components/date/DayPicker.mjs.map +1 -1
  7. package/dist/components/date/TimeDisplay.js.map +1 -1
  8. package/dist/components/date/TimeDisplay.mjs.map +1 -1
  9. package/dist/components/date/YearMonthPicker.js +1 -0
  10. package/dist/components/date/YearMonthPicker.js.map +1 -1
  11. package/dist/components/date/YearMonthPicker.mjs +1 -0
  12. package/dist/components/date/YearMonthPicker.mjs.map +1 -1
  13. package/dist/components/dialogs/ConfirmDialog.js +2 -1
  14. package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
  15. package/dist/components/dialogs/ConfirmDialog.mjs +2 -1
  16. package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
  17. package/dist/components/icons-and-geometry/Avatar.d.mts +17 -7
  18. package/dist/components/icons-and-geometry/Avatar.d.ts +17 -7
  19. package/dist/components/icons-and-geometry/Avatar.js +103 -42
  20. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  21. package/dist/components/icons-and-geometry/Avatar.mjs +102 -40
  22. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  23. package/dist/components/layout-and-navigation/Carousel.js +1 -0
  24. package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
  25. package/dist/components/layout-and-navigation/Carousel.mjs +1 -0
  26. package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
  27. package/dist/components/layout-and-navigation/Chip.d.mts +6 -2
  28. package/dist/components/layout-and-navigation/Chip.d.ts +6 -2
  29. package/dist/components/layout-and-navigation/Chip.js +8 -2
  30. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  31. package/dist/components/layout-and-navigation/Chip.mjs +6 -1
  32. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  33. package/dist/components/layout-and-navigation/Overlay.js +3 -2
  34. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  35. package/dist/components/layout-and-navigation/Overlay.mjs +3 -2
  36. package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
  37. package/dist/components/layout-and-navigation/Pagination.js +3 -2
  38. package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
  39. package/dist/components/layout-and-navigation/Pagination.mjs +3 -2
  40. package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
  41. package/dist/components/layout-and-navigation/SearchableList.js +2 -1
  42. package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
  43. package/dist/components/layout-and-navigation/SearchableList.mjs +2 -1
  44. package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
  45. package/dist/components/layout-and-navigation/StepperBar.js +1 -0
  46. package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
  47. package/dist/components/layout-and-navigation/StepperBar.mjs +1 -0
  48. package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
  49. package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
  50. package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
  51. package/dist/components/loading-states/ErrorComponent.js.map +1 -1
  52. package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
  53. package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
  54. package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
  55. package/dist/components/loading-states/LoadingButton.js +1 -0
  56. package/dist/components/loading-states/LoadingButton.js.map +1 -1
  57. package/dist/components/loading-states/LoadingButton.mjs +1 -0
  58. package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
  59. package/dist/components/modals/ConfirmModal.js +2 -1
  60. package/dist/components/modals/ConfirmModal.js.map +1 -1
  61. package/dist/components/modals/ConfirmModal.mjs +2 -1
  62. package/dist/components/modals/ConfirmModal.mjs.map +1 -1
  63. package/dist/components/modals/DiscardChangesModal.js +2 -1
  64. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  65. package/dist/components/modals/DiscardChangesModal.mjs +2 -1
  66. package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
  67. package/dist/components/modals/InputModal.js +3 -2
  68. package/dist/components/modals/InputModal.js.map +1 -1
  69. package/dist/components/modals/InputModal.mjs +3 -2
  70. package/dist/components/modals/InputModal.mjs.map +1 -1
  71. package/dist/components/modals/LanguageModal.js +5 -4
  72. package/dist/components/modals/LanguageModal.js.map +1 -1
  73. package/dist/components/modals/LanguageModal.mjs +6 -9
  74. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  75. package/dist/components/modals/ThemeModal.js +11 -7
  76. package/dist/components/modals/ThemeModal.js.map +1 -1
  77. package/dist/components/modals/ThemeModal.mjs +10 -10
  78. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  79. package/dist/components/properties/CheckboxProperty.js +13 -3
  80. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  81. package/dist/components/properties/CheckboxProperty.mjs +13 -3
  82. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  83. package/dist/components/properties/DateProperty.js +13 -3
  84. package/dist/components/properties/DateProperty.js.map +1 -1
  85. package/dist/components/properties/DateProperty.mjs +13 -3
  86. package/dist/components/properties/DateProperty.mjs.map +1 -1
  87. package/dist/components/properties/MultiSelectProperty.js +18 -8
  88. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  89. package/dist/components/properties/MultiSelectProperty.mjs +19 -13
  90. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  91. package/dist/components/properties/NumberProperty.js +13 -3
  92. package/dist/components/properties/NumberProperty.js.map +1 -1
  93. package/dist/components/properties/NumberProperty.mjs +13 -3
  94. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  95. package/dist/components/properties/PropertyBase.js +12 -2
  96. package/dist/components/properties/PropertyBase.js.map +1 -1
  97. package/dist/components/properties/PropertyBase.mjs +12 -2
  98. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  99. package/dist/components/properties/SelectProperty.js +15 -5
  100. package/dist/components/properties/SelectProperty.js.map +1 -1
  101. package/dist/components/properties/SelectProperty.mjs +16 -10
  102. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  103. package/dist/components/properties/TextProperty.js +15 -5
  104. package/dist/components/properties/TextProperty.js.map +1 -1
  105. package/dist/components/properties/TextProperty.mjs +15 -5
  106. package/dist/components/properties/TextProperty.mjs.map +1 -1
  107. package/dist/components/table/Table.js +6 -5
  108. package/dist/components/table/Table.js.map +1 -1
  109. package/dist/components/table/Table.mjs +7 -10
  110. package/dist/components/table/Table.mjs.map +1 -1
  111. package/dist/components/table/TableFilterButton.js +3 -2
  112. package/dist/components/table/TableFilterButton.js.map +1 -1
  113. package/dist/components/table/TableFilterButton.mjs +4 -7
  114. package/dist/components/table/TableFilterButton.mjs.map +1 -1
  115. package/dist/components/table/TableSortButton.js +1 -0
  116. package/dist/components/table/TableSortButton.js.map +1 -1
  117. package/dist/components/table/TableSortButton.mjs +1 -0
  118. package/dist/components/table/TableSortButton.mjs.map +1 -1
  119. package/dist/components/user-action/Button.d.mts +2 -1
  120. package/dist/components/user-action/Button.d.ts +2 -1
  121. package/dist/components/user-action/Button.js +12 -1
  122. package/dist/components/user-action/Button.js.map +1 -1
  123. package/dist/components/user-action/Button.mjs +12 -1
  124. package/dist/components/user-action/Button.mjs.map +1 -1
  125. package/dist/components/user-action/Checkbox.js +1 -1
  126. package/dist/components/user-action/Checkbox.js.map +1 -1
  127. package/dist/components/user-action/Checkbox.mjs +1 -1
  128. package/dist/components/user-action/Checkbox.mjs.map +1 -1
  129. package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
  130. package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
  131. package/dist/components/user-action/DateAndTimePicker.js +11 -1
  132. package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
  133. package/dist/components/user-action/DateAndTimePicker.mjs +11 -1
  134. package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
  135. package/dist/components/user-action/Input.js +1 -1
  136. package/dist/components/user-action/Input.js.map +1 -1
  137. package/dist/components/user-action/Input.mjs +1 -1
  138. package/dist/components/user-action/Input.mjs.map +1 -1
  139. package/dist/components/user-action/Menu.js +2 -2
  140. package/dist/components/user-action/Menu.js.map +1 -1
  141. package/dist/components/user-action/Menu.mjs +3 -7
  142. package/dist/components/user-action/Menu.mjs.map +1 -1
  143. package/dist/components/user-action/MultiSelect.js +7 -6
  144. package/dist/components/user-action/MultiSelect.js.map +1 -1
  145. package/dist/components/user-action/MultiSelect.mjs +8 -11
  146. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  147. package/dist/components/user-action/SearchBar.js +2 -1
  148. package/dist/components/user-action/SearchBar.js.map +1 -1
  149. package/dist/components/user-action/SearchBar.mjs +2 -1
  150. package/dist/components/user-action/SearchBar.mjs.map +1 -1
  151. package/dist/components/user-action/Select.js +4 -3
  152. package/dist/components/user-action/Select.js.map +1 -1
  153. package/dist/components/user-action/Select.mjs +5 -8
  154. package/dist/components/user-action/Select.mjs.map +1 -1
  155. package/dist/components/user-action/Textarea.js +3 -3
  156. package/dist/components/user-action/Textarea.js.map +1 -1
  157. package/dist/components/user-action/Textarea.mjs +3 -3
  158. package/dist/components/user-action/Textarea.mjs.map +1 -1
  159. package/dist/css/globals.css +270 -47
  160. package/dist/css/uncompiled/globals.css +2 -2
  161. package/dist/css/uncompiled/theme/colors-basic.css +1 -1
  162. package/dist/css/uncompiled/theme/colors-component.css +9 -13
  163. package/dist/css/uncompiled/theme/colors-semantic.css +8 -3
  164. package/dist/css/uncompiled/utitlity/shadow.css +45 -16
  165. package/dist/hooks/useLocalStorage.js +8 -3
  166. package/dist/hooks/useLocalStorage.js.map +1 -1
  167. package/dist/hooks/useLocalStorage.mjs +8 -3
  168. package/dist/hooks/useLocalStorage.mjs.map +1 -1
  169. package/dist/hooks/useLogOnce.d.mts +8 -0
  170. package/dist/hooks/useLogOnce.d.ts +8 -0
  171. package/dist/hooks/useLogOnce.js +53 -0
  172. package/dist/hooks/useLogOnce.js.map +1 -0
  173. package/dist/hooks/useLogOnce.mjs +29 -0
  174. package/dist/hooks/useLogOnce.mjs.map +1 -0
  175. package/dist/index.d.mts +3 -2
  176. package/dist/index.d.ts +3 -2
  177. package/dist/index.js +285 -206
  178. package/dist/index.js.map +1 -1
  179. package/dist/index.mjs +249 -175
  180. package/dist/index.mjs.map +1 -1
  181. package/dist/localization/LanguageProvider.js +8 -3
  182. package/dist/localization/LanguageProvider.js.map +1 -1
  183. package/dist/localization/LanguageProvider.mjs +8 -3
  184. package/dist/localization/LanguageProvider.mjs.map +1 -1
  185. package/dist/localization/useTranslation.js.map +1 -1
  186. package/dist/localization/useTranslation.mjs.map +1 -1
  187. package/dist/theming/useTheme.d.mts +2 -2
  188. package/dist/theming/useTheme.d.ts +2 -2
  189. package/dist/theming/useTheme.js +26 -22
  190. package/dist/theming/useTheme.js.map +1 -1
  191. package/dist/theming/useTheme.mjs +21 -17
  192. package/dist/theming/useTheme.mjs.map +1 -1
  193. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -3067,6 +3067,11 @@ var SessionStorageService = class extends StorageService {
3067
3067
  }
3068
3068
  };
3069
3069
 
3070
+ // src/util/resolveSetState.ts
3071
+ function resolveSetState(action, prev) {
3072
+ return typeof action === "function" ? action(prev) : action;
3073
+ }
3074
+
3070
3075
  // src/hooks/useLocalStorage.ts
3071
3076
  var useLocalStorage = (key, initValue) => {
3072
3077
  const get = useCallback(() => {
@@ -3078,10 +3083,10 @@ var useLocalStorage = (key, initValue) => {
3078
3083
  return value || initValue;
3079
3084
  }, [initValue, key]);
3080
3085
  const [storedValue, setStoredValue] = useState(get);
3081
- const setValue = useCallback((value) => {
3082
- const newValue = value instanceof Function ? value(storedValue) : value;
3086
+ const setValue = useCallback((action) => {
3087
+ const newValue = resolveSetState(action, storedValue);
3083
3088
  const storageService = new LocalStorageService();
3084
- storageService.set(key, value);
3089
+ storageService.set(key, newValue);
3085
3090
  setStoredValue(newValue);
3086
3091
  }, [storedValue, setStoredValue, key]);
3087
3092
  useEffect(() => {
@@ -3517,6 +3522,7 @@ var SolidButton = forwardRef(function SolidButton2({
3517
3522
  onClick,
3518
3523
  disabled,
3519
3524
  className: clsx4(
3525
+ "font-semibold",
3520
3526
  {
3521
3527
  "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
3522
3528
  [clsx4(colorClasses, "hover:brightness-90")]: !disabled
@@ -3574,6 +3580,7 @@ var OutlineButton = ({
3574
3580
  onClick,
3575
3581
  disabled,
3576
3582
  className: clsx4(
3583
+ "font-semibold",
3577
3584
  {
3578
3585
  "text-disabled-text border-disabled-outline cursor-not-allowed": disabled,
3579
3586
  [clsx4(colorClasses, "hover:brightness-80")]: !disabled
@@ -3616,6 +3623,7 @@ var TextButton = ({
3616
3623
  startIcon,
3617
3624
  endIcon,
3618
3625
  onClick,
3626
+ coloredHoverBackground = true,
3619
3627
  className,
3620
3628
  ...restProps
3621
3629
  }) => {
@@ -3624,6 +3632,11 @@ var TextButton = ({
3624
3632
  negative: "bg-transparent text-button-text-negative-text",
3625
3633
  neutral: "bg-transparent text-button-text-neutral-text"
3626
3634
  }[color];
3635
+ const backgroundColor = {
3636
+ primary: "hover:bg-button-text-primary-text/20",
3637
+ negative: "hover:bg-button-text-negative-text/20",
3638
+ neutral: "hover:bg-button-text-neutral-text/20"
3639
+ }[color];
3627
3640
  const iconColorClasses = {
3628
3641
  primary: "text-button-text-primary-icon",
3629
3642
  negative: "text-button-text-negative-icon",
@@ -3635,9 +3648,12 @@ var TextButton = ({
3635
3648
  onClick,
3636
3649
  disabled,
3637
3650
  className: clsx4(
3651
+ "font-semibold",
3638
3652
  {
3639
3653
  "text-disabled-text cursor-not-allowed": disabled,
3640
- [clsx4(colorClasses, "hover:bg-button-text-hover-background")]: !disabled
3654
+ [colorClasses]: !disabled,
3655
+ [backgroundColor]: !disabled && coloredHoverBackground,
3656
+ "hover:bg-button-text-hover-background": !disabled && !coloredHoverBackground
3641
3657
  },
3642
3658
  ButtonUtil.paddingMapping[size],
3643
3659
  className
@@ -4719,7 +4735,7 @@ var Modal = ({
4719
4735
  ref,
4720
4736
  tabIndex: -1,
4721
4737
  className: clsx11(
4722
- "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",
4738
+ "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-around-lg shadow-strong animate-pop-in",
4723
4739
  className
4724
4740
  ),
4725
4741
  role: "dialog",
@@ -4788,7 +4804,7 @@ var Dialog = ({
4788
4804
  ref,
4789
4805
  tabIndex: -1,
4790
4806
  className: clsx11(
4791
- "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",
4807
+ "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-around-lg shadow-strong animate-pop-in",
4792
4808
  className
4793
4809
  ),
4794
4810
  role: "dialog",
@@ -4850,49 +4866,105 @@ var ConfirmDialog = ({
4850
4866
 
4851
4867
  // src/components/icons-and-geometry/Avatar.tsx
4852
4868
  import clsx13 from "clsx";
4869
+
4870
+ // src/hooks/useLogOnce.ts
4871
+ import { useEffect as useEffect10, useState as useState10 } from "react";
4872
+ var useLogOnce = ({
4873
+ message,
4874
+ condition,
4875
+ type = "warning"
4876
+ }) => {
4877
+ const [hasLogged, setHasLogged] = useState10(false);
4878
+ useEffect10(() => {
4879
+ if (!hasLogged && condition) {
4880
+ switch (type) {
4881
+ case "info":
4882
+ console.info(message);
4883
+ break;
4884
+ case "error":
4885
+ console.error(message);
4886
+ break;
4887
+ case "warning":
4888
+ console.warn(message);
4889
+ break;
4890
+ }
4891
+ setHasLogged(true);
4892
+ }
4893
+ }, [condition]);
4894
+ };
4895
+
4896
+ // src/components/icons-and-geometry/Avatar.tsx
4897
+ import { useMemo } from "react";
4853
4898
  import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
4854
- var avtarSizeList = ["tiny", "small", "medium", "large"];
4899
+ var avtarSizeList = ["sm", "md", "lg", "xl"];
4855
4900
  var avatarSizeMapping = {
4856
- tiny: 24,
4857
- small: 32,
4858
- medium: 48,
4859
- large: 64
4860
- };
4861
- var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
4862
- avatarUrl = "https://cdn.helpwave.de/boringavatar.svg";
4863
- const avtarSize = {
4864
- tiny: 24,
4865
- small: 32,
4866
- medium: 48,
4867
- large: 64
4868
- }[size];
4869
- const style = {
4870
- width: avtarSize + "px",
4871
- height: avtarSize + "px",
4872
- maxWidth: avtarSize + "px",
4873
- maxHeight: avtarSize + "px",
4874
- minWidth: avtarSize + "px",
4875
- minHeight: avtarSize + "px"
4901
+ sm: 18,
4902
+ md: 24,
4903
+ lg: 32,
4904
+ xl: 48
4905
+ };
4906
+ var textClassNameMapping = {
4907
+ sm: "text-xs font-semibold",
4908
+ md: "text-sm font-semibold",
4909
+ lg: "text-lg font-semibold",
4910
+ xl: "text-2xl font-bold"
4911
+ };
4912
+ var AvatarUtil = {
4913
+ avatarSizeMapping,
4914
+ sizes: avtarSizeList
4915
+ };
4916
+ var Avatar = ({ image, name, size = "md", fullyRounded, className = "" }) => {
4917
+ const pixels = avatarSizeMapping[size];
4918
+ const sizeStyle = {
4919
+ minWidth: pixels,
4920
+ maxWidth: pixels,
4921
+ minHeight: pixels,
4922
+ maxHeight: pixels
4876
4923
  };
4877
- return (
4878
- // TODO transparent or white background later
4879
- /* @__PURE__ */ jsx15("div", { className: clsx13(`rounded-full bg-primary shadow`, className), style, children: /* @__PURE__ */ jsx15(
4880
- "img",
4881
- {
4882
- className: "rounded-full",
4883
- style,
4884
- src: avatarUrl,
4885
- alt,
4886
- width: avtarSize,
4887
- height: avtarSize
4888
- }
4889
- ) })
4924
+ const textClassName = textClassNameMapping[size];
4925
+ useLogOnce({ message: "Either set image or name in Avatar", condition: !image && !name, type: "warning" });
4926
+ const displayName = useMemo(() => {
4927
+ const maxLetters = size === "sm" ? 1 : 2;
4928
+ return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
4929
+ }, [name, size]);
4930
+ const rounding = {
4931
+ "rounded-full": fullyRounded,
4932
+ "rounded-lg": !fullyRounded && !(size === "sm" || size === "md"),
4933
+ "rounded-sm": !fullyRounded && (size === "sm" || size === "md")
4934
+ };
4935
+ return /* @__PURE__ */ jsxs11(
4936
+ "div",
4937
+ {
4938
+ className: clsx13(
4939
+ `relative bg-primary text-on-primary`,
4940
+ rounding,
4941
+ className
4942
+ ),
4943
+ style: sizeStyle,
4944
+ children: [
4945
+ name && !image && /* @__PURE__ */ jsx15("span", { className: clsx13(textClassName, "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"), children: displayName }),
4946
+ image && /* @__PURE__ */ jsx15(
4947
+ "img",
4948
+ {
4949
+ className: clsx13(
4950
+ "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
4951
+ rounding
4952
+ ),
4953
+ src: image.avatarUrl,
4954
+ alt: image.alt,
4955
+ style: sizeStyle
4956
+ }
4957
+ )
4958
+ ]
4959
+ }
4890
4960
  );
4891
4961
  };
4892
4962
  var AvatarGroup = ({
4893
4963
  avatars,
4894
4964
  maxShownProfiles = 5,
4895
- size = "tiny"
4965
+ showTotalNumber = true,
4966
+ size = "md",
4967
+ fullyRounded
4896
4968
  }) => {
4897
4969
  const displayedProfiles = avatars.length < maxShownProfiles ? avatars : avatars.slice(0, maxShownProfiles);
4898
4970
  const diameter = avatarSizeMapping[size];
@@ -4905,15 +4977,22 @@ var AvatarGroup = ({
4905
4977
  {
4906
4978
  className: "absolute",
4907
4979
  style: { left: index * diameter * stackingOverlap + "px", zIndex: maxShownProfiles - index },
4908
- children: /* @__PURE__ */ jsx15(Avatar, { avatarUrl: avatar.avatarUrl, alt: avatar.alt, size })
4980
+ children: /* @__PURE__ */ jsx15(
4981
+ Avatar,
4982
+ {
4983
+ ...avatar,
4984
+ size,
4985
+ fullyRounded,
4986
+ className: clsx13("shadow-side shadow-r-4 shadow-hard", avatar.className)
4987
+ }
4988
+ )
4909
4989
  },
4910
4990
  index
4911
4991
  )) }),
4912
- notDisplayedProfiles > 0 && /* @__PURE__ */ jsx15(
4992
+ showTotalNumber && notDisplayedProfiles > 0 && /* @__PURE__ */ jsx15(
4913
4993
  "div",
4914
4994
  {
4915
- className: "flex-row-2 truncate items-center",
4916
- style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
4995
+ className: clsx13(textClassNameMapping[size], "flex-row-2 truncate items-center"),
4917
4996
  children: /* @__PURE__ */ jsxs11("span", { children: [
4918
4997
  "+ ",
4919
4998
  notDisplayedProfiles
@@ -4948,7 +5027,7 @@ var Circle = ({
4948
5027
  };
4949
5028
 
4950
5029
  // src/components/icons-and-geometry/Ring.tsx
4951
- import { useCallback as useCallback3, useEffect as useEffect10, useState as useState10 } from "react";
5030
+ import { useCallback as useCallback3, useEffect as useEffect11, useState as useState11 } from "react";
4952
5031
  import clsx15 from "clsx";
4953
5032
  import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
4954
5033
  var Ring = ({
@@ -4977,7 +5056,7 @@ var AnimatedRing = ({
4977
5056
  onAnimationFinished = noop,
4978
5057
  style
4979
5058
  }) => {
4980
- const [currentWidth, setCurrentWidth] = useState10(0);
5059
+ const [currentWidth, setCurrentWidth] = useState11(0);
4981
5060
  const milliseconds = 1e3 * fillAnimationDuration;
4982
5061
  const animate = useCallback3((timestamp, startTime) => {
4983
5062
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
@@ -4993,7 +5072,7 @@ var AnimatedRing = ({
4993
5072
  }
4994
5073
  }
4995
5074
  }, [milliseconds, onAnimationFinished, repeating, width]);
4996
- useEffect10(() => {
5075
+ useEffect11(() => {
4997
5076
  if (currentWidth < width) {
4998
5077
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
4999
5078
  }
@@ -5028,7 +5107,7 @@ var RingWave = ({
5028
5107
  onAnimationFinished = noop,
5029
5108
  style
5030
5109
  }) => {
5031
- const [currentInnerSize, setCurrentInnerSize] = useState10(startInnerSize);
5110
+ const [currentInnerSize, setCurrentInnerSize] = useState11(startInnerSize);
5032
5111
  const distance = endInnerSize - startInnerSize;
5033
5112
  const milliseconds = 1e3 * fillAnimationDuration;
5034
5113
  const animate = useCallback3((timestamp, startTime) => {
@@ -5048,7 +5127,7 @@ var RingWave = ({
5048
5127
  }
5049
5128
  }
5050
5129
  }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
5051
- useEffect10(() => {
5130
+ useEffect11(() => {
5052
5131
  if (currentInnerSize < endInnerSize) {
5053
5132
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
5054
5133
  }
@@ -5083,7 +5162,7 @@ var RadialRings = ({
5083
5162
  sizeCircle2 = 200,
5084
5163
  sizeCircle3 = 300
5085
5164
  }) => {
5086
- const [currentRing, setCurrentRing] = useState10(0);
5165
+ const [currentRing, setCurrentRing] = useState11(0);
5087
5166
  const size = sizeCircle3;
5088
5167
  return /* @__PURE__ */ jsxs12(
5089
5168
  "div",
@@ -5250,7 +5329,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
5250
5329
  };
5251
5330
 
5252
5331
  // src/components/layout-and-navigation/Carousel.tsx
5253
- import { useCallback as useCallback4, useEffect as useEffect11, useMemo, useRef as useRef4, useState as useState11 } from "react";
5332
+ import { useCallback as useCallback4, useEffect as useEffect12, useMemo as useMemo2, useRef as useRef4, useState as useState12 } from "react";
5254
5333
  import clsx17 from "clsx";
5255
5334
  import { ChevronLeft, ChevronRight } from "lucide-react";
5256
5335
 
@@ -5382,7 +5461,7 @@ var Carousel = ({
5382
5461
  currentPosition,
5383
5462
  dragState,
5384
5463
  animationState
5385
- }, setCarouselInformation] = useState11({
5464
+ }, setCarouselInformation] = useState12({
5386
5465
  currentPosition: 0
5387
5466
  });
5388
5467
  const animationId = useRef4(void 0);
@@ -5390,7 +5469,7 @@ var Carousel = ({
5390
5469
  autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
5391
5470
  const length = children.length;
5392
5471
  const paddingItemCount = 3;
5393
- const util = useMemo(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
5472
+ const util = useMemo2(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
5394
5473
  const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
5395
5474
  animationTime = Math.max(200, animationTime);
5396
5475
  autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
@@ -5443,7 +5522,7 @@ var Carousel = ({
5443
5522
  animationId.current = requestAnimationFrame((time1) => animation(time1));
5444
5523
  }
5445
5524
  }, [animationTime, autoLoopAnimationTime, util]);
5446
- useEffect11(() => {
5525
+ useEffect12(() => {
5447
5526
  if (animationState) {
5448
5527
  animationId.current = requestAnimationFrame(animation);
5449
5528
  }
@@ -5465,7 +5544,7 @@ var Carousel = ({
5465
5544
  isAutoLooping: true
5466
5545
  }
5467
5546
  }));
5468
- useEffect11(() => {
5547
+ useEffect12(() => {
5469
5548
  if (!animationId.current && !animationState && !dragState && !timeOut.current) {
5470
5549
  if (autoLoopingTimeOut > 0) {
5471
5550
  timeOut.current = setTimeout(() => {
@@ -5673,6 +5752,10 @@ var Carousel = ({
5673
5752
  // src/components/layout-and-navigation/Chip.tsx
5674
5753
  import clsx18 from "clsx";
5675
5754
  import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
5755
+ var chipColors = ["default", "dark", "red", "yellow", "green", "blue", "pink"];
5756
+ var ChipUtil = {
5757
+ colors: chipColors
5758
+ };
5676
5759
  var Chip = ({
5677
5760
  children,
5678
5761
  trailingIcon,
@@ -6016,17 +6099,17 @@ import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as
6016
6099
  import clsx23 from "clsx";
6017
6100
 
6018
6101
  // src/components/user-action/Input.tsx
6019
- import { forwardRef as forwardRef3, useEffect as useEffect14, useImperativeHandle, useRef as useRef5, useState as useState13 } from "react";
6102
+ import { forwardRef as forwardRef3, useEffect as useEffect15, useImperativeHandle, useRef as useRef5, useState as useState14 } from "react";
6020
6103
  import clsx22 from "clsx";
6021
6104
 
6022
6105
  // src/hooks/useDelay.ts
6023
- import { useEffect as useEffect12, useState as useState12 } from "react";
6106
+ import { useEffect as useEffect13, useState as useState13 } from "react";
6024
6107
  var defaultOptions = {
6025
6108
  delay: 3e3,
6026
6109
  disabled: false
6027
6110
  };
6028
6111
  function useDelay(options) {
6029
- const [timer, setTimer] = useState12(void 0);
6112
+ const [timer, setTimer] = useState13(void 0);
6030
6113
  const { delay, disabled } = {
6031
6114
  ...defaultOptions,
6032
6115
  ...options
@@ -6045,12 +6128,12 @@ function useDelay(options) {
6045
6128
  setTimer(void 0);
6046
6129
  }, delay));
6047
6130
  };
6048
- useEffect12(() => {
6131
+ useEffect13(() => {
6049
6132
  return () => {
6050
6133
  clearTimeout(timer);
6051
6134
  };
6052
6135
  }, [timer]);
6053
- useEffect12(() => {
6136
+ useEffect13(() => {
6054
6137
  if (disabled) {
6055
6138
  clearTimeout(timer);
6056
6139
  setTimer(void 0);
@@ -6135,10 +6218,10 @@ function useFocusManagement() {
6135
6218
  }
6136
6219
 
6137
6220
  // src/hooks/useFocusOnceVisible.ts
6138
- import React2, { useEffect as useEffect13 } from "react";
6221
+ import React2, { useEffect as useEffect14 } from "react";
6139
6222
  var useFocusOnceVisible = (ref, disable = false) => {
6140
6223
  const [hasUsedFocus, setHasUsedFocus] = React2.useState(false);
6141
- useEffect13(() => {
6224
+ useEffect14(() => {
6142
6225
  if (disable || hasUsedFocus) {
6143
6226
  return;
6144
6227
  }
@@ -6163,7 +6246,7 @@ var getInputClassName = ({ disabled = false, hasError = false }) => {
6163
6246
  return clsx22(
6164
6247
  "px-2 py-1.5 rounded-md border-2",
6165
6248
  {
6166
- "bg-surface text-on-surface hover:border-primary focus:border-primary": !disabled && !hasError,
6249
+ "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
6167
6250
  "bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
6168
6251
  "bg-disabled-background text-disabled-text border-disabled-border": disabled
6169
6252
  }
@@ -6254,8 +6337,8 @@ var InputUncontrolled = ({
6254
6337
  onChangeText = noop,
6255
6338
  ...props
6256
6339
  }) => {
6257
- const [usedValue, setUsedValue] = useState13(value);
6258
- useEffect14(() => {
6340
+ const [usedValue, setUsedValue] = useState14(value);
6341
+ useEffect15(() => {
6259
6342
  setUsedValue(value);
6260
6343
  }, [value]);
6261
6344
  return /* @__PURE__ */ jsx26(
@@ -6306,7 +6389,7 @@ var FormInput = forwardRef3(function FormInput2({
6306
6389
  });
6307
6390
 
6308
6391
  // src/components/layout-and-navigation/Pagination.tsx
6309
- import { useEffect as useEffect15, useState as useState14 } from "react";
6392
+ import { useEffect as useEffect16, useState as useState15 } from "react";
6310
6393
  import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
6311
6394
  var Pagination = ({
6312
6395
  overwriteTranslation,
@@ -6317,11 +6400,11 @@ var Pagination = ({
6317
6400
  style
6318
6401
  }) => {
6319
6402
  const translation = useTranslation([formTranslation], overwriteTranslation);
6320
- const [value, setValue] = useState14((pageIndex + 1).toString());
6403
+ const [value, setValue] = useState15((pageIndex + 1).toString());
6321
6404
  const noPages = pageCount === 0;
6322
6405
  const onFirstPage = pageIndex === 0 && !noPages;
6323
6406
  const onLastPage = pageIndex === pageCount - 1;
6324
- useEffect15(() => {
6407
+ useEffect16(() => {
6325
6408
  if (noPages) {
6326
6409
  setValue("0");
6327
6410
  } else {
@@ -6364,7 +6447,7 @@ var Pagination = ({
6364
6447
  /* @__PURE__ */ jsx27(
6365
6448
  "span",
6366
6449
  {
6367
- className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-surface text-on-surface rounded-md font-bold",
6450
+ className: "flex-row-2 flex-1 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
6368
6451
  children: pageCount
6369
6452
  }
6370
6453
  )
@@ -6379,7 +6462,7 @@ import { Search } from "lucide-react";
6379
6462
  import clsx24 from "clsx";
6380
6463
 
6381
6464
  // src/hooks/useSearch.ts
6382
- import { useCallback as useCallback6, useEffect as useEffect16, useMemo as useMemo2, useState as useState15 } from "react";
6465
+ import { useCallback as useCallback6, useEffect as useEffect17, useMemo as useMemo3, useState as useState16 } from "react";
6383
6466
 
6384
6467
  // src/util/simpleSearch.ts
6385
6468
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -6418,9 +6501,9 @@ var useSearch = ({
6418
6501
  filter,
6419
6502
  disabled = false
6420
6503
  }) => {
6421
- const [search, setSearch] = useState15(initialSearch ?? "");
6422
- const [result, setResult] = useState15(list);
6423
- const searchTags = useMemo2(() => additionalSearchTags ?? [], [additionalSearchTags]);
6504
+ const [search, setSearch] = useState16(initialSearch ?? "");
6505
+ const [result, setResult] = useState16(list);
6506
+ const searchTags = useMemo3(() => additionalSearchTags ?? [], [additionalSearchTags]);
6424
6507
  const updateSearch = useCallback6((newSearch) => {
6425
6508
  const usedSearch = newSearch ?? search;
6426
6509
  if (newSearch) {
@@ -6428,24 +6511,24 @@ var useSearch = ({
6428
6511
  }
6429
6512
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
6430
6513
  }, [searchTags, list, search, searchMapping]);
6431
- useEffect16(() => {
6514
+ useEffect17(() => {
6432
6515
  if (isSearchInstant) {
6433
6516
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
6434
6517
  }
6435
6518
  }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
6436
- const filteredResult = useMemo2(() => {
6519
+ const filteredResult = useMemo3(() => {
6437
6520
  if (!filter) {
6438
6521
  return result;
6439
6522
  }
6440
6523
  return result.filter(filter);
6441
6524
  }, [result, filter]);
6442
- const sortedAndFilteredResult = useMemo2(() => {
6525
+ const sortedAndFilteredResult = useMemo3(() => {
6443
6526
  if (!sortingFunction) {
6444
6527
  return filteredResult;
6445
6528
  }
6446
6529
  return filteredResult.sort(sortingFunction);
6447
6530
  }, [filteredResult, sortingFunction]);
6448
- const usedResult = useMemo2(() => {
6531
+ const usedResult = useMemo3(() => {
6449
6532
  if (!disabled) {
6450
6533
  return sortedAndFilteredResult;
6451
6534
  }
@@ -6505,7 +6588,7 @@ var SearchableList = ({
6505
6588
  // src/components/layout-and-navigation/StepperBar.tsx
6506
6589
  import { Check as Check2, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
6507
6590
  import clsx25 from "clsx";
6508
- import { useEffect as useEffect17, useState as useState16 } from "react";
6591
+ import { useEffect as useEffect18, useState as useState17 } from "react";
6509
6592
  import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
6510
6593
  var defaultState = {
6511
6594
  currentStep: 0,
@@ -6599,8 +6682,8 @@ var StepperBar = ({
6599
6682
  );
6600
6683
  };
6601
6684
  var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
6602
- const [usedState, setUsedState] = useState16(state ?? defaultState);
6603
- useEffect17(() => {
6685
+ const [usedState, setUsedState] = useState17(state ?? defaultState);
6686
+ useEffect18(() => {
6604
6687
  setUsedState(state ?? defaultState);
6605
6688
  }, [state]);
6606
6689
  return /* @__PURE__ */ jsx29(
@@ -6745,7 +6828,7 @@ var ErrorComponent = ({
6745
6828
  };
6746
6829
 
6747
6830
  // src/components/loading-states/LoadingAndErrorComponent.tsx
6748
- import { useState as useState17 } from "react";
6831
+ import { useState as useState18 } from "react";
6749
6832
 
6750
6833
  // src/components/loading-states/LoadingContainer.tsx
6751
6834
  import { clsx as clsx28 } from "clsx";
@@ -6766,8 +6849,8 @@ var LoadingAndErrorComponent = ({
6766
6849
  minimumLoadingDuration,
6767
6850
  className
6768
6851
  }) => {
6769
- const [isInMinimumLoading, setIsInMinimumLoading] = useState17(false);
6770
- const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState17(false);
6852
+ const [isInMinimumLoading, setIsInMinimumLoading] = useState18(false);
6853
+ const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState18(false);
6771
6854
  if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
6772
6855
  setIsInMinimumLoading(true);
6773
6856
  setTimeout(() => {
@@ -6971,21 +7054,17 @@ var InputModal = ({
6971
7054
 
6972
7055
  // src/components/user-action/Select.tsx
6973
7056
  import { useCallback as useCallback7 } from "react";
6974
- import { useEffect as useEffect20, useState as useState19 } from "react";
7057
+ import { useEffect as useEffect21, useState as useState20 } from "react";
6975
7058
  import clsx35 from "clsx";
6976
7059
 
6977
7060
  // src/components/user-action/Menu.tsx
6978
- import {
6979
- useEffect as useEffect19,
6980
- useRef as useRef6,
6981
- useState as useState18
6982
- } from "react";
7061
+ import { useEffect as useEffect20, useRef as useRef6, useState as useState19 } from "react";
6983
7062
  import clsx33 from "clsx";
6984
7063
 
6985
7064
  // src/hooks/useOutsideClick.ts
6986
- import { useEffect as useEffect18 } from "react";
7065
+ import { useEffect as useEffect19 } from "react";
6987
7066
  var useOutsideClick = (refs, handler) => {
6988
- useEffect18(() => {
7067
+ useEffect19(() => {
6989
7068
  const listener = (event) => {
6990
7069
  if (event.target === null) return;
6991
7070
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -7079,7 +7158,7 @@ var MenuItem = ({
7079
7158
  }) => /* @__PURE__ */ jsx41(
7080
7159
  "div",
7081
7160
  {
7082
- className: clsx33("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
7161
+ className: clsx33("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
7083
7162
  "text-right": alignment === "right",
7084
7163
  "text-left": alignment === "left",
7085
7164
  "text-disabled-text cursor-not-allowed": isDisabled,
@@ -7112,7 +7191,7 @@ var Menu = ({
7112
7191
  const triggerRef = useRef6(null);
7113
7192
  const menuRef = useRef6(null);
7114
7193
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
7115
- const [isHidden, setIsHidden] = useState18(true);
7194
+ const [isHidden, setIsHidden] = useState19(true);
7116
7195
  const bag = {
7117
7196
  isOpen,
7118
7197
  close: () => setIsOpen(false),
@@ -7123,7 +7202,7 @@ var Menu = ({
7123
7202
  triggerRef.current?.getBoundingClientRect(),
7124
7203
  { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
7125
7204
  );
7126
- useEffect19(() => {
7205
+ useEffect20(() => {
7127
7206
  if (!isOpen) return;
7128
7207
  const triggerEl = triggerRef.current;
7129
7208
  if (!triggerEl) return;
@@ -7140,7 +7219,7 @@ var Menu = ({
7140
7219
  window.removeEventListener("resize", close);
7141
7220
  };
7142
7221
  }, [isOpen, setIsOpen]);
7143
- useEffect19(() => {
7222
+ useEffect20(() => {
7144
7223
  if (isOpen) {
7145
7224
  setIsHidden(false);
7146
7225
  }
@@ -7153,7 +7232,7 @@ var Menu = ({
7153
7232
  ref: menuRef,
7154
7233
  onClick: (e) => e.stopPropagation(),
7155
7234
  className: clsx33(
7156
- "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-[300]",
7235
+ "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
7157
7236
  {
7158
7237
  "animate-pop-in": isOpen,
7159
7238
  "animate-pop-out": !isOpen,
@@ -7255,7 +7334,7 @@ var Select = ({
7255
7334
  "btn-md justify-between w-full border-2",
7256
7335
  {
7257
7336
  "rounded-b-lg": !open,
7258
- "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7337
+ "bg-input-background text-input-text hover:border-primary": !disabled,
7259
7338
  "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7260
7339
  },
7261
7340
  triggerClassName
@@ -7310,8 +7389,8 @@ var SelectUncontrolled = ({
7310
7389
  hintText,
7311
7390
  ...props
7312
7391
  }) => {
7313
- const [selected, setSelected] = useState19(value);
7314
- useEffect20(() => {
7392
+ const [selected, setSelected] = useState20(value);
7393
+ useEffect21(() => {
7315
7394
  if (options.find((options2) => options2.value === value)) {
7316
7395
  setSelected(value);
7317
7396
  }
@@ -7383,13 +7462,15 @@ var LanguageModal = ({
7383
7462
  };
7384
7463
 
7385
7464
  // src/theming/useTheme.tsx
7386
- import { createContext as createContext2, useContext as useContext2, useEffect as useEffect21, useState as useState20 } from "react";
7465
+ import { useMemo as useMemo4 } from "react";
7466
+ import { createContext as createContext2, useContext as useContext2, useEffect as useEffect22, useState as useState21 } from "react";
7387
7467
  import { jsx as jsx45 } from "react/jsx-runtime";
7388
- var themes = ["light", "dark"];
7468
+ var themes = ["light", "dark", "system"];
7389
7469
  var defaultThemeTypeTranslation = {
7390
7470
  en: {
7391
7471
  dark: "Dark",
7392
7472
  light: "Light",
7473
+ system: "System",
7393
7474
  theme: {
7394
7475
  one: "Theme",
7395
7476
  other: "Themes"
@@ -7398,6 +7479,7 @@ var defaultThemeTypeTranslation = {
7398
7479
  de: {
7399
7480
  dark: "Dunkel",
7400
7481
  light: "Hell",
7482
+ system: "System",
7401
7483
  theme: {
7402
7484
  one: "Farbschema",
7403
7485
  other: "Farbschemas"
@@ -7412,28 +7494,24 @@ var ThemeContext = createContext2({
7412
7494
  theme: "light",
7413
7495
  setTheme: noop
7414
7496
  });
7415
- var ThemeProvider = ({ children, initialTheme = "light" }) => {
7416
- const [theme, setTheme] = useState20(initialTheme);
7497
+ var ThemeProvider = ({ children, initialTheme = "system" }) => {
7417
7498
  const [storedTheme, setStoredTheme] = useLocalStorage("theme", initialTheme);
7418
- useEffect21(() => {
7419
- if (theme !== initialTheme) {
7499
+ const [userTheme, setUserTheme] = useState21();
7500
+ useEffect22(() => {
7501
+ if (storedTheme !== initialTheme) {
7420
7502
  console.warn("ThemeProvider initial state changed: Prefer using useTheme's setTheme instead");
7421
- setTheme(initialTheme);
7503
+ setStoredTheme(initialTheme);
7422
7504
  }
7423
7505
  }, [initialTheme]);
7424
- useEffect21(() => {
7425
- document.documentElement.setAttribute("data-theme", theme);
7426
- setStoredTheme(theme);
7427
- }, [theme]);
7428
- useEffect21(() => {
7429
- if (storedTheme !== null) {
7430
- setTheme(storedTheme);
7431
- return;
7432
- }
7506
+ const usedTheme = useMemo4(() => storedTheme !== "system" ? storedTheme : userTheme, [storedTheme, userTheme]);
7507
+ useEffect22(() => {
7508
+ document.documentElement.setAttribute("data-theme", usedTheme);
7509
+ }, [usedTheme]);
7510
+ useEffect22(() => {
7433
7511
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
7434
- setTheme(prefersDark ? "dark" : "light");
7512
+ setUserTheme(prefersDark ? "dark" : "light");
7435
7513
  }, []);
7436
- return /* @__PURE__ */ jsx45(ThemeContext.Provider, { value: { theme, setTheme }, children });
7514
+ return /* @__PURE__ */ jsx45(ThemeContext.Provider, { value: { theme: storedTheme, setTheme: setStoredTheme }, children });
7437
7515
  };
7438
7516
  var useTheme = () => useContext2(ThemeContext);
7439
7517
 
@@ -7486,7 +7564,7 @@ var ThemeModal = ({
7486
7564
  import { Check as Check4 } from "lucide-react";
7487
7565
 
7488
7566
  // src/components/user-action/Checkbox.tsx
7489
- import { useState as useState21 } from "react";
7567
+ import { useState as useState22 } from "react";
7490
7568
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
7491
7569
  import { Check as Check3, Minus } from "lucide-react";
7492
7570
  import clsx36 from "clsx";
@@ -7537,7 +7615,7 @@ var Checkbox = ({
7537
7615
  className: clsx36(usedSizeClass, `items-center border-2 rounded outline-none `, {
7538
7616
  "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
7539
7617
  "focus:border-primary group-hover:border-primary ": !disabled,
7540
- "bg-surface": !disabled && !checked,
7618
+ "bg-input-background": !disabled && !checked,
7541
7619
  "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
7542
7620
  }, className),
7543
7621
  children: /* @__PURE__ */ jsxs32(CheckboxPrimitive.Indicator, { children: [
@@ -7555,7 +7633,7 @@ var CheckboxUncontrolled = ({
7555
7633
  defaultValue = false,
7556
7634
  ...props
7557
7635
  }) => {
7558
- const [checked, setChecked] = useState21(defaultValue);
7636
+ const [checked, setChecked] = useState22(defaultValue);
7559
7637
  const handleChange = (checked2) => {
7560
7638
  if (onChangeTristate) {
7561
7639
  onChangeTristate(checked2);
@@ -7616,7 +7694,7 @@ var PropertyBase = ({
7616
7694
  className: clsx37(
7617
7695
  "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
7618
7696
  {
7619
- "bg-surface group-hover:border-primary": !requiredAndNoValue,
7697
+ "bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
7620
7698
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
7621
7699
  },
7622
7700
  className
@@ -7720,7 +7798,7 @@ import clsx40 from "clsx";
7720
7798
 
7721
7799
  // src/components/user-action/MultiSelect.tsx
7722
7800
  import { useCallback as useCallback8 } from "react";
7723
- import { useEffect as useEffect22, useState as useState22 } from "react";
7801
+ import { useEffect as useEffect23, useState as useState23 } from "react";
7724
7802
  import clsx39 from "clsx";
7725
7803
  import { Plus } from "lucide-react";
7726
7804
  import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
@@ -7774,17 +7852,17 @@ var MultiSelect = ({
7774
7852
  {
7775
7853
  ref,
7776
7854
  className: clsx39(
7777
- "btn-md justify-between w-full border-2 h-auto",
7855
+ "group btn-md justify-between w-full border-2 h-auto",
7778
7856
  {
7779
7857
  "min-h-14": useChipDisplay,
7780
- "bg-menu-background text-menu-text border-menu-border hover:border-primary": !disabled,
7858
+ "bg-input-background text-input-text hover:border-primary": !disabled,
7781
7859
  "bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
7782
7860
  },
7783
7861
  triggerClassName
7784
7862
  ),
7785
7863
  onClick: toggleOpen,
7786
7864
  disabled,
7787
- children: useChipDisplay ? /* @__PURE__ */ jsx51(Fragment5, { children: isShowingHint ? /* @__PURE__ */ jsx51(IconButton, { disabled, size: "small", color: "neutral", children: /* @__PURE__ */ jsx51(Plus, {}) }) : /* @__PURE__ */ jsx51(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ jsxs34(Fragment5, { children: [
7865
+ children: useChipDisplay ? /* @__PURE__ */ jsx51(Fragment5, { children: isShowingHint ? /* @__PURE__ */ jsx51("div", { className: "icon-btn-sm bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90", children: /* @__PURE__ */ jsx51(Plus, {}) }) : /* @__PURE__ */ jsx51(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ jsxs34(Fragment5, { children: [
7788
7866
  !isShowingHint && /* @__PURE__ */ jsx51("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
7789
7867
  isShowingHint && /* @__PURE__ */ jsx51("span", { className: clsx39("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
7790
7868
  /* @__PURE__ */ jsx51(ExpansionIcon, { isExpanded: isOpen })
@@ -7877,8 +7955,8 @@ var MultiSelectUncontrolled = ({
7877
7955
  onChange,
7878
7956
  ...props
7879
7957
  }) => {
7880
- const [usedOptions, setUsedOptions] = useState22(options);
7881
- useEffect22(() => {
7958
+ const [usedOptions, setUsedOptions] = useState23(options);
7959
+ useEffect23(() => {
7882
7960
  setUsedOptions(options);
7883
7961
  }, [options]);
7884
7962
  return /* @__PURE__ */ jsx51(
@@ -8106,7 +8184,7 @@ import { Text } from "lucide-react";
8106
8184
  import clsx44 from "clsx";
8107
8185
 
8108
8186
  // src/components/user-action/Textarea.tsx
8109
- import { useEffect as useEffect23, useState as useState23 } from "react";
8187
+ import { useEffect as useEffect24, useState as useState24 } from "react";
8110
8188
  import clsx43 from "clsx";
8111
8189
  import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
8112
8190
  var Textarea = ({
@@ -8125,7 +8203,7 @@ var Textarea = ({
8125
8203
  className,
8126
8204
  ...props
8127
8205
  }) => {
8128
- const [hasFocus, setHasFocus] = useState23(false);
8206
+ const [hasFocus, setHasFocus] = useState24(false);
8129
8207
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
8130
8208
  const onEditCompletedWrapper = (text) => {
8131
8209
  onEditCompleted(text);
@@ -8145,11 +8223,11 @@ var Textarea = ({
8145
8223
  "div",
8146
8224
  {
8147
8225
  className: clsx43(
8148
- "bg-surface text-on-surface relative",
8226
+ "bg-input-background text-input-text relative",
8149
8227
  {
8150
- "shadow border-2 rounded-lg": defaultStyle,
8228
+ "border-2 rounded-lg": defaultStyle,
8151
8229
  "hover:border-primary focus-within:border-primary": defaultStyle && !disabled,
8152
- "border-disabled-border cursor-not-allowed": defaultStyle && !disabled
8230
+ "border-disabled-border cursor-not-allowed": defaultStyle && disabled
8153
8231
  }
8154
8232
  ),
8155
8233
  children: [
@@ -8195,8 +8273,8 @@ var TextareaUncontrolled = ({
8195
8273
  onChangeText = noop,
8196
8274
  ...props
8197
8275
  }) => {
8198
- const [text, setText] = useState23(value);
8199
- useEffect23(() => {
8276
+ const [text, setText] = useState24(value);
8277
+ useEffect24(() => {
8200
8278
  setText(value);
8201
8279
  }, [value]);
8202
8280
  return /* @__PURE__ */ jsx55(
@@ -8293,7 +8371,7 @@ var TableFilters = {
8293
8371
  };
8294
8372
 
8295
8373
  // src/components/table/Table.tsx
8296
- import { useCallback as useCallback9, useEffect as useEffect26, useMemo as useMemo3, useRef as useRef7, useState as useState25 } from "react";
8374
+ import { useCallback as useCallback9, useEffect as useEffect27, useMemo as useMemo5, useRef as useRef7, useState as useState26 } from "react";
8297
8375
  import clsx48 from "clsx";
8298
8376
  import {
8299
8377
  flexRender,
@@ -8307,7 +8385,7 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
8307
8385
 
8308
8386
  // src/components/table/TableFilterButton.tsx
8309
8387
  import { FilterIcon } from "lucide-react";
8310
- import { useEffect as useEffect24, useState as useState24 } from "react";
8388
+ import { useEffect as useEffect25, useState as useState25 } from "react";
8311
8389
  import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
8312
8390
  var defaultTableFilterTranslation = {
8313
8391
  en: {
@@ -8333,9 +8411,9 @@ var TableFilterButton = ({
8333
8411
  }) => {
8334
8412
  const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
8335
8413
  const columnFilterValue = column.getFilterValue();
8336
- const [filterValue, setFilterValue] = useState24(columnFilterValue);
8414
+ const [filterValue, setFilterValue] = useState25(columnFilterValue);
8337
8415
  const hasFilter = !!filterValue;
8338
- useEffect24(() => {
8416
+ useEffect25(() => {
8339
8417
  setFilterValue(columnFilterValue);
8340
8418
  }, [columnFilterValue]);
8341
8419
  return /* @__PURE__ */ jsx58(
@@ -8467,9 +8545,9 @@ var TableSortButton = ({
8467
8545
  };
8468
8546
 
8469
8547
  // src/hooks/useResizeCallbackWrapper.ts
8470
- import { useEffect as useEffect25 } from "react";
8548
+ import { useEffect as useEffect26 } from "react";
8471
8549
  var useResizeCallbackWrapper = (callback) => {
8472
- useEffect25(() => {
8550
+ useEffect26(() => {
8473
8551
  window.addEventListener("resize", callback);
8474
8552
  return () => {
8475
8553
  window.removeEventListener("resize", callback);
@@ -8503,20 +8581,20 @@ var Table = ({
8503
8581
  }) => {
8504
8582
  const ref = useRef7(null);
8505
8583
  const tableRef = useRef7(null);
8506
- const [columnSizing, setColumnSizing] = useState25(columns.reduce((previousValue, currentValue) => {
8584
+ const [columnSizing, setColumnSizing] = useState26(columns.reduce((previousValue, currentValue) => {
8507
8585
  return {
8508
8586
  ...previousValue,
8509
8587
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
8510
8588
  };
8511
8589
  }, {}));
8512
- const [columnSizingInfo, setColumnSizingInfo] = useState25();
8513
- const [pagination, setPagination] = useState25({
8590
+ const [columnSizingInfo, setColumnSizingInfo] = useState26();
8591
+ const [pagination, setPagination] = useState26({
8514
8592
  pageSize: 10,
8515
8593
  pageIndex: 0,
8516
8594
  ...initialState?.pagination
8517
8595
  });
8518
- const [columnFilters, setColumnFilters] = useState25(initialState?.columnFilters);
8519
- const computedColumnMinWidths = useMemo3(() => {
8596
+ const [columnFilters, setColumnFilters] = useState26(initialState?.columnFilters);
8597
+ const computedColumnMinWidths = useMemo5(() => {
8520
8598
  return columns.reduce((previousValue, column) => {
8521
8599
  return {
8522
8600
  ...previousValue,
@@ -8525,7 +8603,7 @@ var Table = ({
8525
8603
  };
8526
8604
  }, {});
8527
8605
  }, [columns, defaultColumn]);
8528
- const computedColumnMaxWidths = useMemo3(() => {
8606
+ const computedColumnMaxWidths = useMemo5(() => {
8529
8607
  return columns.reduce((previousValue, column) => {
8530
8608
  return {
8531
8609
  ...previousValue,
@@ -8533,12 +8611,12 @@ var Table = ({
8533
8611
  };
8534
8612
  }, {});
8535
8613
  }, [columns, defaultColumn]);
8536
- const tableMinWidth = useMemo3(() => {
8614
+ const tableMinWidth = useMemo5(() => {
8537
8615
  return columns.reduce((sum, column) => {
8538
8616
  return sum + computedColumnMinWidths[column.id];
8539
8617
  }, 0);
8540
8618
  }, [columns, computedColumnMinWidths]);
8541
- const updateColumnSizes = useMemo3(() => {
8619
+ const updateColumnSizes = useMemo5(() => {
8542
8620
  return (previous) => {
8543
8621
  const updateSizing = {
8544
8622
  ...columnSizing,
@@ -8655,8 +8733,8 @@ var Table = ({
8655
8733
  columnResizeMode: "onChange",
8656
8734
  ...tableOptions
8657
8735
  });
8658
- const [hasInitializedSizing, setHasInitializedSizing] = useState25(false);
8659
- useEffect26(() => {
8736
+ const [hasInitializedSizing, setHasInitializedSizing] = useState26(false);
8737
+ useEffect27(() => {
8660
8738
  if (!hasInitializedSizing && ref.current) {
8661
8739
  setHasInitializedSizing(true);
8662
8740
  table.setColumnSizing(updateColumnSizes(columnSizing));
@@ -8666,7 +8744,7 @@ var Table = ({
8666
8744
  table.setColumnSizing(updateColumnSizes);
8667
8745
  }, [updateColumnSizes]));
8668
8746
  const pageCount = table.getPageCount();
8669
- useEffect26(() => {
8747
+ useEffect27(() => {
8670
8748
  const totalPages = pageCount;
8671
8749
  if (totalPages === 0) {
8672
8750
  if (pagination.pageIndex !== 0) {
@@ -8682,7 +8760,7 @@ var Table = ({
8682
8760
  }));
8683
8761
  }
8684
8762
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
8685
- const columnSizeVars = useMemo3(() => {
8763
+ const columnSizeVars = useMemo5(() => {
8686
8764
  const headers = table.getFlatHeaders();
8687
8765
  const colSizes = {};
8688
8766
  for (let i = 0; i < headers.length; i++) {
@@ -8697,7 +8775,7 @@ var Table = ({
8697
8775
  Scrollbars3,
8698
8776
  {
8699
8777
  autoHeight: true,
8700
- autoHeightMax: tableRef.current?.offsetHeight + 2,
8778
+ autoHeightMax: tableRef.current?.offsetHeight ? tableRef.current?.offsetHeight + 2 : void 0,
8701
8779
  autoHide: true,
8702
8780
  children: /* @__PURE__ */ jsxs38(
8703
8781
  "table",
@@ -8797,8 +8875,8 @@ var Table = ({
8797
8875
  ] });
8798
8876
  };
8799
8877
  var TableUncontrolled = ({ data, ...props }) => {
8800
- const [usedDate, setUsedData] = useState25(data);
8801
- useEffect26(() => {
8878
+ const [usedDate, setUsedData] = useState26(data);
8879
+ useEffect27(() => {
8802
8880
  setUsedData(data);
8803
8881
  }, [data]);
8804
8882
  return /* @__PURE__ */ jsx61(
@@ -8820,7 +8898,7 @@ var TableWithSelection = ({
8820
8898
  meta,
8821
8899
  ...props
8822
8900
  }) => {
8823
- const columnsWithSelection = useMemo3(() => {
8901
+ const columnsWithSelection = useMemo5(() => {
8824
8902
  return [
8825
8903
  {
8826
8904
  id: selectionRowId,
@@ -8890,7 +8968,7 @@ var TableWithSelection = ({
8890
8968
  };
8891
8969
 
8892
8970
  // src/components/user-action/CopyToClipboardWrapper.tsx
8893
- import { useState as useState26 } from "react";
8971
+ import { useState as useState27 } from "react";
8894
8972
  import { clsx as clsx49 } from "clsx";
8895
8973
 
8896
8974
  // src/util/writeToClipboard.ts
@@ -8910,8 +8988,8 @@ var CopyToClipboardWrapper = ({
8910
8988
  zIndex = 10
8911
8989
  }) => {
8912
8990
  const translation = useTranslation([formTranslation]);
8913
- const [isShowingIndication, setIsShowingIndication] = useState26(false);
8914
- const [isShowingConfirmation, setIsShowingConfirmation] = useState26(false);
8991
+ const [isShowingIndication, setIsShowingIndication] = useState27(false);
8992
+ const [isShowingConfirmation, setIsShowingConfirmation] = useState27(false);
8915
8993
  const positionClasses = {
8916
8994
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
8917
8995
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -9053,7 +9131,7 @@ var DateTimePicker = ({
9053
9131
  };
9054
9132
 
9055
9133
  // src/components/user-action/ScrollPicker.tsx
9056
- import { useCallback as useCallback10, useEffect as useEffect27, useState as useState27 } from "react";
9134
+ import { useCallback as useCallback10, useEffect as useEffect28, useState as useState28 } from "react";
9057
9135
  import clsx51 from "clsx";
9058
9136
  import { jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
9059
9137
  var up = 1;
@@ -9074,7 +9152,7 @@ var ScrollPicker = ({
9074
9152
  transition,
9075
9153
  items,
9076
9154
  lastTimeStamp
9077
- }, setAnimation] = useState27({
9155
+ }, setAnimation] = useState28({
9078
9156
  targetIndex: selectedIndex,
9079
9157
  currentIndex: disabled ? selectedIndex : 0,
9080
9158
  velocity: 0,
@@ -9173,7 +9251,7 @@ var ScrollPicker = ({
9173
9251
  };
9174
9252
  });
9175
9253
  }, [disabled, getDirection, onChange]);
9176
- useEffect27(() => {
9254
+ useEffect28(() => {
9177
9255
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
9178
9256
  });
9179
9257
  const opacity = (transition2, index, itemsCount) => {
@@ -9250,7 +9328,7 @@ var ScrollPicker = ({
9250
9328
  };
9251
9329
 
9252
9330
  // src/components/user-action/ToggleableInput.tsx
9253
- import { useEffect as useEffect28, useRef as useRef8, useState as useState28 } from "react";
9331
+ import { useEffect as useEffect29, useRef as useRef8, useState as useState29 } from "react";
9254
9332
  import { Pencil } from "lucide-react";
9255
9333
  import clsx52 from "clsx";
9256
9334
  import { jsx as jsx65, jsxs as jsxs42 } from "react/jsx-runtime";
@@ -9268,14 +9346,14 @@ var ToggleableInput = ({
9268
9346
  saveDelayOptions,
9269
9347
  ...restProps
9270
9348
  }) => {
9271
- const [isEditing, setIsEditing] = useState28(initialState !== "display");
9349
+ const [isEditing, setIsEditing] = useState29(initialState !== "display");
9272
9350
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
9273
9351
  const ref = useRef8(null);
9274
9352
  const onEditCompletedWrapper = (text) => {
9275
9353
  onEditCompleted(text);
9276
9354
  clearTimer();
9277
9355
  };
9278
- useEffect28(() => {
9356
+ useEffect29(() => {
9279
9357
  if (isEditing) {
9280
9358
  ref.current?.focus();
9281
9359
  }
@@ -9340,8 +9418,8 @@ var ToggleableInputUncontrolled = ({
9340
9418
  onChangeText = noop,
9341
9419
  ...restProps
9342
9420
  }) => {
9343
- const [value, setValue] = useState28(initialValue);
9344
- useEffect28(() => {
9421
+ const [value, setValue] = useState29(initialValue);
9422
+ useEffect29(() => {
9345
9423
  setValue(initialValue);
9346
9424
  }, [initialValue]);
9347
9425
  return /* @__PURE__ */ jsx65(
@@ -9401,17 +9479,13 @@ var localizedNewsSchema = z.record(z.enum(LanguageUtil.languages), newsListSchem
9401
9479
  var filterNews = (localizedNews, requiredKeys) => {
9402
9480
  return localizedNews.filter((news) => requiredKeys.every((value) => news.keys.includes(value)));
9403
9481
  };
9404
-
9405
- // src/util/resolveSetState.ts
9406
- function resolveSetState(action, prev) {
9407
- return typeof action === "function" ? action(prev) : action;
9408
- }
9409
9482
  export {
9410
9483
  ASTNodeInterpreter,
9411
9484
  AnimatedRing,
9412
9485
  ArrayUtil,
9413
9486
  Avatar,
9414
9487
  AvatarGroup,
9488
+ AvatarUtil,
9415
9489
  BagFunctionUtil,
9416
9490
  BreadCrumb,
9417
9491
  ButtonColorUtil,
@@ -9422,6 +9496,7 @@ export {
9422
9496
  CheckboxUncontrolled,
9423
9497
  Chip,
9424
9498
  ChipList,
9499
+ ChipUtil,
9425
9500
  Circle,
9426
9501
  ConfirmDialog,
9427
9502
  ConfirmModal,
@@ -9522,8 +9597,6 @@ export {
9522
9597
  YearMonthPicker,
9523
9598
  YearMonthPickerUncontrolled,
9524
9599
  addDuration,
9525
- avatarSizeMapping,
9526
- avtarSizeList,
9527
9600
  builder,
9528
9601
  changeDuration,
9529
9602
  clamp,
@@ -9560,6 +9633,7 @@ export {
9560
9633
  useLanguage,
9561
9634
  useLocalStorage,
9562
9635
  useLocale,
9636
+ useLogOnce,
9563
9637
  useOutsideClick,
9564
9638
  usePopoverPosition,
9565
9639
  useRerender,