@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.js CHANGED
@@ -6262,12 +6262,16 @@ __export(index_exports, {
6262
6262
  DatePicker: () => DatePicker,
6263
6263
  DatePickerUncontrolled: () => DatePickerUncontrolled,
6264
6264
  DateProperty: () => DateProperty,
6265
+ DateTimeInput: () => DateTimeInput,
6266
+ DateTimeInputUncontrolled: () => DateTimeInputUncontrolled,
6265
6267
  DateTimePicker: () => DateTimePicker,
6268
+ DateUtils: () => DateUtils,
6266
6269
  DayPicker: () => DayPicker,
6267
6270
  DayPickerUncontrolled: () => DayPickerUncontrolled,
6268
6271
  Dialog: () => Dialog,
6269
6272
  DiscardChangesDialog: () => DiscardChangesDialog,
6270
6273
  DividerInserter: () => DividerInserter,
6274
+ Duration: () => Duration,
6271
6275
  EaseFunctions: () => EaseFunctions,
6272
6276
  ErrorComponent: () => ErrorComponent,
6273
6277
  Expandable: () => Expandable,
@@ -6365,6 +6369,7 @@ __export(index_exports, {
6365
6369
  Transition: () => Transition,
6366
6370
  UseValidators: () => UseValidators,
6367
6371
  VerticalDivider: () => VerticalDivider,
6372
+ Visibility: () => Visibility,
6368
6373
  YearMonthPicker: () => YearMonthPicker,
6369
6374
  YearMonthPickerUncontrolled: () => YearMonthPickerUncontrolled,
6370
6375
  addDuration: () => addDuration,
@@ -6374,19 +6379,16 @@ __export(index_exports, {
6374
6379
  closestMatch: () => closestMatch,
6375
6380
  createLoopingList: () => createLoopingList,
6376
6381
  createLoopingListWithIndex: () => createLoopingListWithIndex,
6377
- equalDate: () => equalDate,
6378
6382
  equalSizeGroups: () => equalSizeGroups,
6379
6383
  formatDate: () => formatDate,
6380
6384
  formatDateTime: () => formatDateTime,
6381
6385
  getBetweenDuration: () => getBetweenDuration,
6382
- getDaysInMonth: () => getDaysInMonth,
6383
6386
  getNeighbours: () => getNeighbours,
6384
6387
  getWeeksForCalenderMonth: () => getWeeksForCalenderMonth,
6385
6388
  hightideTranslation: () => hightideTranslation,
6386
6389
  hightideTranslationLocales: () => hightideTranslationLocales,
6387
6390
  isInTimeSpan: () => isInTimeSpan,
6388
6391
  match: () => match,
6389
- monthsList: () => monthsList,
6390
6392
  noop: () => noop,
6391
6393
  range: () => range,
6392
6394
  resolveSetState: () => resolveSetState,
@@ -6416,7 +6418,6 @@ __export(index_exports, {
6416
6418
  useTranslatedValidators: () => useTranslatedValidators,
6417
6419
  useZIndexRegister: () => useZIndexRegister,
6418
6420
  validateEmail: () => validateEmail,
6419
- weekDayList: () => weekDayList,
6420
6421
  writeToClipboard: () => writeToClipboard
6421
6422
  });
6422
6423
  module.exports = __toCommonJS(index_exports);
@@ -6674,10 +6675,6 @@ var formatDateTime = (date) => {
6674
6675
  const minutes = date.getMinutes().toString().padStart(2, "0");
6675
6676
  return `${dateString}T${hours}:${minutes}`;
6676
6677
  };
6677
- var getDaysInMonth = (year, month) => {
6678
- const lastDayOfMonth = new Date(year, month + 1, 0);
6679
- return lastDayOfMonth.getDate();
6680
- };
6681
6678
  var changeDuration = (date, duration, isAdding) => {
6682
6679
  const {
6683
6680
  years = 0,
@@ -6787,6 +6784,51 @@ var getWeeksForCalenderMonth = (date, weekStart, weeks = 6) => {
6787
6784
  }
6788
6785
  return equalSizeGroups(dayList, 7);
6789
6786
  };
6787
+ var formatGerman = (date, showTime) => {
6788
+ const d = new Intl.DateTimeFormat("de-DE", {
6789
+ day: "2-digit",
6790
+ month: "2-digit",
6791
+ year: "numeric"
6792
+ }).format(date);
6793
+ if (!showTime) return d;
6794
+ const t = new Intl.DateTimeFormat("de-DE", {
6795
+ hour: "2-digit",
6796
+ minute: "2-digit"
6797
+ }).format(date);
6798
+ return `${d} um ${t} Uhr`;
6799
+ };
6800
+ var formatAbsolute = (date, locale, showTime) => {
6801
+ if (locale === "de-DE") {
6802
+ return formatGerman(date, showTime);
6803
+ }
6804
+ const options = {
6805
+ year: "numeric",
6806
+ month: "numeric",
6807
+ day: "numeric"
6808
+ };
6809
+ if (showTime) {
6810
+ options.hour = "numeric";
6811
+ options.minute = "numeric";
6812
+ }
6813
+ return new Intl.DateTimeFormat(locale, options).format(date);
6814
+ };
6815
+ var formatRelative = (date, locale, showTime) => {
6816
+ const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
6817
+ const now = /* @__PURE__ */ new Date();
6818
+ const diffInSeconds = (date.getTime() - now.getTime()) / 1e3;
6819
+ if (Math.abs(diffInSeconds) < 60) return rtf.format(Math.round(diffInSeconds), "second");
6820
+ if (Math.abs(diffInSeconds) < 3600) return rtf.format(Math.round(diffInSeconds / 60), "minute");
6821
+ if (Math.abs(diffInSeconds) < 86400) return rtf.format(Math.round(diffInSeconds / 3600), "hour");
6822
+ if (Math.abs(diffInSeconds) < 604800) return rtf.format(Math.round(diffInSeconds / 86400), "day");
6823
+ return formatAbsolute(date, locale, showTime);
6824
+ };
6825
+ var DateUtils = {
6826
+ monthsList,
6827
+ weekDayList,
6828
+ equalDate,
6829
+ formatAbsolute,
6830
+ formatRelative
6831
+ };
6790
6832
 
6791
6833
  // src/components/date/DatePicker.tsx
6792
6834
  var import_clsx7 = __toESM(require("clsx"));
@@ -6969,6 +7011,16 @@ var hightideTranslation = {
6969
7011
  "remove": `Entfernen`,
6970
7012
  "required": `Erforderlich`,
6971
7013
  "reset": `Zur\xFCcksetzen`,
7014
+ "rSortingOrderAfter": ({ otherSortings }) => {
7015
+ let _out = "";
7016
+ _out += `Angewendet `;
7017
+ _out += import_internationalization.TranslationGen.resolvePlural(otherSortings, {
7018
+ "=0": `als prim\xE4re Sortierung`,
7019
+ "=1": `nach ${otherSortings} anderen Sortierung`,
7020
+ "other": `nach ${otherSortings} anderen Sortierungen`
7021
+ });
7022
+ return _out;
7023
+ },
6972
7024
  "save": `Speichern`,
6973
7025
  "saved": `Gespeichert`,
6974
7026
  "search": `Suche`,
@@ -7205,6 +7257,16 @@ var hightideTranslation = {
7205
7257
  "remove": `Remove`,
7206
7258
  "required": `Required`,
7207
7259
  "reset": `Reset`,
7260
+ "rSortingOrderAfter": ({ otherSortings }) => {
7261
+ let _out = "";
7262
+ _out += `Applied `;
7263
+ _out += import_internationalization.TranslationGen.resolvePlural(otherSortings, {
7264
+ "=0": `as the first sorting`,
7265
+ "=1": `after ${otherSortings} other sorting`,
7266
+ "other": `after ${otherSortings} other sortings`
7267
+ });
7268
+ return _out;
7269
+ },
7208
7270
  "save": `Save`,
7209
7271
  "saved": `Saved`,
7210
7272
  "search": `Search`,
@@ -7491,7 +7553,7 @@ var ButtonUtil = {
7491
7553
  warning: "warning",
7492
7554
  negative: "negative",
7493
7555
  neutral: "neutral",
7494
- none: ""
7556
+ none: "reset-coloring-variables"
7495
7557
  }
7496
7558
  };
7497
7559
  var Button = (0, import_react4.forwardRef)(function SolidButton({
@@ -7503,6 +7565,7 @@ var Button = (0, import_react4.forwardRef)(function SolidButton({
7503
7565
  startIcon,
7504
7566
  endIcon,
7505
7567
  disabled,
7568
+ allowClickEventPropagation = false,
7506
7569
  className,
7507
7570
  ...restProps
7508
7571
  }, ref) {
@@ -7525,6 +7588,12 @@ var Button = (0, import_react4.forwardRef)(function SolidButton({
7525
7588
  paddingMapping[layout][size],
7526
7589
  className
7527
7590
  ),
7591
+ onClick: (event) => {
7592
+ if (!allowClickEventPropagation) {
7593
+ event.stopPropagation();
7594
+ }
7595
+ restProps?.onClick(event);
7596
+ },
7528
7597
  disabled,
7529
7598
  children: [
7530
7599
  startIcon,
@@ -7553,8 +7622,8 @@ var DayPicker = ({
7553
7622
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx4.default)("flex-col-1 min-w-[220px] select-none", className), children: [
7554
7623
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
7555
7624
  weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-row-2 text-center", children: week.map((date) => {
7556
- const isSelected = !!selected && equalDate(selected, date);
7557
- const isToday = equalDate(/* @__PURE__ */ new Date(), date);
7625
+ const isSelected = !!selected && DateUtils.equalDate(selected, date);
7626
+ const isToday = DateUtils.equalDate(/* @__PURE__ */ new Date(), date);
7558
7627
  const isSameMonth = date.getMonth() === month;
7559
7628
  const isDayValid = isInTimeSpan(date, start, end);
7560
7629
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -7754,8 +7823,9 @@ var YearMonthPicker = ({
7754
7823
  label: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: (0, import_clsx6.default)({ "text-primary font-bold": selectedYear }), children: year }),
7755
7824
  isExpanded: showValueOpen && selectedYear,
7756
7825
  contentClassName: "gap-y-1",
7757
- children: equalSizeGroups([...monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-row-1", children: monthList.map((month) => {
7758
- const monthIndex = monthsList.indexOf(month);
7826
+ contentExpandedClassName: "!p-2",
7827
+ children: equalSizeGroups([...DateUtils.monthsList], 3).map((monthList, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-row-1", children: monthList.map((month) => {
7828
+ const monthIndex = DateUtils.monthsList.indexOf(month);
7759
7829
  const newDate = new Date(year, monthIndex);
7760
7830
  const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth();
7761
7831
  const firstOfMonth = new Date(year, monthIndex, 1);
@@ -8054,7 +8124,7 @@ var TimePicker = ({
8054
8124
  transformer(newDate);
8055
8125
  onChange?.(newDate);
8056
8126
  };
8057
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_clsx8.default)("flex-row-2 w-fit min-w-[150px] select-none overflow-hidden", className), children: [
8127
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_clsx8.default)("flex-row-2 select-none overflow-hidden", className), children: [
8058
8128
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-col-1 h-full overflow-y-auto min-w-16", children: hours.map((hour) => {
8059
8129
  const isSelected = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
8060
8130
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -8633,7 +8703,6 @@ var DiscardChangesDialog = ({
8633
8703
 
8634
8704
  // src/components/user-action/input/Input.tsx
8635
8705
  var import_react18 = require("react");
8636
- var import_clsx11 = __toESM(require("clsx"));
8637
8706
 
8638
8707
  // src/hooks/useDelay.ts
8639
8708
  var import_react16 = require("react");
@@ -8748,8 +8817,6 @@ var Input = (0, import_react18.forwardRef)(function Input2({
8748
8817
  editCompleteOptions,
8749
8818
  disabled = false,
8750
8819
  invalid = false,
8751
- defaultStyle = true,
8752
- className,
8753
8820
  ...props
8754
8821
  }, forwardedRef) {
8755
8822
  const {
@@ -8772,15 +8839,6 @@ var Input = (0, import_react18.forwardRef)(function Input2({
8772
8839
  ref: innerRef,
8773
8840
  value,
8774
8841
  disabled,
8775
- className: defaultStyle ? (0, import_clsx11.default)(
8776
- "px-3 py-2 rounded-md text-sm h-10 border-2 border-transparent focus-style-none",
8777
- {
8778
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
8779
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": !disabled && invalid,
8780
- "bg-disabled-background text-disabled border-disabled-border": disabled
8781
- },
8782
- className
8783
- ) : className,
8784
8842
  onKeyDown: (event) => {
8785
8843
  props.onKeyDown?.(event);
8786
8844
  if (!allowEnterComplete) {
@@ -8809,6 +8867,10 @@ var Input = (0, import_react18.forwardRef)(function Input2({
8809
8867
  });
8810
8868
  onChangeText?.(value2);
8811
8869
  },
8870
+ "data-name": props["data-name"] ?? "input",
8871
+ "data-value": value ? "" : void 0,
8872
+ "data-disabled": disabled ? "" : void 0,
8873
+ "data-invalid": invalid ? "" : void 0,
8812
8874
  "aria-invalid": props["aria-invalid"] ?? invalid,
8813
8875
  "aria-disabled": props["aria-disabled"] ?? disabled
8814
8876
  }
@@ -8849,7 +8911,7 @@ var InputDialog = ({
8849
8911
 
8850
8912
  // src/components/user-action/Select.tsx
8851
8913
  var import_react20 = require("react");
8852
- var import_clsx13 = __toESM(require("clsx"));
8914
+ var import_clsx12 = __toESM(require("clsx"));
8853
8915
 
8854
8916
  // src/utils/match.ts
8855
8917
  var match = (key, values) => {
@@ -8860,7 +8922,7 @@ var match = (key, values) => {
8860
8922
  var import_lucide_react4 = require("lucide-react");
8861
8923
 
8862
8924
  // src/components/layout/Chip.tsx
8863
- var import_clsx12 = __toESM(require("clsx"));
8925
+ var import_clsx11 = __toESM(require("clsx"));
8864
8926
  var import_jsx_runtime16 = require("react/jsx-runtime");
8865
8927
  var chipColors = ButtonUtil.colors;
8866
8928
  var ChipUtil = {
@@ -8880,7 +8942,7 @@ var Chip = ({
8880
8942
  "div",
8881
8943
  {
8882
8944
  ...restProps,
8883
- className: (0, import_clsx12.default)(
8945
+ className: (0, import_clsx11.default)(
8884
8946
  `flex-row-0 w-fit font-semibold coloring-solid`,
8885
8947
  colorMapping,
8886
8948
  {
@@ -8905,7 +8967,7 @@ var ChipList = ({
8905
8967
  list,
8906
8968
  className = ""
8907
8969
  }) => {
8908
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_clsx12.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8970
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_clsx11.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
8909
8971
  Chip,
8910
8972
  {
8911
8973
  ...value,
@@ -9265,7 +9327,7 @@ var SelectOption = (0, import_react20.forwardRef)(
9265
9327
  "data-highlighted": isHighlighted ? "" : void 0,
9266
9328
  "data-selected": isSelected ? "" : void 0,
9267
9329
  "data-disabled": disabled ? "" : void 0,
9268
- className: (0, import_clsx13.default)(
9330
+ className: (0, import_clsx12.default)(
9269
9331
  "flex-row-1 items-center px-2 py-1 rounded-md",
9270
9332
  "data-highlighted:bg-primary/20",
9271
9333
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -9291,7 +9353,7 @@ var SelectOption = (0, import_react20.forwardRef)(
9291
9353
  iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9292
9354
  import_lucide_react4.CheckIcon,
9293
9355
  {
9294
- className: (0, import_clsx13.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9356
+ className: (0, import_clsx12.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9295
9357
  "aria-hidden": true
9296
9358
  }
9297
9359
  ),
@@ -9299,7 +9361,7 @@ var SelectOption = (0, import_react20.forwardRef)(
9299
9361
  iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9300
9362
  import_lucide_react4.CheckIcon,
9301
9363
  {
9302
- className: (0, import_clsx13.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9364
+ className: (0, import_clsx12.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9303
9365
  "aria-hidden": true
9304
9366
  }
9305
9367
  )
@@ -9347,19 +9409,8 @@ var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ place
9347
9409
  break;
9348
9410
  }
9349
9411
  },
9350
- className: (0, import_clsx13.default)(
9351
- "flex-row-2 items-center justify-between rounded-md px-3 py-2",
9352
- {
9353
- "bg-input-background text-placeholder": !hasValue && !disabled && !invalid,
9354
- "bg-input-background text-input-text": hasValue && !disabled && !invalid,
9355
- "bg-negative/20": !disabled && invalid,
9356
- "text-placeholder": !hasValue && !disabled,
9357
- "text-negative": hasValue && !disabled && invalid,
9358
- "bg-disabled-background text-disabled": disabled
9359
- },
9360
- props.className
9361
- ),
9362
- "data-placeholder": !hasValue ? "" : void 0,
9412
+ "data-name": props["data-name"] ?? "select-button",
9413
+ "data-value": hasValue ? "" : void 0,
9363
9414
  "data-disabled": disabled ? "" : void 0,
9364
9415
  "data-invalid": invalid ? "" : void 0,
9365
9416
  "aria-invalid": invalid,
@@ -9368,21 +9419,11 @@ var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ place
9368
9419
  "aria-expanded": state.isOpen,
9369
9420
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9370
9421
  children: [
9371
- hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_clsx13.default)("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex-row-0", children: [
9422
+ hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_clsx12.default)("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex-row-0", children: [
9372
9423
  label,
9373
9424
  index < state.value.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "," })
9374
9425
  ] }, value)) }) : placeholder ?? translation("clickToSelect"),
9375
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9376
- ExpansionIcon,
9377
- {
9378
- isExpanded: state.isOpen,
9379
- className: (0, import_clsx13.default)({
9380
- "text-input-text": !disabled && !invalid,
9381
- "text-negative": !disabled && invalid,
9382
- "text-disabled": disabled
9383
- })
9384
- }
9385
- )
9426
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ExpansionIcon, { isExpanded: state.isOpen })
9386
9427
  ]
9387
9428
  }
9388
9429
  );
@@ -9403,10 +9444,12 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9403
9444
  {
9404
9445
  ...props,
9405
9446
  ref: innerRef,
9406
- className: (0, import_clsx13.default)(
9407
- "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
9408
- props.className
9409
- ),
9447
+ onClick: (event) => {
9448
+ toggleOpen();
9449
+ props.onClick?.(event);
9450
+ },
9451
+ "data-name": props["data-name"] ?? "select-button-chips",
9452
+ "data-value": state.value.length > 0 ? "" : void 0,
9410
9453
  "data-disabled": disabled ? "" : void 0,
9411
9454
  "data-invalid": invalid ? "" : void 0,
9412
9455
  "aria-invalid": invalid,
@@ -9420,11 +9463,11 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9420
9463
  onClick: () => {
9421
9464
  item.toggleSelection(value, false);
9422
9465
  },
9423
- size: "none",
9466
+ size: "tiny",
9424
9467
  color: "negative",
9425
9468
  coloringStyle: "text",
9426
- className: "flex-row-0 items-center px-0.5 py-0.5 w-6 h-6 rounded",
9427
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.XIcon, { className: "w-5 h-5" })
9469
+ className: "flex-row-0 items-center",
9470
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.XIcon, { className: "size-5" })
9428
9471
  }
9429
9472
  )
9430
9473
  ] }, value)),
@@ -9432,7 +9475,10 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9432
9475
  Button,
9433
9476
  {
9434
9477
  id: state.id,
9435
- onClick: () => toggleOpen(),
9478
+ onClick: (event) => {
9479
+ event.stopPropagation();
9480
+ toggleOpen();
9481
+ },
9436
9482
  onKeyDown: (event) => {
9437
9483
  switch (event.key) {
9438
9484
  case "ArrowDown":
@@ -9450,6 +9496,7 @@ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDispla
9450
9496
  "aria-haspopup": "listbox",
9451
9497
  "aria-expanded": state.isOpen,
9452
9498
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9499
+ className: "size-9",
9453
9500
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.Plus, {})
9454
9501
  }
9455
9502
  )
@@ -9483,7 +9530,7 @@ var SelectContent = (0, import_react20.forwardRef)(
9483
9530
  "div",
9484
9531
  {
9485
9532
  id: `select-container-${state.id}`,
9486
- className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen", containerClassName),
9533
+ className: (0, import_clsx12.default)("fixed inset-0 w-screen h-screen", containerClassName),
9487
9534
  style: { zIndex },
9488
9535
  hidden: !state.isOpen,
9489
9536
  children: [
@@ -9492,7 +9539,7 @@ var SelectContent = (0, import_react20.forwardRef)(
9492
9539
  {
9493
9540
  id: `select-background-${state.id}`,
9494
9541
  onClick: () => trigger.toggleOpen(false),
9495
- className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen")
9542
+ className: (0, import_clsx12.default)("fixed inset-0 w-screen h-screen")
9496
9543
  }
9497
9544
  ),
9498
9545
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -9541,7 +9588,7 @@ var SelectContent = (0, import_react20.forwardRef)(
9541
9588
  break;
9542
9589
  }
9543
9590
  },
9544
- className: (0, import_clsx13.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
9591
+ className: (0, import_clsx12.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-outline-within overflow-auto", props.className),
9545
9592
  style: {
9546
9593
  opacity: position ? void 0 : 0,
9547
9594
  position: "fixed",
@@ -9691,7 +9738,7 @@ var LanguageDialog = ({
9691
9738
 
9692
9739
  // src/components/dialog/ThemeDialog.tsx
9693
9740
  var import_lucide_react5 = require("lucide-react");
9694
- var import_clsx14 = __toESM(require("clsx"));
9741
+ var import_clsx13 = __toESM(require("clsx"));
9695
9742
 
9696
9743
  // src/theming/useTheme.tsx
9697
9744
  var import_react21 = require("react");
@@ -9781,11 +9828,11 @@ var useTheme = () => {
9781
9828
  var import_jsx_runtime20 = require("react/jsx-runtime");
9782
9829
  var ThemeIcon = ({ theme, className }) => {
9783
9830
  if (theme === "dark") {
9784
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MoonIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9831
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MoonIcon, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9785
9832
  } else if (theme === "light") {
9786
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.SunIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9833
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.SunIcon, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9787
9834
  } else {
9788
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MonitorCog, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9835
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MonitorCog, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9789
9836
  }
9790
9837
  };
9791
9838
  var ThemeDialog = ({
@@ -9831,10 +9878,10 @@ var ThemeDialog = ({
9831
9878
 
9832
9879
  // src/components/form/FormElementWrapper.tsx
9833
9880
  var import_react22 = require("react");
9834
- var import_clsx16 = require("clsx");
9881
+ var import_clsx15 = require("clsx");
9835
9882
 
9836
9883
  // src/components/user-action/Label.tsx
9837
- var import_clsx15 = __toESM(require("clsx"));
9884
+ var import_clsx14 = __toESM(require("clsx"));
9838
9885
  var import_jsx_runtime21 = require("react/jsx-runtime");
9839
9886
  var styleMapping = {
9840
9887
  md: "typography-label-md color-label-text",
@@ -9846,7 +9893,7 @@ var Label = ({
9846
9893
  className,
9847
9894
  ...props
9848
9895
  }) => {
9849
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...props, className: (0, import_clsx15.default)(styleMapping[size], className), children });
9896
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...props, className: (0, import_clsx14.default)(styleMapping[size], className), children });
9850
9897
  };
9851
9898
 
9852
9899
  // src/components/form/FormElementWrapper.tsx
@@ -9897,7 +9944,7 @@ var FormElementWrapper = ({
9897
9944
  "aria-invalid": !!error,
9898
9945
  "aria-errormessage": error ? errorId : void 0
9899
9946
  };
9900
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx16.clsx)("relative flex flex-col gap-y-1", containerClassName), children: [
9947
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx15.clsx)("relative flex flex-col gap-y-1", containerClassName), children: [
9901
9948
  label && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
9902
9949
  Label,
9903
9950
  {
@@ -9905,7 +9952,7 @@ var FormElementWrapper = ({
9905
9952
  id: labelId,
9906
9953
  htmlFor: usedId,
9907
9954
  size: "lg",
9908
- className: (0, import_clsx16.clsx)("flex-row-1 items-start", labelProps?.className),
9955
+ className: (0, import_clsx15.clsx)("flex-row-1 items-start", labelProps?.className),
9909
9956
  children: [
9910
9957
  label,
9911
9958
  required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { role: "none", className: "bg-primary w-2 h-2 rounded-full" })
@@ -9917,7 +9964,7 @@ var FormElementWrapper = ({
9917
9964
  {
9918
9965
  ...descriptionProps,
9919
9966
  id: descriptionId,
9920
- className: (0, import_clsx16.clsx)("text-description text-sm", descriptionProps?.className),
9967
+ className: (0, import_clsx15.clsx)("text-description text-sm", descriptionProps?.className),
9921
9968
  children: description
9922
9969
  }
9923
9970
  ),
@@ -9927,7 +9974,7 @@ var FormElementWrapper = ({
9927
9974
  {
9928
9975
  ...errorProps,
9929
9976
  id: errorId,
9930
- className: (0, import_clsx16.clsx)("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
9977
+ className: (0, import_clsx15.clsx)("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
9931
9978
  role: "alert",
9932
9979
  "aria-hidden": !error,
9933
9980
  "aria-live": "polite",
@@ -9938,7 +9985,7 @@ var FormElementWrapper = ({
9938
9985
  };
9939
9986
 
9940
9987
  // src/components/icons-and-geometry/Avatar.tsx
9941
- var import_clsx17 = __toESM(require("clsx"));
9988
+ var import_clsx16 = __toESM(require("clsx"));
9942
9989
  var import_react23 = require("react");
9943
9990
  var import_lucide_react6 = require("lucide-react");
9944
9991
  var import_jsx_runtime23 = require("react/jsx-runtime");
@@ -9988,7 +10035,7 @@ var Avatar = ({
9988
10035
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
9989
10036
  "div",
9990
10037
  {
9991
- className: (0, import_clsx17.default)(
10038
+ className: (0, import_clsx16.default)(
9992
10039
  `relative flex-row-0 items-center justify-center bg-primary text-on-primary`,
9993
10040
  rounding,
9994
10041
  className
@@ -10000,7 +10047,7 @@ var Avatar = ({
10000
10047
  {
10001
10048
  src: image?.avatarUrl,
10002
10049
  alt: image?.alt,
10003
- className: (0, import_clsx17.default)(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
10050
+ className: (0, import_clsx16.default)(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
10004
10051
  onLoad: () => setIsLoaded(true),
10005
10052
  onError: () => setHasError(true)
10006
10053
  }
@@ -10034,7 +10081,7 @@ var AvatarGroup = ({
10034
10081
  ...avatar,
10035
10082
  size,
10036
10083
  fullyRounded,
10037
- className: (0, import_clsx17.default)("shadow-side shadow-r-4 shadow-hard", avatar.className)
10084
+ className: (0, import_clsx16.default)("shadow-side shadow-r-4 shadow-hard", avatar.className)
10038
10085
  }
10039
10086
  )
10040
10087
  },
@@ -10043,7 +10090,7 @@ var AvatarGroup = ({
10043
10090
  showTotalNumber && notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10044
10091
  "div",
10045
10092
  {
10046
- className: (0, import_clsx17.default)(textClassNameMapping[size], "flex-row-2 truncate items-center"),
10093
+ className: (0, import_clsx16.default)(textClassNameMapping[size], "flex-row-2 truncate items-center"),
10047
10094
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
10048
10095
  "+ ",
10049
10096
  notDisplayedProfiles
@@ -10054,7 +10101,7 @@ var AvatarGroup = ({
10054
10101
  };
10055
10102
 
10056
10103
  // src/components/icons-and-geometry/Circle.tsx
10057
- var import_clsx18 = __toESM(require("clsx"));
10104
+ var import_clsx17 = __toESM(require("clsx"));
10058
10105
  var import_jsx_runtime24 = require("react/jsx-runtime");
10059
10106
  var Circle = ({
10060
10107
  radius = 20,
@@ -10066,7 +10113,7 @@ var Circle = ({
10066
10113
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10067
10114
  "div",
10068
10115
  {
10069
- className: (0, import_clsx18.default)(`rounded-full`, className),
10116
+ className: (0, import_clsx17.default)(`rounded-full`, className),
10070
10117
  style: {
10071
10118
  width: `${size}px`,
10072
10119
  height: `${size}px`,
@@ -10079,7 +10126,7 @@ var Circle = ({
10079
10126
 
10080
10127
  // src/components/icons-and-geometry/Ring.tsx
10081
10128
  var import_react24 = require("react");
10082
- var import_clsx19 = __toESM(require("clsx"));
10129
+ var import_clsx18 = __toESM(require("clsx"));
10083
10130
  var import_jsx_runtime25 = require("react/jsx-runtime");
10084
10131
  var Ring = ({
10085
10132
  innerSize = 20,
@@ -10089,7 +10136,7 @@ var Ring = ({
10089
10136
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10090
10137
  "div",
10091
10138
  {
10092
- className: (0, import_clsx19.default)(`bg-transparent rounded-full outline`, className),
10139
+ className: (0, import_clsx18.default)(`bg-transparent rounded-full outline`, className),
10093
10140
  style: {
10094
10141
  width: `${innerSize}px`,
10095
10142
  height: `${innerSize}px`,
@@ -10228,7 +10275,7 @@ var RadialRings = ({
10228
10275
  Circle,
10229
10276
  {
10230
10277
  radius: sizeCircle1 / 2,
10231
- className: (0, import_clsx19.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10278
+ className: (0, import_clsx18.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10232
10279
  style: {
10233
10280
  left: `${size / 2}px`,
10234
10281
  top: `${size / 2}px`
@@ -10242,7 +10289,7 @@ var RadialRings = ({
10242
10289
  width: (sizeCircle2 - sizeCircle1) / 2,
10243
10290
  onAnimationFinished: () => currentRing === 0 ? setCurrentRing(1) : null,
10244
10291
  repeating: true,
10245
- className: (0, import_clsx19.default)(
10292
+ className: (0, import_clsx18.default)(
10246
10293
  circle2ClassName,
10247
10294
  { "opacity-5": currentRing !== 0 }
10248
10295
  ),
@@ -10262,7 +10309,7 @@ var RadialRings = ({
10262
10309
  endInnerSize: sizeCircle2,
10263
10310
  width: waveWidth,
10264
10311
  repeating: true,
10265
- className: (0, import_clsx19.default)(waveBaseColor, `opacity-5`),
10312
+ className: (0, import_clsx18.default)(waveBaseColor, `opacity-5`),
10266
10313
  style: {
10267
10314
  left: `${size / 2}px`,
10268
10315
  top: `${size / 2}px`,
@@ -10276,7 +10323,7 @@ var RadialRings = ({
10276
10323
  Circle,
10277
10324
  {
10278
10325
  radius: sizeCircle2 / 2,
10279
- className: (0, import_clsx19.default)(
10326
+ className: (0, import_clsx18.default)(
10280
10327
  circle2ClassName,
10281
10328
  { "opacity-20": currentRing < 1 },
10282
10329
  `absolute z-[8] -translate-y-1/2 -translate-x-1/2`
@@ -10294,7 +10341,7 @@ var RadialRings = ({
10294
10341
  width: (sizeCircle3 - sizeCircle2) / 2,
10295
10342
  onAnimationFinished: () => currentRing === 1 ? setCurrentRing(2) : null,
10296
10343
  repeating: true,
10297
- className: (0, import_clsx19.default)(circle3ClassName),
10344
+ className: (0, import_clsx18.default)(circle3ClassName),
10298
10345
  style: {
10299
10346
  left: `${size / 2}px`,
10300
10347
  top: `${size / 2}px`,
@@ -10311,7 +10358,7 @@ var RadialRings = ({
10311
10358
  endInnerSize: sizeCircle3 - waveWidth,
10312
10359
  width: waveWidth,
10313
10360
  repeating: true,
10314
- className: (0, import_clsx19.default)(waveBaseColor, `opacity-5`),
10361
+ className: (0, import_clsx18.default)(waveBaseColor, `opacity-5`),
10315
10362
  style: {
10316
10363
  left: `${size / 2}px`,
10317
10364
  top: `${size / 2}px`,
@@ -10325,7 +10372,7 @@ var RadialRings = ({
10325
10372
  Circle,
10326
10373
  {
10327
10374
  radius: sizeCircle3 / 2,
10328
- className: (0, import_clsx19.default)(
10375
+ className: (0, import_clsx18.default)(
10329
10376
  circle3ClassName,
10330
10377
  { "opacity-20": currentRing < 2 },
10331
10378
  `absolute z-[6] -translate-y-1/2 -translate-x-1/2`
@@ -10363,7 +10410,7 @@ var TagIcon = ({
10363
10410
 
10364
10411
  // src/components/layout/Carousel.tsx
10365
10412
  var import_react25 = require("react");
10366
- var import_clsx20 = __toESM(require("clsx"));
10413
+ var import_clsx19 = __toESM(require("clsx"));
10367
10414
  var import_lucide_react7 = require("lucide-react");
10368
10415
  var import_jsx_runtime27 = require("react/jsx-runtime");
10369
10416
  var CarouselContext = (0, import_react25.createContext)(null);
@@ -10406,10 +10453,12 @@ function CarouselTabs({
10406
10453
  "button",
10407
10454
  {
10408
10455
  id: `${id}-tab-${index}`,
10409
- ref: (el) => tabRefs.current[index] = el,
10456
+ ref: (el) => {
10457
+ tabRefs.current[index] = el;
10458
+ },
10410
10459
  onClick: () => onChange(index),
10411
10460
  onKeyDown: (e) => handleKeyDown(e, index),
10412
- className: (0, import_clsx20.default)(
10461
+ className: (0, import_clsx19.default)(
10413
10462
  "w-8 min-w-8 h-3 min-h-3 first:rounded-l-md last:rounded-r-md",
10414
10463
  {
10415
10464
  "bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
@@ -10443,7 +10492,7 @@ var CarouselSlide = (0, import_react25.forwardRef)(
10443
10492
  ...props,
10444
10493
  ref,
10445
10494
  id: `${id}-slide-${index}`,
10446
- className: (0, import_clsx20.default)("focus-style-none group/slide", props.className),
10495
+ className: (0, import_clsx19.default)("focus-style-none group/slide", props.className),
10447
10496
  tabIndex: isSelected ? 0 : void 0,
10448
10497
  role: "group",
10449
10498
  "aria-roledescription": translation("slide"),
@@ -10592,7 +10641,7 @@ var Carousel = ({
10592
10641
  {
10593
10642
  ref: carouselContainerRef,
10594
10643
  ...props,
10595
- className: (0, import_clsx20.default)("flex-col-2 items-center w-full", props.className),
10644
+ className: (0, import_clsx19.default)("flex-col-2 items-center w-full", props.className),
10596
10645
  id,
10597
10646
  role: "region",
10598
10647
  "aria-roledescription": translation("slide"),
@@ -10601,7 +10650,7 @@ var Carousel = ({
10601
10650
  "div",
10602
10651
  {
10603
10652
  ...slideContainerProps,
10604
- className: (0, import_clsx20.default)(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10653
+ className: (0, import_clsx19.default)(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10605
10654
  children: [
10606
10655
  hintNext ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10607
10656
  "div",
@@ -10610,7 +10659,7 @@ var Carousel = ({
10610
10659
  onPointerMove: handlePointerMove,
10611
10660
  onPointerUp: handlePointerUp,
10612
10661
  onPointerLeave: handlePointerUp,
10613
- className: (0, import_clsx20.default)(`flex-row-2 relative h-full`, heightClassName),
10662
+ className: (0, import_clsx19.default)(`flex-row-2 relative h-full`, heightClassName),
10614
10663
  children: [
10615
10664
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
10616
10665
  item,
@@ -10623,7 +10672,7 @@ var Carousel = ({
10623
10672
  ref: isInItems ? slideRefs[index] : void 0,
10624
10673
  index,
10625
10674
  isSelected: isInItems && currentIndex === index,
10626
- className: (0, import_clsx20.default)(
10675
+ className: (0, import_clsx19.default)(
10627
10676
  `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
10628
10677
  slideClassName
10629
10678
  ),
@@ -10640,13 +10689,13 @@ var Carousel = ({
10640
10689
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10641
10690
  "div",
10642
10691
  {
10643
- className: (0, import_clsx20.default)(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
10692
+ className: (0, import_clsx19.default)(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
10644
10693
  }
10645
10694
  ),
10646
10695
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10647
10696
  "div",
10648
10697
  {
10649
- className: (0, import_clsx20.default)(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
10698
+ className: (0, import_clsx19.default)(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
10650
10699
  }
10651
10700
  )
10652
10701
  ]
@@ -10655,7 +10704,7 @@ var Carousel = ({
10655
10704
  "div",
10656
10705
  {
10657
10706
  ref: slideRefs[currentIndex],
10658
- className: (0, import_clsx20.default)("px-16 h-full"),
10707
+ className: (0, import_clsx19.default)("px-16 h-full"),
10659
10708
  tabIndex: 0,
10660
10709
  role: "group",
10661
10710
  "aria-roledescription": translation("slide"),
@@ -10672,7 +10721,7 @@ var Carousel = ({
10672
10721
  {
10673
10722
  layout: "icon",
10674
10723
  color: "neutral",
10675
- className: (0, import_clsx20.default)("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10724
+ className: (0, import_clsx19.default)("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10676
10725
  disabled: !canGoLeft(),
10677
10726
  onClick: () => left(),
10678
10727
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLeft, { size: 24 })
@@ -10683,7 +10732,7 @@ var Carousel = ({
10683
10732
  {
10684
10733
  layout: "icon",
10685
10734
  color: "neutral",
10686
- className: (0, import_clsx20.default)("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10735
+ className: (0, import_clsx19.default)("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10687
10736
  disabled: !canGoRight(),
10688
10737
  onClick: () => right(),
10689
10738
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronRight, { size: 24 })
@@ -10700,7 +10749,7 @@ var Carousel = ({
10700
10749
  };
10701
10750
 
10702
10751
  // src/components/layout/DividerInserter.tsx
10703
- var import_clsx21 = __toESM(require("clsx"));
10752
+ var import_clsx20 = __toESM(require("clsx"));
10704
10753
  var import_jsx_runtime28 = require("react/jsx-runtime");
10705
10754
  var DividerInserter = ({
10706
10755
  children,
@@ -10718,11 +10767,11 @@ var DividerInserter = ({
10718
10767
  }
10719
10768
  }
10720
10769
  }
10721
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx21.default)(className), ...restProps, children: nodes });
10770
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx20.default)(className), ...restProps, children: nodes });
10722
10771
  };
10723
10772
 
10724
10773
  // src/components/layout/FAQSection.tsx
10725
- var import_clsx22 = __toESM(require("clsx"));
10774
+ var import_clsx21 = __toESM(require("clsx"));
10726
10775
 
10727
10776
  // src/components/layout/MarkdownInterpreter.tsx
10728
10777
  var import_jsx_runtime29 = require("react/jsx-runtime");
@@ -10968,7 +11017,7 @@ var FAQSection = ({
10968
11017
  label: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { id, className: "typography-title-md", children: title }),
10969
11018
  clickOnlyOnHeader: false,
10970
11019
  icon: (expanded) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
10971
- className: (0, import_clsx22.default)("rounded-xl", expandableClassName),
11020
+ className: (0, import_clsx21.default)("rounded-xl", expandableClassName),
10972
11021
  children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-2", children: content.type === "markdown" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MarkdownInterpreter, { text: content.value }) : content.value })
10973
11022
  },
10974
11023
  id
@@ -10978,7 +11027,7 @@ var FAQSection = ({
10978
11027
  // src/components/layout/FloatingContainer.tsx
10979
11028
  var import_react26 = require("react");
10980
11029
  var import_react_dom3 = require("react-dom");
10981
- var import_clsx23 = require("clsx");
11030
+ var import_clsx22 = require("clsx");
10982
11031
  var import_jsx_runtime31 = require("react/jsx-runtime");
10983
11032
  var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContainer2({
10984
11033
  children,
@@ -11023,7 +11072,7 @@ var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContaine
11023
11072
  ...position,
11024
11073
  ...props.style
11025
11074
  },
11026
- className: (0, import_clsx23.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
11075
+ className: (0, import_clsx22.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
11027
11076
  children
11028
11077
  }
11029
11078
  )
@@ -11034,7 +11083,7 @@ var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContaine
11034
11083
 
11035
11084
  // src/components/layout/ListBox.tsx
11036
11085
  var import_react27 = __toESM(require("react"));
11037
- var import_clsx24 = require("clsx");
11086
+ var import_clsx23 = require("clsx");
11038
11087
  var import_jsx_runtime32 = require("react/jsx-runtime");
11039
11088
  var ListBoxContext = (0, import_react27.createContext)(null);
11040
11089
  function useListBoxContext() {
@@ -11077,7 +11126,7 @@ var ListBoxItem = (0, import_react27.forwardRef)(
11077
11126
  "data-highlighted": isHighlighted ? "" : void 0,
11078
11127
  "data-selected": selected ? "" : void 0,
11079
11128
  "data-disabled": disabled ? "" : void 0,
11080
- className: (0, import_clsx24.clsx)(
11129
+ className: (0, import_clsx23.clsx)(
11081
11130
  "flex-row-1 items-center px-2 py-1 rounded-md",
11082
11131
  "data-highlighted:bg-primary/20",
11083
11132
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -11298,7 +11347,7 @@ var ListBoxUncontrolled = ({
11298
11347
  // src/components/layout/TabView.tsx
11299
11348
  var import_react28 = require("react");
11300
11349
  var import_react29 = require("react");
11301
- var import_clsx25 = __toESM(require("clsx"));
11350
+ var import_clsx24 = __toESM(require("clsx"));
11302
11351
  var import_jsx_runtime33 = require("react/jsx-runtime");
11303
11352
  var TabContext = (0, import_react29.createContext)(null);
11304
11353
  function useTabContext() {
@@ -11343,8 +11392,8 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11343
11392
  buttonRefs.current[nextId]?.focus();
11344
11393
  };
11345
11394
  const value = { active, setActive, register, unregister, tabs };
11346
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TabContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...outerDivProps, className: (0, import_clsx25.default)("w-full", props.className), children: [
11347
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { role: "tablist", ...props, className: (0, import_clsx25.default)("flex-row-0"), children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11395
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TabContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...outerDivProps, className: (0, import_clsx24.default)("w-full", props.className), children: [
11396
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { role: "tablist", ...props, className: (0, import_clsx24.default)("flex-row-0"), children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11348
11397
  "button",
11349
11398
  {
11350
11399
  role: "tab",
@@ -11352,10 +11401,12 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11352
11401
  "aria-controls": `${t.id}-panel`,
11353
11402
  id: `${t.id}-tab`,
11354
11403
  tabIndex: active === t.id ? 0 : -1,
11355
- ref: (el) => buttonRefs.current[t.id] = el,
11404
+ ref: (el) => {
11405
+ buttonRefs.current[t.id] = el;
11406
+ },
11356
11407
  onClick: () => setActive(t.id),
11357
11408
  onKeyDown: (e) => onKeyDown(e, t.id),
11358
- className: (0, import_clsx25.default)(
11409
+ className: (0, import_clsx24.default)(
11359
11410
  "flex-row-0 grow justify-center px-3 pb-2.25 typography-label-md font-bold border-b-2",
11360
11411
  active === t.id ? "border-primary" : "text-description hover:text-on-background"
11361
11412
  ),
@@ -11389,7 +11440,7 @@ function Tab({ id: customId, label, children, ...props }) {
11389
11440
  }
11390
11441
 
11391
11442
  // src/components/layout/TextImage.tsx
11392
- var import_clsx26 = __toESM(require("clsx"));
11443
+ var import_clsx25 = __toESM(require("clsx"));
11393
11444
  var import_jsx_runtime34 = require("react/jsx-runtime");
11394
11445
  var TextImage = ({
11395
11446
  title,
@@ -11415,7 +11466,7 @@ var TextImage = ({
11415
11466
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11416
11467
  "div",
11417
11468
  {
11418
- className: (0, import_clsx26.default)("rounded-2xl w-full", className),
11469
+ className: (0, import_clsx25.default)("rounded-2xl w-full", className),
11419
11470
  style: {
11420
11471
  backgroundImage: `url(${imageUrl})`,
11421
11472
  backgroundSize: "cover"
@@ -11423,9 +11474,9 @@ var TextImage = ({
11423
11474
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
11424
11475
  "div",
11425
11476
  {
11426
- className: (0, import_clsx26.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11477
+ className: (0, import_clsx25.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11427
11478
  children: [
11428
- badge && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: (0, import_clsx26.default)(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
11479
+ badge && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: (0, import_clsx25.default)(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
11429
11480
  /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-col-1 overflow-hidden", children: [
11430
11481
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "typography-title-lg", children: title }),
11431
11482
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
@@ -11491,16 +11542,24 @@ var VerticalDivider = ({
11491
11542
  ) });
11492
11543
  };
11493
11544
 
11545
+ // src/components/layout/Visibility.tsx
11546
+ function Visibility({ children, isVisible }) {
11547
+ if (isVisible) {
11548
+ return children;
11549
+ }
11550
+ return void 0;
11551
+ }
11552
+
11494
11553
  // src/components/loading-states/ErrorComponent.tsx
11495
11554
  var import_lucide_react8 = require("lucide-react");
11496
- var import_clsx27 = __toESM(require("clsx"));
11555
+ var import_clsx26 = __toESM(require("clsx"));
11497
11556
  var import_jsx_runtime36 = require("react/jsx-runtime");
11498
11557
  var ErrorComponent = ({
11499
11558
  errorText,
11500
11559
  classname
11501
11560
  }) => {
11502
11561
  const translation = useHightideTranslation();
11503
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: (0, import_clsx27.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11562
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: (0, import_clsx26.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
11504
11563
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react8.AlertOctagon, { size: 64, className: "text-warning" }),
11505
11564
  errorText ?? `${translation("errorOccurred")} :(`
11506
11565
  ] });
@@ -11510,14 +11569,14 @@ var ErrorComponent = ({
11510
11569
  var import_react30 = require("react");
11511
11570
 
11512
11571
  // src/components/loading-states/LoadingContainer.tsx
11513
- var import_clsx28 = require("clsx");
11572
+ var import_clsx27 = require("clsx");
11514
11573
  var import_jsx_runtime37 = require("react/jsx-runtime");
11515
11574
  var LoadingContainer = ({ className }) => {
11516
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx28.clsx)("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11575
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx27.clsx)("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11517
11576
  };
11518
11577
 
11519
11578
  // src/components/loading-states/LoadingAndErrorComponent.tsx
11520
- var import_clsx29 = require("clsx");
11579
+ var import_clsx28 = require("clsx");
11521
11580
  var import_jsx_runtime38 = require("react/jsx-runtime");
11522
11581
  var LoadingAndErrorComponent = ({
11523
11582
  children,
@@ -11538,34 +11597,34 @@ var LoadingAndErrorComponent = ({
11538
11597
  }, minimumLoadingDuration);
11539
11598
  }
11540
11599
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
11541
- return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)(className) });
11600
+ return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx28.clsx)(className) });
11542
11601
  }
11543
11602
  if (hasError) {
11544
- return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)("bg-negative", className) });
11603
+ return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx28.clsx)("bg-negative", className) });
11545
11604
  }
11546
11605
  return children;
11547
11606
  };
11548
11607
 
11549
11608
  // src/components/loading-states/LoadingAnimation.tsx
11550
- var import_clsx30 = __toESM(require("clsx"));
11609
+ var import_clsx29 = __toESM(require("clsx"));
11551
11610
  var import_jsx_runtime39 = require("react/jsx-runtime");
11552
11611
  var LoadingAnimation = ({
11553
11612
  loadingText,
11554
11613
  classname
11555
11614
  }) => {
11556
11615
  const translation = useHightideTranslation();
11557
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: (0, import_clsx30.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11616
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: (0, import_clsx29.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
11558
11617
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HelpwaveLogo, { animate: "loading" }),
11559
11618
  loadingText ?? `${translation("loading")}...`
11560
11619
  ] });
11561
11620
  };
11562
11621
 
11563
11622
  // src/components/loading-states/LoadingButton.tsx
11564
- var import_clsx31 = __toESM(require("clsx"));
11623
+ var import_clsx30 = __toESM(require("clsx"));
11565
11624
  var import_jsx_runtime40 = require("react/jsx-runtime");
11566
11625
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
11567
11626
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "inline-block relative", children: [
11568
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: (0, import_clsx31.default)("flex-row-2 absolute inset-0 items-center justify-center bg-white/40"), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
11627
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: (0, import_clsx30.default)("flex-row-2 absolute inset-0 items-center justify-center bg-white/40"), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
11569
11628
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { ...rest, size, disabled: rest.disabled, onClick })
11570
11629
  ] });
11571
11630
  };
@@ -11628,18 +11687,18 @@ var ProgressIndicator = ({
11628
11687
 
11629
11688
  // src/components/navigation/BreadCrumb.tsx
11630
11689
  var import_link = __toESM(require_link2());
11631
- var import_clsx32 = __toESM(require("clsx"));
11690
+ var import_clsx31 = __toESM(require("clsx"));
11632
11691
  var import_react31 = require("react");
11633
11692
  var import_jsx_runtime42 = require("react/jsx-runtime");
11634
11693
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
11635
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: (0, import_clsx32.default)("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
11694
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: (0, import_clsx31.default)("flex-row-0.5 items-center", containerClassName), children: crumbs.map((crumb, index) => {
11636
11695
  const isLast = index === crumbs.length - 1;
11637
11696
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react31.Fragment, { children: [
11638
11697
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11639
11698
  import_link.default,
11640
11699
  {
11641
11700
  href: crumb.link,
11642
- className: (0, import_clsx32.default)(
11701
+ className: (0, import_clsx31.default)(
11643
11702
  "btn-sm coloring-text-hover",
11644
11703
  {
11645
11704
  description: !isLast,
@@ -11650,7 +11709,7 @@ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
11650
11709
  children: crumb.display
11651
11710
  }
11652
11711
  ),
11653
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: (0, import_clsx32.default)(`px-1`, "text-description"), children: "/" })
11712
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: (0, import_clsx31.default)(`px-1`, "text-description"), children: "/" })
11654
11713
  ] }, index);
11655
11714
  }) });
11656
11715
  };
@@ -11660,7 +11719,7 @@ var import_lucide_react9 = require("lucide-react");
11660
11719
  var import_react32 = require("react");
11661
11720
  var import_react33 = require("react");
11662
11721
  var import_link2 = __toESM(require_link2());
11663
- var import_clsx33 = __toESM(require("clsx"));
11722
+ var import_clsx32 = __toESM(require("clsx"));
11664
11723
  var import_jsx_runtime43 = require("react/jsx-runtime");
11665
11724
  function isSubItem(item) {
11666
11725
  return "items" in item && Array.isArray(item.items);
@@ -11672,7 +11731,7 @@ var NavigationItemWithSubItem = ({
11672
11731
  ...options
11673
11732
  }) => {
11674
11733
  const [isOpen, setOpen] = (0, import_react33.useState)(false);
11675
- const containerRef = (0, import_react33.useRef)();
11734
+ const containerRef = (0, import_react33.useRef)(null);
11676
11735
  const triggerRef = (0, import_react33.useRef)(null);
11677
11736
  const id = (0, import_react33.useId)();
11678
11737
  const style = useFloatingElement({
@@ -11723,7 +11782,7 @@ var NavigationItemWithSubItem = ({
11723
11782
  },
11724
11783
  onBlur,
11725
11784
  hidden: !isOpen,
11726
- className: (0, import_clsx33.default)(
11785
+ className: (0, import_clsx32.default)(
11727
11786
  "fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md",
11728
11787
  { "opacity-0": !style }
11729
11788
  ),
@@ -11742,7 +11801,7 @@ var NavigationItemWithSubItem = ({
11742
11801
  ] });
11743
11802
  };
11744
11803
  var NavigationItemList = ({ items, ...restProps }) => {
11745
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { ...restProps, className: (0, import_clsx33.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11804
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { ...restProps, className: (0, import_clsx32.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
11746
11805
  };
11747
11806
  var Navigation = ({ ...props }) => {
11748
11807
  const [isMobileOpen, setIsMobileOpen] = (0, import_react33.useState)(false);
@@ -11757,7 +11816,7 @@ var Navigation = ({ ...props }) => {
11757
11816
  NavigationItemList,
11758
11817
  {
11759
11818
  ...props,
11760
- className: (0, import_clsx33.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11819
+ className: (0, import_clsx32.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11761
11820
  }
11762
11821
  ),
11763
11822
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
@@ -11787,7 +11846,7 @@ var Navigation = ({ ...props }) => {
11787
11846
  event.stopPropagation();
11788
11847
  }
11789
11848
  },
11790
- className: (0, import_clsx33.default)(
11849
+ className: (0, import_clsx32.default)(
11791
11850
  "flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen bg-surface text-on-surface",
11792
11851
  {
11793
11852
  "desktop:hidden": isMobileOpen
@@ -11806,7 +11865,7 @@ var Navigation = ({ ...props }) => {
11806
11865
  children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.XIcon, {})
11807
11866
  }
11808
11867
  ),
11809
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemList, { ...props, className: (0, import_clsx33.default)("flex-col-8", props.className) })
11868
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemList, { ...props, className: (0, import_clsx32.default)("flex-col-8", props.className) })
11810
11869
  ]
11811
11870
  }
11812
11871
  )
@@ -11815,7 +11874,7 @@ var Navigation = ({ ...props }) => {
11815
11874
 
11816
11875
  // src/components/navigation/Pagination.tsx
11817
11876
  var import_lucide_react10 = require("lucide-react");
11818
- var import_clsx34 = __toESM(require("clsx"));
11877
+ var import_clsx33 = __toESM(require("clsx"));
11819
11878
  var import_react34 = require("react");
11820
11879
  var import_jsx_runtime44 = require("react/jsx-runtime");
11821
11880
  var Pagination = ({
@@ -11840,7 +11899,7 @@ var Pagination = ({
11840
11899
  const changePage = (page) => {
11841
11900
  onPageChanged(page);
11842
11901
  };
11843
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx34.default)("flex-row-1", className), style, children: [
11902
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx33.default)("flex-row-1", className), style, children: [
11844
11903
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11845
11904
  Button,
11846
11905
  {
@@ -11868,7 +11927,7 @@ var Pagination = ({
11868
11927
  Input,
11869
11928
  {
11870
11929
  value,
11871
- className: (0, import_clsx34.default)(
11930
+ className: (0, import_clsx33.default)(
11872
11931
  "w-24 text-center font-bold input-indicator-hidden h-10"
11873
11932
  ),
11874
11933
  type: "number",
@@ -11924,7 +11983,7 @@ var Pagination = ({
11924
11983
 
11925
11984
  // src/components/navigation/StepperBar.tsx
11926
11985
  var import_lucide_react11 = require("lucide-react");
11927
- var import_clsx35 = __toESM(require("clsx"));
11986
+ var import_clsx34 = __toESM(require("clsx"));
11928
11987
  var import_jsx_runtime45 = require("react/jsx-runtime");
11929
11988
  var defaultState = {
11930
11989
  currentStep: 0,
@@ -11950,7 +12009,7 @@ var StepperBar = ({
11950
12009
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
11951
12010
  "div",
11952
12011
  {
11953
- className: (0, import_clsx35.default)("flex-row-2 justify-between", className),
12012
+ className: (0, import_clsx34.default)("flex-row-2 justify-between", className),
11954
12013
  children: [
11955
12014
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
11956
12015
  Button,
@@ -11972,7 +12031,7 @@ var StepperBar = ({
11972
12031
  "div",
11973
12032
  {
11974
12033
  onClick: () => seen && update(index),
11975
- className: (0, import_clsx35.default)(
12034
+ className: (0, import_clsx34.default)(
11976
12035
  "rounded-full w-4 h-4",
11977
12036
  {
11978
12037
  "bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
@@ -12033,24 +12092,25 @@ var import_lucide_react14 = require("lucide-react");
12033
12092
 
12034
12093
  // src/components/user-action/Checkbox.tsx
12035
12094
  var import_lucide_react12 = require("lucide-react");
12036
- var import_clsx36 = __toESM(require("clsx"));
12095
+ var import_clsx35 = __toESM(require("clsx"));
12037
12096
  var import_jsx_runtime46 = require("react/jsx-runtime");
12038
12097
  var checkboxSizeMapping = {
12039
- sm: "size-5 border-1",
12040
- md: "size-6 border-1",
12041
- lg: "size-8 border-2"
12098
+ small: "size-5 border-2",
12099
+ medium: "size-6 border-2",
12100
+ large: "size-8 border-2"
12042
12101
  };
12043
12102
  var checkboxIconSizeMapping = {
12044
- sm: "size-4 stroke-3",
12045
- md: "size-5 stroke-3",
12046
- lg: "size-7 stroke-3"
12103
+ small: "size-3.5 stroke-3",
12104
+ medium: "size-4.5 stroke-3",
12105
+ large: "size-6 stroke-3"
12047
12106
  };
12048
12107
  var Checkbox = ({
12049
12108
  disabled,
12050
12109
  checked = false,
12051
12110
  indeterminate = false,
12111
+ invalid = false,
12052
12112
  onCheckedChange,
12053
- size = "md",
12113
+ size = "medium",
12054
12114
  className = "",
12055
12115
  ...props
12056
12116
  }) => {
@@ -12074,25 +12134,21 @@ var Checkbox = ({
12074
12134
  props.onKeyDown?.(event);
12075
12135
  }
12076
12136
  },
12077
- className: (0, import_clsx36.default)(
12137
+ className: (0, import_clsx35.default)(
12078
12138
  usedSizeClass,
12079
- `flex-col-0 items-center justify-center rounded`,
12080
- {
12081
- "text-disabled border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
12082
- "hover:border-primary": !disabled,
12083
- "bg-input-background": !disabled && !checked,
12084
- "bg-primary/30 border-primary text-primary": !disabled && (checked || indeterminate)
12085
- },
12086
12139
  className
12087
12140
  ),
12141
+ "data-name": props["data-name"] ?? "checkbox",
12142
+ "data-value": !indeterminate ? checked : "indeterminate",
12143
+ "data-disabled": disabled ? "" : void 0,
12144
+ "data-invalid": invalid ? "" : void 0,
12088
12145
  role: "checkbox",
12089
12146
  "aria-checked": indeterminate ? "mixed" : checked,
12090
12147
  "aria-disabled": disabled,
12091
12148
  tabIndex: disabled ? -1 : 0,
12092
12149
  children: [
12093
- !checked && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: (0, import_clsx36.default)("bg-input-background", innerIconSize) }),
12094
- checked && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Check, { className: innerIconSize }),
12095
- indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Minus, { className: innerIconSize })
12150
+ !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Check, { className: innerIconSize, "aria-hidden": true }),
12151
+ indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Minus, { className: innerIconSize, "aria-hidden": true })
12096
12152
  ]
12097
12153
  }
12098
12154
  );
@@ -12115,7 +12171,7 @@ var CheckboxUncontrolled = ({
12115
12171
 
12116
12172
  // src/components/properties/PropertyBase.tsx
12117
12173
  var import_lucide_react13 = require("lucide-react");
12118
- var import_clsx37 = __toESM(require("clsx"));
12174
+ var import_clsx36 = __toESM(require("clsx"));
12119
12175
  var import_jsx_runtime47 = require("react/jsx-runtime");
12120
12176
  var PropertyBase = ({
12121
12177
  name,
@@ -12129,14 +12185,14 @@ var PropertyBase = ({
12129
12185
  }) => {
12130
12186
  const translation = useHightideTranslation();
12131
12187
  const requiredAndNoValue = softRequired && !hasValue;
12132
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx37.default)("flex-row-0 group", className), children: [
12188
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx36.default)("flex-row-0 group", className), children: [
12133
12189
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
12134
12190
  "div",
12135
12191
  {
12136
- className: (0, import_clsx37.default)(
12192
+ className: (0, import_clsx36.default)(
12137
12193
  "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
12138
12194
  {
12139
- "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
12195
+ "bg-property-title-background text-property-title-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
12140
12196
  "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
12141
12197
  },
12142
12198
  className
@@ -12150,10 +12206,10 @@ var PropertyBase = ({
12150
12206
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
12151
12207
  "div",
12152
12208
  {
12153
- className: (0, import_clsx37.default)(
12209
+ className: (0, import_clsx36.default)(
12154
12210
  "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
12155
12211
  {
12156
- "bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
12212
+ "bg-input-background text-input-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
12157
12213
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
12158
12214
  },
12159
12215
  className
@@ -12167,7 +12223,7 @@ var PropertyBase = ({
12167
12223
  onClick: onRemove,
12168
12224
  color: "negative",
12169
12225
  coloringStyle: "text",
12170
- className: (0, import_clsx37.default)("items-center"),
12226
+ className: (0, import_clsx36.default)("items-center"),
12171
12227
  disabled: !hasValue,
12172
12228
  children: translation("remove")
12173
12229
  }
@@ -12215,7 +12271,7 @@ var CheckboxProperty = ({
12215
12271
 
12216
12272
  // src/components/properties/DateProperty.tsx
12217
12273
  var import_lucide_react15 = require("lucide-react");
12218
- var import_clsx38 = __toESM(require("clsx"));
12274
+ var import_clsx37 = __toESM(require("clsx"));
12219
12275
  var import_jsx_runtime49 = require("react/jsx-runtime");
12220
12276
  var DateProperty = ({
12221
12277
  value,
@@ -12236,7 +12292,7 @@ var DateProperty = ({
12236
12292
  input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12237
12293
  Input,
12238
12294
  {
12239
- className: (0, import_clsx38.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
12295
+ className: (0, import_clsx37.default)("default-style-none focus-style-none", { "bg-surface-warning": softRequired && !hasValue }),
12240
12296
  value: dateText,
12241
12297
  type: type === "dateTime" ? "datetime-local" : "date",
12242
12298
  readOnly,
@@ -12258,7 +12314,7 @@ var DateProperty = ({
12258
12314
 
12259
12315
  // src/components/properties/MultiSelectProperty.tsx
12260
12316
  var import_lucide_react16 = require("lucide-react");
12261
- var import_clsx39 = __toESM(require("clsx"));
12317
+ var import_clsx38 = __toESM(require("clsx"));
12262
12318
  var import_jsx_runtime50 = require("react/jsx-runtime");
12263
12319
  var MultiSelectProperty = ({
12264
12320
  children,
@@ -12280,14 +12336,15 @@ var MultiSelectProperty = ({
12280
12336
  onValuesChanged,
12281
12337
  disabled: props.readOnly,
12282
12338
  contentPanelProps: {
12283
- className: (0, import_clsx39.default)(
12339
+ className: (0, import_clsx38.default)(
12284
12340
  "!border-none !min-h-10"
12285
12341
  )
12286
12342
  },
12287
12343
  chipDisplayProps: {
12288
- className: (0, import_clsx39.default)({
12289
- "!bg-warning !text-surface-warning": softRequired && !hasValue
12290
- })
12344
+ className: (0, import_clsx38.default)(
12345
+ "default-style-none flex flex-wrap gap-x-2 gap-y-2 items-center hover:cursor-pointer",
12346
+ { "!bg-warning text-surface-warning": softRequired && !hasValue }
12347
+ )
12291
12348
  },
12292
12349
  children
12293
12350
  }
@@ -12298,7 +12355,7 @@ var MultiSelectProperty = ({
12298
12355
 
12299
12356
  // src/components/properties/NumberProperty.tsx
12300
12357
  var import_lucide_react17 = require("lucide-react");
12301
- var import_clsx40 = __toESM(require("clsx"));
12358
+ var import_clsx39 = __toESM(require("clsx"));
12302
12359
  var import_jsx_runtime51 = require("react/jsx-runtime");
12303
12360
  var NumberProperty = ({
12304
12361
  value,
@@ -12323,12 +12380,12 @@ var NumberProperty = ({
12323
12380
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
12324
12381
  "div",
12325
12382
  {
12326
- className: (0, import_clsx40.default)("relative flex-row-2 max-w-56", { "text-warning": softRequired && !hasValue }),
12383
+ className: (0, import_clsx39.default)("relative flex-row-2 max-w-56", { "text-warning": softRequired && !hasValue }),
12327
12384
  children: [
12328
12385
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12329
12386
  Input,
12330
12387
  {
12331
- className: (0, import_clsx40.default)("!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 }),
12388
+ className: (0, import_clsx39.default)("default-style-none focus-style-none w-full pr-8", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
12332
12389
  value: value?.toString() ?? "",
12333
12390
  type: "number",
12334
12391
  readOnly,
@@ -12354,7 +12411,7 @@ var NumberProperty = ({
12354
12411
  suffix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12355
12412
  "span",
12356
12413
  {
12357
- className: (0, import_clsx40.default)(
12414
+ className: (0, import_clsx39.default)(
12358
12415
  "absolute top-1/2 -translate-y-1/2 right-2",
12359
12416
  { "bg-surface-warning": softRequired && !hasValue }
12360
12417
  ),
@@ -12371,7 +12428,7 @@ var NumberProperty = ({
12371
12428
 
12372
12429
  // src/components/properties/SelectProperty.tsx
12373
12430
  var import_lucide_react18 = require("lucide-react");
12374
- var import_clsx41 = __toESM(require("clsx"));
12431
+ var import_clsx40 = __toESM(require("clsx"));
12375
12432
  var import_jsx_runtime52 = require("react/jsx-runtime");
12376
12433
  var SingleSelectProperty = ({
12377
12434
  children,
@@ -12394,8 +12451,8 @@ var SingleSelectProperty = ({
12394
12451
  onValueChanged,
12395
12452
  disabled: props.readOnly,
12396
12453
  buttonProps: {
12397
- className: (0, import_clsx41.default)(
12398
- "border-none w-full",
12454
+ className: (0, import_clsx40.default)(
12455
+ "default-style-none focus-style-none flex-row-2 w-full items-center",
12399
12456
  {
12400
12457
  "!bg-warning !text-surface-warning": softRequired && !hasValue
12401
12458
  }
@@ -12411,11 +12468,11 @@ var SingleSelectProperty = ({
12411
12468
 
12412
12469
  // src/components/properties/TextProperty.tsx
12413
12470
  var import_lucide_react19 = require("lucide-react");
12414
- var import_clsx43 = __toESM(require("clsx"));
12471
+ var import_clsx42 = __toESM(require("clsx"));
12415
12472
 
12416
12473
  // src/components/user-action/Textarea.tsx
12417
12474
  var import_react36 = require("react");
12418
- var import_clsx42 = __toESM(require("clsx"));
12475
+ var import_clsx41 = __toESM(require("clsx"));
12419
12476
  var import_jsx_runtime53 = require("react/jsx-runtime");
12420
12477
  var Textarea = (0, import_react36.forwardRef)(function Textarea2({
12421
12478
  id,
@@ -12424,10 +12481,8 @@ var Textarea = (0, import_react36.forwardRef)(function Textarea2({
12424
12481
  onBlur,
12425
12482
  onEditCompleted,
12426
12483
  saveDelayOptions,
12427
- defaultStyle = true,
12428
12484
  invalid = false,
12429
12485
  disabled = false,
12430
- className,
12431
12486
  ...props
12432
12487
  }, ref) {
12433
12488
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
@@ -12438,18 +12493,10 @@ var Textarea = (0, import_react36.forwardRef)(function Textarea2({
12438
12493
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12439
12494
  "textarea",
12440
12495
  {
12496
+ ...props,
12441
12497
  ref,
12442
12498
  id,
12443
- className: (0, import_clsx42.default)(
12444
- "resize-none w-full h-32 overflow-y-scroll",
12445
- "py-2 px-3 rounded-md border-2 border-transparent focus-style-none",
12446
- {
12447
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
12448
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": invalid && !disabled && defaultStyle,
12449
- "text-disabled bg-disabled-background border-disabled-border": disabled && defaultStyle
12450
- },
12451
- className
12452
- ),
12499
+ disabled,
12453
12500
  onChange: (event) => {
12454
12501
  const value = event.target.value;
12455
12502
  restartTimer(() => {
@@ -12462,8 +12509,10 @@ var Textarea = (0, import_react36.forwardRef)(function Textarea2({
12462
12509
  onBlur?.(event);
12463
12510
  onEditCompletedWrapper(event.target.value);
12464
12511
  },
12465
- disabled,
12466
- ...props
12512
+ "data-name": props["data-name"] ?? "textarea",
12513
+ "data-value": props.value ? "" : void 0,
12514
+ "data-disabled": disabled ? "" : void 0,
12515
+ "data-invalid": invalid ? "" : void 0
12467
12516
  }
12468
12517
  );
12469
12518
  });
@@ -12496,7 +12545,7 @@ var TextareaWithHeadline = ({
12496
12545
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
12497
12546
  "div",
12498
12547
  {
12499
- className: (0, import_clsx42.default)(
12548
+ className: (0, import_clsx41.default)(
12500
12549
  "group flex-col-3 border-2 rounded-lg",
12501
12550
  {
12502
12551
  "bg-input-background text-input-text hover:border-primary focus-within:border-primary": !disabled,
@@ -12511,11 +12560,10 @@ var TextareaWithHeadline = ({
12511
12560
  {
12512
12561
  ...props,
12513
12562
  id: usedId,
12514
- className: (0, import_clsx42.default)(
12563
+ className: (0, import_clsx41.default)(
12515
12564
  "border-transparent focus:ring-0 focus-visible:ring-0 resize-none h-32",
12516
12565
  className
12517
- ),
12518
- defaultStyle: false
12566
+ )
12519
12567
  }
12520
12568
  )
12521
12569
  ]
@@ -12545,11 +12593,11 @@ var TextProperty = ({
12545
12593
  input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12546
12594
  Textarea,
12547
12595
  {
12548
- className: (0, import_clsx43.default)({
12549
- "bg-surface-warning placeholder-warning": softRequired && !hasValue
12550
- }),
12596
+ className: (0, import_clsx42.default)(
12597
+ "default-style-none focus-style-none w-full",
12598
+ { "bg-surface-warning placeholder-warning": softRequired && !hasValue }
12599
+ ),
12551
12600
  rows: 5,
12552
- defaultStyle: false,
12553
12601
  value: value ?? "",
12554
12602
  readOnly,
12555
12603
  placeholder: `${translation("text")}...`,
@@ -12574,12 +12622,12 @@ var TextProperty = ({
12574
12622
  };
12575
12623
 
12576
12624
  // src/components/table/FillerRowElement.tsx
12577
- var import_clsx44 = require("clsx");
12625
+ var import_clsx43 = require("clsx");
12578
12626
  var import_jsx_runtime55 = require("react/jsx-runtime");
12579
12627
  var FillerRowElement = ({
12580
12628
  className
12581
12629
  }) => {
12582
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: (0, import_clsx44.clsx)("flex flex-row items-center w-1/2 h-4 text-disabled font-bold", className), children: "-" });
12630
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: (0, import_clsx43.clsx)("flex flex-row items-center w-1/2 h-4 text-disabled font-bold", className), children: "-" });
12583
12631
  };
12584
12632
 
12585
12633
  // src/components/table/Filter.ts
@@ -12597,18 +12645,18 @@ var TableFilters = {
12597
12645
  };
12598
12646
 
12599
12647
  // src/components/table/Table.tsx
12600
- var import_react42 = require("react");
12648
+ var import_react43 = require("react");
12601
12649
  var import_clsx48 = __toESM(require("clsx"));
12602
12650
  var import_react_table = require("@tanstack/react-table");
12603
12651
 
12604
12652
  // src/components/table/TableCell.tsx
12605
- var import_clsx45 = require("clsx");
12653
+ var import_clsx44 = require("clsx");
12606
12654
  var import_jsx_runtime56 = require("react/jsx-runtime");
12607
12655
  var TableCell = ({
12608
12656
  children,
12609
12657
  className
12610
12658
  }) => {
12611
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: (0, import_clsx45.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
12659
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: (0, import_clsx44.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
12612
12660
  };
12613
12661
 
12614
12662
  // src/hooks/useResizeCallbackWrapper.ts
@@ -12625,41 +12673,179 @@ var useResizeCallbackWrapper = (callback) => {
12625
12673
  // src/components/table/TableSortButton.tsx
12626
12674
  var import_lucide_react20 = require("lucide-react");
12627
12675
  var import_clsx46 = __toESM(require("clsx"));
12676
+
12677
+ // src/components/user-action/Tooltip.tsx
12678
+ var import_react38 = require("react");
12679
+ var import_clsx45 = require("clsx");
12680
+ var import_react_dom4 = require("react-dom");
12628
12681
  var import_jsx_runtime57 = require("react/jsx-runtime");
12682
+ var Tooltip = ({
12683
+ tooltip,
12684
+ children,
12685
+ appearDelay = 400,
12686
+ disappearDelay = 50,
12687
+ tooltipClassName = "",
12688
+ containerClassName = "",
12689
+ position = "bottom",
12690
+ disabled = false
12691
+ }) => {
12692
+ const [state, setState] = (0, import_react38.useState)({
12693
+ isShown: false,
12694
+ timer: null
12695
+ });
12696
+ const { isShown } = state;
12697
+ const anchorRef = (0, import_react38.useRef)(null);
12698
+ const containerRef = (0, import_react38.useRef)(null);
12699
+ const triangleRef = (0, import_react38.useRef)(null);
12700
+ const triangleSize = 0.375;
12701
+ const triangleClasses = {
12702
+ top: `border-t-tooltip-background border-l-transparent border-r-transparent`,
12703
+ bottom: `border-b-tooltip-background border-l-transparent border-r-transparent`,
12704
+ left: `border-l-tooltip-background border-t-transparent border-b-transparent`,
12705
+ right: `border-r-tooltip-background border-t-transparent border-b-transparent`
12706
+ };
12707
+ const triangleStyle = {
12708
+ top: { borderWidth: `${triangleSize}rem ${triangleSize}rem 0 ${triangleSize}rem`, transform: `translate(0,${triangleSize}rem)` },
12709
+ bottom: { borderWidth: `0 ${triangleSize}rem ${triangleSize}rem ${triangleSize}rem`, transform: `translate(0,-${triangleSize}rem)` },
12710
+ left: { borderWidth: `${triangleSize}rem 0 ${triangleSize}rem ${triangleSize}rem`, transform: `translate(${triangleSize}rem,0)` },
12711
+ right: { borderWidth: `${triangleSize}rem ${triangleSize}rem ${triangleSize}rem 0`, transform: `translate(-${triangleSize}rem,0)` }
12712
+ };
12713
+ const isActive = !disabled && isShown;
12714
+ const css = useFloatingElement({
12715
+ active: isActive,
12716
+ anchorRef,
12717
+ containerRef,
12718
+ horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
12719
+ verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
12720
+ });
12721
+ const cssTriangle = useFloatingElement({
12722
+ active: isActive,
12723
+ anchorRef,
12724
+ containerRef: triangleRef,
12725
+ horizontalAlignment: position === "left" ? "beforeStart" : position === "right" ? "afterEnd" : "center",
12726
+ verticalAlignment: position === "top" ? "beforeStart" : position === "bottom" ? "afterEnd" : "center"
12727
+ });
12728
+ const zIndex = useZIndexRegister(isActive);
12729
+ const zIndexTriangle = useZIndexRegister(isActive);
12730
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
12731
+ "div",
12732
+ {
12733
+ ref: anchorRef,
12734
+ className: (0, import_clsx45.clsx)("relative inline-block", containerClassName),
12735
+ onMouseEnter: () => setState((prevState) => {
12736
+ clearTimeout(prevState.timer);
12737
+ return {
12738
+ ...prevState,
12739
+ timer: setTimeout(() => {
12740
+ setState((prevState2) => {
12741
+ clearTimeout(prevState2.timer);
12742
+ return { isShown: true, timer: null };
12743
+ });
12744
+ }, appearDelay)
12745
+ };
12746
+ }),
12747
+ onMouseLeave: () => setState((prevState) => {
12748
+ clearTimeout(prevState.timer);
12749
+ return {
12750
+ ...prevState,
12751
+ timer: setTimeout(() => {
12752
+ setState((prevState2) => {
12753
+ clearTimeout(prevState2.timer);
12754
+ return { isShown: false, timer: null };
12755
+ });
12756
+ }, disappearDelay)
12757
+ };
12758
+ }),
12759
+ children: [
12760
+ children,
12761
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Visibility, { isVisible: isActive, children: [
12762
+ (0, import_react_dom4.createPortal)(
12763
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12764
+ "div",
12765
+ {
12766
+ ref: containerRef,
12767
+ className: (0, import_clsx45.clsx)(
12768
+ `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded
12769
+ animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
12770
+ tooltipClassName
12771
+ ),
12772
+ style: { ...css, zIndex, animationDelay: appearDelay + "ms" },
12773
+ children: tooltip
12774
+ }
12775
+ ),
12776
+ document.body
12777
+ ),
12778
+ (0, import_react_dom4.createPortal)(
12779
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12780
+ "div",
12781
+ {
12782
+ ref: triangleRef,
12783
+ className: (0, import_clsx45.clsx)(`absolute w-0 h-0 opacity-0 animate-tooltip-fade-in`, triangleClasses[position]),
12784
+ style: {
12785
+ ...cssTriangle,
12786
+ ...triangleStyle[position],
12787
+ zIndex: zIndexTriangle,
12788
+ animationDelay: appearDelay + "ms"
12789
+ }
12790
+ }
12791
+ ),
12792
+ document.body
12793
+ )
12794
+ ] })
12795
+ ]
12796
+ }
12797
+ );
12798
+ };
12799
+
12800
+ // src/components/table/TableSortButton.tsx
12801
+ var import_jsx_runtime58 = require("react/jsx-runtime");
12629
12802
  var TableSortButton = ({
12630
12803
  sortDirection,
12631
12804
  invert = false,
12632
12805
  color = "neutral",
12633
12806
  size = "tiny",
12634
12807
  className,
12635
- ...buttonProps
12808
+ sortingIndexDisplay,
12809
+ ...props
12636
12810
  }) => {
12637
- let icon = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react20.ChevronsUpDown, { className: "w-full h-full" });
12811
+ const translation = useHightideTranslation();
12812
+ const { sortingsCount, index } = sortingIndexDisplay;
12813
+ let icon = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react20.ChevronsUpDown, { className: "size-4" });
12638
12814
  if (sortDirection) {
12639
12815
  let usedSortDirection = sortDirection;
12640
12816
  if (invert) {
12641
12817
  usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
12642
12818
  }
12643
- icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react20.ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react20.ChevronDown, { className: "w-full h-full" });
12819
+ icon = usedSortDirection === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react20.ChevronUp, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react20.ChevronDown, { className: "size-4" });
12644
12820
  }
12645
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12821
+ const hasSortingIndex = !!sortingIndexDisplay && sortingsCount > 1 && index > 0;
12822
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Tooltip, { tooltip: translation("rSortingOrderAfter", { otherSortings: index - 1 }), disabled: !hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
12646
12823
  Button,
12647
12824
  {
12648
- layout: "icon",
12825
+ layout: hasSortingIndex ? "default" : "icon",
12649
12826
  color,
12650
12827
  size,
12651
- className: (0, import_clsx46.default)(className),
12652
- ...buttonProps,
12653
- children: icon
12828
+ className: (0, import_clsx46.default)("relative", className),
12829
+ ...props,
12830
+ children: [
12831
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
12832
+ "div",
12833
+ {
12834
+ className: (0, import_clsx46.default)("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"),
12835
+ children: `${index}.`
12836
+ }
12837
+ ) }),
12838
+ icon
12839
+ ]
12654
12840
  }
12655
- );
12841
+ ) });
12656
12842
  };
12657
12843
 
12658
12844
  // src/components/table/TableFilterButton.tsx
12659
12845
  var import_lucide_react21 = require("lucide-react");
12660
12846
 
12661
12847
  // src/components/user-action/Menu.tsx
12662
- var import_react40 = require("react");
12848
+ var import_react41 = require("react");
12663
12849
  var import_clsx47 = __toESM(require("clsx"));
12664
12850
 
12665
12851
  // src/utils/bagFunctions.ts
@@ -12674,7 +12860,7 @@ var BagFunctionUtil = {
12674
12860
  };
12675
12861
 
12676
12862
  // src/components/user-action/Menu.tsx
12677
- var import_react_dom4 = require("react-dom");
12863
+ var import_react_dom5 = require("react-dom");
12678
12864
 
12679
12865
  // src/hooks/usePopoverPosition.ts
12680
12866
  var defaultPopoverPositionOptions = {
@@ -12731,15 +12917,15 @@ var usePopoverPosition = (trigger, options) => {
12731
12917
  };
12732
12918
 
12733
12919
  // src/hooks/useHoverState.ts
12734
- var import_react38 = require("react");
12920
+ var import_react39 = require("react");
12735
12921
  var defaultUseHoverStateProps = {
12736
12922
  closingDelay: 200,
12737
12923
  isDisabled: false
12738
12924
  };
12739
12925
  var useHoverState = (props = void 0) => {
12740
12926
  const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
12741
- const [isHovered, setIsHovered] = (0, import_react38.useState)(false);
12742
- const [timer, setTimer] = (0, import_react38.useState)();
12927
+ const [isHovered, setIsHovered] = (0, import_react39.useState)(false);
12928
+ const [timer, setTimer] = (0, import_react39.useState)();
12743
12929
  const onMouseEnter = () => {
12744
12930
  if (isDisabled) {
12745
12931
  return;
@@ -12755,14 +12941,14 @@ var useHoverState = (props = void 0) => {
12755
12941
  setIsHovered(false);
12756
12942
  }, closingDelay));
12757
12943
  };
12758
- (0, import_react38.useEffect)(() => {
12944
+ (0, import_react39.useEffect)(() => {
12759
12945
  if (timer) {
12760
12946
  return () => {
12761
12947
  clearTimeout(timer);
12762
12948
  };
12763
12949
  }
12764
12950
  });
12765
- (0, import_react38.useEffect)(() => {
12951
+ (0, import_react39.useEffect)(() => {
12766
12952
  if (timer) {
12767
12953
  clearTimeout(timer);
12768
12954
  }
@@ -12775,9 +12961,9 @@ var useHoverState = (props = void 0) => {
12775
12961
  };
12776
12962
 
12777
12963
  // src/hooks/useOutsideClick.ts
12778
- var import_react39 = require("react");
12964
+ var import_react40 = require("react");
12779
12965
  var useOutsideClick = (refs, handler) => {
12780
- (0, import_react39.useEffect)(() => {
12966
+ (0, import_react40.useEffect)(() => {
12781
12967
  const listener = (event) => {
12782
12968
  if (event.target === null) return;
12783
12969
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -12795,14 +12981,14 @@ var useOutsideClick = (refs, handler) => {
12795
12981
  };
12796
12982
 
12797
12983
  // src/components/user-action/Menu.tsx
12798
- var import_jsx_runtime58 = require("react/jsx-runtime");
12984
+ var import_jsx_runtime59 = require("react/jsx-runtime");
12799
12985
  var MenuItem = ({
12800
12986
  children,
12801
12987
  onClick,
12802
12988
  alignment = "left",
12803
12989
  isDisabled = false,
12804
12990
  className
12805
- }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
12991
+ }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
12806
12992
  "div",
12807
12993
  {
12808
12994
  className: (0, import_clsx47.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
@@ -12835,10 +13021,10 @@ var Menu = ({
12835
13021
  menuClassName = ""
12836
13022
  }) => {
12837
13023
  const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
12838
- const triggerRef = (0, import_react40.useRef)(null);
12839
- const menuRef = (0, import_react40.useRef)(null);
13024
+ const triggerRef = (0, import_react41.useRef)(null);
13025
+ const menuRef = (0, import_react41.useRef)(null);
12840
13026
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
12841
- const [isHidden, setIsHidden] = (0, import_react40.useState)(true);
13027
+ const [isHidden, setIsHidden] = (0, import_react41.useState)(true);
12842
13028
  const bag = {
12843
13029
  isOpen,
12844
13030
  close: () => setIsOpen(false),
@@ -12849,7 +13035,7 @@ var Menu = ({
12849
13035
  triggerRef.current?.getBoundingClientRect(),
12850
13036
  { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
12851
13037
  );
12852
- (0, import_react40.useEffect)(() => {
13038
+ (0, import_react41.useEffect)(() => {
12853
13039
  if (!isOpen) return;
12854
13040
  const triggerEl = triggerRef.current;
12855
13041
  if (!triggerEl) return;
@@ -12866,15 +13052,15 @@ var Menu = ({
12866
13052
  window.removeEventListener("resize", close);
12867
13053
  };
12868
13054
  }, [isOpen, setIsOpen]);
12869
- (0, import_react40.useEffect)(() => {
13055
+ (0, import_react41.useEffect)(() => {
12870
13056
  if (isOpen) {
12871
13057
  setIsHidden(false);
12872
13058
  }
12873
13059
  }, [isOpen]);
12874
13060
  const zIndex = useZIndexRegister(isOpen);
12875
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
13061
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
12876
13062
  trigger(bag, triggerRef),
12877
- (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
13063
+ (0, import_react_dom5.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
12878
13064
  "div",
12879
13065
  {
12880
13066
  ref: menuRef,
@@ -12904,34 +13090,34 @@ var Menu = ({
12904
13090
  };
12905
13091
 
12906
13092
  // src/components/table/TableFilterButton.tsx
12907
- var import_react41 = require("react");
12908
- var import_jsx_runtime59 = require("react/jsx-runtime");
13093
+ var import_react42 = require("react");
13094
+ var import_jsx_runtime60 = require("react/jsx-runtime");
12909
13095
  var TableFilterButton = ({
12910
13096
  filterType,
12911
13097
  column
12912
13098
  }) => {
12913
13099
  const translation = useHightideTranslation();
12914
13100
  const columnFilterValue = column.getFilterValue();
12915
- const [filterValue, setFilterValue] = (0, import_react41.useState)(columnFilterValue);
13101
+ const [filterValue, setFilterValue] = (0, import_react42.useState)(columnFilterValue);
12916
13102
  const hasFilter = !!filterValue;
12917
- (0, import_react41.useEffect)(() => {
13103
+ (0, import_react42.useEffect)(() => {
12918
13104
  setFilterValue(columnFilterValue);
12919
13105
  }, [columnFilterValue]);
12920
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13106
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12921
13107
  Menu,
12922
13108
  {
12923
- trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: "relative", children: [
12924
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13109
+ trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: "relative", children: [
13110
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12925
13111
  Button,
12926
13112
  {
12927
13113
  layout: "icon",
12928
13114
  color: "neutral",
12929
13115
  size: "tiny",
12930
13116
  onClick: toggleOpen,
12931
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.FilterIcon, {})
13117
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react21.FilterIcon, { className: "size-4" })
12932
13118
  }
12933
13119
  ),
12934
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13120
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12935
13121
  "div",
12936
13122
  {
12937
13123
  className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
@@ -12939,9 +13125,9 @@ var TableFilterButton = ({
12939
13125
  }
12940
13126
  )
12941
13127
  ] }),
12942
- children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
12943
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
12944
- filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13128
+ children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
13129
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h4", { className: "typography-label-md-semibold", children: translation("filter") }),
13130
+ filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12945
13131
  Input,
12946
13132
  {
12947
13133
  value: filterValue ?? "",
@@ -12951,8 +13137,8 @@ var TableFilterButton = ({
12951
13137
  className: "h-10"
12952
13138
  }
12953
13139
  ),
12954
- filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex-row-2 items-center", children: [
12955
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13140
+ filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-row-2 items-center", children: [
13141
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12956
13142
  Input,
12957
13143
  {
12958
13144
  value: filterValue?.[0] ?? "",
@@ -12965,8 +13151,8 @@ var TableFilterButton = ({
12965
13151
  className: "h-10 input-indicator-hidden w-40"
12966
13152
  }
12967
13153
  ),
12968
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-bold", children: "-" }),
12969
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13154
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "font-bold", children: "-" }),
13155
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12970
13156
  Input,
12971
13157
  {
12972
13158
  value: filterValue?.[1] ?? "",
@@ -12980,8 +13166,8 @@ var TableFilterButton = ({
12980
13166
  }
12981
13167
  )
12982
13168
  ] }),
12983
- filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
12984
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13169
+ filterType === "dateRange" && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
13170
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12985
13171
  Input,
12986
13172
  {
12987
13173
  value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
@@ -12994,7 +13180,7 @@ var TableFilterButton = ({
12994
13180
  className: "h-10 w-50"
12995
13181
  }
12996
13182
  ),
12997
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13183
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12998
13184
  Input,
12999
13185
  {
13000
13186
  value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
@@ -13008,12 +13194,12 @@ var TableFilterButton = ({
13008
13194
  }
13009
13195
  )
13010
13196
  ] }),
13011
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
13012
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { color: "negative", size: "small", onClick: () => {
13197
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
13198
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { color: "negative", size: "small", onClick: () => {
13013
13199
  column.setFilterValue(void 0);
13014
13200
  close();
13015
13201
  }, children: translation("remove") }),
13016
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { size: "small", onClick: () => {
13202
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Button, { size: "small", onClick: () => {
13017
13203
  column.setFilterValue(filterValue);
13018
13204
  close();
13019
13205
  }, children: translation("apply") })
@@ -13024,7 +13210,7 @@ var TableFilterButton = ({
13024
13210
  };
13025
13211
 
13026
13212
  // src/components/table/Table.tsx
13027
- var import_jsx_runtime60 = require("react/jsx-runtime");
13213
+ var import_jsx_runtime61 = require("react/jsx-runtime");
13028
13214
  var Table = ({
13029
13215
  data,
13030
13216
  fillerRow,
@@ -13038,22 +13224,22 @@ var Table = ({
13038
13224
  columns,
13039
13225
  ...tableOptions
13040
13226
  }) => {
13041
- const ref = (0, import_react42.useRef)(null);
13042
- const tableRef = (0, import_react42.useRef)(null);
13043
- const [columnSizing, setColumnSizing] = (0, import_react42.useState)(columns.reduce((previousValue, currentValue) => {
13227
+ const ref = (0, import_react43.useRef)(null);
13228
+ const tableRef = (0, import_react43.useRef)(null);
13229
+ const [columnSizing, setColumnSizing] = (0, import_react43.useState)(columns.reduce((previousValue, currentValue) => {
13044
13230
  return {
13045
13231
  ...previousValue,
13046
13232
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
13047
13233
  };
13048
13234
  }, {}));
13049
- const [columnSizingInfo, setColumnSizingInfo] = (0, import_react42.useState)();
13050
- const [pagination, setPagination] = (0, import_react42.useState)({
13235
+ const [columnSizingInfo, setColumnSizingInfo] = (0, import_react43.useState)();
13236
+ const [pagination, setPagination] = (0, import_react43.useState)({
13051
13237
  pageSize: 10,
13052
13238
  pageIndex: 0,
13053
13239
  ...initialState?.pagination
13054
13240
  });
13055
- const [columnFilters, setColumnFilters] = (0, import_react42.useState)(initialState?.columnFilters);
13056
- const computedColumnMinWidths = (0, import_react42.useMemo)(() => {
13241
+ const [columnFilters, setColumnFilters] = (0, import_react43.useState)(initialState?.columnFilters);
13242
+ const computedColumnMinWidths = (0, import_react43.useMemo)(() => {
13057
13243
  return columns.reduce((previousValue, column) => {
13058
13244
  return {
13059
13245
  ...previousValue,
@@ -13062,7 +13248,7 @@ var Table = ({
13062
13248
  };
13063
13249
  }, {});
13064
13250
  }, [columns, defaultColumn]);
13065
- const computedColumnMaxWidths = (0, import_react42.useMemo)(() => {
13251
+ const computedColumnMaxWidths = (0, import_react43.useMemo)(() => {
13066
13252
  return columns.reduce((previousValue, column) => {
13067
13253
  return {
13068
13254
  ...previousValue,
@@ -13070,12 +13256,12 @@ var Table = ({
13070
13256
  };
13071
13257
  }, {});
13072
13258
  }, [columns, defaultColumn]);
13073
- const tableMinWidth = (0, import_react42.useMemo)(() => {
13259
+ const tableMinWidth = (0, import_react43.useMemo)(() => {
13074
13260
  return columns.reduce((sum, column) => {
13075
13261
  return sum + computedColumnMinWidths[column.id];
13076
13262
  }, 0);
13077
13263
  }, [columns, computedColumnMinWidths]);
13078
- const updateColumnSizes = (0, import_react42.useMemo)(() => {
13264
+ const updateColumnSizes = (0, import_react43.useMemo)(() => {
13079
13265
  return (previous) => {
13080
13266
  const updateSizing = {
13081
13267
  ...columnSizing,
@@ -13144,7 +13330,7 @@ var Table = ({
13144
13330
  minSize: 60,
13145
13331
  maxSize: 700,
13146
13332
  cell: ({ cell }) => {
13147
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCell, { children: cell.getValue() });
13333
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, { children: cell.getValue() });
13148
13334
  },
13149
13335
  ...defaultColumn
13150
13336
  },
@@ -13192,18 +13378,18 @@ var Table = ({
13192
13378
  columnResizeMode: "onChange",
13193
13379
  ...tableOptions
13194
13380
  });
13195
- const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react42.useState)(false);
13196
- (0, import_react42.useEffect)(() => {
13381
+ const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react43.useState)(false);
13382
+ (0, import_react43.useEffect)(() => {
13197
13383
  if (!hasInitializedSizing && ref.current) {
13198
13384
  setHasInitializedSizing(true);
13199
13385
  table.setColumnSizing(updateColumnSizes(columnSizing));
13200
13386
  }
13201
13387
  }, [columnSizing, hasInitializedSizing]);
13202
- useResizeCallbackWrapper((0, import_react42.useCallback)(() => {
13388
+ useResizeCallbackWrapper((0, import_react43.useCallback)(() => {
13203
13389
  table.setColumnSizing(updateColumnSizes);
13204
13390
  }, [updateColumnSizes]));
13205
13391
  const pageCount = table.getPageCount();
13206
- (0, import_react42.useEffect)(() => {
13392
+ (0, import_react43.useEffect)(() => {
13207
13393
  const totalPages = pageCount;
13208
13394
  if (totalPages === 0) {
13209
13395
  if (pagination.pageIndex !== 0) {
@@ -13219,7 +13405,7 @@ var Table = ({
13219
13405
  }));
13220
13406
  }
13221
13407
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
13222
- const columnSizeVars = (0, import_react42.useMemo)(() => {
13408
+ const columnSizeVars = (0, import_react43.useMemo)(() => {
13223
13409
  const headers = table.getFlatHeaders();
13224
13410
  const colSizes = {};
13225
13411
  for (let i = 0; i < headers.length; i++) {
@@ -13229,8 +13415,8 @@ var Table = ({
13229
13415
  }
13230
13416
  return colSizes;
13231
13417
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
13232
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: (0, import_clsx48.default)("flex-col-4", className), children: [
13233
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: (0, import_clsx48.default)("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13418
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { ref, className: (0, import_clsx48.default)("flex-col-4", className), children: [
13419
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_clsx48.default)("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13234
13420
  "table",
13235
13421
  {
13236
13422
  ref: tableRef,
@@ -13240,7 +13426,7 @@ var Table = ({
13240
13426
  width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
13241
13427
  },
13242
13428
  children: [
13243
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13429
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13244
13430
  "col",
13245
13431
  {
13246
13432
  style: {
@@ -13251,18 +13437,22 @@ var Table = ({
13251
13437
  },
13252
13438
  header.id
13253
13439
  )) }, headerGroup.id)),
13254
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13255
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13440
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
13441
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13256
13442
  "th",
13257
13443
  {
13258
13444
  colSpan: header.colSpan,
13259
13445
  className: (0, import_clsx48.default)("relative group", header.column.columnDef.meta?.className),
13260
13446
  children: [
13261
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-row-1 items-center", children: [
13262
- header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13447
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-1 items-center", children: [
13448
+ header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13263
13449
  TableSortButton,
13264
13450
  {
13265
13451
  sortDirection: header.column.getIsSorted(),
13452
+ sortingIndexDisplay: {
13453
+ index: header.column.getIsSorted() ? header.column.getSortIndex() + 1 : -1,
13454
+ sortingsCount: table.getState().sorting.length
13455
+ },
13266
13456
  onClick: () => {
13267
13457
  const sorted = header.column.getIsSorted();
13268
13458
  const isMulti = header.column.getCanMultiSort();
@@ -13281,7 +13471,7 @@ var Table = ({
13281
13471
  }
13282
13472
  }
13283
13473
  ),
13284
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13474
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13285
13475
  TableFilterButton,
13286
13476
  {
13287
13477
  column: header.column,
@@ -13293,7 +13483,7 @@ var Table = ({
13293
13483
  header.getContext()
13294
13484
  )
13295
13485
  ] }) }),
13296
- header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13486
+ header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13297
13487
  "div",
13298
13488
  {
13299
13489
  onMouseDown: header.getResizeHandler(),
@@ -13312,15 +13502,15 @@ var Table = ({
13312
13502
  header.id
13313
13503
  );
13314
13504
  }) }, headerGroup.id)) }),
13315
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("tbody", { children: [
13505
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("tbody", { children: [
13316
13506
  table.getRowModel().rows.map((row) => {
13317
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13507
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13318
13508
  "tr",
13319
13509
  {
13320
13510
  onClick: () => onRowClick?.(row, table),
13321
13511
  className: table.options.meta?.bodyRowClassName,
13322
13512
  children: row.getVisibleCells().map((cell) => {
13323
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: (0, import_react_table.flexRender)(
13513
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: (0, import_react_table.flexRender)(
13324
13514
  cell.column.columnDef.cell,
13325
13515
  cell.getContext()
13326
13516
  ) }, cell.id);
@@ -13330,15 +13520,15 @@ var Table = ({
13330
13520
  );
13331
13521
  }),
13332
13522
  range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
13333
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { children: columns.map((column) => {
13334
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FillerRowElement, {}) }, column.id);
13523
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { children: columns.map((column) => {
13524
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {}) }, column.id);
13335
13525
  }) }, "filler-row-" + index);
13336
13526
  })
13337
13527
  ] })
13338
13528
  ]
13339
13529
  }
13340
13530
  ) }),
13341
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13531
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13342
13532
  Pagination,
13343
13533
  {
13344
13534
  pageIndex: table.getState().pagination.pageIndex,
@@ -13350,7 +13540,7 @@ var Table = ({
13350
13540
  };
13351
13541
  var TableUncontrolled = ({ data, ...props }) => {
13352
13542
  const [usedDate] = useOverwritableState(data);
13353
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13543
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13354
13544
  Table,
13355
13545
  {
13356
13546
  ...props,
@@ -13369,12 +13559,12 @@ var TableWithSelection = ({
13369
13559
  meta,
13370
13560
  ...props
13371
13561
  }) => {
13372
- const columnsWithSelection = (0, import_react42.useMemo)(() => {
13562
+ const columnsWithSelection = (0, import_react43.useMemo)(() => {
13373
13563
  return [
13374
13564
  {
13375
13565
  id: selectionRowId,
13376
13566
  header: ({ table }) => {
13377
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13567
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13378
13568
  Checkbox,
13379
13569
  {
13380
13570
  checked: table.getIsAllRowsSelected(),
@@ -13387,7 +13577,7 @@ var TableWithSelection = ({
13387
13577
  );
13388
13578
  },
13389
13579
  cell: ({ row }) => {
13390
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13580
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13391
13581
  Checkbox,
13392
13582
  {
13393
13583
  disabled: !row.getCanSelect(),
@@ -13405,15 +13595,15 @@ var TableWithSelection = ({
13405
13595
  ...columns
13406
13596
  ];
13407
13597
  }, [columns, selectionRowId]);
13408
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13598
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13409
13599
  Table,
13410
13600
  {
13411
13601
  columns: columnsWithSelection,
13412
13602
  fillerRow: (columnId, table) => {
13413
13603
  if (columnId === selectionRowId) {
13414
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Checkbox, { checked: false, disabled: true, className: "max-w-6" });
13604
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Checkbox, { checked: false, disabled: true, className: "max-w-6" });
13415
13605
  }
13416
- return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FillerRowElement, {});
13606
+ return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FillerRowElement, {});
13417
13607
  },
13418
13608
  state: {
13419
13609
  rowSelection,
@@ -13438,7 +13628,7 @@ var TableWithSelection = ({
13438
13628
  };
13439
13629
 
13440
13630
  // src/components/user-action/CopyToClipboardWrapper.tsx
13441
- var import_react43 = require("react");
13631
+ var import_react44 = require("react");
13442
13632
  var import_clsx49 = require("clsx");
13443
13633
 
13444
13634
  // src/utils/writeToClipboard.ts
@@ -13448,7 +13638,7 @@ var writeToClipboard = (text) => {
13448
13638
 
13449
13639
  // src/components/user-action/CopyToClipboardWrapper.tsx
13450
13640
  var import_lucide_react22 = require("lucide-react");
13451
- var import_jsx_runtime61 = require("react/jsx-runtime");
13641
+ var import_jsx_runtime62 = require("react/jsx-runtime");
13452
13642
  var CopyToClipboardWrapper = ({
13453
13643
  children,
13454
13644
  textToCopy,
@@ -13458,8 +13648,8 @@ var CopyToClipboardWrapper = ({
13458
13648
  zIndex = 10
13459
13649
  }) => {
13460
13650
  const translation = useHightideTranslation();
13461
- const [isShowingIndication, setIsShowingIndication] = (0, import_react43.useState)(false);
13462
- const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react43.useState)(false);
13651
+ const [isShowingIndication, setIsShowingIndication] = (0, import_react44.useState)(false);
13652
+ const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react44.useState)(false);
13463
13653
  const positionClasses = {
13464
13654
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
13465
13655
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -13479,7 +13669,7 @@ var CopyToClipboardWrapper = ({
13479
13669
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13480
13670
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13481
13671
  };
13482
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13672
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
13483
13673
  "div",
13484
13674
  {
13485
13675
  className: (0, import_clsx49.clsx)("relative inline-block cursor-copy", containerClassName),
@@ -13497,7 +13687,7 @@ var CopyToClipboardWrapper = ({
13497
13687
  },
13498
13688
  children: [
13499
13689
  children,
13500
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13690
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
13501
13691
  "div",
13502
13692
  {
13503
13693
  className: (0, import_clsx49.clsx)(
@@ -13512,15 +13702,15 @@ var CopyToClipboardWrapper = ({
13512
13702
  opacity: isShowingIndication || isShowingConfirmation ? 1 : 0
13513
13703
  },
13514
13704
  children: [
13515
- isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-1", children: [
13516
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react22.CheckIcon, { size: 16, className: "text-positive" }),
13705
+ isShowingConfirmation && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1", children: [
13706
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.CheckIcon, { size: 16, className: "text-positive" }),
13517
13707
  translation("copied")
13518
13708
  ] }),
13519
- isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-1 text-description", children: [
13520
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react22.Copy, { size: 16 }),
13709
+ isShowingIndication && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-1 text-description", children: [
13710
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react22.Copy, { size: 16 }),
13521
13711
  translation("clickToCopy")
13522
13712
  ] }),
13523
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13713
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13524
13714
  "div",
13525
13715
  {
13526
13716
  className: (0, import_clsx49.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
@@ -13537,29 +13727,26 @@ var CopyToClipboardWrapper = ({
13537
13727
 
13538
13728
  // src/components/user-action/DateAndTimePicker.tsx
13539
13729
  var import_clsx50 = __toESM(require("clsx"));
13540
- var import_jsx_runtime62 = require("react/jsx-runtime");
13730
+ var import_jsx_runtime63 = require("react/jsx-runtime");
13541
13731
  var DateTimePicker = ({
13542
13732
  value = /* @__PURE__ */ new Date(),
13543
13733
  start = subtractDuration(/* @__PURE__ */ new Date(), { years: 50 }),
13544
13734
  end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
13545
13735
  mode = "dateTime",
13546
- onFinish,
13547
13736
  onChange,
13548
- onRemove,
13549
13737
  timePickerProps,
13550
13738
  datePickerProps
13551
13739
  }) => {
13552
- const translation = useHightideTranslation();
13553
13740
  const useDate = mode === "dateTime" || mode === "date";
13554
13741
  const useTime = mode === "dateTime" || mode === "time";
13555
13742
  let dateDisplay;
13556
13743
  let timeDisplay;
13557
13744
  if (useDate) {
13558
- dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13745
+ dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13559
13746
  DatePicker,
13560
13747
  {
13561
13748
  ...datePickerProps,
13562
- className: "min-w-80 min-h-71 max-h-71",
13749
+ className: "min-w-80",
13563
13750
  yearMonthPickerProps: { className: "h-full grow" },
13564
13751
  value,
13565
13752
  start,
@@ -13569,39 +13756,26 @@ var DateTimePicker = ({
13569
13756
  );
13570
13757
  }
13571
13758
  if (useTime) {
13572
- timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13759
+ timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13573
13760
  TimePicker,
13574
13761
  {
13575
13762
  ...timePickerProps,
13576
- className: (0, import_clsx50.default)("min-h-71 max-h-71", { "justify-between w-full": mode === "time" }),
13763
+ className: (0, import_clsx50.default)({ "justify-between": mode === "time" }),
13577
13764
  time: value,
13578
13765
  onChange
13579
13766
  }
13580
13767
  );
13581
13768
  }
13582
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-col-2 w-fit", children: [
13583
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-4", children: [
13584
- dateDisplay,
13585
- timeDisplay
13586
- ] }),
13587
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex-row-2 mt-1", children: [
13588
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
13589
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13590
- Button,
13591
- {
13592
- size: "medium",
13593
- onClick: () => onFinish?.(value),
13594
- children: translation("change")
13595
- }
13596
- )
13597
- ] }) })
13769
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex-row-2 min-h-71 max-h-71", children: [
13770
+ dateDisplay,
13771
+ timeDisplay
13598
13772
  ] });
13599
13773
  };
13600
13774
 
13601
13775
  // src/components/user-action/ScrollPicker.tsx
13602
- var import_react44 = require("react");
13776
+ var import_react45 = require("react");
13603
13777
  var import_clsx51 = __toESM(require("clsx"));
13604
- var import_jsx_runtime63 = require("react/jsx-runtime");
13778
+ var import_jsx_runtime64 = require("react/jsx-runtime");
13605
13779
  var up = 1;
13606
13780
  var down = -1;
13607
13781
  var ScrollPicker = ({
@@ -13620,7 +13794,7 @@ var ScrollPicker = ({
13620
13794
  transition,
13621
13795
  items,
13622
13796
  lastTimeStamp
13623
- }, setAnimation] = (0, import_react44.useState)({
13797
+ }, setAnimation] = (0, import_react45.useState)({
13624
13798
  targetIndex: selectedIndex,
13625
13799
  currentIndex: disabled ? selectedIndex : 0,
13626
13800
  velocity: 0,
@@ -13636,7 +13810,7 @@ var ScrollPicker = ({
13636
13810
  const itemHeight = 40;
13637
13811
  const distance = 8;
13638
13812
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
13639
- const getDirection = (0, import_react44.useCallback)((targetIndex, currentIndex2, transition2, length) => {
13813
+ const getDirection = (0, import_react45.useCallback)((targetIndex, currentIndex2, transition2, length) => {
13640
13814
  if (targetIndex === currentIndex2) {
13641
13815
  return transition2 > 0 ? up : down;
13642
13816
  }
@@ -13646,7 +13820,7 @@ var ScrollPicker = ({
13646
13820
  }
13647
13821
  return distanceForward >= length / 2 ? down : up;
13648
13822
  }, []);
13649
- const animate = (0, import_react44.useCallback)((timestamp, startTime) => {
13823
+ const animate = (0, import_react45.useCallback)((timestamp, startTime) => {
13650
13824
  setAnimation((prevState) => {
13651
13825
  const {
13652
13826
  targetIndex,
@@ -13719,7 +13893,7 @@ var ScrollPicker = ({
13719
13893
  };
13720
13894
  });
13721
13895
  }, [disabled, getDirection, onChange]);
13722
- (0, import_react44.useEffect)(() => {
13896
+ (0, import_react45.useEffect)(() => {
13723
13897
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
13724
13898
  });
13725
13899
  const opacity = (transition2, index, itemsCount) => {
@@ -13740,7 +13914,7 @@ var ScrollPicker = ({
13740
13914
  }
13741
13915
  return clamp(1 - opacityValue / max);
13742
13916
  };
13743
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13917
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13744
13918
  "div",
13745
13919
  {
13746
13920
  className: "relative overflow-hidden",
@@ -13751,15 +13925,15 @@ var ScrollPicker = ({
13751
13925
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + deltaY }));
13752
13926
  }
13753
13927
  },
13754
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13755
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13928
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
13929
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13756
13930
  "div",
13757
13931
  {
13758
13932
  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 ",
13759
13933
  style: { height: `${itemHeight}px` }
13760
13934
  }
13761
13935
  ),
13762
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13936
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13763
13937
  "div",
13764
13938
  {
13765
13939
  className: "flex-col-2 select-none",
@@ -13767,7 +13941,7 @@ var ScrollPicker = ({
13767
13941
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
13768
13942
  columnGap: `${distance}px`
13769
13943
  },
13770
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13944
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13771
13945
  "div",
13772
13946
  {
13773
13947
  className: (0, import_clsx51.default)(
@@ -13796,126 +13970,163 @@ var ScrollPicker = ({
13796
13970
  );
13797
13971
  };
13798
13972
 
13799
- // src/components/user-action/SearchBar.tsx
13973
+ // src/components/user-action/input/DateTimeInput.tsx
13974
+ var import_react46 = require("react");
13800
13975
  var import_lucide_react23 = require("lucide-react");
13801
- var import_clsx52 = require("clsx");
13802
- var import_jsx_runtime64 = require("react/jsx-runtime");
13803
- var SearchBar = ({
13804
- placeholder,
13805
- onSearch,
13806
- disableOnSearch,
13807
- containerClassName,
13808
- ...inputProps
13976
+ var import_clsx52 = __toESM(require("clsx"));
13977
+ var import_jsx_runtime65 = require("react/jsx-runtime");
13978
+ var DateTimeInput = ({
13979
+ date,
13980
+ onValueChange,
13981
+ onEditCompleted,
13982
+ onRemove,
13983
+ containerProps,
13984
+ mode = "date",
13985
+ pickerProps,
13986
+ ...props
13809
13987
  }) => {
13810
13988
  const translation = useHightideTranslation();
13811
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: (0, import_clsx52.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
13812
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13813
- Input,
13814
- {
13815
- ...inputProps,
13816
- placeholder: placeholder ?? translation("search")
13817
- }
13818
- ),
13819
- onSearch && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13820
- Button,
13989
+ const { locale } = useLocale();
13990
+ const [isOpen, setIsOpen] = (0, import_react46.useState)(false);
13991
+ const containerRef = (0, import_react46.useRef)(null);
13992
+ useOutsideClick([containerRef], () => {
13993
+ setIsOpen(false);
13994
+ });
13995
+ const zIndex = useZIndexRegister(isOpen);
13996
+ const isReadOnly = (0, import_react46.useMemo)(() => props.readOnly || props.disabled, [props.readOnly, props.disabled]);
13997
+ (0, import_react46.useEffect)(() => {
13998
+ if (isReadOnly) {
13999
+ setIsOpen(false);
14000
+ }
14001
+ }, [isReadOnly]);
14002
+ const cleanInputProps = { ...props };
14003
+ delete cleanInputProps["isShowingError"];
14004
+ delete cleanInputProps["setIsShowingError"];
14005
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
14006
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { ...containerProps, className: (0, import_clsx52.default)("relative w-full", containerProps?.className), children: [
14007
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14008
+ Input,
14009
+ {
14010
+ ...cleanInputProps,
14011
+ placeholder: translation("clickToAdd"),
14012
+ value: date ? DateUtils.formatAbsolute(date, locale, mode === "dateTime") : "",
14013
+ onClick: (event) => {
14014
+ setIsOpen(true);
14015
+ cleanInputProps.onClick?.(event);
14016
+ },
14017
+ readOnly: true,
14018
+ className: (0, import_clsx52.default)(
14019
+ "pr-10 w-full",
14020
+ { "hover:cursor-pointer": !isReadOnly },
14021
+ cleanInputProps.className
14022
+ )
14023
+ }
14024
+ ),
14025
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14026
+ Button,
14027
+ {
14028
+ coloringStyle: "text",
14029
+ layout: "icon",
14030
+ color: "neutral",
14031
+ size: "small",
14032
+ className: "absolute right-1 top-1/2 -translate-y-1/2",
14033
+ disabled: isReadOnly,
14034
+ onClick: () => setIsOpen((prevState) => !prevState),
14035
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react23.CalendarIcon, { className: "size-5" })
14036
+ }
14037
+ )
14038
+ ] }),
14039
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
14040
+ "div",
13821
14041
  {
13822
- layout: "icon",
13823
- color: "neutral",
13824
- disabled: disableOnSearch,
13825
- onClick: onSearch,
13826
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react23.Search, { className: "w-full h-full" })
14042
+ ref: containerRef,
14043
+ className: "absolute left-0 flex-col-3 rounded-lg shadow-xl border bg-surface-variant text-on-surface border-divider p-2",
14044
+ style: { zIndex },
14045
+ children: [
14046
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14047
+ DateTimePicker,
14048
+ {
14049
+ ...pickerProps,
14050
+ mode,
14051
+ value: date,
14052
+ onChange: (newDate) => {
14053
+ onValueChange(newDate);
14054
+ }
14055
+ }
14056
+ ),
14057
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex-row-2 justify-end", children: [
14058
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Visibility, { isVisible: !!onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14059
+ Button,
14060
+ {
14061
+ size: "medium",
14062
+ color: "negative",
14063
+ onClick: () => {
14064
+ onRemove?.();
14065
+ setIsOpen(false);
14066
+ },
14067
+ children: translation("clear")
14068
+ }
14069
+ ) }),
14070
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14071
+ Button,
14072
+ {
14073
+ size: "medium",
14074
+ onClick: () => {
14075
+ onEditCompleted?.(date);
14076
+ setIsOpen(false);
14077
+ },
14078
+ children: translation("change")
14079
+ }
14080
+ )
14081
+ ] })
14082
+ ]
13827
14083
  }
13828
- )
14084
+ ) })
13829
14085
  ] });
13830
14086
  };
13831
-
13832
- // src/components/user-action/Tooltip.tsx
13833
- var import_clsx53 = require("clsx");
13834
- var import_jsx_runtime65 = require("react/jsx-runtime");
13835
- var Tooltip = ({
13836
- tooltip,
13837
- children,
13838
- animationDelay = 650,
13839
- tooltipClassName = "",
13840
- containerClassName = "",
13841
- position = "bottom"
14087
+ var DateTimeInputUncontrolled = ({
14088
+ date: initialDate,
14089
+ ...props
13842
14090
  }) => {
13843
- const { isHovered, handlers } = useHoverState();
13844
- const positionClasses = {
13845
- top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
13846
- bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
13847
- left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
13848
- right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
13849
- };
13850
- const triangleSize = 6;
13851
- const triangleClasses = {
13852
- top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
13853
- bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
13854
- left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
13855
- right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
13856
- };
13857
- const triangleStyle = {
13858
- top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
13859
- bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
13860
- left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13861
- right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13862
- };
13863
- const zIndex = useZIndexRegister(isHovered);
13864
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
13865
- "div",
14091
+ const [date, setDate] = useOverwritableState((0, import_react46.useMemo)(() => initialDate ?? /* @__PURE__ */ new Date(), [initialDate]));
14092
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14093
+ DateTimeInput,
13866
14094
  {
13867
- className: (0, import_clsx53.clsx)("relative inline-block", containerClassName),
13868
- ...handlers,
13869
- children: [
13870
- children,
13871
- isHovered && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
13872
- "div",
13873
- {
13874
- className: (0, import_clsx53.clsx)(
13875
- `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
13876
- animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
13877
- positionClasses[position],
13878
- tooltipClassName
13879
- ),
13880
- style: { zIndex, animationDelay: animationDelay + "ms" },
13881
- children: [
13882
- tooltip,
13883
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
13884
- "div",
13885
- {
13886
- className: (0, import_clsx53.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
13887
- style: { ...triangleStyle[position], zIndex: zIndex + 1 }
13888
- }
13889
- )
13890
- ]
13891
- }
13892
- )
13893
- ]
14095
+ ...props,
14096
+ date,
14097
+ onValueChange: (newDate) => {
14098
+ setDate(newDate);
14099
+ props.onValueChange?.(newDate);
14100
+ },
14101
+ onRemove: () => {
14102
+ setDate(/* @__PURE__ */ new Date());
14103
+ props.onRemove?.();
14104
+ }
13894
14105
  }
13895
14106
  );
13896
14107
  };
13897
14108
 
13898
14109
  // src/components/user-action/input/InsideLabelInput.tsx
13899
- var import_react45 = require("react");
13900
- var import_react46 = require("react");
13901
- var import_clsx54 = __toESM(require("clsx"));
14110
+ var import_react47 = require("react");
14111
+ var import_react48 = require("react");
14112
+ var import_clsx53 = __toESM(require("clsx"));
13902
14113
  var import_jsx_runtime66 = require("react/jsx-runtime");
13903
- var InsideLabelInput = (0, import_react46.forwardRef)(function InsideLabelInput2({
14114
+ var InsideLabelInput = (0, import_react48.forwardRef)(function InsideLabelInput2({
13904
14115
  id: customId,
13905
14116
  label,
13906
14117
  ...props
13907
14118
  }, forwardedRef) {
13908
14119
  const { value } = props;
13909
- const [isFocused, setIsFocused] = (0, import_react46.useState)(false);
13910
- const generatedId = (0, import_react45.useId)();
14120
+ const [isFocused, setIsFocused] = (0, import_react48.useState)(false);
14121
+ const generatedId = (0, import_react47.useId)();
13911
14122
  const id = customId ?? generatedId;
13912
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx54.default)("relative"), children: [
14123
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx53.default)("relative"), children: [
13913
14124
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13914
14125
  Input,
13915
14126
  {
13916
14127
  ...props,
13917
14128
  id,
13918
- className: (0, import_clsx54.default)("h-14 px-4 pb-2 py-6.5", props.className),
14129
+ className: (0, import_clsx53.default)("h-14 px-4 pb-2 py-6.5", props.className),
13919
14130
  ref: forwardedRef,
13920
14131
  "aria-labelledby": id + "-label",
13921
14132
  onFocus: (event) => {
@@ -13934,7 +14145,7 @@ var InsideLabelInput = (0, import_react46.forwardRef)(function InsideLabelInput2
13934
14145
  id: id + "-label",
13935
14146
  "aria-hidden": true,
13936
14147
  "data-display": isFocused || !!value ? "small" : "full",
13937
- className: (0, import_clsx54.default)(
14148
+ className: (0, import_clsx53.default)(
13938
14149
  // margin left to account for the border which is ignored for absolute positions
13939
14150
  "absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
13940
14151
  "data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
@@ -13960,27 +14171,63 @@ var InsideLabelInputUncontrolled = ({
13960
14171
  );
13961
14172
  };
13962
14173
 
13963
- // src/components/user-action/input/ToggleableInput.tsx
13964
- var import_react47 = require("react");
14174
+ // src/components/user-action/input/SearchBar.tsx
13965
14175
  var import_lucide_react24 = require("lucide-react");
13966
- var import_clsx55 = __toESM(require("clsx"));
14176
+ var import_clsx54 = require("clsx");
13967
14177
  var import_jsx_runtime67 = require("react/jsx-runtime");
13968
- var ToggleableInput = (0, import_react47.forwardRef)(function ToggleableInput2({
14178
+ var SearchBar = ({
14179
+ onSearch,
14180
+ searchButtonProps,
14181
+ containerProps,
14182
+ ...inputProps
14183
+ }) => {
14184
+ const translation = useHightideTranslation();
14185
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { ...containerProps, className: (0, import_clsx54.clsx)("relative", containerProps?.className), children: [
14186
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14187
+ InputUncontrolled,
14188
+ {
14189
+ ...inputProps,
14190
+ placeholder: inputProps.placeholder ?? translation("search"),
14191
+ className: (0, import_clsx54.clsx)("pr-10 w-full", inputProps.className)
14192
+ }
14193
+ ),
14194
+ onSearch && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14195
+ Button,
14196
+ {
14197
+ ...searchButtonProps,
14198
+ size: "small",
14199
+ layout: "icon",
14200
+ color: "neutral",
14201
+ coloringStyle: "text",
14202
+ onClick: (event) => onSearch(event),
14203
+ className: (0, import_clsx54.clsx)("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
14204
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react24.Search, { className: "w-full h-full" })
14205
+ }
14206
+ )
14207
+ ] });
14208
+ };
14209
+
14210
+ // src/components/user-action/input/ToggleableInput.tsx
14211
+ var import_react49 = require("react");
14212
+ var import_lucide_react25 = require("lucide-react");
14213
+ var import_clsx55 = __toESM(require("clsx"));
14214
+ var import_jsx_runtime68 = require("react/jsx-runtime");
14215
+ var ToggleableInput = (0, import_react49.forwardRef)(function ToggleableInput2({
13969
14216
  value,
13970
14217
  initialState = "display",
13971
14218
  editCompleteOptions,
13972
14219
  ...props
13973
14220
  }, forwardedRef) {
13974
- const [isEditing, setIsEditing] = (0, import_react47.useState)(initialState !== "display");
13975
- const innerRef = (0, import_react47.useRef)(null);
13976
- (0, import_react47.useImperativeHandle)(forwardedRef, () => innerRef.current);
13977
- (0, import_react47.useEffect)(() => {
14221
+ const [isEditing, setIsEditing] = (0, import_react49.useState)(initialState !== "display");
14222
+ const innerRef = (0, import_react49.useRef)(null);
14223
+ (0, import_react49.useImperativeHandle)(forwardedRef, () => innerRef.current);
14224
+ (0, import_react49.useEffect)(() => {
13978
14225
  if (isEditing) {
13979
14226
  innerRef.current?.focus();
13980
14227
  }
13981
14228
  }, [isEditing]);
13982
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: (0, import_clsx55.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
13983
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14229
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx55.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
14230
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
13984
14231
  Input,
13985
14232
  {
13986
14233
  ...props,
@@ -13999,16 +14246,16 @@ var ToggleableInput = (0, import_react47.forwardRef)(function ToggleableInput2({
13999
14246
  ...editCompleteOptions,
14000
14247
  allowEnterComplete: true
14001
14248
  },
14002
- className: (0, import_clsx55.default)(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {
14003
- "underline": isEditing,
14249
+ "data-name": props["data-name"] ?? "togglable-input",
14250
+ "data-isEditing": isEditing ? "" : void 0,
14251
+ className: (0, import_clsx55.default)(`w-full rounded-md`, {
14004
14252
  "text-transparent": !isEditing
14005
- }),
14006
- defaultStyle: false
14253
+ })
14007
14254
  }
14008
14255
  ),
14009
- !isEditing && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
14010
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: (0, import_clsx55.default)(" truncate"), children: value }),
14011
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react24.Pencil, { className: (0, import_clsx55.default)(`size-force-4`, { "text-transparent": isEditing }) })
14256
+ !isEditing && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
14257
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: (0, import_clsx55.default)(" truncate"), children: value }),
14258
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_lucide_react25.Pencil, { className: (0, import_clsx55.default)(`size-force-4`, { "text-transparent": isEditing }) })
14012
14259
  ] })
14013
14260
  ] });
14014
14261
  });
@@ -14018,7 +14265,7 @@ var ToggleableInputUncontrolled = ({
14018
14265
  ...restProps
14019
14266
  }) => {
14020
14267
  const [value, setValue] = useOverwritableState(initialValue, onChangeText);
14021
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14268
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
14022
14269
  ToggleableInput,
14023
14270
  {
14024
14271
  value,
@@ -14029,33 +14276,33 @@ var ToggleableInputUncontrolled = ({
14029
14276
  };
14030
14277
 
14031
14278
  // src/components/utils/FocusTrap.tsx
14032
- var import_react48 = require("react");
14033
- var import_react49 = require("react");
14034
14279
  var import_react50 = require("react");
14035
- var import_jsx_runtime68 = require("react/jsx-runtime");
14036
- var FocusTrap = (0, import_react50.forwardRef)(function FocusTrap2({
14280
+ var import_react51 = require("react");
14281
+ var import_react52 = require("react");
14282
+ var import_jsx_runtime69 = require("react/jsx-runtime");
14283
+ var FocusTrap = (0, import_react52.forwardRef)(function FocusTrap2({
14037
14284
  active = true,
14038
14285
  initialFocus,
14039
14286
  focusFirst = false,
14040
14287
  ...props
14041
14288
  }, forwardedRef) {
14042
- const innerRef = (0, import_react48.useRef)(null);
14043
- (0, import_react49.useImperativeHandle)(forwardedRef, () => innerRef.current);
14289
+ const innerRef = (0, import_react50.useRef)(null);
14290
+ (0, import_react51.useImperativeHandle)(forwardedRef, () => innerRef.current);
14044
14291
  useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
14045
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ref: innerRef, ...props });
14292
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { ref: innerRef, ...props });
14046
14293
  });
14047
14294
 
14048
14295
  // src/components/utils/Transition.tsx
14049
- var import_react51 = require("react");
14296
+ var import_react53 = require("react");
14050
14297
  function Transition({
14051
14298
  children,
14052
14299
  show,
14053
14300
  includeAnimation = true
14054
14301
  }) {
14055
- const [isOpen, setIsOpen] = (0, import_react51.useState)(show);
14056
- const [isTransitioning, setIsTransitioning] = (0, import_react51.useState)(!isOpen);
14302
+ const [isOpen, setIsOpen] = (0, import_react53.useState)(show);
14303
+ const [isTransitioning, setIsTransitioning] = (0, import_react53.useState)(!isOpen);
14057
14304
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
14058
- (0, import_react51.useEffect)(() => {
14305
+ (0, import_react53.useEffect)(() => {
14059
14306
  setIsOpen(show);
14060
14307
  setIsTransitioning(true);
14061
14308
  }, [show]);
@@ -14080,7 +14327,7 @@ function Transition({
14080
14327
  }
14081
14328
 
14082
14329
  // src/hooks/focus/useFocusGuards.ts
14083
- var import_react52 = require("react");
14330
+ var import_react54 = require("react");
14084
14331
  var selectorName = "data-hw-focus-guard";
14085
14332
  function FocusGuard() {
14086
14333
  const element = document.createElement("div");
@@ -14118,7 +14365,7 @@ var FocusGuardsService = class _FocusGuardsService {
14118
14365
  }
14119
14366
  };
14120
14367
  var useFocusGuards = () => {
14121
- (0, import_react52.useEffect)(() => {
14368
+ (0, import_react54.useEffect)(() => {
14122
14369
  FocusGuardsService.getInstance().add();
14123
14370
  return () => {
14124
14371
  FocusGuardsService.getInstance().remove();
@@ -14127,10 +14374,10 @@ var useFocusGuards = () => {
14127
14374
  };
14128
14375
 
14129
14376
  // src/hooks/focus/useFocusOnceVisible.ts
14130
- var import_react53 = __toESM(require("react"));
14377
+ var import_react55 = __toESM(require("react"));
14131
14378
  var useFocusOnceVisible = (ref, disable = false) => {
14132
- const [hasUsedFocus, setHasUsedFocus] = import_react53.default.useState(false);
14133
- (0, import_react53.useEffect)(() => {
14379
+ const [hasUsedFocus, setHasUsedFocus] = import_react55.default.useState(false);
14380
+ (0, import_react55.useEffect)(() => {
14134
14381
  if (disable || hasUsedFocus) {
14135
14382
  return;
14136
14383
  }
@@ -14150,13 +14397,13 @@ var useFocusOnceVisible = (ref, disable = false) => {
14150
14397
  };
14151
14398
 
14152
14399
  // src/hooks/useRerender.ts
14153
- var import_react54 = require("react");
14400
+ var import_react56 = require("react");
14154
14401
  var useRerender = () => {
14155
- return (0, import_react54.useReducer)(() => ({}), {})[1];
14402
+ return (0, import_react56.useReducer)(() => ({}), {})[1];
14156
14403
  };
14157
14404
 
14158
14405
  // src/hooks/useSearch.ts
14159
- var import_react55 = require("react");
14406
+ var import_react57 = require("react");
14160
14407
 
14161
14408
  // src/utils/simpleSearch.ts
14162
14409
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -14195,34 +14442,34 @@ var useSearch = ({
14195
14442
  filter,
14196
14443
  disabled = false
14197
14444
  }) => {
14198
- const [search, setSearch] = (0, import_react55.useState)(initialSearch ?? "");
14199
- const [result, setResult] = (0, import_react55.useState)(list);
14200
- const searchTags = (0, import_react55.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
14201
- const updateSearch = (0, import_react55.useCallback)((newSearch) => {
14445
+ const [search, setSearch] = (0, import_react57.useState)(initialSearch ?? "");
14446
+ const [result, setResult] = (0, import_react57.useState)(list);
14447
+ const searchTags = (0, import_react57.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
14448
+ const updateSearch = (0, import_react57.useCallback)((newSearch) => {
14202
14449
  const usedSearch = newSearch ?? search;
14203
14450
  if (newSearch) {
14204
14451
  setSearch(search);
14205
14452
  }
14206
14453
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
14207
14454
  }, [searchTags, list, search, searchMapping]);
14208
- (0, import_react55.useEffect)(() => {
14455
+ (0, import_react57.useEffect)(() => {
14209
14456
  if (isSearchInstant) {
14210
14457
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
14211
14458
  }
14212
14459
  }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
14213
- const filteredResult = (0, import_react55.useMemo)(() => {
14460
+ const filteredResult = (0, import_react57.useMemo)(() => {
14214
14461
  if (!filter) {
14215
14462
  return result;
14216
14463
  }
14217
14464
  return result.filter(filter);
14218
14465
  }, [result, filter]);
14219
- const sortedAndFilteredResult = (0, import_react55.useMemo)(() => {
14466
+ const sortedAndFilteredResult = (0, import_react57.useMemo)(() => {
14220
14467
  if (!sortingFunction) {
14221
14468
  return filteredResult;
14222
14469
  }
14223
14470
  return filteredResult.sort(sortingFunction);
14224
14471
  }, [filteredResult, sortingFunction]);
14225
- const usedResult = (0, import_react55.useMemo)(() => {
14472
+ const usedResult = (0, import_react57.useMemo)(() => {
14226
14473
  if (!disabled) {
14227
14474
  return sortedAndFilteredResult;
14228
14475
  }
@@ -14332,6 +14579,106 @@ var builder = (value, update) => {
14332
14579
  return value;
14333
14580
  };
14334
14581
 
14582
+ // src/utils/duration.ts
14583
+ var Duration = class _Duration {
14584
+ constructor({
14585
+ years = 0,
14586
+ months = 0,
14587
+ days = 0,
14588
+ hours = 0,
14589
+ minutes = 0,
14590
+ seconds = 0,
14591
+ milliseconds = 0
14592
+ } = {}) {
14593
+ this.assertRanges({ years, months, days, hours, minutes, seconds, milliseconds });
14594
+ this.years = years;
14595
+ this.months = months;
14596
+ this.days = days;
14597
+ this.hours = hours;
14598
+ this.minutes = minutes;
14599
+ this.seconds = seconds;
14600
+ this.milliseconds = milliseconds;
14601
+ }
14602
+ /** Date arithmetic */
14603
+ addTo(date) {
14604
+ return this.applyTo(date, 1);
14605
+ }
14606
+ subtractFrom(date) {
14607
+ return this.applyTo(date, -1);
14608
+ }
14609
+ /** Duration arithmetic */
14610
+ add(other) {
14611
+ return new _Duration({
14612
+ years: this.years + other.years,
14613
+ months: this.months + other.months,
14614
+ days: this.days + other.days,
14615
+ hours: this.hours + other.hours,
14616
+ minutes: this.minutes + other.minutes,
14617
+ seconds: this.seconds + other.seconds,
14618
+ milliseconds: this.milliseconds + other.milliseconds
14619
+ });
14620
+ }
14621
+ subtract(other) {
14622
+ return new _Duration({
14623
+ years: this.years - other.years,
14624
+ months: this.months - other.months,
14625
+ days: this.days - other.days,
14626
+ hours: this.hours - other.hours,
14627
+ minutes: this.minutes - other.minutes,
14628
+ seconds: this.seconds - other.seconds,
14629
+ milliseconds: this.milliseconds - other.milliseconds
14630
+ });
14631
+ }
14632
+ equals(other) {
14633
+ 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;
14634
+ }
14635
+ toJSON() {
14636
+ return { ...this };
14637
+ }
14638
+ /** Static difference */
14639
+ static difference(start, end) {
14640
+ const diff = end.getTime() - start.getTime();
14641
+ const ms = 1e3;
14642
+ const min = 60 * ms;
14643
+ const hr = 60 * min;
14644
+ const day = 24 * hr;
14645
+ const month = 30 * day;
14646
+ const year = 365.25 * day;
14647
+ return new _Duration({
14648
+ years: Math.floor(diff / year),
14649
+ months: Math.floor(diff / month),
14650
+ days: Math.floor(diff / day),
14651
+ hours: Math.floor(diff % day / hr),
14652
+ minutes: Math.floor(diff % hr / min),
14653
+ seconds: Math.floor(diff % min / ms),
14654
+ milliseconds: diff % ms
14655
+ });
14656
+ }
14657
+ applyTo(date, multiplier) {
14658
+ const d = new Date(date);
14659
+ d.setFullYear(d.getFullYear() + multiplier * this.years);
14660
+ d.setMonth(d.getMonth() + multiplier * this.months);
14661
+ d.setDate(d.getDate() + multiplier * this.days);
14662
+ d.setHours(d.getHours() + multiplier * this.hours);
14663
+ d.setMinutes(d.getMinutes() + multiplier * this.minutes);
14664
+ d.setSeconds(d.getSeconds() + multiplier * this.seconds);
14665
+ d.setMilliseconds(d.getMilliseconds() + multiplier * this.milliseconds);
14666
+ return d;
14667
+ }
14668
+ assertRanges(d) {
14669
+ if (d.years < 0) throw new RangeError("years >= 0");
14670
+ if (d.months < 0 || d.months > 11) throw new RangeError("months: 0\u201311");
14671
+ if (d.days < 0) throw new RangeError("days >= 0");
14672
+ if (d.hours < 0 || d.hours > 23) throw new RangeError("hours: 0\u201323");
14673
+ if (d.minutes < 0 || d.minutes > 59) throw new RangeError("minutes: 0\u201359");
14674
+ if (d.seconds < 0 || d.seconds > 59) throw new RangeError("seconds: 0\u201359");
14675
+ if (d.milliseconds < 0) throw new RangeError("milliseconds >= 0");
14676
+ }
14677
+ valueOf() {
14678
+ return this.milliseconds + this.seconds * 1e3 + this.minutes * 6e4 + this.hours * 36e5 + this.days * 864e5;
14679
+ }
14680
+ };
14681
+
14335
14682
  // src/utils/easeFunctions.ts
14336
14683
  var EaseFunctions = class _EaseFunctions {
14337
14684
  static cubicBezierGeneric(x1, y1, x2, y2) {
@@ -14470,12 +14817,16 @@ var PromiseUtils = {
14470
14817
  DatePicker,
14471
14818
  DatePickerUncontrolled,
14472
14819
  DateProperty,
14820
+ DateTimeInput,
14821
+ DateTimeInputUncontrolled,
14473
14822
  DateTimePicker,
14823
+ DateUtils,
14474
14824
  DayPicker,
14475
14825
  DayPickerUncontrolled,
14476
14826
  Dialog,
14477
14827
  DiscardChangesDialog,
14478
14828
  DividerInserter,
14829
+ Duration,
14479
14830
  EaseFunctions,
14480
14831
  ErrorComponent,
14481
14832
  Expandable,
@@ -14573,6 +14924,7 @@ var PromiseUtils = {
14573
14924
  Transition,
14574
14925
  UseValidators,
14575
14926
  VerticalDivider,
14927
+ Visibility,
14576
14928
  YearMonthPicker,
14577
14929
  YearMonthPickerUncontrolled,
14578
14930
  addDuration,
@@ -14582,19 +14934,16 @@ var PromiseUtils = {
14582
14934
  closestMatch,
14583
14935
  createLoopingList,
14584
14936
  createLoopingListWithIndex,
14585
- equalDate,
14586
14937
  equalSizeGroups,
14587
14938
  formatDate,
14588
14939
  formatDateTime,
14589
14940
  getBetweenDuration,
14590
- getDaysInMonth,
14591
14941
  getNeighbours,
14592
14942
  getWeeksForCalenderMonth,
14593
14943
  hightideTranslation,
14594
14944
  hightideTranslationLocales,
14595
14945
  isInTimeSpan,
14596
14946
  match,
14597
- monthsList,
14598
14947
  noop,
14599
14948
  range,
14600
14949
  resolveSetState,
@@ -14624,7 +14973,6 @@ var PromiseUtils = {
14624
14973
  useTranslatedValidators,
14625
14974
  useZIndexRegister,
14626
14975
  validateEmail,
14627
- weekDayList,
14628
14976
  writeToClipboard
14629
14977
  });
14630
14978
  //# sourceMappingURL=index.js.map