@helpwave/hightide 0.1.22 → 0.1.23

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 (102) hide show
  1. package/README.md +5 -0
  2. package/dist/components/branding/HelpwaveBadge.js +8 -5
  3. package/dist/components/branding/HelpwaveBadge.js.map +1 -1
  4. package/dist/components/branding/HelpwaveBadge.mjs +8 -5
  5. package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
  6. package/dist/components/icons-and-geometry/Avatar.js +2912 -33
  7. package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
  8. package/dist/components/icons-and-geometry/Avatar.mjs +2941 -33
  9. package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
  10. package/dist/components/icons-and-geometry/Tag.js +2912 -1
  11. package/dist/components/icons-and-geometry/Tag.js.map +1 -1
  12. package/dist/components/icons-and-geometry/Tag.mjs +2931 -1
  13. package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
  14. package/dist/components/layout-and-navigation/BreadCrumb.d.mts +2 -1
  15. package/dist/components/layout-and-navigation/BreadCrumb.d.ts +2 -1
  16. package/dist/components/layout-and-navigation/BreadCrumb.js +15 -11
  17. package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
  18. package/dist/components/layout-and-navigation/BreadCrumb.mjs +15 -11
  19. package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
  20. package/dist/components/layout-and-navigation/Chip.js +2 -2
  21. package/dist/components/layout-and-navigation/Chip.js.map +1 -1
  22. package/dist/components/layout-and-navigation/Chip.mjs +2 -2
  23. package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
  24. package/dist/components/layout-and-navigation/Tile.d.mts +9 -10
  25. package/dist/components/layout-and-navigation/Tile.d.ts +9 -10
  26. package/dist/components/layout-and-navigation/Tile.js +21 -4
  27. package/dist/components/layout-and-navigation/Tile.js.map +1 -1
  28. package/dist/components/layout-and-navigation/Tile.mjs +20 -4
  29. package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
  30. package/dist/components/loading-states/LoadingAndErrorComponent.js +1 -1
  31. package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
  32. package/dist/components/loading-states/LoadingAndErrorComponent.mjs +1 -1
  33. package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
  34. package/dist/components/modals/LanguageModal.js +21 -22
  35. package/dist/components/modals/LanguageModal.js.map +1 -1
  36. package/dist/components/modals/LanguageModal.mjs +21 -22
  37. package/dist/components/modals/LanguageModal.mjs.map +1 -1
  38. package/dist/components/modals/ThemeModal.js +21 -22
  39. package/dist/components/modals/ThemeModal.js.map +1 -1
  40. package/dist/components/modals/ThemeModal.mjs +21 -22
  41. package/dist/components/modals/ThemeModal.mjs.map +1 -1
  42. package/dist/components/properties/CheckboxProperty.js +1 -1
  43. package/dist/components/properties/CheckboxProperty.js.map +1 -1
  44. package/dist/components/properties/CheckboxProperty.mjs +1 -1
  45. package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
  46. package/dist/components/properties/DateProperty.js +1 -1
  47. package/dist/components/properties/DateProperty.js.map +1 -1
  48. package/dist/components/properties/DateProperty.mjs +1 -1
  49. package/dist/components/properties/DateProperty.mjs.map +1 -1
  50. package/dist/components/properties/MultiSelectProperty.d.mts +0 -1
  51. package/dist/components/properties/MultiSelectProperty.d.ts +0 -1
  52. package/dist/components/properties/MultiSelectProperty.js +745 -740
  53. package/dist/components/properties/MultiSelectProperty.js.map +1 -1
  54. package/dist/components/properties/MultiSelectProperty.mjs +752 -747
  55. package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
  56. package/dist/components/properties/NumberProperty.js +1 -1
  57. package/dist/components/properties/NumberProperty.js.map +1 -1
  58. package/dist/components/properties/NumberProperty.mjs +1 -1
  59. package/dist/components/properties/NumberProperty.mjs.map +1 -1
  60. package/dist/components/properties/PropertyBase.js +1 -1
  61. package/dist/components/properties/PropertyBase.js.map +1 -1
  62. package/dist/components/properties/PropertyBase.mjs +1 -1
  63. package/dist/components/properties/PropertyBase.mjs.map +1 -1
  64. package/dist/components/properties/SelectProperty.d.mts +0 -1
  65. package/dist/components/properties/SelectProperty.d.ts +0 -1
  66. package/dist/components/properties/SelectProperty.js +24 -25
  67. package/dist/components/properties/SelectProperty.js.map +1 -1
  68. package/dist/components/properties/SelectProperty.mjs +24 -25
  69. package/dist/components/properties/SelectProperty.mjs.map +1 -1
  70. package/dist/components/properties/TextProperty.js +1 -1
  71. package/dist/components/properties/TextProperty.js.map +1 -1
  72. package/dist/components/properties/TextProperty.mjs +1 -1
  73. package/dist/components/properties/TextProperty.mjs.map +1 -1
  74. package/dist/components/user-action/MultiSelect.d.mts +0 -1
  75. package/dist/components/user-action/MultiSelect.d.ts +0 -1
  76. package/dist/components/user-action/MultiSelect.js +617 -612
  77. package/dist/components/user-action/MultiSelect.js.map +1 -1
  78. package/dist/components/user-action/MultiSelect.mjs +635 -630
  79. package/dist/components/user-action/MultiSelect.mjs.map +1 -1
  80. package/dist/components/user-action/ScrollPicker.js +1 -1
  81. package/dist/components/user-action/ScrollPicker.js.map +1 -1
  82. package/dist/components/user-action/ScrollPicker.mjs +1 -1
  83. package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
  84. package/dist/components/user-action/Select.d.mts +1 -4
  85. package/dist/components/user-action/Select.d.ts +1 -4
  86. package/dist/components/user-action/Select.js +21 -24
  87. package/dist/components/user-action/Select.js.map +1 -1
  88. package/dist/components/user-action/Select.mjs +21 -23
  89. package/dist/components/user-action/Select.mjs.map +1 -1
  90. package/dist/css/globals.css +175 -179
  91. package/dist/css/uncompiled/globals.css +3 -3
  92. package/dist/css/uncompiled/textstyles.css +5 -5
  93. package/dist/css/uncompiled/theme/colors-basic.css +13 -5
  94. package/dist/css/uncompiled/theme/colors-component.css +56 -41
  95. package/dist/css/uncompiled/theme/colors-semantic.css +76 -83
  96. package/dist/index.d.mts +2 -2
  97. package/dist/index.d.ts +2 -2
  98. package/dist/index.js +3158 -371
  99. package/dist/index.js.map +1 -1
  100. package/dist/index.mjs +3030 -243
  101. package/dist/index.mjs.map +1 -1
  102. package/package.json +1 -1
@@ -33,7 +33,7 @@ __export(MultiSelectProperty_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(MultiSelectProperty_exports);
35
35
  var import_lucide_react7 = require("lucide-react");
36
- var import_clsx13 = __toESM(require("clsx"));
36
+ var import_clsx12 = __toESM(require("clsx"));
37
37
 
38
38
  // src/localization/LanguageProvider.tsx
39
39
  var import_react2 = require("react");
@@ -123,9 +123,9 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
123
123
  };
124
124
 
125
125
  // src/components/user-action/MultiSelect.tsx
126
- var import_react16 = require("react");
127
- var import_react17 = require("react");
128
- var import_clsx11 = __toESM(require("clsx"));
126
+ var import_react14 = require("react");
127
+ var import_react15 = require("react");
128
+ var import_clsx10 = __toESM(require("clsx"));
129
129
 
130
130
  // src/components/user-action/Label.tsx
131
131
  var import_clsx = __toESM(require("clsx"));
@@ -145,158 +145,394 @@ var Label = ({
145
145
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
146
146
  };
147
147
 
148
- // src/components/user-action/Select.tsx
149
- var import_react13 = require("react");
150
- var import_react14 = require("react");
151
- var import_clsx8 = __toESM(require("clsx"));
152
-
153
- // src/components/layout-and-navigation/Tile.tsx
148
+ // src/components/user-action/Button.tsx
149
+ var import_react3 = require("react");
154
150
  var import_clsx2 = __toESM(require("clsx"));
155
- var import_lucide_react = require("lucide-react");
156
151
  var import_jsx_runtime3 = require("react/jsx-runtime");
157
- var Tile = ({
158
- title,
159
- description,
160
- onClick,
161
- isSelected = false,
152
+ var ButtonColorUtil = {
153
+ solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
154
+ text: ["primary", "negative", "neutral"],
155
+ outline: ["primary"]
156
+ };
157
+ var IconButtonUtil = {
158
+ icon: [...ButtonColorUtil.solid, "transparent"]
159
+ };
160
+ var paddingMapping = {
161
+ small: "btn-sm",
162
+ medium: "btn-md",
163
+ large: "btn-lg"
164
+ };
165
+ var iconPaddingMapping = {
166
+ tiny: "icon-btn-xs",
167
+ small: "icon-btn-sm",
168
+ medium: "icon-btn-md",
169
+ large: "icon-btn-lg"
170
+ };
171
+ var ButtonUtil = {
172
+ paddingMapping,
173
+ iconPaddingMapping
174
+ };
175
+ var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
176
+ children,
162
177
  disabled = false,
163
- prefix,
164
- suffix,
165
- normalClassName = "hover:bg-primary/40 cursor-pointer",
166
- selectedClassName = " bg-primary/20",
167
- disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
168
- className
169
- }) => {
178
+ color = "primary",
179
+ size = "medium",
180
+ startIcon,
181
+ endIcon,
182
+ onClick,
183
+ className,
184
+ ...restProps
185
+ }, ref) {
186
+ const colorClasses = {
187
+ primary: "bg-button-solid-primary-background text-button-solid-primary-text",
188
+ secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
189
+ tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
190
+ positive: "bg-button-solid-positive-background text-button-solid-positive-text",
191
+ warning: "bg-button-solid-warning-background text-button-solid-warning-text",
192
+ negative: "bg-button-solid-negative-background text-button-solid-negative-text",
193
+ neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
194
+ }[color];
195
+ const iconColorClasses = {
196
+ primary: "text-button-solid-primary-icon",
197
+ secondary: "text-button-solid-secondary-icon",
198
+ tertiary: "text-button-solid-tertiary-icon",
199
+ positive: "text-button-solid-positive-icon",
200
+ warning: "text-button-solid-warning-icon",
201
+ negative: "text-button-solid-negative-icon",
202
+ neutral: "text-button-solid-neutral-icon"
203
+ }[color];
170
204
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
171
- "div",
205
+ "button",
172
206
  {
207
+ ref,
208
+ onClick,
209
+ disabled,
173
210
  className: (0, import_clsx2.default)(
174
- "flex-row-2 w-full items-center",
211
+ "font-semibold",
175
212
  {
176
- [normalClassName]: !!onClick && !disabled,
177
- [selectedClassName]: isSelected && !disabled,
178
- [disabledClassName]: disabled
213
+ "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
214
+ [(0, import_clsx2.default)(colorClasses, "hover:brightness-90")]: !disabled
179
215
  },
216
+ ButtonUtil.paddingMapping[size],
180
217
  className
181
218
  ),
182
- onClick: disabled ? void 0 : onClick,
219
+ ...restProps,
183
220
  children: [
184
- prefix,
185
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-col-0 w-full", children: [
186
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h4", { className: (0, import_clsx2.default)(title.className ?? "textstyle-title-normal"), children: title.value }),
187
- !!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(description.className ?? "textstyle-description"), children: description.value })
188
- ] }),
189
- suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
221
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
222
+ "span",
223
+ {
224
+ className: (0, import_clsx2.default)({
225
+ [iconColorClasses]: !disabled,
226
+ [`text-disabled-icon`]: disabled
227
+ }),
228
+ children: startIcon
229
+ }
230
+ ),
231
+ children,
232
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
233
+ "span",
234
+ {
235
+ className: (0, import_clsx2.default)({
236
+ [iconColorClasses]: !disabled,
237
+ [`text-disabled-icon`]: disabled
238
+ }),
239
+ children: endIcon
240
+ }
241
+ )
190
242
  ]
191
243
  }
192
244
  );
193
- };
194
-
195
- // src/components/layout-and-navigation/Expandable.tsx
196
- var import_react3 = require("react");
197
- var import_lucide_react2 = require("lucide-react");
198
- var import_clsx3 = __toESM(require("clsx"));
199
-
200
- // src/util/noop.ts
201
- var noop = () => void 0;
202
-
203
- // src/components/layout-and-navigation/Expandable.tsx
204
- var import_jsx_runtime4 = require("react/jsx-runtime");
205
- var ExpansionIcon = ({ isExpanded, className }) => {
206
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
207
- import_lucide_react2.ChevronDown,
208
- {
209
- className: (0, import_clsx3.default)(
210
- "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
211
- { "rotate-180": isExpanded },
212
- className
213
- )
214
- }
215
- );
216
- };
217
- var Expandable = (0, import_react3.forwardRef)(function Expandable2({
245
+ });
246
+ var TextButton = ({
218
247
  children,
219
- label,
220
- icon,
221
- isExpanded = false,
222
- onChange = noop,
223
- clickOnlyOnHeader = true,
224
248
  disabled = false,
249
+ color = "neutral",
250
+ size = "medium",
251
+ startIcon,
252
+ endIcon,
253
+ onClick,
254
+ coloredHoverBackground = true,
225
255
  className,
226
- headerClassName,
227
- contentClassName,
228
- contentExpandedClassName
229
- }, ref) {
230
- const defaultIcon = (0, import_react3.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
231
- icon ??= defaultIcon;
232
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
233
- "div",
256
+ ...restProps
257
+ }) => {
258
+ const colorClasses = {
259
+ primary: "bg-transparent text-button-text-primary-text",
260
+ negative: "bg-transparent text-button-text-negative-text",
261
+ neutral: "bg-transparent text-button-text-neutral-text"
262
+ }[color];
263
+ const backgroundColor = {
264
+ primary: "hover:bg-button-text-primary-text/20",
265
+ negative: "hover:bg-button-text-negative-text/20",
266
+ neutral: "hover:bg-button-text-neutral-text/20"
267
+ }[color];
268
+ const iconColorClasses = {
269
+ primary: "text-button-text-primary-icon",
270
+ negative: "text-button-text-negative-icon",
271
+ neutral: "text-button-text-neutral-icon"
272
+ }[color];
273
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
274
+ "button",
234
275
  {
235
- ref,
236
- className: (0, import_clsx3.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
237
- onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
276
+ onClick,
277
+ disabled,
278
+ className: (0, import_clsx2.default)(
279
+ "font-semibold",
280
+ {
281
+ "text-disabled-text cursor-not-allowed": disabled,
282
+ [colorClasses]: !disabled,
283
+ [backgroundColor]: !disabled && coloredHoverBackground,
284
+ "hover:bg-button-text-hover-background": !disabled && !coloredHoverBackground
285
+ },
286
+ ButtonUtil.paddingMapping[size],
287
+ className
288
+ ),
289
+ ...restProps,
238
290
  children: [
239
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
240
- "div",
291
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
292
+ "span",
241
293
  {
242
- className: (0, import_clsx3.default)(
243
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
244
- {
245
- "group-hover:brightness-97": !isExpanded,
246
- "hover:brightness-97": isExpanded && !disabled,
247
- "cursor-pointer": clickOnlyOnHeader && !disabled
248
- },
249
- headerClassName
250
- ),
251
- onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
252
- children: [
253
- label,
254
- icon(isExpanded)
255
- ]
294
+ className: (0, import_clsx2.default)({
295
+ [iconColorClasses]: !disabled,
296
+ [`text-disabled-icon`]: disabled
297
+ }),
298
+ children: startIcon
256
299
  }
257
300
  ),
258
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
259
- "div",
301
+ children,
302
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
303
+ "span",
260
304
  {
261
- className: (0, import_clsx3.default)(
262
- "flex-col-2 px-4 transition-all duration-300 ease-in-out",
263
- {
264
- [(0, import_clsx3.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
265
- "max-h-0 opacity-0 overflow-hidden": !isExpanded
266
- },
267
- contentClassName
268
- ),
269
- children
305
+ className: (0, import_clsx2.default)({
306
+ [iconColorClasses]: !disabled,
307
+ [`text-disabled-icon`]: disabled
308
+ }),
309
+ children: endIcon
270
310
  }
271
311
  )
272
312
  ]
273
313
  }
274
314
  );
275
- });
276
- var ExpandableUncontrolled = (0, import_react3.forwardRef)(function ExpandableUncontrolled2({
277
- isExpanded,
278
- onChange = noop,
279
- ...props
280
- }, ref) {
281
- const [usedIsExpanded, setUsedIsExpanded] = (0, import_react3.useState)(isExpanded);
282
- (0, import_react3.useEffect)(() => {
283
- setUsedIsExpanded(isExpanded);
284
- }, [isExpanded]);
285
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
286
- Expandable,
315
+ };
316
+ var IconButton = ({
317
+ children,
318
+ disabled = false,
319
+ color = "primary",
320
+ size = "medium",
321
+ className,
322
+ ...restProps
323
+ }) => {
324
+ const colorClasses = {
325
+ primary: "bg-button-solid-primary-background text-button-solid-primary-text",
326
+ secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
327
+ tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
328
+ positive: "bg-button-solid-positive-background text-button-solid-positive-text",
329
+ warning: "bg-button-solid-warning-background text-button-solid-warning-text",
330
+ negative: "bg-button-solid-negative-background text-button-solid-negative-text",
331
+ neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
332
+ transparent: "bg-transparent"
333
+ }[color];
334
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
335
+ "button",
287
336
  {
288
- ...props,
289
- ref,
290
- isExpanded: usedIsExpanded,
291
- onChange: (value) => {
292
- onChange(value);
293
- setUsedIsExpanded(value);
294
- }
295
- }
296
- );
297
- });
298
-
299
- // src/components/user-action/Menu.tsx
337
+ disabled,
338
+ className: (0, import_clsx2.default)(
339
+ {
340
+ "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
341
+ "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
342
+ "hover:bg-button-text-hover-background": !disabled && color === "transparent",
343
+ [(0, import_clsx2.default)(colorClasses, "hover:brightness-90")]: !disabled
344
+ },
345
+ ButtonUtil.iconPaddingMapping[size],
346
+ className
347
+ ),
348
+ ...restProps,
349
+ children
350
+ }
351
+ );
352
+ };
353
+
354
+ // src/components/layout-and-navigation/Chip.tsx
355
+ var import_clsx3 = __toESM(require("clsx"));
356
+ var import_jsx_runtime4 = require("react/jsx-runtime");
357
+ var Chip = ({
358
+ children,
359
+ trailingIcon,
360
+ color = "default",
361
+ variant = "normal",
362
+ className = "",
363
+ ...restProps
364
+ }) => {
365
+ const colorMapping = {
366
+ default: "text-tag-default-text bg-tag-default-background",
367
+ dark: "text-tag-dark-text bg-tag-dark-background",
368
+ red: "text-tag-red-text bg-tag-red-background",
369
+ yellow: "text-tag-yellow-text bg-tag-yellow-background",
370
+ green: "text-tag-green-text bg-tag-green-background",
371
+ blue: "text-tag-blue-text bg-tag-blue-background",
372
+ pink: "text-tag-pink-text bg-tag-pink-background"
373
+ }[color];
374
+ const colorMappingIcon = {
375
+ default: "text-tag-default-icon",
376
+ dark: "text-tag-dark-icon",
377
+ red: "text-tag-red-icon",
378
+ yellow: "text-tag-yellow-icon",
379
+ green: "text-tag-green-icon",
380
+ blue: "text-tag-blue-icon",
381
+ pink: "text-tag-pink-icon"
382
+ }[color];
383
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
384
+ "div",
385
+ {
386
+ ...restProps,
387
+ className: (0, import_clsx3.default)(
388
+ `row w-fit px-2 py-1 font-semibold`,
389
+ colorMapping,
390
+ {
391
+ "rounded-md": variant === "normal",
392
+ "rounded-full": variant === "fullyRounded"
393
+ },
394
+ className
395
+ ),
396
+ children: [
397
+ children,
398
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
399
+ ]
400
+ }
401
+ );
402
+ };
403
+ var ChipList = ({
404
+ list,
405
+ className = ""
406
+ }) => {
407
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_clsx3.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
408
+ Chip,
409
+ {
410
+ ...value,
411
+ color: value.color ?? "default",
412
+ variant: value.variant ?? "normal",
413
+ children: value.children
414
+ },
415
+ index
416
+ )) });
417
+ };
418
+
419
+ // src/localization/defaults/form.ts
420
+ var formTranslation = {
421
+ en: {
422
+ add: "Add",
423
+ all: "All",
424
+ apply: "Apply",
425
+ back: "Back",
426
+ cancel: "Cancel",
427
+ change: "Change",
428
+ clear: "Clear",
429
+ click: "Click",
430
+ clickToCopy: "Click to Copy",
431
+ close: "Close",
432
+ confirm: "Confirm",
433
+ copy: "Copy",
434
+ copied: "Copied",
435
+ create: "Create",
436
+ decline: "Decline",
437
+ delete: "Delete",
438
+ discard: "Discard",
439
+ discardChanges: "Discard Changes",
440
+ done: "Done",
441
+ edit: "Edit",
442
+ enterText: "Enter text here",
443
+ error: "Error",
444
+ exit: "Exit",
445
+ fieldRequiredError: "This field is required.",
446
+ invalidEmailError: "Please enter a valid email address.",
447
+ less: "Less",
448
+ loading: "Loading",
449
+ maxLengthError: "Maximum length exceeded.",
450
+ minLengthError: "Minimum length not met.",
451
+ more: "More",
452
+ next: "Next",
453
+ no: "No",
454
+ none: "None",
455
+ of: "of",
456
+ optional: "Optional",
457
+ pleaseWait: "Please wait...",
458
+ previous: "Previous",
459
+ remove: "Remove",
460
+ required: "Required",
461
+ reset: "Reset",
462
+ save: "Save",
463
+ saved: "Saved",
464
+ search: "Search",
465
+ select: "Select",
466
+ selectOption: "Select an option",
467
+ show: "Show",
468
+ showMore: "Show more",
469
+ showLess: "Show less",
470
+ submit: "Submit",
471
+ success: "Success",
472
+ update: "Update",
473
+ unsavedChanges: "Unsaved Changes",
474
+ unsavedChangesSaveQuestion: "Do you want to save your changes?",
475
+ yes: "Yes"
476
+ },
477
+ de: {
478
+ add: "Hinzuf\xFCgen",
479
+ all: "Alle",
480
+ apply: "Anwenden",
481
+ back: "Zur\xFCck",
482
+ cancel: "Abbrechen",
483
+ change: "\xC4ndern",
484
+ clear: "L\xF6schen",
485
+ click: "Klicken",
486
+ clickToCopy: "Zum kopieren klicken",
487
+ close: "Schlie\xDFen",
488
+ confirm: "Best\xE4tigen",
489
+ copy: "Kopieren",
490
+ copied: "Kopiert",
491
+ create: "Erstellen",
492
+ decline: "Ablehnen",
493
+ delete: "L\xF6schen",
494
+ discard: "Verwerfen",
495
+ discardChanges: "\xC4nderungen Verwerfen",
496
+ done: "Fertig",
497
+ edit: "Bearbeiten",
498
+ enterText: "Text hier eingeben",
499
+ error: "Fehler",
500
+ exit: "Beenden",
501
+ fieldRequiredError: "Dieses Feld ist erforderlich.",
502
+ invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
503
+ less: "Weniger",
504
+ loading: "L\xE4dt",
505
+ maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
506
+ minLengthError: "Mindestl\xE4nge nicht erreicht.",
507
+ more: "Mehr",
508
+ next: "Weiter",
509
+ no: "Nein",
510
+ none: "Nichts",
511
+ of: "von",
512
+ optional: "Optional",
513
+ pleaseWait: "Bitte warten...",
514
+ previous: "Vorherige",
515
+ remove: "Entfernen",
516
+ required: "Erforderlich",
517
+ reset: "Zur\xFCcksetzen",
518
+ save: "Speichern",
519
+ saved: "Gespeichert",
520
+ search: "Suche",
521
+ select: "Select",
522
+ selectOption: "Option ausw\xE4hlen",
523
+ show: "Anzeigen",
524
+ showMore: "Mehr anzeigen",
525
+ showLess: "Weniger anzeigen",
526
+ submit: "Abschicken",
527
+ success: "Erfolg",
528
+ update: "Update",
529
+ unsavedChanges: "Ungespeicherte \xC4nderungen",
530
+ unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
531
+ yes: "Ja"
532
+ }
533
+ };
534
+
535
+ // src/components/user-action/Menu.tsx
300
536
  var import_react6 = require("react");
301
537
  var import_clsx4 = __toESM(require("clsx"));
302
538
 
@@ -517,63 +753,167 @@ var Menu = ({
517
753
  ] });
518
754
  };
519
755
 
520
- // src/components/user-action/Input.tsx
521
- var import_react10 = require("react");
756
+ // src/components/layout-and-navigation/Expandable.tsx
757
+ var import_react7 = require("react");
758
+ var import_lucide_react = require("lucide-react");
522
759
  var import_clsx5 = __toESM(require("clsx"));
523
760
 
524
- // src/hooks/useDelay.ts
525
- var import_react7 = require("react");
526
- var defaultOptions = {
527
- delay: 3e3,
528
- disabled: false
529
- };
530
- function useDelay(options) {
531
- const [timer, setTimer] = (0, import_react7.useState)(void 0);
532
- const { delay, disabled } = {
533
- ...defaultOptions,
534
- ...options
535
- };
536
- const clearTimer = () => {
537
- clearTimeout(timer);
538
- setTimer(void 0);
539
- };
540
- const restartTimer = (onDelayFinish) => {
541
- if (disabled) {
542
- return;
543
- }
544
- clearTimeout(timer);
545
- setTimer(setTimeout(() => {
546
- onDelayFinish();
547
- setTimer(void 0);
548
- }, delay));
549
- };
550
- (0, import_react7.useEffect)(() => {
551
- return () => {
552
- clearTimeout(timer);
553
- };
554
- }, [timer]);
555
- (0, import_react7.useEffect)(() => {
556
- if (disabled) {
557
- clearTimeout(timer);
558
- setTimer(void 0);
559
- }
560
- }, [disabled, timer]);
561
- return { restartTimer, clearTimer, hasActiveTimer: !!timer };
562
- }
761
+ // src/util/noop.ts
762
+ var noop = () => void 0;
563
763
 
564
- // src/hooks/useFocusManagement.ts
565
- var import_react8 = require("react");
566
- function useFocusManagement() {
567
- const getFocusableElements = (0, import_react8.useCallback)(() => {
568
- return Array.from(
569
- document.querySelectorAll(
570
- 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
764
+ // src/components/layout-and-navigation/Expandable.tsx
765
+ var import_jsx_runtime6 = require("react/jsx-runtime");
766
+ var ExpansionIcon = ({ isExpanded, className }) => {
767
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
768
+ import_lucide_react.ChevronDown,
769
+ {
770
+ className: (0, import_clsx5.default)(
771
+ "min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
772
+ { "rotate-180": isExpanded },
773
+ className
571
774
  )
572
- ).filter(
573
- (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
574
- );
575
- }, []);
576
- const getNextFocusElement = (0, import_react8.useCallback)(() => {
775
+ }
776
+ );
777
+ };
778
+ var Expandable = (0, import_react7.forwardRef)(function Expandable2({
779
+ children,
780
+ label,
781
+ icon,
782
+ isExpanded = false,
783
+ onChange = noop,
784
+ clickOnlyOnHeader = true,
785
+ disabled = false,
786
+ className,
787
+ headerClassName,
788
+ contentClassName,
789
+ contentExpandedClassName
790
+ }, ref) {
791
+ const defaultIcon = (0, import_react7.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
792
+ icon ??= defaultIcon;
793
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
794
+ "div",
795
+ {
796
+ ref,
797
+ className: (0, import_clsx5.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
798
+ onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
799
+ children: [
800
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
801
+ "div",
802
+ {
803
+ className: (0, import_clsx5.default)(
804
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
805
+ {
806
+ "group-hover:brightness-97": !isExpanded,
807
+ "hover:brightness-97": isExpanded && !disabled,
808
+ "cursor-pointer": clickOnlyOnHeader && !disabled
809
+ },
810
+ headerClassName
811
+ ),
812
+ onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
813
+ children: [
814
+ label,
815
+ icon(isExpanded)
816
+ ]
817
+ }
818
+ ),
819
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
820
+ "div",
821
+ {
822
+ className: (0, import_clsx5.default)(
823
+ "flex-col-2 px-4 transition-all duration-300 ease-in-out",
824
+ {
825
+ [(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
826
+ "max-h-0 opacity-0 overflow-hidden": !isExpanded
827
+ },
828
+ contentClassName
829
+ ),
830
+ children
831
+ }
832
+ )
833
+ ]
834
+ }
835
+ );
836
+ });
837
+ var ExpandableUncontrolled = (0, import_react7.forwardRef)(function ExpandableUncontrolled2({
838
+ isExpanded,
839
+ onChange = noop,
840
+ ...props
841
+ }, ref) {
842
+ const [usedIsExpanded, setUsedIsExpanded] = (0, import_react7.useState)(isExpanded);
843
+ (0, import_react7.useEffect)(() => {
844
+ setUsedIsExpanded(isExpanded);
845
+ }, [isExpanded]);
846
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
847
+ Expandable,
848
+ {
849
+ ...props,
850
+ ref,
851
+ isExpanded: usedIsExpanded,
852
+ onChange: (value) => {
853
+ onChange(value);
854
+ setUsedIsExpanded(value);
855
+ }
856
+ }
857
+ );
858
+ });
859
+
860
+ // src/components/user-action/Input.tsx
861
+ var import_react11 = require("react");
862
+ var import_clsx6 = __toESM(require("clsx"));
863
+
864
+ // src/hooks/useDelay.ts
865
+ var import_react8 = require("react");
866
+ var defaultOptions = {
867
+ delay: 3e3,
868
+ disabled: false
869
+ };
870
+ function useDelay(options) {
871
+ const [timer, setTimer] = (0, import_react8.useState)(void 0);
872
+ const { delay, disabled } = {
873
+ ...defaultOptions,
874
+ ...options
875
+ };
876
+ const clearTimer = () => {
877
+ clearTimeout(timer);
878
+ setTimer(void 0);
879
+ };
880
+ const restartTimer = (onDelayFinish) => {
881
+ if (disabled) {
882
+ return;
883
+ }
884
+ clearTimeout(timer);
885
+ setTimer(setTimeout(() => {
886
+ onDelayFinish();
887
+ setTimer(void 0);
888
+ }, delay));
889
+ };
890
+ (0, import_react8.useEffect)(() => {
891
+ return () => {
892
+ clearTimeout(timer);
893
+ };
894
+ }, [timer]);
895
+ (0, import_react8.useEffect)(() => {
896
+ if (disabled) {
897
+ clearTimeout(timer);
898
+ setTimer(void 0);
899
+ }
900
+ }, [disabled, timer]);
901
+ return { restartTimer, clearTimer, hasActiveTimer: !!timer };
902
+ }
903
+
904
+ // src/hooks/useFocusManagement.ts
905
+ var import_react9 = require("react");
906
+ function useFocusManagement() {
907
+ const getFocusableElements = (0, import_react9.useCallback)(() => {
908
+ return Array.from(
909
+ document.querySelectorAll(
910
+ 'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
911
+ )
912
+ ).filter(
913
+ (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
914
+ );
915
+ }, []);
916
+ const getNextFocusElement = (0, import_react9.useCallback)(() => {
577
917
  const elements = getFocusableElements();
578
918
  if (elements.length === 0) {
579
919
  return void 0;
@@ -585,11 +925,11 @@ function useFocusManagement() {
585
925
  }
586
926
  return nextElement;
587
927
  }, [getFocusableElements]);
588
- const focusNext = (0, import_react8.useCallback)(() => {
928
+ const focusNext = (0, import_react9.useCallback)(() => {
589
929
  const nextElement = getNextFocusElement();
590
930
  nextElement?.focus();
591
931
  }, [getNextFocusElement]);
592
- const getPreviousFocusElement = (0, import_react8.useCallback)(() => {
932
+ const getPreviousFocusElement = (0, import_react9.useCallback)(() => {
593
933
  const elements = getFocusableElements();
594
934
  if (elements.length === 0) {
595
935
  return void 0;
@@ -605,7 +945,7 @@ function useFocusManagement() {
605
945
  }
606
946
  return previousElement;
607
947
  }, [getFocusableElements]);
608
- const focusPrevious = (0, import_react8.useCallback)(() => {
948
+ const focusPrevious = (0, import_react9.useCallback)(() => {
609
949
  const previousElement = getPreviousFocusElement();
610
950
  if (previousElement) previousElement.focus();
611
951
  }, [getPreviousFocusElement]);
@@ -619,10 +959,10 @@ function useFocusManagement() {
619
959
  }
620
960
 
621
961
  // src/hooks/useFocusOnceVisible.ts
622
- var import_react9 = __toESM(require("react"));
962
+ var import_react10 = __toESM(require("react"));
623
963
  var useFocusOnceVisible = (ref, disable = false) => {
624
- const [hasUsedFocus, setHasUsedFocus] = import_react9.default.useState(false);
625
- (0, import_react9.useEffect)(() => {
964
+ const [hasUsedFocus, setHasUsedFocus] = import_react10.default.useState(false);
965
+ (0, import_react10.useEffect)(() => {
626
966
  if (disable || hasUsedFocus) {
627
967
  return;
628
968
  }
@@ -642,9 +982,9 @@ var useFocusOnceVisible = (ref, disable = false) => {
642
982
  };
643
983
 
644
984
  // src/components/user-action/Input.tsx
645
- var import_jsx_runtime6 = require("react/jsx-runtime");
985
+ var import_jsx_runtime7 = require("react/jsx-runtime");
646
986
  var getInputClassName = ({ disabled = false, hasError = false }) => {
647
- return (0, import_clsx5.default)(
987
+ return (0, import_clsx6.default)(
648
988
  "px-2 py-1.5 rounded-md border-2",
649
989
  {
650
990
  "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
@@ -658,7 +998,7 @@ var defaultEditCompleteOptions = {
658
998
  afterDelay: true,
659
999
  delay: 2500
660
1000
  };
661
- var Input = (0, import_react10.forwardRef)(function Input2({
1001
+ var Input = (0, import_react11.forwardRef)(function Input2({
662
1002
  id,
663
1003
  type = "text",
664
1004
  value,
@@ -672,426 +1012,104 @@ var Input = (0, import_react10.forwardRef)(function Input2({
672
1012
  autoFocus = false,
673
1013
  onBlur,
674
1014
  editCompleteOptions,
675
- containerClassName,
676
- disabled,
677
- ...restProps
678
- }, forwardedRef) {
679
- const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
680
- const {
681
- restartTimer,
682
- clearTimer
683
- } = useDelay({ delay, disabled: !afterDelay });
684
- const innerRef = (0, import_react10.useRef)(null);
685
- const { focusNext } = useFocusManagement();
686
- useFocusOnceVisible(innerRef, !autoFocus);
687
- (0, import_react10.useImperativeHandle)(forwardedRef, () => innerRef.current);
688
- const handleKeyDown = (e) => {
689
- if (e.key === "Enter" && !e.shiftKey) {
690
- e.preventDefault();
691
- innerRef.current?.blur();
692
- focusNext();
693
- }
694
- };
695
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)({ "w-full": expanded }, containerClassName), children: [
696
- label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx5.default)("mb-1", label.className) }),
697
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
698
- "input",
699
- {
700
- ...restProps,
701
- ref: innerRef,
702
- value,
703
- id,
704
- type,
705
- disabled,
706
- className: (0, import_clsx5.default)(getInputClassName({ disabled }), className),
707
- onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
708
- onBlur: (event) => {
709
- onBlur?.(event);
710
- if (onEditCompleted && allowEditCompleteOnBlur) {
711
- onEditCompleted(event.target.value);
712
- clearTimer();
713
- }
714
- },
715
- onChange: (e) => {
716
- const value2 = e.target.value;
717
- if (onEditCompleted) {
718
- restartTimer(() => {
719
- if (innerRef.current) {
720
- innerRef.current.blur();
721
- if (!allowEditCompleteOnBlur) {
722
- onEditCompleted(value2);
723
- }
724
- } else {
725
- onEditCompleted(value2);
726
- }
727
- });
728
- }
729
- onChange(e);
730
- onChangeText(value2);
731
- }
732
- }
733
- )
734
- ] });
735
- });
736
- var FormInput = (0, import_react10.forwardRef)(function FormInput2({
737
- id,
738
- labelText,
739
- errorText,
740
- className,
741
- labelClassName,
742
- errorClassName,
743
- containerClassName,
744
- required,
745
- disabled,
746
- ...restProps
747
- }, ref) {
748
- const input = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
749
- "input",
750
- {
751
- ...restProps,
752
- ref,
753
- id,
754
- disabled,
755
- className: (0, import_clsx5.default)(
756
- getInputClassName({ disabled, hasError: !!errorText }),
757
- className
758
- )
759
- }
760
- );
761
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)("flex flex-col gap-y-1", containerClassName), children: [
762
- labelText && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: id, className: (0, import_clsx5.default)("textstyle-label-md", labelClassName), children: [
763
- labelText,
764
- required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-primary font-bold", children: "*" })
765
- ] }),
766
- input,
767
- errorText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: id, className: (0, import_clsx5.default)("text-negative", errorClassName), children: errorText })
768
- ] });
769
- });
770
-
771
- // src/localization/defaults/form.ts
772
- var formTranslation = {
773
- en: {
774
- add: "Add",
775
- all: "All",
776
- apply: "Apply",
777
- back: "Back",
778
- cancel: "Cancel",
779
- change: "Change",
780
- clear: "Clear",
781
- click: "Click",
782
- clickToCopy: "Click to Copy",
783
- close: "Close",
784
- confirm: "Confirm",
785
- copy: "Copy",
786
- copied: "Copied",
787
- create: "Create",
788
- decline: "Decline",
789
- delete: "Delete",
790
- discard: "Discard",
791
- discardChanges: "Discard Changes",
792
- done: "Done",
793
- edit: "Edit",
794
- enterText: "Enter text here",
795
- error: "Error",
796
- exit: "Exit",
797
- fieldRequiredError: "This field is required.",
798
- invalidEmailError: "Please enter a valid email address.",
799
- less: "Less",
800
- loading: "Loading",
801
- maxLengthError: "Maximum length exceeded.",
802
- minLengthError: "Minimum length not met.",
803
- more: "More",
804
- next: "Next",
805
- no: "No",
806
- none: "None",
807
- of: "of",
808
- optional: "Optional",
809
- pleaseWait: "Please wait...",
810
- previous: "Previous",
811
- remove: "Remove",
812
- required: "Required",
813
- reset: "Reset",
814
- save: "Save",
815
- saved: "Saved",
816
- search: "Search",
817
- select: "Select",
818
- selectOption: "Select an option",
819
- show: "Show",
820
- showMore: "Show more",
821
- showLess: "Show less",
822
- submit: "Submit",
823
- success: "Success",
824
- update: "Update",
825
- unsavedChanges: "Unsaved Changes",
826
- unsavedChangesSaveQuestion: "Do you want to save your changes?",
827
- yes: "Yes"
828
- },
829
- de: {
830
- add: "Hinzuf\xFCgen",
831
- all: "Alle",
832
- apply: "Anwenden",
833
- back: "Zur\xFCck",
834
- cancel: "Abbrechen",
835
- change: "\xC4ndern",
836
- clear: "L\xF6schen",
837
- click: "Klicken",
838
- clickToCopy: "Zum kopieren klicken",
839
- close: "Schlie\xDFen",
840
- confirm: "Best\xE4tigen",
841
- copy: "Kopieren",
842
- copied: "Kopiert",
843
- create: "Erstellen",
844
- decline: "Ablehnen",
845
- delete: "L\xF6schen",
846
- discard: "Verwerfen",
847
- discardChanges: "\xC4nderungen Verwerfen",
848
- done: "Fertig",
849
- edit: "Bearbeiten",
850
- enterText: "Text hier eingeben",
851
- error: "Fehler",
852
- exit: "Beenden",
853
- fieldRequiredError: "Dieses Feld ist erforderlich.",
854
- invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
855
- less: "Weniger",
856
- loading: "L\xE4dt",
857
- maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
858
- minLengthError: "Mindestl\xE4nge nicht erreicht.",
859
- more: "Mehr",
860
- next: "Weiter",
861
- no: "Nein",
862
- none: "Nichts",
863
- of: "von",
864
- optional: "Optional",
865
- pleaseWait: "Bitte warten...",
866
- previous: "Vorherige",
867
- remove: "Entfernen",
868
- required: "Erforderlich",
869
- reset: "Zur\xFCcksetzen",
870
- save: "Speichern",
871
- saved: "Gespeichert",
872
- search: "Suche",
873
- select: "Select",
874
- selectOption: "Option ausw\xE4hlen",
875
- show: "Anzeigen",
876
- showMore: "Mehr anzeigen",
877
- showLess: "Weniger anzeigen",
878
- submit: "Abschicken",
879
- success: "Erfolg",
880
- update: "Update",
881
- unsavedChanges: "Ungespeicherte \xC4nderungen",
882
- unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
883
- yes: "Ja"
884
- }
885
- };
886
-
887
- // src/components/user-action/Button.tsx
888
- var import_react11 = require("react");
889
- var import_clsx6 = __toESM(require("clsx"));
890
- var import_jsx_runtime7 = require("react/jsx-runtime");
891
- var ButtonColorUtil = {
892
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
893
- text: ["primary", "negative", "neutral"],
894
- outline: ["primary"]
895
- };
896
- var IconButtonUtil = {
897
- icon: [...ButtonColorUtil.solid, "transparent"]
898
- };
899
- var paddingMapping = {
900
- small: "btn-sm",
901
- medium: "btn-md",
902
- large: "btn-lg"
903
- };
904
- var iconPaddingMapping = {
905
- tiny: "icon-btn-xs",
906
- small: "icon-btn-sm",
907
- medium: "icon-btn-md",
908
- large: "icon-btn-lg"
909
- };
910
- var ButtonUtil = {
911
- paddingMapping,
912
- iconPaddingMapping
913
- };
914
- var SolidButton = (0, import_react11.forwardRef)(function SolidButton2({
915
- children,
916
- disabled = false,
917
- color = "primary",
918
- size = "medium",
919
- startIcon,
920
- endIcon,
921
- onClick,
922
- className,
923
- ...restProps
924
- }, ref) {
925
- const colorClasses = {
926
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
927
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
928
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
929
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
930
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
931
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
932
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
933
- }[color];
934
- const iconColorClasses = {
935
- primary: "text-button-solid-primary-icon",
936
- secondary: "text-button-solid-secondary-icon",
937
- tertiary: "text-button-solid-tertiary-icon",
938
- positive: "text-button-solid-positive-icon",
939
- warning: "text-button-solid-warning-icon",
940
- negative: "text-button-solid-negative-icon",
941
- neutral: "text-button-solid-neutral-icon"
942
- }[color];
943
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
944
- "button",
945
- {
946
- ref,
947
- onClick,
948
- disabled,
949
- className: (0, import_clsx6.default)(
950
- "font-semibold",
951
- {
952
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
953
- [(0, import_clsx6.default)(colorClasses, "hover:brightness-90")]: !disabled
954
- },
955
- ButtonUtil.paddingMapping[size],
956
- className
957
- ),
958
- ...restProps,
959
- children: [
960
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
961
- "span",
962
- {
963
- className: (0, import_clsx6.default)({
964
- [iconColorClasses]: !disabled,
965
- [`text-disabled-icon`]: disabled
966
- }),
967
- children: startIcon
968
- }
969
- ),
970
- children,
971
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
972
- "span",
973
- {
974
- className: (0, import_clsx6.default)({
975
- [iconColorClasses]: !disabled,
976
- [`text-disabled-icon`]: disabled
977
- }),
978
- children: endIcon
979
- }
980
- )
981
- ]
982
- }
983
- );
984
- });
985
- var TextButton = ({
986
- children,
987
- disabled = false,
988
- color = "neutral",
989
- size = "medium",
990
- startIcon,
991
- endIcon,
992
- onClick,
993
- coloredHoverBackground = true,
994
- className,
995
- ...restProps
996
- }) => {
997
- const colorClasses = {
998
- primary: "bg-transparent text-button-text-primary-text",
999
- negative: "bg-transparent text-button-text-negative-text",
1000
- neutral: "bg-transparent text-button-text-neutral-text"
1001
- }[color];
1002
- const backgroundColor = {
1003
- primary: "hover:bg-button-text-primary-text/20",
1004
- negative: "hover:bg-button-text-negative-text/20",
1005
- neutral: "hover:bg-button-text-neutral-text/20"
1006
- }[color];
1007
- const iconColorClasses = {
1008
- primary: "text-button-text-primary-icon",
1009
- negative: "text-button-text-negative-icon",
1010
- neutral: "text-button-text-neutral-icon"
1011
- }[color];
1012
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1013
- "button",
1014
- {
1015
- onClick,
1016
- disabled,
1017
- className: (0, import_clsx6.default)(
1018
- "font-semibold",
1019
- {
1020
- "text-disabled-text cursor-not-allowed": disabled,
1021
- [colorClasses]: !disabled,
1022
- [backgroundColor]: !disabled && coloredHoverBackground,
1023
- "hover:bg-button-text-hover-background": !disabled && !coloredHoverBackground
1024
- },
1025
- ButtonUtil.paddingMapping[size],
1026
- className
1027
- ),
1028
- ...restProps,
1029
- children: [
1030
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1031
- "span",
1032
- {
1033
- className: (0, import_clsx6.default)({
1034
- [iconColorClasses]: !disabled,
1035
- [`text-disabled-icon`]: disabled
1036
- }),
1037
- children: startIcon
1015
+ containerClassName,
1016
+ disabled,
1017
+ ...restProps
1018
+ }, forwardedRef) {
1019
+ const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
1020
+ const {
1021
+ restartTimer,
1022
+ clearTimer
1023
+ } = useDelay({ delay, disabled: !afterDelay });
1024
+ const innerRef = (0, import_react11.useRef)(null);
1025
+ const { focusNext } = useFocusManagement();
1026
+ useFocusOnceVisible(innerRef, !autoFocus);
1027
+ (0, import_react11.useImperativeHandle)(forwardedRef, () => innerRef.current);
1028
+ const handleKeyDown = (e) => {
1029
+ if (e.key === "Enter" && !e.shiftKey) {
1030
+ e.preventDefault();
1031
+ innerRef.current?.blur();
1032
+ focusNext();
1033
+ }
1034
+ };
1035
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_clsx6.default)({ "w-full": expanded }, containerClassName), children: [
1036
+ label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx6.default)("mb-1", label.className) }),
1037
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1038
+ "input",
1039
+ {
1040
+ ...restProps,
1041
+ ref: innerRef,
1042
+ value,
1043
+ id,
1044
+ type,
1045
+ disabled,
1046
+ className: (0, import_clsx6.default)(getInputClassName({ disabled }), className),
1047
+ onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
1048
+ onBlur: (event) => {
1049
+ onBlur?.(event);
1050
+ if (onEditCompleted && allowEditCompleteOnBlur) {
1051
+ onEditCompleted(event.target.value);
1052
+ clearTimer();
1038
1053
  }
1039
- ),
1040
- children,
1041
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1042
- "span",
1043
- {
1044
- className: (0, import_clsx6.default)({
1045
- [iconColorClasses]: !disabled,
1046
- [`text-disabled-icon`]: disabled
1047
- }),
1048
- children: endIcon
1054
+ },
1055
+ onChange: (e) => {
1056
+ const value2 = e.target.value;
1057
+ if (onEditCompleted) {
1058
+ restartTimer(() => {
1059
+ if (innerRef.current) {
1060
+ innerRef.current.blur();
1061
+ if (!allowEditCompleteOnBlur) {
1062
+ onEditCompleted(value2);
1063
+ }
1064
+ } else {
1065
+ onEditCompleted(value2);
1066
+ }
1067
+ });
1049
1068
  }
1050
- )
1051
- ]
1052
- }
1053
- );
1054
- };
1055
- var IconButton = ({
1056
- children,
1057
- disabled = false,
1058
- color = "primary",
1059
- size = "medium",
1069
+ onChange(e);
1070
+ onChangeText(value2);
1071
+ }
1072
+ }
1073
+ )
1074
+ ] });
1075
+ });
1076
+ var FormInput = (0, import_react11.forwardRef)(function FormInput2({
1077
+ id,
1078
+ labelText,
1079
+ errorText,
1060
1080
  className,
1081
+ labelClassName,
1082
+ errorClassName,
1083
+ containerClassName,
1084
+ required,
1085
+ disabled,
1061
1086
  ...restProps
1062
- }) => {
1063
- const colorClasses = {
1064
- primary: "bg-button-solid-primary-background text-button-solid-primary-text",
1065
- secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
1066
- tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
1067
- positive: "bg-button-solid-positive-background text-button-solid-positive-text",
1068
- warning: "bg-button-solid-warning-background text-button-solid-warning-text",
1069
- negative: "bg-button-solid-negative-background text-button-solid-negative-text",
1070
- neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
1071
- transparent: "bg-transparent"
1072
- }[color];
1073
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1074
- "button",
1087
+ }, ref) {
1088
+ const input = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1089
+ "input",
1075
1090
  {
1091
+ ...restProps,
1092
+ ref,
1093
+ id,
1076
1094
  disabled,
1077
1095
  className: (0, import_clsx6.default)(
1078
- {
1079
- "text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
1080
- "text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
1081
- "hover:bg-button-text-hover-background": !disabled && color === "transparent",
1082
- [(0, import_clsx6.default)(colorClasses, "hover:brightness-90")]: !disabled
1083
- },
1084
- ButtonUtil.iconPaddingMapping[size],
1096
+ getInputClassName({ disabled, hasError: !!errorText }),
1085
1097
  className
1086
- ),
1087
- ...restProps,
1088
- children
1098
+ )
1089
1099
  }
1090
1100
  );
1091
- };
1101
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_clsx6.default)("flex flex-col gap-y-1", containerClassName), children: [
1102
+ labelText && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor: id, className: (0, import_clsx6.default)("textstyle-label-md", labelClassName), children: [
1103
+ labelText,
1104
+ required && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-primary font-bold", children: "*" })
1105
+ ] }),
1106
+ input,
1107
+ errorText && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: (0, import_clsx6.default)("text-negative", errorClassName), children: errorText })
1108
+ ] });
1109
+ });
1092
1110
 
1093
1111
  // src/components/user-action/SearchBar.tsx
1094
- var import_lucide_react3 = require("lucide-react");
1112
+ var import_lucide_react2 = require("lucide-react");
1095
1113
  var import_clsx7 = require("clsx");
1096
1114
  var import_jsx_runtime8 = require("react/jsx-runtime");
1097
1115
  var SearchBar = ({
@@ -1110,7 +1128,7 @@ var SearchBar = ({
1110
1128
  placeholder: placeholder ?? translation("search")
1111
1129
  }
1112
1130
  ),
1113
- onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Search, { className: "w-full h-full" }) })
1131
+ onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Search, { className: "w-full h-full" }) })
1114
1132
  ] });
1115
1133
  };
1116
1134
 
@@ -1182,96 +1200,12 @@ var useSearch = ({
1182
1200
  };
1183
1201
  };
1184
1202
 
1185
- // src/components/user-action/Select.tsx
1186
- var import_jsx_runtime9 = require("react/jsx-runtime");
1187
- var SelectTile = ({
1188
- className,
1189
- disabledClassName,
1190
- title,
1191
- ...restProps
1192
- }) => {
1193
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1194
- Tile,
1195
- {
1196
- ...restProps,
1197
- className: (0, import_clsx8.default)("px-2 py-1 rounded-md", className),
1198
- disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
1199
- title: { ...title, className: title.className ?? "font-semibold" }
1200
- }
1201
- );
1202
- };
1203
-
1204
- // src/components/layout-and-navigation/Chip.tsx
1205
- var import_clsx9 = __toESM(require("clsx"));
1206
- var import_jsx_runtime10 = require("react/jsx-runtime");
1207
- var Chip = ({
1208
- children,
1209
- trailingIcon,
1210
- color = "default",
1211
- variant = "normal",
1212
- className = "",
1213
- ...restProps
1214
- }) => {
1215
- const colorMapping = {
1216
- default: "text-tag-default-text bg-tag-default-background",
1217
- dark: "text-tag-dark-text bg-tag-dark-background",
1218
- red: "text-tag-red-text bg-tag-red-background",
1219
- yellow: "text-tag-yellow-text bg-tag-yellow-background",
1220
- green: "text-tag-green-text bg-tag-green-background",
1221
- blue: "text-tag-blue-text bg-tag-blue-background",
1222
- pink: "text-tag-pink-text bg-tag-pink-background"
1223
- }[color];
1224
- const colorMappingIcon = {
1225
- default: "text-tag-default-icon",
1226
- dark: "text-tag-dark-icon",
1227
- red: "text-tag-red-icon",
1228
- yellow: "text-tag-yellow-icon",
1229
- green: "text-tag-green-icon",
1230
- blue: "text-tag-blue-icon",
1231
- pink: "text-tag-pink-icon"
1232
- }[color];
1233
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1234
- "div",
1235
- {
1236
- ...restProps,
1237
- className: (0, import_clsx9.default)(
1238
- `row w-fit px-2 py-1`,
1239
- colorMapping,
1240
- {
1241
- "rounded-md": variant === "normal",
1242
- "rounded-full": variant === "fullyRounded"
1243
- },
1244
- className
1245
- ),
1246
- children: [
1247
- children,
1248
- trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
1249
- ]
1250
- }
1251
- );
1252
- };
1253
- var ChipList = ({
1254
- list,
1255
- className = ""
1256
- }) => {
1257
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx9.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1258
- Chip,
1259
- {
1260
- ...value,
1261
- color: value.color ?? "dark",
1262
- variant: value.variant ?? "normal",
1263
- children: value.children
1264
- },
1265
- index
1266
- )) });
1267
- };
1268
-
1269
1203
  // src/components/user-action/Checkbox.tsx
1270
- var import_react15 = require("react");
1204
+ var import_react13 = require("react");
1271
1205
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
1272
- var import_lucide_react4 = require("lucide-react");
1273
- var import_clsx10 = __toESM(require("clsx"));
1274
- var import_jsx_runtime11 = require("react/jsx-runtime");
1206
+ var import_lucide_react3 = require("lucide-react");
1207
+ var import_clsx8 = __toESM(require("clsx"));
1208
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1275
1209
  var checkboxSizeMapping = {
1276
1210
  small: "size-5",
1277
1211
  medium: "size-6",
@@ -1307,33 +1241,92 @@ var Checkbox = ({
1307
1241
  const newValue = checked === "indeterminate" ? false : !checked;
1308
1242
  propagateChange(newValue);
1309
1243
  };
1310
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx10.default)("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
1311
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1244
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
1245
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1312
1246
  CheckboxPrimitive.Root,
1313
1247
  {
1314
1248
  onCheckedChange: propagateChange,
1315
1249
  checked,
1316
1250
  disabled,
1317
1251
  id,
1318
- className: (0, import_clsx10.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
1252
+ className: (0, import_clsx8.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
1319
1253
  "text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
1320
1254
  "focus:border-primary group-hover:border-primary ": !disabled,
1321
1255
  "bg-input-background": !disabled && !checked,
1322
1256
  "bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
1323
1257
  }, className),
1324
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(CheckboxPrimitive.Indicator, { children: [
1325
- checked === true && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Check, { className: innerIconSize }),
1326
- checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Minus, { className: innerIconSize })
1258
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(CheckboxPrimitive.Indicator, { children: [
1259
+ checked === true && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Check, { className: innerIconSize }),
1260
+ checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Minus, { className: innerIconSize })
1327
1261
  ] })
1328
1262
  }
1329
1263
  ),
1330
- label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Label, { ...label, className: (0, import_clsx10.default)(label.className), htmlFor: id })
1264
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Label, { ...label, className: (0, import_clsx8.default)(label.className), htmlFor: id })
1331
1265
  ] });
1332
1266
  };
1333
1267
 
1334
1268
  // src/components/user-action/MultiSelect.tsx
1335
1269
  var import_lucide_react5 = require("lucide-react");
1336
- var import_jsx_runtime12 = require("react/jsx-runtime");
1270
+
1271
+ // src/components/layout-and-navigation/Tile.tsx
1272
+ var import_clsx9 = __toESM(require("clsx"));
1273
+ var import_lucide_react4 = require("lucide-react");
1274
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1275
+ var Tile = ({
1276
+ title,
1277
+ titleClassName,
1278
+ description,
1279
+ descriptionClassName,
1280
+ onClick,
1281
+ isSelected = false,
1282
+ disabled = false,
1283
+ prefix,
1284
+ suffix,
1285
+ normalClassName = "hover:bg-primary/40 cursor-pointer",
1286
+ selectedClassName = "bg-primary/20",
1287
+ disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
1288
+ className
1289
+ }) => {
1290
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1291
+ "div",
1292
+ {
1293
+ className: (0, import_clsx9.default)(
1294
+ "flex-row-2 w-full items-center",
1295
+ {
1296
+ [normalClassName]: onClick && !disabled,
1297
+ [selectedClassName]: isSelected && !disabled,
1298
+ [disabledClassName]: disabled
1299
+ },
1300
+ className
1301
+ ),
1302
+ onClick: disabled ? void 0 : onClick,
1303
+ children: [
1304
+ prefix,
1305
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-col-0 w-full", children: [
1306
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: (0, import_clsx9.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
1307
+ !!description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: (0, import_clsx9.default)(descriptionClassName ?? "textstyle-description"), children: description })
1308
+ ] }),
1309
+ suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Check, { size: 24 }) : void 0)
1310
+ ]
1311
+ }
1312
+ );
1313
+ };
1314
+ var ListTile = ({
1315
+ ...props
1316
+ }) => {
1317
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1318
+ Tile,
1319
+ {
1320
+ ...props,
1321
+ titleClassName: props.titleClassName ?? "font-semibold",
1322
+ className: (0, import_clsx9.default)("px-2 py-1 rounded-md", props.className),
1323
+ disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
1324
+ }
1325
+ );
1326
+ };
1327
+
1328
+ // src/components/user-action/MultiSelect.tsx
1329
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1337
1330
  var defaultMultiSelectTranslation = {
1338
1331
  en: {
1339
1332
  selected: `{{amount}} selected`
@@ -1360,30 +1353,30 @@ var MultiSelect = ({
1360
1353
  const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
1361
1354
  const { result, search, setSearch } = useSearch({
1362
1355
  list: options,
1363
- searchMapping: (0, import_react16.useCallback)((item) => item.searchTags, []),
1356
+ searchMapping: (0, import_react14.useCallback)((item) => item.searchTags, []),
1364
1357
  ...searchOptions
1365
1358
  });
1366
1359
  const selectedItems = options.filter((value) => value.selected);
1367
1360
  const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
1368
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_clsx11.default)(className), children: [
1369
- label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1361
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx10.default)(className), children: [
1362
+ label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1370
1363
  Label,
1371
1364
  {
1372
1365
  ...label,
1373
1366
  htmlFor: label.name,
1374
- className: (0, import_clsx11.default)(" mb-1", label.className),
1367
+ className: (0, import_clsx10.default)(" mb-1", label.className),
1375
1368
  labelType: label.labelType ?? "labelBig"
1376
1369
  }
1377
1370
  ),
1378
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1371
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1379
1372
  Menu,
1380
1373
  {
1381
1374
  ...menuProps,
1382
- trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1375
+ trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1383
1376
  "button",
1384
1377
  {
1385
1378
  ref,
1386
- className: (0, import_clsx11.default)(
1379
+ className: (0, import_clsx10.default)(
1387
1380
  "group btn-md justify-between w-full border-2 h-auto",
1388
1381
  {
1389
1382
  "min-h-14": useChipDisplay,
@@ -1394,18 +1387,30 @@ var MultiSelect = ({
1394
1387
  ),
1395
1388
  onClick: toggleOpen,
1396
1389
  disabled,
1397
- children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "icon-btn-sm bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Plus, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1398
- !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
1399
- isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: (0, import_clsx11.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
1400
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ExpansionIcon, { isExpanded: isOpen })
1390
+ children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1391
+ "div",
1392
+ {
1393
+ className: (0, import_clsx10.default)(
1394
+ "icon-btn-sm ",
1395
+ {
1396
+ "bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90": !disabled,
1397
+ "bg-disabled-background text-disabled-text": disabled
1398
+ }
1399
+ ),
1400
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.Plus, {})
1401
+ }
1402
+ ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1403
+ !isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
1404
+ isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: (0, import_clsx10.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
1405
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ExpansionIcon, { isExpanded: isOpen })
1401
1406
  ] })
1402
1407
  }
1403
1408
  ),
1404
- menuClassName: (0, import_clsx11.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
1409
+ menuClassName: (0, import_clsx10.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
1405
1410
  children: (bag) => {
1406
1411
  const { close } = bag;
1407
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1408
- !searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1412
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1413
+ !searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1409
1414
  SearchBar,
1410
1415
  {
1411
1416
  value: search,
@@ -1413,7 +1418,7 @@ var MultiSelect = ({
1413
1418
  autoFocus: true
1414
1419
  }
1415
1420
  ),
1416
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
1421
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
1417
1422
  result.map((option, index) => {
1418
1423
  const update = () => {
1419
1424
  onChange(options.map((value) => value.value === option.value ? {
@@ -1421,10 +1426,10 @@ var MultiSelect = ({
1421
1426
  selected: !value.selected
1422
1427
  } : value));
1423
1428
  };
1424
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1425
- SelectTile,
1429
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1430
+ ListTile,
1426
1431
  {
1427
- prefix: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1432
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1428
1433
  Checkbox,
1429
1434
  {
1430
1435
  checked: option.selected,
@@ -1433,7 +1438,7 @@ var MultiSelect = ({
1433
1438
  disabled: option.disabled
1434
1439
  }
1435
1440
  ),
1436
- title: { value: option.label },
1441
+ title: option.label,
1437
1442
  onClick: update,
1438
1443
  disabled: option.disabled
1439
1444
  },
@@ -1442,9 +1447,9 @@ var MultiSelect = ({
1442
1447
  }),
1443
1448
  additionalItems && additionalItems({ ...bag, search })
1444
1449
  ] }),
1445
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-row-2 justify-between", children: [
1446
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-row-2", children: [
1447
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1450
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-row-2 justify-between", children: [
1451
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-row-2", children: [
1452
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1448
1453
  SolidButton,
1449
1454
  {
1450
1455
  color: "neutral",
@@ -1459,7 +1464,7 @@ var MultiSelect = ({
1459
1464
  children: translation("all")
1460
1465
  }
1461
1466
  ),
1462
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1467
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1463
1468
  SolidButton,
1464
1469
  {
1465
1470
  color: "neutral",
@@ -1474,7 +1479,7 @@ var MultiSelect = ({
1474
1479
  }
1475
1480
  )
1476
1481
  ] }),
1477
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SolidButton, { size: "small", onClick: close, children: "Done" })
1482
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SolidButton, { size: "small", onClick: close, children: "Done" })
1478
1483
  ] })
1479
1484
  ] });
1480
1485
  }
@@ -1485,8 +1490,8 @@ var MultiSelect = ({
1485
1490
 
1486
1491
  // src/components/properties/PropertyBase.tsx
1487
1492
  var import_lucide_react6 = require("lucide-react");
1488
- var import_clsx12 = __toESM(require("clsx"));
1489
- var import_jsx_runtime13 = require("react/jsx-runtime");
1493
+ var import_clsx11 = __toESM(require("clsx"));
1494
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1490
1495
  var PropertyBase = ({
1491
1496
  overwriteTranslation,
1492
1497
  name,
@@ -1500,11 +1505,11 @@ var PropertyBase = ({
1500
1505
  }) => {
1501
1506
  const translation = useTranslation([formTranslation], overwriteTranslation);
1502
1507
  const requiredAndNoValue = softRequired && !hasValue;
1503
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_clsx12.default)("flex-row-0 group", className), children: [
1504
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1508
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_clsx11.default)("flex-row-0 group", className), children: [
1509
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1505
1510
  "div",
1506
1511
  {
1507
- className: (0, import_clsx12.default)(
1512
+ className: (0, import_clsx11.default)(
1508
1513
  "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
1509
1514
  {
1510
1515
  "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
@@ -1513,15 +1518,15 @@ var PropertyBase = ({
1513
1518
  className
1514
1519
  ),
1515
1520
  children: [
1516
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-w-6 min-w-6 text-text-default", children: icon }),
1517
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "font-semibold", children: name })
1521
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "max-w-6 min-w-6 text-text-primary", children: icon }),
1522
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-semibold", children: name })
1518
1523
  ]
1519
1524
  }
1520
1525
  ),
1521
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1526
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1522
1527
  "div",
1523
1528
  {
1524
- className: (0, import_clsx12.default)(
1529
+ className: (0, import_clsx11.default)(
1525
1530
  "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
1526
1531
  {
1527
1532
  "bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
@@ -1531,13 +1536,13 @@ var PropertyBase = ({
1531
1536
  ),
1532
1537
  children: [
1533
1538
  input({ softRequired, hasValue }),
1534
- requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.AlertTriangle, { size: 24 }) }),
1535
- onRemove && hasValue && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1539
+ requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.AlertTriangle, { size: 24 }) }),
1540
+ onRemove && hasValue && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1536
1541
  TextButton,
1537
1542
  {
1538
1543
  onClick: onRemove,
1539
1544
  color: "negative",
1540
- className: (0, import_clsx12.default)("items-center", { "!text-transparent": !hasValue || readOnly }),
1545
+ className: (0, import_clsx11.default)("items-center", { "!text-transparent": !hasValue || readOnly }),
1541
1546
  disabled: !hasValue || readOnly,
1542
1547
  children: translation("remove")
1543
1548
  }
@@ -1549,7 +1554,7 @@ var PropertyBase = ({
1549
1554
  };
1550
1555
 
1551
1556
  // src/components/properties/MultiSelectProperty.tsx
1552
- var import_jsx_runtime14 = require("react/jsx-runtime");
1557
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1553
1558
  var MultiSelectProperty = ({
1554
1559
  overwriteTranslation,
1555
1560
  options,
@@ -1562,7 +1567,7 @@ var MultiSelectProperty = ({
1562
1567
  }) => {
1563
1568
  const translation = useTranslation([formTranslation], overwriteTranslation);
1564
1569
  const hasValue = options.some((value) => value.selected);
1565
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1570
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1566
1571
  PropertyBase,
1567
1572
  {
1568
1573
  name,
@@ -1570,12 +1575,12 @@ var MultiSelectProperty = ({
1570
1575
  readOnly,
1571
1576
  softRequired,
1572
1577
  hasValue,
1573
- icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.List, { size: 24 }),
1574
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1578
+ icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.List, { size: 24 }),
1579
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1575
1580
  MultiSelect,
1576
1581
  {
1577
1582
  ...multiSelectProps,
1578
- className: (0, import_clsx13.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
1583
+ className: (0, import_clsx12.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
1579
1584
  options,
1580
1585
  disabled: readOnly,
1581
1586
  useChipDisplay: true,
@@ -1588,11 +1593,11 @@ var MultiSelectProperty = ({
1588
1593
  if (!onAddNew && !search.trim()) {
1589
1594
  return void 0;
1590
1595
  }
1591
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1592
- SelectTile,
1596
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1597
+ ListTile,
1593
1598
  {
1594
- prefix: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.Plus, {}),
1595
- title: { value: `${translation("add")} ${search.trim()}` },
1599
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react7.Plus, {}),
1600
+ title: `${translation("add")} ${search.trim()}`,
1596
1601
  onClick: () => {
1597
1602
  onAddNew(search);
1598
1603
  close();
@@ -1601,7 +1606,7 @@ var MultiSelectProperty = ({
1601
1606
  }
1602
1607
  );
1603
1608
  },
1604
- triggerClassName: (0, import_clsx13.default)(
1609
+ triggerClassName: (0, import_clsx12.default)(
1605
1610
  "!border-none !p-0 !min-h-10",
1606
1611
  {
1607
1612
  "!bg-warning !text-surface-warning": softRequired2 && !hasValue,