@helpwave/hightide 0.6.2 → 0.6.4

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.
package/dist/index.mjs CHANGED
@@ -7251,7 +7251,7 @@ function useForm() {
7251
7251
  if (!ctx) throw new Error("FormContext is only available inside a <Form>");
7252
7252
  return ctx;
7253
7253
  }
7254
- function useFormField(key) {
7254
+ function useFormField(key, { triggerUpdate = true }) {
7255
7255
  const context = useContext(FormContext);
7256
7256
  const subscribe = useCallback2((cb) => {
7257
7257
  if (!context) return () => {
@@ -7266,20 +7266,31 @@ function useFormField(key) {
7266
7266
  subscribe,
7267
7267
  () => context ? context.store.getError(key) : void 0
7268
7268
  );
7269
+ const getDataProps = useCallback2(() => {
7270
+ return {
7271
+ value: context ? context.store.getValue(key) : void 0,
7272
+ onValueChange: (val) => context?.store.setValue(key, val),
7273
+ onEditComplete: (val) => {
7274
+ context?.store.setTouched(key);
7275
+ context?.store.setValue(key, val, triggerUpdate);
7276
+ }
7277
+ };
7278
+ }, [context, key, triggerUpdate]);
7269
7279
  if (!context) return null;
7270
- const { registerRef, getDataProps } = context;
7280
+ const { registerRef } = context;
7271
7281
  return {
7282
+ store: context.store,
7272
7283
  value,
7273
7284
  error,
7274
- dataProps: getDataProps(key),
7285
+ dataProps: getDataProps(),
7275
7286
  registerRef: registerRef(key)
7276
7287
  };
7277
7288
  }
7278
7289
 
7279
7290
  // src/components/form/FormField.tsx
7280
7291
  import { jsx as jsx14 } from "react/jsx-runtime";
7281
- var FormField = ({ children, name: name2, ...props }) => {
7282
- const formField = useFormField(name2);
7292
+ var FormField = ({ children, name: name2, triggerUpdateOnEditComplete, ...props }) => {
7293
+ const formField = useFormField(name2, { triggerUpdate: triggerUpdateOnEditComplete });
7283
7294
  if (!formField) {
7284
7295
  throw new Error("<FormField> can only be used inside a FormContext try wrapping your app in a <FormProvider>");
7285
7296
  }
@@ -7290,7 +7301,10 @@ var FormField = ({ children, name: name2, ...props }) => {
7290
7301
  ...formFieldLayoutBag.ariaAttributes,
7291
7302
  ref: formField.registerRef
7292
7303
  },
7293
- interactionStates: formFieldLayoutBag.interactionStates
7304
+ interactionStates: formFieldLayoutBag.interactionStates,
7305
+ other: {
7306
+ updateValue: (value) => formField.store.setValue(name2, value, true)
7307
+ }
7294
7308
  }) });
7295
7309
  };
7296
7310
 
@@ -7299,6 +7313,7 @@ var FormStore = class {
7299
7313
  constructor({
7300
7314
  initialValues,
7301
7315
  hasTriedSubmitting,
7316
+ submittingTouchesAll = true,
7302
7317
  validators = {},
7303
7318
  validationBehaviour = "touched"
7304
7319
  }) {
@@ -7306,9 +7321,16 @@ var FormStore = class {
7306
7321
  this.errors = {};
7307
7322
  this.touched = {};
7308
7323
  this.listeners = /* @__PURE__ */ new Map();
7324
+ this.submittingTouchesAll = false;
7309
7325
  this.initialValues = initialValues;
7310
7326
  this.values = { ...initialValues };
7311
7327
  this.hasTriedSubmitting = hasTriedSubmitting;
7328
+ this.submittingTouchesAll = submittingTouchesAll;
7329
+ if (this.submittingTouchesAll && this.hasTriedSubmitting) {
7330
+ Object.keys(this.initialValues).forEach((key) => {
7331
+ this.touched[key] = true;
7332
+ });
7333
+ }
7312
7334
  this.validators = validators;
7313
7335
  this.validationBehaviour = validationBehaviour;
7314
7336
  this.validateAll();
@@ -7320,14 +7342,37 @@ var FormStore = class {
7320
7342
  getAllValues() {
7321
7343
  return { ...this.values };
7322
7344
  }
7323
- setValue(key, value) {
7324
- if (this.values[key] === value) return;
7325
- this.values[key] = value;
7326
- this.validate(key);
7327
- this.notify({ type: "onChange", key, value });
7345
+ setValue(key, value, triggerUpdate = false) {
7346
+ if (this.values[key] !== value) {
7347
+ this.values[key] = value;
7348
+ this.validate(key);
7349
+ this.notify({ type: "onChange", key, value, values: this.values });
7350
+ }
7351
+ if (triggerUpdate) {
7352
+ this.notify({
7353
+ type: "onUpdate",
7354
+ key: "ALL",
7355
+ updatedKeys: [key],
7356
+ update: { [key]: value },
7357
+ values: this.values,
7358
+ hasErrors: this.getHasError(),
7359
+ errors: this.getErrors()
7360
+ });
7361
+ }
7328
7362
  }
7329
- setValues(values) {
7363
+ setValues(values, triggerUpdate = false) {
7330
7364
  Object.keys(values).forEach((key) => this.setValue(key, values[key]));
7365
+ if (triggerUpdate) {
7366
+ this.notify({
7367
+ type: "onUpdate",
7368
+ key: "ALL",
7369
+ updatedKeys: Object.keys(values),
7370
+ update: { ...values },
7371
+ values: this.values,
7372
+ hasErrors: this.getHasError(),
7373
+ errors: this.getErrors()
7374
+ });
7375
+ }
7331
7376
  }
7332
7377
  // Touched
7333
7378
  getTouched(key) {
@@ -7337,6 +7382,7 @@ var FormStore = class {
7337
7382
  if (this.touched[key] === isTouched) return;
7338
7383
  this.touched[key] = isTouched;
7339
7384
  this.validate(key);
7385
+ this.notify({ type: "onTouched", key, value: this.values[key], values: { ...this.values } });
7340
7386
  }
7341
7387
  // Error and Validation
7342
7388
  getHasError() {
@@ -7355,7 +7401,7 @@ var FormStore = class {
7355
7401
  } else {
7356
7402
  this.errors[key] = error;
7357
7403
  }
7358
- this.notify({ type: "onError", key, value: this.values[key], error });
7404
+ this.notify({ type: "onError", key, value: this.values[key], error, values: { ...this.values } });
7359
7405
  }
7360
7406
  changeValidationBehavoir(validationBehaviour) {
7361
7407
  if (validationBehaviour === this.validationBehaviour) return;
@@ -7404,35 +7450,30 @@ var FormStore = class {
7404
7450
  // Form
7405
7451
  submit() {
7406
7452
  this.hasTriedSubmitting = true;
7407
- Object.keys(this.initialValues).forEach((k) => {
7408
- this.touched[k] = true;
7409
- this.validate(k);
7410
- });
7411
- const hasErrors = Object.keys(this.errors).length > 0;
7412
- if (hasErrors) {
7413
- this.notify({
7414
- type: "submitError",
7415
- key: "ALL",
7416
- errors: this.errors,
7417
- values: this.values
7418
- });
7419
- } else {
7420
- this.notify({
7421
- type: "submit",
7422
- key: "ALL",
7423
- values: this.values
7453
+ if (this.submittingTouchesAll) {
7454
+ Object.keys(this.initialValues).forEach((k) => {
7455
+ this.touched[k] = true;
7456
+ this.validate(k);
7424
7457
  });
7425
7458
  }
7459
+ const hasErrors = Object.keys(this.errors).length > 0;
7460
+ this.notify({
7461
+ type: "onSubmit",
7462
+ key: "ALL",
7463
+ hasErrors,
7464
+ errors: { ...this.errors },
7465
+ values: { ...this.values }
7466
+ });
7426
7467
  }
7427
7468
  reset() {
7428
7469
  this.values = { ...this.initialValues };
7429
7470
  this.hasTriedSubmitting = false;
7430
7471
  this.touched = {};
7431
7472
  Object.keys(this.initialValues).forEach((key) => {
7432
- this.notify({ type: "onChange", key, value: this.values[key] });
7473
+ this.notify({ type: "onChange", key, value: this.values[key], values: { ...this.values } });
7433
7474
  });
7434
7475
  this.validateAll();
7435
- this.notify({ type: "reset", key: "ALL", values: this.values, errors: this.errors });
7476
+ this.notify({ type: "reset", key: "ALL", values: { ...this.values }, errors: { ...this.errors } });
7436
7477
  }
7437
7478
  };
7438
7479
 
@@ -7442,6 +7483,8 @@ function useCreateForm({
7442
7483
  onFormSubmit,
7443
7484
  onFormError,
7444
7485
  onValueChange,
7486
+ onUpdate,
7487
+ onValidUpdate,
7445
7488
  initialValues,
7446
7489
  hasTriedSubmitting,
7447
7490
  validators,
@@ -7471,22 +7514,24 @@ function useCreateForm({
7471
7514
  }, []);
7472
7515
  useEffect3(() => {
7473
7516
  const handleUpdate = (event) => {
7474
- if (event.type === "submit") {
7475
- onFormSubmit(event.values);
7476
- } else if (event.type === "submitError") {
7477
- onFormError?.(event.values, event.errors);
7478
- if (scrollToElements) {
7479
- const errorInputs = Object.keys(event.errors).filter((key) => event.errors[key]).map((key) => fieldRefs.current[key]).filter((el) => el !== null && el !== void 0);
7480
- if (errorInputs.length > 0) {
7481
- errorInputs.sort((a, b) => {
7482
- const position = a.compareDocumentPosition(b);
7483
- if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
7484
- if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
7485
- return 0;
7486
- });
7487
- errorInputs[0].scrollIntoView(scrollOptions);
7488
- errorInputs[0].focus();
7517
+ if (event.type === "onSubmit") {
7518
+ if (event.hasErrors) {
7519
+ onFormError?.(event.values, event.errors);
7520
+ if (scrollToElements) {
7521
+ const errorInputs = Object.keys(event.errors).filter((key) => event.errors[key]).map((key) => fieldRefs.current[key]).filter((el) => el !== null && el !== void 0);
7522
+ if (errorInputs.length > 0) {
7523
+ errorInputs.sort((a, b) => {
7524
+ const position = a.compareDocumentPosition(b);
7525
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
7526
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
7527
+ return 0;
7528
+ });
7529
+ errorInputs[0].scrollIntoView(scrollOptions);
7530
+ errorInputs[0].focus();
7531
+ }
7489
7532
  }
7533
+ } else {
7534
+ onFormSubmit(event.values);
7490
7535
  }
7491
7536
  } else if (event.type === "reset") {
7492
7537
  if (scrollToElements) {
@@ -7506,23 +7551,18 @@ function useCreateForm({
7506
7551
  }
7507
7552
  } else if (event.type === "onChange") {
7508
7553
  onValueChange?.(storeRef.current.getAllValues());
7554
+ } else if (event.type === "onUpdate") {
7555
+ onUpdate?.(event.updatedKeys, event.update);
7556
+ if (!event.hasErrors) {
7557
+ onValidUpdate?.(event.updatedKeys, event.update);
7558
+ }
7509
7559
  }
7510
7560
  };
7511
7561
  const unsubscribe = storeRef.current.subscribe("ALL", handleUpdate);
7512
7562
  return () => {
7513
7563
  unsubscribe();
7514
7564
  };
7515
- }, [onFormError, onFormSubmit, onValueChange, scrollOptions, scrollToElements]);
7516
- const getDataProps = useCallback3((key) => {
7517
- return {
7518
- value: storeRef.current.getValue(key),
7519
- onValueChange: (val) => storeRef.current.setValue(key, val),
7520
- onEditComplete: (val) => {
7521
- storeRef.current.setValue(key, val);
7522
- storeRef.current.setTouched(key);
7523
- }
7524
- };
7525
- }, []);
7565
+ }, [onFormError, onFormSubmit, onUpdate, onValidUpdate, onValueChange, scrollOptions, scrollToElements]);
7526
7566
  const callbacks = useMemo3(() => ({
7527
7567
  reset: () => storeRef.current.reset(),
7528
7568
  submit: () => storeRef.current.submit(),
@@ -7543,7 +7583,6 @@ function useCreateForm({
7543
7583
  return {
7544
7584
  store: storeRef.current,
7545
7585
  ...callbacks,
7546
- getDataProps,
7547
7586
  registerRef
7548
7587
  };
7549
7588
  }
@@ -8161,8 +8200,7 @@ import { createContext as createContext2, useContext as useContext2, useState as
8161
8200
  import { jsx as jsx15 } from "react/jsx-runtime";
8162
8201
  var defaultConfig = {
8163
8202
  tooltip: {
8164
- appearDelay: 200,
8165
- disappearDelay: 400
8203
+ appearDelay: 400
8166
8204
  },
8167
8205
  theme: {
8168
8206
  initialTheme: "light"
@@ -9311,7 +9349,6 @@ var Expandable = forwardRef4(function Expandable2({
9311
9349
  children,
9312
9350
  id,
9313
9351
  label,
9314
- icon,
9315
9352
  isExpanded,
9316
9353
  onChange,
9317
9354
  clickOnlyOnHeader = true,
@@ -9321,8 +9358,6 @@ var Expandable = forwardRef4(function Expandable2({
9321
9358
  contentClassName,
9322
9359
  contentExpandedClassName
9323
9360
  }, ref) {
9324
- const defaultIcon = useCallback8((expanded) => /* @__PURE__ */ jsx20(ExpansionIcon, { isExpanded: expanded }), []);
9325
- const iconBuilder = icon ?? defaultIcon;
9326
9361
  return /* @__PURE__ */ jsxs9(
9327
9362
  ExpandableRoot,
9328
9363
  {
@@ -9334,10 +9369,7 @@ var Expandable = forwardRef4(function Expandable2({
9334
9369
  allowContainerToggle: !clickOnlyOnHeader,
9335
9370
  className,
9336
9371
  children: [
9337
- /* @__PURE__ */ jsxs9(ExpandableHeader, { className: headerClassName, children: [
9338
- label,
9339
- /* @__PURE__ */ jsx20(ExpandableContext.Consumer, { children: (ctx) => iconBuilder(ctx?.isExpanded ?? false) })
9340
- ] }),
9372
+ /* @__PURE__ */ jsx20(ExpandableHeader, { className: headerClassName, children: label }),
9341
9373
  /* @__PURE__ */ jsx20(ExpandableContext.Consumer, { children: (ctx) => /* @__PURE__ */ jsx20(
9342
9374
  ExpandableContent,
9343
9375
  {
@@ -9525,9 +9557,9 @@ var FloatingContainer = forwardRef5(function FloatingContainer2({
9525
9557
  screenPadding = 16,
9526
9558
  gap = 4,
9527
9559
  ...props
9528
- }, forwardRef13) {
9560
+ }, forwardRef16) {
9529
9561
  const innerRef = useRef6(null);
9530
- useImperativeHandle(forwardRef13, () => innerRef.current);
9562
+ useImperativeHandle(forwardRef16, () => innerRef.current);
9531
9563
  const position = useFloatingElement({
9532
9564
  active: !props.hidden,
9533
9565
  containerRef: innerRef,
@@ -10865,23 +10897,14 @@ var InputDialog = ({
10865
10897
  );
10866
10898
  };
10867
10899
 
10868
- // src/components/user-interaction/Select.tsx
10900
+ // src/components/user-interaction/select/Select.tsx
10869
10901
  import {
10870
- createContext as createContext8,
10871
- forwardRef as forwardRef8,
10872
- useCallback as useCallback14,
10873
- useContext as useContext8,
10874
- useEffect as useEffect17,
10875
- useId as useId9,
10876
- useImperativeHandle as useImperativeHandle3,
10877
- useMemo as useMemo12,
10878
- useRef as useRef12,
10879
- useState as useState19
10902
+ forwardRef as forwardRef9
10880
10903
  } from "react";
10881
- import clsx13 from "clsx";
10882
- import { CheckIcon, Plus, XIcon } from "lucide-react";
10883
- import { createPortal as createPortal5 } from "react-dom";
10884
- import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
10904
+
10905
+ // src/components/user-interaction/select/SelectContext.tsx
10906
+ import { createContext as createContext8, useCallback as useCallback14, useContext as useContext8, useEffect as useEffect17, useId as useId9, useMemo as useMemo12, useRef as useRef12, useState as useState19 } from "react";
10907
+ import { jsx as jsx34 } from "react/jsx-runtime";
10885
10908
  var defaultToggleOpenOptions = {
10886
10909
  highlightStartPositionBehavior: "first"
10887
10910
  };
@@ -10889,28 +10912,34 @@ var SelectContext = createContext8(null);
10889
10912
  function useSelectContext() {
10890
10913
  const ctx = useContext8(SelectContext);
10891
10914
  if (!ctx) {
10892
- throw new Error("SelectContext must be used within a ListBoxPrimitive");
10915
+ throw new Error("useSelectContext must be used within a SelectRoot or MultiSelectRoot");
10893
10916
  }
10894
10917
  return ctx;
10895
10918
  }
10896
- var SelectRoot = ({
10919
+ var PrimitveSelectRoot = ({
10897
10920
  children,
10898
10921
  id,
10899
10922
  value,
10900
10923
  onValueChange,
10901
10924
  values,
10902
10925
  onValuesChange,
10903
- isOpen = false,
10926
+ onClose,
10927
+ initialIsOpen = false,
10904
10928
  disabled = false,
10929
+ readOnly = false,
10930
+ required = false,
10905
10931
  invalid = false,
10906
10932
  isMultiSelect = false,
10907
10933
  iconAppearance = "left"
10908
10934
  }) => {
10909
10935
  const triggerRef = useRef12(null);
10910
10936
  const generatedId = useId9();
10911
- const usedId = id ?? generatedId;
10937
+ const [ids, setIds] = useState19({
10938
+ trigger: id ?? (isMultiSelect ? "multi-select-" + generatedId : "select-" + generatedId),
10939
+ content: isMultiSelect ? "multi-select-content-" + generatedId : "select-content-" + generatedId
10940
+ });
10912
10941
  const [internalState, setInternalState] = useState19({
10913
- isOpen,
10942
+ isOpen: initialIsOpen,
10914
10943
  options: []
10915
10944
  });
10916
10945
  const selectedValues = useMemo12(
@@ -10923,9 +10952,10 @@ var SelectRoot = ({
10923
10952
  );
10924
10953
  const state = {
10925
10954
  ...internalState,
10926
- id: usedId,
10927
10955
  disabled,
10928
10956
  invalid,
10957
+ readOnly,
10958
+ required,
10929
10959
  value: selectedValues,
10930
10960
  selectedOptions
10931
10961
  };
@@ -11003,7 +11033,7 @@ var SelectRoot = ({
11003
11033
  const unregisterTrigger = useCallback14(() => {
11004
11034
  triggerRef.current = null;
11005
11035
  }, []);
11006
- const toggleOpen = (isOpen2, toggleOpenOptions) => {
11036
+ const toggleOpen = (isOpen, toggleOpenOptions) => {
11007
11037
  const { highlightStartPositionBehavior } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
11008
11038
  let firstSelectedValue;
11009
11039
  let firstEnabledValue;
@@ -11019,11 +11049,15 @@ var SelectRoot = ({
11019
11049
  }
11020
11050
  }
11021
11051
  }
11052
+ const newIsOpen = isOpen ?? !internalState.isOpen;
11022
11053
  setInternalState((prevState) => ({
11023
11054
  ...prevState,
11024
- isOpen: isOpen2 ?? !prevState.isOpen,
11055
+ isOpen: newIsOpen,
11025
11056
  highlightedValue: firstSelectedValue ?? firstEnabledValue
11026
11057
  }));
11058
+ if (!newIsOpen) {
11059
+ onClose?.();
11060
+ }
11027
11061
  };
11028
11062
  const moveHighlightedIndex = (delta) => {
11029
11063
  let highlightedIndex = state.options.findIndex((value2) => value2.value === internalState.highlightedValue);
@@ -11056,6 +11090,8 @@ var SelectRoot = ({
11056
11090
  }
11057
11091
  }, [internalState.highlightedValue]);
11058
11092
  const contextValue = {
11093
+ ids,
11094
+ setIds,
11059
11095
  state,
11060
11096
  config,
11061
11097
  item: {
@@ -11074,14 +11110,52 @@ var SelectRoot = ({
11074
11110
  };
11075
11111
  return /* @__PURE__ */ jsx34(SelectContext.Provider, { value: contextValue, children });
11076
11112
  };
11113
+ var SelectRoot = ({ value, onValueChange, onEditComplete, ...props }) => {
11114
+ return /* @__PURE__ */ jsx34(
11115
+ PrimitveSelectRoot,
11116
+ {
11117
+ ...props,
11118
+ isMultiSelect: false,
11119
+ value,
11120
+ onValueChange: (value2) => {
11121
+ onValueChange?.(value2);
11122
+ onEditComplete?.(value2);
11123
+ }
11124
+ }
11125
+ );
11126
+ };
11127
+ var MultiSelectRoot = ({ value, onValueChange, onEditComplete, ...props }) => {
11128
+ return /* @__PURE__ */ jsx34(
11129
+ PrimitveSelectRoot,
11130
+ {
11131
+ ...props,
11132
+ isMultiSelect: true,
11133
+ values: value,
11134
+ onValuesChange: (values) => {
11135
+ onValueChange?.(values);
11136
+ },
11137
+ onClose: () => {
11138
+ onEditComplete?.(value);
11139
+ props.onClose?.();
11140
+ }
11141
+ }
11142
+ );
11143
+ };
11144
+
11145
+ // src/components/user-interaction/select/SelectComponents.tsx
11146
+ import { forwardRef as forwardRef8, useEffect as useEffect18, useImperativeHandle as useImperativeHandle3, useRef as useRef13 } from "react";
11147
+ import clsx13 from "clsx";
11148
+ import { CheckIcon } from "lucide-react";
11149
+ import { createPortal as createPortal5 } from "react-dom";
11150
+ import { jsx as jsx35, jsxs as jsxs17 } from "react/jsx-runtime";
11077
11151
  var SelectOption = forwardRef8(
11078
11152
  function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
11079
11153
  const { state, config, item, trigger } = useSelectContext();
11080
11154
  const { register, unregister, toggleSelection, highlightItem } = item;
11081
- const itemRef = useRef12(null);
11155
+ const itemRef = useRef13(null);
11082
11156
  iconAppearance ??= config.iconAppearance;
11083
11157
  const label = children ?? value;
11084
- useEffect17(() => {
11158
+ useEffect18(() => {
11085
11159
  register({
11086
11160
  value,
11087
11161
  label,
@@ -11131,7 +11205,7 @@ var SelectOption = forwardRef8(
11131
11205
  }
11132
11206
  },
11133
11207
  children: [
11134
- iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx34(
11208
+ iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx35(
11135
11209
  CheckIcon,
11136
11210
  {
11137
11211
  className: clsx13("w-4 h-4", { "opacity-0": !isSelected || disabled }),
@@ -11139,7 +11213,7 @@ var SelectOption = forwardRef8(
11139
11213
  }
11140
11214
  ),
11141
11215
  label,
11142
- iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx34(
11216
+ iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx35(
11143
11217
  CheckIcon,
11144
11218
  {
11145
11219
  className: clsx13("w-4 h-4", { "opacity-0": !isSelected || disabled }),
@@ -11151,13 +11225,26 @@ var SelectOption = forwardRef8(
11151
11225
  );
11152
11226
  }
11153
11227
  );
11154
- var SelectButton = forwardRef8(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
11228
+ var SelectButton = forwardRef8(function SelectButton2({
11229
+ id,
11230
+ placeholder,
11231
+ selectedDisplay,
11232
+ ...props
11233
+ }, ref) {
11155
11234
  const translation = useHightideTranslation();
11156
- const { state, trigger } = useSelectContext();
11235
+ const { state, trigger, setIds, ids } = useSelectContext();
11157
11236
  const { register, unregister, toggleOpen } = trigger;
11158
- const innerRef = useRef12(null);
11237
+ useEffect18(() => {
11238
+ if (id) {
11239
+ setIds((prev) => ({
11240
+ ...prev,
11241
+ trigger: id
11242
+ }));
11243
+ }
11244
+ }, [id, setIds]);
11245
+ const innerRef = useRef13(null);
11159
11246
  useImperativeHandle3(ref, () => innerRef.current);
11160
- useEffect17(() => {
11247
+ useEffect18(() => {
11161
11248
  register(innerRef);
11162
11249
  return () => unregister();
11163
11250
  }, [register, unregister]);
@@ -11169,7 +11256,7 @@ var SelectButton = forwardRef8(function SelectButton2({ placeholder, selectedDis
11169
11256
  {
11170
11257
  ...props,
11171
11258
  ref: innerRef,
11172
- id: state.id,
11259
+ id: ids.trigger,
11173
11260
  disabled,
11174
11261
  type: "button",
11175
11262
  onClick: (event) => {
@@ -11199,206 +11286,140 @@ var SelectButton = forwardRef8(function SelectButton2({ placeholder, selectedDis
11199
11286
  "aria-disabled": disabled,
11200
11287
  "aria-haspopup": "listbox",
11201
11288
  "aria-expanded": state.isOpen,
11202
- "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
11289
+ "aria-controls": state.isOpen ? ids.content : void 0,
11203
11290
  children: [
11204
- hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ jsx34("div", { className: clsx13("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ jsxs17("span", { className: "flex-row-0", children: [
11291
+ hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ jsx35("div", { className: clsx13("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ jsxs17("span", { className: "flex-row-0", children: [
11205
11292
  label,
11206
- index < state.value.length - 1 && /* @__PURE__ */ jsx34("span", { children: "," })
11293
+ index < state.value.length - 1 && /* @__PURE__ */ jsx35("span", { children: "," })
11207
11294
  ] }, value)) }) : placeholder ?? translation("clickToSelect"),
11208
- /* @__PURE__ */ jsx34(ExpansionIcon, { isExpanded: state.isOpen })
11295
+ /* @__PURE__ */ jsx35(ExpansionIcon, { isExpanded: state.isOpen })
11209
11296
  ]
11210
11297
  }
11211
11298
  );
11212
11299
  });
11213
- var SelectChipDisplay = forwardRef8(function SelectChipDisplay2({ ...props }, ref) {
11214
- const { state, trigger, item } = useSelectContext();
11215
- const { register, unregister, toggleOpen } = trigger;
11216
- const innerRef = useRef12(null);
11300
+ var SelectContent = forwardRef8(function SelectContent2({
11301
+ id,
11302
+ alignment,
11303
+ orientation = "vertical",
11304
+ containerClassName,
11305
+ ...props
11306
+ }, ref) {
11307
+ const innerRef = useRef13(null);
11217
11308
  useImperativeHandle3(ref, () => innerRef.current);
11218
- useEffect17(() => {
11219
- register(innerRef);
11220
- return () => unregister();
11221
- }, [register, unregister]);
11222
- const disabled = !!props?.disabled || !!state.disabled;
11223
- const invalid = state.invalid;
11224
- return /* @__PURE__ */ jsxs17(
11225
- "div",
11226
- {
11227
- ...props,
11228
- ref: innerRef,
11229
- onClick: (event) => {
11230
- toggleOpen();
11231
- props.onClick?.(event);
11232
- },
11233
- "data-name": props["data-name"] ?? "select-button-chips",
11234
- "data-value": state.value.length > 0 ? "" : void 0,
11235
- "data-disabled": disabled ? "" : void 0,
11236
- "data-invalid": invalid ? "" : void 0,
11237
- "aria-invalid": invalid,
11238
- "aria-disabled": disabled,
11239
- children: [
11240
- state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ jsxs17(Chip, { className: "gap-x-2", children: [
11241
- label,
11242
- /* @__PURE__ */ jsx34(
11243
- Button,
11309
+ const { trigger, state, config, item, ids, setIds } = useSelectContext();
11310
+ useEffect18(() => {
11311
+ if (id) {
11312
+ setIds((prev) => ({
11313
+ ...prev,
11314
+ content: id
11315
+ }));
11316
+ }
11317
+ }, [id, setIds]);
11318
+ const position = useFloatingElement({
11319
+ active: state.isOpen,
11320
+ anchorRef: trigger.ref,
11321
+ containerRef: innerRef,
11322
+ ...alignment
11323
+ });
11324
+ useFocusTrap({
11325
+ container: innerRef,
11326
+ active: state.isOpen && !!position
11327
+ });
11328
+ const { zIndex } = useOverlayRegistry({ isActive: state.isOpen });
11329
+ return createPortal5(
11330
+ /* @__PURE__ */ jsxs17(
11331
+ "div",
11332
+ {
11333
+ id: ids.content,
11334
+ className: clsx13("fixed inset-0 w-screen h-screen", containerClassName),
11335
+ style: { zIndex },
11336
+ hidden: !state.isOpen,
11337
+ children: [
11338
+ /* @__PURE__ */ jsx35(
11339
+ "div",
11244
11340
  {
11245
- onClick: () => {
11246
- item.toggleSelection(value, false);
11341
+ onClick: () => trigger.toggleOpen(false),
11342
+ className: clsx13("fixed inset-0 w-screen h-screen")
11343
+ }
11344
+ ),
11345
+ /* @__PURE__ */ jsx35(
11346
+ "ul",
11347
+ {
11348
+ ...props,
11349
+ ref: innerRef,
11350
+ onKeyDown: (event) => {
11351
+ switch (event.key) {
11352
+ case "Escape":
11353
+ trigger.toggleOpen(false);
11354
+ event.preventDefault();
11355
+ event.stopPropagation();
11356
+ break;
11357
+ case match(orientation, {
11358
+ vertical: "ArrowDown",
11359
+ horizontal: "ArrowUp"
11360
+ }):
11361
+ item.moveHighlightedIndex(1);
11362
+ event.preventDefault();
11363
+ break;
11364
+ case match(orientation, {
11365
+ vertical: "ArrowUp",
11366
+ horizontal: "ArrowDown"
11367
+ }):
11368
+ item.moveHighlightedIndex(-1);
11369
+ event.preventDefault();
11370
+ break;
11371
+ case "Home":
11372
+ event.preventDefault();
11373
+ break;
11374
+ case "End":
11375
+ event.preventDefault();
11376
+ break;
11377
+ case "Enter":
11378
+ // Fall through
11379
+ case " ":
11380
+ if (state.highlightedValue) {
11381
+ item.toggleSelection(state.highlightedValue);
11382
+ if (!config.isMultiSelect) {
11383
+ trigger.toggleOpen(false);
11384
+ }
11385
+ event.preventDefault();
11386
+ }
11387
+ break;
11388
+ }
11247
11389
  },
11248
- size: "xs",
11249
- color: "negative",
11250
- coloringStyle: "text",
11251
- layout: "icon",
11252
- className: "flex-row-0 items-center",
11253
- children: /* @__PURE__ */ jsx34(XIcon, { className: "size-5" })
11390
+ className: clsx13("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-outline-within overflow-auto", props.className),
11391
+ style: {
11392
+ opacity: position ? void 0 : 0,
11393
+ position: "fixed",
11394
+ ...position
11395
+ },
11396
+ role: "listbox",
11397
+ "aria-multiselectable": config.isMultiSelect,
11398
+ "aria-orientation": orientation,
11399
+ tabIndex: position ? 0 : void 0,
11400
+ children: props.children
11254
11401
  }
11255
11402
  )
11256
- ] }, value)),
11257
- /* @__PURE__ */ jsx34(
11258
- Button,
11259
- {
11260
- id: state.id,
11261
- onClick: (event) => {
11262
- event.stopPropagation();
11263
- toggleOpen();
11264
- },
11265
- onKeyDown: (event) => {
11266
- switch (event.key) {
11267
- case "ArrowDown":
11268
- toggleOpen(true, { highlightStartPositionBehavior: "first" });
11269
- break;
11270
- case "ArrowUp":
11271
- toggleOpen(true, { highlightStartPositionBehavior: "last" });
11272
- }
11273
- },
11274
- layout: "icon",
11275
- size: "sm",
11276
- color: "neutral",
11277
- "aria-invalid": invalid,
11278
- "aria-disabled": disabled,
11279
- "aria-haspopup": "listbox",
11280
- "aria-expanded": state.isOpen,
11281
- "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
11282
- className: "size-9",
11283
- children: /* @__PURE__ */ jsx34(Plus, {})
11284
- }
11285
- )
11286
- ]
11287
- }
11403
+ ]
11404
+ }
11405
+ ),
11406
+ document.body
11288
11407
  );
11289
11408
  });
11290
- var SelectContent = forwardRef8(
11291
- function SelectContent2({
11292
- alignment,
11293
- orientation = "vertical",
11294
- containerClassName,
11295
- ...props
11296
- }, ref) {
11297
- const innerRef = useRef12(null);
11298
- useImperativeHandle3(ref, () => innerRef.current);
11299
- const { trigger, state, config, item } = useSelectContext();
11300
- const position = useFloatingElement({
11301
- active: state.isOpen,
11302
- anchorRef: trigger.ref,
11303
- containerRef: innerRef,
11304
- ...alignment
11305
- });
11306
- useFocusTrap({
11307
- container: innerRef,
11308
- active: state.isOpen && !!position
11309
- });
11310
- const { zIndex } = useOverlayRegistry({ isActive: state.isOpen });
11311
- return createPortal5(
11312
- /* @__PURE__ */ jsxs17(
11313
- "div",
11314
- {
11315
- id: `select-container-${state.id}`,
11316
- className: clsx13("fixed inset-0 w-screen h-screen", containerClassName),
11317
- style: { zIndex },
11318
- hidden: !state.isOpen,
11319
- children: [
11320
- /* @__PURE__ */ jsx34(
11321
- "div",
11322
- {
11323
- id: `select-background-${state.id}`,
11324
- onClick: () => trigger.toggleOpen(false),
11325
- className: clsx13("fixed inset-0 w-screen h-screen")
11326
- }
11327
- ),
11328
- /* @__PURE__ */ jsx34(
11329
- "ul",
11330
- {
11331
- ...props,
11332
- id: `${state.id}-listbox`,
11333
- ref: innerRef,
11334
- onKeyDown: (event) => {
11335
- switch (event.key) {
11336
- case "Escape":
11337
- trigger.toggleOpen(false);
11338
- event.preventDefault();
11339
- event.stopPropagation();
11340
- break;
11341
- case match(orientation, {
11342
- vertical: "ArrowDown",
11343
- horizontal: "ArrowUp"
11344
- }):
11345
- item.moveHighlightedIndex(1);
11346
- event.preventDefault();
11347
- break;
11348
- case match(orientation, {
11349
- vertical: "ArrowUp",
11350
- horizontal: "ArrowDown"
11351
- }):
11352
- item.moveHighlightedIndex(-1);
11353
- event.preventDefault();
11354
- break;
11355
- case "Home":
11356
- event.preventDefault();
11357
- break;
11358
- case "End":
11359
- event.preventDefault();
11360
- break;
11361
- case "Enter":
11362
- // Fall through
11363
- case " ":
11364
- if (state.highlightedValue) {
11365
- item.toggleSelection(state.highlightedValue);
11366
- if (!config.isMultiSelect) {
11367
- trigger.toggleOpen(false);
11368
- }
11369
- event.preventDefault();
11370
- }
11371
- break;
11372
- }
11373
- },
11374
- className: clsx13("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-outline-within overflow-auto", props.className),
11375
- style: {
11376
- opacity: position ? void 0 : 0,
11377
- position: "fixed",
11378
- ...position
11379
- },
11380
- role: "listbox",
11381
- "aria-multiselectable": config.isMultiSelect,
11382
- "aria-orientation": orientation,
11383
- tabIndex: position ? 0 : void 0,
11384
- children: props.children
11385
- }
11386
- )
11387
- ]
11388
- }
11389
- ),
11390
- document.body
11391
- );
11392
- }
11393
- );
11394
- var Select = forwardRef8(function Select2({
11409
+ var MultiSelectOption = SelectOption;
11410
+ var MultiSelectContent = SelectContent;
11411
+ var MultiSelectButton = SelectButton;
11412
+
11413
+ // src/components/user-interaction/select/Select.tsx
11414
+ import { jsx as jsx36, jsxs as jsxs18 } from "react/jsx-runtime";
11415
+ var Select = forwardRef9(function Select2({
11395
11416
  children,
11396
11417
  contentPanelProps,
11397
11418
  buttonProps,
11398
11419
  ...props
11399
11420
  }, ref) {
11400
- return /* @__PURE__ */ jsxs17(SelectRoot, { ...props, isMultiSelect: false, children: [
11401
- /* @__PURE__ */ jsx34(
11421
+ return /* @__PURE__ */ jsxs18(SelectRoot, { ...props, children: [
11422
+ /* @__PURE__ */ jsx36(
11402
11423
  SelectButton,
11403
11424
  {
11404
11425
  ref,
@@ -11410,16 +11431,16 @@ var Select = forwardRef8(function Select2({
11410
11431
  }
11411
11432
  }
11412
11433
  ),
11413
- /* @__PURE__ */ jsx34(SelectContent, { ...contentPanelProps, children })
11434
+ /* @__PURE__ */ jsx36(SelectContent, { ...contentPanelProps, children })
11414
11435
  ] });
11415
11436
  });
11416
- var SelectUncontrolled = forwardRef8(function SelectUncontrolled2({
11437
+ var SelectUncontrolled = forwardRef9(function SelectUncontrolled2({
11417
11438
  value: initialValue,
11418
11439
  onValueChange,
11419
11440
  ...props
11420
11441
  }, ref) {
11421
11442
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
11422
- return /* @__PURE__ */ jsx34(
11443
+ return /* @__PURE__ */ jsx36(
11423
11444
  Select,
11424
11445
  {
11425
11446
  ...props,
@@ -11429,84 +11450,26 @@ var SelectUncontrolled = forwardRef8(function SelectUncontrolled2({
11429
11450
  }
11430
11451
  );
11431
11452
  });
11432
- var MultiSelect = forwardRef8(function MultiSelect2({
11433
- children,
11434
- value,
11435
- onValueChange,
11436
- contentPanelProps,
11437
- buttonProps,
11438
- ...props
11439
- }, ref) {
11440
- return /* @__PURE__ */ jsxs17(SelectRoot, { ...props, values: value, onValuesChange: onValueChange, isMultiSelect: true, children: [
11441
- /* @__PURE__ */ jsx34(SelectButton, { ref, ...buttonProps }),
11442
- /* @__PURE__ */ jsx34(SelectContent, { ...contentPanelProps, children })
11443
- ] });
11444
- });
11445
- var MultiSelectUncontrolled = forwardRef8(function MultiSelectUncontrolled2({
11446
- value: initialValue,
11447
- onValueChange,
11453
+
11454
+ // src/components/layout/dialog/LanguageDialog.tsx
11455
+ import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
11456
+ var LanguageDialog = ({
11457
+ onClose,
11458
+ titleOverwrite,
11459
+ descriptionOverwrite,
11448
11460
  ...props
11449
- }, ref) {
11450
- const [value, setValue] = useOverwritableState(initialValue, onValueChange);
11451
- return /* @__PURE__ */ jsx34(
11452
- MultiSelect,
11461
+ }) => {
11462
+ const { locale, setLocale } = useLocale();
11463
+ const translation = useHightideTranslation();
11464
+ return /* @__PURE__ */ jsx37(
11465
+ Dialog,
11453
11466
  {
11467
+ titleElement: titleOverwrite ?? translation("language"),
11468
+ description: descriptionOverwrite ?? translation("chooseLanguage"),
11469
+ onClose,
11454
11470
  ...props,
11455
- ref,
11456
- value,
11457
- onValueChange: setValue
11458
- }
11459
- );
11460
- });
11461
- var MultiSelectChipDisplay = forwardRef8(function MultiSelectChipDisplay2({
11462
- children,
11463
- value,
11464
- onValueChange,
11465
- contentPanelProps,
11466
- chipDisplayProps,
11467
- ...props
11468
- }, ref) {
11469
- return /* @__PURE__ */ jsxs17(SelectRoot, { ...props, values: value, onValuesChange: onValueChange, isMultiSelect: true, children: [
11470
- /* @__PURE__ */ jsx34(SelectChipDisplay, { ref, ...chipDisplayProps }),
11471
- /* @__PURE__ */ jsx34(SelectContent, { ...contentPanelProps, children })
11472
- ] });
11473
- });
11474
- var MultiSelectChipDisplayUncontrolled = forwardRef8(function MultiSelectChipDisplayUncontrolled2({
11475
- value: initialValue,
11476
- onValueChange,
11477
- ...props
11478
- }, ref) {
11479
- const [value, setValue] = useOverwritableState(initialValue, onValueChange);
11480
- return /* @__PURE__ */ jsx34(
11481
- MultiSelectChipDisplay,
11482
- {
11483
- ...props,
11484
- ref,
11485
- value,
11486
- onValueChange: setValue
11487
- }
11488
- );
11489
- });
11490
-
11491
- // src/components/layout/dialog/LanguageDialog.tsx
11492
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
11493
- var LanguageDialog = ({
11494
- onClose,
11495
- titleOverwrite,
11496
- descriptionOverwrite,
11497
- ...props
11498
- }) => {
11499
- const { locale, setLocale } = useLocale();
11500
- const translation = useHightideTranslation();
11501
- return /* @__PURE__ */ jsx35(
11502
- Dialog,
11503
- {
11504
- titleElement: titleOverwrite ?? translation("language"),
11505
- description: descriptionOverwrite ?? translation("chooseLanguage"),
11506
- onClose,
11507
- ...props,
11508
- children: /* @__PURE__ */ jsxs18("div", { className: "w-64", children: [
11509
- /* @__PURE__ */ jsx35(
11471
+ children: /* @__PURE__ */ jsxs19("div", { className: "w-64", children: [
11472
+ /* @__PURE__ */ jsx37(
11510
11473
  Select,
11511
11474
  {
11512
11475
  value: locale,
@@ -11514,10 +11477,10 @@ var LanguageDialog = ({
11514
11477
  buttonProps: {
11515
11478
  selectedDisplay: (locale2) => LocalizationUtil.languagesLocalNames[locale2]
11516
11479
  },
11517
- children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ jsx35(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
11480
+ children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ jsx37(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
11518
11481
  }
11519
11482
  ),
11520
- /* @__PURE__ */ jsx35("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx35(Button, { color: "positive", onClick: onClose, children: translation("done") }) })
11483
+ /* @__PURE__ */ jsx37("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx37(Button, { color: "positive", onClick: onClose, children: translation("done") }) })
11521
11484
  ] })
11522
11485
  }
11523
11486
  );
@@ -11528,8 +11491,8 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
11528
11491
  import clsx14 from "clsx";
11529
11492
 
11530
11493
  // src/contexts/ThemeContext.tsx
11531
- import { createContext as createContext9, useCallback as useCallback15, useContext as useContext9, useEffect as useEffect18, useMemo as useMemo13, useState as useState20 } from "react";
11532
- import { jsx as jsx36 } from "react/jsx-runtime";
11494
+ import { createContext as createContext9, useCallback as useCallback15, useContext as useContext9, useEffect as useEffect19, useMemo as useMemo13, useState as useState20 } from "react";
11495
+ import { jsx as jsx38 } from "react/jsx-runtime";
11533
11496
  var themes = ["light", "dark", "system"];
11534
11497
  var ThemeUtil = {
11535
11498
  themes
@@ -11555,7 +11518,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
11555
11518
  }
11556
11519
  return initialTheme ?? config.theme.initialTheme;
11557
11520
  }, [config.theme.initialTheme, initialTheme, storedTheme, theme, themePreference]);
11558
- useEffect18(() => {
11521
+ useEffect19(() => {
11559
11522
  if (!theme) return;
11560
11523
  if (theme === "system") {
11561
11524
  deleteStoredTheme();
@@ -11563,7 +11526,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
11563
11526
  setStoredTheme(theme);
11564
11527
  }
11565
11528
  }, [theme]);
11566
- useEffect18(() => {
11529
+ useEffect19(() => {
11567
11530
  document.documentElement.setAttribute("data-theme", resolvedTheme);
11568
11531
  }, [resolvedTheme]);
11569
11532
  const getPreference = useCallback15(() => {
@@ -11571,10 +11534,10 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
11571
11534
  const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
11572
11535
  setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
11573
11536
  }, []);
11574
- useEffect18(() => {
11537
+ useEffect19(() => {
11575
11538
  getPreference();
11576
11539
  }, [getPreference]);
11577
- useEffect18(() => {
11540
+ useEffect19(() => {
11578
11541
  const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
11579
11542
  const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
11580
11543
  const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
@@ -11587,7 +11550,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
11587
11550
  noPrefQuery.removeEventListener("change", getPreference);
11588
11551
  };
11589
11552
  }, [getPreference]);
11590
- return /* @__PURE__ */ jsx36(
11553
+ return /* @__PURE__ */ jsx38(
11591
11554
  ThemeContext.Provider,
11592
11555
  {
11593
11556
  value: {
@@ -11613,14 +11576,14 @@ var useTheme = () => {
11613
11576
  };
11614
11577
 
11615
11578
  // src/components/layout/dialog/ThemeDialog.tsx
11616
- import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
11579
+ import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
11617
11580
  var ThemeIcon = ({ theme, className }) => {
11618
11581
  if (theme === "dark") {
11619
- return /* @__PURE__ */ jsx37(MoonIcon, { className: clsx14("w-4 h-4", className) });
11582
+ return /* @__PURE__ */ jsx39(MoonIcon, { className: clsx14("w-4 h-4", className) });
11620
11583
  } else if (theme === "light") {
11621
- return /* @__PURE__ */ jsx37(SunIcon, { className: clsx14("w-4 h-4", className) });
11584
+ return /* @__PURE__ */ jsx39(SunIcon, { className: clsx14("w-4 h-4", className) });
11622
11585
  } else {
11623
- return /* @__PURE__ */ jsx37(MonitorCog, { className: clsx14("w-4 h-4", className) });
11586
+ return /* @__PURE__ */ jsx39(MonitorCog, { className: clsx14("w-4 h-4", className) });
11624
11587
  }
11625
11588
  };
11626
11589
  var ThemeDialog = ({
@@ -11631,34 +11594,34 @@ var ThemeDialog = ({
11631
11594
  }) => {
11632
11595
  const { theme, setTheme } = useTheme();
11633
11596
  const translation = useHightideTranslation();
11634
- return /* @__PURE__ */ jsx37(
11597
+ return /* @__PURE__ */ jsx39(
11635
11598
  Dialog,
11636
11599
  {
11637
11600
  titleElement: titleOverwrite ?? translation("pThemes", { count: 1 }),
11638
11601
  description: descriptionOverwrite ?? translation("chooseTheme"),
11639
11602
  onClose,
11640
11603
  ...props,
11641
- children: /* @__PURE__ */ jsxs19("div", { className: "w-64", children: [
11642
- /* @__PURE__ */ jsx37(
11604
+ children: /* @__PURE__ */ jsxs20("div", { className: "w-64", children: [
11605
+ /* @__PURE__ */ jsx39(
11643
11606
  Select,
11644
11607
  {
11645
11608
  value: theme,
11646
11609
  onValueChange: (theme2) => setTheme(theme2),
11647
11610
  iconAppearance: "right",
11648
11611
  buttonProps: {
11649
- selectedDisplay: (value) => /* @__PURE__ */ jsxs19("div", { className: "flex-row-2 items-center", children: [
11650
- /* @__PURE__ */ jsx37(ThemeIcon, { theme }),
11612
+ selectedDisplay: (value) => /* @__PURE__ */ jsxs20("div", { className: "flex-row-2 items-center", children: [
11613
+ /* @__PURE__ */ jsx39(ThemeIcon, { theme }),
11651
11614
  translation("sThemeMode", { theme: value })
11652
11615
  ] }),
11653
11616
  className: "min-w-32"
11654
11617
  },
11655
- children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ jsx37(SelectOption, { value: theme2, className: "gap-x-6 justify-between", children: /* @__PURE__ */ jsxs19("div", { className: "flex-row-2 items-center", children: [
11656
- /* @__PURE__ */ jsx37(ThemeIcon, { theme: theme2 }),
11618
+ children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ jsx39(SelectOption, { value: theme2, className: "gap-x-6 justify-between", children: /* @__PURE__ */ jsxs20("div", { className: "flex-row-2 items-center", children: [
11619
+ /* @__PURE__ */ jsx39(ThemeIcon, { theme: theme2 }),
11657
11620
  translation("sThemeMode", { theme: theme2 })
11658
11621
  ] }) }, theme2))
11659
11622
  }
11660
11623
  ),
11661
- /* @__PURE__ */ jsx37("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx37(Button, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
11624
+ /* @__PURE__ */ jsx39("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx39(Button, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
11662
11625
  ] })
11663
11626
  }
11664
11627
  );
@@ -11667,14 +11630,14 @@ var ThemeDialog = ({
11667
11630
  // src/components/layout/loading/ErrorComponent.tsx
11668
11631
  import { AlertOctagon } from "lucide-react";
11669
11632
  import clsx15 from "clsx";
11670
- import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
11633
+ import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
11671
11634
  var ErrorComponent = ({
11672
11635
  errorText,
11673
11636
  classname
11674
11637
  }) => {
11675
11638
  const translation = useHightideTranslation();
11676
- return /* @__PURE__ */ jsxs20("div", { className: clsx15("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11677
- /* @__PURE__ */ jsx38(AlertOctagon, { size: 64, className: "text-warning" }),
11639
+ return /* @__PURE__ */ jsxs21("div", { className: clsx15("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11640
+ /* @__PURE__ */ jsx40(AlertOctagon, { size: 64, className: "text-warning" }),
11678
11641
  errorText ?? `${translation("errorOccurred")} :(`
11679
11642
  ] });
11680
11643
  };
@@ -11684,14 +11647,14 @@ import { useState as useState21 } from "react";
11684
11647
 
11685
11648
  // src/components/layout/loading/LoadingContainer.tsx
11686
11649
  import { clsx as clsx16 } from "clsx";
11687
- import { jsx as jsx39 } from "react/jsx-runtime";
11650
+ import { jsx as jsx41 } from "react/jsx-runtime";
11688
11651
  var LoadingContainer = ({ className }) => {
11689
- return /* @__PURE__ */ jsx39("div", { className: clsx16("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11652
+ return /* @__PURE__ */ jsx41("div", { className: clsx16("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11690
11653
  };
11691
11654
 
11692
11655
  // src/components/layout/loading/LoadingAndErrorComponent.tsx
11693
11656
  import { clsx as clsx17 } from "clsx";
11694
- import { Fragment as Fragment5, jsx as jsx40 } from "react/jsx-runtime";
11657
+ import { Fragment as Fragment5, jsx as jsx42 } from "react/jsx-runtime";
11695
11658
  var LoadingAndErrorComponent = ({
11696
11659
  children,
11697
11660
  isLoading = false,
@@ -11711,33 +11674,33 @@ var LoadingAndErrorComponent = ({
11711
11674
  }, minimumLoadingDuration);
11712
11675
  }
11713
11676
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
11714
- return /* @__PURE__ */ jsx40(Fragment5, { children: loadingComponent ?? /* @__PURE__ */ jsx40(LoadingContainer, { className: clsx17(className) }) });
11677
+ return /* @__PURE__ */ jsx42(Fragment5, { children: loadingComponent ?? /* @__PURE__ */ jsx42(LoadingContainer, { className: clsx17(className) }) });
11715
11678
  }
11716
11679
  if (hasError) {
11717
- return /* @__PURE__ */ jsx40(Fragment5, { children: errorComponent ?? /* @__PURE__ */ jsx40(LoadingContainer, { className: clsx17("bg-negative", className) }) });
11680
+ return /* @__PURE__ */ jsx42(Fragment5, { children: errorComponent ?? /* @__PURE__ */ jsx42(LoadingContainer, { className: clsx17("bg-negative", className) }) });
11718
11681
  }
11719
- return /* @__PURE__ */ jsx40(Fragment5, { children });
11682
+ return /* @__PURE__ */ jsx42(Fragment5, { children });
11720
11683
  };
11721
11684
 
11722
11685
  // src/components/layout/loading/LoadingAnimation.tsx
11723
11686
  import clsx18 from "clsx";
11724
- import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
11687
+ import { jsx as jsx43, jsxs as jsxs22 } from "react/jsx-runtime";
11725
11688
  var LoadingAnimation = ({
11726
11689
  loadingText,
11727
11690
  classname
11728
11691
  }) => {
11729
11692
  const translation = useHightideTranslation();
11730
- return /* @__PURE__ */ jsxs21("div", { className: clsx18("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11731
- /* @__PURE__ */ jsx41(HelpwaveLogo, { animate: "loading" }),
11693
+ return /* @__PURE__ */ jsxs22("div", { className: clsx18("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11694
+ /* @__PURE__ */ jsx43(HelpwaveLogo, { animate: "loading" }),
11732
11695
  loadingText ?? `${translation("loading")}...`
11733
11696
  ] });
11734
11697
  };
11735
11698
 
11736
11699
  // src/components/layout/navigation/BreadCrumbs.tsx
11737
11700
  var import_link = __toESM(require_link2());
11738
- import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
11701
+ import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
11739
11702
  var BreadCrumbLink = ({ ...props }) => {
11740
- return /* @__PURE__ */ jsx42(
11703
+ return /* @__PURE__ */ jsx44(
11741
11704
  import_link.default,
11742
11705
  {
11743
11706
  ...props,
@@ -11746,29 +11709,29 @@ var BreadCrumbLink = ({ ...props }) => {
11746
11709
  );
11747
11710
  };
11748
11711
  var BreadCrumbDivider = () => {
11749
- return /* @__PURE__ */ jsx42("span", { "data-name": "breadcrumb-divider", children: "/" });
11712
+ return /* @__PURE__ */ jsx44("span", { "data-name": "breadcrumb-divider", children: "/" });
11750
11713
  };
11751
11714
  var BreadCrumbGroup = ({ children, divider, ...props }) => {
11752
11715
  const items = ArrayUtil.resolveSingleOrArray(children);
11753
- return /* @__PURE__ */ jsx42("ul", { ...props, "data-name": props["data-name"] ?? "breadcrumb", children: items.map((item, index) => {
11716
+ return /* @__PURE__ */ jsx44("ul", { ...props, "data-name": props["data-name"] ?? "breadcrumb", children: items.map((item, index) => {
11754
11717
  const isLast = index === items.length - 1;
11755
- return /* @__PURE__ */ jsxs22("li", { "data-name": "breadcrumb-item", children: [
11718
+ return /* @__PURE__ */ jsxs23("li", { "data-name": "breadcrumb-item", children: [
11756
11719
  item,
11757
- !isLast && divider !== null && (divider ?? /* @__PURE__ */ jsx42(BreadCrumbDivider, {}))
11720
+ !isLast && divider !== null && (divider ?? /* @__PURE__ */ jsx44(BreadCrumbDivider, {}))
11758
11721
  ] }, index);
11759
11722
  }) });
11760
11723
  };
11761
11724
  var BreadCrumbs = ({ crumbs }) => {
11762
- return /* @__PURE__ */ jsx42(BreadCrumbGroup, { children: crumbs.map(({ href, label }, index) => /* @__PURE__ */ jsx42(BreadCrumbLink, { href, children: label }, index)) });
11725
+ return /* @__PURE__ */ jsx44(BreadCrumbGroup, { children: crumbs.map(({ href, label }, index) => /* @__PURE__ */ jsx44(BreadCrumbLink, { href, children: label }, index)) });
11763
11726
  };
11764
11727
 
11765
11728
  // src/components/layout/navigation/Navigation.tsx
11766
11729
  var import_link2 = __toESM(require_link2());
11767
- import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
11768
- import { useEffect as useEffect19 } from "react";
11769
- import { useCallback as useCallback16, useId as useId10, useRef as useRef13, useState as useState22 } from "react";
11730
+ import { Menu as MenuIcon, XIcon } from "lucide-react";
11731
+ import { useEffect as useEffect20 } from "react";
11732
+ import { useCallback as useCallback16, useId as useId10, useRef as useRef14, useState as useState22 } from "react";
11770
11733
  import clsx19 from "clsx";
11771
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
11734
+ import { Fragment as Fragment6, jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
11772
11735
  function isSubItem(item) {
11773
11736
  return "items" in item && Array.isArray(item.items);
11774
11737
  }
@@ -11779,8 +11742,8 @@ var NavigationItemWithSubItem = ({
11779
11742
  ...options
11780
11743
  }) => {
11781
11744
  const [isOpen, setOpen] = useState22(false);
11782
- const containerRef = useRef13(null);
11783
- const triggerRef = useRef13(null);
11745
+ const containerRef = useRef14(null);
11746
+ const triggerRef = useRef14(null);
11784
11747
  const id = useId10();
11785
11748
  const style = useFloatingElement({
11786
11749
  active: isOpen,
@@ -11796,8 +11759,8 @@ var NavigationItemWithSubItem = ({
11796
11759
  }
11797
11760
  }, []);
11798
11761
  const { zIndex } = useOverlayRegistry();
11799
- return /* @__PURE__ */ jsxs23(Fragment6, { children: [
11800
- /* @__PURE__ */ jsxs23(
11762
+ return /* @__PURE__ */ jsxs24(Fragment6, { children: [
11763
+ /* @__PURE__ */ jsxs24(
11801
11764
  "button",
11802
11765
  {
11803
11766
  id: "navigation-" + id,
@@ -11813,11 +11776,11 @@ var NavigationItemWithSubItem = ({
11813
11776
  "aria-controls": "navigation-items-" + id,
11814
11777
  children: [
11815
11778
  label,
11816
- /* @__PURE__ */ jsx43(ExpansionIcon, { isExpanded: isOpen })
11779
+ /* @__PURE__ */ jsx45(ExpansionIcon, { isExpanded: isOpen })
11817
11780
  ]
11818
11781
  }
11819
11782
  ),
11820
- /* @__PURE__ */ jsx43(
11783
+ /* @__PURE__ */ jsx45(
11821
11784
  "ul",
11822
11785
  {
11823
11786
  id: "navigation-items-" + id,
@@ -11836,7 +11799,7 @@ var NavigationItemWithSubItem = ({
11836
11799
  { "opacity-0": !style }
11837
11800
  ),
11838
11801
  style: { ...style, zIndex },
11839
- children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsx43(
11802
+ children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ jsx45("li", { children: /* @__PURE__ */ jsx45(
11840
11803
  import_link2.default,
11841
11804
  {
11842
11805
  href: link,
@@ -11850,25 +11813,25 @@ var NavigationItemWithSubItem = ({
11850
11813
  ] });
11851
11814
  };
11852
11815
  var NavigationItemList = ({ items, ...restProps }) => {
11853
- return /* @__PURE__ */ jsx43("ul", { ...restProps, className: clsx19("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx43("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx43(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx43(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11816
+ return /* @__PURE__ */ jsx45("ul", { ...restProps, className: clsx19("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx45("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx45(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx45(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11854
11817
  };
11855
11818
  var Navigation = ({ ...props }) => {
11856
11819
  const [isMobileOpen, setIsMobileOpen] = useState22(false);
11857
11820
  const id = useId10();
11858
- const menuRef = useRef13(null);
11859
- useEffect19(() => {
11821
+ const menuRef = useRef14(null);
11822
+ useEffect20(() => {
11860
11823
  menuRef.current?.focus();
11861
11824
  }, [isMobileOpen]);
11862
11825
  const { zIndex } = useOverlayRegistry({ isActive: isMobileOpen });
11863
- return /* @__PURE__ */ jsxs23("nav", { children: [
11864
- /* @__PURE__ */ jsx43(
11826
+ return /* @__PURE__ */ jsxs24("nav", { children: [
11827
+ /* @__PURE__ */ jsx45(
11865
11828
  NavigationItemList,
11866
11829
  {
11867
11830
  ...props,
11868
11831
  className: clsx19("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11869
11832
  }
11870
11833
  ),
11871
- /* @__PURE__ */ jsx43(
11834
+ /* @__PURE__ */ jsx45(
11872
11835
  Button,
11873
11836
  {
11874
11837
  layout: "icon",
@@ -11879,10 +11842,10 @@ var Navigation = ({ ...props }) => {
11879
11842
  "aria-haspopup": "true",
11880
11843
  "aria-expanded": isMobileOpen,
11881
11844
  "aria-controls": "navigation-menu-" + id,
11882
- children: /* @__PURE__ */ jsx43(MenuIcon, { className: "w-6 h-6" })
11845
+ children: /* @__PURE__ */ jsx45(MenuIcon, { className: "w-6 h-6" })
11883
11846
  }
11884
11847
  ),
11885
- /* @__PURE__ */ jsxs23(
11848
+ /* @__PURE__ */ jsxs24(
11886
11849
  "div",
11887
11850
  {
11888
11851
  id: "navigation-menu-" + id,
@@ -11904,17 +11867,17 @@ var Navigation = ({ ...props }) => {
11904
11867
  ),
11905
11868
  style: { zIndex },
11906
11869
  children: [
11907
- /* @__PURE__ */ jsx43(
11870
+ /* @__PURE__ */ jsx45(
11908
11871
  Button,
11909
11872
  {
11910
11873
  layout: "icon",
11911
11874
  coloringStyle: "text",
11912
11875
  color: "neutral",
11913
11876
  onClick: () => setIsMobileOpen(false),
11914
- children: /* @__PURE__ */ jsx43(XIcon2, {})
11877
+ children: /* @__PURE__ */ jsx45(XIcon, {})
11915
11878
  }
11916
11879
  ),
11917
- /* @__PURE__ */ jsx43(NavigationItemList, { ...props, className: clsx19("flex-col-8", props.className) })
11880
+ /* @__PURE__ */ jsx45(NavigationItemList, { ...props, className: clsx19("flex-col-8", props.className) })
11918
11881
  ]
11919
11882
  }
11920
11883
  )
@@ -11924,8 +11887,8 @@ var Navigation = ({ ...props }) => {
11924
11887
  // src/components/layout/navigation/Pagination.tsx
11925
11888
  import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
11926
11889
  import clsx20 from "clsx";
11927
- import { useEffect as useEffect20, useState as useState23 } from "react";
11928
- import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
11890
+ import { useEffect as useEffect21, useState as useState23 } from "react";
11891
+ import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
11929
11892
  var Pagination = ({
11930
11893
  pageIndex,
11931
11894
  pageCount,
@@ -11938,7 +11901,7 @@ var Pagination = ({
11938
11901
  const noPages = pageCount === 0;
11939
11902
  const onFirstPage = pageIndex === 0 && !noPages;
11940
11903
  const onLastPage = pageIndex === pageCount - 1;
11941
- useEffect20(() => {
11904
+ useEffect21(() => {
11942
11905
  if (noPages) {
11943
11906
  setValue("0");
11944
11907
  } else {
@@ -11948,8 +11911,8 @@ var Pagination = ({
11948
11911
  const changePage = (page) => {
11949
11912
  onPageChanged(page);
11950
11913
  };
11951
- return /* @__PURE__ */ jsxs24("div", { className: clsx20("flex-row-1", className), style, children: [
11952
- /* @__PURE__ */ jsx44(
11914
+ return /* @__PURE__ */ jsxs25("div", { className: clsx20("flex-row-1", className), style, children: [
11915
+ /* @__PURE__ */ jsx46(
11953
11916
  Button,
11954
11917
  {
11955
11918
  layout: "icon",
@@ -11957,10 +11920,10 @@ var Pagination = ({
11957
11920
  color: "neutral",
11958
11921
  onClick: () => changePage(0),
11959
11922
  disabled: onFirstPage || noPages,
11960
- children: /* @__PURE__ */ jsx44(ChevronFirst, {})
11923
+ children: /* @__PURE__ */ jsx46(ChevronFirst, {})
11961
11924
  }
11962
11925
  ),
11963
- /* @__PURE__ */ jsx44(
11926
+ /* @__PURE__ */ jsx46(
11964
11927
  Button,
11965
11928
  {
11966
11929
  layout: "icon",
@@ -11968,11 +11931,11 @@ var Pagination = ({
11968
11931
  color: "neutral",
11969
11932
  onClick: () => changePage(pageIndex - 1),
11970
11933
  disabled: onFirstPage || noPages,
11971
- children: /* @__PURE__ */ jsx44(ChevronLeft2, {})
11934
+ children: /* @__PURE__ */ jsx46(ChevronLeft2, {})
11972
11935
  }
11973
11936
  ),
11974
- /* @__PURE__ */ jsxs24("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
11975
- /* @__PURE__ */ jsx44(
11937
+ /* @__PURE__ */ jsxs25("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
11938
+ /* @__PURE__ */ jsx46(
11976
11939
  Input,
11977
11940
  {
11978
11941
  value,
@@ -11996,8 +11959,8 @@ var Pagination = ({
11996
11959
  editCompleteOptions: { delay: 800 }
11997
11960
  }
11998
11961
  ),
11999
- /* @__PURE__ */ jsx44("span", { className: "select-none w-10", children: translation("of") }),
12000
- /* @__PURE__ */ jsx44(
11962
+ /* @__PURE__ */ jsx46("span", { className: "select-none w-10", children: translation("of") }),
11963
+ /* @__PURE__ */ jsx46(
12001
11964
  "span",
12002
11965
  {
12003
11966
  className: "flex-row-2 w-24 items-center justify-center select-none h-10 bg-input-background text-input-text rounded-md font-bold",
@@ -12005,7 +11968,7 @@ var Pagination = ({
12005
11968
  }
12006
11969
  )
12007
11970
  ] }),
12008
- /* @__PURE__ */ jsx44(
11971
+ /* @__PURE__ */ jsx46(
12009
11972
  Button,
12010
11973
  {
12011
11974
  layout: "icon",
@@ -12013,10 +11976,10 @@ var Pagination = ({
12013
11976
  color: "neutral",
12014
11977
  onClick: () => changePage(pageIndex + 1),
12015
11978
  disabled: onLastPage || noPages,
12016
- children: /* @__PURE__ */ jsx44(ChevronRight2, {})
11979
+ children: /* @__PURE__ */ jsx46(ChevronRight2, {})
12017
11980
  }
12018
11981
  ),
12019
- /* @__PURE__ */ jsx44(
11982
+ /* @__PURE__ */ jsx46(
12020
11983
  Button,
12021
11984
  {
12022
11985
  layout: "icon",
@@ -12024,7 +11987,7 @@ var Pagination = ({
12024
11987
  color: "neutral",
12025
11988
  onClick: () => changePage(pageCount - 1),
12026
11989
  disabled: onLastPage || noPages,
12027
- children: /* @__PURE__ */ jsx44(ChevronLast, {})
11990
+ children: /* @__PURE__ */ jsx46(ChevronLast, {})
12028
11991
  }
12029
11992
  )
12030
11993
  ] });
@@ -12033,7 +11996,7 @@ var Pagination = ({
12033
11996
  // src/components/layout/navigation/StepperBar.tsx
12034
11997
  import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
12035
11998
  import clsx21 from "clsx";
12036
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
11999
+ import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
12037
12000
  var defaultState = {
12038
12001
  currentStep: 0,
12039
12002
  seenSteps: /* @__PURE__ */ new Set([0])
@@ -12055,12 +12018,12 @@ var StepperBar = ({
12055
12018
  seenSteps.add(newStep);
12056
12019
  onChange({ currentStep: newStep, seenSteps });
12057
12020
  };
12058
- return /* @__PURE__ */ jsxs25(
12021
+ return /* @__PURE__ */ jsxs26(
12059
12022
  "div",
12060
12023
  {
12061
12024
  className: clsx21("flex-row-2 justify-between", className),
12062
12025
  children: [
12063
- /* @__PURE__ */ jsx45("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ jsxs25(
12026
+ /* @__PURE__ */ jsx47("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ jsxs26(
12064
12027
  Button,
12065
12028
  {
12066
12029
  disabled: currentStep === 0 || disabledSteps.has(currentStep),
@@ -12069,14 +12032,14 @@ var StepperBar = ({
12069
12032
  },
12070
12033
  className: "flex-row-1 items-center justify-center",
12071
12034
  children: [
12072
- /* @__PURE__ */ jsx45(ChevronLeft3, { size: 14 }),
12035
+ /* @__PURE__ */ jsx47(ChevronLeft3, { size: 14 }),
12073
12036
  translation("back")
12074
12037
  ]
12075
12038
  }
12076
12039
  ) }),
12077
- /* @__PURE__ */ jsx45("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
12040
+ /* @__PURE__ */ jsx47("div", { className: "flex-row-2 flex-[5] justify-center items-center", children: showDots && dots.map((value, index) => {
12078
12041
  const seen = seenSteps.has(index);
12079
- return /* @__PURE__ */ jsx45(
12042
+ return /* @__PURE__ */ jsx47(
12080
12043
  "div",
12081
12044
  {
12082
12045
  onClick: () => seen && update(index),
@@ -12096,7 +12059,7 @@ var StepperBar = ({
12096
12059
  index
12097
12060
  );
12098
12061
  }) }),
12099
- currentStep !== numberOfSteps && /* @__PURE__ */ jsx45("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs25(
12062
+ currentStep !== numberOfSteps && /* @__PURE__ */ jsx47("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs26(
12100
12063
  Button,
12101
12064
  {
12102
12065
  onClick: () => update(currentStep + 1),
@@ -12104,18 +12067,18 @@ var StepperBar = ({
12104
12067
  disabled: disabledSteps.has(currentStep),
12105
12068
  children: [
12106
12069
  translation("next"),
12107
- /* @__PURE__ */ jsx45(ChevronRight3, { size: 14 })
12070
+ /* @__PURE__ */ jsx47(ChevronRight3, { size: 14 })
12108
12071
  ]
12109
12072
  }
12110
12073
  ) }),
12111
- currentStep === numberOfSteps && /* @__PURE__ */ jsx45("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs25(
12074
+ currentStep === numberOfSteps && /* @__PURE__ */ jsx47("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ jsxs26(
12112
12075
  Button,
12113
12076
  {
12114
12077
  disabled: disabledSteps.has(currentStep),
12115
12078
  onClick: onFinish,
12116
12079
  className: "flex-row-1 items-center justify-center",
12117
12080
  children: [
12118
- /* @__PURE__ */ jsx45(Check, { size: 14 }),
12081
+ /* @__PURE__ */ jsx47(Check, { size: 14 }),
12119
12082
  finishText ?? translation("confirm")
12120
12083
  ]
12121
12084
  }
@@ -12126,7 +12089,7 @@ var StepperBar = ({
12126
12089
  };
12127
12090
  var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
12128
12091
  const [usedState, setUsedState] = useOverwritableState(state, onChange);
12129
- return /* @__PURE__ */ jsx45(
12092
+ return /* @__PURE__ */ jsx47(
12130
12093
  StepperBar,
12131
12094
  {
12132
12095
  ...props,
@@ -12138,14 +12101,14 @@ var StepperBarUncontrolled = ({ state, onChange, ...props }) => {
12138
12101
 
12139
12102
  // src/components/layout/table/FillerCell.tsx
12140
12103
  import { Minus } from "lucide-react";
12141
- import { jsx as jsx46 } from "react/jsx-runtime";
12104
+ import { jsx as jsx48 } from "react/jsx-runtime";
12142
12105
  var FillerCell = ({ ...props }) => {
12143
- return /* @__PURE__ */ jsx46(
12106
+ return /* @__PURE__ */ jsx48(
12144
12107
  "div",
12145
12108
  {
12146
12109
  ...props,
12147
12110
  "data-name": PropsUtil.dataAttributes.name("table-filler-cell"),
12148
- children: /* @__PURE__ */ jsx46(Minus, { className: "max-w-4 max-h-4" })
12111
+ children: /* @__PURE__ */ jsx48(Minus, { className: "max-w-4 max-h-4" })
12149
12112
  }
12150
12113
  );
12151
12114
  };
@@ -12165,7 +12128,7 @@ var TableFilters = {
12165
12128
  };
12166
12129
 
12167
12130
  // src/components/layout/table/Table.tsx
12168
- import { useCallback as useCallback20, useEffect as useEffect26, useMemo as useMemo15, useRef as useRef16, useState as useState28 } from "react";
12131
+ import { useCallback as useCallback20, useEffect as useEffect28, useMemo as useMemo15, useRef as useRef17, useState as useState28 } from "react";
12169
12132
  import clsx26 from "clsx";
12170
12133
  import {
12171
12134
  flexRender,
@@ -12178,18 +12141,18 @@ import {
12178
12141
 
12179
12142
  // src/components/layout/table/TableCell.tsx
12180
12143
  import { clsx as clsx22 } from "clsx";
12181
- import { jsx as jsx47 } from "react/jsx-runtime";
12144
+ import { jsx as jsx49 } from "react/jsx-runtime";
12182
12145
  var TableCell = ({
12183
12146
  children,
12184
12147
  className
12185
12148
  }) => {
12186
- return /* @__PURE__ */ jsx47("span", { className: clsx22("block max-w-full overflow-ellipsis truncate", className), children });
12149
+ return /* @__PURE__ */ jsx49("span", { className: clsx22("block max-w-full overflow-ellipsis truncate", className), children });
12187
12150
  };
12188
12151
 
12189
12152
  // src/hooks/useResizeCallbackWrapper.ts
12190
- import { useEffect as useEffect21 } from "react";
12153
+ import { useEffect as useEffect22 } from "react";
12191
12154
  var useResizeCallbackWrapper = (callback) => {
12192
- useEffect21(() => {
12155
+ useEffect22(() => {
12193
12156
  window.addEventListener("resize", callback);
12194
12157
  return () => {
12195
12158
  window.removeEventListener("resize", callback);
@@ -12202,37 +12165,33 @@ import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp as ChevronUp2 }
12202
12165
  import clsx24 from "clsx";
12203
12166
 
12204
12167
  // src/components/user-interaction/Tooltip.tsx
12205
- import { useCallback as useCallback17, useMemo as useMemo14, useRef as useRef14, useState as useState24 } from "react";
12168
+ import { useEffect as useEffect23 } from "react";
12169
+ import { useId as useId11 } from "react";
12170
+ import { useCallback as useCallback17, useMemo as useMemo14, useRef as useRef15, useState as useState24 } from "react";
12206
12171
  import { clsx as clsx23 } from "clsx";
12207
12172
  import { createPortal as createPortal6 } from "react-dom";
12208
- import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
12173
+ import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
12209
12174
  var Tooltip = ({
12210
12175
  tooltip,
12211
12176
  children,
12212
- appearDelay: appearDelayOverwrite,
12213
- disappearDelay: disappearDelayOverwrite,
12177
+ appearDelay: appearOverwrite,
12214
12178
  tooltipClassName,
12215
12179
  containerClassName,
12216
12180
  position = "bottom",
12217
12181
  disabled = false
12218
12182
  }) => {
12219
- const [state, setState] = useState24({
12220
- isShown: false,
12221
- timer: null
12222
- });
12183
+ const id = useId11();
12184
+ const [open, setOpen] = useState24(false);
12185
+ const timeoutRef = useRef15(null);
12223
12186
  const { config } = useHightideConfig();
12224
12187
  const appearDelay = useMemo14(
12225
- () => appearDelayOverwrite ?? config.tooltip.appearDelay,
12226
- [config.tooltip.appearDelay, appearDelayOverwrite]
12188
+ () => appearOverwrite ?? config.tooltip.appearDelay,
12189
+ [appearOverwrite, config.tooltip.appearDelay]
12227
12190
  );
12228
- const disappearDelay = useMemo14(
12229
- () => disappearDelayOverwrite ?? config.tooltip.disappearDelay,
12230
- [config.tooltip.disappearDelay, disappearDelayOverwrite]
12231
- );
12232
- const anchorRef = useRef14(null);
12233
- const containerRef = useRef14(null);
12234
- const triangleRef = useRef14(null);
12235
- const isActive = !disabled && state.isShown;
12191
+ const anchorRef = useRef15(null);
12192
+ const containerRef = useRef15(null);
12193
+ const triangleRef = useRef15(null);
12194
+ const isActive = !disabled && open;
12236
12195
  const { isVisible, transitionState, callbacks } = useTransitionState(
12237
12196
  useMemo14(() => ({ isOpen: isActive }), [isActive])
12238
12197
  );
@@ -12261,66 +12220,62 @@ var Tooltip = ({
12261
12220
  const regsitryOptions = useMemo14(() => ({ isActive }), [isActive]);
12262
12221
  const { zIndex } = useOverlayRegistry(regsitryOptions);
12263
12222
  const { zIndex: zIndexTriangle } = useOverlayRegistry(regsitryOptions);
12264
- const onEnter = useCallback17(() => {
12265
- setState((prevState) => {
12266
- if (prevState.isShown) {
12267
- clearTimeout(prevState.timer);
12268
- return {
12269
- ...prevState,
12270
- timer: null
12271
- };
12272
- }
12273
- return {
12274
- ...prevState,
12275
- timer: setTimeout(() => {
12276
- setState((prevState2) => {
12277
- clearTimeout(prevState2.timer);
12278
- return { ...prevState2, isShown: true, timer: null };
12279
- });
12280
- }, appearDelay)
12281
- };
12282
- });
12283
- }, [appearDelay]);
12284
- const onLeave = useCallback17(() => {
12285
- setState((prevState) => {
12286
- if (!prevState.isShown) {
12287
- clearTimeout(prevState.timer);
12288
- return {
12289
- ...prevState,
12290
- timer: null
12291
- };
12223
+ const openWithDelay = useCallback17(() => {
12224
+ if (timeoutRef.current || open) return;
12225
+ timeoutRef.current = window.setTimeout(() => {
12226
+ timeoutRef.current = null;
12227
+ setOpen(true);
12228
+ }, appearDelay);
12229
+ }, [appearDelay, open]);
12230
+ const close3 = useCallback17(() => {
12231
+ if (timeoutRef.current) {
12232
+ clearTimeout(timeoutRef.current);
12233
+ timeoutRef.current = null;
12234
+ }
12235
+ setOpen(false);
12236
+ }, []);
12237
+ useEffect23(() => {
12238
+ if (!open) return;
12239
+ const closeOnBlur = () => close3();
12240
+ const closeOnScroll = () => close3();
12241
+ window.addEventListener("blur", closeOnBlur);
12242
+ window.addEventListener("scroll", closeOnScroll, true);
12243
+ return () => {
12244
+ window.removeEventListener("blur", closeOnBlur);
12245
+ window.removeEventListener("scroll", closeOnScroll, true);
12246
+ };
12247
+ }, [open, close3]);
12248
+ useEffect23(() => {
12249
+ return () => {
12250
+ if (timeoutRef.current) {
12251
+ clearTimeout(timeoutRef.current);
12292
12252
  }
12293
- clearTimeout(prevState.timer);
12294
- return {
12295
- ...prevState,
12296
- timer: setTimeout(() => {
12297
- setState((prevState2) => {
12298
- clearTimeout(prevState2.timer);
12299
- return { ...prevState2, isShown: false, timer: null };
12300
- });
12301
- }, disappearDelay)
12302
- };
12303
- });
12304
- }, [disappearDelay]);
12305
- return /* @__PURE__ */ jsxs26(
12253
+ };
12254
+ }, []);
12255
+ return /* @__PURE__ */ jsxs27(
12306
12256
  "div",
12307
12257
  {
12308
12258
  ref: anchorRef,
12309
12259
  className: clsx23("relative inline-block", containerClassName),
12310
- onPointerEnter: onEnter,
12311
- onPointerLeave: onLeave,
12260
+ "aria-describedby": isVisible ? id : void 0,
12261
+ onPointerEnter: openWithDelay,
12262
+ onPointerLeave: close3,
12263
+ onPointerCancel: close3,
12264
+ onFocus: openWithDelay,
12265
+ onBlur: close3,
12312
12266
  children: [
12313
12267
  children,
12314
- /* @__PURE__ */ jsxs26(Visibility, { isVisible: isActive || isVisible, children: [
12268
+ /* @__PURE__ */ jsxs27(Visibility, { isVisible: isActive || isVisible, children: [
12315
12269
  createPortal6(
12316
- /* @__PURE__ */ jsx48(
12270
+ /* @__PURE__ */ jsx50(
12317
12271
  "div",
12318
12272
  {
12319
12273
  ref: containerRef,
12274
+ id,
12320
12275
  ...callbacks,
12321
- onPointerEnter: onEnter,
12322
12276
  "data-name": PropsUtil.dataAttributes.name("tooltip"),
12323
12277
  "data-state": transitionState,
12278
+ role: "tooltip",
12324
12279
  className: tooltipClassName,
12325
12280
  style: { ...css, zIndex },
12326
12281
  children: tooltip
@@ -12329,7 +12284,7 @@ var Tooltip = ({
12329
12284
  document.body
12330
12285
  ),
12331
12286
  createPortal6(
12332
- /* @__PURE__ */ jsx48(
12287
+ /* @__PURE__ */ jsx50(
12333
12288
  "div",
12334
12289
  {
12335
12290
  ref: triangleRef,
@@ -12348,7 +12303,7 @@ var Tooltip = ({
12348
12303
  };
12349
12304
 
12350
12305
  // src/components/layout/table/TableSortButton.tsx
12351
- import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
12306
+ import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
12352
12307
  var TableSortButton = ({
12353
12308
  sortDirection,
12354
12309
  invert = false,
@@ -12360,16 +12315,16 @@ var TableSortButton = ({
12360
12315
  }) => {
12361
12316
  const translation = useHightideTranslation();
12362
12317
  const { sortingsCount, index } = sortingIndexDisplay;
12363
- let icon = /* @__PURE__ */ jsx49(ChevronsUpDown, { className: "size-4" });
12318
+ let icon = /* @__PURE__ */ jsx51(ChevronsUpDown, { className: "size-4" });
12364
12319
  if (sortDirection) {
12365
12320
  let usedSortDirection = sortDirection;
12366
12321
  if (invert) {
12367
12322
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
12368
12323
  }
12369
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx49(ChevronUp2, { className: "size-4" }) : /* @__PURE__ */ jsx49(ChevronDown3, { className: "size-4" });
12324
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx51(ChevronUp2, { className: "size-4" }) : /* @__PURE__ */ jsx51(ChevronDown3, { className: "size-4" });
12370
12325
  }
12371
12326
  const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
12372
- return /* @__PURE__ */ jsx49(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ jsxs27(
12327
+ return /* @__PURE__ */ jsx51(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ jsxs28(
12373
12328
  Button,
12374
12329
  {
12375
12330
  layout: hasSortingIndex ? "default" : "icon",
@@ -12378,7 +12333,7 @@ var TableSortButton = ({
12378
12333
  className: clsx24("relative", className),
12379
12334
  ...props,
12380
12335
  children: [
12381
- /* @__PURE__ */ jsx49(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ jsx49(
12336
+ /* @__PURE__ */ jsx51(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ jsx51(
12382
12337
  "div",
12383
12338
  {
12384
12339
  className: clsx24("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
@@ -12395,7 +12350,7 @@ var TableSortButton = ({
12395
12350
  import { FilterIcon } from "lucide-react";
12396
12351
 
12397
12352
  // src/components/user-interaction/Menu.tsx
12398
- import { useCallback as useCallback18, useEffect as useEffect24, useRef as useRef15, useState as useState26 } from "react";
12353
+ import { useCallback as useCallback18, useEffect as useEffect26, useRef as useRef16, useState as useState26 } from "react";
12399
12354
  import clsx25 from "clsx";
12400
12355
 
12401
12356
  // src/utils/bagFunctions.ts
@@ -12467,7 +12422,7 @@ var usePopoverPosition = (trigger, options) => {
12467
12422
  };
12468
12423
 
12469
12424
  // src/hooks/useHoverState.ts
12470
- import { useEffect as useEffect22, useState as useState25 } from "react";
12425
+ import { useEffect as useEffect24, useState as useState25 } from "react";
12471
12426
  var defaultUseHoverStateProps = {
12472
12427
  closingDelay: 200,
12473
12428
  isDisabled: false
@@ -12491,14 +12446,14 @@ var useHoverState = (props = void 0) => {
12491
12446
  setIsHovered(false);
12492
12447
  }, closingDelay));
12493
12448
  };
12494
- useEffect22(() => {
12449
+ useEffect24(() => {
12495
12450
  if (timer) {
12496
12451
  return () => {
12497
12452
  clearTimeout(timer);
12498
12453
  };
12499
12454
  }
12500
12455
  });
12501
- useEffect22(() => {
12456
+ useEffect24(() => {
12502
12457
  if (timer) {
12503
12458
  clearTimeout(timer);
12504
12459
  }
@@ -12511,9 +12466,9 @@ var useHoverState = (props = void 0) => {
12511
12466
  };
12512
12467
 
12513
12468
  // src/hooks/useOutsideClick.ts
12514
- import { useEffect as useEffect23 } from "react";
12469
+ import { useEffect as useEffect25 } from "react";
12515
12470
  var useOutsideClick = (refs, handler) => {
12516
- useEffect23(() => {
12471
+ useEffect25(() => {
12517
12472
  const listener = (event) => {
12518
12473
  if (event.target === null) return;
12519
12474
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -12531,14 +12486,14 @@ var useOutsideClick = (refs, handler) => {
12531
12486
  };
12532
12487
 
12533
12488
  // src/components/user-interaction/Menu.tsx
12534
- import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
12489
+ import { Fragment as Fragment7, jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
12535
12490
  var MenuItem = ({
12536
12491
  children,
12537
12492
  onClick,
12538
12493
  alignment = "left",
12539
12494
  isDisabled = false,
12540
12495
  className
12541
- }) => /* @__PURE__ */ jsx50(
12496
+ }) => /* @__PURE__ */ jsx52(
12542
12497
  "div",
12543
12498
  {
12544
12499
  className: clsx25("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
@@ -12571,8 +12526,8 @@ var Menu = ({
12571
12526
  menuClassName = ""
12572
12527
  }) => {
12573
12528
  const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
12574
- const triggerRef = useRef15(null);
12575
- const menuRef = useRef15(null);
12529
+ const triggerRef = useRef16(null);
12530
+ const menuRef = useRef16(null);
12576
12531
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
12577
12532
  const [isHidden, setIsHidden] = useState26(true);
12578
12533
  const bag = {
@@ -12585,7 +12540,7 @@ var Menu = ({
12585
12540
  triggerRef.current?.getBoundingClientRect(),
12586
12541
  { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
12587
12542
  );
12588
- useEffect24(() => {
12543
+ useEffect26(() => {
12589
12544
  if (!isOpen) return;
12590
12545
  const triggerEl = triggerRef.current;
12591
12546
  if (!triggerEl) return;
@@ -12602,7 +12557,7 @@ var Menu = ({
12602
12557
  window.removeEventListener("resize", close3);
12603
12558
  };
12604
12559
  }, [isOpen, setIsOpen]);
12605
- useEffect24(() => {
12560
+ useEffect26(() => {
12606
12561
  if (isOpen) {
12607
12562
  setIsHidden(false);
12608
12563
  }
@@ -12610,9 +12565,9 @@ var Menu = ({
12610
12565
  const { zIndex } = useOverlayRegistry({
12611
12566
  isActive: isOpen
12612
12567
  });
12613
- return /* @__PURE__ */ jsxs28(Fragment7, { children: [
12568
+ return /* @__PURE__ */ jsxs29(Fragment7, { children: [
12614
12569
  trigger(bag, useCallback18((el) => triggerRef.current = el, [])),
12615
- createPortal7(/* @__PURE__ */ jsx50(
12570
+ createPortal7(/* @__PURE__ */ jsx52(
12616
12571
  "div",
12617
12572
  {
12618
12573
  ref: menuRef,
@@ -12642,8 +12597,8 @@ var Menu = ({
12642
12597
  };
12643
12598
 
12644
12599
  // src/components/layout/table/TableFilterButton.tsx
12645
- import { useEffect as useEffect25, useState as useState27 } from "react";
12646
- import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
12600
+ import { useEffect as useEffect27, useState as useState27 } from "react";
12601
+ import { Fragment as Fragment8, jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
12647
12602
  var TableFilterButton = ({
12648
12603
  filterType,
12649
12604
  column
@@ -12652,24 +12607,24 @@ var TableFilterButton = ({
12652
12607
  const columnFilterValue = column.getFilterValue();
12653
12608
  const [filterValue, setFilterValue] = useState27(columnFilterValue);
12654
12609
  const hasFilter = !!filterValue;
12655
- useEffect25(() => {
12610
+ useEffect27(() => {
12656
12611
  setFilterValue(columnFilterValue);
12657
12612
  }, [columnFilterValue]);
12658
- return /* @__PURE__ */ jsx51(
12613
+ return /* @__PURE__ */ jsx53(
12659
12614
  Menu,
12660
12615
  {
12661
- trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs29("div", { ref, className: "relative", children: [
12662
- /* @__PURE__ */ jsx51(
12616
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs30("div", { ref, className: "relative", children: [
12617
+ /* @__PURE__ */ jsx53(
12663
12618
  Button,
12664
12619
  {
12665
12620
  layout: "icon",
12666
12621
  color: "neutral",
12667
12622
  size: "xs",
12668
12623
  onClick: toggleOpen,
12669
- children: /* @__PURE__ */ jsx51(FilterIcon, { className: "size-4" })
12624
+ children: /* @__PURE__ */ jsx53(FilterIcon, { className: "size-4" })
12670
12625
  }
12671
12626
  ),
12672
- hasFilter && /* @__PURE__ */ jsx51(
12627
+ hasFilter && /* @__PURE__ */ jsx53(
12673
12628
  "div",
12674
12629
  {
12675
12630
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -12677,9 +12632,9 @@ var TableFilterButton = ({
12677
12632
  }
12678
12633
  )
12679
12634
  ] }),
12680
- children: ({ close: close3 }) => /* @__PURE__ */ jsxs29("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
12681
- /* @__PURE__ */ jsx51("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
12682
- filterType === "text" && /* @__PURE__ */ jsx51(
12635
+ children: ({ close: close3 }) => /* @__PURE__ */ jsxs30("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
12636
+ /* @__PURE__ */ jsx53("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
12637
+ filterType === "text" && /* @__PURE__ */ jsx53(
12683
12638
  Input,
12684
12639
  {
12685
12640
  value: filterValue ?? "",
@@ -12689,8 +12644,8 @@ var TableFilterButton = ({
12689
12644
  className: "h-10"
12690
12645
  }
12691
12646
  ),
12692
- filterType === "range" && /* @__PURE__ */ jsxs29("div", { className: "flex-row-2 items-center", children: [
12693
- /* @__PURE__ */ jsx51(
12647
+ filterType === "range" && /* @__PURE__ */ jsxs30("div", { className: "flex-row-2 items-center", children: [
12648
+ /* @__PURE__ */ jsx53(
12694
12649
  Input,
12695
12650
  {
12696
12651
  value: filterValue?.[0].toString() ?? "",
@@ -12703,8 +12658,8 @@ var TableFilterButton = ({
12703
12658
  className: "h-10 input-indicator-hidden w-40"
12704
12659
  }
12705
12660
  ),
12706
- /* @__PURE__ */ jsx51("span", { className: "font-bold", children: "-" }),
12707
- /* @__PURE__ */ jsx51(
12661
+ /* @__PURE__ */ jsx53("span", { className: "font-bold", children: "-" }),
12662
+ /* @__PURE__ */ jsx53(
12708
12663
  Input,
12709
12664
  {
12710
12665
  value: filterValue?.[1].toString() ?? "",
@@ -12718,8 +12673,8 @@ var TableFilterButton = ({
12718
12673
  }
12719
12674
  )
12720
12675
  ] }),
12721
- filterType === "dateRange" && /* @__PURE__ */ jsxs29(Fragment8, { children: [
12722
- /* @__PURE__ */ jsx51(
12676
+ filterType === "dateRange" && /* @__PURE__ */ jsxs30(Fragment8, { children: [
12677
+ /* @__PURE__ */ jsx53(
12723
12678
  Input,
12724
12679
  {
12725
12680
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -12732,7 +12687,7 @@ var TableFilterButton = ({
12732
12687
  className: "h-10 w-50"
12733
12688
  }
12734
12689
  ),
12735
- /* @__PURE__ */ jsx51(
12690
+ /* @__PURE__ */ jsx53(
12736
12691
  Input,
12737
12692
  {
12738
12693
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -12746,12 +12701,12 @@ var TableFilterButton = ({
12746
12701
  }
12747
12702
  )
12748
12703
  ] }),
12749
- /* @__PURE__ */ jsxs29("div", { className: "flex-row-2 justify-end w-full", children: [
12750
- hasFilter && /* @__PURE__ */ jsx51(Button, { color: "negative", size: "sm", onClick: () => {
12704
+ /* @__PURE__ */ jsxs30("div", { className: "flex-row-2 justify-end w-full", children: [
12705
+ hasFilter && /* @__PURE__ */ jsx53(Button, { color: "negative", size: "sm", onClick: () => {
12751
12706
  column.setFilterValue(void 0);
12752
12707
  close3();
12753
12708
  }, children: translation("remove") }),
12754
- /* @__PURE__ */ jsx51(Button, { size: "sm", onClick: () => {
12709
+ /* @__PURE__ */ jsx53(Button, { size: "sm", onClick: () => {
12755
12710
  column.setFilterValue(filterValue);
12756
12711
  close3();
12757
12712
  }, children: translation("apply") })
@@ -12764,7 +12719,7 @@ var TableFilterButton = ({
12764
12719
  // src/components/user-interaction/Checkbox.tsx
12765
12720
  import { Check as Check2, Minus as Minus2 } from "lucide-react";
12766
12721
  import { useCallback as useCallback19 } from "react";
12767
- import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
12722
+ import { jsx as jsx54, jsxs as jsxs31 } from "react/jsx-runtime";
12768
12723
  var Checkbox = ({
12769
12724
  value = false,
12770
12725
  indeterminate = false,
@@ -12782,7 +12737,7 @@ var Checkbox = ({
12782
12737
  onValueChange?.(!value);
12783
12738
  onEditComplete?.(!value);
12784
12739
  }, [onEditComplete, onValueChange, value]);
12785
- return /* @__PURE__ */ jsxs30(
12740
+ return /* @__PURE__ */ jsxs31(
12786
12741
  "div",
12787
12742
  {
12788
12743
  ...props,
@@ -12809,8 +12764,8 @@ var Checkbox = ({
12809
12764
  "aria-checked": indeterminate ? "mixed" : value,
12810
12765
  ...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
12811
12766
  children: [
12812
- /* @__PURE__ */ jsx52(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ jsx52(Minus2, { "data-name": "checkbox-indicator", "aria-hidden": true }) }),
12813
- /* @__PURE__ */ jsx52(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ jsx52(Check2, { "data-name": "checkbox-indicator", "aria-hidden": true }) })
12767
+ /* @__PURE__ */ jsx54(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ jsx54(Minus2, { "data-name": "checkbox-indicator", "aria-hidden": true }) }),
12768
+ /* @__PURE__ */ jsx54(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ jsx54(Check2, { "data-name": "checkbox-indicator", "aria-hidden": true }) })
12814
12769
  ]
12815
12770
  }
12816
12771
  );
@@ -12821,7 +12776,7 @@ var CheckboxUncontrolled = ({
12821
12776
  ...props
12822
12777
  }) => {
12823
12778
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
12824
- return /* @__PURE__ */ jsx52(
12779
+ return /* @__PURE__ */ jsx54(
12825
12780
  Checkbox,
12826
12781
  {
12827
12782
  ...props,
@@ -12832,7 +12787,7 @@ var CheckboxUncontrolled = ({
12832
12787
  };
12833
12788
 
12834
12789
  // src/components/layout/table/Table.tsx
12835
- import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
12790
+ import { jsx as jsx55, jsxs as jsxs32 } from "react/jsx-runtime";
12836
12791
  var Table = ({
12837
12792
  data,
12838
12793
  fillerRow,
@@ -12846,8 +12801,8 @@ var Table = ({
12846
12801
  columns,
12847
12802
  ...tableOptions
12848
12803
  }) => {
12849
- const ref = useRef16(null);
12850
- const tableRef = useRef16(null);
12804
+ const ref = useRef17(null);
12805
+ const tableRef = useRef17(null);
12851
12806
  const [columnSizing, setColumnSizing] = useState28(columns.reduce((previousValue, currentValue) => {
12852
12807
  return {
12853
12808
  ...previousValue,
@@ -12952,7 +12907,7 @@ var Table = ({
12952
12907
  minSize: 60,
12953
12908
  maxSize: 700,
12954
12909
  cell: ({ cell }) => {
12955
- return /* @__PURE__ */ jsx53(TableCell, { children: cell.getValue() });
12910
+ return /* @__PURE__ */ jsx55(TableCell, { children: cell.getValue() });
12956
12911
  },
12957
12912
  ...defaultColumn
12958
12913
  },
@@ -13001,7 +12956,7 @@ var Table = ({
13001
12956
  ...tableOptions
13002
12957
  });
13003
12958
  const [hasInitializedSizing, setHasInitializedSizing] = useState28(false);
13004
- useEffect26(() => {
12959
+ useEffect28(() => {
13005
12960
  if (!hasInitializedSizing && ref.current) {
13006
12961
  setHasInitializedSizing(true);
13007
12962
  table.setColumnSizing(updateColumnSizes(columnSizing));
@@ -13011,7 +12966,7 @@ var Table = ({
13011
12966
  table.setColumnSizing(updateColumnSizes);
13012
12967
  }, [updateColumnSizes]));
13013
12968
  const pageCount = table.getPageCount();
13014
- useEffect26(() => {
12969
+ useEffect28(() => {
13015
12970
  const totalPages = pageCount;
13016
12971
  if (totalPages === 0) {
13017
12972
  if (pagination.pageIndex !== 0) {
@@ -13037,8 +12992,8 @@ var Table = ({
13037
12992
  }
13038
12993
  return colSizes;
13039
12994
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
13040
- return /* @__PURE__ */ jsxs31("div", { ref, "data-name": PropsUtil.dataAttributes.name("table-container"), className, children: [
13041
- /* @__PURE__ */ jsx53("div", { "data-name": PropsUtil.dataAttributes.name("table-scroll-wrapper"), className: tableContainerClassName, children: /* @__PURE__ */ jsxs31(
12995
+ return /* @__PURE__ */ jsxs32("div", { ref, "data-name": PropsUtil.dataAttributes.name("table-container"), className, children: [
12996
+ /* @__PURE__ */ jsx55("div", { "data-name": PropsUtil.dataAttributes.name("table-scroll-wrapper"), className: tableContainerClassName, children: /* @__PURE__ */ jsxs32(
13042
12997
  "table",
13043
12998
  {
13044
12999
  ref: tableRef,
@@ -13049,7 +13004,7 @@ var Table = ({
13049
13004
  },
13050
13005
  className: tableClassName,
13051
13006
  children: [
13052
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx53("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx53(
13007
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx55("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx55(
13053
13008
  "col",
13054
13009
  {
13055
13010
  style: {
@@ -13060,16 +13015,16 @@ var Table = ({
13060
13015
  },
13061
13016
  header.id
13062
13017
  )) }, headerGroup.id)),
13063
- /* @__PURE__ */ jsx53("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx53("tr", { "data-name": PropsUtil.dataAttributes.name("table-header-row"), className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13064
- return /* @__PURE__ */ jsxs31(
13018
+ /* @__PURE__ */ jsx55("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx55("tr", { "data-name": PropsUtil.dataAttributes.name("table-header-row"), className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13019
+ return /* @__PURE__ */ jsxs32(
13065
13020
  "th",
13066
13021
  {
13067
13022
  colSpan: header.colSpan,
13068
13023
  "data-name": PropsUtil.dataAttributes.name("table-header-cell"),
13069
13024
  className: clsx26("group/table-header-cell", header.column.columnDef.meta?.className),
13070
13025
  children: [
13071
- /* @__PURE__ */ jsx53(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ jsxs31("div", { className: "flex-row-1 items-center", children: [
13072
- /* @__PURE__ */ jsx53(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ jsx53(
13026
+ /* @__PURE__ */ jsx55(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ jsxs32("div", { className: "flex-row-1 items-center", children: [
13027
+ /* @__PURE__ */ jsx55(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ jsx55(
13073
13028
  TableSortButton,
13074
13029
  {
13075
13030
  sortDirection: header.column.getIsSorted(),
@@ -13095,7 +13050,7 @@ var Table = ({
13095
13050
  }
13096
13051
  }
13097
13052
  ) }),
13098
- /* @__PURE__ */ jsx53(Visibility, { isVisible: header.column.getCanFilter() && !!header.column.columnDef.meta?.filterType, children: /* @__PURE__ */ jsx53(
13053
+ /* @__PURE__ */ jsx55(Visibility, { isVisible: header.column.getCanFilter() && !!header.column.columnDef.meta?.filterType, children: /* @__PURE__ */ jsx55(
13099
13054
  TableFilterButton,
13100
13055
  {
13101
13056
  column: header.column,
@@ -13107,7 +13062,7 @@ var Table = ({
13107
13062
  header.getContext()
13108
13063
  )
13109
13064
  ] }) }),
13110
- /* @__PURE__ */ jsx53(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ jsx53(
13065
+ /* @__PURE__ */ jsx55(Visibility, { isVisible: header.column.getCanResize(), children: /* @__PURE__ */ jsx55(
13111
13066
  "div",
13112
13067
  {
13113
13068
  onPointerDown: header.getResizeHandler(),
@@ -13128,16 +13083,16 @@ var Table = ({
13128
13083
  header.id
13129
13084
  );
13130
13085
  }) }, headerGroup.id)) }),
13131
- /* @__PURE__ */ jsxs31("tbody", { children: [
13086
+ /* @__PURE__ */ jsxs32("tbody", { children: [
13132
13087
  table.getRowModel().rows.map((row) => {
13133
- return /* @__PURE__ */ jsx53(
13088
+ return /* @__PURE__ */ jsx55(
13134
13089
  "tr",
13135
13090
  {
13136
13091
  onClick: () => onRowClick?.(row, table),
13137
13092
  "data-name": "table-body-row",
13138
13093
  className: BagFunctionUtil.resolve(table.options.meta?.bodyRowClassName, row.original),
13139
13094
  children: row.getVisibleCells().map((cell) => {
13140
- return /* @__PURE__ */ jsx53("td", { "data-name": "table-body-cell", children: flexRender(
13095
+ return /* @__PURE__ */ jsx55("td", { "data-name": "table-body-cell", children: flexRender(
13141
13096
  cell.column.columnDef.cell,
13142
13097
  cell.getContext()
13143
13098
  ) }, cell.id);
@@ -13147,15 +13102,15 @@ var Table = ({
13147
13102
  );
13148
13103
  }),
13149
13104
  range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
13150
- return /* @__PURE__ */ jsx53("tr", { children: columns.map((column) => {
13151
- return /* @__PURE__ */ jsx53("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx53(FillerCell, {}) }, column.id);
13105
+ return /* @__PURE__ */ jsx55("tr", { children: columns.map((column) => {
13106
+ return /* @__PURE__ */ jsx55("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx55(FillerCell, {}) }, column.id);
13152
13107
  }) }, "filler-row-" + index);
13153
13108
  })
13154
13109
  ] })
13155
13110
  ]
13156
13111
  }
13157
13112
  ) }),
13158
- /* @__PURE__ */ jsx53("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx53(
13113
+ /* @__PURE__ */ jsx55("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx55(
13159
13114
  Pagination,
13160
13115
  {
13161
13116
  pageIndex: table.getState().pagination.pageIndex,
@@ -13167,7 +13122,7 @@ var Table = ({
13167
13122
  };
13168
13123
  var TableUncontrolled = ({ data, ...props }) => {
13169
13124
  const [usedDate] = useOverwritableState(data);
13170
- return /* @__PURE__ */ jsx53(
13125
+ return /* @__PURE__ */ jsx55(
13171
13126
  Table,
13172
13127
  {
13173
13128
  ...props,
@@ -13191,7 +13146,7 @@ var TableWithSelection = ({
13191
13146
  {
13192
13147
  id: selectionRowId,
13193
13148
  header: ({ table }) => {
13194
- return /* @__PURE__ */ jsx53(
13149
+ return /* @__PURE__ */ jsx55(
13195
13150
  Checkbox,
13196
13151
  {
13197
13152
  value: table.getIsAllRowsSelected(),
@@ -13204,7 +13159,7 @@ var TableWithSelection = ({
13204
13159
  );
13205
13160
  },
13206
13161
  cell: ({ row }) => {
13207
- return /* @__PURE__ */ jsx53(
13162
+ return /* @__PURE__ */ jsx55(
13208
13163
  Checkbox,
13209
13164
  {
13210
13165
  disabled: !row.getCanSelect(),
@@ -13222,15 +13177,15 @@ var TableWithSelection = ({
13222
13177
  ...columns
13223
13178
  ];
13224
13179
  }, [columns, selectionRowId]);
13225
- return /* @__PURE__ */ jsx53(
13180
+ return /* @__PURE__ */ jsx55(
13226
13181
  Table,
13227
13182
  {
13228
13183
  columns: columnsWithSelection,
13229
13184
  fillerRow: (columnId, table) => {
13230
13185
  if (columnId === selectionRowId) {
13231
- return /* @__PURE__ */ jsx53(Checkbox, { value: false, disabled: true, className: "max-w-6" });
13186
+ return /* @__PURE__ */ jsx55(Checkbox, { value: false, disabled: true, className: "max-w-6" });
13232
13187
  }
13233
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx53(FillerCell, {});
13188
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx55(FillerCell, {});
13234
13189
  },
13235
13190
  state: {
13236
13191
  rowSelection,
@@ -13265,7 +13220,7 @@ var writeToClipboard = (text) => {
13265
13220
 
13266
13221
  // src/components/user-interaction/CopyToClipboardWrapper.tsx
13267
13222
  import { CheckIcon as CheckIcon2, Copy } from "lucide-react";
13268
- import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
13223
+ import { jsx as jsx56, jsxs as jsxs33 } from "react/jsx-runtime";
13269
13224
  var CopyToClipboardWrapper = ({
13270
13225
  children,
13271
13226
  textToCopy,
@@ -13296,7 +13251,7 @@ var CopyToClipboardWrapper = ({
13296
13251
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13297
13252
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13298
13253
  };
13299
- return /* @__PURE__ */ jsxs32(
13254
+ return /* @__PURE__ */ jsxs33(
13300
13255
  "div",
13301
13256
  {
13302
13257
  className: clsx27("relative inline-block cursor-copy", containerClassName),
@@ -13314,7 +13269,7 @@ var CopyToClipboardWrapper = ({
13314
13269
  },
13315
13270
  children: [
13316
13271
  children,
13317
- /* @__PURE__ */ jsxs32(
13272
+ /* @__PURE__ */ jsxs33(
13318
13273
  "div",
13319
13274
  {
13320
13275
  className: clsx27(
@@ -13329,15 +13284,15 @@ var CopyToClipboardWrapper = ({
13329
13284
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
13330
13285
  },
13331
13286
  children: [
13332
- isShowingConfirmation && /* @__PURE__ */ jsxs32("div", { className: "flex-row-1", children: [
13333
- /* @__PURE__ */ jsx54(CheckIcon2, { size: 16, className: "text-positive" }),
13287
+ isShowingConfirmation && /* @__PURE__ */ jsxs33("div", { className: "flex-row-1", children: [
13288
+ /* @__PURE__ */ jsx56(CheckIcon2, { size: 16, className: "text-positive" }),
13334
13289
  translation("copied")
13335
13290
  ] }),
13336
- isShowingIndication && /* @__PURE__ */ jsxs32("div", { className: "flex-row-1 text-description", children: [
13337
- /* @__PURE__ */ jsx54(Copy, { size: 16 }),
13291
+ isShowingIndication && /* @__PURE__ */ jsxs33("div", { className: "flex-row-1 text-description", children: [
13292
+ /* @__PURE__ */ jsx56(Copy, { size: 16 }),
13338
13293
  translation("clickToCopy")
13339
13294
  ] }),
13340
- /* @__PURE__ */ jsx54(
13295
+ /* @__PURE__ */ jsx56(
13341
13296
  "div",
13342
13297
  {
13343
13298
  className: clsx27(`absolute w-0 h-0`, triangleClasses[position]),
@@ -13353,9 +13308,9 @@ var CopyToClipboardWrapper = ({
13353
13308
  };
13354
13309
 
13355
13310
  // src/components/user-interaction/ScrollPicker.tsx
13356
- import { useCallback as useCallback21, useEffect as useEffect27, useState as useState30 } from "react";
13311
+ import { useCallback as useCallback21, useEffect as useEffect29, useState as useState30 } from "react";
13357
13312
  import clsx28 from "clsx";
13358
- import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
13313
+ import { jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
13359
13314
  var up = 1;
13360
13315
  var down = -1;
13361
13316
  var ScrollPicker = ({
@@ -13473,7 +13428,7 @@ var ScrollPicker = ({
13473
13428
  };
13474
13429
  });
13475
13430
  }, [disabled, getDirection, onChange]);
13476
- useEffect27(() => {
13431
+ useEffect29(() => {
13477
13432
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
13478
13433
  });
13479
13434
  const opacity = (transition2, index, itemsCount) => {
@@ -13494,7 +13449,7 @@ var ScrollPicker = ({
13494
13449
  }
13495
13450
  return clamp(1 - opacityValue / max);
13496
13451
  };
13497
- return /* @__PURE__ */ jsx55(
13452
+ return /* @__PURE__ */ jsx57(
13498
13453
  "div",
13499
13454
  {
13500
13455
  className: "relative overflow-hidden",
@@ -13505,15 +13460,15 @@ var ScrollPicker = ({
13505
13460
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
13506
13461
  }
13507
13462
  },
13508
- children: /* @__PURE__ */ jsxs33("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13509
- /* @__PURE__ */ jsx55(
13463
+ children: /* @__PURE__ */ jsxs34("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13464
+ /* @__PURE__ */ jsx57(
13510
13465
  "div",
13511
13466
  {
13512
13467
  className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/50 border-y-2 border-x-0 ",
13513
13468
  style: { height: `${itemHeight}px` }
13514
13469
  }
13515
13470
  ),
13516
- /* @__PURE__ */ jsx55(
13471
+ /* @__PURE__ */ jsx57(
13517
13472
  "div",
13518
13473
  {
13519
13474
  className: "flex-col-2 select-none",
@@ -13521,7 +13476,7 @@ var ScrollPicker = ({
13521
13476
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
13522
13477
  columnGap: `${distance}px`
13523
13478
  },
13524
- children: shownItems.map(({ name: name2, index }, arrayIndex) => /* @__PURE__ */ jsx55(
13479
+ children: shownItems.map(({ name: name2, index }, arrayIndex) => /* @__PURE__ */ jsx57(
13525
13480
  "div",
13526
13481
  {
13527
13482
  className: clsx28(
@@ -13551,10 +13506,10 @@ var ScrollPicker = ({
13551
13506
  };
13552
13507
 
13553
13508
  // src/components/user-interaction/Textarea.tsx
13554
- import { forwardRef as forwardRef9, useId as useId11 } from "react";
13509
+ import { forwardRef as forwardRef10, useId as useId12 } from "react";
13555
13510
  import clsx29 from "clsx";
13556
- import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
13557
- var Textarea = forwardRef9(function Textarea2({
13511
+ import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
13512
+ var Textarea = forwardRef10(function Textarea2({
13558
13513
  invalid = false,
13559
13514
  onValueChange,
13560
13515
  onEditComplete,
@@ -13566,7 +13521,7 @@ var Textarea = forwardRef9(function Textarea2({
13566
13521
  onEditComplete?.(text);
13567
13522
  clearTimer();
13568
13523
  };
13569
- return /* @__PURE__ */ jsx56(
13524
+ return /* @__PURE__ */ jsx58(
13570
13525
  "textarea",
13571
13526
  {
13572
13527
  ...props,
@@ -13596,7 +13551,7 @@ var TextareaUncontrolled = ({
13596
13551
  ...props
13597
13552
  }) => {
13598
13553
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
13599
- return /* @__PURE__ */ jsx56(
13554
+ return /* @__PURE__ */ jsx58(
13600
13555
  Textarea,
13601
13556
  {
13602
13557
  ...props,
@@ -13614,9 +13569,9 @@ var TextareaWithHeadline = ({
13614
13569
  containerClassName,
13615
13570
  ...props
13616
13571
  }) => {
13617
- const genId = useId11();
13572
+ const genId = useId12();
13618
13573
  const usedId = id ?? genId;
13619
- return /* @__PURE__ */ jsxs34(
13574
+ return /* @__PURE__ */ jsxs35(
13620
13575
  "div",
13621
13576
  {
13622
13577
  className: clsx29(
@@ -13628,8 +13583,8 @@ var TextareaWithHeadline = ({
13628
13583
  containerClassName
13629
13584
  ),
13630
13585
  children: [
13631
- headline && /* @__PURE__ */ jsx56("label", { ...headlineProps, htmlFor: usedId, className: clsx29("typography-lable-md text-label", headlineProps.className), children: headline }),
13632
- /* @__PURE__ */ jsx56(
13586
+ headline && /* @__PURE__ */ jsx58("label", { ...headlineProps, htmlFor: usedId, className: clsx29("typography-lable-md text-label", headlineProps.className), children: headline }),
13587
+ /* @__PURE__ */ jsx58(
13633
13588
  Textarea,
13634
13589
  {
13635
13590
  ...props,
@@ -13824,7 +13779,7 @@ import clsx31 from "clsx";
13824
13779
 
13825
13780
  // src/components/user-interaction/date/DayPicker.tsx
13826
13781
  import { useMemo as useMemo16 } from "react";
13827
- import { jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
13782
+ import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
13828
13783
  var DayPicker = ({
13829
13784
  displayedMonth,
13830
13785
  value,
@@ -13847,14 +13802,14 @@ var DayPicker = ({
13847
13802
  if (!providedStart) return;
13848
13803
  return new Date(providedStart.getFullYear(), providedStart.getMonth(), providedStart.getDate());
13849
13804
  }, [providedStart]);
13850
- return /* @__PURE__ */ jsxs35("div", { className, "data-name": "day-picker-container", children: [
13851
- /* @__PURE__ */ jsx57("div", { "data-name": "day-picker-header-row", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx57("div", { "data-name": "day-picker-header-item", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
13852
- weeks.map((week, index) => /* @__PURE__ */ jsx57("div", { "data-name": "day-picker-body-row", children: week.map((date) => {
13805
+ return /* @__PURE__ */ jsxs36("div", { className, "data-name": "day-picker-container", children: [
13806
+ /* @__PURE__ */ jsx59("div", { "data-name": "day-picker-header-row", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx59("div", { "data-name": "day-picker-header-item", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
13807
+ weeks.map((week, index) => /* @__PURE__ */ jsx59("div", { "data-name": "day-picker-body-row", children: week.map((date) => {
13853
13808
  const isSelected = !!value && DateUtils.equalDate(value, date);
13854
13809
  const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
13855
13810
  const isSameMonth = date.getMonth() === month;
13856
13811
  const isDayValid = isInTimeSpan(date, start, end);
13857
- return /* @__PURE__ */ jsx57(
13812
+ return /* @__PURE__ */ jsx59(
13858
13813
  "button",
13859
13814
  {
13860
13815
  disabled: !isDayValid,
@@ -13888,7 +13843,7 @@ var DayPickerUncontrolled = ({
13888
13843
  ...props
13889
13844
  }) => {
13890
13845
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
13891
- return /* @__PURE__ */ jsx57(
13846
+ return /* @__PURE__ */ jsx59(
13892
13847
  DayPicker,
13893
13848
  {
13894
13849
  value,
@@ -13899,9 +13854,9 @@ var DayPickerUncontrolled = ({
13899
13854
  };
13900
13855
 
13901
13856
  // src/components/user-interaction/date/YearMonthPicker.tsx
13902
- import { memo, useCallback as useCallback22, useEffect as useEffect28, useLayoutEffect as useLayoutEffect3, useMemo as useMemo17, useRef as useRef17, useState as useState31 } from "react";
13857
+ import { memo, useCallback as useCallback22, useEffect as useEffect30, useLayoutEffect as useLayoutEffect3, useMemo as useMemo17, useRef as useRef18, useState as useState31 } from "react";
13903
13858
  import clsx30 from "clsx";
13904
- import { jsx as jsx58, jsxs as jsxs36 } from "react/jsx-runtime";
13859
+ import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
13905
13860
  var YearRow = memo(function YearRow2({
13906
13861
  year,
13907
13862
  selectedMonthIndex,
@@ -13910,31 +13865,31 @@ var YearRow = memo(function YearRow2({
13910
13865
  monthNames,
13911
13866
  onSelect
13912
13867
  }) {
13913
- const ref = useRef17(null);
13868
+ const ref = useRef18(null);
13914
13869
  const isSelectedYear = selectedMonthIndex !== void 0;
13915
13870
  const [isExpanded, setIsExpanded] = useState31(false);
13916
- useEffect28(() => {
13871
+ useEffect30(() => {
13917
13872
  if (isSelectedYear) {
13918
13873
  ref.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
13919
13874
  }
13920
13875
  }, [isSelectedYear]);
13921
13876
  const monthGrid = useMemo17(() => equalSizeGroups([...DateUtils.monthsList], 3), []);
13922
- return /* @__PURE__ */ jsxs36(
13877
+ return /* @__PURE__ */ jsxs37(
13923
13878
  ExpandableRoot,
13924
13879
  {
13925
13880
  ref: isSelectedYear ? ref : void 0,
13926
13881
  isExpanded,
13927
13882
  onExpandedChange: setIsExpanded,
13928
13883
  children: [
13929
- /* @__PURE__ */ jsx58(ExpandableHeader, { className: clsx30("px-2", { "text-primary font-bold": isSelectedYear }), children: year }),
13930
- /* @__PURE__ */ jsx58(ExpandableContent, { className: "gap-y-1 px-2 expadable-content-h-39", children: isExpanded && monthGrid.map((group, groupIdx) => /* @__PURE__ */ jsx58("div", { className: "flex-row-1", children: group.map((month) => {
13884
+ /* @__PURE__ */ jsx60(ExpandableHeader, { className: clsx30("px-2", { "text-primary font-bold": isSelectedYear }), children: year }),
13885
+ /* @__PURE__ */ jsx60(ExpandableContent, { className: "gap-y-1 px-2 expadable-content-h-39", children: isExpanded && monthGrid.map((group, groupIdx) => /* @__PURE__ */ jsx60("div", { className: "flex-row-1", children: group.map((month) => {
13931
13886
  const monthIndex = DateUtils.monthsList.indexOf(month);
13932
13887
  const currentTimestamp = new Date(year, monthIndex).getTime();
13933
13888
  const isAfterStart = minTimestamp === void 0 || currentTimestamp >= minTimestamp;
13934
13889
  const isBeforeEnd = maxTimestamp === void 0 || currentTimestamp <= maxTimestamp;
13935
13890
  const isValid = isAfterStart && isBeforeEnd;
13936
13891
  const isSelectedMonth = monthIndex === selectedMonthIndex;
13937
- return /* @__PURE__ */ jsx58(
13892
+ return /* @__PURE__ */ jsx60(
13938
13893
  Button,
13939
13894
  {
13940
13895
  disabled: !isValid,
@@ -13982,7 +13937,7 @@ var YearMonthPicker = ({
13982
13937
  if (!end) return;
13983
13938
  return new Date(end.getFullYear(), end.getMonth() + 1, 0).getTime();
13984
13939
  }, [end]);
13985
- const callbackRefs = useRef17({ onValueChange, onEditComplete });
13940
+ const callbackRefs = useRef18({ onValueChange, onEditComplete });
13986
13941
  useLayoutEffect3(() => {
13987
13942
  callbackRefs.current = { onValueChange, onEditComplete };
13988
13943
  });
@@ -13991,7 +13946,7 @@ var YearMonthPicker = ({
13991
13946
  onValueChange2?.(newDate);
13992
13947
  onEditComplete2?.(newDate);
13993
13948
  }, []);
13994
- return /* @__PURE__ */ jsx58(
13949
+ return /* @__PURE__ */ jsx60(
13995
13950
  InfiniteScroll,
13996
13951
  {
13997
13952
  itemCount: years.length,
@@ -14001,7 +13956,7 @@ var YearMonthPicker = ({
14001
13956
  const year = years[index];
14002
13957
  const isSelectedYear = value.getFullYear() === year;
14003
13958
  const selectedMonthIndex = isSelectedYear ? value.getMonth() : void 0;
14004
- return /* @__PURE__ */ jsx58(
13959
+ return /* @__PURE__ */ jsx60(
14005
13960
  YearRow,
14006
13961
  {
14007
13962
  year,
@@ -14023,7 +13978,7 @@ var YearMonthPickerUncontrolled = ({
14023
13978
  ...props
14024
13979
  }) => {
14025
13980
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14026
- return /* @__PURE__ */ jsx58(
13981
+ return /* @__PURE__ */ jsx60(
14027
13982
  YearMonthPicker,
14028
13983
  {
14029
13984
  value,
@@ -14034,7 +13989,7 @@ var YearMonthPickerUncontrolled = ({
14034
13989
  };
14035
13990
 
14036
13991
  // src/components/user-interaction/date/DatePicker.tsx
14037
- import { jsx as jsx59, jsxs as jsxs37 } from "react/jsx-runtime";
13992
+ import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
14038
13993
  var DatePicker = ({
14039
13994
  value = /* @__PURE__ */ new Date(),
14040
13995
  start,
@@ -14050,9 +14005,9 @@ var DatePicker = ({
14050
14005
  const { locale } = useLocale();
14051
14006
  const [displayedMonth, setDisplayedMonth] = useState32(new Date(value.getFullYear(), value.getMonth(), 1));
14052
14007
  const [displayMode, setDisplayMode] = useState32(initialDisplay);
14053
- return /* @__PURE__ */ jsxs37("div", { className: clsx31("flex-col-3", className), children: [
14054
- /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 items-center justify-between", children: [
14055
- /* @__PURE__ */ jsxs37(
14008
+ return /* @__PURE__ */ jsxs38("div", { className: clsx31("flex-col-3", className), children: [
14009
+ /* @__PURE__ */ jsxs38("div", { className: "flex-row-2 items-center justify-between", children: [
14010
+ /* @__PURE__ */ jsxs38(
14056
14011
  Button,
14057
14012
  {
14058
14013
  size: "sm",
@@ -14063,12 +14018,12 @@ var DatePicker = ({
14063
14018
  onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
14064
14019
  children: [
14065
14020
  `${new Intl.DateTimeFormat(LocalizationUtil.localToLanguage(locale), { month: "long" }).format(displayedMonth)} ${displayedMonth.getFullYear()}`,
14066
- /* @__PURE__ */ jsx59(ChevronDown4, { size: 16 })
14021
+ /* @__PURE__ */ jsx61(ChevronDown4, { size: 16 })
14067
14022
  ]
14068
14023
  }
14069
14024
  ),
14070
- displayMode === "day" && /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 justify-end", children: [
14071
- /* @__PURE__ */ jsx59(
14025
+ displayMode === "day" && /* @__PURE__ */ jsxs38("div", { className: "flex-row-2 justify-end", children: [
14026
+ /* @__PURE__ */ jsx61(
14072
14027
  Button,
14073
14028
  {
14074
14029
  size: "sm",
@@ -14079,10 +14034,10 @@ var DatePicker = ({
14079
14034
  onValueChange(newDate);
14080
14035
  setDisplayedMonth(newDate);
14081
14036
  },
14082
- children: /* @__PURE__ */ jsx59(Calendar, { className: "size-5" })
14037
+ children: /* @__PURE__ */ jsx61(Calendar, { className: "size-5" })
14083
14038
  }
14084
14039
  ),
14085
- /* @__PURE__ */ jsx59(
14040
+ /* @__PURE__ */ jsx61(
14086
14041
  Button,
14087
14042
  {
14088
14043
  size: "sm",
@@ -14090,10 +14045,10 @@ var DatePicker = ({
14090
14045
  onClick: () => {
14091
14046
  setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }));
14092
14047
  },
14093
- children: /* @__PURE__ */ jsx59(ArrowUp, { size: 20 })
14048
+ children: /* @__PURE__ */ jsx61(ArrowUp, { size: 20 })
14094
14049
  }
14095
14050
  ),
14096
- /* @__PURE__ */ jsx59(
14051
+ /* @__PURE__ */ jsx61(
14097
14052
  Button,
14098
14053
  {
14099
14054
  size: "sm",
@@ -14101,12 +14056,12 @@ var DatePicker = ({
14101
14056
  onClick: () => {
14102
14057
  setDisplayedMonth(addDuration(displayedMonth, { months: 1 }));
14103
14058
  },
14104
- children: /* @__PURE__ */ jsx59(ArrowDown, { size: 20 })
14059
+ children: /* @__PURE__ */ jsx61(ArrowDown, { size: 20 })
14105
14060
  }
14106
14061
  )
14107
14062
  ] })
14108
14063
  ] }),
14109
- displayMode === "yearMonth" ? /* @__PURE__ */ jsx59(
14064
+ displayMode === "yearMonth" ? /* @__PURE__ */ jsx61(
14110
14065
  YearMonthPicker,
14111
14066
  {
14112
14067
  ...yearMonthPickerProps,
@@ -14123,7 +14078,7 @@ var DatePicker = ({
14123
14078
  },
14124
14079
  className: "h-60 max-h-60"
14125
14080
  }
14126
- ) : /* @__PURE__ */ jsx59(
14081
+ ) : /* @__PURE__ */ jsx61(
14127
14082
  DayPicker,
14128
14083
  {
14129
14084
  ...dayPickerProps,
@@ -14145,7 +14100,7 @@ var DatePickerUncontrolled = ({
14145
14100
  ...props
14146
14101
  }) => {
14147
14102
  const [date, setDate] = useOverwritableState(value, onValueChange);
14148
- return /* @__PURE__ */ jsx59(
14103
+ return /* @__PURE__ */ jsx61(
14149
14104
  DatePicker,
14150
14105
  {
14151
14106
  ...props,
@@ -14159,8 +14114,8 @@ var DatePickerUncontrolled = ({
14159
14114
  import clsx32 from "clsx";
14160
14115
 
14161
14116
  // src/components/user-interaction/date/TimePicker.tsx
14162
- import { useEffect as useEffect29, useRef as useRef18 } from "react";
14163
- import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
14117
+ import { useEffect as useEffect31, useRef as useRef19 } from "react";
14118
+ import { jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
14164
14119
  var TimePicker = ({
14165
14120
  value = /* @__PURE__ */ new Date(),
14166
14121
  onValueChange,
@@ -14169,8 +14124,8 @@ var TimePicker = ({
14169
14124
  minuteIncrement = "5min",
14170
14125
  className
14171
14126
  }) => {
14172
- const minuteRef = useRef18(null);
14173
- const hourRef = useRef18(null);
14127
+ const minuteRef = useRef19(null);
14128
+ const hourRef = useRef19(null);
14174
14129
  const isPM = value.getHours() > 11;
14175
14130
  const hours = is24HourFormat ? range(24) : range(12);
14176
14131
  let minutes = range(60);
@@ -14190,13 +14145,13 @@ var TimePicker = ({
14190
14145
  }
14191
14146
  const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - value.getMinutes()) < Math.abs(item2 - value.getMinutes()));
14192
14147
  const hour = value.getHours();
14193
- useEffect29(() => {
14148
+ useEffect31(() => {
14194
14149
  minuteRef.current?.scrollIntoView({
14195
14150
  behavior: "smooth",
14196
14151
  block: "nearest"
14197
14152
  });
14198
14153
  }, [closestMinute]);
14199
- useEffect29(() => {
14154
+ useEffect31(() => {
14200
14155
  hourRef.current?.scrollIntoView({
14201
14156
  behavior: "smooth",
14202
14157
  block: "nearest"
@@ -14208,10 +14163,10 @@ var TimePicker = ({
14208
14163
  onValueChange?.(newDate);
14209
14164
  onEditComplete?.(newDate);
14210
14165
  };
14211
- return /* @__PURE__ */ jsxs38("div", { "data-name": "time-picker-container", className, children: [
14212
- /* @__PURE__ */ jsx60("div", { "data-name": "time-picker-value-column", children: hours.map((hour2) => {
14166
+ return /* @__PURE__ */ jsxs39("div", { "data-name": "time-picker-container", className, children: [
14167
+ /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: hours.map((hour2) => {
14213
14168
  const isSelected = hour2 === value.getHours() - (!is24HourFormat && isPM ? 12 : 0);
14214
- return /* @__PURE__ */ jsx60(
14169
+ return /* @__PURE__ */ jsx62(
14215
14170
  Button,
14216
14171
  {
14217
14172
  size: "sm",
@@ -14223,9 +14178,9 @@ var TimePicker = ({
14223
14178
  hour2
14224
14179
  );
14225
14180
  }) }),
14226
- /* @__PURE__ */ jsx60("div", { "data-name": "time-picker-value-column", children: minutes.map((minute) => {
14181
+ /* @__PURE__ */ jsx62("div", { "data-name": "time-picker-value-column", children: minutes.map((minute) => {
14227
14182
  const isSelected = minute === closestMinute;
14228
- return /* @__PURE__ */ jsx60(
14183
+ return /* @__PURE__ */ jsx62(
14229
14184
  Button,
14230
14185
  {
14231
14186
  size: "sm",
@@ -14237,8 +14192,8 @@ var TimePicker = ({
14237
14192
  minute + minuteIncrement
14238
14193
  );
14239
14194
  }) }),
14240
- !is24HourFormat && /* @__PURE__ */ jsxs38("div", { "data-name": "time-picker-value-column", children: [
14241
- /* @__PURE__ */ jsx60(
14195
+ !is24HourFormat && /* @__PURE__ */ jsxs39("div", { "data-name": "time-picker-value-column", children: [
14196
+ /* @__PURE__ */ jsx62(
14242
14197
  Button,
14243
14198
  {
14244
14199
  size: "sm",
@@ -14247,7 +14202,7 @@ var TimePicker = ({
14247
14202
  children: "AM"
14248
14203
  }
14249
14204
  ),
14250
- /* @__PURE__ */ jsx60(
14205
+ /* @__PURE__ */ jsx62(
14251
14206
  Button,
14252
14207
  {
14253
14208
  size: "sm",
@@ -14265,7 +14220,7 @@ var TimePickerUncontrolled = ({
14265
14220
  ...props
14266
14221
  }) => {
14267
14222
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14268
- return /* @__PURE__ */ jsx60(
14223
+ return /* @__PURE__ */ jsx62(
14269
14224
  TimePicker,
14270
14225
  {
14271
14226
  ...props,
@@ -14276,7 +14231,7 @@ var TimePickerUncontrolled = ({
14276
14231
  };
14277
14232
 
14278
14233
  // src/components/user-interaction/date/DateTimePicker.tsx
14279
- import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
14234
+ import { jsx as jsx63, jsxs as jsxs40 } from "react/jsx-runtime";
14280
14235
  var DateTimePicker = ({
14281
14236
  value = /* @__PURE__ */ new Date(),
14282
14237
  start,
@@ -14295,7 +14250,7 @@ var DateTimePicker = ({
14295
14250
  let dateDisplay;
14296
14251
  let timeDisplay;
14297
14252
  if (useDate) {
14298
- dateDisplay = /* @__PURE__ */ jsx61(
14253
+ dateDisplay = /* @__PURE__ */ jsx63(
14299
14254
  DatePicker,
14300
14255
  {
14301
14256
  ...datePickerProps,
@@ -14311,7 +14266,7 @@ var DateTimePicker = ({
14311
14266
  );
14312
14267
  }
14313
14268
  if (useTime) {
14314
- timeDisplay = /* @__PURE__ */ jsx61(
14269
+ timeDisplay = /* @__PURE__ */ jsx63(
14315
14270
  TimePicker,
14316
14271
  {
14317
14272
  ...timePickerProps,
@@ -14324,14 +14279,14 @@ var DateTimePicker = ({
14324
14279
  }
14325
14280
  );
14326
14281
  }
14327
- return /* @__PURE__ */ jsxs39("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
14282
+ return /* @__PURE__ */ jsxs40("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
14328
14283
  dateDisplay,
14329
14284
  timeDisplay
14330
14285
  ] });
14331
14286
  };
14332
14287
  var DateTimePickerUncontrolled = ({ value: initialValue, onValueChange, ...props }) => {
14333
14288
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14334
- return /* @__PURE__ */ jsx61(
14289
+ return /* @__PURE__ */ jsx63(
14335
14290
  DateTimePicker,
14336
14291
  {
14337
14292
  ...props,
@@ -14342,7 +14297,7 @@ var DateTimePickerUncontrolled = ({ value: initialValue, onValueChange, ...props
14342
14297
  };
14343
14298
 
14344
14299
  // src/components/user-interaction/date/TimeDisplay.tsx
14345
- import { jsx as jsx62 } from "react/jsx-runtime";
14300
+ import { jsx as jsx64 } from "react/jsx-runtime";
14346
14301
  var TimeDisplay = ({
14347
14302
  date,
14348
14303
  mode = "daysFromToday"
@@ -14379,15 +14334,15 @@ var TimeDisplay = ({
14379
14334
  } else {
14380
14335
  fullString = `${date.getDate()}. ${monthToTranslation[date.getMonth()]} ${date.getFullYear()}`;
14381
14336
  }
14382
- return /* @__PURE__ */ jsx62("span", { children: fullString });
14337
+ return /* @__PURE__ */ jsx64("span", { children: fullString });
14383
14338
  };
14384
14339
 
14385
14340
  // src/components/user-interaction/input/DateTimeInput.tsx
14386
- import { useEffect as useEffect30, useMemo as useMemo18, useRef as useRef19, useState as useState33 } from "react";
14341
+ import { useEffect as useEffect32, useMemo as useMemo18, useRef as useRef20, useState as useState33 } from "react";
14387
14342
  import { createPortal as createPortal8 } from "react-dom";
14388
14343
  import { CalendarIcon } from "lucide-react";
14389
14344
  import clsx33 from "clsx";
14390
- import { Fragment as Fragment9, jsx as jsx63, jsxs as jsxs40 } from "react/jsx-runtime";
14345
+ import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs41 } from "react/jsx-runtime";
14391
14346
  var DateTimeInput = ({
14392
14347
  value,
14393
14348
  onValueChange,
@@ -14401,8 +14356,8 @@ var DateTimeInput = ({
14401
14356
  const translation = useHightideTranslation();
14402
14357
  const { locale } = useLocale();
14403
14358
  const [isOpen, setIsOpen] = useState33(false);
14404
- const anchorRef = useRef19(null);
14405
- const containerRef = useRef19(null);
14359
+ const anchorRef = useRef20(null);
14360
+ const containerRef = useRef20(null);
14406
14361
  const position = useFloatingElement({
14407
14362
  active: isOpen,
14408
14363
  anchorRef,
@@ -14417,14 +14372,14 @@ var DateTimeInput = ({
14417
14372
  });
14418
14373
  const { zIndex } = useOverlayRegistry({ isActive: isOpen });
14419
14374
  const isReadOnly = useMemo18(() => props.readOnly || props.disabled, [props.readOnly, props.disabled]);
14420
- useEffect30(() => {
14375
+ useEffect32(() => {
14421
14376
  if (isReadOnly) {
14422
14377
  setIsOpen(false);
14423
14378
  }
14424
14379
  }, [isReadOnly]);
14425
- return /* @__PURE__ */ jsxs40(Fragment9, { children: [
14426
- /* @__PURE__ */ jsxs40("div", { ...containerProps, ref: anchorRef, className: clsx33("relative w-full", containerProps?.className), children: [
14427
- /* @__PURE__ */ jsx63(
14380
+ return /* @__PURE__ */ jsxs41(Fragment9, { children: [
14381
+ /* @__PURE__ */ jsxs41("div", { ...containerProps, ref: anchorRef, className: clsx33("relative w-full", containerProps?.className), children: [
14382
+ /* @__PURE__ */ jsx65(
14428
14383
  Input,
14429
14384
  {
14430
14385
  ...props,
@@ -14442,7 +14397,7 @@ var DateTimeInput = ({
14442
14397
  )
14443
14398
  }
14444
14399
  ),
14445
- /* @__PURE__ */ jsx63(
14400
+ /* @__PURE__ */ jsx65(
14446
14401
  Button,
14447
14402
  {
14448
14403
  coloringStyle: "text",
@@ -14452,12 +14407,12 @@ var DateTimeInput = ({
14452
14407
  className: "absolute right-1 top-1/2 -translate-y-1/2",
14453
14408
  disabled: isReadOnly,
14454
14409
  onClick: () => setIsOpen((prevState) => !prevState),
14455
- children: /* @__PURE__ */ jsx63(CalendarIcon, { className: "size-5" })
14410
+ children: /* @__PURE__ */ jsx65(CalendarIcon, { className: "size-5" })
14456
14411
  }
14457
14412
  )
14458
14413
  ] }),
14459
- /* @__PURE__ */ jsx63(Visibility, { isVisible: isOpen, children: createPortal8(
14460
- /* @__PURE__ */ jsxs40(
14414
+ /* @__PURE__ */ jsx65(Visibility, { isVisible: isOpen, children: createPortal8(
14415
+ /* @__PURE__ */ jsxs41(
14461
14416
  "div",
14462
14417
  {
14463
14418
  ref: containerRef,
@@ -14468,7 +14423,7 @@ var DateTimeInput = ({
14468
14423
  opacity: position ? void 0 : 0
14469
14424
  },
14470
14425
  children: [
14471
- /* @__PURE__ */ jsx63(
14426
+ /* @__PURE__ */ jsx65(
14472
14427
  DateTimePicker,
14473
14428
  {
14474
14429
  ...pickerProps,
@@ -14478,8 +14433,8 @@ var DateTimeInput = ({
14478
14433
  onEditComplete
14479
14434
  }
14480
14435
  ),
14481
- /* @__PURE__ */ jsxs40("div", { className: "flex-row-2 justify-end", children: [
14482
- /* @__PURE__ */ jsx63(Visibility, { isVisible: !!onRemove && !!value, children: /* @__PURE__ */ jsx63(
14436
+ /* @__PURE__ */ jsxs41("div", { className: "flex-row-2 justify-end", children: [
14437
+ /* @__PURE__ */ jsx65(Visibility, { isVisible: !!onRemove && !!value, children: /* @__PURE__ */ jsx65(
14483
14438
  Button,
14484
14439
  {
14485
14440
  size: "md",
@@ -14492,7 +14447,7 @@ var DateTimeInput = ({
14492
14447
  children: translation("clear")
14493
14448
  }
14494
14449
  ) }),
14495
- /* @__PURE__ */ jsx63(Visibility, { isVisible: !value, children: /* @__PURE__ */ jsx63(
14450
+ /* @__PURE__ */ jsx65(Visibility, { isVisible: !value, children: /* @__PURE__ */ jsx65(
14496
14451
  Button,
14497
14452
  {
14498
14453
  size: "md",
@@ -14502,7 +14457,7 @@ var DateTimeInput = ({
14502
14457
  children: translation("cancel")
14503
14458
  }
14504
14459
  ) }),
14505
- /* @__PURE__ */ jsx63(
14460
+ /* @__PURE__ */ jsx65(
14506
14461
  Button,
14507
14462
  {
14508
14463
  size: "md",
@@ -14527,7 +14482,7 @@ var DateTimeInputUncontrolled = ({
14527
14482
  ...props
14528
14483
  }) => {
14529
14484
  const [value, setValue] = useOverwritableState(initialValue);
14530
- return /* @__PURE__ */ jsx63(
14485
+ return /* @__PURE__ */ jsx65(
14531
14486
  DateTimeInput,
14532
14487
  {
14533
14488
  ...props,
@@ -14545,21 +14500,21 @@ var DateTimeInputUncontrolled = ({
14545
14500
  };
14546
14501
 
14547
14502
  // src/components/user-interaction/input/InsideLabelInput.tsx
14548
- import { useId as useId12 } from "react";
14549
- import { forwardRef as forwardRef10, useState as useState34 } from "react";
14503
+ import { useId as useId13 } from "react";
14504
+ import { forwardRef as forwardRef11, useState as useState34 } from "react";
14550
14505
  import clsx34 from "clsx";
14551
- import { jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
14552
- var InsideLabelInput = forwardRef10(function InsideLabelInput2({
14506
+ import { jsx as jsx66, jsxs as jsxs42 } from "react/jsx-runtime";
14507
+ var InsideLabelInput = forwardRef11(function InsideLabelInput2({
14553
14508
  id: customId,
14554
14509
  label,
14555
14510
  ...props
14556
14511
  }, forwardedRef) {
14557
14512
  const { value } = props;
14558
14513
  const [isFocused, setIsFocused] = useState34(false);
14559
- const generatedId = useId12();
14514
+ const generatedId = useId13();
14560
14515
  const id = customId ?? generatedId;
14561
- return /* @__PURE__ */ jsxs41("div", { className: clsx34("relative"), children: [
14562
- /* @__PURE__ */ jsx64(
14516
+ return /* @__PURE__ */ jsxs42("div", { className: clsx34("relative"), children: [
14517
+ /* @__PURE__ */ jsx66(
14563
14518
  Input,
14564
14519
  {
14565
14520
  ...props,
@@ -14577,7 +14532,7 @@ var InsideLabelInput = forwardRef10(function InsideLabelInput2({
14577
14532
  }
14578
14533
  }
14579
14534
  ),
14580
- /* @__PURE__ */ jsx64(
14535
+ /* @__PURE__ */ jsx66(
14581
14536
  "label",
14582
14537
  {
14583
14538
  id: id + "-label",
@@ -14599,7 +14554,7 @@ var InsideLabelInputUncontrolled = ({
14599
14554
  ...props
14600
14555
  }) => {
14601
14556
  const [value, setValue] = useOverwritableState(initialValue, props.onValueChange);
14602
- return /* @__PURE__ */ jsx64(
14557
+ return /* @__PURE__ */ jsx66(
14603
14558
  InsideLabelInput,
14604
14559
  {
14605
14560
  ...props,
@@ -14612,7 +14567,7 @@ var InsideLabelInputUncontrolled = ({
14612
14567
  // src/components/user-interaction/input/SearchBar.tsx
14613
14568
  import { Search } from "lucide-react";
14614
14569
  import { clsx as clsx35 } from "clsx";
14615
- import { jsx as jsx65, jsxs as jsxs42 } from "react/jsx-runtime";
14570
+ import { jsx as jsx67, jsxs as jsxs43 } from "react/jsx-runtime";
14616
14571
  var SearchBar = ({
14617
14572
  value: initialValue,
14618
14573
  onSearch,
@@ -14623,8 +14578,8 @@ var SearchBar = ({
14623
14578
  }) => {
14624
14579
  const translation = useHightideTranslation();
14625
14580
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14626
- return /* @__PURE__ */ jsxs42("div", { ...containerProps, className: clsx35("relative", containerProps?.className), children: [
14627
- /* @__PURE__ */ jsx65(
14581
+ return /* @__PURE__ */ jsxs43("div", { ...containerProps, className: clsx35("relative", containerProps?.className), children: [
14582
+ /* @__PURE__ */ jsx67(
14628
14583
  InputUncontrolled,
14629
14584
  {
14630
14585
  ...inputProps,
@@ -14635,7 +14590,7 @@ var SearchBar = ({
14635
14590
  className: clsx35("pr-10 w-full", inputProps.className)
14636
14591
  }
14637
14592
  ),
14638
- /* @__PURE__ */ jsx65(
14593
+ /* @__PURE__ */ jsx67(
14639
14594
  Button,
14640
14595
  {
14641
14596
  ...searchButtonProps,
@@ -14645,33 +14600,33 @@ var SearchBar = ({
14645
14600
  coloringStyle: "text",
14646
14601
  onClick: () => onSearch(value),
14647
14602
  className: clsx35("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
14648
- children: /* @__PURE__ */ jsx65(Search, { className: "w-full h-full" })
14603
+ children: /* @__PURE__ */ jsx67(Search, { className: "w-full h-full" })
14649
14604
  }
14650
14605
  )
14651
14606
  ] });
14652
14607
  };
14653
14608
 
14654
14609
  // src/components/user-interaction/input/ToggleableInput.tsx
14655
- import { forwardRef as forwardRef11, useEffect as useEffect31, useImperativeHandle as useImperativeHandle4, useRef as useRef20, useState as useState35 } from "react";
14610
+ import { forwardRef as forwardRef12, useEffect as useEffect33, useImperativeHandle as useImperativeHandle4, useRef as useRef21, useState as useState35 } from "react";
14656
14611
  import { Pencil } from "lucide-react";
14657
14612
  import clsx36 from "clsx";
14658
- import { jsx as jsx66, jsxs as jsxs43 } from "react/jsx-runtime";
14659
- var ToggleableInput = forwardRef11(function ToggleableInput2({
14613
+ import { jsx as jsx68, jsxs as jsxs44 } from "react/jsx-runtime";
14614
+ var ToggleableInput = forwardRef12(function ToggleableInput2({
14660
14615
  value,
14661
14616
  initialState = "display",
14662
14617
  editCompleteOptions,
14663
14618
  ...props
14664
14619
  }, forwardedRef) {
14665
14620
  const [isEditing, setIsEditing] = useState35(initialState !== "display");
14666
- const innerRef = useRef20(null);
14621
+ const innerRef = useRef21(null);
14667
14622
  useImperativeHandle4(forwardedRef, () => innerRef.current);
14668
- useEffect31(() => {
14623
+ useEffect33(() => {
14669
14624
  if (isEditing) {
14670
14625
  innerRef.current?.focus();
14671
14626
  }
14672
14627
  }, [isEditing]);
14673
- return /* @__PURE__ */ jsxs43("div", { className: clsx36("relative flex-row-2", { "flex-1": isEditing }), children: [
14674
- /* @__PURE__ */ jsx66(
14628
+ return /* @__PURE__ */ jsxs44("div", { className: clsx36("relative flex-row-2", { "flex-1": isEditing }), children: [
14629
+ /* @__PURE__ */ jsx68(
14675
14630
  Input,
14676
14631
  {
14677
14632
  ...props,
@@ -14697,9 +14652,9 @@ var ToggleableInput = forwardRef11(function ToggleableInput2({
14697
14652
  })
14698
14653
  }
14699
14654
  ),
14700
- !isEditing && /* @__PURE__ */ jsxs43("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
14701
- /* @__PURE__ */ jsx66("span", { className: clsx36(" truncate"), children: value }),
14702
- /* @__PURE__ */ jsx66(Pencil, { className: clsx36(`size-force-4`, { "text-transparent": isEditing }) })
14655
+ !isEditing && /* @__PURE__ */ jsxs44("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
14656
+ /* @__PURE__ */ jsx68("span", { className: clsx36(" truncate"), children: value }),
14657
+ /* @__PURE__ */ jsx68(Pencil, { className: clsx36(`size-force-4`, { "text-transparent": isEditing }) })
14703
14658
  ] })
14704
14659
  ] });
14705
14660
  });
@@ -14709,7 +14664,7 @@ var ToggleableInputUncontrolled = ({
14709
14664
  ...restProps
14710
14665
  }) => {
14711
14666
  const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14712
- return /* @__PURE__ */ jsx66(
14667
+ return /* @__PURE__ */ jsx68(
14713
14668
  ToggleableInput,
14714
14669
  {
14715
14670
  value,
@@ -14724,7 +14679,7 @@ import { Check as Check3 } from "lucide-react";
14724
14679
 
14725
14680
  // src/components/user-interaction/properties/PropertyBase.tsx
14726
14681
  import { AlertTriangle, Trash, X as X3 } from "lucide-react";
14727
- import { jsx as jsx67, jsxs as jsxs44 } from "react/jsx-runtime";
14682
+ import { jsx as jsx69, jsxs as jsxs45 } from "react/jsx-runtime";
14728
14683
  var PropertyBase = ({
14729
14684
  name: name2,
14730
14685
  children,
@@ -14743,29 +14698,29 @@ var PropertyBase = ({
14743
14698
  const isClearEnabled = allowClear && !readOnly;
14744
14699
  const isRemoveEnabled = allowRemove && !readOnly;
14745
14700
  const showActionsContainer = isClearEnabled || isRemoveEnabled;
14746
- return /* @__PURE__ */ jsxs44(
14701
+ return /* @__PURE__ */ jsxs45(
14747
14702
  "div",
14748
14703
  {
14749
14704
  className: className ? `group/property ${className}` : "group/property",
14750
14705
  "data-name": "property-root",
14751
14706
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
14752
14707
  children: [
14753
- /* @__PURE__ */ jsxs44(
14708
+ /* @__PURE__ */ jsxs45(
14754
14709
  "div",
14755
14710
  {
14756
14711
  className,
14757
14712
  "data-name": "property-title",
14758
14713
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
14759
14714
  children: [
14760
- /* @__PURE__ */ jsx67(Tooltip, { tooltip: name2, containerClassName: "min-w-0", children: /* @__PURE__ */ jsxs44("div", { className: "flex-row-1 items-center", children: [
14761
- /* @__PURE__ */ jsx67("div", { "data-name": "property-title-icon", children: icon }),
14762
- /* @__PURE__ */ jsx67("span", { "data-name": "property-title-text", children: name2 })
14715
+ /* @__PURE__ */ jsx69(Tooltip, { tooltip: name2, containerClassName: "min-w-0", children: /* @__PURE__ */ jsxs45("div", { className: "flex-row-1 items-center", children: [
14716
+ /* @__PURE__ */ jsx69("div", { "data-name": "property-title-icon", children: icon }),
14717
+ /* @__PURE__ */ jsx69("span", { "data-name": "property-title-text", children: name2 })
14763
14718
  ] }) }),
14764
- invalid && /* @__PURE__ */ jsx67(AlertTriangle, { className: "size-force-6" })
14719
+ invalid && /* @__PURE__ */ jsx69(AlertTriangle, { className: "size-force-6" })
14765
14720
  ]
14766
14721
  }
14767
14722
  ),
14768
- /* @__PURE__ */ jsxs44(
14723
+ /* @__PURE__ */ jsxs45(
14769
14724
  "div",
14770
14725
  {
14771
14726
  className,
@@ -14773,8 +14728,8 @@ var PropertyBase = ({
14773
14728
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
14774
14729
  children: [
14775
14730
  children({ required, hasValue, invalid }),
14776
- showActionsContainer && /* @__PURE__ */ jsxs44("div", { "data-name": "property-actions", children: [
14777
- isClearEnabled && /* @__PURE__ */ jsx67(Tooltip, { tooltip: translation("clearValue"), children: /* @__PURE__ */ jsx67(
14731
+ showActionsContainer && /* @__PURE__ */ jsxs45("div", { "data-name": "property-actions", children: [
14732
+ isClearEnabled && /* @__PURE__ */ jsx69(Tooltip, { tooltip: translation("clearValue"), children: /* @__PURE__ */ jsx69(
14778
14733
  Button,
14779
14734
  {
14780
14735
  onClick: onValueClear,
@@ -14783,10 +14738,10 @@ var PropertyBase = ({
14783
14738
  coloringStyle: "text",
14784
14739
  layout: "icon",
14785
14740
  size: "sm",
14786
- children: /* @__PURE__ */ jsx67(X3, { className: "size-force-5" })
14741
+ children: /* @__PURE__ */ jsx69(X3, { className: "size-force-5" })
14787
14742
  }
14788
14743
  ) }),
14789
- isRemoveEnabled && /* @__PURE__ */ jsx67(Tooltip, { tooltip: translation("removeProperty"), children: /* @__PURE__ */ jsx67(
14744
+ isRemoveEnabled && /* @__PURE__ */ jsx69(Tooltip, { tooltip: translation("removeProperty"), children: /* @__PURE__ */ jsx69(
14790
14745
  Button,
14791
14746
  {
14792
14747
  onClick: onRemove,
@@ -14794,7 +14749,7 @@ var PropertyBase = ({
14794
14749
  coloringStyle: "text",
14795
14750
  layout: "icon",
14796
14751
  size: "sm",
14797
- children: /* @__PURE__ */ jsx67(Trash, { className: "size-force-5" })
14752
+ children: /* @__PURE__ */ jsx69(Trash, { className: "size-force-5" })
14798
14753
  }
14799
14754
  ) })
14800
14755
  ] })
@@ -14807,7 +14762,7 @@ var PropertyBase = ({
14807
14762
  };
14808
14763
 
14809
14764
  // src/components/user-interaction/properties/CheckboxProperty.tsx
14810
- import { jsx as jsx68, jsxs as jsxs45 } from "react/jsx-runtime";
14765
+ import { jsx as jsx70, jsxs as jsxs46 } from "react/jsx-runtime";
14811
14766
  var CheckboxProperty = ({
14812
14767
  value,
14813
14768
  onValueChange,
@@ -14816,15 +14771,15 @@ var CheckboxProperty = ({
14816
14771
  ...baseProps
14817
14772
  }) => {
14818
14773
  const translation = useHightideTranslation();
14819
- return /* @__PURE__ */ jsx68(
14774
+ return /* @__PURE__ */ jsx70(
14820
14775
  PropertyBase,
14821
14776
  {
14822
14777
  ...baseProps,
14823
14778
  hasValue: value !== void 0,
14824
14779
  readOnly,
14825
- icon: /* @__PURE__ */ jsx68(Check3, { size: 24 }),
14826
- children: () => /* @__PURE__ */ jsxs45("div", { className: "flex-row-2 items-center", children: [
14827
- /* @__PURE__ */ jsx68(
14780
+ icon: /* @__PURE__ */ jsx70(Check3, { size: 24 }),
14781
+ children: () => /* @__PURE__ */ jsxs46("div", { className: "flex-row-2 items-center", children: [
14782
+ /* @__PURE__ */ jsx70(
14828
14783
  Button,
14829
14784
  {
14830
14785
  color: value ? "positive" : "neutral",
@@ -14837,7 +14792,7 @@ var CheckboxProperty = ({
14837
14792
  children: translation("yes")
14838
14793
  }
14839
14794
  ),
14840
- /* @__PURE__ */ jsx68(
14795
+ /* @__PURE__ */ jsx70(
14841
14796
  Button,
14842
14797
  {
14843
14798
  color: !value && value !== void 0 ? "negative" : "neutral",
@@ -14857,7 +14812,7 @@ var CheckboxProperty = ({
14857
14812
 
14858
14813
  // src/components/user-interaction/properties/DateProperty.tsx
14859
14814
  import { CalendarDays } from "lucide-react";
14860
- import { jsx as jsx69 } from "react/jsx-runtime";
14815
+ import { jsx as jsx71 } from "react/jsx-runtime";
14861
14816
  var DateProperty = ({
14862
14817
  value,
14863
14818
  onValueChange,
@@ -14867,13 +14822,13 @@ var DateProperty = ({
14867
14822
  ...baseProps
14868
14823
  }) => {
14869
14824
  const hasValue = !!value;
14870
- return /* @__PURE__ */ jsx69(
14825
+ return /* @__PURE__ */ jsx71(
14871
14826
  PropertyBase,
14872
14827
  {
14873
14828
  ...baseProps,
14874
14829
  hasValue,
14875
- icon: /* @__PURE__ */ jsx69(CalendarDays, { size: 24 }),
14876
- children: ({ invalid }) => /* @__PURE__ */ jsx69(
14830
+ icon: /* @__PURE__ */ jsx71(CalendarDays, { size: 24 }),
14831
+ children: ({ invalid }) => /* @__PURE__ */ jsx71(
14877
14832
  DateTimeInput,
14878
14833
  {
14879
14834
  value,
@@ -14891,7 +14846,129 @@ var DateProperty = ({
14891
14846
 
14892
14847
  // src/components/user-interaction/properties/MultiSelectProperty.tsx
14893
14848
  import { List } from "lucide-react";
14894
- import { jsx as jsx70 } from "react/jsx-runtime";
14849
+
14850
+ // src/components/user-interaction/select/MultiSelectChipDisplay.tsx
14851
+ import { forwardRef as forwardRef13, useEffect as useEffect34, useImperativeHandle as useImperativeHandle5, useRef as useRef22 } from "react";
14852
+ import { XIcon as XIcon2, Plus } from "lucide-react";
14853
+ import { jsx as jsx72, jsxs as jsxs47 } from "react/jsx-runtime";
14854
+ var MultiSelectChipDisplayButton = forwardRef13(function MultiSelectChipDisplayButton2({
14855
+ id,
14856
+ ...props
14857
+ }, ref) {
14858
+ const { state, trigger, item, ids, setIds } = useSelectContext();
14859
+ const { register, unregister, toggleOpen } = trigger;
14860
+ useEffect34(() => {
14861
+ if (id) {
14862
+ setIds((prev) => ({
14863
+ ...prev,
14864
+ trigger: id
14865
+ }));
14866
+ }
14867
+ }, [id, setIds]);
14868
+ const innerRef = useRef22(null);
14869
+ useImperativeHandle5(ref, () => innerRef.current);
14870
+ useEffect34(() => {
14871
+ register(innerRef);
14872
+ return () => unregister();
14873
+ }, [register, unregister]);
14874
+ const disabled = !!props?.disabled || !!state.disabled;
14875
+ const invalid = state.invalid;
14876
+ return /* @__PURE__ */ jsxs47(
14877
+ "div",
14878
+ {
14879
+ ...props,
14880
+ ref: innerRef,
14881
+ onClick: (event) => {
14882
+ toggleOpen();
14883
+ props.onClick?.(event);
14884
+ },
14885
+ "data-name": props["data-name"] ?? "select-button-chips",
14886
+ "data-value": state.value.length > 0 ? "" : void 0,
14887
+ "data-disabled": disabled ? "" : void 0,
14888
+ "data-invalid": invalid ? "" : void 0,
14889
+ "aria-invalid": invalid,
14890
+ "aria-disabled": disabled,
14891
+ children: [
14892
+ state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ jsxs47(Chip, { className: "gap-x-2", children: [
14893
+ label,
14894
+ /* @__PURE__ */ jsx72(
14895
+ Button,
14896
+ {
14897
+ onClick: () => {
14898
+ item.toggleSelection(value, false);
14899
+ },
14900
+ size: "xs",
14901
+ color: "negative",
14902
+ coloringStyle: "text",
14903
+ layout: "icon",
14904
+ className: "flex-row-0 items-center",
14905
+ children: /* @__PURE__ */ jsx72(XIcon2, { className: "size-5" })
14906
+ }
14907
+ )
14908
+ ] }, value)),
14909
+ /* @__PURE__ */ jsx72(
14910
+ Button,
14911
+ {
14912
+ id: ids.trigger,
14913
+ onClick: (event) => {
14914
+ event.stopPropagation();
14915
+ toggleOpen();
14916
+ },
14917
+ onKeyDown: (event) => {
14918
+ switch (event.key) {
14919
+ case "ArrowDown":
14920
+ toggleOpen(true, { highlightStartPositionBehavior: "first" });
14921
+ break;
14922
+ case "ArrowUp":
14923
+ toggleOpen(true, { highlightStartPositionBehavior: "last" });
14924
+ }
14925
+ },
14926
+ layout: "icon",
14927
+ size: "sm",
14928
+ color: "neutral",
14929
+ "aria-invalid": invalid,
14930
+ "aria-disabled": disabled,
14931
+ "aria-haspopup": "listbox",
14932
+ "aria-expanded": state.isOpen,
14933
+ "aria-controls": state.isOpen ? ids.content : void 0,
14934
+ className: "size-9",
14935
+ children: /* @__PURE__ */ jsx72(Plus, {})
14936
+ }
14937
+ )
14938
+ ]
14939
+ }
14940
+ );
14941
+ });
14942
+ var MultiSelectChipDisplay = forwardRef13(function MultiSelectChipDisplay2({
14943
+ children,
14944
+ contentPanelProps,
14945
+ chipDisplayProps,
14946
+ ...props
14947
+ }, ref) {
14948
+ return /* @__PURE__ */ jsxs47(MultiSelectRoot, { ...props, children: [
14949
+ /* @__PURE__ */ jsx72(MultiSelectChipDisplayButton, { ref, ...chipDisplayProps }),
14950
+ /* @__PURE__ */ jsx72(MultiSelectContent, { ...contentPanelProps, children })
14951
+ ] });
14952
+ });
14953
+ var MultiSelectChipDisplayUncontrolled = forwardRef13(function MultiSelectChipDisplayUncontrolled2({
14954
+ value: initialValue,
14955
+ onValueChange,
14956
+ ...props
14957
+ }, ref) {
14958
+ const [value, setValue] = useOverwritableState(initialValue, onValueChange);
14959
+ return /* @__PURE__ */ jsx72(
14960
+ MultiSelectChipDisplay,
14961
+ {
14962
+ ...props,
14963
+ ref,
14964
+ value,
14965
+ onValueChange: setValue
14966
+ }
14967
+ );
14968
+ });
14969
+
14970
+ // src/components/user-interaction/properties/MultiSelectProperty.tsx
14971
+ import { jsx as jsx73 } from "react/jsx-runtime";
14895
14972
  var MultiSelectProperty = ({
14896
14973
  children,
14897
14974
  value,
@@ -14900,18 +14977,18 @@ var MultiSelectProperty = ({
14900
14977
  ...props
14901
14978
  }) => {
14902
14979
  const hasValue = value.length > 0;
14903
- return /* @__PURE__ */ jsx70(
14980
+ return /* @__PURE__ */ jsx73(
14904
14981
  PropertyBase,
14905
14982
  {
14906
14983
  ...props,
14907
14984
  hasValue,
14908
- icon: /* @__PURE__ */ jsx70(List, { size: 24 }),
14909
- children: ({ invalid }) => /* @__PURE__ */ jsx70(
14985
+ icon: /* @__PURE__ */ jsx73(List, { size: 24 }),
14986
+ children: ({ invalid }) => /* @__PURE__ */ jsx73(
14910
14987
  "div",
14911
14988
  {
14912
14989
  "data-name": "property-input-wrapper",
14913
14990
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
14914
- children: /* @__PURE__ */ jsx70(
14991
+ children: /* @__PURE__ */ jsx73(
14915
14992
  MultiSelectChipDisplay,
14916
14993
  {
14917
14994
  value,
@@ -14937,7 +15014,7 @@ var MultiSelectProperty = ({
14937
15014
 
14938
15015
  // src/components/user-interaction/properties/NumberProperty.tsx
14939
15016
  import { Binary } from "lucide-react";
14940
- import { jsx as jsx71, jsxs as jsxs46 } from "react/jsx-runtime";
15017
+ import { jsx as jsx74, jsxs as jsxs48 } from "react/jsx-runtime";
14941
15018
  var NumberProperty = ({
14942
15019
  value,
14943
15020
  onRemove,
@@ -14949,20 +15026,20 @@ var NumberProperty = ({
14949
15026
  }) => {
14950
15027
  const translation = useHightideTranslation();
14951
15028
  const hasValue = value !== void 0;
14952
- return /* @__PURE__ */ jsx71(
15029
+ return /* @__PURE__ */ jsx74(
14953
15030
  PropertyBase,
14954
15031
  {
14955
15032
  ...baseProps,
14956
15033
  onRemove,
14957
15034
  hasValue,
14958
- icon: /* @__PURE__ */ jsx71(Binary, { size: 24 }),
14959
- children: ({ invalid }) => /* @__PURE__ */ jsxs46(
15035
+ icon: /* @__PURE__ */ jsx74(Binary, { size: 24 }),
15036
+ children: ({ invalid }) => /* @__PURE__ */ jsxs48(
14960
15037
  "div",
14961
15038
  {
14962
15039
  "data-name": "property-input-wrapper",
14963
15040
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
14964
15041
  children: [
14965
- /* @__PURE__ */ jsx71(
15042
+ /* @__PURE__ */ jsx74(
14966
15043
  Input,
14967
15044
  {
14968
15045
  className: "w-full pr-8",
@@ -14990,7 +15067,7 @@ var NumberProperty = ({
14990
15067
  }
14991
15068
  }
14992
15069
  ),
14993
- suffix && /* @__PURE__ */ jsx71(
15070
+ suffix && /* @__PURE__ */ jsx74(
14994
15071
  "span",
14995
15072
  {
14996
15073
  "data-name": "property-suffix",
@@ -15007,7 +15084,7 @@ var NumberProperty = ({
15007
15084
 
15008
15085
  // src/components/user-interaction/properties/SelectProperty.tsx
15009
15086
  import { List as List2 } from "lucide-react";
15010
- import { jsx as jsx72 } from "react/jsx-runtime";
15087
+ import { jsx as jsx75 } from "react/jsx-runtime";
15011
15088
  var SingleSelectProperty = ({
15012
15089
  children,
15013
15090
  value,
@@ -15016,18 +15093,18 @@ var SingleSelectProperty = ({
15016
15093
  ...props
15017
15094
  }) => {
15018
15095
  const hasValue = value !== void 0;
15019
- return /* @__PURE__ */ jsx72(
15096
+ return /* @__PURE__ */ jsx75(
15020
15097
  PropertyBase,
15021
15098
  {
15022
15099
  ...props,
15023
15100
  hasValue,
15024
- icon: /* @__PURE__ */ jsx72(List2, { size: 24 }),
15025
- children: ({ invalid }) => /* @__PURE__ */ jsx72(
15101
+ icon: /* @__PURE__ */ jsx75(List2, { size: 24 }),
15102
+ children: ({ invalid }) => /* @__PURE__ */ jsx75(
15026
15103
  "div",
15027
15104
  {
15028
15105
  "data-name": "property-input-wrapper",
15029
15106
  "data-invalid": PropsUtil.dataAttributes.bool(invalid),
15030
- children: /* @__PURE__ */ jsx72(
15107
+ children: /* @__PURE__ */ jsx75(
15031
15108
  Select,
15032
15109
  {
15033
15110
  value,
@@ -15050,7 +15127,7 @@ var SingleSelectProperty = ({
15050
15127
 
15051
15128
  // src/components/user-interaction/properties/TextProperty.tsx
15052
15129
  import { Text } from "lucide-react";
15053
- import { jsx as jsx73 } from "react/jsx-runtime";
15130
+ import { jsx as jsx76 } from "react/jsx-runtime";
15054
15131
  var TextProperty = ({
15055
15132
  value,
15056
15133
  readOnly,
@@ -15061,14 +15138,14 @@ var TextProperty = ({
15061
15138
  }) => {
15062
15139
  const translation = useHightideTranslation();
15063
15140
  const hasValue = value !== void 0;
15064
- return /* @__PURE__ */ jsx73(
15141
+ return /* @__PURE__ */ jsx76(
15065
15142
  PropertyBase,
15066
15143
  {
15067
15144
  ...baseProps,
15068
15145
  onRemove,
15069
15146
  hasValue,
15070
- icon: /* @__PURE__ */ jsx73(Text, { size: 24 }),
15071
- children: ({ invalid }) => /* @__PURE__ */ jsx73(
15147
+ icon: /* @__PURE__ */ jsx76(Text, { size: 24 }),
15148
+ children: ({ invalid }) => /* @__PURE__ */ jsx76(
15072
15149
  Textarea,
15073
15150
  {
15074
15151
  className: "w-full",
@@ -15098,25 +15175,56 @@ var TextProperty = ({
15098
15175
  );
15099
15176
  };
15100
15177
 
15178
+ // src/components/user-interaction/select/MultiSelect.tsx
15179
+ import { forwardRef as forwardRef14 } from "react";
15180
+ import { jsx as jsx77, jsxs as jsxs49 } from "react/jsx-runtime";
15181
+ var MultiSelect = forwardRef14(function MultiSelect2({
15182
+ children,
15183
+ contentPanelProps,
15184
+ buttonProps,
15185
+ ...props
15186
+ }, ref) {
15187
+ return /* @__PURE__ */ jsxs49(MultiSelectRoot, { ...props, children: [
15188
+ /* @__PURE__ */ jsx77(MultiSelectButton, { ref, ...buttonProps }),
15189
+ /* @__PURE__ */ jsx77(MultiSelectContent, { ...contentPanelProps, children })
15190
+ ] });
15191
+ });
15192
+ var MultiSelectUncontrolled = forwardRef14(function MultiSelectUncontrolled2({
15193
+ value: initialValue,
15194
+ onValueChange,
15195
+ ...props
15196
+ }, ref) {
15197
+ const [value, setValue] = useOverwritableState(initialValue, onValueChange);
15198
+ return /* @__PURE__ */ jsx77(
15199
+ MultiSelect,
15200
+ {
15201
+ ...props,
15202
+ ref,
15203
+ value,
15204
+ onValueChange: setValue
15205
+ }
15206
+ );
15207
+ });
15208
+
15101
15209
  // src/components/utils/FocusTrap.tsx
15102
- import { useRef as useRef21 } from "react";
15103
- import { useImperativeHandle as useImperativeHandle5 } from "react";
15104
- import { forwardRef as forwardRef12 } from "react";
15105
- import { jsx as jsx74 } from "react/jsx-runtime";
15106
- var FocusTrap = forwardRef12(function FocusTrap2({
15210
+ import { useRef as useRef23 } from "react";
15211
+ import { useImperativeHandle as useImperativeHandle6 } from "react";
15212
+ import { forwardRef as forwardRef15 } from "react";
15213
+ import { jsx as jsx78 } from "react/jsx-runtime";
15214
+ var FocusTrap = forwardRef15(function FocusTrap2({
15107
15215
  active = true,
15108
15216
  initialFocus,
15109
15217
  focusFirst = false,
15110
15218
  ...props
15111
15219
  }, forwardedRef) {
15112
- const innerRef = useRef21(null);
15113
- useImperativeHandle5(forwardedRef, () => innerRef.current);
15220
+ const innerRef = useRef23(null);
15221
+ useImperativeHandle6(forwardedRef, () => innerRef.current);
15114
15222
  useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
15115
- return /* @__PURE__ */ jsx74("div", { ref: innerRef, ...props });
15223
+ return /* @__PURE__ */ jsx78("div", { ref: innerRef, ...props });
15116
15224
  });
15117
15225
 
15118
15226
  // src/components/utils/Transition.tsx
15119
- import { useEffect as useEffect32, useState as useState36 } from "react";
15227
+ import { useEffect as useEffect35, useState as useState36 } from "react";
15120
15228
  function Transition({
15121
15229
  children,
15122
15230
  show,
@@ -15125,7 +15233,7 @@ function Transition({
15125
15233
  const [isOpen, setIsOpen] = useState36(show);
15126
15234
  const [isTransitioning, setIsTransitioning] = useState36(!isOpen);
15127
15235
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
15128
- useEffect32(() => {
15236
+ useEffect35(() => {
15129
15237
  setIsOpen(show);
15130
15238
  setIsTransitioning(true);
15131
15239
  }, [show]);
@@ -15150,18 +15258,18 @@ function Transition({
15150
15258
  }
15151
15259
 
15152
15260
  // src/contexts/HightideProvider.tsx
15153
- import { jsx as jsx75 } from "react/jsx-runtime";
15261
+ import { jsx as jsx79 } from "react/jsx-runtime";
15154
15262
  var HightideProvider = ({
15155
15263
  children,
15156
15264
  theme,
15157
15265
  locale,
15158
15266
  config
15159
15267
  }) => {
15160
- return /* @__PURE__ */ jsx75(LocaleProvider, { ...locale, children: /* @__PURE__ */ jsx75(ThemeProvider, { ...theme, children: /* @__PURE__ */ jsx75(HightideConfigProvider, { ...config, children }) }) });
15268
+ return /* @__PURE__ */ jsx79(LocaleProvider, { ...locale, children: /* @__PURE__ */ jsx79(ThemeProvider, { ...theme, children: /* @__PURE__ */ jsx79(HightideConfigProvider, { ...config, children }) }) });
15161
15269
  };
15162
15270
 
15163
15271
  // src/hooks/focus/useFocusGuards.ts
15164
- import { useEffect as useEffect33 } from "react";
15272
+ import { useEffect as useEffect36 } from "react";
15165
15273
  var selectorName = "data-hw-focus-guard";
15166
15274
  function FocusGuard() {
15167
15275
  const element = document.createElement("div");
@@ -15199,7 +15307,7 @@ var FocusGuardsService = class _FocusGuardsService {
15199
15307
  }
15200
15308
  };
15201
15309
  var useFocusGuards = () => {
15202
- useEffect33(() => {
15310
+ useEffect36(() => {
15203
15311
  FocusGuardsService.getInstance().add();
15204
15312
  return () => {
15205
15313
  FocusGuardsService.getInstance().remove();
@@ -15208,10 +15316,10 @@ var useFocusGuards = () => {
15208
15316
  };
15209
15317
 
15210
15318
  // src/hooks/focus/useFocusOnceVisible.ts
15211
- import React6, { useEffect as useEffect34 } from "react";
15319
+ import React5, { useEffect as useEffect37 } from "react";
15212
15320
  var useFocusOnceVisible = (ref, disable = false) => {
15213
- const [hasUsedFocus, setHasUsedFocus] = React6.useState(false);
15214
- useEffect34(() => {
15321
+ const [hasUsedFocus, setHasUsedFocus] = React5.useState(false);
15322
+ useEffect37(() => {
15215
15323
  if (disable || hasUsedFocus) {
15216
15324
  return;
15217
15325
  }
@@ -15237,7 +15345,7 @@ var useRerender = () => {
15237
15345
  };
15238
15346
 
15239
15347
  // src/hooks/useSearch.ts
15240
- import { useCallback as useCallback23, useEffect as useEffect35, useMemo as useMemo19, useState as useState37 } from "react";
15348
+ import { useCallback as useCallback23, useEffect as useEffect38, useMemo as useMemo19, useState as useState37 } from "react";
15241
15349
 
15242
15350
  // src/utils/simpleSearch.ts
15243
15351
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -15286,7 +15394,7 @@ var useSearch = ({
15286
15394
  }
15287
15395
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
15288
15396
  }, [searchTags, list, search, searchMapping]);
15289
- useEffect35(() => {
15397
+ useEffect38(() => {
15290
15398
  if (isSearchInstant) {
15291
15399
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
15292
15400
  }
@@ -15712,9 +15820,14 @@ export {
15712
15820
  MenuItem,
15713
15821
  MultiSearchWithMapping,
15714
15822
  MultiSelect,
15823
+ MultiSelectButton,
15715
15824
  MultiSelectChipDisplay,
15825
+ MultiSelectChipDisplayButton,
15716
15826
  MultiSelectChipDisplayUncontrolled,
15827
+ MultiSelectContent,
15828
+ MultiSelectOption,
15717
15829
  MultiSelectProperty,
15830
+ MultiSelectRoot,
15718
15831
  MultiSelectUncontrolled,
15719
15832
  MultiSubjectSearchWithMapping,
15720
15833
  Navigation,
@@ -15732,8 +15845,8 @@ export {
15732
15845
  SearchBar,
15733
15846
  Select,
15734
15847
  SelectButton,
15735
- SelectChipDisplay,
15736
15848
  SelectContent,
15849
+ SelectContext,
15737
15850
  SelectOption,
15738
15851
  SelectRoot,
15739
15852
  SelectUncontrolled,
@@ -15822,6 +15935,7 @@ export {
15822
15935
  useRerender,
15823
15936
  useResizeCallbackWrapper,
15824
15937
  useSearch,
15938
+ useSelectContext,
15825
15939
  useTabContext,
15826
15940
  useTheme,
15827
15941
  useTransitionState,