@helpwave/hightide 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -6489,10 +6489,6 @@ var formatDateTime = (date) => {
6489
6489
  const minutes = date.getMinutes().toString().padStart(2, "0");
6490
6490
  return `${dateString}T${hours}:${minutes}`;
6491
6491
  };
6492
- var getDaysInMonth = (year, month) => {
6493
- const lastDayOfMonth = new Date(year, month + 1, 0);
6494
- return lastDayOfMonth.getDate();
6495
- };
6496
6492
  var changeDuration = (date, duration, isAdding) => {
6497
6493
  const {
6498
6494
  years = 0,
@@ -6602,6 +6598,51 @@ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
6602
6598
  }
6603
6599
  return equalSizeGroups(dayList, 7);
6604
6600
  };
6601
+ var formatGerman = (date, showTime) => {
6602
+ const d = new Intl.DateTimeFormat("de-DE", {
6603
+ day: "2-digit",
6604
+ month: "2-digit",
6605
+ year: "numeric"
6606
+ }).format(date);
6607
+ if (!showTime) return d;
6608
+ const t = new Intl.DateTimeFormat("de-DE", {
6609
+ hour: "2-digit",
6610
+ minute: "2-digit"
6611
+ }).format(date);
6612
+ return `${d} um ${t} Uhr`;
6613
+ };
6614
+ var formatAbsolute = (date, locale, showTime) => {
6615
+ if (locale === "de-DE") {
6616
+ return formatGerman(date, showTime);
6617
+ }
6618
+ const options = {
6619
+ year: "numeric",
6620
+ month: "numeric",
6621
+ day: "numeric"
6622
+ };
6623
+ if (showTime) {
6624
+ options.hour = "numeric";
6625
+ options.minute = "numeric";
6626
+ }
6627
+ return new Intl.DateTimeFormat(locale, options).format(date);
6628
+ };
6629
+ var formatRelative = (date, locale, showTime) => {
6630
+ const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
6631
+ const now = /* @__PURE__ */ new Date();
6632
+ const diffInSeconds = (date.getTime() - now.getTime()) / 1e3;
6633
+ if (Math.abs(diffInSeconds) < 60) return rtf.format(Math.round(diffInSeconds), "second");
6634
+ if (Math.abs(diffInSeconds) < 3600) return rtf.format(Math.round(diffInSeconds / 60), "minute");
6635
+ if (Math.abs(diffInSeconds) < 86400) return rtf.format(Math.round(diffInSeconds / 3600), "hour");
6636
+ if (Math.abs(diffInSeconds) < 604800) return rtf.format(Math.round(diffInSeconds / 86400), "day");
6637
+ return formatAbsolute(date, locale, showTime);
6638
+ };
6639
+ var DateUtils = {
6640
+ monthsList,
6641
+ weekDayList,
6642
+ equalDate,
6643
+ formatAbsolute,
6644
+ formatRelative
6645
+ };
6605
6646
 
6606
6647
  // src/components/date/DatePicker.tsx
6607
6648
  import clsx7 from "clsx";
@@ -6784,6 +6825,16 @@ var hightideTranslation = {
6784
6825
  "remove": `Entfernen`,
6785
6826
  "required": `Erforderlich`,
6786
6827
  "reset": `Zur\xFCcksetzen`,
6828
+ "rSortingOrderAfter": ({ otherSortings }) => {
6829
+ let _out = "";
6830
+ _out += `Angewendet `;
6831
+ _out += TranslationGen.resolvePlural(otherSortings, {
6832
+ "=0": `als prim\xE4re Sortierung`,
6833
+ "=1": `nach ${otherSortings} anderen Sortierung`,
6834
+ "other": `nach ${otherSortings} anderen Sortierungen`
6835
+ });
6836
+ return _out;
6837
+ },
6787
6838
  "save": `Speichern`,
6788
6839
  "saved": `Gespeichert`,
6789
6840
  "search": `Suche`,
@@ -7020,6 +7071,16 @@ var hightideTranslation = {
7020
7071
  "remove": `Remove`,
7021
7072
  "required": `Required`,
7022
7073
  "reset": `Reset`,
7074
+ "rSortingOrderAfter": ({ otherSortings }) => {
7075
+ let _out = "";
7076
+ _out += `Applied `;
7077
+ _out += TranslationGen.resolvePlural(otherSortings, {
7078
+ "=0": `as the first sorting`,
7079
+ "=1": `after ${otherSortings} other sorting`,
7080
+ "other": `after ${otherSortings} other sortings`
7081
+ });
7082
+ return _out;
7083
+ },
7023
7084
  "save": `Save`,
7024
7085
  "saved": `Saved`,
7025
7086
  "search": `Search`,
@@ -7306,7 +7367,7 @@ var ButtonUtil = {
7306
7367
  warning: "warning",
7307
7368
  negative: "negative",
7308
7369
  neutral: "neutral",
7309
- none: ""
7370
+ none: "reset-coloring-variables"
7310
7371
  }
7311
7372
  };
7312
7373
  var Button = forwardRef(function SolidButton({
@@ -7318,6 +7379,7 @@ var Button = forwardRef(function SolidButton({
7318
7379
  startIcon,
7319
7380
  endIcon,
7320
7381
  disabled,
7382
+ allowClickEventPropagation = false,
7321
7383
  className,
7322
7384
  ...restProps
7323
7385
  }, ref) {
@@ -7340,6 +7402,12 @@ var Button = forwardRef(function SolidButton({
7340
7402
  paddingMapping[layout][size],
7341
7403
  className
7342
7404
  ),
7405
+ onClick: (event) => {
7406
+ if (!allowClickEventPropagation) {
7407
+ event.stopPropagation();
7408
+ }
7409
+ restProps?.onClick(event);
7410
+ },
7343
7411
  disabled,
7344
7412
  children: [
7345
7413
  startIcon,
@@ -7368,8 +7436,8 @@ var DayPicker = ({
7368
7436
  return /* @__PURE__ */ jsxs4("div", { className: clsx4("flex-col-1 min-w-[220px] select-none", className), children: [
7369
7437
  /* @__PURE__ */ jsx4("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ jsx4("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
7370
7438
  weeks.map((week, index) => /* @__PURE__ */ jsx4("div", { className: "flex-row-2 text-center", children: week.map((date) => {
7371
- const isSelected = !!selected && equalDate(selected, date);
7372
- const isToday = equalDate(/* @__PURE__ */ new Date(), date);
7439
+ const isSelected = !!selected && DateUtils.equalDate(selected, date);
7440
+ const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
7373
7441
  const isSameMonth = date.getMonth() === month;
7374
7442
  const isDayValid = isInTimeSpan(date, start, end);
7375
7443
  return /* @__PURE__ */ jsx4(
@@ -7569,8 +7637,9 @@ var YearMonthPicker = ({
7569
7637
  label: /* @__PURE__ */ jsx6("span", { className: clsx6({ "text-primary font-bold": selectedYear }), children: year }),
7570
7638
  isExpanded: showValueOpen && selectedYear,
7571
7639
  contentClassName: "gap-y-1",
7572
- children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx6("div", { className: "flex-row-1", children: monthList.map((month) => {
7573
- const monthIndex = monthsList.indexOf(month);
7640
+ contentExpandedClassName: "!p-2",
7641
+ children: equalSizeGroups([...DateUtils.monthsList], 3).map((monthList, index) => /* @__PURE__ */ jsx6("div", { className: "flex-row-1", children: monthList.map((month) => {
7642
+ const monthIndex = DateUtils.monthsList.indexOf(month);
7574
7643
  const newDate = new Date(year, monthIndex);
7575
7644
  const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
7576
7645
  const firstOfMonth = new Date(year, monthIndex, 1);
@@ -7869,7 +7938,7 @@ var TimePicker = ({
7869
7938
  transformer(newDate);
7870
7939
  onChange?.(newDate);
7871
7940
  };
7872
- return /* @__PURE__ */ jsxs7("div", { className: clsx8("flex-row-2 w-fit min-w-[150px] select-none overflow-hidden", className), children: [
7941
+ return /* @__PURE__ */ jsxs7("div", { className: clsx8("flex-row-2 select-none overflow-hidden", className), children: [
7873
7942
  /* @__PURE__ */ jsx9("div", { className: "flex-col-1 h-full overflow-y-auto min-w-16", children: hours.map((hour) => {
7874
7943
  const isSelected = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
7875
7944
  return /* @__PURE__ */ jsx9(
@@ -8448,7 +8517,6 @@ var DiscardChangesDialog = ({
8448
8517
 
8449
8518
  // src/components/user-action/input/Input.tsx
8450
8519
  import { forwardRef as forwardRef3, useImperativeHandle, useRef as useRef5 } from "react";
8451
- import clsx11 from "clsx";
8452
8520
 
8453
8521
  // src/hooks/useDelay.ts
8454
8522
  import { useEffect as useEffect12, useState as useState11 } from "react";
@@ -8563,8 +8631,6 @@ var Input = forwardRef3(function Input2({
8563
8631
  editCompleteOptions,
8564
8632
  disabled = false,
8565
8633
  invalid = false,
8566
- defaultStyle = true,
8567
- className,
8568
8634
  ...props
8569
8635
  }, forwardedRef) {
8570
8636
  const {
@@ -8587,15 +8653,6 @@ var Input = forwardRef3(function Input2({
8587
8653
  ref: innerRef,
8588
8654
  value,
8589
8655
  disabled,
8590
- className: defaultStyle ? clsx11(
8591
- "px-3 py-2 rounded-md text-sm h-10 border-2 border-transparent focus-style-none",
8592
- {
8593
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
8594
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": !disabled && invalid,
8595
- "bg-disabled-background text-disabled border-disabled-border": disabled
8596
- },
8597
- className
8598
- ) : className,
8599
8656
  onKeyDown: (event) => {
8600
8657
  props.onKeyDown?.(event);
8601
8658
  if (!allowEnterComplete) {
@@ -8624,6 +8681,10 @@ var Input = forwardRef3(function Input2({
8624
8681
  });
8625
8682
  onChangeText?.(value2);
8626
8683
  },
8684
+ "data-name": props["data-name"] ?? "input",
8685
+ "data-value": value ? "" : void 0,
8686
+ "data-disabled": disabled ? "" : void 0,
8687
+ "data-invalid": invalid ? "" : void 0,
8627
8688
  "aria-invalid": props["aria-invalid"] ?? invalid,
8628
8689
  "aria-disabled": props["aria-disabled"] ?? disabled
8629
8690
  }
@@ -8675,7 +8736,7 @@ import {
8675
8736
  useRef as useRef6,
8676
8737
  useState as useState13
8677
8738
  } from "react";
8678
- import clsx13 from "clsx";
8739
+ import clsx12 from "clsx";
8679
8740
 
8680
8741
  // src/utils/match.ts
8681
8742
  var match = (key, values) => {
@@ -8686,7 +8747,7 @@ var match = (key, values) => {
8686
8747
  import { CheckIcon, Plus, XIcon } from "lucide-react";
8687
8748
 
8688
8749
  // src/components/layout/Chip.tsx
8689
- import clsx12 from "clsx";
8750
+ import clsx11 from "clsx";
8690
8751
  import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
8691
8752
  var chipColors = ButtonUtil.colors;
8692
8753
  var ChipUtil = {
@@ -8706,7 +8767,7 @@ var Chip = ({
8706
8767
  "div",
8707
8768
  {
8708
8769
  ...restProps,
8709
- className: clsx12(
8770
+ className: clsx11(
8710
8771
  `flex-row-0 w-fit font-semibold coloring-solid`,
8711
8772
  colorMapping,
8712
8773
  {
@@ -8731,7 +8792,7 @@ var ChipList = ({
8731
8792
  list,
8732
8793
  className = ""
8733
8794
  }) => {
8734
- return /* @__PURE__ */ jsx15("div", { className: clsx12("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ jsx15(
8795
+ return /* @__PURE__ */ jsx15("div", { className: clsx11("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ jsx15(
8735
8796
  Chip,
8736
8797
  {
8737
8798
  ...value,
@@ -9091,7 +9152,7 @@ var SelectOption = forwardRef4(
9091
9152
  "data-highlighted": isHighlighted ? "" : void 0,
9092
9153
  "data-selected": isSelected ? "" : void 0,
9093
9154
  "data-disabled": disabled ? "" : void 0,
9094
- className: clsx13(
9155
+ className: clsx12(
9095
9156
  "flex-row-1 items-center px-2 py-1 rounded-md",
9096
9157
  "data-highlighted:bg-primary/20",
9097
9158
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -9117,7 +9178,7 @@ var SelectOption = forwardRef4(
9117
9178
  iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx16(
9118
9179
  CheckIcon,
9119
9180
  {
9120
- className: clsx13("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9181
+ className: clsx12("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9121
9182
  "aria-hidden": true
9122
9183
  }
9123
9184
  ),
@@ -9125,7 +9186,7 @@ var SelectOption = forwardRef4(
9125
9186
  iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ jsx16(
9126
9187
  CheckIcon,
9127
9188
  {
9128
- className: clsx13("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9189
+ className: clsx12("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9129
9190
  "aria-hidden": true
9130
9191
  }
9131
9192
  )
@@ -9173,19 +9234,8 @@ var SelectButton = forwardRef4(function SelectButton2({ placeholder, selectedDis
9173
9234
  break;
9174
9235
  }
9175
9236
  },
9176
- className: clsx13(
9177
- "flex-row-2 items-center justify-between rounded-md px-3 py-2",
9178
- {
9179
- "bg-input-background text-placeholder": !hasValue && !disabled && !invalid,
9180
- "bg-input-background text-input-text": hasValue && !disabled && !invalid,
9181
- "bg-negative/20": !disabled && invalid,
9182
- "text-placeholder": !hasValue && !disabled,
9183
- "text-negative": hasValue && !disabled && invalid,
9184
- "bg-disabled-background text-disabled": disabled
9185
- },
9186
- props.className
9187
- ),
9188
- "data-placeholder": !hasValue ? "" : void 0,
9237
+ "data-name": props["data-name"] ?? "select-button",
9238
+ "data-value": hasValue ? "" : void 0,
9189
9239
  "data-disabled": disabled ? "" : void 0,
9190
9240
  "data-invalid": invalid ? "" : void 0,
9191
9241
  "aria-invalid": invalid,
@@ -9194,21 +9244,11 @@ var SelectButton = forwardRef4(function SelectButton2({ placeholder, selectedDis
9194
9244
  "aria-expanded": state.isOpen,
9195
9245
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9196
9246
  children: [
9197
- hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ jsx16("div", { className: clsx13("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ jsxs11("span", { className: "flex-row-0", children: [
9247
+ hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ jsx16("div", { className: clsx12("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ jsxs11("span", { className: "flex-row-0", children: [
9198
9248
  label,
9199
9249
  index < state.value.length - 1 && /* @__PURE__ */ jsx16("span", { children: "," })
9200
9250
  ] }, value)) }) : placeholder ?? translation("clickToSelect"),
9201
- /* @__PURE__ */ jsx16(
9202
- ExpansionIcon,
9203
- {
9204
- isExpanded: state.isOpen,
9205
- className: clsx13({
9206
- "text-input-text": !disabled && !invalid,
9207
- "text-negative": !disabled && invalid,
9208
- "text-disabled": disabled
9209
- })
9210
- }
9211
- )
9251
+ /* @__PURE__ */ jsx16(ExpansionIcon, { isExpanded: state.isOpen })
9212
9252
  ]
9213
9253
  }
9214
9254
  );
@@ -9229,10 +9269,12 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
9229
9269
  {
9230
9270
  ...props,
9231
9271
  ref: innerRef,
9232
- className: clsx13(
9233
- "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
9234
- props.className
9235
- ),
9272
+ onClick: (event) => {
9273
+ toggleOpen();
9274
+ props.onClick?.(event);
9275
+ },
9276
+ "data-name": props["data-name"] ?? "select-button-chips",
9277
+ "data-value": state.value.length > 0 ? "" : void 0,
9236
9278
  "data-disabled": disabled ? "" : void 0,
9237
9279
  "data-invalid": invalid ? "" : void 0,
9238
9280
  "aria-invalid": invalid,
@@ -9246,11 +9288,11 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
9246
9288
  onClick: () => {
9247
9289
  item.toggleSelection(value, false);
9248
9290
  },
9249
- size: "none",
9291
+ size: "tiny",
9250
9292
  color: "negative",
9251
9293
  coloringStyle: "text",
9252
- className: "flex-row-0 items-center px-0.5 py-0.5 w-6 h-6 rounded",
9253
- children: /* @__PURE__ */ jsx16(XIcon, { className: "w-5 h-5" })
9294
+ className: "flex-row-0 items-center",
9295
+ children: /* @__PURE__ */ jsx16(XIcon, { className: "size-5" })
9254
9296
  }
9255
9297
  )
9256
9298
  ] }, value)),
@@ -9258,7 +9300,10 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
9258
9300
  Button,
9259
9301
  {
9260
9302
  id: state.id,
9261
- onClick: () => toggleOpen(),
9303
+ onClick: (event) => {
9304
+ event.stopPropagation();
9305
+ toggleOpen();
9306
+ },
9262
9307
  onKeyDown: (event) => {
9263
9308
  switch (event.key) {
9264
9309
  case "ArrowDown":
@@ -9276,6 +9321,7 @@ var SelectChipDisplay = forwardRef4(function SelectChipDisplay2({ ...props }, re
9276
9321
  "aria-haspopup": "listbox",
9277
9322
  "aria-expanded": state.isOpen,
9278
9323
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9324
+ className: "size-9",
9279
9325
  children: /* @__PURE__ */ jsx16(Plus, {})
9280
9326
  }
9281
9327
  )
@@ -9309,7 +9355,7 @@ var SelectContent = forwardRef4(
9309
9355
  "div",
9310
9356
  {
9311
9357
  id: `select-container-${state.id}`,
9312
- className: clsx13("fixed inset-0 w-screen h-screen", containerClassName),
9358
+ className: clsx12("fixed inset-0 w-screen h-screen", containerClassName),
9313
9359
  style: { zIndex },
9314
9360
  hidden: !state.isOpen,
9315
9361
  children: [
@@ -9318,7 +9364,7 @@ var SelectContent = forwardRef4(
9318
9364
  {
9319
9365
  id: `select-background-${state.id}`,
9320
9366
  onClick: () => trigger.toggleOpen(false),
9321
- className: clsx13("fixed inset-0 w-screen h-screen")
9367
+ className: clsx12("fixed inset-0 w-screen h-screen")
9322
9368
  }
9323
9369
  ),
9324
9370
  /* @__PURE__ */ jsx16(
@@ -9367,7 +9413,7 @@ var SelectContent = forwardRef4(
9367
9413
  break;
9368
9414
  }
9369
9415
  },
9370
- className: clsx13("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
9416
+ className: clsx12("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-outline-within overflow-auto", props.className),
9371
9417
  style: {
9372
9418
  opacity: position ? void 0 : 0,
9373
9419
  position: "fixed",
@@ -9517,7 +9563,7 @@ var LanguageDialog = ({
9517
9563
 
9518
9564
  // src/components/dialog/ThemeDialog.tsx
9519
9565
  import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
9520
- import clsx14 from "clsx";
9566
+ import clsx13 from "clsx";
9521
9567
 
9522
9568
  // src/theming/useTheme.tsx
9523
9569
  import { createContext as createContext3, useCallback as useCallback7, useContext as useContext3, useEffect as useEffect15, useMemo as useMemo4, useState as useState14 } from "react";
@@ -9607,11 +9653,11 @@ var useTheme = () => {
9607
9653
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
9608
9654
  var ThemeIcon = ({ theme, className }) => {
9609
9655
  if (theme === "dark") {
9610
- return /* @__PURE__ */ jsx19(MoonIcon, { className: clsx14("w-4 h-4", className) });
9656
+ return /* @__PURE__ */ jsx19(MoonIcon, { className: clsx13("w-4 h-4", className) });
9611
9657
  } else if (theme === "light") {
9612
- return /* @__PURE__ */ jsx19(SunIcon, { className: clsx14("w-4 h-4", className) });
9658
+ return /* @__PURE__ */ jsx19(SunIcon, { className: clsx13("w-4 h-4", className) });
9613
9659
  } else {
9614
- return /* @__PURE__ */ jsx19(MonitorCog, { className: clsx14("w-4 h-4", className) });
9660
+ return /* @__PURE__ */ jsx19(MonitorCog, { className: clsx13("w-4 h-4", className) });
9615
9661
  }
9616
9662
  };
9617
9663
  var ThemeDialog = ({
@@ -9657,10 +9703,10 @@ var ThemeDialog = ({
9657
9703
 
9658
9704
  // src/components/form/FormElementWrapper.tsx
9659
9705
  import { useId as useId5 } from "react";
9660
- import { clsx as clsx16 } from "clsx";
9706
+ import { clsx as clsx15 } from "clsx";
9661
9707
 
9662
9708
  // src/components/user-action/Label.tsx
9663
- import clsx15 from "clsx";
9709
+ import clsx14 from "clsx";
9664
9710
  import { jsx as jsx20 } from "react/jsx-runtime";
9665
9711
  var styleMapping = {
9666
9712
  md: "typography-label-md color-label-text",
@@ -9672,7 +9718,7 @@ var Label = ({
9672
9718
  className,
9673
9719
  ...props
9674
9720
  }) => {
9675
- return /* @__PURE__ */ jsx20("label", { ...props, className: clsx15(styleMapping[size], className), children });
9721
+ return /* @__PURE__ */ jsx20("label", { ...props, className: clsx14(styleMapping[size], className), children });
9676
9722
  };
9677
9723
 
9678
9724
  // src/components/form/FormElementWrapper.tsx
@@ -9723,7 +9769,7 @@ var FormElementWrapper = ({
9723
9769
  "aria-invalid": !!error,
9724
9770
  "aria-errormessage": error ? errorId : void 0
9725
9771
  };
9726
- return /* @__PURE__ */ jsxs14("div", { className: clsx16("relative flex flex-col gap-y-1", containerClassName), children: [
9772
+ return /* @__PURE__ */ jsxs14("div", { className: clsx15("relative flex flex-col gap-y-1", containerClassName), children: [
9727
9773
  label && /* @__PURE__ */ jsxs14(
9728
9774
  Label,
9729
9775
  {
@@ -9731,7 +9777,7 @@ var FormElementWrapper = ({
9731
9777
  id: labelId,
9732
9778
  htmlFor: usedId,
9733
9779
  size: "lg",
9734
- className: clsx16("flex-row-1 items-start", labelProps?.className),
9780
+ className: clsx15("flex-row-1 items-start", labelProps?.className),
9735
9781
  children: [
9736
9782
  label,
9737
9783
  required && /* @__PURE__ */ jsx21("div", { role: "none", className: "bg-primary w-2 h-2 rounded-full" })
@@ -9743,7 +9789,7 @@ var FormElementWrapper = ({
9743
9789
  {
9744
9790
  ...descriptionProps,
9745
9791
  id: descriptionId,
9746
- className: clsx16("text-description text-sm", descriptionProps?.className),
9792
+ className: clsx15("text-description text-sm", descriptionProps?.className),
9747
9793
  children: description
9748
9794
  }
9749
9795
  ),
@@ -9753,7 +9799,7 @@ var FormElementWrapper = ({
9753
9799
  {
9754
9800
  ...errorProps,
9755
9801
  id: errorId,
9756
- className: clsx16("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
9802
+ className: clsx15("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
9757
9803
  role: "alert",
9758
9804
  "aria-hidden": !error,
9759
9805
  "aria-live": "polite",
@@ -9764,7 +9810,7 @@ var FormElementWrapper = ({
9764
9810
  };
9765
9811
 
9766
9812
  // src/components/icons-and-geometry/Avatar.tsx
9767
- import clsx17 from "clsx";
9813
+ import clsx16 from "clsx";
9768
9814
  import { useMemo as useMemo5, useState as useState15 } from "react";
9769
9815
  import { UserIcon } from "lucide-react";
9770
9816
  import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
@@ -9814,7 +9860,7 @@ var Avatar = ({
9814
9860
  return /* @__PURE__ */ jsxs15(
9815
9861
  "div",
9816
9862
  {
9817
- className: clsx17(
9863
+ className: clsx16(
9818
9864
  `relative flex-row-0 items-center justify-center bg-primary text-on-primary`,
9819
9865
  rounding,
9820
9866
  className
@@ -9826,7 +9872,7 @@ var Avatar = ({
9826
9872
  {
9827
9873
  src: image?.avatarUrl,
9828
9874
  alt: image?.alt,
9829
- className: clsx17(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
9875
+ className: clsx16(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
9830
9876
  onLoad: () => setIsLoaded(true),
9831
9877
  onError: () => setHasError(true)
9832
9878
  }
@@ -9860,7 +9906,7 @@ var AvatarGroup = ({
9860
9906
  ...avatar,
9861
9907
  size,
9862
9908
  fullyRounded,
9863
- className: clsx17("shadow-side shadow-r-4 shadow-hard", avatar.className)
9909
+ className: clsx16("shadow-side shadow-r-4 shadow-hard", avatar.className)
9864
9910
  }
9865
9911
  )
9866
9912
  },
@@ -9869,7 +9915,7 @@ var AvatarGroup = ({
9869
9915
  showTotalNumber && notDisplayedProfiles > 0 && /* @__PURE__ */ jsx22(
9870
9916
  "div",
9871
9917
  {
9872
- className: clsx17(textClassNameMapping[size], "flex-row-2 truncate items-center"),
9918
+ className: clsx16(textClassNameMapping[size], "flex-row-2 truncate items-center"),
9873
9919
  children: /* @__PURE__ */ jsxs15("span", { children: [
9874
9920
  "+ ",
9875
9921
  notDisplayedProfiles
@@ -9880,7 +9926,7 @@ var AvatarGroup = ({
9880
9926
  };
9881
9927
 
9882
9928
  // src/components/icons-and-geometry/Circle.tsx
9883
- import clsx18 from "clsx";
9929
+ import clsx17 from "clsx";
9884
9930
  import { jsx as jsx23 } from "react/jsx-runtime";
9885
9931
  var Circle = ({
9886
9932
  radius = 20,
@@ -9892,7 +9938,7 @@ var Circle = ({
9892
9938
  return /* @__PURE__ */ jsx23(
9893
9939
  "div",
9894
9940
  {
9895
- className: clsx18(`rounded-full`, className),
9941
+ className: clsx17(`rounded-full`, className),
9896
9942
  style: {
9897
9943
  width: `${size}px`,
9898
9944
  height: `${size}px`,
@@ -9905,7 +9951,7 @@ var Circle = ({
9905
9951
 
9906
9952
  // src/components/icons-and-geometry/Ring.tsx
9907
9953
  import { useCallback as useCallback8, useEffect as useEffect16, useState as useState16 } from "react";
9908
- import clsx19 from "clsx";
9954
+ import clsx18 from "clsx";
9909
9955
  import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
9910
9956
  var Ring = ({
9911
9957
  innerSize = 20,
@@ -9915,7 +9961,7 @@ var Ring = ({
9915
9961
  return /* @__PURE__ */ jsx24(
9916
9962
  "div",
9917
9963
  {
9918
- className: clsx19(`bg-transparent rounded-full outline`, className),
9964
+ className: clsx18(`bg-transparent rounded-full outline`, className),
9919
9965
  style: {
9920
9966
  width: `${innerSize}px`,
9921
9967
  height: `${innerSize}px`,
@@ -10054,7 +10100,7 @@ var RadialRings = ({
10054
10100
  Circle,
10055
10101
  {
10056
10102
  radius: sizeCircle1 / 2,
10057
- className: clsx19(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10103
+ className: clsx18(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10058
10104
  style: {
10059
10105
  left: `${size / 2}px`,
10060
10106
  top: `${size / 2}px`
@@ -10068,7 +10114,7 @@ var RadialRings = ({
10068
10114
  width: (sizeCircle2 - sizeCircle1) / 2,
10069
10115
  onAnimationFinished: () => currentRing === 0 ? setCurrentRing(1) : null,
10070
10116
  repeating: true,
10071
- className: clsx19(
10117
+ className: clsx18(
10072
10118
  circle2ClassName,
10073
10119
  { "opacity-5": currentRing !== 0 }
10074
10120
  ),
@@ -10088,7 +10134,7 @@ var RadialRings = ({
10088
10134
  endInnerSize: sizeCircle2,
10089
10135
  width: waveWidth,
10090
10136
  repeating: true,
10091
- className: clsx19(waveBaseColor, `opacity-5`),
10137
+ className: clsx18(waveBaseColor, `opacity-5`),
10092
10138
  style: {
10093
10139
  left: `${size / 2}px`,
10094
10140
  top: `${size / 2}px`,
@@ -10102,7 +10148,7 @@ var RadialRings = ({
10102
10148
  Circle,
10103
10149
  {
10104
10150
  radius: sizeCircle2 / 2,
10105
- className: clsx19(
10151
+ className: clsx18(
10106
10152
  circle2ClassName,
10107
10153
  { "opacity-20": currentRing < 1 },
10108
10154
  `absolute z-[8] -translate-y-1/2 -translate-x-1/2`
@@ -10120,7 +10166,7 @@ var RadialRings = ({
10120
10166
  width: (sizeCircle3 - sizeCircle2) / 2,
10121
10167
  onAnimationFinished: () => currentRing === 1 ? setCurrentRing(2) : null,
10122
10168
  repeating: true,
10123
- className: clsx19(circle3ClassName),
10169
+ className: clsx18(circle3ClassName),
10124
10170
  style: {
10125
10171
  left: `${size / 2}px`,
10126
10172
  top: `${size / 2}px`,
@@ -10137,7 +10183,7 @@ var RadialRings = ({
10137
10183
  endInnerSize: sizeCircle3 - waveWidth,
10138
10184
  width: waveWidth,
10139
10185
  repeating: true,
10140
- className: clsx19(waveBaseColor, `opacity-5`),
10186
+ className: clsx18(waveBaseColor, `opacity-5`),
10141
10187
  style: {
10142
10188
  left: `${size / 2}px`,
10143
10189
  top: `${size / 2}px`,
@@ -10151,7 +10197,7 @@ var RadialRings = ({
10151
10197
  Circle,
10152
10198
  {
10153
10199
  radius: sizeCircle3 / 2,
10154
- className: clsx19(
10200
+ className: clsx18(
10155
10201
  circle3ClassName,
10156
10202
  { "opacity-20": currentRing < 2 },
10157
10203
  `absolute z-[6] -translate-y-1/2 -translate-x-1/2`
@@ -10199,7 +10245,7 @@ import {
10199
10245
  useRef as useRef7,
10200
10246
  useState as useState17
10201
10247
  } from "react";
10202
- import clsx20 from "clsx";
10248
+ import clsx19 from "clsx";
10203
10249
  import { ChevronLeft, ChevronRight } from "lucide-react";
10204
10250
  import { Fragment, jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
10205
10251
  var CarouselContext = createContext4(null);
@@ -10242,10 +10288,12 @@ function CarouselTabs({
10242
10288
  "button",
10243
10289
  {
10244
10290
  id: `${id}-tab-${index}`,
10245
- ref: (el) => tabRefs.current[index] = el,
10291
+ ref: (el) => {
10292
+ tabRefs.current[index] = el;
10293
+ },
10246
10294
  onClick: () => onChange(index),
10247
10295
  onKeyDown: (e) => handleKeyDown(e, index),
10248
- className: clsx20(
10296
+ className: clsx19(
10249
10297
  "w-8 min-w-8 h-3 min-h-3 first:rounded-l-md last:rounded-r-md",
10250
10298
  {
10251
10299
  "bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
@@ -10279,7 +10327,7 @@ var CarouselSlide = forwardRef5(
10279
10327
  ...props,
10280
10328
  ref,
10281
10329
  id: `${id}-slide-${index}`,
10282
- className: clsx20("focus-style-none group/slide", props.className),
10330
+ className: clsx19("focus-style-none group/slide", props.className),
10283
10331
  tabIndex: isSelected ? 0 : void 0,
10284
10332
  role: "group",
10285
10333
  "aria-roledescription": translation("slide"),
@@ -10428,7 +10476,7 @@ var Carousel = ({
10428
10476
  {
10429
10477
  ref: carouselContainerRef,
10430
10478
  ...props,
10431
- className: clsx20("flex-col-2 items-center w-full", props.className),
10479
+ className: clsx19("flex-col-2 items-center w-full", props.className),
10432
10480
  id,
10433
10481
  role: "region",
10434
10482
  "aria-roledescription": translation("slide"),
@@ -10437,7 +10485,7 @@ var Carousel = ({
10437
10485
  "div",
10438
10486
  {
10439
10487
  ...slideContainerProps,
10440
- className: clsx20(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10488
+ className: clsx19(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10441
10489
  children: [
10442
10490
  hintNext ? /* @__PURE__ */ jsxs17(
10443
10491
  "div",
@@ -10446,7 +10494,7 @@ var Carousel = ({
10446
10494
  onPointerMove: handlePointerMove,
10447
10495
  onPointerUp: handlePointerUp,
10448
10496
  onPointerLeave: handlePointerUp,
10449
- className: clsx20(`flex-row-2 relative h-full`, heightClassName),
10497
+ className: clsx19(`flex-row-2 relative h-full`, heightClassName),
10450
10498
  children: [
10451
10499
  /* @__PURE__ */ jsx26("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
10452
10500
  item,
@@ -10459,7 +10507,7 @@ var Carousel = ({
10459
10507
  ref: isInItems ? slideRefs[index] : void 0,
10460
10508
  index,
10461
10509
  isSelected: isInItems && currentIndex === index,
10462
- className: clsx20(
10510
+ className: clsx19(
10463
10511
  `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
10464
10512
  slideClassName
10465
10513
  ),
@@ -10476,13 +10524,13 @@ var Carousel = ({
10476
10524
  /* @__PURE__ */ jsx26(
10477
10525
  "div",
10478
10526
  {
10479
- className: clsx20(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
10527
+ className: clsx19(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
10480
10528
  }
10481
10529
  ),
10482
10530
  /* @__PURE__ */ jsx26(
10483
10531
  "div",
10484
10532
  {
10485
- className: clsx20(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
10533
+ className: clsx19(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
10486
10534
  }
10487
10535
  )
10488
10536
  ]
@@ -10491,7 +10539,7 @@ var Carousel = ({
10491
10539
  "div",
10492
10540
  {
10493
10541
  ref: slideRefs[currentIndex],
10494
- className: clsx20("px-16 h-full"),
10542
+ className: clsx19("px-16 h-full"),
10495
10543
  tabIndex: 0,
10496
10544
  role: "group",
10497
10545
  "aria-roledescription": translation("slide"),
@@ -10508,7 +10556,7 @@ var Carousel = ({
10508
10556
  {
10509
10557
  layout: "icon",
10510
10558
  color: "neutral",
10511
- className: clsx20("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10559
+ className: clsx19("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10512
10560
  disabled: !canGoLeft(),
10513
10561
  onClick: () => left(),
10514
10562
  children: /* @__PURE__ */ jsx26(ChevronLeft, { size: 24 })
@@ -10519,7 +10567,7 @@ var Carousel = ({
10519
10567
  {
10520
10568
  layout: "icon",
10521
10569
  color: "neutral",
10522
- className: clsx20("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10570
+ className: clsx19("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10523
10571
  disabled: !canGoRight(),
10524
10572
  onClick: () => right(),
10525
10573
  children: /* @__PURE__ */ jsx26(ChevronRight, { size: 24 })
@@ -10536,7 +10584,7 @@ var Carousel = ({
10536
10584
  };
10537
10585
 
10538
10586
  // src/components/layout/DividerInserter.tsx
10539
- import clsx21 from "clsx";
10587
+ import clsx20 from "clsx";
10540
10588
  import { jsx as jsx27 } from "react/jsx-runtime";
10541
10589
  var DividerInserter = ({
10542
10590
  children,
@@ -10554,11 +10602,11 @@ var DividerInserter = ({
10554
10602
  }
10555
10603
  }
10556
10604
  }
10557
- return /* @__PURE__ */ jsx27("div", { className: clsx21(className), ...restProps, children: nodes });
10605
+ return /* @__PURE__ */ jsx27("div", { className: clsx20(className), ...restProps, children: nodes });
10558
10606
  };
10559
10607
 
10560
10608
  // src/components/layout/FAQSection.tsx
10561
- import clsx22 from "clsx";
10609
+ import clsx21 from "clsx";
10562
10610
 
10563
10611
  // src/components/layout/MarkdownInterpreter.tsx
10564
10612
  import { Fragment as Fragment2, jsx as jsx28 } from "react/jsx-runtime";
@@ -10804,7 +10852,7 @@ var FAQSection = ({
10804
10852
  label: /* @__PURE__ */ jsx29("span", { id, className: "typography-title-md", children: title }),
10805
10853
  clickOnlyOnHeader: false,
10806
10854
  icon: (expanded) => /* @__PURE__ */ jsx29(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
10807
- className: clsx22("rounded-xl", expandableClassName),
10855
+ className: clsx21("rounded-xl", expandableClassName),
10808
10856
  children: /* @__PURE__ */ jsx29("div", { className: "mt-2", children: content.type === "markdown" ? /* @__PURE__ */ jsx29(MarkdownInterpreter, { text: content.value }) : content.value })
10809
10857
  },
10810
10858
  id
@@ -10814,7 +10862,7 @@ var FAQSection = ({
10814
10862
  // src/components/layout/FloatingContainer.tsx
10815
10863
  import { forwardRef as forwardRef6, useImperativeHandle as useImperativeHandle3, useRef as useRef8 } from "react";
10816
10864
  import { createPortal as createPortal3 } from "react-dom";
10817
- import { clsx as clsx23 } from "clsx";
10865
+ import { clsx as clsx22 } from "clsx";
10818
10866
  import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
10819
10867
  var FloatingContainer = forwardRef6(function FloatingContainer2({
10820
10868
  children,
@@ -10859,7 +10907,7 @@ var FloatingContainer = forwardRef6(function FloatingContainer2({
10859
10907
  ...position,
10860
10908
  ...props.style
10861
10909
  },
10862
- className: clsx23("motion-safe:duration-100 motion-reduce:duration-0", props.className),
10910
+ className: clsx22("motion-safe:duration-100 motion-reduce:duration-0", props.className),
10863
10911
  children
10864
10912
  }
10865
10913
  )
@@ -10870,7 +10918,7 @@ var FloatingContainer = forwardRef6(function FloatingContainer2({
10870
10918
 
10871
10919
  // src/components/layout/ListBox.tsx
10872
10920
  import React4, { createContext as createContext5, forwardRef as forwardRef7, useCallback as useCallback10, useContext as useContext5, useEffect as useEffect18, useRef as useRef9, useState as useState18 } from "react";
10873
- import { clsx as clsx24 } from "clsx";
10921
+ import { clsx as clsx23 } from "clsx";
10874
10922
  import { jsx as jsx31 } from "react/jsx-runtime";
10875
10923
  var ListBoxContext = createContext5(null);
10876
10924
  function useListBoxContext() {
@@ -10913,7 +10961,7 @@ var ListBoxItem = forwardRef7(
10913
10961
  "data-highlighted": isHighlighted ? "" : void 0,
10914
10962
  "data-selected": selected ? "" : void 0,
10915
10963
  "data-disabled": disabled ? "" : void 0,
10916
- className: clsx24(
10964
+ className: clsx23(
10917
10965
  "flex-row-1 items-center px-2 py-1 rounded-md",
10918
10966
  "data-highlighted:bg-primary/20",
10919
10967
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -11134,7 +11182,7 @@ var ListBoxUncontrolled = ({
11134
11182
  // src/components/layout/TabView.tsx
11135
11183
  import { useId as useId7 } from "react";
11136
11184
  import { createContext as createContext6, useContext as useContext6, useState as useState19, useEffect as useEffect19, useRef as useRef10 } from "react";
11137
- import clsx25 from "clsx";
11185
+ import clsx24 from "clsx";
11138
11186
  import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
11139
11187
  var TabContext = createContext6(null);
11140
11188
  function useTabContext() {
@@ -11179,8 +11227,8 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11179
11227
  buttonRefs.current[nextId]?.focus();
11180
11228
  };
11181
11229
  const value = { active, setActive, register, unregister, tabs };
11182
- return /* @__PURE__ */ jsx32(TabContext.Provider, { value, children: /* @__PURE__ */ jsxs19("div", { ...outerDivProps, className: clsx25("w-full", props.className), children: [
11183
- /* @__PURE__ */ jsx32("div", { role: "tablist", ...props, className: clsx25("flex-row-0"), children: tabs.map((t) => /* @__PURE__ */ jsx32(
11230
+ return /* @__PURE__ */ jsx32(TabContext.Provider, { value, children: /* @__PURE__ */ jsxs19("div", { ...outerDivProps, className: clsx24("w-full", props.className), children: [
11231
+ /* @__PURE__ */ jsx32("div", { role: "tablist", ...props, className: clsx24("flex-row-0"), children: tabs.map((t) => /* @__PURE__ */ jsx32(
11184
11232
  "button",
11185
11233
  {
11186
11234
  role: "tab",
@@ -11188,10 +11236,12 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11188
11236
  "aria-controls": `${t.id}-panel`,
11189
11237
  id: `${t.id}-tab`,
11190
11238
  tabIndex: active === t.id ? 0 : -1,
11191
- ref: (el) => buttonRefs.current[t.id] = el,
11239
+ ref: (el) => {
11240
+ buttonRefs.current[t.id] = el;
11241
+ },
11192
11242
  onClick: () => setActive(t.id),
11193
11243
  onKeyDown: (e) => onKeyDown(e, t.id),
11194
- className: clsx25(
11244
+ className: clsx24(
11195
11245
  "flex-row-0 grow justify-center px-3 pb-2.25 typography-label-md font-bold border-b-2",
11196
11246
  active === t.id ? "border-primary" : "text-description hover:text-on-background"
11197
11247
  ),
@@ -11225,7 +11275,7 @@ function Tab({ id: customId, label, children, ...props }) {
11225
11275
  }
11226
11276
 
11227
11277
  // src/components/layout/TextImage.tsx
11228
- import clsx26 from "clsx";
11278
+ import clsx25 from "clsx";
11229
11279
  import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
11230
11280
  var TextImage = ({
11231
11281
  title,
@@ -11251,7 +11301,7 @@ var TextImage = ({
11251
11301
  return /* @__PURE__ */ jsx33(
11252
11302
  "div",
11253
11303
  {
11254
- className: clsx26("rounded-2xl w-full", className),
11304
+ className: clsx25("rounded-2xl w-full", className),
11255
11305
  style: {
11256
11306
  backgroundImage: `url(${imageUrl})`,
11257
11307
  backgroundSize: "cover"
@@ -11259,9 +11309,9 @@ var TextImage = ({
11259
11309
  children: /* @__PURE__ */ jsxs20(
11260
11310
  "div",
11261
11311
  {
11262
- className: clsx26(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11312
+ className: clsx25(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11263
11313
  children: [
11264
- badge && /* @__PURE__ */ jsx33("div", { className: clsx26(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx33("span", { className: "text-lg font-bold", children: badge }) }),
11314
+ badge && /* @__PURE__ */ jsx33("div", { className: clsx25(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ jsx33("span", { className: "text-lg font-bold", children: badge }) }),
11265
11315
  /* @__PURE__ */ jsxs20("div", { className: "flex-col-1 overflow-hidden", children: [
11266
11316
  /* @__PURE__ */ jsx33("span", { className: "typography-title-lg", children: title }),
11267
11317
  /* @__PURE__ */ jsx33("span", { className: "text-ellipsis overflow-hidden", children: description })
@@ -11327,16 +11377,24 @@ var VerticalDivider = ({
11327
11377
  ) });
11328
11378
  };
11329
11379
 
11380
+ // src/components/layout/Visibility.tsx
11381
+ function Visibility({ children, isVisible }) {
11382
+ if (isVisible) {
11383
+ return children;
11384
+ }
11385
+ return void 0;
11386
+ }
11387
+
11330
11388
  // src/components/loading-states/ErrorComponent.tsx
11331
11389
  import { AlertOctagon } from "lucide-react";
11332
- import clsx27 from "clsx";
11390
+ import clsx26 from "clsx";
11333
11391
  import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
11334
11392
  var ErrorComponent = ({
11335
11393
  errorText,
11336
11394
  classname
11337
11395
  }) => {
11338
11396
  const translation = useHightideTranslation();
11339
- return /* @__PURE__ */ jsxs22("div", { className: clsx27("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11397
+ return /* @__PURE__ */ jsxs22("div", { className: clsx26("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11340
11398
  /* @__PURE__ */ jsx35(AlertOctagon, { size: 64, className: "text-warning" }),
11341
11399
  errorText ?? `${translation("errorOccurred")} :(`
11342
11400
  ] });
@@ -11346,14 +11404,14 @@ var ErrorComponent = ({
11346
11404
  import { useState as useState20 } from "react";
11347
11405
 
11348
11406
  // src/components/loading-states/LoadingContainer.tsx
11349
- import { clsx as clsx28 } from "clsx";
11407
+ import { clsx as clsx27 } from "clsx";
11350
11408
  import { jsx as jsx36 } from "react/jsx-runtime";
11351
11409
  var LoadingContainer = ({ className }) => {
11352
- return /* @__PURE__ */ jsx36("div", { className: clsx28("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11410
+ return /* @__PURE__ */ jsx36("div", { className: clsx27("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11353
11411
  };
11354
11412
 
11355
11413
  // src/components/loading-states/LoadingAndErrorComponent.tsx
11356
- import { clsx as clsx29 } from "clsx";
11414
+ import { clsx as clsx28 } from "clsx";
11357
11415
  import { jsx as jsx37 } from "react/jsx-runtime";
11358
11416
  var LoadingAndErrorComponent = ({
11359
11417
  children,
@@ -11374,34 +11432,34 @@ var LoadingAndErrorComponent = ({
11374
11432
  }, minimumLoadingDuration);
11375
11433
  }
11376
11434
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
11377
- return loadingComponent ?? /* @__PURE__ */ jsx37(LoadingContainer, { className: clsx29(className) });
11435
+ return loadingComponent ?? /* @__PURE__ */ jsx37(LoadingContainer, { className: clsx28(className) });
11378
11436
  }
11379
11437
  if (hasError) {
11380
- return errorComponent ?? /* @__PURE__ */ jsx37(LoadingContainer, { className: clsx29("bg-negative", className) });
11438
+ return errorComponent ?? /* @__PURE__ */ jsx37(LoadingContainer, { className: clsx28("bg-negative", className) });
11381
11439
  }
11382
11440
  return children;
11383
11441
  };
11384
11442
 
11385
11443
  // src/components/loading-states/LoadingAnimation.tsx
11386
- import clsx30 from "clsx";
11444
+ import clsx29 from "clsx";
11387
11445
  import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
11388
11446
  var LoadingAnimation = ({
11389
11447
  loadingText,
11390
11448
  classname
11391
11449
  }) => {
11392
11450
  const translation = useHightideTranslation();
11393
- return /* @__PURE__ */ jsxs23("div", { className: clsx30("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11451
+ return /* @__PURE__ */ jsxs23("div", { className: clsx29("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11394
11452
  /* @__PURE__ */ jsx38(HelpwaveLogo, { animate: "loading" }),
11395
11453
  loadingText ?? `${translation("loading")}...`
11396
11454
  ] });
11397
11455
  };
11398
11456
 
11399
11457
  // src/components/loading-states/LoadingButton.tsx
11400
- import clsx31 from "clsx";
11458
+ import clsx30 from "clsx";
11401
11459
  import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
11402
11460
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
11403
11461
  return /* @__PURE__ */ jsxs24("div", { className: "inline-block relative", children: [
11404
- isLoading && /* @__PURE__ */ jsx39("div", { className: clsx31("flex-row-2 absolute inset-0 items-center justify-center bg-white/40"), children: /* @__PURE__ */ jsx39(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
11462
+ isLoading && /* @__PURE__ */ jsx39("div", { className: clsx30("flex-row-2 absolute inset-0 items-center justify-center bg-white/40"), children: /* @__PURE__ */ jsx39(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
11405
11463
  /* @__PURE__ */ jsx39(Button, { ...rest, size, disabled: rest.disabled, onClick })
11406
11464
  ] });
11407
11465
  };
@@ -11464,18 +11522,18 @@ var ProgressIndicator = ({
11464
11522
 
11465
11523
  // src/components/navigation/BreadCrumb.tsx
11466
11524
  var import_link = __toESM(require_link2());
11467
- import clsx32 from "clsx";
11525
+ import clsx31 from "clsx";
11468
11526
  import { Fragment as Fragment4 } from "react";
11469
11527
  import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
11470
11528
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
11471
- return /* @__PURE__ */ jsx41("div", { className: clsx32("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
11529
+ return /* @__PURE__ */ jsx41("div", { className: clsx31("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
11472
11530
  const isLast = index === crumbs.length - 1;
11473
11531
  return /* @__PURE__ */ jsxs26(Fragment4, { children: [
11474
11532
  /* @__PURE__ */ jsx41(
11475
11533
  import_link.default,
11476
11534
  {
11477
11535
  href: crumb.link,
11478
- className: clsx32(
11536
+ className: clsx31(
11479
11537
  "btn-sm coloring-text-hover",
11480
11538
  {
11481
11539
  description: !isLast,
@@ -11486,7 +11544,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
11486
11544
  children: crumb.display
11487
11545
  }
11488
11546
  ),
11489
- !isLast && /* @__PURE__ */ jsx41("span", { className: clsx32(`px-1`, "text-description"), children: "/" })
11547
+ !isLast && /* @__PURE__ */ jsx41("span", { className: clsx31(`px-1`, "text-description"), children: "/" })
11490
11548
  ] }, index);
11491
11549
  }) });
11492
11550
  };
@@ -11496,7 +11554,7 @@ var import_link2 = __toESM(require_link2());
11496
11554
  import { Menu as MenuIcon, XIcon as XIcon2 } from "lucide-react";
11497
11555
  import { useEffect as useEffect20 } from "react";
11498
11556
  import { useCallback as useCallback11, useId as useId8, useRef as useRef11, useState as useState21 } from "react";
11499
- import clsx33 from "clsx";
11557
+ import clsx32 from "clsx";
11500
11558
  import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
11501
11559
  function isSubItem(item) {
11502
11560
  return "items" in item && Array.isArray(item.items);
@@ -11508,7 +11566,7 @@ var NavigationItemWithSubItem = ({
11508
11566
  ...options
11509
11567
  }) => {
11510
11568
  const [isOpen, setOpen] = useState21(false);
11511
- const containerRef = useRef11();
11569
+ const containerRef = useRef11(null);
11512
11570
  const triggerRef = useRef11(null);
11513
11571
  const id = useId8();
11514
11572
  const style = useFloatingElement({
@@ -11559,7 +11617,7 @@ var NavigationItemWithSubItem = ({
11559
11617
  },
11560
11618
  onBlur,
11561
11619
  hidden: !isOpen,
11562
- className: clsx33(
11620
+ className: clsx32(
11563
11621
  "fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md",
11564
11622
  { "opacity-0": !style }
11565
11623
  ),
@@ -11578,7 +11636,7 @@ var NavigationItemWithSubItem = ({
11578
11636
  ] });
11579
11637
  };
11580
11638
  var NavigationItemList = ({ items, ...restProps }) => {
11581
- return /* @__PURE__ */ jsx42("ul", { ...restProps, className: clsx33("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx42("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx42(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx42(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11639
+ return /* @__PURE__ */ jsx42("ul", { ...restProps, className: clsx32("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ jsx42("li", { children: isSubItem(item) ? /* @__PURE__ */ jsx42(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ jsx42(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11582
11640
  };
11583
11641
  var Navigation = ({ ...props }) => {
11584
11642
  const [isMobileOpen, setIsMobileOpen] = useState21(false);
@@ -11593,7 +11651,7 @@ var Navigation = ({ ...props }) => {
11593
11651
  NavigationItemList,
11594
11652
  {
11595
11653
  ...props,
11596
- className: clsx33("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11654
+ className: clsx32("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11597
11655
  }
11598
11656
  ),
11599
11657
  /* @__PURE__ */ jsx42(
@@ -11623,7 +11681,7 @@ var Navigation = ({ ...props }) => {
11623
11681
  event.stopPropagation();
11624
11682
  }
11625
11683
  },
11626
- className: clsx33(
11684
+ className: clsx32(
11627
11685
  "flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen bg-surface text-on-surface",
11628
11686
  {
11629
11687
  "desktop:hidden": isMobileOpen
@@ -11642,7 +11700,7 @@ var Navigation = ({ ...props }) => {
11642
11700
  children: /* @__PURE__ */ jsx42(XIcon2, {})
11643
11701
  }
11644
11702
  ),
11645
- /* @__PURE__ */ jsx42(NavigationItemList, { ...props, className: clsx33("flex-col-8", props.className) })
11703
+ /* @__PURE__ */ jsx42(NavigationItemList, { ...props, className: clsx32("flex-col-8", props.className) })
11646
11704
  ]
11647
11705
  }
11648
11706
  )
@@ -11651,7 +11709,7 @@ var Navigation = ({ ...props }) => {
11651
11709
 
11652
11710
  // src/components/navigation/Pagination.tsx
11653
11711
  import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
11654
- import clsx34 from "clsx";
11712
+ import clsx33 from "clsx";
11655
11713
  import { useEffect as useEffect21, useState as useState22 } from "react";
11656
11714
  import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
11657
11715
  var Pagination = ({
@@ -11676,7 +11734,7 @@ var Pagination = ({
11676
11734
  const changePage = (page) => {
11677
11735
  onPageChanged(page);
11678
11736
  };
11679
- return /* @__PURE__ */ jsxs28("div", { className: clsx34("flex-row-1", className), style, children: [
11737
+ return /* @__PURE__ */ jsxs28("div", { className: clsx33("flex-row-1", className), style, children: [
11680
11738
  /* @__PURE__ */ jsx43(
11681
11739
  Button,
11682
11740
  {
@@ -11704,7 +11762,7 @@ var Pagination = ({
11704
11762
  Input,
11705
11763
  {
11706
11764
  value,
11707
- className: clsx34(
11765
+ className: clsx33(
11708
11766
  "w-24 text-center font-bold input-indicator-hidden h-10"
11709
11767
  ),
11710
11768
  type: "number",
@@ -11760,7 +11818,7 @@ var Pagination = ({
11760
11818
 
11761
11819
  // src/components/navigation/StepperBar.tsx
11762
11820
  import { Check, ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
11763
- import clsx35 from "clsx";
11821
+ import clsx34 from "clsx";
11764
11822
  import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
11765
11823
  var defaultState = {
11766
11824
  currentStep: 0,
@@ -11786,7 +11844,7 @@ var StepperBar = ({
11786
11844
  return /* @__PURE__ */ jsxs29(
11787
11845
  "div",
11788
11846
  {
11789
- className: clsx35("flex-row-2 justify-between", className),
11847
+ className: clsx34("flex-row-2 justify-between", className),
11790
11848
  children: [
11791
11849
  /* @__PURE__ */ jsx44("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ jsxs29(
11792
11850
  Button,
@@ -11808,7 +11866,7 @@ var StepperBar = ({
11808
11866
  "div",
11809
11867
  {
11810
11868
  onClick: () => seen && update(index),
11811
- className: clsx35(
11869
+ className: clsx34(
11812
11870
  "rounded-full w-4 h-4",
11813
11871
  {
11814
11872
  "bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
@@ -11869,24 +11927,25 @@ import { Check as Check3 } from "lucide-react";
11869
11927
 
11870
11928
  // src/components/user-action/Checkbox.tsx
11871
11929
  import { Check as Check2, Minus } from "lucide-react";
11872
- import clsx36 from "clsx";
11930
+ import clsx35 from "clsx";
11873
11931
  import { jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
11874
11932
  var checkboxSizeMapping = {
11875
- sm: "size-5 border-1",
11876
- md: "size-6 border-1",
11877
- lg: "size-8 border-2"
11933
+ small: "size-5 border-2",
11934
+ medium: "size-6 border-2",
11935
+ large: "size-8 border-2"
11878
11936
  };
11879
11937
  var checkboxIconSizeMapping = {
11880
- sm: "size-4 stroke-3",
11881
- md: "size-5 stroke-3",
11882
- lg: "size-7 stroke-3"
11938
+ small: "size-3.5 stroke-3",
11939
+ medium: "size-4.5 stroke-3",
11940
+ large: "size-6 stroke-3"
11883
11941
  };
11884
11942
  var Checkbox = ({
11885
11943
  disabled,
11886
11944
  checked = false,
11887
11945
  indeterminate = false,
11946
+ invalid = false,
11888
11947
  onCheckedChange,
11889
- size = "md",
11948
+ size = "medium",
11890
11949
  className = "",
11891
11950
  ...props
11892
11951
  }) => {
@@ -11910,25 +11969,21 @@ var Checkbox = ({
11910
11969
  props.onKeyDown?.(event);
11911
11970
  }
11912
11971
  },
11913
- className: clsx36(
11972
+ className: clsx35(
11914
11973
  usedSizeClass,
11915
- `flex-col-0 items-center justify-center rounded`,
11916
- {
11917
- "text-disabled border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
11918
- "hover:border-primary": !disabled,
11919
- "bg-input-background": !disabled && !checked,
11920
- "bg-primary/30 border-primary text-primary": !disabled && (checked || indeterminate)
11921
- },
11922
11974
  className
11923
11975
  ),
11976
+ "data-name": props["data-name"] ?? "checkbox",
11977
+ "data-value": !indeterminate ? checked : "indeterminate",
11978
+ "data-disabled": disabled ? "" : void 0,
11979
+ "data-invalid": invalid ? "" : void 0,
11924
11980
  role: "checkbox",
11925
11981
  "aria-checked": indeterminate ? "mixed" : checked,
11926
11982
  "aria-disabled": disabled,
11927
11983
  tabIndex: disabled ? -1 : 0,
11928
11984
  children: [
11929
- !checked && !indeterminate && /* @__PURE__ */ jsx45("div", { className: clsx36("bg-input-background", innerIconSize) }),
11930
- checked && !indeterminate && /* @__PURE__ */ jsx45(Check2, { className: innerIconSize }),
11931
- indeterminate && /* @__PURE__ */ jsx45(Minus, { className: innerIconSize })
11985
+ !indeterminate && /* @__PURE__ */ jsx45(Check2, { className: innerIconSize, "aria-hidden": true }),
11986
+ indeterminate && /* @__PURE__ */ jsx45(Minus, { className: innerIconSize, "aria-hidden": true })
11932
11987
  ]
11933
11988
  }
11934
11989
  );
@@ -11951,7 +12006,7 @@ var CheckboxUncontrolled = ({
11951
12006
 
11952
12007
  // src/components/properties/PropertyBase.tsx
11953
12008
  import { AlertTriangle } from "lucide-react";
11954
- import clsx37 from "clsx";
12009
+ import clsx36 from "clsx";
11955
12010
  import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
11956
12011
  var PropertyBase = ({
11957
12012
  name,
@@ -11965,14 +12020,14 @@ var PropertyBase = ({
11965
12020
  }) => {
11966
12021
  const translation = useHightideTranslation();
11967
12022
  const requiredAndNoValue = softRequired && !hasValue;
11968
- return /* @__PURE__ */ jsxs31("div", { className: clsx37("flex-row-0 group", className), children: [
12023
+ return /* @__PURE__ */ jsxs31("div", { className: clsx36("flex-row-0 group", className), children: [
11969
12024
  /* @__PURE__ */ jsxs31(
11970
12025
  "div",
11971
12026
  {
11972
- className: clsx37(
12027
+ className: clsx36(
11973
12028
  "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
11974
12029
  {
11975
- "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
12030
+ "bg-property-title-background text-property-title-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
11976
12031
  "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
11977
12032
  },
11978
12033
  className
@@ -11986,10 +12041,10 @@ var PropertyBase = ({
11986
12041
  /* @__PURE__ */ jsxs31(
11987
12042
  "div",
11988
12043
  {
11989
- className: clsx37(
12044
+ className: clsx36(
11990
12045
  "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
11991
12046
  {
11992
- "bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
12047
+ "bg-input-background text-input-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
11993
12048
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
11994
12049
  },
11995
12050
  className
@@ -12003,7 +12058,7 @@ var PropertyBase = ({
12003
12058
  onClick: onRemove,
12004
12059
  color: "negative",
12005
12060
  coloringStyle: "text",
12006
- className: clsx37("items-center"),
12061
+ className: clsx36("items-center"),
12007
12062
  disabled: !hasValue,
12008
12063
  children: translation("remove")
12009
12064
  }
@@ -12051,7 +12106,7 @@ var CheckboxProperty = ({
12051
12106
 
12052
12107
  // src/components/properties/DateProperty.tsx
12053
12108
  import { CalendarDays } from "lucide-react";
12054
- import clsx38 from "clsx";
12109
+ import clsx37 from "clsx";
12055
12110
  import { jsx as jsx48 } from "react/jsx-runtime";
12056
12111
  var DateProperty = ({
12057
12112
  value,
@@ -12072,7 +12127,7 @@ var DateProperty = ({
12072
12127
  input: ({ softRequired }) => /* @__PURE__ */ jsx48(
12073
12128
  Input,
12074
12129
  {
12075
- className: clsx38("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
12130
+ className: clsx37("default-style-none focus-style-none", { "bg-surface-warning": softRequired && !hasValue }),
12076
12131
  value: dateText,
12077
12132
  type: type === "dateTime" ? "datetime-local" : "date",
12078
12133
  readOnly,
@@ -12094,7 +12149,7 @@ var DateProperty = ({
12094
12149
 
12095
12150
  // src/components/properties/MultiSelectProperty.tsx
12096
12151
  import { List } from "lucide-react";
12097
- import clsx39 from "clsx";
12152
+ import clsx38 from "clsx";
12098
12153
  import { jsx as jsx49 } from "react/jsx-runtime";
12099
12154
  var MultiSelectProperty = ({
12100
12155
  children,
@@ -12116,14 +12171,15 @@ var MultiSelectProperty = ({
12116
12171
  onValuesChanged,
12117
12172
  disabled: props.readOnly,
12118
12173
  contentPanelProps: {
12119
- className: clsx39(
12174
+ className: clsx38(
12120
12175
  "!border-none !min-h-10"
12121
12176
  )
12122
12177
  },
12123
12178
  chipDisplayProps: {
12124
- className: clsx39({
12125
- "!bg-warning !text-surface-warning": softRequired && !hasValue
12126
- })
12179
+ className: clsx38(
12180
+ "default-style-none flex flex-wrap gap-x-2 gap-y-2 items-center hover:cursor-pointer",
12181
+ { "!bg-warning text-surface-warning": softRequired && !hasValue }
12182
+ )
12127
12183
  },
12128
12184
  children
12129
12185
  }
@@ -12134,7 +12190,7 @@ var MultiSelectProperty = ({
12134
12190
 
12135
12191
  // src/components/properties/NumberProperty.tsx
12136
12192
  import { Binary } from "lucide-react";
12137
- import clsx40 from "clsx";
12193
+ import clsx39 from "clsx";
12138
12194
  import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
12139
12195
  var NumberProperty = ({
12140
12196
  value,
@@ -12159,12 +12215,12 @@ var NumberProperty = ({
12159
12215
  /* @__PURE__ */ jsxs33(
12160
12216
  "div",
12161
12217
  {
12162
- className: clsx40("relative flex-row-2 max-w-56", { "text-warning": softRequired && !hasValue }),
12218
+ className: clsx39("relative flex-row-2 max-w-56", { "text-warning": softRequired && !hasValue }),
12163
12219
  children: [
12164
12220
  /* @__PURE__ */ jsx50(
12165
12221
  Input,
12166
12222
  {
12167
- className: clsx40("!ring-0 !border-0 !outline-0 !py-0 pl-0 pr-8 !m-0 !shadow-none !rounded-none w-full", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
12223
+ className: clsx39("default-style-none focus-style-none w-full pr-8", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
12168
12224
  value: value?.toString() ?? "",
12169
12225
  type: "number",
12170
12226
  readOnly,
@@ -12190,7 +12246,7 @@ var NumberProperty = ({
12190
12246
  suffix && /* @__PURE__ */ jsx50(
12191
12247
  "span",
12192
12248
  {
12193
- className: clsx40(
12249
+ className: clsx39(
12194
12250
  "absolute top-1/2 -translate-y-1/2 right-2",
12195
12251
  { "bg-surface-warning": softRequired && !hasValue }
12196
12252
  ),
@@ -12207,7 +12263,7 @@ var NumberProperty = ({
12207
12263
 
12208
12264
  // src/components/properties/SelectProperty.tsx
12209
12265
  import { List as List2 } from "lucide-react";
12210
- import clsx41 from "clsx";
12266
+ import clsx40 from "clsx";
12211
12267
  import { jsx as jsx51 } from "react/jsx-runtime";
12212
12268
  var SingleSelectProperty = ({
12213
12269
  children,
@@ -12230,8 +12286,8 @@ var SingleSelectProperty = ({
12230
12286
  onValueChanged,
12231
12287
  disabled: props.readOnly,
12232
12288
  buttonProps: {
12233
- className: clsx41(
12234
- "border-none w-full",
12289
+ className: clsx40(
12290
+ "default-style-none focus-style-none flex-row-2 w-full items-center",
12235
12291
  {
12236
12292
  "!bg-warning !text-surface-warning": softRequired && !hasValue
12237
12293
  }
@@ -12247,11 +12303,11 @@ var SingleSelectProperty = ({
12247
12303
 
12248
12304
  // src/components/properties/TextProperty.tsx
12249
12305
  import { Text } from "lucide-react";
12250
- import clsx43 from "clsx";
12306
+ import clsx42 from "clsx";
12251
12307
 
12252
12308
  // src/components/user-action/Textarea.tsx
12253
12309
  import { forwardRef as forwardRef8, useId as useId10 } from "react";
12254
- import clsx42 from "clsx";
12310
+ import clsx41 from "clsx";
12255
12311
  import { jsx as jsx52, jsxs as jsxs34 } from "react/jsx-runtime";
12256
12312
  var Textarea = forwardRef8(function Textarea2({
12257
12313
  id,
@@ -12260,10 +12316,8 @@ var Textarea = forwardRef8(function Textarea2({
12260
12316
  onBlur,
12261
12317
  onEditCompleted,
12262
12318
  saveDelayOptions,
12263
- defaultStyle = true,
12264
12319
  invalid = false,
12265
12320
  disabled = false,
12266
- className,
12267
12321
  ...props
12268
12322
  }, ref) {
12269
12323
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
@@ -12274,18 +12328,10 @@ var Textarea = forwardRef8(function Textarea2({
12274
12328
  return /* @__PURE__ */ jsx52(
12275
12329
  "textarea",
12276
12330
  {
12331
+ ...props,
12277
12332
  ref,
12278
12333
  id,
12279
- className: clsx42(
12280
- "resize-none w-full h-32 overflow-y-scroll",
12281
- "py-2 px-3 rounded-md border-2 border-transparent focus-style-none",
12282
- {
12283
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
12284
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": invalid && !disabled && defaultStyle,
12285
- "text-disabled bg-disabled-background border-disabled-border": disabled && defaultStyle
12286
- },
12287
- className
12288
- ),
12334
+ disabled,
12289
12335
  onChange: (event) => {
12290
12336
  const value = event.target.value;
12291
12337
  restartTimer(() => {
@@ -12298,8 +12344,10 @@ var Textarea = forwardRef8(function Textarea2({
12298
12344
  onBlur?.(event);
12299
12345
  onEditCompletedWrapper(event.target.value);
12300
12346
  },
12301
- disabled,
12302
- ...props
12347
+ "data-name": props["data-name"] ?? "textarea",
12348
+ "data-value": props.value ? "" : void 0,
12349
+ "data-disabled": disabled ? "" : void 0,
12350
+ "data-invalid": invalid ? "" : void 0
12303
12351
  }
12304
12352
  );
12305
12353
  });
@@ -12332,7 +12380,7 @@ var TextareaWithHeadline = ({
12332
12380
  return /* @__PURE__ */ jsxs34(
12333
12381
  "div",
12334
12382
  {
12335
- className: clsx42(
12383
+ className: clsx41(
12336
12384
  "group flex-col-3 border-2 rounded-lg",
12337
12385
  {
12338
12386
  "bg-input-background text-input-text hover:border-primary focus-within:border-primary": !disabled,
@@ -12347,11 +12395,10 @@ var TextareaWithHeadline = ({
12347
12395
  {
12348
12396
  ...props,
12349
12397
  id: usedId,
12350
- className: clsx42(
12398
+ className: clsx41(
12351
12399
  "border-transparent focus:ring-0 focus-visible:ring-0 resize-none h-32",
12352
12400
  className
12353
- ),
12354
- defaultStyle: false
12401
+ )
12355
12402
  }
12356
12403
  )
12357
12404
  ]
@@ -12381,11 +12428,11 @@ var TextProperty = ({
12381
12428
  input: ({ softRequired }) => /* @__PURE__ */ jsx53(
12382
12429
  Textarea,
12383
12430
  {
12384
- className: clsx43({
12385
- "bg-surface-warning placeholder-warning": softRequired && !hasValue
12386
- }),
12431
+ className: clsx42(
12432
+ "default-style-none focus-style-none w-full",
12433
+ { "bg-surface-warning placeholder-warning": softRequired && !hasValue }
12434
+ ),
12387
12435
  rows: 5,
12388
- defaultStyle: false,
12389
12436
  value: value ?? "",
12390
12437
  readOnly,
12391
12438
  placeholder: `${translation("text")}...`,
@@ -12410,12 +12457,12 @@ var TextProperty = ({
12410
12457
  };
12411
12458
 
12412
12459
  // src/components/table/FillerRowElement.tsx
12413
- import { clsx as clsx44 } from "clsx";
12460
+ import { clsx as clsx43 } from "clsx";
12414
12461
  import { jsx as jsx54 } from "react/jsx-runtime";
12415
12462
  var FillerRowElement = ({
12416
12463
  className
12417
12464
  }) => {
12418
- return /* @__PURE__ */ jsx54("div", { className: clsx44("flex flex-row items-center w-1/2 h-4 text-disabled font-bold", className), children: "-" });
12465
+ return /* @__PURE__ */ jsx54("div", { className: clsx43("flex flex-row items-center w-1/2 h-4 text-disabled font-bold", className), children: "-" });
12419
12466
  };
12420
12467
 
12421
12468
  // src/components/table/Filter.ts
@@ -12433,7 +12480,7 @@ var TableFilters = {
12433
12480
  };
12434
12481
 
12435
12482
  // src/components/table/Table.tsx
12436
- import { useCallback as useCallback12, useEffect as useEffect27, useMemo as useMemo7, useRef as useRef13, useState as useState26 } from "react";
12483
+ import { useCallback as useCallback12, useEffect as useEffect27, useMemo as useMemo7, useRef as useRef14, useState as useState27 } from "react";
12437
12484
  import clsx48 from "clsx";
12438
12485
  import {
12439
12486
  flexRender,
@@ -12445,13 +12492,13 @@ import {
12445
12492
  } from "@tanstack/react-table";
12446
12493
 
12447
12494
  // src/components/table/TableCell.tsx
12448
- import { clsx as clsx45 } from "clsx";
12495
+ import { clsx as clsx44 } from "clsx";
12449
12496
  import { jsx as jsx55 } from "react/jsx-runtime";
12450
12497
  var TableCell = ({
12451
12498
  children,
12452
12499
  className
12453
12500
  }) => {
12454
- return /* @__PURE__ */ jsx55("span", { className: clsx45("block max-w-full overflow-ellipsis truncate", className), children });
12501
+ return /* @__PURE__ */ jsx55("span", { className: clsx44("block max-w-full overflow-ellipsis truncate", className), children });
12455
12502
  };
12456
12503
 
12457
12504
  // src/hooks/useResizeCallbackWrapper.ts
@@ -12468,41 +12515,179 @@ var useResizeCallbackWrapper = (callback) => {
12468
12515
  // src/components/table/TableSortButton.tsx
12469
12516
  import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp } from "lucide-react";
12470
12517
  import clsx46 from "clsx";
12471
- import { jsx as jsx56 } from "react/jsx-runtime";
12518
+
12519
+ // src/components/user-action/Tooltip.tsx
12520
+ import { useRef as useRef12, useState as useState23 } from "react";
12521
+ import { clsx as clsx45 } from "clsx";
12522
+ import { createPortal as createPortal4 } from "react-dom";
12523
+ import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
12524
+ var Tooltip = ({
12525
+ tooltip,
12526
+ children,
12527
+ appearDelay = 400,
12528
+ disappearDelay = 50,
12529
+ tooltipClassName = "",
12530
+ containerClassName = "",
12531
+ position = "bottom",
12532
+ disabled = false
12533
+ }) => {
12534
+ const [state, setState] = useState23({
12535
+ isShown: false,
12536
+ timer: null
12537
+ });
12538
+ const { isShown } = state;
12539
+ const anchorRef = useRef12(null);
12540
+ const containerRef = useRef12(null);
12541
+ const triangleRef = useRef12(null);
12542
+ const triangleSize = 0.375;
12543
+ const triangleClasses = {
12544
+ top: `border-t-tooltip-background border-l-transparent border-r-transparent`,
12545
+ bottom: `border-b-tooltip-background border-l-transparent border-r-transparent`,
12546
+ left: `border-l-tooltip-background border-t-transparent border-b-transparent`,
12547
+ right: `border-r-tooltip-background border-t-transparent border-b-transparent`
12548
+ };
12549
+ const triangleStyle = {
12550
+ top: { borderWidth: `${triangleSize}rem ${triangleSize}rem 0 ${triangleSize}rem`, transform: `translate(0,${triangleSize}rem)` },
12551
+ bottom: { borderWidth: `0 ${triangleSize}rem ${triangleSize}rem ${triangleSize}rem`, transform: `translate(0,-${triangleSize}rem)` },
12552
+ left: { borderWidth: `${triangleSize}rem 0 ${triangleSize}rem ${triangleSize}rem`, transform: `translate(${triangleSize}rem,0)` },
12553
+ right: { borderWidth: `${triangleSize}rem ${triangleSize}rem ${triangleSize}rem 0`, transform: `translate(-${triangleSize}rem,0)` }
12554
+ };
12555
+ const isActive = !disabled && isShown;
12556
+ const css = useFloatingElement({
12557
+ active: isActive,
12558
+ anchorRef,
12559
+ containerRef,
12560
+ horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
12561
+ verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
12562
+ });
12563
+ const cssTriangle = useFloatingElement({
12564
+ active: isActive,
12565
+ anchorRef,
12566
+ containerRef: triangleRef,
12567
+ horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
12568
+ verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
12569
+ });
12570
+ const zIndex = useZIndexRegister(isActive);
12571
+ const zIndexTriangle = useZIndexRegister(isActive);
12572
+ return /* @__PURE__ */ jsxs35(
12573
+ "div",
12574
+ {
12575
+ ref: anchorRef,
12576
+ className: clsx45("relative inline-block", containerClassName),
12577
+ onMouseEnter: () => setState((prevState) => {
12578
+ clearTimeout(prevState.timer);
12579
+ return {
12580
+ ...prevState,
12581
+ timer: setTimeout(() => {
12582
+ setState((prevState2) => {
12583
+ clearTimeout(prevState2.timer);
12584
+ return { isShown: true, timer: null };
12585
+ });
12586
+ }, appearDelay)
12587
+ };
12588
+ }),
12589
+ onMouseLeave: () => setState((prevState) => {
12590
+ clearTimeout(prevState.timer);
12591
+ return {
12592
+ ...prevState,
12593
+ timer: setTimeout(() => {
12594
+ setState((prevState2) => {
12595
+ clearTimeout(prevState2.timer);
12596
+ return { isShown: false, timer: null };
12597
+ });
12598
+ }, disappearDelay)
12599
+ };
12600
+ }),
12601
+ children: [
12602
+ children,
12603
+ /* @__PURE__ */ jsxs35(Visibility, { isVisible: isActive, children: [
12604
+ createPortal4(
12605
+ /* @__PURE__ */ jsx56(
12606
+ "div",
12607
+ {
12608
+ ref: containerRef,
12609
+ className: clsx45(
12610
+ `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded
12611
+ animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
12612
+ tooltipClassName
12613
+ ),
12614
+ style: { ...css, zIndex, animationDelay: appearDelay + "ms" },
12615
+ children: tooltip
12616
+ }
12617
+ ),
12618
+ document.body
12619
+ ),
12620
+ createPortal4(
12621
+ /* @__PURE__ */ jsx56(
12622
+ "div",
12623
+ {
12624
+ ref: triangleRef,
12625
+ className: clsx45(`absolute w-0 h-0 opacity-0 animate-tooltip-fade-in`, triangleClasses[position]),
12626
+ style: {
12627
+ ...cssTriangle,
12628
+ ...triangleStyle[position],
12629
+ zIndex: zIndexTriangle,
12630
+ animationDelay: appearDelay + "ms"
12631
+ }
12632
+ }
12633
+ ),
12634
+ document.body
12635
+ )
12636
+ ] })
12637
+ ]
12638
+ }
12639
+ );
12640
+ };
12641
+
12642
+ // src/components/table/TableSortButton.tsx
12643
+ import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
12472
12644
  var TableSortButton = ({
12473
12645
  sortDirection,
12474
12646
  invert = false,
12475
12647
  color = "neutral",
12476
12648
  size = "tiny",
12477
12649
  className,
12478
- ...buttonProps
12650
+ sortingIndexDisplay,
12651
+ ...props
12479
12652
  }) => {
12480
- let icon = /* @__PURE__ */ jsx56(ChevronsUpDown, { className: "w-full h-full" });
12653
+ const translation = useHightideTranslation();
12654
+ const { sortingsCount, index } = sortingIndexDisplay;
12655
+ let icon = /* @__PURE__ */ jsx57(ChevronsUpDown, { className: "size-4" });
12481
12656
  if (sortDirection) {
12482
12657
  let usedSortDirection = sortDirection;
12483
12658
  if (invert) {
12484
12659
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
12485
12660
  }
12486
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx56(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx56(ChevronDown3, { className: "w-full h-full" });
12661
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx57(ChevronUp, { className: "size-4" }) : /* @__PURE__ */ jsx57(ChevronDown3, { className: "size-4" });
12487
12662
  }
12488
- return /* @__PURE__ */ jsx56(
12663
+ const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
12664
+ return /* @__PURE__ */ jsx57(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ jsxs36(
12489
12665
  Button,
12490
12666
  {
12491
- layout: "icon",
12667
+ layout: hasSortingIndex ? "default" : "icon",
12492
12668
  color,
12493
12669
  size,
12494
- className: clsx46(className),
12495
- ...buttonProps,
12496
- children: icon
12670
+ className: clsx46("relative", className),
12671
+ ...props,
12672
+ children: [
12673
+ /* @__PURE__ */ jsx57(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ jsx57(
12674
+ "div",
12675
+ {
12676
+ className: clsx46("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"),
12677
+ children: `${index}.`
12678
+ }
12679
+ ) }),
12680
+ icon
12681
+ ]
12497
12682
  }
12498
- );
12683
+ ) });
12499
12684
  };
12500
12685
 
12501
12686
  // src/components/table/TableFilterButton.tsx
12502
12687
  import { FilterIcon } from "lucide-react";
12503
12688
 
12504
12689
  // src/components/user-action/Menu.tsx
12505
- import { useEffect as useEffect25, useRef as useRef12, useState as useState24 } from "react";
12690
+ import { useEffect as useEffect25, useRef as useRef13, useState as useState25 } from "react";
12506
12691
  import clsx47 from "clsx";
12507
12692
 
12508
12693
  // src/utils/bagFunctions.ts
@@ -12517,7 +12702,7 @@ var BagFunctionUtil = {
12517
12702
  };
12518
12703
 
12519
12704
  // src/components/user-action/Menu.tsx
12520
- import { createPortal as createPortal4 } from "react-dom";
12705
+ import { createPortal as createPortal5 } from "react-dom";
12521
12706
 
12522
12707
  // src/hooks/usePopoverPosition.ts
12523
12708
  var defaultPopoverPositionOptions = {
@@ -12574,15 +12759,15 @@ var usePopoverPosition = (trigger, options) => {
12574
12759
  };
12575
12760
 
12576
12761
  // src/hooks/useHoverState.ts
12577
- import { useEffect as useEffect23, useState as useState23 } from "react";
12762
+ import { useEffect as useEffect23, useState as useState24 } from "react";
12578
12763
  var defaultUseHoverStateProps = {
12579
12764
  closingDelay: 200,
12580
12765
  isDisabled: false
12581
12766
  };
12582
12767
  var useHoverState = (props = void 0) => {
12583
12768
  const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
12584
- const [isHovered, setIsHovered] = useState23(false);
12585
- const [timer, setTimer] = useState23();
12769
+ const [isHovered, setIsHovered] = useState24(false);
12770
+ const [timer, setTimer] = useState24();
12586
12771
  const onMouseEnter = () => {
12587
12772
  if (isDisabled) {
12588
12773
  return;
@@ -12638,14 +12823,14 @@ var useOutsideClick = (refs, handler) => {
12638
12823
  };
12639
12824
 
12640
12825
  // src/components/user-action/Menu.tsx
12641
- import { Fragment as Fragment6, jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
12826
+ import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
12642
12827
  var MenuItem = ({
12643
12828
  children,
12644
12829
  onClick,
12645
12830
  alignment = "left",
12646
12831
  isDisabled = false,
12647
12832
  className
12648
- }) => /* @__PURE__ */ jsx57(
12833
+ }) => /* @__PURE__ */ jsx58(
12649
12834
  "div",
12650
12835
  {
12651
12836
  className: clsx47("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
@@ -12678,10 +12863,10 @@ var Menu = ({
12678
12863
  menuClassName = ""
12679
12864
  }) => {
12680
12865
  const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
12681
- const triggerRef = useRef12(null);
12682
- const menuRef = useRef12(null);
12866
+ const triggerRef = useRef13(null);
12867
+ const menuRef = useRef13(null);
12683
12868
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
12684
- const [isHidden, setIsHidden] = useState24(true);
12869
+ const [isHidden, setIsHidden] = useState25(true);
12685
12870
  const bag = {
12686
12871
  isOpen,
12687
12872
  close: () => setIsOpen(false),
@@ -12715,9 +12900,9 @@ var Menu = ({
12715
12900
  }
12716
12901
  }, [isOpen]);
12717
12902
  const zIndex = useZIndexRegister(isOpen);
12718
- return /* @__PURE__ */ jsxs35(Fragment6, { children: [
12903
+ return /* @__PURE__ */ jsxs37(Fragment6, { children: [
12719
12904
  trigger(bag, triggerRef),
12720
- createPortal4(/* @__PURE__ */ jsx57(
12905
+ createPortal5(/* @__PURE__ */ jsx58(
12721
12906
  "div",
12722
12907
  {
12723
12908
  ref: menuRef,
@@ -12747,34 +12932,34 @@ var Menu = ({
12747
12932
  };
12748
12933
 
12749
12934
  // src/components/table/TableFilterButton.tsx
12750
- import { useEffect as useEffect26, useState as useState25 } from "react";
12751
- import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs36 } from "react/jsx-runtime";
12935
+ import { useEffect as useEffect26, useState as useState26 } from "react";
12936
+ import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
12752
12937
  var TableFilterButton = ({
12753
12938
  filterType,
12754
12939
  column
12755
12940
  }) => {
12756
12941
  const translation = useHightideTranslation();
12757
12942
  const columnFilterValue = column.getFilterValue();
12758
- const [filterValue, setFilterValue] = useState25(columnFilterValue);
12943
+ const [filterValue, setFilterValue] = useState26(columnFilterValue);
12759
12944
  const hasFilter = !!filterValue;
12760
12945
  useEffect26(() => {
12761
12946
  setFilterValue(columnFilterValue);
12762
12947
  }, [columnFilterValue]);
12763
- return /* @__PURE__ */ jsx58(
12948
+ return /* @__PURE__ */ jsx59(
12764
12949
  Menu,
12765
12950
  {
12766
- trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs36("div", { ref, className: "relative", children: [
12767
- /* @__PURE__ */ jsx58(
12951
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs38("div", { ref, className: "relative", children: [
12952
+ /* @__PURE__ */ jsx59(
12768
12953
  Button,
12769
12954
  {
12770
12955
  layout: "icon",
12771
12956
  color: "neutral",
12772
12957
  size: "tiny",
12773
12958
  onClick: toggleOpen,
12774
- children: /* @__PURE__ */ jsx58(FilterIcon, {})
12959
+ children: /* @__PURE__ */ jsx59(FilterIcon, { className: "size-4" })
12775
12960
  }
12776
12961
  ),
12777
- hasFilter && /* @__PURE__ */ jsx58(
12962
+ hasFilter && /* @__PURE__ */ jsx59(
12778
12963
  "div",
12779
12964
  {
12780
12965
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -12782,9 +12967,9 @@ var TableFilterButton = ({
12782
12967
  }
12783
12968
  )
12784
12969
  ] }),
12785
- children: ({ close }) => /* @__PURE__ */ jsxs36("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
12786
- /* @__PURE__ */ jsx58("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
12787
- filterType === "text" && /* @__PURE__ */ jsx58(
12970
+ children: ({ close }) => /* @__PURE__ */ jsxs38("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
12971
+ /* @__PURE__ */ jsx59("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
12972
+ filterType === "text" && /* @__PURE__ */ jsx59(
12788
12973
  Input,
12789
12974
  {
12790
12975
  value: filterValue ?? "",
@@ -12794,8 +12979,8 @@ var TableFilterButton = ({
12794
12979
  className: "h-10"
12795
12980
  }
12796
12981
  ),
12797
- filterType === "range" && /* @__PURE__ */ jsxs36("div", { className: "flex-row-2 items-center", children: [
12798
- /* @__PURE__ */ jsx58(
12982
+ filterType === "range" && /* @__PURE__ */ jsxs38("div", { className: "flex-row-2 items-center", children: [
12983
+ /* @__PURE__ */ jsx59(
12799
12984
  Input,
12800
12985
  {
12801
12986
  value: filterValue?.[0] ?? "",
@@ -12808,8 +12993,8 @@ var TableFilterButton = ({
12808
12993
  className: "h-10 input-indicator-hidden w-40"
12809
12994
  }
12810
12995
  ),
12811
- /* @__PURE__ */ jsx58("span", { className: "font-bold", children: "-" }),
12812
- /* @__PURE__ */ jsx58(
12996
+ /* @__PURE__ */ jsx59("span", { className: "font-bold", children: "-" }),
12997
+ /* @__PURE__ */ jsx59(
12813
12998
  Input,
12814
12999
  {
12815
13000
  value: filterValue?.[1] ?? "",
@@ -12823,8 +13008,8 @@ var TableFilterButton = ({
12823
13008
  }
12824
13009
  )
12825
13010
  ] }),
12826
- filterType === "dateRange" && /* @__PURE__ */ jsxs36(Fragment7, { children: [
12827
- /* @__PURE__ */ jsx58(
13011
+ filterType === "dateRange" && /* @__PURE__ */ jsxs38(Fragment7, { children: [
13012
+ /* @__PURE__ */ jsx59(
12828
13013
  Input,
12829
13014
  {
12830
13015
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -12837,7 +13022,7 @@ var TableFilterButton = ({
12837
13022
  className: "h-10 w-50"
12838
13023
  }
12839
13024
  ),
12840
- /* @__PURE__ */ jsx58(
13025
+ /* @__PURE__ */ jsx59(
12841
13026
  Input,
12842
13027
  {
12843
13028
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -12851,12 +13036,12 @@ var TableFilterButton = ({
12851
13036
  }
12852
13037
  )
12853
13038
  ] }),
12854
- /* @__PURE__ */ jsxs36("div", { className: "flex-row-2 justify-end w-full", children: [
12855
- hasFilter && /* @__PURE__ */ jsx58(Button, { color: "negative", size: "small", onClick: () => {
13039
+ /* @__PURE__ */ jsxs38("div", { className: "flex-row-2 justify-end w-full", children: [
13040
+ hasFilter && /* @__PURE__ */ jsx59(Button, { color: "negative", size: "small", onClick: () => {
12856
13041
  column.setFilterValue(void 0);
12857
13042
  close();
12858
13043
  }, children: translation("remove") }),
12859
- /* @__PURE__ */ jsx58(Button, { size: "small", onClick: () => {
13044
+ /* @__PURE__ */ jsx59(Button, { size: "small", onClick: () => {
12860
13045
  column.setFilterValue(filterValue);
12861
13046
  close();
12862
13047
  }, children: translation("apply") })
@@ -12867,7 +13052,7 @@ var TableFilterButton = ({
12867
13052
  };
12868
13053
 
12869
13054
  // src/components/table/Table.tsx
12870
- import { jsx as jsx59, jsxs as jsxs37 } from "react/jsx-runtime";
13055
+ import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
12871
13056
  var Table = ({
12872
13057
  data,
12873
13058
  fillerRow,
@@ -12881,21 +13066,21 @@ var Table = ({
12881
13066
  columns,
12882
13067
  ...tableOptions
12883
13068
  }) => {
12884
- const ref = useRef13(null);
12885
- const tableRef = useRef13(null);
12886
- const [columnSizing, setColumnSizing] = useState26(columns.reduce((previousValue, currentValue) => {
13069
+ const ref = useRef14(null);
13070
+ const tableRef = useRef14(null);
13071
+ const [columnSizing, setColumnSizing] = useState27(columns.reduce((previousValue, currentValue) => {
12887
13072
  return {
12888
13073
  ...previousValue,
12889
13074
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
12890
13075
  };
12891
13076
  }, {}));
12892
- const [columnSizingInfo, setColumnSizingInfo] = useState26();
12893
- const [pagination, setPagination] = useState26({
13077
+ const [columnSizingInfo, setColumnSizingInfo] = useState27();
13078
+ const [pagination, setPagination] = useState27({
12894
13079
  pageSize: 10,
12895
13080
  pageIndex: 0,
12896
13081
  ...initialState?.pagination
12897
13082
  });
12898
- const [columnFilters, setColumnFilters] = useState26(initialState?.columnFilters);
13083
+ const [columnFilters, setColumnFilters] = useState27(initialState?.columnFilters);
12899
13084
  const computedColumnMinWidths = useMemo7(() => {
12900
13085
  return columns.reduce((previousValue, column) => {
12901
13086
  return {
@@ -12987,7 +13172,7 @@ var Table = ({
12987
13172
  minSize: 60,
12988
13173
  maxSize: 700,
12989
13174
  cell: ({ cell }) => {
12990
- return /* @__PURE__ */ jsx59(TableCell, { children: cell.getValue() });
13175
+ return /* @__PURE__ */ jsx60(TableCell, { children: cell.getValue() });
12991
13176
  },
12992
13177
  ...defaultColumn
12993
13178
  },
@@ -13035,7 +13220,7 @@ var Table = ({
13035
13220
  columnResizeMode: "onChange",
13036
13221
  ...tableOptions
13037
13222
  });
13038
- const [hasInitializedSizing, setHasInitializedSizing] = useState26(false);
13223
+ const [hasInitializedSizing, setHasInitializedSizing] = useState27(false);
13039
13224
  useEffect27(() => {
13040
13225
  if (!hasInitializedSizing && ref.current) {
13041
13226
  setHasInitializedSizing(true);
@@ -13072,8 +13257,8 @@ var Table = ({
13072
13257
  }
13073
13258
  return colSizes;
13074
13259
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
13075
- return /* @__PURE__ */ jsxs37("div", { ref, className: clsx48("flex-col-4", className), children: [
13076
- /* @__PURE__ */ jsx59("div", { className: clsx48("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ jsxs37(
13260
+ return /* @__PURE__ */ jsxs39("div", { ref, className: clsx48("flex-col-4", className), children: [
13261
+ /* @__PURE__ */ jsx60("div", { className: clsx48("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ jsxs39(
13077
13262
  "table",
13078
13263
  {
13079
13264
  ref: tableRef,
@@ -13083,7 +13268,7 @@ var Table = ({
13083
13268
  width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
13084
13269
  },
13085
13270
  children: [
13086
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx59(
13271
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx60(
13087
13272
  "col",
13088
13273
  {
13089
13274
  style: {
@@ -13094,18 +13279,22 @@ var Table = ({
13094
13279
  },
13095
13280
  header.id
13096
13281
  )) }, headerGroup.id)),
13097
- /* @__PURE__ */ jsx59("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx59("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13098
- return /* @__PURE__ */ jsxs37(
13282
+ /* @__PURE__ */ jsx60("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx60("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13283
+ return /* @__PURE__ */ jsxs39(
13099
13284
  "th",
13100
13285
  {
13101
13286
  colSpan: header.colSpan,
13102
13287
  className: clsx48("relative group", header.column.columnDef.meta?.className),
13103
13288
  children: [
13104
- /* @__PURE__ */ jsx59("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs37("div", { className: "flex-row-1 items-center", children: [
13105
- header.column.getCanSort() && /* @__PURE__ */ jsx59(
13289
+ /* @__PURE__ */ jsx60("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs39("div", { className: "flex-row-1 items-center", children: [
13290
+ header.column.getCanSort() && /* @__PURE__ */ jsx60(
13106
13291
  TableSortButton,
13107
13292
  {
13108
13293
  sortDirection: header.column.getIsSorted(),
13294
+ sortingIndexDisplay: {
13295
+ index: header.column.getIsSorted() ? header.column.getSortIndex() + 1 : -1,
13296
+ sortingsCount: table.getState().sorting.length
13297
+ },
13109
13298
  onClick: () => {
13110
13299
  const sorted = header.column.getIsSorted();
13111
13300
  const isMulti = header.column.getCanMultiSort();
@@ -13124,7 +13313,7 @@ var Table = ({
13124
13313
  }
13125
13314
  }
13126
13315
  ),
13127
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx59(
13316
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx60(
13128
13317
  TableFilterButton,
13129
13318
  {
13130
13319
  column: header.column,
@@ -13136,7 +13325,7 @@ var Table = ({
13136
13325
  header.getContext()
13137
13326
  )
13138
13327
  ] }) }),
13139
- header.column.getCanResize() && /* @__PURE__ */ jsx59(
13328
+ header.column.getCanResize() && /* @__PURE__ */ jsx60(
13140
13329
  "div",
13141
13330
  {
13142
13331
  onMouseDown: header.getResizeHandler(),
@@ -13155,15 +13344,15 @@ var Table = ({
13155
13344
  header.id
13156
13345
  );
13157
13346
  }) }, headerGroup.id)) }),
13158
- /* @__PURE__ */ jsxs37("tbody", { children: [
13347
+ /* @__PURE__ */ jsxs39("tbody", { children: [
13159
13348
  table.getRowModel().rows.map((row) => {
13160
- return /* @__PURE__ */ jsx59(
13349
+ return /* @__PURE__ */ jsx60(
13161
13350
  "tr",
13162
13351
  {
13163
13352
  onClick: () => onRowClick?.(row, table),
13164
13353
  className: table.options.meta?.bodyRowClassName,
13165
13354
  children: row.getVisibleCells().map((cell) => {
13166
- return /* @__PURE__ */ jsx59("td", { children: flexRender(
13355
+ return /* @__PURE__ */ jsx60("td", { children: flexRender(
13167
13356
  cell.column.columnDef.cell,
13168
13357
  cell.getContext()
13169
13358
  ) }, cell.id);
@@ -13173,15 +13362,15 @@ var Table = ({
13173
13362
  );
13174
13363
  }),
13175
13364
  range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
13176
- return /* @__PURE__ */ jsx59("tr", { children: columns.map((column) => {
13177
- return /* @__PURE__ */ jsx59("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx59(FillerRowElement, {}) }, column.id);
13365
+ return /* @__PURE__ */ jsx60("tr", { children: columns.map((column) => {
13366
+ return /* @__PURE__ */ jsx60("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx60(FillerRowElement, {}) }, column.id);
13178
13367
  }) }, "filler-row-" + index);
13179
13368
  })
13180
13369
  ] })
13181
13370
  ]
13182
13371
  }
13183
13372
  ) }),
13184
- /* @__PURE__ */ jsx59("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx59(
13373
+ /* @__PURE__ */ jsx60("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx60(
13185
13374
  Pagination,
13186
13375
  {
13187
13376
  pageIndex: table.getState().pagination.pageIndex,
@@ -13193,7 +13382,7 @@ var Table = ({
13193
13382
  };
13194
13383
  var TableUncontrolled = ({ data, ...props }) => {
13195
13384
  const [usedDate] = useOverwritableState(data);
13196
- return /* @__PURE__ */ jsx59(
13385
+ return /* @__PURE__ */ jsx60(
13197
13386
  Table,
13198
13387
  {
13199
13388
  ...props,
@@ -13217,7 +13406,7 @@ var TableWithSelection = ({
13217
13406
  {
13218
13407
  id: selectionRowId,
13219
13408
  header: ({ table }) => {
13220
- return /* @__PURE__ */ jsx59(
13409
+ return /* @__PURE__ */ jsx60(
13221
13410
  Checkbox,
13222
13411
  {
13223
13412
  checked: table.getIsAllRowsSelected(),
@@ -13230,7 +13419,7 @@ var TableWithSelection = ({
13230
13419
  );
13231
13420
  },
13232
13421
  cell: ({ row }) => {
13233
- return /* @__PURE__ */ jsx59(
13422
+ return /* @__PURE__ */ jsx60(
13234
13423
  Checkbox,
13235
13424
  {
13236
13425
  disabled: !row.getCanSelect(),
@@ -13248,15 +13437,15 @@ var TableWithSelection = ({
13248
13437
  ...columns
13249
13438
  ];
13250
13439
  }, [columns, selectionRowId]);
13251
- return /* @__PURE__ */ jsx59(
13440
+ return /* @__PURE__ */ jsx60(
13252
13441
  Table,
13253
13442
  {
13254
13443
  columns: columnsWithSelection,
13255
13444
  fillerRow: (columnId, table) => {
13256
13445
  if (columnId === selectionRowId) {
13257
- return /* @__PURE__ */ jsx59(Checkbox, { checked: false, disabled: true, className: "max-w-6" });
13446
+ return /* @__PURE__ */ jsx60(Checkbox, { checked: false, disabled: true, className: "max-w-6" });
13258
13447
  }
13259
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx59(FillerRowElement, {});
13448
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx60(FillerRowElement, {});
13260
13449
  },
13261
13450
  state: {
13262
13451
  rowSelection,
@@ -13281,7 +13470,7 @@ var TableWithSelection = ({
13281
13470
  };
13282
13471
 
13283
13472
  // src/components/user-action/CopyToClipboardWrapper.tsx
13284
- import { useState as useState27 } from "react";
13473
+ import { useState as useState28 } from "react";
13285
13474
  import { clsx as clsx49 } from "clsx";
13286
13475
 
13287
13476
  // src/utils/writeToClipboard.ts
@@ -13291,7 +13480,7 @@ var writeToClipboard = (text) => {
13291
13480
 
13292
13481
  // src/components/user-action/CopyToClipboardWrapper.tsx
13293
13482
  import { CheckIcon as CheckIcon2, Copy } from "lucide-react";
13294
- import { jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
13483
+ import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
13295
13484
  var CopyToClipboardWrapper = ({
13296
13485
  children,
13297
13486
  textToCopy,
@@ -13301,8 +13490,8 @@ var CopyToClipboardWrapper = ({
13301
13490
  zIndex = 10
13302
13491
  }) => {
13303
13492
  const translation = useHightideTranslation();
13304
- const [isShowingIndication, setIsShowingIndication] = useState27(false);
13305
- const [isShowingConfirmation, setIsShowingConfirmation] = useState27(false);
13493
+ const [isShowingIndication, setIsShowingIndication] = useState28(false);
13494
+ const [isShowingConfirmation, setIsShowingConfirmation] = useState28(false);
13306
13495
  const positionClasses = {
13307
13496
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
13308
13497
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -13322,7 +13511,7 @@ var CopyToClipboardWrapper = ({
13322
13511
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13323
13512
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13324
13513
  };
13325
- return /* @__PURE__ */ jsxs38(
13514
+ return /* @__PURE__ */ jsxs40(
13326
13515
  "div",
13327
13516
  {
13328
13517
  className: clsx49("relative inline-block cursor-copy", containerClassName),
@@ -13340,7 +13529,7 @@ var CopyToClipboardWrapper = ({
13340
13529
  },
13341
13530
  children: [
13342
13531
  children,
13343
- /* @__PURE__ */ jsxs38(
13532
+ /* @__PURE__ */ jsxs40(
13344
13533
  "div",
13345
13534
  {
13346
13535
  className: clsx49(
@@ -13355,15 +13544,15 @@ var CopyToClipboardWrapper = ({
13355
13544
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
13356
13545
  },
13357
13546
  children: [
13358
- isShowingConfirmation && /* @__PURE__ */ jsxs38("div", { className: "flex-row-1", children: [
13359
- /* @__PURE__ */ jsx60(CheckIcon2, { size: 16, className: "text-positive" }),
13547
+ isShowingConfirmation && /* @__PURE__ */ jsxs40("div", { className: "flex-row-1", children: [
13548
+ /* @__PURE__ */ jsx61(CheckIcon2, { size: 16, className: "text-positive" }),
13360
13549
  translation("copied")
13361
13550
  ] }),
13362
- isShowingIndication && /* @__PURE__ */ jsxs38("div", { className: "flex-row-1 text-description", children: [
13363
- /* @__PURE__ */ jsx60(Copy, { size: 16 }),
13551
+ isShowingIndication && /* @__PURE__ */ jsxs40("div", { className: "flex-row-1 text-description", children: [
13552
+ /* @__PURE__ */ jsx61(Copy, { size: 16 }),
13364
13553
  translation("clickToCopy")
13365
13554
  ] }),
13366
- /* @__PURE__ */ jsx60(
13555
+ /* @__PURE__ */ jsx61(
13367
13556
  "div",
13368
13557
  {
13369
13558
  className: clsx49(`absolute w-0 h-0`, triangleClasses[position]),
@@ -13380,29 +13569,26 @@ var CopyToClipboardWrapper = ({
13380
13569
 
13381
13570
  // src/components/user-action/DateAndTimePicker.tsx
13382
13571
  import clsx50 from "clsx";
13383
- import { jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
13572
+ import { jsx as jsx62, jsxs as jsxs41 } from "react/jsx-runtime";
13384
13573
  var DateTimePicker = ({
13385
13574
  value = /* @__PURE__ */ new Date(),
13386
13575
  start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
13387
13576
  end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
13388
13577
  mode = "dateTime",
13389
- onFinish,
13390
13578
  onChange,
13391
- onRemove,
13392
13579
  timePickerProps,
13393
13580
  datePickerProps
13394
13581
  }) => {
13395
- const translation = useHightideTranslation();
13396
13582
  const useDate = mode === "dateTime" || mode === "date";
13397
13583
  const useTime = mode === "dateTime" || mode === "time";
13398
13584
  let dateDisplay;
13399
13585
  let timeDisplay;
13400
13586
  if (useDate) {
13401
- dateDisplay = /* @__PURE__ */ jsx61(
13587
+ dateDisplay = /* @__PURE__ */ jsx62(
13402
13588
  DatePicker,
13403
13589
  {
13404
13590
  ...datePickerProps,
13405
- className: "min-w-80 min-h-71 max-h-71",
13591
+ className: "min-w-80",
13406
13592
  yearMonthPickerProps: { className: "h-full grow" },
13407
13593
  value,
13408
13594
  start,
@@ -13412,39 +13598,26 @@ var DateTimePicker = ({
13412
13598
  );
13413
13599
  }
13414
13600
  if (useTime) {
13415
- timeDisplay = /* @__PURE__ */ jsx61(
13601
+ timeDisplay = /* @__PURE__ */ jsx62(
13416
13602
  TimePicker,
13417
13603
  {
13418
13604
  ...timePickerProps,
13419
- className: clsx50("min-h-71 max-h-71", { "justify-between w-full": mode === "time" }),
13605
+ className: clsx50({ "justify-between": mode === "time" }),
13420
13606
  time: value,
13421
13607
  onChange
13422
13608
  }
13423
13609
  );
13424
13610
  }
13425
- return /* @__PURE__ */ jsxs39("div", { className: "flex-col-2 w-fit", children: [
13426
- /* @__PURE__ */ jsxs39("div", { className: "flex-row-4", children: [
13427
- dateDisplay,
13428
- timeDisplay
13429
- ] }),
13430
- /* @__PURE__ */ jsx61("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ jsxs39("div", { className: "flex-row-2 mt-1", children: [
13431
- /* @__PURE__ */ jsx61(Button, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
13432
- /* @__PURE__ */ jsx61(
13433
- Button,
13434
- {
13435
- size: "medium",
13436
- onClick: () => onFinish?.(value),
13437
- children: translation("change")
13438
- }
13439
- )
13440
- ] }) })
13611
+ return /* @__PURE__ */ jsxs41("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
13612
+ dateDisplay,
13613
+ timeDisplay
13441
13614
  ] });
13442
13615
  };
13443
13616
 
13444
13617
  // src/components/user-action/ScrollPicker.tsx
13445
- import { useCallback as useCallback13, useEffect as useEffect28, useState as useState28 } from "react";
13618
+ import { useCallback as useCallback13, useEffect as useEffect28, useState as useState29 } from "react";
13446
13619
  import clsx51 from "clsx";
13447
- import { jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
13620
+ import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
13448
13621
  var up = 1;
13449
13622
  var down = -1;
13450
13623
  var ScrollPicker = ({
@@ -13463,7 +13636,7 @@ var ScrollPicker = ({
13463
13636
  transition,
13464
13637
  items,
13465
13638
  lastTimeStamp
13466
- }, setAnimation] = useState28({
13639
+ }, setAnimation] = useState29({
13467
13640
  targetIndex: selectedIndex,
13468
13641
  currentIndex: disabled ? selectedIndex : 0,
13469
13642
  velocity: 0,
@@ -13583,7 +13756,7 @@ var ScrollPicker = ({
13583
13756
  }
13584
13757
  return clamp(1 - opacityValue / max);
13585
13758
  };
13586
- return /* @__PURE__ */ jsx62(
13759
+ return /* @__PURE__ */ jsx63(
13587
13760
  "div",
13588
13761
  {
13589
13762
  className: "relative overflow-hidden",
@@ -13594,15 +13767,15 @@ var ScrollPicker = ({
13594
13767
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
13595
13768
  }
13596
13769
  },
13597
- children: /* @__PURE__ */ jsxs40("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13598
- /* @__PURE__ */ jsx62(
13770
+ children: /* @__PURE__ */ jsxs42("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13771
+ /* @__PURE__ */ jsx63(
13599
13772
  "div",
13600
13773
  {
13601
13774
  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 ",
13602
13775
  style: { height: `${itemHeight}px` }
13603
13776
  }
13604
13777
  ),
13605
- /* @__PURE__ */ jsx62(
13778
+ /* @__PURE__ */ jsx63(
13606
13779
  "div",
13607
13780
  {
13608
13781
  className: "flex-col-2 select-none",
@@ -13610,7 +13783,7 @@ var ScrollPicker = ({
13610
13783
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
13611
13784
  columnGap: `${distance}px`
13612
13785
  },
13613
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx62(
13786
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx63(
13614
13787
  "div",
13615
13788
  {
13616
13789
  className: clsx51(
@@ -13639,126 +13812,163 @@ var ScrollPicker = ({
13639
13812
  );
13640
13813
  };
13641
13814
 
13642
- // src/components/user-action/SearchBar.tsx
13643
- import { Search } from "lucide-react";
13644
- import { clsx as clsx52 } from "clsx";
13645
- import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
13646
- var SearchBar = ({
13647
- placeholder,
13648
- onSearch,
13649
- disableOnSearch,
13650
- containerClassName,
13651
- ...inputProps
13815
+ // src/components/user-action/input/DateTimeInput.tsx
13816
+ import { useEffect as useEffect29, useMemo as useMemo8, useRef as useRef15, useState as useState30 } from "react";
13817
+ import { CalendarIcon } from "lucide-react";
13818
+ import clsx52 from "clsx";
13819
+ import { Fragment as Fragment8, jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
13820
+ var DateTimeInput = ({
13821
+ date,
13822
+ onValueChange,
13823
+ onEditCompleted,
13824
+ onRemove,
13825
+ containerProps,
13826
+ mode = "date",
13827
+ pickerProps,
13828
+ ...props
13652
13829
  }) => {
13653
13830
  const translation = useHightideTranslation();
13654
- return /* @__PURE__ */ jsxs41("div", { className: clsx52("flex-row-2 justify-between items-center", containerClassName), children: [
13655
- /* @__PURE__ */ jsx63(
13656
- Input,
13657
- {
13658
- ...inputProps,
13659
- placeholder: placeholder ?? translation("search")
13660
- }
13661
- ),
13662
- onSearch && /* @__PURE__ */ jsx63(
13663
- Button,
13831
+ const { locale } = useLocale();
13832
+ const [isOpen, setIsOpen] = useState30(false);
13833
+ const containerRef = useRef15(null);
13834
+ useOutsideClick([containerRef], () => {
13835
+ setIsOpen(false);
13836
+ });
13837
+ const zIndex = useZIndexRegister(isOpen);
13838
+ const isReadOnly = useMemo8(() => props.readOnly || props.disabled, [props.readOnly, props.disabled]);
13839
+ useEffect29(() => {
13840
+ if (isReadOnly) {
13841
+ setIsOpen(false);
13842
+ }
13843
+ }, [isReadOnly]);
13844
+ const cleanInputProps = { ...props };
13845
+ delete cleanInputProps["isShowingError"];
13846
+ delete cleanInputProps["setIsShowingError"];
13847
+ return /* @__PURE__ */ jsxs43(Fragment8, { children: [
13848
+ /* @__PURE__ */ jsxs43("div", { ...containerProps, className: clsx52("relative w-full", containerProps?.className), children: [
13849
+ /* @__PURE__ */ jsx64(
13850
+ Input,
13851
+ {
13852
+ ...cleanInputProps,
13853
+ placeholder: translation("clickToAdd"),
13854
+ value: date ? DateUtils.formatAbsolute(date, locale, mode === "dateTime") : "",
13855
+ onClick: (event) => {
13856
+ setIsOpen(true);
13857
+ cleanInputProps.onClick?.(event);
13858
+ },
13859
+ readOnly: true,
13860
+ className: clsx52(
13861
+ "pr-10 w-full",
13862
+ { "hover:cursor-pointer": !isReadOnly },
13863
+ cleanInputProps.className
13864
+ )
13865
+ }
13866
+ ),
13867
+ /* @__PURE__ */ jsx64(
13868
+ Button,
13869
+ {
13870
+ coloringStyle: "text",
13871
+ layout: "icon",
13872
+ color: "neutral",
13873
+ size: "small",
13874
+ className: "absolute right-1 top-1/2 -translate-y-1/2",
13875
+ disabled: isReadOnly,
13876
+ onClick: () => setIsOpen((prevState) => !prevState),
13877
+ children: /* @__PURE__ */ jsx64(CalendarIcon, { className: "size-5" })
13878
+ }
13879
+ )
13880
+ ] }),
13881
+ /* @__PURE__ */ jsx64(Visibility, { isVisible: isOpen, children: /* @__PURE__ */ jsxs43(
13882
+ "div",
13664
13883
  {
13665
- layout: "icon",
13666
- color: "neutral",
13667
- disabled: disableOnSearch,
13668
- onClick: onSearch,
13669
- children: /* @__PURE__ */ jsx63(Search, { className: "w-full h-full" })
13884
+ ref: containerRef,
13885
+ className: "absolute left-0 flex-col-3 rounded-lg shadow-xl border bg-surface-variant text-on-surface border-divider p-2",
13886
+ style: { zIndex },
13887
+ children: [
13888
+ /* @__PURE__ */ jsx64(
13889
+ DateTimePicker,
13890
+ {
13891
+ ...pickerProps,
13892
+ mode,
13893
+ value: date,
13894
+ onChange: (newDate) => {
13895
+ onValueChange(newDate);
13896
+ }
13897
+ }
13898
+ ),
13899
+ /* @__PURE__ */ jsxs43("div", { className: "flex-row-2 justify-end", children: [
13900
+ /* @__PURE__ */ jsx64(Visibility, { isVisible: !!onRemove, children: /* @__PURE__ */ jsx64(
13901
+ Button,
13902
+ {
13903
+ size: "medium",
13904
+ color: "negative",
13905
+ onClick: () => {
13906
+ onRemove?.();
13907
+ setIsOpen(false);
13908
+ },
13909
+ children: translation("clear")
13910
+ }
13911
+ ) }),
13912
+ /* @__PURE__ */ jsx64(
13913
+ Button,
13914
+ {
13915
+ size: "medium",
13916
+ onClick: () => {
13917
+ onEditCompleted?.(date);
13918
+ setIsOpen(false);
13919
+ },
13920
+ children: translation("change")
13921
+ }
13922
+ )
13923
+ ] })
13924
+ ]
13670
13925
  }
13671
- )
13926
+ ) })
13672
13927
  ] });
13673
13928
  };
13674
-
13675
- // src/components/user-action/Tooltip.tsx
13676
- import { clsx as clsx53 } from "clsx";
13677
- import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
13678
- var Tooltip = ({
13679
- tooltip,
13680
- children,
13681
- animationDelay = 650,
13682
- tooltipClassName = "",
13683
- containerClassName = "",
13684
- position = "bottom"
13929
+ var DateTimeInputUncontrolled = ({
13930
+ date: initialDate,
13931
+ ...props
13685
13932
  }) => {
13686
- const { isHovered, handlers } = useHoverState();
13687
- const positionClasses = {
13688
- top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
13689
- bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
13690
- left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
13691
- right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
13692
- };
13693
- const triangleSize = 6;
13694
- const triangleClasses = {
13695
- top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
13696
- bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
13697
- left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
13698
- right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
13699
- };
13700
- const triangleStyle = {
13701
- top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
13702
- bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
13703
- left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13704
- right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13705
- };
13706
- const zIndex = useZIndexRegister(isHovered);
13707
- return /* @__PURE__ */ jsxs42(
13708
- "div",
13933
+ const [date, setDate] = useOverwritableState(useMemo8(() => initialDate ?? /* @__PURE__ */ new Date(), [initialDate]));
13934
+ return /* @__PURE__ */ jsx64(
13935
+ DateTimeInput,
13709
13936
  {
13710
- className: clsx53("relative inline-block", containerClassName),
13711
- ...handlers,
13712
- children: [
13713
- children,
13714
- isHovered && /* @__PURE__ */ jsxs42(
13715
- "div",
13716
- {
13717
- className: clsx53(
13718
- `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
13719
- animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
13720
- positionClasses[position],
13721
- tooltipClassName
13722
- ),
13723
- style: { zIndex, animationDelay: animationDelay + "ms" },
13724
- children: [
13725
- tooltip,
13726
- /* @__PURE__ */ jsx64(
13727
- "div",
13728
- {
13729
- className: clsx53(`absolute w-0 h-0`, triangleClasses[position]),
13730
- style: { ...triangleStyle[position], zIndex: zIndex + 1 }
13731
- }
13732
- )
13733
- ]
13734
- }
13735
- )
13736
- ]
13937
+ ...props,
13938
+ date,
13939
+ onValueChange: (newDate) => {
13940
+ setDate(newDate);
13941
+ props.onValueChange?.(newDate);
13942
+ },
13943
+ onRemove: () => {
13944
+ setDate(/* @__PURE__ */ new Date());
13945
+ props.onRemove?.();
13946
+ }
13737
13947
  }
13738
13948
  );
13739
13949
  };
13740
13950
 
13741
13951
  // src/components/user-action/input/InsideLabelInput.tsx
13742
13952
  import { useId as useId11 } from "react";
13743
- import { forwardRef as forwardRef9, useState as useState29 } from "react";
13744
- import clsx54 from "clsx";
13745
- import { jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
13953
+ import { forwardRef as forwardRef9, useState as useState31 } from "react";
13954
+ import clsx53 from "clsx";
13955
+ import { jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
13746
13956
  var InsideLabelInput = forwardRef9(function InsideLabelInput2({
13747
13957
  id: customId,
13748
13958
  label,
13749
13959
  ...props
13750
13960
  }, forwardedRef) {
13751
13961
  const { value } = props;
13752
- const [isFocused, setIsFocused] = useState29(false);
13962
+ const [isFocused, setIsFocused] = useState31(false);
13753
13963
  const generatedId = useId11();
13754
13964
  const id = customId ?? generatedId;
13755
- return /* @__PURE__ */ jsxs43("div", { className: clsx54("relative"), children: [
13965
+ return /* @__PURE__ */ jsxs44("div", { className: clsx53("relative"), children: [
13756
13966
  /* @__PURE__ */ jsx65(
13757
13967
  Input,
13758
13968
  {
13759
13969
  ...props,
13760
13970
  id,
13761
- className: clsx54("h-14 px-4 pb-2 py-6.5", props.className),
13971
+ className: clsx53("h-14 px-4 pb-2 py-6.5", props.className),
13762
13972
  ref: forwardedRef,
13763
13973
  "aria-labelledby": id + "-label",
13764
13974
  onFocus: (event) => {
@@ -13777,7 +13987,7 @@ var InsideLabelInput = forwardRef9(function InsideLabelInput2({
13777
13987
  id: id + "-label",
13778
13988
  "aria-hidden": true,
13779
13989
  "data-display": isFocused || !!value ? "small" : "full",
13780
- className: clsx54(
13990
+ className: clsx53(
13781
13991
  // margin left to account for the border which is ignored for absolute positions
13782
13992
  "absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
13783
13993
  "data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
@@ -13803,27 +14013,63 @@ var InsideLabelInputUncontrolled = ({
13803
14013
  );
13804
14014
  };
13805
14015
 
14016
+ // src/components/user-action/input/SearchBar.tsx
14017
+ import { Search } from "lucide-react";
14018
+ import { clsx as clsx54 } from "clsx";
14019
+ import { jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
14020
+ var SearchBar = ({
14021
+ onSearch,
14022
+ searchButtonProps,
14023
+ containerProps,
14024
+ ...inputProps
14025
+ }) => {
14026
+ const translation = useHightideTranslation();
14027
+ return /* @__PURE__ */ jsxs45("div", { ...containerProps, className: clsx54("relative", containerProps?.className), children: [
14028
+ /* @__PURE__ */ jsx66(
14029
+ InputUncontrolled,
14030
+ {
14031
+ ...inputProps,
14032
+ placeholder: inputProps.placeholder ?? translation("search"),
14033
+ className: clsx54("pr-10 w-full", inputProps.className)
14034
+ }
14035
+ ),
14036
+ onSearch && /* @__PURE__ */ jsx66(
14037
+ Button,
14038
+ {
14039
+ ...searchButtonProps,
14040
+ size: "small",
14041
+ layout: "icon",
14042
+ color: "neutral",
14043
+ coloringStyle: "text",
14044
+ onClick: (event) => onSearch(event),
14045
+ className: clsx54("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
14046
+ children: /* @__PURE__ */ jsx66(Search, { className: "w-full h-full" })
14047
+ }
14048
+ )
14049
+ ] });
14050
+ };
14051
+
13806
14052
  // src/components/user-action/input/ToggleableInput.tsx
13807
- import { forwardRef as forwardRef10, useEffect as useEffect29, useImperativeHandle as useImperativeHandle4, useRef as useRef14, useState as useState30 } from "react";
14053
+ import { forwardRef as forwardRef10, useEffect as useEffect30, useImperativeHandle as useImperativeHandle4, useRef as useRef16, useState as useState32 } from "react";
13808
14054
  import { Pencil } from "lucide-react";
13809
14055
  import clsx55 from "clsx";
13810
- import { jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
14056
+ import { jsx as jsx67, jsxs as jsxs46 } from "react/jsx-runtime";
13811
14057
  var ToggleableInput = forwardRef10(function ToggleableInput2({
13812
14058
  value,
13813
14059
  initialState = "display",
13814
14060
  editCompleteOptions,
13815
14061
  ...props
13816
14062
  }, forwardedRef) {
13817
- const [isEditing, setIsEditing] = useState30(initialState !== "display");
13818
- const innerRef = useRef14(null);
14063
+ const [isEditing, setIsEditing] = useState32(initialState !== "display");
14064
+ const innerRef = useRef16(null);
13819
14065
  useImperativeHandle4(forwardedRef, () => innerRef.current);
13820
- useEffect29(() => {
14066
+ useEffect30(() => {
13821
14067
  if (isEditing) {
13822
14068
  innerRef.current?.focus();
13823
14069
  }
13824
14070
  }, [isEditing]);
13825
- return /* @__PURE__ */ jsxs44("div", { className: clsx55("relative flex-row-2", { "flex-1": isEditing }), children: [
13826
- /* @__PURE__ */ jsx66(
14071
+ return /* @__PURE__ */ jsxs46("div", { className: clsx55("relative flex-row-2", { "flex-1": isEditing }), children: [
14072
+ /* @__PURE__ */ jsx67(
13827
14073
  Input,
13828
14074
  {
13829
14075
  ...props,
@@ -13842,16 +14088,16 @@ var ToggleableInput = forwardRef10(function ToggleableInput2({
13842
14088
  ...editCompleteOptions,
13843
14089
  allowEnterComplete: true
13844
14090
  },
13845
- className: clsx55(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {
13846
- "underline": isEditing,
14091
+ "data-name": props["data-name"] ?? "togglable-input",
14092
+ "data-isEditing": isEditing ? "" : void 0,
14093
+ className: clsx55(`w-full rounded-md`, {
13847
14094
  "text-transparent": !isEditing
13848
- }),
13849
- defaultStyle: false
14095
+ })
13850
14096
  }
13851
14097
  ),
13852
- !isEditing && /* @__PURE__ */ jsxs44("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
13853
- /* @__PURE__ */ jsx66("span", { className: clsx55(" truncate"), children: value }),
13854
- /* @__PURE__ */ jsx66(Pencil, { className: clsx55(`size-force-4`, { "text-transparent": isEditing }) })
14098
+ !isEditing && /* @__PURE__ */ jsxs46("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
14099
+ /* @__PURE__ */ jsx67("span", { className: clsx55(" truncate"), children: value }),
14100
+ /* @__PURE__ */ jsx67(Pencil, { className: clsx55(`size-force-4`, { "text-transparent": isEditing }) })
13855
14101
  ] })
13856
14102
  ] });
13857
14103
  });
@@ -13861,7 +14107,7 @@ var ToggleableInputUncontrolled = ({
13861
14107
  ...restProps
13862
14108
  }) => {
13863
14109
  const [value, setValue] = useOverwritableState(initialValue, onChangeText);
13864
- return /* @__PURE__ */ jsx66(
14110
+ return /* @__PURE__ */ jsx67(
13865
14111
  ToggleableInput,
13866
14112
  {
13867
14113
  value,
@@ -13872,33 +14118,33 @@ var ToggleableInputUncontrolled = ({
13872
14118
  };
13873
14119
 
13874
14120
  // src/components/utils/FocusTrap.tsx
13875
- import { useRef as useRef15 } from "react";
14121
+ import { useRef as useRef17 } from "react";
13876
14122
  import { useImperativeHandle as useImperativeHandle5 } from "react";
13877
14123
  import { forwardRef as forwardRef11 } from "react";
13878
- import { jsx as jsx67 } from "react/jsx-runtime";
14124
+ import { jsx as jsx68 } from "react/jsx-runtime";
13879
14125
  var FocusTrap = forwardRef11(function FocusTrap2({
13880
14126
  active = true,
13881
14127
  initialFocus,
13882
14128
  focusFirst = false,
13883
14129
  ...props
13884
14130
  }, forwardedRef) {
13885
- const innerRef = useRef15(null);
14131
+ const innerRef = useRef17(null);
13886
14132
  useImperativeHandle5(forwardedRef, () => innerRef.current);
13887
14133
  useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
13888
- return /* @__PURE__ */ jsx67("div", { ref: innerRef, ...props });
14134
+ return /* @__PURE__ */ jsx68("div", { ref: innerRef, ...props });
13889
14135
  });
13890
14136
 
13891
14137
  // src/components/utils/Transition.tsx
13892
- import { useEffect as useEffect30, useState as useState31 } from "react";
14138
+ import { useEffect as useEffect31, useState as useState33 } from "react";
13893
14139
  function Transition({
13894
14140
  children,
13895
14141
  show,
13896
14142
  includeAnimation = true
13897
14143
  }) {
13898
- const [isOpen, setIsOpen] = useState31(show);
13899
- const [isTransitioning, setIsTransitioning] = useState31(!isOpen);
14144
+ const [isOpen, setIsOpen] = useState33(show);
14145
+ const [isTransitioning, setIsTransitioning] = useState33(!isOpen);
13900
14146
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
13901
- useEffect30(() => {
14147
+ useEffect31(() => {
13902
14148
  setIsOpen(show);
13903
14149
  setIsTransitioning(true);
13904
14150
  }, [show]);
@@ -13923,7 +14169,7 @@ function Transition({
13923
14169
  }
13924
14170
 
13925
14171
  // src/hooks/focus/useFocusGuards.ts
13926
- import { useEffect as useEffect31 } from "react";
14172
+ import { useEffect as useEffect32 } from "react";
13927
14173
  var selectorName = "data-hw-focus-guard";
13928
14174
  function FocusGuard() {
13929
14175
  const element = document.createElement("div");
@@ -13961,7 +14207,7 @@ var FocusGuardsService = class _FocusGuardsService {
13961
14207
  }
13962
14208
  };
13963
14209
  var useFocusGuards = () => {
13964
- useEffect31(() => {
14210
+ useEffect32(() => {
13965
14211
  FocusGuardsService.getInstance().add();
13966
14212
  return () => {
13967
14213
  FocusGuardsService.getInstance().remove();
@@ -13970,10 +14216,10 @@ var useFocusGuards = () => {
13970
14216
  };
13971
14217
 
13972
14218
  // src/hooks/focus/useFocusOnceVisible.ts
13973
- import React6, { useEffect as useEffect32 } from "react";
14219
+ import React6, { useEffect as useEffect33 } from "react";
13974
14220
  var useFocusOnceVisible = (ref, disable = false) => {
13975
14221
  const [hasUsedFocus, setHasUsedFocus] = React6.useState(false);
13976
- useEffect32(() => {
14222
+ useEffect33(() => {
13977
14223
  if (disable || hasUsedFocus) {
13978
14224
  return;
13979
14225
  }
@@ -13999,7 +14245,7 @@ var useRerender = () => {
13999
14245
  };
14000
14246
 
14001
14247
  // src/hooks/useSearch.ts
14002
- import { useCallback as useCallback14, useEffect as useEffect33, useMemo as useMemo8, useState as useState32 } from "react";
14248
+ import { useCallback as useCallback14, useEffect as useEffect34, useMemo as useMemo9, useState as useState34 } from "react";
14003
14249
 
14004
14250
  // src/utils/simpleSearch.ts
14005
14251
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -14038,9 +14284,9 @@ var useSearch = ({
14038
14284
  filter,
14039
14285
  disabled = false
14040
14286
  }) => {
14041
- const [search, setSearch] = useState32(initialSearch ?? "");
14042
- const [result, setResult] = useState32(list);
14043
- const searchTags = useMemo8(() => additionalSearchTags ?? [], [additionalSearchTags]);
14287
+ const [search, setSearch] = useState34(initialSearch ?? "");
14288
+ const [result, setResult] = useState34(list);
14289
+ const searchTags = useMemo9(() => additionalSearchTags ?? [], [additionalSearchTags]);
14044
14290
  const updateSearch = useCallback14((newSearch) => {
14045
14291
  const usedSearch = newSearch ?? search;
14046
14292
  if (newSearch) {
@@ -14048,24 +14294,24 @@ var useSearch = ({
14048
14294
  }
14049
14295
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
14050
14296
  }, [searchTags, list, search, searchMapping]);
14051
- useEffect33(() => {
14297
+ useEffect34(() => {
14052
14298
  if (isSearchInstant) {
14053
14299
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
14054
14300
  }
14055
14301
  }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
14056
- const filteredResult = useMemo8(() => {
14302
+ const filteredResult = useMemo9(() => {
14057
14303
  if (!filter) {
14058
14304
  return result;
14059
14305
  }
14060
14306
  return result.filter(filter);
14061
14307
  }, [result, filter]);
14062
- const sortedAndFilteredResult = useMemo8(() => {
14308
+ const sortedAndFilteredResult = useMemo9(() => {
14063
14309
  if (!sortingFunction) {
14064
14310
  return filteredResult;
14065
14311
  }
14066
14312
  return filteredResult.sort(sortingFunction);
14067
14313
  }, [filteredResult, sortingFunction]);
14068
- const usedResult = useMemo8(() => {
14314
+ const usedResult = useMemo9(() => {
14069
14315
  if (!disabled) {
14070
14316
  return sortedAndFilteredResult;
14071
14317
  }
@@ -14175,6 +14421,106 @@ var builder = (value, update) => {
14175
14421
  return value;
14176
14422
  };
14177
14423
 
14424
+ // src/utils/duration.ts
14425
+ var Duration = class _Duration {
14426
+ constructor({
14427
+ years = 0,
14428
+ months = 0,
14429
+ days = 0,
14430
+ hours = 0,
14431
+ minutes = 0,
14432
+ seconds = 0,
14433
+ milliseconds = 0
14434
+ } = {}) {
14435
+ this.assertRanges({ years, months, days, hours, minutes, seconds, milliseconds });
14436
+ this.years = years;
14437
+ this.months = months;
14438
+ this.days = days;
14439
+ this.hours = hours;
14440
+ this.minutes = minutes;
14441
+ this.seconds = seconds;
14442
+ this.milliseconds = milliseconds;
14443
+ }
14444
+ /** Date arithmetic */
14445
+ addTo(date) {
14446
+ return this.applyTo(date, 1);
14447
+ }
14448
+ subtractFrom(date) {
14449
+ return this.applyTo(date, -1);
14450
+ }
14451
+ /** Duration arithmetic */
14452
+ add(other) {
14453
+ return new _Duration({
14454
+ years: this.years + other.years,
14455
+ months: this.months + other.months,
14456
+ days: this.days + other.days,
14457
+ hours: this.hours + other.hours,
14458
+ minutes: this.minutes + other.minutes,
14459
+ seconds: this.seconds + other.seconds,
14460
+ milliseconds: this.milliseconds + other.milliseconds
14461
+ });
14462
+ }
14463
+ subtract(other) {
14464
+ return new _Duration({
14465
+ years: this.years - other.years,
14466
+ months: this.months - other.months,
14467
+ days: this.days - other.days,
14468
+ hours: this.hours - other.hours,
14469
+ minutes: this.minutes - other.minutes,
14470
+ seconds: this.seconds - other.seconds,
14471
+ milliseconds: this.milliseconds - other.milliseconds
14472
+ });
14473
+ }
14474
+ equals(other) {
14475
+ return this.years === other.years && this.months === other.months && this.days === other.days && this.hours === other.hours && this.minutes === other.minutes && this.seconds === other.seconds && this.milliseconds === other.milliseconds;
14476
+ }
14477
+ toJSON() {
14478
+ return { ...this };
14479
+ }
14480
+ /** Static difference */
14481
+ static difference(start, end) {
14482
+ const diff = end.getTime() - start.getTime();
14483
+ const ms = 1e3;
14484
+ const min = 60 * ms;
14485
+ const hr = 60 * min;
14486
+ const day = 24 * hr;
14487
+ const month = 30 * day;
14488
+ const year = 365.25 * day;
14489
+ return new _Duration({
14490
+ years: Math.floor(diff / year),
14491
+ months: Math.floor(diff / month),
14492
+ days: Math.floor(diff / day),
14493
+ hours: Math.floor(diff % day / hr),
14494
+ minutes: Math.floor(diff % hr / min),
14495
+ seconds: Math.floor(diff % min / ms),
14496
+ milliseconds: diff % ms
14497
+ });
14498
+ }
14499
+ applyTo(date, multiplier) {
14500
+ const d = new Date(date);
14501
+ d.setFullYear(d.getFullYear() + multiplier * this.years);
14502
+ d.setMonth(d.getMonth() + multiplier * this.months);
14503
+ d.setDate(d.getDate() + multiplier * this.days);
14504
+ d.setHours(d.getHours() + multiplier * this.hours);
14505
+ d.setMinutes(d.getMinutes() + multiplier * this.minutes);
14506
+ d.setSeconds(d.getSeconds() + multiplier * this.seconds);
14507
+ d.setMilliseconds(d.getMilliseconds() + multiplier * this.milliseconds);
14508
+ return d;
14509
+ }
14510
+ assertRanges(d) {
14511
+ if (d.years < 0) throw new RangeError("years >= 0");
14512
+ if (d.months < 0 || d.months > 11) throw new RangeError("months: 0\u201311");
14513
+ if (d.days < 0) throw new RangeError("days >= 0");
14514
+ if (d.hours < 0 || d.hours > 23) throw new RangeError("hours: 0\u201323");
14515
+ if (d.minutes < 0 || d.minutes > 59) throw new RangeError("minutes: 0\u201359");
14516
+ if (d.seconds < 0 || d.seconds > 59) throw new RangeError("seconds: 0\u201359");
14517
+ if (d.milliseconds < 0) throw new RangeError("milliseconds >= 0");
14518
+ }
14519
+ valueOf() {
14520
+ return this.milliseconds + this.seconds * 1e3 + this.minutes * 6e4 + this.hours * 36e5 + this.days * 864e5;
14521
+ }
14522
+ };
14523
+
14178
14524
  // src/utils/easeFunctions.ts
14179
14525
  var EaseFunctions = class _EaseFunctions {
14180
14526
  static cubicBezierGeneric(x1, y1, x2, y2) {
@@ -14312,12 +14658,16 @@ export {
14312
14658
  DatePicker,
14313
14659
  DatePickerUncontrolled,
14314
14660
  DateProperty,
14661
+ DateTimeInput,
14662
+ DateTimeInputUncontrolled,
14315
14663
  DateTimePicker,
14664
+ DateUtils,
14316
14665
  DayPicker,
14317
14666
  DayPickerUncontrolled,
14318
14667
  Dialog,
14319
14668
  DiscardChangesDialog,
14320
14669
  DividerInserter,
14670
+ Duration,
14321
14671
  EaseFunctions,
14322
14672
  ErrorComponent,
14323
14673
  Expandable,
@@ -14415,6 +14765,7 @@ export {
14415
14765
  Transition,
14416
14766
  UseValidators,
14417
14767
  VerticalDivider,
14768
+ Visibility,
14418
14769
  YearMonthPicker,
14419
14770
  YearMonthPickerUncontrolled,
14420
14771
  addDuration,
@@ -14424,19 +14775,16 @@ export {
14424
14775
  closestMatch,
14425
14776
  createLoopingList,
14426
14777
  createLoopingListWithIndex,
14427
- equalDate,
14428
14778
  equalSizeGroups,
14429
14779
  formatDate,
14430
14780
  formatDateTime,
14431
14781
  getBetweenDuration,
14432
- getDaysInMonth,
14433
14782
  getNeighbours,
14434
14783
  getWeeksForCalenderMonth,
14435
14784
  hightideTranslation,
14436
14785
  hightideTranslationLocales,
14437
14786
  isInTimeSpan,
14438
14787
  match,
14439
- monthsList,
14440
14788
  noop,
14441
14789
  range,
14442
14790
  resolveSetState,
@@ -14466,7 +14814,6 @@ export {
14466
14814
  useTranslatedValidators,
14467
14815
  useZIndexRegister,
14468
14816
  validateEmail,
14469
- weekDayList,
14470
14817
  writeToClipboard
14471
14818
  };
14472
14819
  //# sourceMappingURL=index.mjs.map