@helpwave/hightide 0.2.0 → 0.4.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
@@ -6246,7 +6246,7 @@ __export(index_exports, {
6246
6246
  AvatarUtil: () => AvatarUtil,
6247
6247
  BagFunctionUtil: () => BagFunctionUtil,
6248
6248
  BreadCrumb: () => BreadCrumb,
6249
- ButtonColorUtil: () => ButtonColorUtil,
6249
+ Button: () => Button,
6250
6250
  ButtonUtil: () => ButtonUtil,
6251
6251
  Carousel: () => Carousel,
6252
6252
  CarouselSlide: () => CarouselSlide,
@@ -6280,8 +6280,6 @@ __export(index_exports, {
6280
6280
  FormElementWrapper: () => FormElementWrapper,
6281
6281
  HelpwaveBadge: () => HelpwaveBadge,
6282
6282
  HelpwaveLogo: () => HelpwaveLogo,
6283
- IconButton: () => IconButton,
6284
- IconButtonUtil: () => IconButtonUtil,
6285
6283
  Input: () => Input,
6286
6284
  InputDialog: () => InputDialog,
6287
6285
  InputUncontrolled: () => InputUncontrolled,
@@ -6317,7 +6315,6 @@ __export(index_exports, {
6317
6315
  Navigation: () => Navigation,
6318
6316
  NavigationItemList: () => NavigationItemList,
6319
6317
  NumberProperty: () => NumberProperty,
6320
- OutlineButton: () => OutlineButton,
6321
6318
  Pagination: () => Pagination,
6322
6319
  ProgressIndicator: () => ProgressIndicator,
6323
6320
  PromiseUtils: () => PromiseUtils,
@@ -6338,7 +6335,6 @@ __export(index_exports, {
6338
6335
  SimpleSearch: () => SimpleSearch,
6339
6336
  SimpleSearchWithMapping: () => SimpleSearchWithMapping,
6340
6337
  SingleSelectProperty: () => SingleSelectProperty,
6341
- SolidButton: () => SolidButton,
6342
6338
  StepperBar: () => StepperBar,
6343
6339
  StepperBarUncontrolled: () => StepperBarUncontrolled,
6344
6340
  Tab: () => Tab,
@@ -6351,7 +6347,6 @@ __export(index_exports, {
6351
6347
  TableUncontrolled: () => TableUncontrolled,
6352
6348
  TableWithSelection: () => TableWithSelection,
6353
6349
  TagIcon: () => TagIcon,
6354
- TextButton: () => TextButton,
6355
6350
  TextImage: () => TextImage,
6356
6351
  TextProperty: () => TextProperty,
6357
6352
  Textarea: () => Textarea,
@@ -6383,7 +6378,6 @@ __export(index_exports, {
6383
6378
  equalSizeGroups: () => equalSizeGroups,
6384
6379
  formatDate: () => formatDate,
6385
6380
  formatDateTime: () => formatDateTime,
6386
- generateShadingColors: () => generateShadingColors,
6387
6381
  getBetweenDuration: () => getBetweenDuration,
6388
6382
  getDaysInMonth: () => getDaysInMonth,
6389
6383
  getNeighbours: () => getNeighbours,
@@ -6396,7 +6390,6 @@ __export(index_exports, {
6396
6390
  noop: () => noop,
6397
6391
  range: () => range,
6398
6392
  resolveSetState: () => resolveSetState,
6399
- shadingColorValues: () => shadingColorValues,
6400
6393
  subtractDuration: () => subtractDuration,
6401
6394
  useDelay: () => useDelay,
6402
6395
  useFloatingElement: () => useFloatingElement,
@@ -6421,56 +6414,13 @@ __export(index_exports, {
6421
6414
  useTabContext: () => useTabContext,
6422
6415
  useTheme: () => useTheme,
6423
6416
  useTranslatedValidators: () => useTranslatedValidators,
6417
+ useZIndexRegister: () => useZIndexRegister,
6424
6418
  validateEmail: () => validateEmail,
6425
6419
  weekDayList: () => weekDayList,
6426
6420
  writeToClipboard: () => writeToClipboard
6427
6421
  });
6428
6422
  module.exports = __toCommonJS(index_exports);
6429
6423
 
6430
- // src/coloring/shading.ts
6431
- var import_tinycolor2 = __toESM(require("tinycolor2"));
6432
-
6433
- // src/coloring/types.ts
6434
- var shadingColorValues = [0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1e3];
6435
-
6436
- // src/coloring/shading.ts
6437
- var generateShadingColors = (partialShading) => {
6438
- const shading = {
6439
- 0: "#FFFFFF",
6440
- 1e3: "#000000"
6441
- };
6442
- let index = 1;
6443
- while (index < shadingColorValues.length - 1) {
6444
- const previous = shadingColorValues[index - 1];
6445
- const current = shadingColorValues[index];
6446
- if (partialShading[current] !== void 0) {
6447
- shading[current] = partialShading[current];
6448
- index++;
6449
- continue;
6450
- }
6451
- let j = index + 1;
6452
- while (j < shadingColorValues.length) {
6453
- if (partialShading[shadingColorValues[j]] !== void 0) {
6454
- break;
6455
- }
6456
- j++;
6457
- }
6458
- if (j === shadingColorValues.length) {
6459
- j = shadingColorValues.length - 1;
6460
- }
6461
- const nextFound = shadingColorValues[j];
6462
- const interval = nextFound - previous;
6463
- for (let k = index; k < j; k++) {
6464
- const current2 = shadingColorValues[k];
6465
- const previousValue = partialShading[previous] ?? shading[previous];
6466
- const nextValue = partialShading[nextFound] ?? shading[nextFound];
6467
- shading[current2] = import_tinycolor2.default.mix((0, import_tinycolor2.default)(previousValue), (0, import_tinycolor2.default)(nextValue), (current2 - previous) / interval * 100).toHexString();
6468
- }
6469
- index = j;
6470
- }
6471
- return shading;
6472
- };
6473
-
6474
6424
  // src/components/icons-and-geometry/HelpwaveLogo.tsx
6475
6425
  var import_clsx = require("clsx");
6476
6426
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -6864,7 +6814,7 @@ var useOverwritableState = (initialValue, onChange) => {
6864
6814
  };
6865
6815
 
6866
6816
  // src/components/date/DayPicker.tsx
6867
- var import_clsx3 = __toESM(require("clsx"));
6817
+ var import_clsx4 = __toESM(require("clsx"));
6868
6818
 
6869
6819
  // src/i18n/LocaleProvider.tsx
6870
6820
  var import_react3 = require("react");
@@ -7510,8 +7460,83 @@ var useLanguage = () => {
7510
7460
  };
7511
7461
 
7512
7462
  // src/components/date/DayPicker.tsx
7463
+ var import_react5 = require("react");
7464
+
7465
+ // src/components/user-action/Button.tsx
7513
7466
  var import_react4 = require("react");
7467
+ var import_clsx3 = __toESM(require("clsx"));
7514
7468
  var import_jsx_runtime4 = require("react/jsx-runtime");
7469
+ var buttonColorsList = ["primary", "secondary", "positive", "warning", "negative", "neutral", "none"];
7470
+ var paddingMapping = {
7471
+ default: {
7472
+ tiny: "btn-xs",
7473
+ small: "btn-sm",
7474
+ medium: "btn-md",
7475
+ large: "btn-lg"
7476
+ },
7477
+ icon: {
7478
+ tiny: "icon-btn-xs",
7479
+ small: "icon-btn-sm",
7480
+ medium: "icon-btn-md",
7481
+ large: "icon-btn-lg"
7482
+ },
7483
+ none: {}
7484
+ };
7485
+ var ButtonUtil = {
7486
+ colors: buttonColorsList,
7487
+ colorClasses: {
7488
+ primary: "primary",
7489
+ secondary: "secondary",
7490
+ positive: "positive",
7491
+ warning: "warning",
7492
+ negative: "negative",
7493
+ neutral: "neutral",
7494
+ none: "reset-coloring-variables"
7495
+ }
7496
+ };
7497
+ var Button = (0, import_react4.forwardRef)(function SolidButton({
7498
+ children,
7499
+ layout = "default",
7500
+ size = "medium",
7501
+ color = "primary",
7502
+ coloringStyle = "solid",
7503
+ startIcon,
7504
+ endIcon,
7505
+ disabled,
7506
+ className,
7507
+ ...restProps
7508
+ }, ref) {
7509
+ const colorClasses = ButtonUtil.colorClasses[color];
7510
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7511
+ "button",
7512
+ {
7513
+ ...restProps,
7514
+ ref,
7515
+ className: (0, import_clsx3.default)(
7516
+ "group font-semibold",
7517
+ {
7518
+ "disabled": disabled,
7519
+ [colorClasses]: !disabled,
7520
+ "coloring-solid-hover": coloringStyle === "solid",
7521
+ "coloring-text-hover": coloringStyle === "text",
7522
+ "coloring-outline-hover": coloringStyle === "outline",
7523
+ "coloring-tonal-hover": coloringStyle === "tonal"
7524
+ },
7525
+ paddingMapping[layout][size],
7526
+ className
7527
+ ),
7528
+ disabled,
7529
+ children: [
7530
+ startIcon,
7531
+ children,
7532
+ endIcon
7533
+ ]
7534
+ }
7535
+ );
7536
+ });
7537
+
7538
+ // src/components/date/DayPicker.tsx
7539
+ var import_jsx_runtime5 = require("react/jsx-runtime");
7515
7540
  var DayPicker = ({
7516
7541
  displayedMonth,
7517
7542
  selected,
@@ -7525,27 +7550,26 @@ var DayPicker = ({
7525
7550
  const { locale } = useLocale();
7526
7551
  const month = displayedMonth.getMonth();
7527
7552
  const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
7528
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx3.default)("flex-col-1 min-w-[220px] select-none", className), children: [
7529
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-row-2 text-center", children: weeks[0].map((weekDay, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-1 font-semibold", children: new Intl.DateTimeFormat(locale, { weekday: "long" }).format(weekDay).substring(0, 2) }, index)) }),
7530
- weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex-row-2 text-center", children: week.map((date) => {
7553
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx4.default)("flex-col-1 min-w-[220px] select-none", className), children: [
7554
+ /* @__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
+ weeks.map((week, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-row-2 text-center", children: week.map((date) => {
7531
7556
  const isSelected = !!selected && equalDate(selected, date);
7532
7557
  const isToday = equalDate(/* @__PURE__ */ new Date(), date);
7533
7558
  const isSameMonth = date.getMonth() === month;
7534
7559
  const isDayValid = isInTimeSpan(date, start, end);
7535
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7536
- "button",
7560
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7561
+ Button,
7537
7562
  {
7538
7563
  disabled: !isDayValid,
7539
- className: (0, import_clsx3.default)(
7564
+ color: isSelected ? "primary" : "neutral",
7565
+ coloringStyle: isSelected ? "solid" : "text",
7566
+ size: "small",
7567
+ className: (0, import_clsx4.default)(
7540
7568
  "flex-1 rounded-full border-2",
7541
7569
  {
7542
7570
  "text-description": !isSameMonth && !isSelected && isDayValid,
7543
- "text-button-solid-neutral-text bg-button-solid-neutral-background": !isSelected && isSameMonth && isDayValid,
7544
- "text-button-solid-primary-text bg-button-solid-primary-background": isSelected && isDayValid,
7545
- "hover:brightness-90 hover:bg-button-solid-primary-background hover:text-button-solid-primary-text": isDayValid,
7546
- "text-disabled bg-disabled-background cursor-not-allowed": !isDayValid,
7547
- "border-secondary": isToday && markToday,
7548
- "border-transparent": !isToday || !markToday
7571
+ "border-on-background": isToday && markToday,
7572
+ "border-transparent": !(isToday && markToday)
7549
7573
  }
7550
7574
  ),
7551
7575
  onClick: () => onChange?.(date),
@@ -7562,13 +7586,13 @@ var DayPickerUncontrolled = ({
7562
7586
  onChange,
7563
7587
  ...restProps
7564
7588
  }) => {
7565
- const [date, setDate] = (0, import_react4.useState)(selected);
7566
- const [usedDisplayedMonth, setUsedDDisplayedMonth] = (0, import_react4.useState)(displayedMonth);
7567
- (0, import_react4.useEffect)(() => {
7589
+ const [date, setDate] = (0, import_react5.useState)(selected);
7590
+ const [usedDisplayedMonth, setUsedDDisplayedMonth] = (0, import_react5.useState)(displayedMonth);
7591
+ (0, import_react5.useEffect)(() => {
7568
7592
  setDate(selected);
7569
7593
  setUsedDDisplayedMonth(selected);
7570
7594
  }, [selected]);
7571
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7595
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7572
7596
  DayPicker,
7573
7597
  {
7574
7598
  displayedMonth: usedDisplayedMonth,
@@ -7585,20 +7609,19 @@ var DayPickerUncontrolled = ({
7585
7609
 
7586
7610
  // src/components/date/YearMonthPicker.tsx
7587
7611
  var import_react7 = require("react");
7588
- var import_react_custom_scrollbars_2 = require("react-custom-scrollbars-2");
7589
7612
  var import_clsx6 = __toESM(require("clsx"));
7590
7613
 
7591
7614
  // src/components/layout/Expandable.tsx
7592
- var import_react5 = require("react");
7615
+ var import_react6 = require("react");
7593
7616
  var import_lucide_react = require("lucide-react");
7594
- var import_clsx4 = __toESM(require("clsx"));
7595
- var import_jsx_runtime5 = require("react/jsx-runtime");
7617
+ var import_clsx5 = __toESM(require("clsx"));
7618
+ var import_jsx_runtime6 = require("react/jsx-runtime");
7596
7619
  var ExpansionIcon = ({ isExpanded, className }) => {
7597
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7620
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7598
7621
  import_lucide_react.ChevronDown,
7599
7622
  {
7600
7623
  "aria-hidden": true,
7601
- className: (0, import_clsx4.default)(
7624
+ className: (0, import_clsx5.default)(
7602
7625
  "min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
7603
7626
  { "rotate-180": isExpanded },
7604
7627
  className
@@ -7606,7 +7629,7 @@ var ExpansionIcon = ({ isExpanded, className }) => {
7606
7629
  }
7607
7630
  );
7608
7631
  };
7609
- var Expandable = (0, import_react5.forwardRef)(function Expandable2({
7632
+ var Expandable = (0, import_react6.forwardRef)(function Expandable2({
7610
7633
  children,
7611
7634
  id: providedId,
7612
7635
  label,
@@ -7620,27 +7643,27 @@ var Expandable = (0, import_react5.forwardRef)(function Expandable2({
7620
7643
  contentClassName,
7621
7644
  contentExpandedClassName
7622
7645
  }, ref) {
7623
- const defaultIcon = (0, import_react5.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
7646
+ const defaultIcon = (0, import_react6.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
7624
7647
  icon ??= defaultIcon;
7625
- const generatedId = (0, import_react5.useId)();
7648
+ const generatedId = (0, import_react6.useId)();
7626
7649
  const id = providedId ?? generatedId;
7627
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7650
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7628
7651
  "div",
7629
7652
  {
7630
7653
  ref,
7631
7654
  onClick: () => !clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
7632
- className: (0, import_clsx4.default)(
7633
- "flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
7655
+ className: (0, import_clsx5.default)(
7656
+ "flex-col-0 surface coloring-solid group rounded-lg shadow-sm",
7634
7657
  { "cursor-pointer": !clickOnlyOnHeader && !disabled },
7635
7658
  className
7636
7659
  ),
7637
7660
  children: [
7638
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
7661
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7639
7662
  "button",
7640
7663
  {
7641
7664
  onClick: () => clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
7642
- className: (0, import_clsx4.default)(
7643
- "flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
7665
+ className: (0, import_clsx5.default)(
7666
+ "flex-row-2 py-2 px-4 rounded-lg justify-between items-center coloring-solid-hover select-none",
7644
7667
  {
7645
7668
  "group-hover:brightness-97": !isExpanded,
7646
7669
  "hover:brightness-97": isExpanded && !disabled,
@@ -7657,14 +7680,14 @@ var Expandable = (0, import_react5.forwardRef)(function Expandable2({
7657
7680
  ]
7658
7681
  }
7659
7682
  ),
7660
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7683
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7661
7684
  "div",
7662
7685
  {
7663
7686
  id: `${id}-content`,
7664
- className: (0, import_clsx4.default)(
7687
+ className: (0, import_clsx5.default)(
7665
7688
  "flex-col-2 px-4 transition-all duration-300 ease-in-out",
7666
7689
  {
7667
- [(0, import_clsx4.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
7690
+ [(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
7668
7691
  "max-h-0 opacity-0 overflow-hidden": !isExpanded
7669
7692
  },
7670
7693
  contentClassName
@@ -7677,13 +7700,13 @@ var Expandable = (0, import_react5.forwardRef)(function Expandable2({
7677
7700
  }
7678
7701
  );
7679
7702
  });
7680
- var ExpandableUncontrolled = (0, import_react5.forwardRef)(function ExpandableUncontrolled2({
7703
+ var ExpandableUncontrolled = (0, import_react6.forwardRef)(function ExpandableUncontrolled2({
7681
7704
  isExpanded,
7682
7705
  onChange,
7683
7706
  ...props
7684
7707
  }, ref) {
7685
7708
  const [usedIsExpanded, setUsedIsExpanded] = useOverwritableState(isExpanded, onChange);
7686
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
7709
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7687
7710
  Expandable,
7688
7711
  {
7689
7712
  ...props,
@@ -7694,265 +7717,6 @@ var ExpandableUncontrolled = (0, import_react5.forwardRef)(function ExpandableUn
7694
7717
  );
7695
7718
  });
7696
7719
 
7697
- // src/components/user-action/Button.tsx
7698
- var import_react6 = require("react");
7699
- var import_clsx5 = __toESM(require("clsx"));
7700
- var import_jsx_runtime6 = require("react/jsx-runtime");
7701
- var ButtonColorUtil = {
7702
- solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
7703
- text: ["primary", "negative", "neutral"],
7704
- outline: ["primary"]
7705
- };
7706
- var IconButtonUtil = {
7707
- icon: [...ButtonColorUtil.solid, "transparent"]
7708
- };
7709
- var paddingMapping = {
7710
- none: "",
7711
- small: "btn-sm",
7712
- medium: "btn-md",
7713
- large: "btn-lg"
7714
- };
7715
- var iconPaddingMapping = {
7716
- none: "",
7717
- tiny: "icon-btn-xs",
7718
- small: "icon-btn-sm",
7719
- medium: "icon-btn-md",
7720
- large: "icon-btn-lg"
7721
- };
7722
- var ButtonUtil = {
7723
- paddingMapping,
7724
- iconPaddingMapping
7725
- };
7726
- var SolidButton = (0, import_react6.forwardRef)(function SolidButton2({
7727
- children,
7728
- color = "primary",
7729
- size = "medium",
7730
- startIcon,
7731
- endIcon,
7732
- onClick,
7733
- className,
7734
- ...restProps
7735
- }, ref) {
7736
- const colorClasses = {
7737
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
7738
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
7739
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
7740
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
7741
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
7742
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
7743
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
7744
- }[color];
7745
- const iconColorClasses = {
7746
- primary: "not-group-disabled:text-button-solid-primary-icon",
7747
- secondary: "not-group-disabled:text-button-solid-secondary-icon",
7748
- tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
7749
- positive: "not-group-disabled:text-button-solid-positive-icon",
7750
- warning: "not-group-disabled:text-button-solid-warning-icon",
7751
- negative: "not-group-disabled:text-button-solid-negative-icon",
7752
- neutral: "not-group-disabled:text-button-solid-neutral-icon"
7753
- }[color];
7754
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7755
- "button",
7756
- {
7757
- ref,
7758
- onClick,
7759
- className: (0, import_clsx5.default)(
7760
- "group font-semibold",
7761
- colorClasses,
7762
- "not-disabled:hover:brightness-90",
7763
- "disabled:text-disabled disabled:bg-disabled-background",
7764
- ButtonUtil.paddingMapping[size],
7765
- className
7766
- ),
7767
- ...restProps,
7768
- children: [
7769
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7770
- "span",
7771
- {
7772
- className: (0, import_clsx5.default)(
7773
- iconColorClasses,
7774
- "group-disabled:text-disabled-icon"
7775
- ),
7776
- children: startIcon
7777
- }
7778
- ),
7779
- children,
7780
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7781
- "span",
7782
- {
7783
- className: (0, import_clsx5.default)(
7784
- iconColorClasses,
7785
- "group-disabled:text-disabled-icon"
7786
- ),
7787
- children: endIcon
7788
- }
7789
- )
7790
- ]
7791
- }
7792
- );
7793
- });
7794
- var OutlineButton = ({
7795
- children,
7796
- color = "primary",
7797
- size = "medium",
7798
- startIcon,
7799
- endIcon,
7800
- onClick,
7801
- className,
7802
- ...restProps
7803
- }) => {
7804
- const colorClasses = {
7805
- primary: "not-disabled:border-button-outline-primary-text not-disabled:text-button-outline-primary-text"
7806
- }[color];
7807
- const iconColorClasses = {
7808
- primary: "not-group-disabled:text-button-outline-primary-icon"
7809
- }[color];
7810
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7811
- "button",
7812
- {
7813
- onClick,
7814
- className: (0, import_clsx5.default)(
7815
- "group font-semibold bg-transparent border-2 ",
7816
- "not-disabled:hover:brightness-80",
7817
- colorClasses,
7818
- "disabled:text-disabled disabled:border-disabled-outline",
7819
- ButtonUtil.paddingMapping[size],
7820
- className
7821
- ),
7822
- ...restProps,
7823
- children: [
7824
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7825
- "span",
7826
- {
7827
- className: (0, import_clsx5.default)(
7828
- iconColorClasses,
7829
- "group-disabled:text-disabled-icon"
7830
- ),
7831
- children: startIcon
7832
- }
7833
- ),
7834
- children,
7835
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7836
- "span",
7837
- {
7838
- className: (0, import_clsx5.default)(
7839
- iconColorClasses,
7840
- "group-disabled:text-disabled-icon"
7841
- ),
7842
- children: endIcon
7843
- }
7844
- )
7845
- ]
7846
- }
7847
- );
7848
- };
7849
- var TextButton = ({
7850
- children,
7851
- color = "neutral",
7852
- size = "medium",
7853
- startIcon,
7854
- endIcon,
7855
- onClick,
7856
- coloredHoverBackground = true,
7857
- className,
7858
- ...restProps
7859
- }) => {
7860
- const colorClasses = {
7861
- primary: "not-disabled:bg-transparent not-disabled:text-button-text-primary-text not-disabled:focus-visible:outline-button-text-primary-text",
7862
- negative: "not-disabled:bg-transparent not-disabled:text-button-text-negative-text not-disabled:focus-visible:outline-button-text-negative-text",
7863
- neutral: "not-disabled:bg-transparent not-disabled:text-button-text-neutral-text not-disabled:focus-visible:outline-button-text-neutral-text"
7864
- }[color];
7865
- const backgroundColor = {
7866
- primary: "not-disabled:hover:bg-button-text-primary-text/20 not-disabled:focus-visible:bg-button-text-primary-text/20",
7867
- negative: "not-disabled:hover:bg-button-text-negative-text/20 not-disabled:focus-visible:bg-button-text-negative-text/20",
7868
- neutral: "not-disabled:hover:bg-button-text-neutral-text/20 not-disabled:focus-visible:bg-button-text-neutral-text/20"
7869
- }[color];
7870
- const iconColorClasses = {
7871
- primary: "not-group-disabled:text-button-text-primary-icon",
7872
- negative: "not-group-disabled:text-button-text-negative-icon",
7873
- neutral: "not-group-disabled:text-button-text-neutral-icon"
7874
- }[color];
7875
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7876
- "button",
7877
- {
7878
- onClick,
7879
- className: (0, import_clsx5.default)(
7880
- "group font-semibold",
7881
- "disabled:text-disabled",
7882
- colorClasses,
7883
- {
7884
- [backgroundColor]: coloredHoverBackground,
7885
- "not-disabled:hover:bg-button-text-hover-background": !coloredHoverBackground
7886
- },
7887
- ButtonUtil.paddingMapping[size],
7888
- className
7889
- ),
7890
- ...restProps,
7891
- children: [
7892
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7893
- "span",
7894
- {
7895
- className: (0, import_clsx5.default)(
7896
- iconColorClasses,
7897
- "group-disabled:text-disabled-icon"
7898
- ),
7899
- children: startIcon
7900
- }
7901
- ),
7902
- children,
7903
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7904
- "span",
7905
- {
7906
- className: (0, import_clsx5.default)(
7907
- iconColorClasses,
7908
- "group-disabled:text-disabled-icon"
7909
- ),
7910
- children: endIcon
7911
- }
7912
- )
7913
- ]
7914
- }
7915
- );
7916
- };
7917
- var IconButton = (0, import_react6.forwardRef)(function IconButton2({
7918
- children,
7919
- color = "primary",
7920
- size = "medium",
7921
- className,
7922
- ...restProps
7923
- }, ref) {
7924
- const colorClasses = {
7925
- primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
7926
- secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
7927
- tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
7928
- positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
7929
- warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
7930
- negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
7931
- neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
7932
- transparent: "not-disabled:bg-transparent"
7933
- }[color];
7934
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7935
- "button",
7936
- {
7937
- ref,
7938
- className: (0, import_clsx5.default)(
7939
- colorClasses,
7940
- "not-disabled:hover:brightness-90",
7941
- "disabled:text-disabled",
7942
- {
7943
- "disabled:bg-disabled-background": color !== "transparent",
7944
- "disabled:opacity-70": color === "transparent",
7945
- "not-disabled:hover:bg-button-text-hover-background": color === "transparent"
7946
- },
7947
- ButtonUtil.iconPaddingMapping[size],
7948
- className
7949
- ),
7950
- ...restProps,
7951
- children
7952
- }
7953
- );
7954
- });
7955
-
7956
7720
  // src/components/date/YearMonthPicker.tsx
7957
7721
  var import_jsx_runtime7 = require("react/jsx-runtime");
7958
7722
  var YearMonthPicker = ({
@@ -7961,7 +7725,6 @@ var YearMonthPicker = ({
7961
7725
  end = addDuration(/* @__PURE__ */ new Date(), { years: 50 }),
7962
7726
  onChange,
7963
7727
  className = "",
7964
- maxHeight = 300,
7965
7728
  showValueOpen = true
7966
7729
  }) => {
7967
7730
  const { locale } = useLocale();
@@ -7982,7 +7745,7 @@ var YearMonthPicker = ({
7982
7745
  return null;
7983
7746
  }
7984
7747
  const years = range([start.getFullYear(), end.getFullYear()], { exclusiveEnd: false });
7985
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx6.default)("flex-col-0 select-none", className), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_custom_scrollbars_2.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex-col-1 mr-3", children: years.map((year) => {
7748
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx6.default)("flex-col-1 select-none overflow-y-auto", className), children: years.map((year) => {
7986
7749
  const selectedYear = displayedYearMonth.getFullYear() === year;
7987
7750
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
7988
7751
  ExpandableUncontrolled,
@@ -8001,7 +7764,7 @@ var YearMonthPicker = ({
8001
7764
  const isBeforeEnd = end === void 0 || firstOfMonth <= end;
8002
7765
  const isValid = isAfterStart && isBeforeEnd;
8003
7766
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
8004
- SolidButton,
7767
+ Button,
8005
7768
  {
8006
7769
  disabled: !isValid,
8007
7770
  color: selectedMonth && isValid ? "primary" : "neutral",
@@ -8018,7 +7781,7 @@ var YearMonthPicker = ({
8018
7781
  },
8019
7782
  year
8020
7783
  );
8021
- }) }) }) });
7784
+ }) });
8022
7785
  };
8023
7786
  var YearMonthPickerUncontrolled = ({
8024
7787
  displayedYearMonth,
@@ -8036,37 +7799,6 @@ var YearMonthPickerUncontrolled = ({
8036
7799
  );
8037
7800
  };
8038
7801
 
8039
- // src/i18n/useHightideTranslation.ts
8040
- var import_internationalization2 = require("@helpwave/internationalization");
8041
- function useICUTranslation(translations, locale) {
8042
- translations = Array.isArray(translations) ? translations : [translations];
8043
- return function translate(key, values) {
8044
- try {
8045
- for (let i = 0; i < translations.length; i++) {
8046
- const localizedTranslation = translations[i][locale];
8047
- if (!localizedTranslation) continue;
8048
- const msg = localizedTranslation[key];
8049
- if (typeof msg === "string") {
8050
- return import_internationalization2.ICUUtil.interpret(msg, values);
8051
- }
8052
- }
8053
- console.warn(`useTranslation: No translation for key "${key}" found.`);
8054
- } catch (e) {
8055
- console.error(`useTranslation: Error translating key "${String(key)}"`, e);
8056
- }
8057
- return `{{${String(locale)}:${String(key)}}}`;
8058
- };
8059
- }
8060
- function useHightideTranslation(extensions, overwrites) {
8061
- const { locale: inferredLocale } = useLocale();
8062
- const locale = overwrites?.locale ?? inferredLocale;
8063
- const translationExtensions = ArrayUtil.resolveSingleOrArray(extensions);
8064
- return (0, import_internationalization2.combineTranslation)([
8065
- ...translationExtensions,
8066
- hightideTranslation
8067
- ], locale);
8068
- }
8069
-
8070
7802
  // src/components/date/DatePicker.tsx
8071
7803
  var import_jsx_runtime8 = require("react/jsx-runtime");
8072
7804
  var DatePicker = ({
@@ -8080,17 +7812,18 @@ var DatePicker = ({
8080
7812
  className = ""
8081
7813
  }) => {
8082
7814
  const { locale } = useLocale();
8083
- const translation = useHightideTranslation();
8084
7815
  const [displayedMonth, setDisplayedMonth] = (0, import_react8.useState)(value);
8085
7816
  const [displayMode, setDisplayMode] = (0, import_react8.useState)(initialDisplay);
8086
7817
  (0, import_react8.useEffect)(() => {
8087
7818
  setDisplayedMonth(value);
8088
7819
  }, [value]);
8089
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.default)("flex-col-4", className), children: [
8090
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-row-2 items-center justify-between h-7", children: [
7820
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.default)("flex-col-3", className), children: [
7821
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-row-2 items-center justify-between", children: [
8091
7822
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
8092
- TextButton,
7823
+ Button,
8093
7824
  {
7825
+ size: "small",
7826
+ coloringStyle: "text",
8094
7827
  className: (0, import_clsx7.default)("flex-row-1 items-center cursor-pointer select-none", {
8095
7828
  "text-disabled": displayMode !== "day"
8096
7829
  }),
@@ -8103,10 +7836,22 @@ var DatePicker = ({
8103
7836
  ),
8104
7837
  displayMode === "day" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-row-2 justify-end", children: [
8105
7838
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8106
- SolidButton,
7839
+ Button,
7840
+ {
7841
+ size: "small",
7842
+ coloringStyle: "tonal",
7843
+ onClick: () => {
7844
+ const newDate = /* @__PURE__ */ new Date();
7845
+ newDate.setHours(value.getHours(), value.getMinutes());
7846
+ onChange(newDate);
7847
+ },
7848
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Calendar, { className: "size-5" })
7849
+ }
7850
+ ),
7851
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
7852
+ Button,
8107
7853
  {
8108
7854
  size: "small",
8109
- color: "primary",
8110
7855
  disabled: !isInTimeSpan(subtractDuration(displayedMonth, { months: 1 }), start, end),
8111
7856
  onClick: () => {
8112
7857
  setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }));
@@ -8115,10 +7860,9 @@ var DatePicker = ({
8115
7860
  }
8116
7861
  ),
8117
7862
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8118
- SolidButton,
7863
+ Button,
8119
7864
  {
8120
7865
  size: "small",
8121
- color: "primary",
8122
7866
  disabled: !isInTimeSpan(addDuration(displayedMonth, { months: 1 }), start, end),
8123
7867
  onClick: () => {
8124
7868
  setDisplayedMonth(addDuration(displayedMonth, { months: 1 }));
@@ -8140,33 +7884,19 @@ var DatePicker = ({
8140
7884
  setDisplayMode("day");
8141
7885
  }
8142
7886
  }
8143
- ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
8144
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8145
- DayPicker,
8146
- {
8147
- ...dayPickerProps,
8148
- displayedMonth,
8149
- start,
8150
- end,
8151
- selected: value,
8152
- onChange: (date) => {
8153
- onChange?.(date);
8154
- }
8155
- }
8156
- ),
8157
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
8158
- TextButton,
8159
- {
8160
- color: "primary",
8161
- onClick: () => {
8162
- const newDate = /* @__PURE__ */ new Date();
8163
- newDate.setHours(value.getHours(), value.getMinutes());
8164
- onChange(newDate);
8165
- },
8166
- children: translation("time.today")
7887
+ ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
7888
+ DayPicker,
7889
+ {
7890
+ ...dayPickerProps,
7891
+ displayedMonth,
7892
+ start,
7893
+ end,
7894
+ selected: value,
7895
+ onChange: (date) => {
7896
+ onChange?.(date);
8167
7897
  }
8168
- ) })
8169
- ] })
7898
+ }
7899
+ )
8170
7900
  ] });
8171
7901
  };
8172
7902
  var DatePickerUncontrolled = ({
@@ -8185,6 +7915,37 @@ var DatePickerUncontrolled = ({
8185
7915
  );
8186
7916
  };
8187
7917
 
7918
+ // src/i18n/useHightideTranslation.ts
7919
+ var import_internationalization2 = require("@helpwave/internationalization");
7920
+ function useICUTranslation(translations, locale) {
7921
+ translations = Array.isArray(translations) ? translations : [translations];
7922
+ return function translate(key, values) {
7923
+ try {
7924
+ for (let i = 0; i < translations.length; i++) {
7925
+ const localizedTranslation = translations[i][locale];
7926
+ if (!localizedTranslation) continue;
7927
+ const msg = localizedTranslation[key];
7928
+ if (typeof msg === "string") {
7929
+ return import_internationalization2.ICUUtil.interpret(msg, values);
7930
+ }
7931
+ }
7932
+ console.warn(`useTranslation: No translation for key "${key}" found.`);
7933
+ } catch (e) {
7934
+ console.error(`useTranslation: Error translating key "${String(key)}"`, e);
7935
+ }
7936
+ return `{{${String(locale)}:${String(key)}}}`;
7937
+ };
7938
+ }
7939
+ function useHightideTranslation(extensions, overwrites) {
7940
+ const { locale: inferredLocale } = useLocale();
7941
+ const locale = overwrites?.locale ?? inferredLocale;
7942
+ const translationExtensions = ArrayUtil.resolveSingleOrArray(extensions);
7943
+ return (0, import_internationalization2.combineTranslation)([
7944
+ ...translationExtensions,
7945
+ hightideTranslation
7946
+ ], locale);
7947
+ }
7948
+
8188
7949
  // src/components/date/TimeDisplay.tsx
8189
7950
  var import_jsx_runtime9 = require("react/jsx-runtime");
8190
7951
  var TimeDisplay = ({
@@ -8228,7 +7989,6 @@ var TimeDisplay = ({
8228
7989
 
8229
7990
  // src/components/date/TimePicker.tsx
8230
7991
  var import_react9 = require("react");
8231
- var import_react_custom_scrollbars_22 = require("react-custom-scrollbars-2");
8232
7992
  var import_clsx8 = __toESM(require("clsx"));
8233
7993
  var import_jsx_runtime10 = require("react/jsx-runtime");
8234
7994
  var TimePicker = ({
@@ -8236,13 +7996,13 @@ var TimePicker = ({
8236
7996
  onChange,
8237
7997
  is24HourFormat = true,
8238
7998
  minuteIncrement = "5min",
8239
- maxHeight = 300,
7999
+ maxHeight = 280,
8240
8000
  className = ""
8241
8001
  }) => {
8242
8002
  const minuteRef = (0, import_react9.useRef)(null);
8243
8003
  const hourRef = (0, import_react9.useRef)(null);
8244
8004
  const isPM = time.getHours() >= 11;
8245
- const hours = is24HourFormat ? range(24) : range([1, 12], { exclusiveEnd: false });
8005
+ const hours = is24HourFormat ? range(24) : range(12);
8246
8006
  let minutes = range(60);
8247
8007
  (0, import_react9.useEffect)(() => {
8248
8008
  const scrollToItem = () => {
@@ -8289,55 +8049,55 @@ var TimePicker = ({
8289
8049
  break;
8290
8050
  }
8291
8051
  const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - time.getMinutes()) < Math.abs(item2 - time.getMinutes()));
8292
- const style = (selected) => (0, import_clsx8.default)(
8293
- "chip-full hover:brightness-90 hover:bg-primary hover:text-on-primary rounded-md mr-3",
8294
- { "bg-primary text-on-primary": selected, "bg-white text-black": !selected }
8295
- );
8296
8052
  const onChangeWrapper = (transformer) => {
8297
8053
  const newDate = new Date(time);
8298
8054
  transformer(newDate);
8299
8055
  onChange?.(newDate);
8300
8056
  };
8301
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_clsx8.default)("flex-row-2 w-fit min-w-[150px] select-none", className), children: [
8302
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-col-1 h-full", children: hours.map((hour) => {
8303
- const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
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: [
8058
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-col-1 h-full overflow-y-auto min-w-16", children: hours.map((hour) => {
8059
+ const isSelected = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0);
8304
8060
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8305
- "button",
8061
+ Button,
8306
8062
  {
8307
- ref: currentHour ? hourRef : void 0,
8308
- className: style(currentHour),
8063
+ size: "small",
8064
+ color: isSelected ? "primary" : "neutral",
8065
+ ref: isSelected ? hourRef : void 0,
8309
8066
  onClick: () => onChangeWrapper((newDate) => newDate.setHours(hour + (!is24HourFormat && isPM ? 12 : 0))),
8310
8067
  children: hour.toString().padStart(2, "0")
8311
8068
  },
8312
8069
  hour
8313
8070
  );
8314
- }) }) }),
8315
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_custom_scrollbars_22.Scrollbars, { autoHeight: true, autoHeightMax: maxHeight, style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-col-1 h-full", children: minutes.map((minute) => {
8316
- const currentMinute = minute === closestMinute;
8071
+ }) }),
8072
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-col-1 h-full overflow-y-auto min-w-16", children: minutes.map((minute) => {
8073
+ const isSelected = minute === closestMinute;
8317
8074
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8318
- "button",
8075
+ Button,
8319
8076
  {
8320
- ref: currentMinute ? minuteRef : void 0,
8321
- className: style(currentMinute),
8077
+ size: "small",
8078
+ color: isSelected ? "primary" : "neutral",
8079
+ ref: isSelected ? minuteRef : void 0,
8322
8080
  onClick: () => onChangeWrapper((newDate) => newDate.setMinutes(minute)),
8323
8081
  children: minute.toString().padStart(2, "0")
8324
8082
  },
8325
8083
  minute + minuteIncrement
8326
8084
  );
8327
- }) }) }),
8328
- !is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-col-1", children: [
8085
+ }) }),
8086
+ !is24HourFormat && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-col-1 min-w-16", children: [
8329
8087
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8330
- "button",
8088
+ Button,
8331
8089
  {
8332
- className: style(!isPM),
8090
+ size: "small",
8091
+ color: !isPM ? "primary" : "neutral",
8333
8092
  onClick: () => onChangeWrapper((newDate) => isPM && newDate.setHours(newDate.getHours() - 12)),
8334
8093
  children: "AM"
8335
8094
  }
8336
8095
  ),
8337
8096
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
8338
- "button",
8097
+ Button,
8339
8098
  {
8340
- className: style(isPM),
8099
+ size: "small",
8100
+ color: isPM ? "primary" : "neutral",
8341
8101
  onClick: () => onChangeWrapper((newDate) => !isPM && newDate.setHours(newDate.getHours() + 12)),
8342
8102
  children: "PM"
8343
8103
  }
@@ -8365,8 +8125,8 @@ var TimePickerUncontrolled = ({
8365
8125
  var import_clsx10 = __toESM(require("clsx"));
8366
8126
 
8367
8127
  // src/components/dialog/Dialog.tsx
8368
- var import_react13 = require("react");
8369
8128
  var import_react14 = require("react");
8129
+ var import_react15 = require("react");
8370
8130
  var import_clsx9 = __toESM(require("clsx"));
8371
8131
  var import_lucide_react3 = require("lucide-react");
8372
8132
 
@@ -8603,6 +8363,57 @@ var useLogOnce = (message, condition, options) => {
8603
8363
 
8604
8364
  // src/components/dialog/Dialog.tsx
8605
8365
  var import_react_dom = require("react-dom");
8366
+
8367
+ // src/hooks/useZIndexRegister.ts
8368
+ var import_react13 = require("react");
8369
+ var ZIndexRegistry = class _ZIndexRegistry {
8370
+ constructor() {
8371
+ this.listeners = /* @__PURE__ */ new Set();
8372
+ }
8373
+ static {
8374
+ this.instance = null;
8375
+ }
8376
+ static getInstance() {
8377
+ if (!_ZIndexRegistry.instance) {
8378
+ _ZIndexRegistry.instance = new _ZIndexRegistry();
8379
+ }
8380
+ return _ZIndexRegistry.instance;
8381
+ }
8382
+ register(callback) {
8383
+ this.listeners.add(callback);
8384
+ this.notify();
8385
+ }
8386
+ deregister(callback) {
8387
+ this.listeners.delete(callback);
8388
+ this.notify();
8389
+ }
8390
+ notify() {
8391
+ let i = 100;
8392
+ for (const callback of this.listeners) {
8393
+ callback(i++);
8394
+ }
8395
+ }
8396
+ };
8397
+ function useZIndexRegister(isActive) {
8398
+ const [zIndex, setZIndex] = (0, import_react13.useState)(0);
8399
+ const zIndexRegistry = (0, import_react13.useMemo)(() => ZIndexRegistry.getInstance(), []);
8400
+ (0, import_react13.useEffect)(() => {
8401
+ if (!isActive) {
8402
+ return;
8403
+ }
8404
+ function callback(zIndex2) {
8405
+ setZIndex(zIndex2);
8406
+ }
8407
+ zIndexRegistry.register(callback);
8408
+ return () => {
8409
+ zIndexRegistry.deregister(callback);
8410
+ setZIndex(0);
8411
+ };
8412
+ }, [isActive, zIndexRegistry]);
8413
+ return zIndex;
8414
+ }
8415
+
8416
+ // src/components/dialog/Dialog.tsx
8606
8417
  var import_jsx_runtime11 = require("react/jsx-runtime");
8607
8418
  var Dialog = ({
8608
8419
  children,
@@ -8618,11 +8429,11 @@ var Dialog = ({
8618
8429
  ...props
8619
8430
  }) => {
8620
8431
  const translation = useHightideTranslation();
8621
- const [visible, setVisible] = (0, import_react14.useState)(isOpen);
8622
- const generatedId = (0, import_react13.useId)();
8432
+ const [visible, setVisible] = (0, import_react15.useState)(isOpen);
8433
+ const generatedId = (0, import_react14.useId)();
8623
8434
  const id = props.id ?? generatedId;
8624
- const ref = (0, import_react14.useRef)(null);
8625
- (0, import_react14.useEffect)(() => {
8435
+ const ref = (0, import_react15.useRef)(null);
8436
+ (0, import_react15.useEffect)(() => {
8626
8437
  if (isOpen) {
8627
8438
  setVisible(true);
8628
8439
  } else {
@@ -8641,6 +8452,7 @@ var Dialog = ({
8641
8452
  active: visible,
8642
8453
  focusFirst: true
8643
8454
  });
8455
+ const zIndex = useZIndexRegister(isOpen);
8644
8456
  const positionMap = {
8645
8457
  top: "fixed top-8 left-1/2 -translate-x-1/2",
8646
8458
  center: "fixed left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
@@ -8649,83 +8461,92 @@ var Dialog = ({
8649
8461
  const positionStyle = positionMap[position];
8650
8462
  if (!visible) return;
8651
8463
  return (0, import_react_dom.createPortal)(
8652
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { id: `dialog-container-${id}`, className: (0, import_clsx9.default)("fixed inset-0 h-screen w-screen", containerClassName), children: [
8653
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8654
- "div",
8655
- {
8656
- id: `dialog-background-${id}`,
8657
- hidden: !visible,
8658
- className: (0, import_clsx9.default)(
8659
- "fixed inset-0 h-screen w-screen bg-overlay-shadow",
8464
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
8465
+ "div",
8466
+ {
8467
+ id: `dialog-container-${id}`,
8468
+ className: (0, import_clsx9.default)("fixed inset-0 h-screen w-screen", containerClassName),
8469
+ style: { zIndex },
8470
+ children: [
8471
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8472
+ "div",
8660
8473
  {
8661
- "motion-safe:animate-fade-in": isOpen,
8662
- "motion-safe:animate-fade-out": !isOpen
8663
- },
8664
- backgroundClassName
8665
- ),
8666
- onAnimationEnd: () => {
8667
- if (!isOpen) {
8668
- setVisible(false);
8669
- }
8670
- },
8671
- onClick: onCloseWrapper,
8672
- "aria-hidden": true
8673
- }
8674
- ),
8675
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
8676
- "div",
8677
- {
8678
- ...props,
8679
- id: `dialog-${id}`,
8680
- ref,
8681
- hidden: !visible,
8682
- onKeyDown: (event) => {
8683
- if (event.key === "Escape") {
8684
- onCloseWrapper();
8685
- }
8686
- },
8687
- onAnimationEnd: () => {
8688
- if (!isOpen) {
8689
- setVisible(false);
8474
+ id: `dialog-background-${id}`,
8475
+ hidden: !visible,
8476
+ className: (0, import_clsx9.default)(
8477
+ "fixed inset-0 h-screen w-screen bg-overlay-shadow",
8478
+ {
8479
+ "motion-safe:animate-fade-in": isOpen,
8480
+ "motion-safe:animate-fade-out": !isOpen
8481
+ },
8482
+ backgroundClassName
8483
+ ),
8484
+ onAnimationEnd: () => {
8485
+ if (!isOpen) {
8486
+ setVisible(false);
8487
+ }
8488
+ },
8489
+ onClick: onCloseWrapper,
8490
+ "aria-hidden": true
8690
8491
  }
8691
- },
8692
- className: (0, import_clsx9.default)(
8693
- "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]",
8694
- {
8695
- "motion-safe:animate-pop-in": isOpen,
8696
- "motion-safe:animate-pop-out": !isOpen
8697
- },
8698
- positionStyle,
8699
- props.className
8700
8492
  ),
8701
- children: [
8702
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "typography-title-lg mr-8", children: titleElement }),
8703
- description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-description", children: description }),
8704
- isModal && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8705
- "div",
8706
- {
8707
- className: "absolute top-0 right-0",
8708
- style: {
8709
- paddingTop: "inherit",
8710
- paddingRight: "inherit"
8493
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
8494
+ "div",
8495
+ {
8496
+ ...props,
8497
+ id: `dialog-${id}`,
8498
+ ref,
8499
+ hidden: !visible,
8500
+ onKeyDown: (event) => {
8501
+ if (event.key === "Escape") {
8502
+ onCloseWrapper();
8503
+ }
8504
+ },
8505
+ onAnimationEnd: () => {
8506
+ if (!isOpen) {
8507
+ setVisible(false);
8508
+ }
8509
+ },
8510
+ className: (0, import_clsx9.default)(
8511
+ "flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]",
8512
+ {
8513
+ "motion-safe:animate-pop-in": isOpen,
8514
+ "motion-safe:animate-pop-out": !isOpen
8711
8515
  },
8712
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8713
- IconButton,
8516
+ positionStyle,
8517
+ props.className
8518
+ ),
8519
+ children: [
8520
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "typography-title-lg mr-8", children: titleElement }),
8521
+ description && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-description", children: description }),
8522
+ isModal && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8523
+ "div",
8714
8524
  {
8715
- color: "neutral",
8716
- size: "tiny",
8717
- "aria-label": translation("close"),
8718
- onClick: onCloseWrapper,
8719
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.X, {})
8525
+ className: "absolute top-0 right-0",
8526
+ style: {
8527
+ paddingTop: "inherit",
8528
+ paddingRight: "inherit"
8529
+ },
8530
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
8531
+ Button,
8532
+ {
8533
+ layout: "icon",
8534
+ color: "neutral",
8535
+ size: "tiny",
8536
+ "aria-label": translation("close"),
8537
+ onClick: onCloseWrapper,
8538
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.X, {})
8539
+ }
8540
+ )
8720
8541
  }
8721
- )
8722
- }
8723
- ),
8724
- children
8725
- ]
8726
- }
8727
- )
8728
- ] }),
8542
+ ),
8543
+ children
8544
+ ]
8545
+ }
8546
+ )
8547
+ ]
8548
+ }
8549
+ ),
8729
8550
  document.body
8730
8551
  );
8731
8552
  };
@@ -8753,7 +8574,7 @@ var ConfirmDialog = ({
8753
8574
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-col-2 grow", children }),
8754
8575
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
8755
8576
  onCancel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8756
- SolidButton,
8577
+ Button,
8757
8578
  {
8758
8579
  color: buttonOverwrites?.[0].color ?? "neutral",
8759
8580
  onClick: onCancel,
@@ -8762,7 +8583,7 @@ var ConfirmDialog = ({
8762
8583
  }
8763
8584
  ),
8764
8585
  onDecline && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8765
- SolidButton,
8586
+ Button,
8766
8587
  {
8767
8588
  color: buttonOverwrites?.[1].color ?? "negative",
8768
8589
  onClick: onDecline,
@@ -8771,7 +8592,7 @@ var ConfirmDialog = ({
8771
8592
  }
8772
8593
  ),
8773
8594
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
8774
- SolidButton,
8595
+ Button,
8775
8596
  {
8776
8597
  color: buttonOverwrites?.[2].color ?? mapping[confirmType],
8777
8598
  onClick: onConfirm,
@@ -8811,17 +8632,16 @@ var DiscardChangesDialog = ({
8811
8632
  };
8812
8633
 
8813
8634
  // src/components/user-action/input/Input.tsx
8814
- var import_react17 = require("react");
8815
- var import_clsx11 = __toESM(require("clsx"));
8635
+ var import_react18 = require("react");
8816
8636
 
8817
8637
  // src/hooks/useDelay.ts
8818
- var import_react15 = require("react");
8638
+ var import_react16 = require("react");
8819
8639
  var defaultOptions2 = {
8820
8640
  delay: 3e3,
8821
8641
  disabled: false
8822
8642
  };
8823
8643
  function useDelay(options) {
8824
- const [timer, setTimer] = (0, import_react15.useState)(void 0);
8644
+ const [timer, setTimer] = (0, import_react16.useState)(void 0);
8825
8645
  const { delay, disabled } = {
8826
8646
  ...defaultOptions2,
8827
8647
  ...options
@@ -8840,12 +8660,12 @@ function useDelay(options) {
8840
8660
  setTimer(void 0);
8841
8661
  }, delay));
8842
8662
  };
8843
- (0, import_react15.useEffect)(() => {
8663
+ (0, import_react16.useEffect)(() => {
8844
8664
  return () => {
8845
8665
  clearTimeout(timer);
8846
8666
  };
8847
8667
  }, [timer]);
8848
- (0, import_react15.useEffect)(() => {
8668
+ (0, import_react16.useEffect)(() => {
8849
8669
  if (disabled) {
8850
8670
  clearTimeout(timer);
8851
8671
  setTimer(void 0);
@@ -8855,9 +8675,9 @@ function useDelay(options) {
8855
8675
  }
8856
8676
 
8857
8677
  // src/hooks/focus/useFocusManagement.ts
8858
- var import_react16 = require("react");
8678
+ var import_react17 = require("react");
8859
8679
  function useFocusManagement() {
8860
- const getFocusableElements = (0, import_react16.useCallback)(() => {
8680
+ const getFocusableElements = (0, import_react17.useCallback)(() => {
8861
8681
  return Array.from(
8862
8682
  document.querySelectorAll(
8863
8683
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -8866,7 +8686,7 @@ function useFocusManagement() {
8866
8686
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
8867
8687
  );
8868
8688
  }, []);
8869
- const getNextFocusElement = (0, import_react16.useCallback)(() => {
8689
+ const getNextFocusElement = (0, import_react17.useCallback)(() => {
8870
8690
  const elements = getFocusableElements();
8871
8691
  if (elements.length === 0) {
8872
8692
  return void 0;
@@ -8878,11 +8698,11 @@ function useFocusManagement() {
8878
8698
  }
8879
8699
  return nextElement;
8880
8700
  }, [getFocusableElements]);
8881
- const focusNext = (0, import_react16.useCallback)(() => {
8701
+ const focusNext = (0, import_react17.useCallback)(() => {
8882
8702
  const nextElement = getNextFocusElement();
8883
8703
  nextElement?.focus();
8884
8704
  }, [getNextFocusElement]);
8885
- const getPreviousFocusElement = (0, import_react16.useCallback)(() => {
8705
+ const getPreviousFocusElement = (0, import_react17.useCallback)(() => {
8886
8706
  const elements = getFocusableElements();
8887
8707
  if (elements.length === 0) {
8888
8708
  return void 0;
@@ -8898,7 +8718,7 @@ function useFocusManagement() {
8898
8718
  }
8899
8719
  return previousElement;
8900
8720
  }, [getFocusableElements]);
8901
- const focusPrevious = (0, import_react16.useCallback)(() => {
8721
+ const focusPrevious = (0, import_react17.useCallback)(() => {
8902
8722
  const previousElement = getPreviousFocusElement();
8903
8723
  if (previousElement) previousElement.focus();
8904
8724
  }, [getPreviousFocusElement]);
@@ -8919,7 +8739,7 @@ var defaultEditCompleteOptions = {
8919
8739
  afterDelay: true,
8920
8740
  delay: 2500
8921
8741
  };
8922
- var Input = (0, import_react17.forwardRef)(function Input2({
8742
+ var Input = (0, import_react18.forwardRef)(function Input2({
8923
8743
  value,
8924
8744
  onChange,
8925
8745
  onChangeText,
@@ -8927,8 +8747,6 @@ var Input = (0, import_react17.forwardRef)(function Input2({
8927
8747
  editCompleteOptions,
8928
8748
  disabled = false,
8929
8749
  invalid = false,
8930
- defaultStyle = true,
8931
- className,
8932
8750
  ...props
8933
8751
  }, forwardedRef) {
8934
8752
  const {
@@ -8941,8 +8759,8 @@ var Input = (0, import_react17.forwardRef)(function Input2({
8941
8759
  restartTimer,
8942
8760
  clearTimer
8943
8761
  } = useDelay({ delay, disabled: !afterDelay });
8944
- const innerRef = (0, import_react17.useRef)(null);
8945
- (0, import_react17.useImperativeHandle)(forwardedRef, () => innerRef.current);
8762
+ const innerRef = (0, import_react18.useRef)(null);
8763
+ (0, import_react18.useImperativeHandle)(forwardedRef, () => innerRef.current);
8946
8764
  const { focusNext } = useFocusManagement();
8947
8765
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
8948
8766
  "input",
@@ -8951,15 +8769,6 @@ var Input = (0, import_react17.forwardRef)(function Input2({
8951
8769
  ref: innerRef,
8952
8770
  value,
8953
8771
  disabled,
8954
- className: defaultStyle ? (0, import_clsx11.default)(
8955
- "px-3 py-2 rounded-md text-sm h-10 border-2 border-transparent focus-style-none",
8956
- {
8957
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
8958
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": !disabled && invalid,
8959
- "bg-disabled-background text-disabled border-disabled-border": disabled
8960
- },
8961
- className
8962
- ) : className,
8963
8772
  onKeyDown: (event) => {
8964
8773
  props.onKeyDown?.(event);
8965
8774
  if (!allowEnterComplete) {
@@ -8988,6 +8797,10 @@ var Input = (0, import_react17.forwardRef)(function Input2({
8988
8797
  });
8989
8798
  onChangeText?.(value2);
8990
8799
  },
8800
+ "data-name": props["data-name"] ?? "input",
8801
+ "data-value": value ? "" : void 0,
8802
+ "data-disabled": disabled ? "" : void 0,
8803
+ "data-invalid": invalid ? "" : void 0,
8991
8804
  "aria-invalid": props["aria-invalid"] ?? invalid,
8992
8805
  "aria-disabled": props["aria-disabled"] ?? disabled
8993
8806
  }
@@ -9026,70 +8839,46 @@ var InputDialog = ({
9026
8839
  );
9027
8840
  };
9028
8841
 
9029
- // src/components/user-action/select/Select.tsx
9030
- var import_react19 = require("react");
9031
- var import_clsx13 = __toESM(require("clsx"));
8842
+ // src/components/user-action/Select.tsx
8843
+ var import_react20 = require("react");
8844
+ var import_clsx12 = __toESM(require("clsx"));
9032
8845
 
9033
8846
  // src/utils/match.ts
9034
8847
  var match = (key, values) => {
9035
8848
  return values[key];
9036
8849
  };
9037
8850
 
9038
- // src/components/user-action/select/Select.tsx
8851
+ // src/components/user-action/Select.tsx
9039
8852
  var import_lucide_react4 = require("lucide-react");
9040
8853
 
9041
8854
  // src/components/layout/Chip.tsx
9042
- var import_clsx12 = __toESM(require("clsx"));
8855
+ var import_clsx11 = __toESM(require("clsx"));
9043
8856
  var import_jsx_runtime16 = require("react/jsx-runtime");
9044
- var chipColors = ["default", "dark", "red", "yellow", "green", "blue", "pink", "orange"];
8857
+ var chipColors = ButtonUtil.colors;
9045
8858
  var ChipUtil = {
9046
8859
  colors: chipColors
9047
8860
  };
9048
8861
  var Chip = ({
9049
8862
  children,
9050
8863
  trailingIcon,
9051
- color = "default",
9052
- size = "md",
9053
- icon = false,
8864
+ color = "neutral",
8865
+ size = "medium",
9054
8866
  variant = "normal",
9055
8867
  className = "",
9056
8868
  ...restProps
9057
8869
  }) => {
9058
- const colorMapping = {
9059
- default: "text-tag-default-text bg-tag-default-background",
9060
- dark: "text-tag-dark-text bg-tag-dark-background",
9061
- red: "text-tag-red-text bg-tag-red-background",
9062
- yellow: "text-tag-yellow-text bg-tag-yellow-background",
9063
- green: "text-tag-green-text bg-tag-green-background",
9064
- blue: "text-tag-blue-text bg-tag-blue-background",
9065
- pink: "text-tag-pink-text bg-tag-pink-background",
9066
- orange: "text-tag-orange-text bg-tag-orange-background"
9067
- }[color];
9068
- const colorMappingIcon = {
9069
- default: "text-tag-default-icon",
9070
- dark: "text-tag-dark-icon",
9071
- red: "text-tag-red-icon",
9072
- yellow: "text-tag-yellow-icon",
9073
- green: "text-tag-green-icon",
9074
- blue: "text-tag-blue-icon",
9075
- pink: "text-tag-pink-icon",
9076
- orange: "text-tag-orange-icon"
9077
- }[color];
8870
+ const colorMapping = ButtonUtil.colorClasses[color];
9078
8871
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
9079
8872
  "div",
9080
8873
  {
9081
8874
  ...restProps,
9082
- className: (0, import_clsx12.default)(
9083
- `flex-row-0 w-fit font-semibold`,
8875
+ className: (0, import_clsx11.default)(
8876
+ `flex-row-0 w-fit font-semibold coloring-solid`,
9084
8877
  colorMapping,
9085
- !icon ? {
9086
- "px-1 py-0.5": size === "sm",
9087
- "px-2 py-1": size === "md",
9088
- "px-4 py-2": size === "lg"
9089
- } : {
9090
- "p-0.5": size === "sm",
9091
- "p-1": size === "md",
9092
- "p-2": size === "lg"
8878
+ {
8879
+ "chip-sm": size === "small",
8880
+ "chip-md": size === "medium",
8881
+ "chip-lg": size === "large"
9093
8882
  },
9094
8883
  {
9095
8884
  "rounded-md": variant === "normal",
@@ -9099,7 +8888,7 @@ var Chip = ({
9099
8888
  ),
9100
8889
  children: [
9101
8890
  children,
9102
- trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
8891
+ trailingIcon
9103
8892
  ]
9104
8893
  }
9105
8894
  );
@@ -9108,12 +8897,12 @@ var ChipList = ({
9108
8897
  list,
9109
8898
  className = ""
9110
8899
  }) => {
9111
- 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)(
8900
+ 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)(
9112
8901
  Chip,
9113
8902
  {
9114
8903
  ...value,
9115
- color: value.color ?? "default",
9116
- variant: value.variant ?? "normal",
8904
+ color: value.color,
8905
+ variant: value.variant,
9117
8906
  children: value.children
9118
8907
  },
9119
8908
  index
@@ -9121,7 +8910,7 @@ var ChipList = ({
9121
8910
  };
9122
8911
 
9123
8912
  // src/hooks/useFloatingElement.ts
9124
- var import_react18 = require("react");
8913
+ var import_react19 = require("react");
9125
8914
 
9126
8915
  // src/utils/math.ts
9127
8916
  var clamp = (value, range2 = [0, 1]) => {
@@ -9184,9 +8973,9 @@ function useFloatingElement({
9184
8973
  screenPadding = 16,
9185
8974
  gap = 4
9186
8975
  }) {
9187
- const [style, setStyle] = (0, import_react18.useState)();
8976
+ const [style, setStyle] = (0, import_react19.useState)();
9188
8977
  const isMounted = useIsMounted();
9189
- const calculate = (0, import_react18.useCallback)(() => {
8978
+ const calculate = (0, import_react19.useCallback)(() => {
9190
8979
  const containerRect = containerRef.current.getBoundingClientRect();
9191
8980
  const windowRect = windowRef?.current.getBoundingClientRect() ?? {
9192
8981
  top: 0,
@@ -9216,14 +9005,14 @@ function useFloatingElement({
9216
9005
  }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
9217
9006
  const height = containerRef.current?.getBoundingClientRect().height;
9218
9007
  const width = containerRef.current?.getBoundingClientRect().width;
9219
- (0, import_react18.useEffect)(() => {
9008
+ (0, import_react19.useEffect)(() => {
9220
9009
  if (active && isMounted) {
9221
9010
  calculate();
9222
9011
  } else {
9223
9012
  setStyle(void 0);
9224
9013
  }
9225
9014
  }, [calculate, active, isMounted, height, width]);
9226
- (0, import_react18.useEffect)(() => {
9015
+ (0, import_react19.useEffect)(() => {
9227
9016
  window.addEventListener("resize", calculate);
9228
9017
  let timeout;
9229
9018
  if (isPolling) {
@@ -9239,15 +9028,15 @@ function useFloatingElement({
9239
9028
  return style;
9240
9029
  }
9241
9030
 
9242
- // src/components/user-action/select/Select.tsx
9031
+ // src/components/user-action/Select.tsx
9243
9032
  var import_react_dom2 = require("react-dom");
9244
9033
  var import_jsx_runtime17 = require("react/jsx-runtime");
9245
9034
  var defaultToggleOpenOptions = {
9246
9035
  highlightStartPositionBehavior: "first"
9247
9036
  };
9248
- var SelectContext = (0, import_react19.createContext)(null);
9037
+ var SelectContext = (0, import_react20.createContext)(null);
9249
9038
  function useSelectContext() {
9250
- const ctx = (0, import_react19.useContext)(SelectContext);
9039
+ const ctx = (0, import_react20.useContext)(SelectContext);
9251
9040
  if (!ctx) {
9252
9041
  throw new Error("SelectContext must be used within a ListBoxPrimitive");
9253
9042
  }
@@ -9266,18 +9055,18 @@ var SelectRoot = ({
9266
9055
  isMultiSelect = false,
9267
9056
  iconAppearance = "left"
9268
9057
  }) => {
9269
- const triggerRef = (0, import_react19.useRef)(null);
9270
- const generatedId = (0, import_react19.useId)();
9058
+ const triggerRef = (0, import_react20.useRef)(null);
9059
+ const generatedId = (0, import_react20.useId)();
9271
9060
  const usedId = id ?? generatedId;
9272
- const [internalState, setInternalState] = (0, import_react19.useState)({
9061
+ const [internalState, setInternalState] = (0, import_react20.useState)({
9273
9062
  isOpen,
9274
9063
  options: []
9275
9064
  });
9276
- const selectedValues = (0, import_react19.useMemo)(
9065
+ const selectedValues = (0, import_react20.useMemo)(
9277
9066
  () => isMultiSelect ? values ?? [] : [value].filter(Boolean),
9278
9067
  [isMultiSelect, value, values]
9279
9068
  );
9280
- const selectedOptions = (0, import_react19.useMemo)(
9069
+ const selectedOptions = (0, import_react20.useMemo)(
9281
9070
  () => selectedValues.map((value2) => internalState.options.find((option) => value2 === option.value)).filter(Boolean),
9282
9071
  [selectedValues, internalState.options]
9283
9072
  );
@@ -9293,7 +9082,7 @@ var SelectRoot = ({
9293
9082
  isMultiSelect,
9294
9083
  iconAppearance
9295
9084
  };
9296
- const registerItem = (0, import_react19.useCallback)((item) => {
9085
+ const registerItem = (0, import_react20.useCallback)((item) => {
9297
9086
  setInternalState((prev) => {
9298
9087
  const updatedOptions = [...prev.options, item];
9299
9088
  updatedOptions.sort((a, b) => {
@@ -9308,7 +9097,7 @@ var SelectRoot = ({
9308
9097
  };
9309
9098
  });
9310
9099
  }, []);
9311
- const unregisterItem = (0, import_react19.useCallback)((value2) => {
9100
+ const unregisterItem = (0, import_react20.useCallback)((value2) => {
9312
9101
  setInternalState((prev) => {
9313
9102
  const updatedOptions = prev.options.filter((i) => i.value !== value2);
9314
9103
  return {
@@ -9357,10 +9146,10 @@ var SelectRoot = ({
9357
9146
  highlightedValue: value2
9358
9147
  }));
9359
9148
  };
9360
- const registerTrigger = (0, import_react19.useCallback)((ref) => {
9149
+ const registerTrigger = (0, import_react20.useCallback)((ref) => {
9361
9150
  triggerRef.current = ref.current;
9362
9151
  }, []);
9363
- const unregisterTrigger = (0, import_react19.useCallback)(() => {
9152
+ const unregisterTrigger = (0, import_react20.useCallback)(() => {
9364
9153
  triggerRef.current = null;
9365
9154
  }, []);
9366
9155
  const toggleOpen = (isOpen2, toggleOpenOptions) => {
@@ -9406,7 +9195,7 @@ var SelectRoot = ({
9406
9195
  highlightedValue
9407
9196
  }));
9408
9197
  };
9409
- (0, import_react19.useEffect)(() => {
9198
+ (0, import_react20.useEffect)(() => {
9410
9199
  if (!internalState.highlightedValue) return;
9411
9200
  const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
9412
9201
  if (highlighted) {
@@ -9434,14 +9223,14 @@ var SelectRoot = ({
9434
9223
  };
9435
9224
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContext.Provider, { value: contextValue, children });
9436
9225
  };
9437
- var SelectOption = (0, import_react19.forwardRef)(
9226
+ var SelectOption = (0, import_react20.forwardRef)(
9438
9227
  function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
9439
9228
  const { state, config, item, trigger } = useSelectContext();
9440
9229
  const { register, unregister, toggleSelection, highlightItem } = item;
9441
- const itemRef = (0, import_react19.useRef)(null);
9230
+ const itemRef = (0, import_react20.useRef)(null);
9442
9231
  iconAppearance ??= config.iconAppearance;
9443
9232
  const label = children ?? value;
9444
- (0, import_react19.useEffect)(() => {
9233
+ (0, import_react20.useEffect)(() => {
9445
9234
  register({
9446
9235
  value,
9447
9236
  label,
@@ -9468,7 +9257,7 @@ var SelectOption = (0, import_react19.forwardRef)(
9468
9257
  "data-highlighted": isHighlighted ? "" : void 0,
9469
9258
  "data-selected": isSelected ? "" : void 0,
9470
9259
  "data-disabled": disabled ? "" : void 0,
9471
- className: (0, import_clsx13.default)(
9260
+ className: (0, import_clsx12.default)(
9472
9261
  "flex-row-1 items-center px-2 py-1 rounded-md",
9473
9262
  "data-highlighted:bg-primary/20",
9474
9263
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -9491,18 +9280,18 @@ var SelectOption = (0, import_react19.forwardRef)(
9491
9280
  }
9492
9281
  },
9493
9282
  children: [
9494
- iconAppearance === "left" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9283
+ iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9495
9284
  import_lucide_react4.CheckIcon,
9496
9285
  {
9497
- className: (0, import_clsx13.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9286
+ className: (0, import_clsx12.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9498
9287
  "aria-hidden": true
9499
9288
  }
9500
9289
  ),
9501
9290
  label,
9502
- iconAppearance === "right" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9291
+ iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9503
9292
  import_lucide_react4.CheckIcon,
9504
9293
  {
9505
- className: (0, import_clsx13.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9294
+ className: (0, import_clsx12.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
9506
9295
  "aria-hidden": true
9507
9296
  }
9508
9297
  )
@@ -9511,13 +9300,13 @@ var SelectOption = (0, import_react19.forwardRef)(
9511
9300
  );
9512
9301
  }
9513
9302
  );
9514
- var SelectButton = (0, import_react19.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
9303
+ var SelectButton = (0, import_react20.forwardRef)(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
9515
9304
  const translation = useHightideTranslation();
9516
9305
  const { state, trigger } = useSelectContext();
9517
9306
  const { register, unregister, toggleOpen } = trigger;
9518
- const innerRef = (0, import_react19.useRef)(null);
9519
- (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9520
- (0, import_react19.useEffect)(() => {
9307
+ const innerRef = (0, import_react20.useRef)(null);
9308
+ (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9309
+ (0, import_react20.useEffect)(() => {
9521
9310
  register(innerRef);
9522
9311
  return () => unregister();
9523
9312
  }, [register, unregister]);
@@ -9550,19 +9339,8 @@ var SelectButton = (0, import_react19.forwardRef)(function SelectButton2({ place
9550
9339
  break;
9551
9340
  }
9552
9341
  },
9553
- className: (0, import_clsx13.default)(
9554
- "flex-row-2 items-center justify-between rounded-md px-3 py-2",
9555
- {
9556
- "bg-input-background text-placeholder": !hasValue && !disabled && !invalid,
9557
- "bg-input-background text-input-text": hasValue && !disabled && !invalid,
9558
- "bg-negative/20": !disabled && invalid,
9559
- "text-placeholder": !hasValue && !disabled,
9560
- "text-negative": hasValue && !disabled && invalid,
9561
- "bg-disabled-background text-disabled": disabled
9562
- },
9563
- props.className
9564
- ),
9565
- "data-placeholder": !hasValue ? "" : void 0,
9342
+ "data-name": props["data-name"] ?? "select-button",
9343
+ "data-value": hasValue ? "" : void 0,
9566
9344
  "data-disabled": disabled ? "" : void 0,
9567
9345
  "data-invalid": invalid ? "" : void 0,
9568
9346
  "aria-invalid": invalid,
@@ -9571,31 +9349,21 @@ var SelectButton = (0, import_react19.forwardRef)(function SelectButton2({ place
9571
9349
  "aria-expanded": state.isOpen,
9572
9350
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9573
9351
  children: [
9574
- 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: [
9352
+ 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: [
9575
9353
  label,
9576
9354
  index < state.value.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "," })
9577
9355
  ] }, value)) }) : placeholder ?? translation("clickToSelect"),
9578
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9579
- ExpansionIcon,
9580
- {
9581
- isExpanded: state.isOpen,
9582
- className: (0, import_clsx13.default)({
9583
- "text-input-text": !disabled && !invalid,
9584
- "text-negative": !disabled && invalid,
9585
- "text-disabled": disabled
9586
- })
9587
- }
9588
- )
9356
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ExpansionIcon, { isExpanded: state.isOpen })
9589
9357
  ]
9590
9358
  }
9591
9359
  );
9592
9360
  });
9593
- var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
9361
+ var SelectChipDisplay = (0, import_react20.forwardRef)(function SelectChipDisplay2({ ...props }, ref) {
9594
9362
  const { state, trigger, item } = useSelectContext();
9595
9363
  const { register, unregister, toggleOpen } = trigger;
9596
- const innerRef = (0, import_react19.useRef)(null);
9597
- (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9598
- (0, import_react19.useEffect)(() => {
9364
+ const innerRef = (0, import_react20.useRef)(null);
9365
+ (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9366
+ (0, import_react20.useEffect)(() => {
9599
9367
  register(innerRef);
9600
9368
  return () => unregister();
9601
9369
  }, [register, unregister]);
@@ -9606,10 +9374,12 @@ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDispla
9606
9374
  {
9607
9375
  ...props,
9608
9376
  ref: innerRef,
9609
- className: (0, import_clsx13.default)(
9610
- "flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
9611
- props.className
9612
- ),
9377
+ onClick: (event) => {
9378
+ toggleOpen();
9379
+ props.onClick?.(event);
9380
+ },
9381
+ "data-name": props["data-name"] ?? "select-button-chips",
9382
+ "data-value": state.value.length > 0 ? "" : void 0,
9613
9383
  "data-disabled": disabled ? "" : void 0,
9614
9384
  "data-invalid": invalid ? "" : void 0,
9615
9385
  "aria-invalid": invalid,
@@ -9618,23 +9388,27 @@ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDispla
9618
9388
  state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Chip, { className: "gap-x-2", children: [
9619
9389
  label,
9620
9390
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9621
- TextButton,
9391
+ Button,
9622
9392
  {
9623
9393
  onClick: () => {
9624
9394
  item.toggleSelection(value, false);
9625
9395
  },
9626
- size: "none",
9396
+ size: "tiny",
9627
9397
  color: "negative",
9628
- className: "flex-row-0 items-center px-0.5 py-0.5 w-6 h-6 rounded",
9629
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.XIcon, { className: "w-5 h-5" })
9398
+ coloringStyle: "text",
9399
+ className: "flex-row-0 items-center",
9400
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.XIcon, { className: "size-5" })
9630
9401
  }
9631
9402
  )
9632
9403
  ] }, value)),
9633
9404
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
9634
- IconButton,
9405
+ Button,
9635
9406
  {
9636
9407
  id: state.id,
9637
- onClick: () => toggleOpen(),
9408
+ onClick: (event) => {
9409
+ event.stopPropagation();
9410
+ toggleOpen();
9411
+ },
9638
9412
  onKeyDown: (event) => {
9639
9413
  switch (event.key) {
9640
9414
  case "ArrowDown":
@@ -9644,6 +9418,7 @@ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDispla
9644
9418
  toggleOpen(true, { highlightStartPositionBehavior: "last" });
9645
9419
  }
9646
9420
  },
9421
+ layout: "icon",
9647
9422
  size: "small",
9648
9423
  color: "neutral",
9649
9424
  "aria-invalid": invalid,
@@ -9651,6 +9426,7 @@ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDispla
9651
9426
  "aria-haspopup": "listbox",
9652
9427
  "aria-expanded": state.isOpen,
9653
9428
  "aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
9429
+ className: "size-9",
9654
9430
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react4.Plus, {})
9655
9431
  }
9656
9432
  )
@@ -9658,15 +9434,15 @@ var SelectChipDisplay = (0, import_react19.forwardRef)(function SelectChipDispla
9658
9434
  }
9659
9435
  );
9660
9436
  });
9661
- var SelectContent = (0, import_react19.forwardRef)(
9437
+ var SelectContent = (0, import_react20.forwardRef)(
9662
9438
  function SelectContent2({
9663
9439
  alignment,
9664
9440
  orientation = "vertical",
9665
9441
  containerClassName,
9666
9442
  ...props
9667
9443
  }, ref) {
9668
- const innerRef = (0, import_react19.useRef)(null);
9669
- (0, import_react19.useImperativeHandle)(ref, () => innerRef.current);
9444
+ const innerRef = (0, import_react20.useRef)(null);
9445
+ (0, import_react20.useImperativeHandle)(ref, () => innerRef.current);
9670
9446
  const { trigger, state, config, item } = useSelectContext();
9671
9447
  const position = useFloatingElement({
9672
9448
  active: state.isOpen,
@@ -9678,12 +9454,14 @@ var SelectContent = (0, import_react19.forwardRef)(
9678
9454
  container: innerRef,
9679
9455
  active: state.isOpen && !!position
9680
9456
  });
9457
+ const zIndex = useZIndexRegister(state.isOpen);
9681
9458
  return (0, import_react_dom2.createPortal)(
9682
9459
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
9683
9460
  "div",
9684
9461
  {
9685
9462
  id: `select-container-${state.id}`,
9686
- className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen", containerClassName),
9463
+ className: (0, import_clsx12.default)("fixed inset-0 w-screen h-screen", containerClassName),
9464
+ style: { zIndex },
9687
9465
  hidden: !state.isOpen,
9688
9466
  children: [
9689
9467
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -9691,7 +9469,7 @@ var SelectContent = (0, import_react19.forwardRef)(
9691
9469
  {
9692
9470
  id: `select-background-${state.id}`,
9693
9471
  onClick: () => trigger.toggleOpen(false),
9694
- className: (0, import_clsx13.default)("fixed inset-0 w-screen h-screen")
9472
+ className: (0, import_clsx12.default)("fixed inset-0 w-screen h-screen")
9695
9473
  }
9696
9474
  ),
9697
9475
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -9740,7 +9518,7 @@ var SelectContent = (0, import_react19.forwardRef)(
9740
9518
  break;
9741
9519
  }
9742
9520
  },
9743
- 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),
9521
+ 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),
9744
9522
  style: {
9745
9523
  opacity: position ? void 0 : 0,
9746
9524
  position: "fixed",
@@ -9760,7 +9538,7 @@ var SelectContent = (0, import_react19.forwardRef)(
9760
9538
  );
9761
9539
  }
9762
9540
  );
9763
- var Select = (0, import_react19.forwardRef)(function Select2({
9541
+ var Select = (0, import_react20.forwardRef)(function Select2({
9764
9542
  children,
9765
9543
  contentPanelProps,
9766
9544
  buttonProps,
@@ -9782,7 +9560,7 @@ var Select = (0, import_react19.forwardRef)(function Select2({
9782
9560
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9783
9561
  ] });
9784
9562
  });
9785
- var SelectUncontrolled = (0, import_react19.forwardRef)(function SelectUncontrolled2({
9563
+ var SelectUncontrolled = (0, import_react20.forwardRef)(function SelectUncontrolled2({
9786
9564
  value: initialValue,
9787
9565
  onValueChanged,
9788
9566
  ...props
@@ -9798,7 +9576,7 @@ var SelectUncontrolled = (0, import_react19.forwardRef)(function SelectUncontrol
9798
9576
  }
9799
9577
  );
9800
9578
  });
9801
- var MultiSelect = (0, import_react19.forwardRef)(function MultiSelect2({
9579
+ var MultiSelect = (0, import_react20.forwardRef)(function MultiSelect2({
9802
9580
  children,
9803
9581
  contentPanelProps,
9804
9582
  buttonProps,
@@ -9809,7 +9587,7 @@ var MultiSelect = (0, import_react19.forwardRef)(function MultiSelect2({
9809
9587
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9810
9588
  ] });
9811
9589
  });
9812
- var MultiSelectUncontrolled = (0, import_react19.forwardRef)(function MultiSelectUncontrolled2({
9590
+ var MultiSelectUncontrolled = (0, import_react20.forwardRef)(function MultiSelectUncontrolled2({
9813
9591
  values: initialValues,
9814
9592
  onValuesChanged,
9815
9593
  ...props
@@ -9825,7 +9603,7 @@ var MultiSelectUncontrolled = (0, import_react19.forwardRef)(function MultiSelec
9825
9603
  }
9826
9604
  );
9827
9605
  });
9828
- var MultiSelectChipDisplay = (0, import_react19.forwardRef)(function MultiSelectChipDisplay2({
9606
+ var MultiSelectChipDisplay = (0, import_react20.forwardRef)(function MultiSelectChipDisplay2({
9829
9607
  children,
9830
9608
  contentPanelProps,
9831
9609
  chipDisplayProps,
@@ -9836,7 +9614,7 @@ var MultiSelectChipDisplay = (0, import_react19.forwardRef)(function MultiSelect
9836
9614
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { ...contentPanelProps, children })
9837
9615
  ] });
9838
9616
  });
9839
- var MultiSelectChipDisplayUncontrolled = (0, import_react19.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
9617
+ var MultiSelectChipDisplayUncontrolled = (0, import_react20.forwardRef)(function MultiSelectChipDisplayUncontrolled2({
9840
9618
  values: initialValues,
9841
9619
  onValuesChanged,
9842
9620
  ...props
@@ -9876,14 +9654,13 @@ var LanguageDialog = ({
9876
9654
  {
9877
9655
  value: locale,
9878
9656
  onValueChanged: (language) => setLocale(language),
9879
- contentPanelProps: { containerClassName: "z-200" },
9880
9657
  buttonProps: {
9881
9658
  selectedDisplay: (locale2) => LocalizationUtil.languagesLocalNames[locale2]
9882
9659
  },
9883
9660
  children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
9884
9661
  }
9885
9662
  ),
9886
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SolidButton, { color: "positive", onClick: onClose, children: translation("done") }) })
9663
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { color: "positive", onClick: onClose, children: translation("done") }) })
9887
9664
  ] })
9888
9665
  }
9889
9666
  );
@@ -9891,24 +9668,24 @@ var LanguageDialog = ({
9891
9668
 
9892
9669
  // src/components/dialog/ThemeDialog.tsx
9893
9670
  var import_lucide_react5 = require("lucide-react");
9894
- var import_clsx14 = __toESM(require("clsx"));
9671
+ var import_clsx13 = __toESM(require("clsx"));
9895
9672
 
9896
9673
  // src/theming/useTheme.tsx
9897
- var import_react20 = require("react");
9674
+ var import_react21 = require("react");
9898
9675
  var import_jsx_runtime19 = require("react/jsx-runtime");
9899
9676
  var themes = ["light", "dark", "system"];
9900
9677
  var ThemeUtil = {
9901
9678
  themes
9902
9679
  };
9903
- var ThemeContext = (0, import_react20.createContext)(null);
9680
+ var ThemeContext = (0, import_react21.createContext)(null);
9904
9681
  var ThemeProvider = ({ children, theme }) => {
9905
9682
  const {
9906
9683
  value: storedTheme,
9907
9684
  setValue: setStoredTheme,
9908
9685
  deleteValue: deleteStoredTheme
9909
9686
  } = useLocalStorage("theme", "system");
9910
- const [themePreference, setThemePreference] = (0, import_react20.useState)("system");
9911
- const resolvedTheme = (0, import_react20.useMemo)(() => {
9687
+ const [themePreference, setThemePreference] = (0, import_react21.useState)("system");
9688
+ const resolvedTheme = (0, import_react21.useMemo)(() => {
9912
9689
  if (theme && theme !== "system") {
9913
9690
  return theme;
9914
9691
  }
@@ -9920,7 +9697,7 @@ var ThemeProvider = ({ children, theme }) => {
9920
9697
  }
9921
9698
  return "light";
9922
9699
  }, [storedTheme, theme, themePreference]);
9923
- (0, import_react20.useEffect)(() => {
9700
+ (0, import_react21.useEffect)(() => {
9924
9701
  if (!theme) return;
9925
9702
  if (theme === "system") {
9926
9703
  deleteStoredTheme();
@@ -9928,18 +9705,18 @@ var ThemeProvider = ({ children, theme }) => {
9928
9705
  setStoredTheme(theme);
9929
9706
  }
9930
9707
  }, [theme]);
9931
- (0, import_react20.useEffect)(() => {
9708
+ (0, import_react21.useEffect)(() => {
9932
9709
  document.documentElement.setAttribute("data-theme", resolvedTheme);
9933
9710
  }, [resolvedTheme]);
9934
- const getPreference = (0, import_react20.useCallback)(() => {
9711
+ const getPreference = (0, import_react21.useCallback)(() => {
9935
9712
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
9936
9713
  const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
9937
9714
  setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
9938
9715
  }, []);
9939
- (0, import_react20.useEffect)(() => {
9716
+ (0, import_react21.useEffect)(() => {
9940
9717
  getPreference();
9941
9718
  }, [getPreference]);
9942
- (0, import_react20.useEffect)(() => {
9719
+ (0, import_react21.useEffect)(() => {
9943
9720
  const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
9944
9721
  const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
9945
9722
  const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
@@ -9970,7 +9747,7 @@ var ThemeProvider = ({ children, theme }) => {
9970
9747
  );
9971
9748
  };
9972
9749
  var useTheme = () => {
9973
- const context = (0, import_react20.useContext)(ThemeContext);
9750
+ const context = (0, import_react21.useContext)(ThemeContext);
9974
9751
  if (!context) {
9975
9752
  throw new Error("useTheme must be used within ThemeContext. Try adding a ThemeProvider around your app.");
9976
9753
  }
@@ -9981,11 +9758,11 @@ var useTheme = () => {
9981
9758
  var import_jsx_runtime20 = require("react/jsx-runtime");
9982
9759
  var ThemeIcon = ({ theme, className }) => {
9983
9760
  if (theme === "dark") {
9984
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MoonIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9761
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MoonIcon, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9985
9762
  } else if (theme === "light") {
9986
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.SunIcon, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9763
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.SunIcon, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9987
9764
  } else {
9988
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MonitorCog, { className: (0, import_clsx14.default)("w-4 h-4", className) });
9765
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react5.MonitorCog, { className: (0, import_clsx13.default)("w-4 h-4", className) });
9989
9766
  }
9990
9767
  };
9991
9768
  var ThemeDialog = ({
@@ -10010,9 +9787,6 @@ var ThemeDialog = ({
10010
9787
  value: theme,
10011
9788
  onValueChanged: (theme2) => setTheme(theme2),
10012
9789
  iconAppearance: "right",
10013
- contentPanelProps: {
10014
- containerClassName: "z-200"
10015
- },
10016
9790
  buttonProps: {
10017
9791
  selectedDisplay: (value) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex-row-2 items-center", children: [
10018
9792
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ThemeIcon, { theme }),
@@ -10026,18 +9800,18 @@ var ThemeDialog = ({
10026
9800
  ] }) }, theme2))
10027
9801
  }
10028
9802
  ),
10029
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
9803
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
10030
9804
  ] })
10031
9805
  }
10032
9806
  );
10033
9807
  };
10034
9808
 
10035
9809
  // src/components/form/FormElementWrapper.tsx
10036
- var import_react21 = require("react");
10037
- var import_clsx16 = require("clsx");
9810
+ var import_react22 = require("react");
9811
+ var import_clsx15 = require("clsx");
10038
9812
 
10039
9813
  // src/components/user-action/Label.tsx
10040
- var import_clsx15 = __toESM(require("clsx"));
9814
+ var import_clsx14 = __toESM(require("clsx"));
10041
9815
  var import_jsx_runtime21 = require("react/jsx-runtime");
10042
9816
  var styleMapping = {
10043
9817
  md: "typography-label-md color-label-text",
@@ -10049,7 +9823,7 @@ var Label = ({
10049
9823
  className,
10050
9824
  ...props
10051
9825
  }) => {
10052
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...props, className: (0, import_clsx15.default)(styleMapping[size], className), children });
9826
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...props, className: (0, import_clsx14.default)(styleMapping[size], className), children });
10053
9827
  };
10054
9828
 
10055
9829
  // src/components/form/FormElementWrapper.tsx
@@ -10071,7 +9845,7 @@ var FormElementWrapper = ({
10071
9845
  containerClassName
10072
9846
  }) => {
10073
9847
  const [touched, setTouched] = useOverwritableState(initialIsShowingError, onIsShowingError);
10074
- const generatedId = (0, import_react21.useId)();
9848
+ const generatedId = (0, import_react22.useId)();
10075
9849
  const usedId = id ?? generatedId;
10076
9850
  const errorId = `${usedId}-description`;
10077
9851
  const labelId = `${usedId}-label`;
@@ -10100,7 +9874,7 @@ var FormElementWrapper = ({
10100
9874
  "aria-invalid": !!error,
10101
9875
  "aria-errormessage": error ? errorId : void 0
10102
9876
  };
10103
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx16.clsx)("relative flex flex-col gap-y-1", containerClassName), children: [
9877
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: (0, import_clsx15.clsx)("relative flex flex-col gap-y-1", containerClassName), children: [
10104
9878
  label && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
10105
9879
  Label,
10106
9880
  {
@@ -10108,7 +9882,7 @@ var FormElementWrapper = ({
10108
9882
  id: labelId,
10109
9883
  htmlFor: usedId,
10110
9884
  size: "lg",
10111
- className: (0, import_clsx16.clsx)("flex-row-1 items-start", labelProps?.className),
9885
+ className: (0, import_clsx15.clsx)("flex-row-1 items-start", labelProps?.className),
10112
9886
  children: [
10113
9887
  label,
10114
9888
  required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { role: "none", className: "bg-primary w-2 h-2 rounded-full" })
@@ -10120,7 +9894,7 @@ var FormElementWrapper = ({
10120
9894
  {
10121
9895
  ...descriptionProps,
10122
9896
  id: descriptionId,
10123
- className: (0, import_clsx16.clsx)("text-description text-sm", descriptionProps?.className),
9897
+ className: (0, import_clsx15.clsx)("text-description text-sm", descriptionProps?.className),
10124
9898
  children: description
10125
9899
  }
10126
9900
  ),
@@ -10130,7 +9904,7 @@ var FormElementWrapper = ({
10130
9904
  {
10131
9905
  ...errorProps,
10132
9906
  id: errorId,
10133
- className: (0, import_clsx16.clsx)("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
9907
+ className: (0, import_clsx15.clsx)("absolute top-[calc(100%_+_0.25rem)] left-0 text-negative text-sm font-medium", errorProps?.className),
10134
9908
  role: "alert",
10135
9909
  "aria-hidden": !error,
10136
9910
  "aria-live": "polite",
@@ -10141,8 +9915,8 @@ var FormElementWrapper = ({
10141
9915
  };
10142
9916
 
10143
9917
  // src/components/icons-and-geometry/Avatar.tsx
10144
- var import_clsx17 = __toESM(require("clsx"));
10145
- var import_react22 = require("react");
9918
+ var import_clsx16 = __toESM(require("clsx"));
9919
+ var import_react23 = require("react");
10146
9920
  var import_lucide_react6 = require("lucide-react");
10147
9921
  var import_jsx_runtime23 = require("react/jsx-runtime");
10148
9922
  var avtarSizeList = ["sm", "md", "lg", "xl"];
@@ -10169,8 +9943,8 @@ var Avatar = ({
10169
9943
  fullyRounded,
10170
9944
  className = ""
10171
9945
  }) => {
10172
- const [hasError, setHasError] = (0, import_react22.useState)(false);
10173
- const [isLoaded, setIsLoaded] = (0, import_react22.useState)(false);
9946
+ const [hasError, setHasError] = (0, import_react23.useState)(false);
9947
+ const [isLoaded, setIsLoaded] = (0, import_react23.useState)(false);
10174
9948
  const pixels = avatarSizeMapping[size];
10175
9949
  const sizeStyle = {
10176
9950
  minWidth: pixels,
@@ -10179,7 +9953,7 @@ var Avatar = ({
10179
9953
  maxHeight: pixels
10180
9954
  };
10181
9955
  const textClassName = textClassNameMapping[size];
10182
- const displayName = (0, import_react22.useMemo)(() => {
9956
+ const displayName = (0, import_react23.useMemo)(() => {
10183
9957
  const maxLetters = size === "sm" ? 1 : 2;
10184
9958
  return (name ?? "").split(" ").filter((_, index) => index < maxLetters).map((value) => value[0]).join("").toUpperCase();
10185
9959
  }, [name, size]);
@@ -10191,7 +9965,7 @@ var Avatar = ({
10191
9965
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10192
9966
  "div",
10193
9967
  {
10194
- className: (0, import_clsx17.default)(
9968
+ className: (0, import_clsx16.default)(
10195
9969
  `relative flex-row-0 items-center justify-center bg-primary text-on-primary`,
10196
9970
  rounding,
10197
9971
  className
@@ -10203,7 +9977,7 @@ var Avatar = ({
10203
9977
  {
10204
9978
  src: image?.avatarUrl,
10205
9979
  alt: image?.alt,
10206
- className: (0, import_clsx17.default)(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
9980
+ className: (0, import_clsx16.default)(rounding, { "absolute left-0 top-0 -translate-1/2 opacity-0 z-1 ": !isLoaded || hasError }),
10207
9981
  onLoad: () => setIsLoaded(true),
10208
9982
  onError: () => setHasError(true)
10209
9983
  }
@@ -10237,7 +10011,7 @@ var AvatarGroup = ({
10237
10011
  ...avatar,
10238
10012
  size,
10239
10013
  fullyRounded,
10240
- className: (0, import_clsx17.default)("shadow-side shadow-r-4 shadow-hard", avatar.className)
10014
+ className: (0, import_clsx16.default)("shadow-side shadow-r-4 shadow-hard", avatar.className)
10241
10015
  }
10242
10016
  )
10243
10017
  },
@@ -10246,7 +10020,7 @@ var AvatarGroup = ({
10246
10020
  showTotalNumber && notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10247
10021
  "div",
10248
10022
  {
10249
- className: (0, import_clsx17.default)(textClassNameMapping[size], "flex-row-2 truncate items-center"),
10023
+ className: (0, import_clsx16.default)(textClassNameMapping[size], "flex-row-2 truncate items-center"),
10250
10024
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { children: [
10251
10025
  "+ ",
10252
10026
  notDisplayedProfiles
@@ -10257,7 +10031,7 @@ var AvatarGroup = ({
10257
10031
  };
10258
10032
 
10259
10033
  // src/components/icons-and-geometry/Circle.tsx
10260
- var import_clsx18 = __toESM(require("clsx"));
10034
+ var import_clsx17 = __toESM(require("clsx"));
10261
10035
  var import_jsx_runtime24 = require("react/jsx-runtime");
10262
10036
  var Circle = ({
10263
10037
  radius = 20,
@@ -10269,7 +10043,7 @@ var Circle = ({
10269
10043
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10270
10044
  "div",
10271
10045
  {
10272
- className: (0, import_clsx18.default)(`rounded-full`, className),
10046
+ className: (0, import_clsx17.default)(`rounded-full`, className),
10273
10047
  style: {
10274
10048
  width: `${size}px`,
10275
10049
  height: `${size}px`,
@@ -10281,8 +10055,8 @@ var Circle = ({
10281
10055
  };
10282
10056
 
10283
10057
  // src/components/icons-and-geometry/Ring.tsx
10284
- var import_react23 = require("react");
10285
- var import_clsx19 = __toESM(require("clsx"));
10058
+ var import_react24 = require("react");
10059
+ var import_clsx18 = __toESM(require("clsx"));
10286
10060
  var import_jsx_runtime25 = require("react/jsx-runtime");
10287
10061
  var Ring = ({
10288
10062
  innerSize = 20,
@@ -10292,7 +10066,7 @@ var Ring = ({
10292
10066
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10293
10067
  "div",
10294
10068
  {
10295
- className: (0, import_clsx19.default)(`bg-transparent rounded-full outline`, className),
10069
+ className: (0, import_clsx18.default)(`bg-transparent rounded-full outline`, className),
10296
10070
  style: {
10297
10071
  width: `${innerSize}px`,
10298
10072
  height: `${innerSize}px`,
@@ -10310,9 +10084,9 @@ var AnimatedRing = ({
10310
10084
  onAnimationFinished,
10311
10085
  style
10312
10086
  }) => {
10313
- const [currentWidth, setCurrentWidth] = (0, import_react23.useState)(0);
10087
+ const [currentWidth, setCurrentWidth] = (0, import_react24.useState)(0);
10314
10088
  const milliseconds = 1e3 * fillAnimationDuration;
10315
- const animate = (0, import_react23.useCallback)((timestamp, startTime) => {
10089
+ const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
10316
10090
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
10317
10091
  const newWidth = Math.min(width * progress, width);
10318
10092
  setCurrentWidth(newWidth);
@@ -10326,7 +10100,7 @@ var AnimatedRing = ({
10326
10100
  }
10327
10101
  }
10328
10102
  }, [milliseconds, onAnimationFinished, repeating, width]);
10329
- (0, import_react23.useEffect)(() => {
10103
+ (0, import_react24.useEffect)(() => {
10330
10104
  if (currentWidth < width) {
10331
10105
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
10332
10106
  }
@@ -10361,10 +10135,10 @@ var RingWave = ({
10361
10135
  onAnimationFinished,
10362
10136
  style
10363
10137
  }) => {
10364
- const [currentInnerSize, setCurrentInnerSize] = (0, import_react23.useState)(startInnerSize);
10138
+ const [currentInnerSize, setCurrentInnerSize] = (0, import_react24.useState)(startInnerSize);
10365
10139
  const distance = endInnerSize - startInnerSize;
10366
10140
  const milliseconds = 1e3 * fillAnimationDuration;
10367
- const animate = (0, import_react23.useCallback)((timestamp, startTime) => {
10141
+ const animate = (0, import_react24.useCallback)((timestamp, startTime) => {
10368
10142
  const progress = Math.min((timestamp - startTime) / milliseconds, 1);
10369
10143
  const newInnerSize = Math.min(
10370
10144
  startInnerSize + distance * progress,
@@ -10381,7 +10155,7 @@ var RingWave = ({
10381
10155
  }
10382
10156
  }
10383
10157
  }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
10384
- (0, import_react23.useEffect)(() => {
10158
+ (0, import_react24.useEffect)(() => {
10385
10159
  if (currentInnerSize < endInnerSize) {
10386
10160
  requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
10387
10161
  }
@@ -10416,7 +10190,7 @@ var RadialRings = ({
10416
10190
  sizeCircle2 = 200,
10417
10191
  sizeCircle3 = 300
10418
10192
  }) => {
10419
- const [currentRing, setCurrentRing] = (0, import_react23.useState)(0);
10193
+ const [currentRing, setCurrentRing] = (0, import_react24.useState)(0);
10420
10194
  const size = sizeCircle3;
10421
10195
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10422
10196
  "div",
@@ -10431,7 +10205,7 @@ var RadialRings = ({
10431
10205
  Circle,
10432
10206
  {
10433
10207
  radius: sizeCircle1 / 2,
10434
- className: (0, import_clsx19.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10208
+ className: (0, import_clsx18.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
10435
10209
  style: {
10436
10210
  left: `${size / 2}px`,
10437
10211
  top: `${size / 2}px`
@@ -10445,7 +10219,7 @@ var RadialRings = ({
10445
10219
  width: (sizeCircle2 - sizeCircle1) / 2,
10446
10220
  onAnimationFinished: () => currentRing === 0 ? setCurrentRing(1) : null,
10447
10221
  repeating: true,
10448
- className: (0, import_clsx19.default)(
10222
+ className: (0, import_clsx18.default)(
10449
10223
  circle2ClassName,
10450
10224
  { "opacity-5": currentRing !== 0 }
10451
10225
  ),
@@ -10465,7 +10239,7 @@ var RadialRings = ({
10465
10239
  endInnerSize: sizeCircle2,
10466
10240
  width: waveWidth,
10467
10241
  repeating: true,
10468
- className: (0, import_clsx19.default)(waveBaseColor, `opacity-5`),
10242
+ className: (0, import_clsx18.default)(waveBaseColor, `opacity-5`),
10469
10243
  style: {
10470
10244
  left: `${size / 2}px`,
10471
10245
  top: `${size / 2}px`,
@@ -10479,7 +10253,7 @@ var RadialRings = ({
10479
10253
  Circle,
10480
10254
  {
10481
10255
  radius: sizeCircle2 / 2,
10482
- className: (0, import_clsx19.default)(
10256
+ className: (0, import_clsx18.default)(
10483
10257
  circle2ClassName,
10484
10258
  { "opacity-20": currentRing < 1 },
10485
10259
  `absolute z-[8] -translate-y-1/2 -translate-x-1/2`
@@ -10497,7 +10271,7 @@ var RadialRings = ({
10497
10271
  width: (sizeCircle3 - sizeCircle2) / 2,
10498
10272
  onAnimationFinished: () => currentRing === 1 ? setCurrentRing(2) : null,
10499
10273
  repeating: true,
10500
- className: (0, import_clsx19.default)(circle3ClassName),
10274
+ className: (0, import_clsx18.default)(circle3ClassName),
10501
10275
  style: {
10502
10276
  left: `${size / 2}px`,
10503
10277
  top: `${size / 2}px`,
@@ -10514,7 +10288,7 @@ var RadialRings = ({
10514
10288
  endInnerSize: sizeCircle3 - waveWidth,
10515
10289
  width: waveWidth,
10516
10290
  repeating: true,
10517
- className: (0, import_clsx19.default)(waveBaseColor, `opacity-5`),
10291
+ className: (0, import_clsx18.default)(waveBaseColor, `opacity-5`),
10518
10292
  style: {
10519
10293
  left: `${size / 2}px`,
10520
10294
  top: `${size / 2}px`,
@@ -10528,7 +10302,7 @@ var RadialRings = ({
10528
10302
  Circle,
10529
10303
  {
10530
10304
  radius: sizeCircle3 / 2,
10531
- className: (0, import_clsx19.default)(
10305
+ className: (0, import_clsx18.default)(
10532
10306
  circle3ClassName,
10533
10307
  { "opacity-20": currentRing < 2 },
10534
10308
  `absolute z-[6] -translate-y-1/2 -translate-x-1/2`
@@ -10565,13 +10339,13 @@ var TagIcon = ({
10565
10339
  };
10566
10340
 
10567
10341
  // src/components/layout/Carousel.tsx
10568
- var import_react24 = require("react");
10569
- var import_clsx20 = __toESM(require("clsx"));
10342
+ var import_react25 = require("react");
10343
+ var import_clsx19 = __toESM(require("clsx"));
10570
10344
  var import_lucide_react7 = require("lucide-react");
10571
10345
  var import_jsx_runtime27 = require("react/jsx-runtime");
10572
- var CarouselContext = (0, import_react24.createContext)(null);
10346
+ var CarouselContext = (0, import_react25.createContext)(null);
10573
10347
  var useCarouselContext = () => {
10574
- const context = (0, import_react24.useContext)(CarouselContext);
10348
+ const context = (0, import_react25.useContext)(CarouselContext);
10575
10349
  if (!context) {
10576
10350
  console.error("useCarouselContext must be used within CarouselContext");
10577
10351
  }
@@ -10582,7 +10356,7 @@ function CarouselTabs({
10582
10356
  }) {
10583
10357
  const translation = useHightideTranslation();
10584
10358
  const { id, slideCount, currentIndex, isLooping } = useCarouselContext();
10585
- const tabRefs = (0, import_react24.useRef)([]);
10359
+ const tabRefs = (0, import_react25.useRef)([]);
10586
10360
  const handleKeyDown = (event, index) => {
10587
10361
  let newIndex = index;
10588
10362
  if (event.key === "ArrowRight") {
@@ -10612,7 +10386,7 @@ function CarouselTabs({
10612
10386
  ref: (el) => tabRefs.current[index] = el,
10613
10387
  onClick: () => onChange(index),
10614
10388
  onKeyDown: (e) => handleKeyDown(e, index),
10615
- className: (0, import_clsx20.default)(
10389
+ className: (0, import_clsx19.default)(
10616
10390
  "w-8 min-w-8 h-3 min-h-3 first:rounded-l-md last:rounded-r-md",
10617
10391
  {
10618
10392
  "bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
@@ -10632,7 +10406,7 @@ function CarouselTabs({
10632
10406
  }
10633
10407
  );
10634
10408
  }
10635
- var CarouselSlide = (0, import_react24.forwardRef)(
10409
+ var CarouselSlide = (0, import_react25.forwardRef)(
10636
10410
  function CarouselSlide2({
10637
10411
  index,
10638
10412
  isSelected,
@@ -10646,7 +10420,7 @@ var CarouselSlide = (0, import_react24.forwardRef)(
10646
10420
  ...props,
10647
10421
  ref,
10648
10422
  id: `${id}-slide-${index}`,
10649
- className: (0, import_clsx20.default)("focus-style-none group/slide", props.className),
10423
+ className: (0, import_clsx19.default)("focus-style-none group/slide", props.className),
10650
10424
  tabIndex: isSelected ? 0 : void 0,
10651
10425
  role: "group",
10652
10426
  "aria-roledescription": translation("slide"),
@@ -10677,17 +10451,17 @@ var Carousel = ({
10677
10451
  ...props
10678
10452
  }) => {
10679
10453
  const translation = useHightideTranslation();
10680
- const slideRefs = (0, import_react24.useRef)([]);
10681
- const [currentIndex, setCurrentIndex] = (0, import_react24.useState)(0);
10682
- const [hasFocus, setHasFocus] = (0, import_react24.useState)(false);
10683
- const [dragState, setDragState] = (0, import_react24.useState)();
10454
+ const slideRefs = (0, import_react25.useRef)([]);
10455
+ const [currentIndex, setCurrentIndex] = (0, import_react25.useState)(0);
10456
+ const [hasFocus, setHasFocus] = (0, import_react25.useState)(false);
10457
+ const [dragState, setDragState] = (0, import_react25.useState)();
10684
10458
  const isPaused = hasFocus;
10685
- const carouselContainerRef = (0, import_react24.useRef)(null);
10686
- const [disableClick, setDisableClick] = (0, import_react24.useState)(false);
10687
- const timeOut = (0, import_react24.useRef)(void 0);
10688
- const length = (0, import_react24.useMemo)(() => children.length, [children]);
10459
+ const carouselContainerRef = (0, import_react25.useRef)(null);
10460
+ const [disableClick, setDisableClick] = (0, import_react25.useState)(false);
10461
+ const timeOut = (0, import_react25.useRef)(void 0);
10462
+ const length = (0, import_react25.useMemo)(() => children.length, [children]);
10689
10463
  const paddingItemCount = 3;
10690
- const generatedId = "carousel" + (0, import_react24.useId)();
10464
+ const generatedId = "carousel" + (0, import_react25.useId)();
10691
10465
  const id = props.id ?? generatedId;
10692
10466
  if (isAutoPlaying && !isLooping) {
10693
10467
  console.error("When isAutoLooping is true, isLooping should also be true");
@@ -10696,7 +10470,7 @@ var Carousel = ({
10696
10470
  autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
10697
10471
  animationTime = Math.max(100, animationTime);
10698
10472
  autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
10699
- (0, import_react24.useEffect)(() => {
10473
+ (0, import_react25.useEffect)(() => {
10700
10474
  const carousel = carouselContainerRef.current;
10701
10475
  if (carousel) {
10702
10476
  let onFocus = function() {
@@ -10719,20 +10493,20 @@ var Carousel = ({
10719
10493
  const canGoLeft = () => {
10720
10494
  return isLooping || currentIndex !== 0;
10721
10495
  };
10722
- const canGoRight = (0, import_react24.useCallback)(() => {
10496
+ const canGoRight = (0, import_react25.useCallback)(() => {
10723
10497
  return isLooping || currentIndex !== length - 1;
10724
10498
  }, [currentIndex, isLooping, length]);
10725
10499
  const left = () => {
10726
10500
  if (canGoLeft()) {
10727
- setCurrentIndex(currentIndex - 1);
10501
+ setCurrentIndex((currentIndex + length - 1) % length);
10728
10502
  }
10729
10503
  };
10730
- const right = (0, import_react24.useCallback)(() => {
10504
+ const right = (0, import_react25.useCallback)(() => {
10731
10505
  if (canGoRight()) {
10732
10506
  setCurrentIndex((currentIndex + length + 1) % length);
10733
10507
  }
10734
10508
  }, [canGoRight, currentIndex, length]);
10735
- (0, import_react24.useEffect)(() => {
10509
+ (0, import_react25.useEffect)(() => {
10736
10510
  if (!timeOut.current && !isPaused) {
10737
10511
  if (autoLoopingTimeOut > 0) {
10738
10512
  timeOut.current = setTimeout(() => {
@@ -10784,10 +10558,10 @@ var Carousel = ({
10784
10558
  }
10785
10559
  setDragState(void 0);
10786
10560
  };
10787
- (0, import_react24.useEffect)(() => {
10561
+ (0, import_react25.useEffect)(() => {
10788
10562
  setDisableClick(!dragState);
10789
10563
  }, [dragState]);
10790
- (0, import_react24.useEffect)(() => {
10564
+ (0, import_react25.useEffect)(() => {
10791
10565
  onSlideChanged?.(currentIndex);
10792
10566
  }, [currentIndex]);
10793
10567
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CarouselContext.Provider, { value: { id, currentIndex, slideCount: length, isLooping }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
@@ -10795,7 +10569,7 @@ var Carousel = ({
10795
10569
  {
10796
10570
  ref: carouselContainerRef,
10797
10571
  ...props,
10798
- className: (0, import_clsx20.default)("flex-col-2 items-center w-full", props.className),
10572
+ className: (0, import_clsx19.default)("flex-col-2 items-center w-full", props.className),
10799
10573
  id,
10800
10574
  role: "region",
10801
10575
  "aria-roledescription": translation("slide"),
@@ -10804,7 +10578,7 @@ var Carousel = ({
10804
10578
  "div",
10805
10579
  {
10806
10580
  ...slideContainerProps,
10807
- className: (0, import_clsx20.default)(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10581
+ className: (0, import_clsx19.default)(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
10808
10582
  children: [
10809
10583
  hintNext ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
10810
10584
  "div",
@@ -10813,7 +10587,7 @@ var Carousel = ({
10813
10587
  onPointerMove: handlePointerMove,
10814
10588
  onPointerUp: handlePointerUp,
10815
10589
  onPointerLeave: handlePointerUp,
10816
- className: (0, import_clsx20.default)(`flex-row-2 relative h-full`, heightClassName),
10590
+ className: (0, import_clsx19.default)(`flex-row-2 relative h-full`, heightClassName),
10817
10591
  children: [
10818
10592
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
10819
10593
  item,
@@ -10826,7 +10600,7 @@ var Carousel = ({
10826
10600
  ref: isInItems ? slideRefs[index] : void 0,
10827
10601
  index,
10828
10602
  isSelected: isInItems && currentIndex === index,
10829
- className: (0, import_clsx20.default)(
10603
+ className: (0, import_clsx19.default)(
10830
10604
  `absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
10831
10605
  slideClassName
10832
10606
  ),
@@ -10843,13 +10617,13 @@ var Carousel = ({
10843
10617
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10844
10618
  "div",
10845
10619
  {
10846
- 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)
10620
+ 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)
10847
10621
  }
10848
10622
  ),
10849
10623
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10850
10624
  "div",
10851
10625
  {
10852
- 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)
10626
+ 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)
10853
10627
  }
10854
10628
  )
10855
10629
  ]
@@ -10858,7 +10632,7 @@ var Carousel = ({
10858
10632
  "div",
10859
10633
  {
10860
10634
  ref: slideRefs[currentIndex],
10861
- className: (0, import_clsx20.default)("px-16 h-full"),
10635
+ className: (0, import_clsx19.default)("px-16 h-full"),
10862
10636
  tabIndex: 0,
10863
10637
  role: "group",
10864
10638
  "aria-roledescription": translation("slide"),
@@ -10871,20 +10645,22 @@ var Carousel = ({
10871
10645
  ),
10872
10646
  arrows && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
10873
10647
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10874
- IconButton,
10648
+ Button,
10875
10649
  {
10650
+ layout: "icon",
10876
10651
  color: "neutral",
10877
- className: (0, import_clsx20.default)("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10652
+ className: (0, import_clsx19.default)("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
10878
10653
  disabled: !canGoLeft(),
10879
10654
  onClick: () => left(),
10880
10655
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronLeft, { size: 24 })
10881
10656
  }
10882
10657
  ),
10883
10658
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10884
- IconButton,
10659
+ Button,
10885
10660
  {
10661
+ layout: "icon",
10886
10662
  color: "neutral",
10887
- className: (0, import_clsx20.default)("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10663
+ className: (0, import_clsx19.default)("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
10888
10664
  disabled: !canGoRight(),
10889
10665
  onClick: () => right(),
10890
10666
  children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.ChevronRight, { size: 24 })
@@ -10901,7 +10677,7 @@ var Carousel = ({
10901
10677
  };
10902
10678
 
10903
10679
  // src/components/layout/DividerInserter.tsx
10904
- var import_clsx21 = __toESM(require("clsx"));
10680
+ var import_clsx20 = __toESM(require("clsx"));
10905
10681
  var import_jsx_runtime28 = require("react/jsx-runtime");
10906
10682
  var DividerInserter = ({
10907
10683
  children,
@@ -10919,11 +10695,11 @@ var DividerInserter = ({
10919
10695
  }
10920
10696
  }
10921
10697
  }
10922
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx21.default)(className), ...restProps, children: nodes });
10698
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx20.default)(className), ...restProps, children: nodes });
10923
10699
  };
10924
10700
 
10925
10701
  // src/components/layout/FAQSection.tsx
10926
- var import_clsx22 = __toESM(require("clsx"));
10702
+ var import_clsx21 = __toESM(require("clsx"));
10927
10703
 
10928
10704
  // src/components/layout/MarkdownInterpreter.tsx
10929
10705
  var import_jsx_runtime29 = require("react/jsx-runtime");
@@ -11169,7 +10945,7 @@ var FAQSection = ({
11169
10945
  label: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { id, className: "typography-title-md", children: title }),
11170
10946
  clickOnlyOnHeader: false,
11171
10947
  icon: (expanded) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ExpansionIcon, { isExpanded: expanded, className: "text-primary" }),
11172
- className: (0, import_clsx22.default)("rounded-xl", expandableClassName),
10948
+ className: (0, import_clsx21.default)("rounded-xl", expandableClassName),
11173
10949
  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 })
11174
10950
  },
11175
10951
  id
@@ -11177,11 +10953,11 @@ var FAQSection = ({
11177
10953
  };
11178
10954
 
11179
10955
  // src/components/layout/FloatingContainer.tsx
11180
- var import_react25 = require("react");
10956
+ var import_react26 = require("react");
11181
10957
  var import_react_dom3 = require("react-dom");
11182
- var import_clsx23 = require("clsx");
10958
+ var import_clsx22 = require("clsx");
11183
10959
  var import_jsx_runtime31 = require("react/jsx-runtime");
11184
- var FloatingContainer = (0, import_react25.forwardRef)(function FloatingContainer2({
10960
+ var FloatingContainer = (0, import_react26.forwardRef)(function FloatingContainer2({
11185
10961
  children,
11186
10962
  backgroundOverlay,
11187
10963
  anchor,
@@ -11193,8 +10969,8 @@ var FloatingContainer = (0, import_react25.forwardRef)(function FloatingContaine
11193
10969
  gap = 4,
11194
10970
  ...props
11195
10971
  }, forwardRef12) {
11196
- const innerRef = (0, import_react25.useRef)(null);
11197
- (0, import_react25.useImperativeHandle)(forwardRef12, () => innerRef.current);
10972
+ const innerRef = (0, import_react26.useRef)(null);
10973
+ (0, import_react26.useImperativeHandle)(forwardRef12, () => innerRef.current);
11198
10974
  const position = useFloatingElement({
11199
10975
  active: !props.hidden,
11200
10976
  containerRef: innerRef,
@@ -11224,7 +11000,7 @@ var FloatingContainer = (0, import_react25.forwardRef)(function FloatingContaine
11224
11000
  ...position,
11225
11001
  ...props.style
11226
11002
  },
11227
- className: (0, import_clsx23.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
11003
+ className: (0, import_clsx22.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
11228
11004
  children
11229
11005
  }
11230
11006
  )
@@ -11234,18 +11010,18 @@ var FloatingContainer = (0, import_react25.forwardRef)(function FloatingContaine
11234
11010
  });
11235
11011
 
11236
11012
  // src/components/layout/ListBox.tsx
11237
- var import_react26 = __toESM(require("react"));
11238
- var import_clsx24 = require("clsx");
11013
+ var import_react27 = __toESM(require("react"));
11014
+ var import_clsx23 = require("clsx");
11239
11015
  var import_jsx_runtime32 = require("react/jsx-runtime");
11240
- var ListBoxContext = (0, import_react26.createContext)(null);
11016
+ var ListBoxContext = (0, import_react27.createContext)(null);
11241
11017
  function useListBoxContext() {
11242
- const ctx = (0, import_react26.useContext)(ListBoxContext);
11018
+ const ctx = (0, import_react27.useContext)(ListBoxContext);
11243
11019
  if (!ctx) {
11244
11020
  throw new Error("ListBoxItem must be used within a ListBoxPrimitive");
11245
11021
  }
11246
11022
  return ctx;
11247
11023
  }
11248
- var ListBoxItem = (0, import_react26.forwardRef)(
11024
+ var ListBoxItem = (0, import_react27.forwardRef)(
11249
11025
  function ListBoxItem2({ value, disabled = false, children, className, ...rest }, ref) {
11250
11026
  const {
11251
11027
  registerItem,
@@ -11255,9 +11031,9 @@ var ListBoxItem = (0, import_react26.forwardRef)(
11255
11031
  onItemClick,
11256
11032
  isSelected
11257
11033
  } = useListBoxContext();
11258
- const itemRef = (0, import_react26.useRef)(null);
11259
- const id = import_react26.default.useId();
11260
- (0, import_react26.useEffect)(() => {
11034
+ const itemRef = (0, import_react27.useRef)(null);
11035
+ const id = import_react27.default.useId();
11036
+ (0, import_react27.useEffect)(() => {
11261
11037
  registerItem({ id, value, disabled, ref: itemRef });
11262
11038
  return () => unregisterItem(id);
11263
11039
  }, [id, value, disabled, registerItem, unregisterItem]);
@@ -11278,7 +11054,7 @@ var ListBoxItem = (0, import_react26.forwardRef)(
11278
11054
  "data-highlighted": isHighlighted ? "" : void 0,
11279
11055
  "data-selected": selected ? "" : void 0,
11280
11056
  "data-disabled": disabled ? "" : void 0,
11281
- className: (0, import_clsx24.clsx)(
11057
+ className: (0, import_clsx23.clsx)(
11282
11058
  "flex-row-1 items-center px-2 py-1 rounded-md",
11283
11059
  "data-highlighted:bg-primary/20",
11284
11060
  "data-disabled:text-disabled data-disabled:cursor-not-allowed",
@@ -11299,7 +11075,7 @@ var ListBoxItem = (0, import_react26.forwardRef)(
11299
11075
  );
11300
11076
  }
11301
11077
  );
11302
- var ListBoxPrimitive = (0, import_react26.forwardRef)(
11078
+ var ListBoxPrimitive = (0, import_react27.forwardRef)(
11303
11079
  function ListBoxPrimitive2({
11304
11080
  value,
11305
11081
  onSelectionChanged,
@@ -11309,9 +11085,9 @@ var ListBoxPrimitive = (0, import_react26.forwardRef)(
11309
11085
  orientation = "vertical",
11310
11086
  ...props
11311
11087
  }, ref) {
11312
- const itemsRef = (0, import_react26.useRef)([]);
11313
- const [highlightedIndex, setHighlightedIndex] = (0, import_react26.useState)(void 0);
11314
- const registerItem = (0, import_react26.useCallback)((item) => {
11088
+ const itemsRef = (0, import_react27.useRef)([]);
11089
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react27.useState)(void 0);
11090
+ const registerItem = (0, import_react27.useCallback)((item) => {
11315
11091
  itemsRef.current.push(item);
11316
11092
  itemsRef.current.sort((a, b) => {
11317
11093
  const aEl = a.ref.current;
@@ -11320,14 +11096,14 @@ var ListBoxPrimitive = (0, import_react26.forwardRef)(
11320
11096
  return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
11321
11097
  });
11322
11098
  }, []);
11323
- const unregisterItem = (0, import_react26.useCallback)((id) => {
11099
+ const unregisterItem = (0, import_react27.useCallback)((id) => {
11324
11100
  itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
11325
11101
  }, []);
11326
- const isSelected = (0, import_react26.useCallback)(
11102
+ const isSelected = (0, import_react27.useCallback)(
11327
11103
  (val) => (value ?? []).includes(val),
11328
11104
  [value]
11329
11105
  );
11330
- const onItemClickedHandler = (0, import_react26.useCallback)(
11106
+ const onItemClickedHandler = (0, import_react27.useCallback)(
11331
11107
  (id) => {
11332
11108
  const index = itemsRef.current.findIndex((i) => i.id === id);
11333
11109
  if (index === -1) {
@@ -11351,13 +11127,13 @@ var ListBoxPrimitive = (0, import_react26.forwardRef)(
11351
11127
  },
11352
11128
  [onItemClicked, isSelection, isMultiple, onSelectionChanged, isSelected, value]
11353
11129
  );
11354
- const setHighlightedId = (0, import_react26.useCallback)((id) => {
11130
+ const setHighlightedId = (0, import_react27.useCallback)((id) => {
11355
11131
  const index = itemsRef.current.findIndex((i) => i.id === id);
11356
11132
  if (index !== -1) {
11357
11133
  setHighlightedIndex(index);
11358
11134
  }
11359
11135
  }, []);
11360
- (0, import_react26.useEffect)(() => {
11136
+ (0, import_react27.useEffect)(() => {
11361
11137
  if (highlightedIndex !== void 0) {
11362
11138
  itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
11363
11139
  }
@@ -11462,7 +11238,7 @@ var ListBoxMultipleUncontrolled = ({
11462
11238
  }
11463
11239
  );
11464
11240
  };
11465
- var ListBox = (0, import_react26.forwardRef)(function ListBox2({
11241
+ var ListBox = (0, import_react27.forwardRef)(function ListBox2({
11466
11242
  value,
11467
11243
  onSelectionChanged,
11468
11244
  ...props
@@ -11497,20 +11273,20 @@ var ListBoxUncontrolled = ({
11497
11273
  };
11498
11274
 
11499
11275
  // src/components/layout/TabView.tsx
11500
- var import_react27 = require("react");
11501
11276
  var import_react28 = require("react");
11502
- var import_clsx25 = __toESM(require("clsx"));
11277
+ var import_react29 = require("react");
11278
+ var import_clsx24 = __toESM(require("clsx"));
11503
11279
  var import_jsx_runtime33 = require("react/jsx-runtime");
11504
- var TabContext = (0, import_react28.createContext)(null);
11280
+ var TabContext = (0, import_react29.createContext)(null);
11505
11281
  function useTabContext() {
11506
- const ctx = (0, import_react28.useContext)(TabContext);
11282
+ const ctx = (0, import_react29.useContext)(TabContext);
11507
11283
  if (!ctx) throw new Error("useTabContext must be used inside a <TabView>");
11508
11284
  return ctx;
11509
11285
  }
11510
11286
  function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, ...props }) {
11511
- const [tabs, setTabs] = (0, import_react28.useState)([]);
11512
- const [active, setActiveState] = (0, import_react28.useState)(null);
11513
- const buttonRefs = (0, import_react28.useRef)({});
11287
+ const [tabs, setTabs] = (0, import_react29.useState)([]);
11288
+ const [active, setActiveState] = (0, import_react29.useState)(null);
11289
+ const buttonRefs = (0, import_react29.useRef)({});
11514
11290
  const setActive = (id) => {
11515
11291
  setActiveState(id);
11516
11292
  onTabChanged?.(id);
@@ -11544,8 +11320,8 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11544
11320
  buttonRefs.current[nextId]?.focus();
11545
11321
  };
11546
11322
  const value = { active, setActive, register, unregister, tabs };
11547
- 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: [
11548
- /* @__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)(
11323
+ 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: [
11324
+ /* @__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)(
11549
11325
  "button",
11550
11326
  {
11551
11327
  role: "tab",
@@ -11556,8 +11332,8 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11556
11332
  ref: (el) => buttonRefs.current[t.id] = el,
11557
11333
  onClick: () => setActive(t.id),
11558
11334
  onKeyDown: (e) => onKeyDown(e, t.id),
11559
- className: (0, import_clsx25.default)(
11560
- "flex-row-0 grow justify-center px-3 pb-1 typography-label-md border-b-2",
11335
+ className: (0, import_clsx24.default)(
11336
+ "flex-row-0 grow justify-center px-3 pb-2.25 typography-label-md font-bold border-b-2",
11561
11337
  active === t.id ? "border-primary" : "text-description hover:text-on-background"
11562
11338
  ),
11563
11339
  children: t.label
@@ -11569,9 +11345,9 @@ function TabView({ children, outerDivProps, onTabChanged, initialTabIndex = 0, .
11569
11345
  }
11570
11346
  function Tab({ id: customId, label, children, ...props }) {
11571
11347
  const { active, register, unregister } = useTabContext();
11572
- const generatedId = (0, import_react27.useId)();
11348
+ const generatedId = (0, import_react28.useId)();
11573
11349
  const id = customId ?? generatedId;
11574
- (0, import_react28.useEffect)(() => {
11350
+ (0, import_react29.useEffect)(() => {
11575
11351
  register(id, label);
11576
11352
  return () => unregister(id);
11577
11353
  }, [id, label]);
@@ -11590,7 +11366,7 @@ function Tab({ id: customId, label, children, ...props }) {
11590
11366
  }
11591
11367
 
11592
11368
  // src/components/layout/TextImage.tsx
11593
- var import_clsx26 = __toESM(require("clsx"));
11369
+ var import_clsx25 = __toESM(require("clsx"));
11594
11370
  var import_jsx_runtime34 = require("react/jsx-runtime");
11595
11371
  var TextImage = ({
11596
11372
  title,
@@ -11616,7 +11392,7 @@ var TextImage = ({
11616
11392
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11617
11393
  "div",
11618
11394
  {
11619
- className: (0, import_clsx26.default)("rounded-2xl w-full", className),
11395
+ className: (0, import_clsx25.default)("rounded-2xl w-full", className),
11620
11396
  style: {
11621
11397
  backgroundImage: `url(${imageUrl})`,
11622
11398
  backgroundSize: "cover"
@@ -11624,9 +11400,9 @@ var TextImage = ({
11624
11400
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
11625
11401
  "div",
11626
11402
  {
11627
- className: (0, import_clsx26.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11403
+ className: (0, import_clsx25.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
11628
11404
  children: [
11629
- 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 }) }),
11405
+ 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 }) }),
11630
11406
  /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-col-1 overflow-hidden", children: [
11631
11407
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "typography-title-lg", children: title }),
11632
11408
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
@@ -11694,31 +11470,31 @@ var VerticalDivider = ({
11694
11470
 
11695
11471
  // src/components/loading-states/ErrorComponent.tsx
11696
11472
  var import_lucide_react8 = require("lucide-react");
11697
- var import_clsx27 = __toESM(require("clsx"));
11473
+ var import_clsx26 = __toESM(require("clsx"));
11698
11474
  var import_jsx_runtime36 = require("react/jsx-runtime");
11699
11475
  var ErrorComponent = ({
11700
11476
  errorText,
11701
11477
  classname
11702
11478
  }) => {
11703
11479
  const translation = useHightideTranslation();
11704
- 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: [
11480
+ 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: [
11705
11481
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react8.AlertOctagon, { size: 64, className: "text-warning" }),
11706
11482
  errorText ?? `${translation("errorOccurred")} :(`
11707
11483
  ] });
11708
11484
  };
11709
11485
 
11710
11486
  // src/components/loading-states/LoadingAndErrorComponent.tsx
11711
- var import_react29 = require("react");
11487
+ var import_react30 = require("react");
11712
11488
 
11713
11489
  // src/components/loading-states/LoadingContainer.tsx
11714
- var import_clsx28 = require("clsx");
11490
+ var import_clsx27 = require("clsx");
11715
11491
  var import_jsx_runtime37 = require("react/jsx-runtime");
11716
11492
  var LoadingContainer = ({ className }) => {
11717
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx28.clsx)("relative overflow-hidden shimmer bg-disabled-background rounded-md", className) });
11493
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx27.clsx)("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
11718
11494
  };
11719
11495
 
11720
11496
  // src/components/loading-states/LoadingAndErrorComponent.tsx
11721
- var import_clsx29 = require("clsx");
11497
+ var import_clsx28 = require("clsx");
11722
11498
  var import_jsx_runtime38 = require("react/jsx-runtime");
11723
11499
  var LoadingAndErrorComponent = ({
11724
11500
  children,
@@ -11729,8 +11505,8 @@ var LoadingAndErrorComponent = ({
11729
11505
  minimumLoadingDuration = 200,
11730
11506
  className
11731
11507
  }) => {
11732
- const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react29.useState)(false);
11733
- const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react29.useState)(false);
11508
+ const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react30.useState)(false);
11509
+ const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react30.useState)(false);
11734
11510
  if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
11735
11511
  setIsInMinimumLoading(true);
11736
11512
  setTimeout(() => {
@@ -11739,36 +11515,35 @@ var LoadingAndErrorComponent = ({
11739
11515
  }, minimumLoadingDuration);
11740
11516
  }
11741
11517
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
11742
- return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)(className) });
11518
+ return loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx28.clsx)(className) });
11743
11519
  }
11744
11520
  if (hasError) {
11745
- return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx29.clsx)("bg-negative", className) });
11521
+ return errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LoadingContainer, { className: (0, import_clsx28.clsx)("bg-negative", className) });
11746
11522
  }
11747
11523
  return children;
11748
11524
  };
11749
11525
 
11750
11526
  // src/components/loading-states/LoadingAnimation.tsx
11751
- var import_clsx30 = __toESM(require("clsx"));
11527
+ var import_clsx29 = __toESM(require("clsx"));
11752
11528
  var import_jsx_runtime39 = require("react/jsx-runtime");
11753
11529
  var LoadingAnimation = ({
11754
11530
  loadingText,
11755
11531
  classname
11756
11532
  }) => {
11757
11533
  const translation = useHightideTranslation();
11758
- 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: [
11534
+ 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: [
11759
11535
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HelpwaveLogo, { animate: "loading" }),
11760
11536
  loadingText ?? `${translation("loading")}...`
11761
11537
  ] });
11762
11538
  };
11763
11539
 
11764
11540
  // src/components/loading-states/LoadingButton.tsx
11765
- var import_clsx31 = __toESM(require("clsx"));
11541
+ var import_clsx30 = __toESM(require("clsx"));
11766
11542
  var import_jsx_runtime40 = require("react/jsx-runtime");
11767
11543
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
11768
- const paddingClass = ButtonUtil.paddingMapping[size];
11769
11544
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "inline-block relative", children: [
11770
- 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", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HelpwaveLogo, { animate: "loading", className: "text-white" }) }),
11771
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick })
11545
+ 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" }) }),
11546
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { ...rest, size, disabled: rest.disabled, onClick })
11772
11547
  ] });
11773
11548
  };
11774
11549
 
@@ -11830,33 +11605,39 @@ var ProgressIndicator = ({
11830
11605
 
11831
11606
  // src/components/navigation/BreadCrumb.tsx
11832
11607
  var import_link = __toESM(require_link2());
11833
- var import_clsx32 = __toESM(require("clsx"));
11834
- var import_react30 = require("react");
11608
+ var import_clsx31 = __toESM(require("clsx"));
11609
+ var import_react31 = require("react");
11835
11610
  var import_jsx_runtime42 = require("react/jsx-runtime");
11836
11611
  var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
11837
- const color = "text-description";
11838
- 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) => {
11612
+ 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) => {
11839
11613
  const isLast = index === crumbs.length - 1;
11840
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react30.Fragment, { children: [
11614
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react31.Fragment, { children: [
11841
11615
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11842
11616
  import_link.default,
11843
11617
  {
11844
11618
  href: crumb.link,
11845
- className: (0, import_clsx32.default)("btn-sm hover:bg-description/20", linkClassName, { [color]: !isLast }),
11619
+ className: (0, import_clsx31.default)(
11620
+ "btn-sm coloring-text-hover",
11621
+ {
11622
+ description: !isLast,
11623
+ neutral: isLast
11624
+ },
11625
+ linkClassName
11626
+ ),
11846
11627
  children: crumb.display
11847
11628
  }
11848
11629
  ),
11849
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: (0, import_clsx32.default)(`px-1`, color), children: "/" })
11630
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: (0, import_clsx31.default)(`px-1`, "text-description"), children: "/" })
11850
11631
  ] }, index);
11851
11632
  }) });
11852
11633
  };
11853
11634
 
11854
11635
  // src/components/navigation/Navigation.tsx
11855
11636
  var import_lucide_react9 = require("lucide-react");
11856
- var import_react31 = require("react");
11857
11637
  var import_react32 = require("react");
11638
+ var import_react33 = require("react");
11858
11639
  var import_link2 = __toESM(require_link2());
11859
- var import_clsx33 = __toESM(require("clsx"));
11640
+ var import_clsx32 = __toESM(require("clsx"));
11860
11641
  var import_jsx_runtime43 = require("react/jsx-runtime");
11861
11642
  function isSubItem(item) {
11862
11643
  return "items" in item && Array.isArray(item.items);
@@ -11867,10 +11648,10 @@ var NavigationItemWithSubItem = ({
11867
11648
  horizontalAlignment = "center",
11868
11649
  ...options
11869
11650
  }) => {
11870
- const [isOpen, setOpen] = (0, import_react32.useState)(false);
11871
- const containerRef = (0, import_react32.useRef)();
11872
- const triggerRef = (0, import_react32.useRef)(null);
11873
- const id = (0, import_react32.useId)();
11651
+ const [isOpen, setOpen] = (0, import_react33.useState)(false);
11652
+ const containerRef = (0, import_react33.useRef)();
11653
+ const triggerRef = (0, import_react33.useRef)(null);
11654
+ const id = (0, import_react33.useId)();
11874
11655
  const style = useFloatingElement({
11875
11656
  active: isOpen,
11876
11657
  containerRef,
@@ -11878,12 +11659,13 @@ var NavigationItemWithSubItem = ({
11878
11659
  horizontalAlignment,
11879
11660
  ...options
11880
11661
  });
11881
- const onBlur = (0, import_react32.useCallback)((event) => {
11662
+ const onBlur = (0, import_react33.useCallback)((event) => {
11882
11663
  const nextFocus = event.relatedTarget;
11883
11664
  if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
11884
11665
  setOpen(false);
11885
11666
  }
11886
11667
  }, []);
11668
+ const zIndex = useZIndexRegister(isOpen);
11887
11669
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
11888
11670
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
11889
11671
  "button",
@@ -11918,11 +11700,11 @@ var NavigationItemWithSubItem = ({
11918
11700
  },
11919
11701
  onBlur,
11920
11702
  hidden: !isOpen,
11921
- className: (0, import_clsx33.default)(
11922
- "fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md z-2001",
11703
+ className: (0, import_clsx32.default)(
11704
+ "fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md",
11923
11705
  { "opacity-0": !style }
11924
11706
  ),
11925
- style,
11707
+ style: { ...style, zIndex },
11926
11708
  children: items.map(({ link, label: label2, external }, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11927
11709
  import_link2.default,
11928
11710
  {
@@ -11937,27 +11719,30 @@ var NavigationItemWithSubItem = ({
11937
11719
  ] });
11938
11720
  };
11939
11721
  var NavigationItemList = ({ items, ...restProps }) => {
11940
- 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)) });
11722
+ 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)) });
11941
11723
  };
11942
11724
  var Navigation = ({ ...props }) => {
11943
- const [isMobileOpen, setIsMobileOpen] = (0, import_react32.useState)(false);
11944
- const id = (0, import_react32.useId)();
11945
- const menuRef = (0, import_react32.useRef)(null);
11946
- (0, import_react31.useEffect)(() => {
11725
+ const [isMobileOpen, setIsMobileOpen] = (0, import_react33.useState)(false);
11726
+ const id = (0, import_react33.useId)();
11727
+ const menuRef = (0, import_react33.useRef)(null);
11728
+ (0, import_react32.useEffect)(() => {
11947
11729
  menuRef.current?.focus();
11948
11730
  }, [isMobileOpen]);
11731
+ const zIndex = useZIndexRegister(isMobileOpen);
11949
11732
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("nav", { children: [
11950
11733
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11951
11734
  NavigationItemList,
11952
11735
  {
11953
11736
  ...props,
11954
- className: (0, import_clsx33.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11737
+ className: (0, import_clsx32.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
11955
11738
  }
11956
11739
  ),
11957
11740
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11958
- IconButton,
11741
+ Button,
11959
11742
  {
11960
- color: "transparent",
11743
+ layout: "icon",
11744
+ coloringStyle: "text",
11745
+ color: "neutral",
11961
11746
  onClick: () => setIsMobileOpen(true),
11962
11747
  className: "desktop:hidden",
11963
11748
  "aria-haspopup": "true",
@@ -11979,16 +11764,26 @@ var Navigation = ({ ...props }) => {
11979
11764
  event.stopPropagation();
11980
11765
  }
11981
11766
  },
11982
- className: (0, import_clsx33.default)(
11983
- "flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen z-2000 bg-surface text-on-surface",
11767
+ className: (0, import_clsx32.default)(
11768
+ "flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen bg-surface text-on-surface",
11984
11769
  {
11985
11770
  "desktop:hidden": isMobileOpen
11986
11771
  },
11987
11772
  props.className
11988
11773
  ),
11774
+ style: { zIndex },
11989
11775
  children: [
11990
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconButton, { color: "transparent", onClick: () => setIsMobileOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.XIcon, {}) }),
11991
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemList, { ...props, className: (0, import_clsx33.default)("flex-col-8", props.className) })
11776
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11777
+ Button,
11778
+ {
11779
+ layout: "icon",
11780
+ coloringStyle: "text",
11781
+ color: "neutral",
11782
+ onClick: () => setIsMobileOpen(false),
11783
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.XIcon, {})
11784
+ }
11785
+ ),
11786
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NavigationItemList, { ...props, className: (0, import_clsx32.default)("flex-col-8", props.className) })
11992
11787
  ]
11993
11788
  }
11994
11789
  )
@@ -11997,8 +11792,8 @@ var Navigation = ({ ...props }) => {
11997
11792
 
11998
11793
  // src/components/navigation/Pagination.tsx
11999
11794
  var import_lucide_react10 = require("lucide-react");
12000
- var import_clsx34 = __toESM(require("clsx"));
12001
- var import_react33 = require("react");
11795
+ var import_clsx33 = __toESM(require("clsx"));
11796
+ var import_react34 = require("react");
12002
11797
  var import_jsx_runtime44 = require("react/jsx-runtime");
12003
11798
  var Pagination = ({
12004
11799
  pageIndex,
@@ -12008,11 +11803,11 @@ var Pagination = ({
12008
11803
  style
12009
11804
  }) => {
12010
11805
  const translation = useHightideTranslation();
12011
- const [value, setValue] = (0, import_react33.useState)((pageIndex + 1).toString());
11806
+ const [value, setValue] = (0, import_react34.useState)((pageIndex + 1).toString());
12012
11807
  const noPages = pageCount === 0;
12013
11808
  const onFirstPage = pageIndex === 0 && !noPages;
12014
11809
  const onLastPage = pageIndex === pageCount - 1;
12015
- (0, import_react33.useEffect)(() => {
11810
+ (0, import_react34.useEffect)(() => {
12016
11811
  if (noPages) {
12017
11812
  setValue("0");
12018
11813
  } else {
@@ -12022,15 +11817,35 @@ var Pagination = ({
12022
11817
  const changePage = (page) => {
12023
11818
  onPageChanged(page);
12024
11819
  };
12025
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx34.default)("flex-row-1", className), style, children: [
12026
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconButton, { color: "transparent", onClick: () => changePage(0), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronFirst, {}) }),
12027
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex - 1), disabled: onFirstPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronLeft, {}) }),
11820
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: (0, import_clsx33.default)("flex-row-1", className), style, children: [
11821
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11822
+ Button,
11823
+ {
11824
+ layout: "icon",
11825
+ coloringStyle: "text",
11826
+ color: "neutral",
11827
+ onClick: () => changePage(0),
11828
+ disabled: onFirstPage || noPages,
11829
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronFirst, {})
11830
+ }
11831
+ ),
11832
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11833
+ Button,
11834
+ {
11835
+ layout: "icon",
11836
+ coloringStyle: "text",
11837
+ color: "neutral",
11838
+ onClick: () => changePage(pageIndex - 1),
11839
+ disabled: onFirstPage || noPages,
11840
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronLeft, {})
11841
+ }
11842
+ ),
12028
11843
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex-row-2 min-w-56 items-center justify-center mx-2 text-center", children: [
12029
11844
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12030
11845
  Input,
12031
11846
  {
12032
11847
  value,
12033
- className: (0, import_clsx34.default)(
11848
+ className: (0, import_clsx33.default)(
12034
11849
  "w-24 text-center font-bold input-indicator-hidden h-10"
12035
11850
  ),
12036
11851
  type: "number",
@@ -12059,14 +11874,34 @@ var Pagination = ({
12059
11874
  }
12060
11875
  )
12061
11876
  ] }),
12062
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageIndex + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronRight, {}) }),
12063
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconButton, { color: "transparent", onClick: () => changePage(pageCount - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronLast, {}) })
11877
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11878
+ Button,
11879
+ {
11880
+ layout: "icon",
11881
+ coloringStyle: "text",
11882
+ color: "neutral",
11883
+ onClick: () => changePage(pageIndex + 1),
11884
+ disabled: onLastPage || noPages,
11885
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronRight, {})
11886
+ }
11887
+ ),
11888
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11889
+ Button,
11890
+ {
11891
+ layout: "icon",
11892
+ coloringStyle: "text",
11893
+ color: "neutral",
11894
+ onClick: () => changePage(pageCount - 1),
11895
+ disabled: onLastPage || noPages,
11896
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react10.ChevronLast, {})
11897
+ }
11898
+ )
12064
11899
  ] });
12065
11900
  };
12066
11901
 
12067
11902
  // src/components/navigation/StepperBar.tsx
12068
11903
  var import_lucide_react11 = require("lucide-react");
12069
- var import_clsx35 = __toESM(require("clsx"));
11904
+ var import_clsx34 = __toESM(require("clsx"));
12070
11905
  var import_jsx_runtime45 = require("react/jsx-runtime");
12071
11906
  var defaultState = {
12072
11907
  currentStep: 0,
@@ -12092,10 +11927,10 @@ var StepperBar = ({
12092
11927
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12093
11928
  "div",
12094
11929
  {
12095
- className: (0, import_clsx35.default)("flex-row-2 justify-between", className),
11930
+ className: (0, import_clsx34.default)("flex-row-2 justify-between", className),
12096
11931
  children: [
12097
11932
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12098
- SolidButton,
11933
+ Button,
12099
11934
  {
12100
11935
  disabled: currentStep === 0 || disabledSteps.has(currentStep),
12101
11936
  onClick: () => {
@@ -12114,7 +11949,7 @@ var StepperBar = ({
12114
11949
  "div",
12115
11950
  {
12116
11951
  onClick: () => seen && update(index),
12117
- className: (0, import_clsx35.default)(
11952
+ className: (0, import_clsx34.default)(
12118
11953
  "rounded-full w-4 h-4",
12119
11954
  {
12120
11955
  "bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
@@ -12131,7 +11966,7 @@ var StepperBar = ({
12131
11966
  );
12132
11967
  }) }),
12133
11968
  currentStep !== numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12134
- SolidButton,
11969
+ Button,
12135
11970
  {
12136
11971
  onClick: () => update(currentStep + 1),
12137
11972
  className: "flex-row-1 items-center justify-center",
@@ -12143,7 +11978,7 @@ var StepperBar = ({
12143
11978
  }
12144
11979
  ) }),
12145
11980
  currentStep === numberOfSteps && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex-row-2 flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
12146
- SolidButton,
11981
+ Button,
12147
11982
  {
12148
11983
  disabled: disabledSteps.has(currentStep),
12149
11984
  onClick: onFinish,
@@ -12175,24 +12010,25 @@ var import_lucide_react14 = require("lucide-react");
12175
12010
 
12176
12011
  // src/components/user-action/Checkbox.tsx
12177
12012
  var import_lucide_react12 = require("lucide-react");
12178
- var import_clsx36 = __toESM(require("clsx"));
12013
+ var import_clsx35 = __toESM(require("clsx"));
12179
12014
  var import_jsx_runtime46 = require("react/jsx-runtime");
12180
12015
  var checkboxSizeMapping = {
12181
- sm: "size-5 border-1",
12182
- md: "size-6 border-1",
12183
- lg: "size-8 border-2"
12016
+ small: "size-5 border-2",
12017
+ medium: "size-6 border-2",
12018
+ large: "size-8 border-2"
12184
12019
  };
12185
12020
  var checkboxIconSizeMapping = {
12186
- sm: "size-4 stroke-3",
12187
- md: "size-5 stroke-3",
12188
- lg: "size-7 stroke-3"
12021
+ small: "size-3.5 stroke-3",
12022
+ medium: "size-4.5 stroke-3",
12023
+ large: "size-6 stroke-3"
12189
12024
  };
12190
12025
  var Checkbox = ({
12191
12026
  disabled,
12192
12027
  checked = false,
12193
12028
  indeterminate = false,
12029
+ invalid = false,
12194
12030
  onCheckedChange,
12195
- size = "md",
12031
+ size = "medium",
12196
12032
  className = "",
12197
12033
  ...props
12198
12034
  }) => {
@@ -12216,25 +12052,21 @@ var Checkbox = ({
12216
12052
  props.onKeyDown?.(event);
12217
12053
  }
12218
12054
  },
12219
- className: (0, import_clsx36.default)(
12055
+ className: (0, import_clsx35.default)(
12220
12056
  usedSizeClass,
12221
- `flex-col-0 items-center justify-center rounded`,
12222
- {
12223
- "text-disabled border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
12224
- "hover:border-primary": !disabled,
12225
- "bg-input-background": !disabled && !checked,
12226
- "bg-primary/30 border-primary text-primary": !disabled && (checked || indeterminate)
12227
- },
12228
12057
  className
12229
12058
  ),
12059
+ "data-name": props["data-name"] ?? "checkbox",
12060
+ "data-value": !indeterminate ? checked : "indeterminate",
12061
+ "data-disabled": disabled ? "" : void 0,
12062
+ "data-invalid": invalid ? "" : void 0,
12230
12063
  role: "checkbox",
12231
12064
  "aria-checked": indeterminate ? "mixed" : checked,
12232
12065
  "aria-disabled": disabled,
12233
12066
  tabIndex: disabled ? -1 : 0,
12234
12067
  children: [
12235
- !checked && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: (0, import_clsx36.default)("bg-input-background", innerIconSize) }),
12236
- checked && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Check, { className: innerIconSize }),
12237
- indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Minus, { className: innerIconSize })
12068
+ !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Check, { className: innerIconSize, "aria-hidden": true }),
12069
+ indeterminate && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react12.Minus, { className: innerIconSize, "aria-hidden": true })
12238
12070
  ]
12239
12071
  }
12240
12072
  );
@@ -12257,7 +12089,7 @@ var CheckboxUncontrolled = ({
12257
12089
 
12258
12090
  // src/components/properties/PropertyBase.tsx
12259
12091
  var import_lucide_react13 = require("lucide-react");
12260
- var import_clsx37 = __toESM(require("clsx"));
12092
+ var import_clsx36 = __toESM(require("clsx"));
12261
12093
  var import_jsx_runtime47 = require("react/jsx-runtime");
12262
12094
  var PropertyBase = ({
12263
12095
  name,
@@ -12271,14 +12103,14 @@ var PropertyBase = ({
12271
12103
  }) => {
12272
12104
  const translation = useHightideTranslation();
12273
12105
  const requiredAndNoValue = softRequired && !hasValue;
12274
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx37.default)("flex-row-0 group", className), children: [
12106
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: (0, import_clsx36.default)("flex-row-0 group", className), children: [
12275
12107
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
12276
12108
  "div",
12277
12109
  {
12278
- className: (0, import_clsx37.default)(
12110
+ className: (0, import_clsx36.default)(
12279
12111
  "flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
12280
12112
  {
12281
- "bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
12113
+ "bg-property-title-background text-property-title-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
12282
12114
  "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
12283
12115
  },
12284
12116
  className
@@ -12292,10 +12124,10 @@ var PropertyBase = ({
12292
12124
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
12293
12125
  "div",
12294
12126
  {
12295
- className: (0, import_clsx37.default)(
12127
+ className: (0, import_clsx36.default)(
12296
12128
  "flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
12297
12129
  {
12298
- "bg-input-background text-input-text group-hover:border-primary": !requiredAndNoValue,
12130
+ "bg-input-background text-input-text group-hover:border-primary group-focus-within:border-primary": !requiredAndNoValue,
12299
12131
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
12300
12132
  },
12301
12133
  className
@@ -12304,11 +12136,12 @@ var PropertyBase = ({
12304
12136
  input({ softRequired, hasValue }),
12305
12137
  requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-warning", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react13.AlertTriangle, { size: 24 }) }),
12306
12138
  onRemove && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12307
- TextButton,
12139
+ Button,
12308
12140
  {
12309
12141
  onClick: onRemove,
12310
12142
  color: "negative",
12311
- className: (0, import_clsx37.default)("items-center"),
12143
+ coloringStyle: "text",
12144
+ className: (0, import_clsx36.default)("items-center"),
12312
12145
  disabled: !hasValue,
12313
12146
  children: translation("remove")
12314
12147
  }
@@ -12320,7 +12153,7 @@ var PropertyBase = ({
12320
12153
  };
12321
12154
 
12322
12155
  // src/components/properties/CheckboxProperty.tsx
12323
- var import_react34 = require("react");
12156
+ var import_react35 = require("react");
12324
12157
  var import_jsx_runtime48 = require("react/jsx-runtime");
12325
12158
  var CheckboxProperty = ({
12326
12159
  value,
@@ -12329,7 +12162,7 @@ var CheckboxProperty = ({
12329
12162
  ...baseProps
12330
12163
  }) => {
12331
12164
  const translation = useHightideTranslation();
12332
- const id = (0, import_react34.useId)();
12165
+ const id = (0, import_react35.useId)();
12333
12166
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12334
12167
  PropertyBase,
12335
12168
  {
@@ -12356,7 +12189,7 @@ var CheckboxProperty = ({
12356
12189
 
12357
12190
  // src/components/properties/DateProperty.tsx
12358
12191
  var import_lucide_react15 = require("lucide-react");
12359
- var import_clsx38 = __toESM(require("clsx"));
12192
+ var import_clsx37 = __toESM(require("clsx"));
12360
12193
  var import_jsx_runtime49 = require("react/jsx-runtime");
12361
12194
  var DateProperty = ({
12362
12195
  value,
@@ -12377,7 +12210,7 @@ var DateProperty = ({
12377
12210
  input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12378
12211
  Input,
12379
12212
  {
12380
- 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 }),
12213
+ className: (0, import_clsx37.default)("default-style-none focus-style-none", { "bg-surface-warning": softRequired && !hasValue }),
12381
12214
  value: dateText,
12382
12215
  type: type === "dateTime" ? "datetime-local" : "date",
12383
12216
  readOnly,
@@ -12399,7 +12232,7 @@ var DateProperty = ({
12399
12232
 
12400
12233
  // src/components/properties/MultiSelectProperty.tsx
12401
12234
  var import_lucide_react16 = require("lucide-react");
12402
- var import_clsx39 = __toESM(require("clsx"));
12235
+ var import_clsx38 = __toESM(require("clsx"));
12403
12236
  var import_jsx_runtime50 = require("react/jsx-runtime");
12404
12237
  var MultiSelectProperty = ({
12405
12238
  children,
@@ -12421,14 +12254,15 @@ var MultiSelectProperty = ({
12421
12254
  onValuesChanged,
12422
12255
  disabled: props.readOnly,
12423
12256
  contentPanelProps: {
12424
- className: (0, import_clsx39.default)(
12257
+ className: (0, import_clsx38.default)(
12425
12258
  "!border-none !min-h-10"
12426
12259
  )
12427
12260
  },
12428
12261
  chipDisplayProps: {
12429
- className: (0, import_clsx39.default)({
12430
- "!bg-warning !text-surface-warning": softRequired && !hasValue
12431
- })
12262
+ className: (0, import_clsx38.default)(
12263
+ "default-style-none flex flex-wrap gap-x-2 gap-y-2 items-center hover:cursor-pointer",
12264
+ { "!bg-warning text-surface-warning": softRequired && !hasValue }
12265
+ )
12432
12266
  },
12433
12267
  children
12434
12268
  }
@@ -12439,7 +12273,7 @@ var MultiSelectProperty = ({
12439
12273
 
12440
12274
  // src/components/properties/NumberProperty.tsx
12441
12275
  var import_lucide_react17 = require("lucide-react");
12442
- var import_clsx40 = __toESM(require("clsx"));
12276
+ var import_clsx39 = __toESM(require("clsx"));
12443
12277
  var import_jsx_runtime51 = require("react/jsx-runtime");
12444
12278
  var NumberProperty = ({
12445
12279
  value,
@@ -12459,40 +12293,52 @@ var NumberProperty = ({
12459
12293
  onRemove,
12460
12294
  hasValue,
12461
12295
  icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react17.Binary, { size: 24 }),
12462
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
12463
- "div",
12464
- {
12465
- className: (0, import_clsx40.default)("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
12466
- children: [
12467
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12468
- Input,
12469
- {
12470
- className: (0, import_clsx40.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
12471
- value: value?.toString() ?? "",
12472
- type: "number",
12473
- readOnly,
12474
- placeholder: `${translation("value")}...`,
12475
- onChangeText: (value2) => {
12476
- const numberValue = parseFloat(value2);
12477
- if (isNaN(numberValue)) {
12478
- onRemove();
12479
- } else {
12480
- onChange?.(numberValue);
12481
- }
12482
- },
12483
- onEditCompleted: (value2) => {
12484
- const numberValue = parseFloat(value2);
12485
- if (isNaN(numberValue)) {
12486
- onRemove();
12487
- } else {
12488
- onEditComplete(numberValue);
12296
+ input: ({ softRequired }) => (
12297
+ // TODO this max width might be to low for some numbers
12298
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
12299
+ "div",
12300
+ {
12301
+ className: (0, import_clsx39.default)("relative flex-row-2 max-w-56", { "text-warning": softRequired && !hasValue }),
12302
+ children: [
12303
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12304
+ Input,
12305
+ {
12306
+ className: (0, import_clsx39.default)("default-style-none focus-style-none w-full pr-8", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
12307
+ value: value?.toString() ?? "",
12308
+ type: "number",
12309
+ readOnly,
12310
+ placeholder: `${translation("value")}...`,
12311
+ onChangeText: (value2) => {
12312
+ const numberValue = parseFloat(value2);
12313
+ if (isNaN(numberValue)) {
12314
+ onRemove();
12315
+ } else {
12316
+ onChange?.(numberValue);
12317
+ }
12318
+ },
12319
+ onEditCompleted: (value2) => {
12320
+ const numberValue = parseFloat(value2);
12321
+ if (isNaN(numberValue)) {
12322
+ onRemove();
12323
+ } else {
12324
+ onEditComplete(numberValue);
12325
+ }
12489
12326
  }
12490
12327
  }
12491
- }
12492
- ),
12493
- suffix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx40.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
12494
- ]
12495
- }
12328
+ ),
12329
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12330
+ "span",
12331
+ {
12332
+ className: (0, import_clsx39.default)(
12333
+ "absolute top-1/2 -translate-y-1/2 right-2",
12334
+ { "bg-surface-warning": softRequired && !hasValue }
12335
+ ),
12336
+ children: suffix
12337
+ }
12338
+ )
12339
+ ]
12340
+ }
12341
+ )
12496
12342
  )
12497
12343
  }
12498
12344
  );
@@ -12500,7 +12346,7 @@ var NumberProperty = ({
12500
12346
 
12501
12347
  // src/components/properties/SelectProperty.tsx
12502
12348
  var import_lucide_react18 = require("lucide-react");
12503
- var import_clsx41 = __toESM(require("clsx"));
12349
+ var import_clsx40 = __toESM(require("clsx"));
12504
12350
  var import_jsx_runtime52 = require("react/jsx-runtime");
12505
12351
  var SingleSelectProperty = ({
12506
12352
  children,
@@ -12523,8 +12369,8 @@ var SingleSelectProperty = ({
12523
12369
  onValueChanged,
12524
12370
  disabled: props.readOnly,
12525
12371
  buttonProps: {
12526
- className: (0, import_clsx41.default)(
12527
- "border-none w-full",
12372
+ className: (0, import_clsx40.default)(
12373
+ "default-style-none focus-style-none flex-row-2 w-full items-center",
12528
12374
  {
12529
12375
  "!bg-warning !text-surface-warning": softRequired && !hasValue
12530
12376
  }
@@ -12540,23 +12386,21 @@ var SingleSelectProperty = ({
12540
12386
 
12541
12387
  // src/components/properties/TextProperty.tsx
12542
12388
  var import_lucide_react19 = require("lucide-react");
12543
- var import_clsx43 = __toESM(require("clsx"));
12389
+ var import_clsx42 = __toESM(require("clsx"));
12544
12390
 
12545
12391
  // src/components/user-action/Textarea.tsx
12546
- var import_react35 = require("react");
12547
- var import_clsx42 = __toESM(require("clsx"));
12392
+ var import_react36 = require("react");
12393
+ var import_clsx41 = __toESM(require("clsx"));
12548
12394
  var import_jsx_runtime53 = require("react/jsx-runtime");
12549
- var Textarea = (0, import_react35.forwardRef)(function Textarea2({
12395
+ var Textarea = (0, import_react36.forwardRef)(function Textarea2({
12550
12396
  id,
12551
12397
  onChange,
12552
12398
  onChangeText,
12553
12399
  onBlur,
12554
12400
  onEditCompleted,
12555
12401
  saveDelayOptions,
12556
- defaultStyle = true,
12557
12402
  invalid = false,
12558
12403
  disabled = false,
12559
- className,
12560
12404
  ...props
12561
12405
  }, ref) {
12562
12406
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
@@ -12567,18 +12411,10 @@ var Textarea = (0, import_react35.forwardRef)(function Textarea2({
12567
12411
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12568
12412
  "textarea",
12569
12413
  {
12414
+ ...props,
12570
12415
  ref,
12571
12416
  id,
12572
- className: (0, import_clsx42.default)(
12573
- "resize-none w-full h-32 overflow-y-scroll",
12574
- "py-2 px-3 rounded-md border-2 border-transparent focus-style-none",
12575
- {
12576
- "bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
12577
- "bg-negative/20 text-negative hover:border-negative focus-visible:border-negative": invalid && !disabled && defaultStyle,
12578
- "text-disabled bg-disabled-background border-disabled-border": disabled && defaultStyle
12579
- },
12580
- className
12581
- ),
12417
+ disabled,
12582
12418
  onChange: (event) => {
12583
12419
  const value = event.target.value;
12584
12420
  restartTimer(() => {
@@ -12591,8 +12427,10 @@ var Textarea = (0, import_react35.forwardRef)(function Textarea2({
12591
12427
  onBlur?.(event);
12592
12428
  onEditCompletedWrapper(event.target.value);
12593
12429
  },
12594
- disabled,
12595
- ...props
12430
+ "data-name": props["data-name"] ?? "textarea",
12431
+ "data-value": props.value ? "" : void 0,
12432
+ "data-disabled": disabled ? "" : void 0,
12433
+ "data-invalid": invalid ? "" : void 0
12596
12434
  }
12597
12435
  );
12598
12436
  });
@@ -12620,12 +12458,12 @@ var TextareaWithHeadline = ({
12620
12458
  containerClassName,
12621
12459
  ...props
12622
12460
  }) => {
12623
- const genId = (0, import_react35.useId)();
12461
+ const genId = (0, import_react36.useId)();
12624
12462
  const usedId = id ?? genId;
12625
12463
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
12626
12464
  "div",
12627
12465
  {
12628
- className: (0, import_clsx42.default)(
12466
+ className: (0, import_clsx41.default)(
12629
12467
  "group flex-col-3 border-2 rounded-lg",
12630
12468
  {
12631
12469
  "bg-input-background text-input-text hover:border-primary focus-within:border-primary": !disabled,
@@ -12640,11 +12478,10 @@ var TextareaWithHeadline = ({
12640
12478
  {
12641
12479
  ...props,
12642
12480
  id: usedId,
12643
- className: (0, import_clsx42.default)(
12481
+ className: (0, import_clsx41.default)(
12644
12482
  "border-transparent focus:ring-0 focus-visible:ring-0 resize-none h-32",
12645
12483
  className
12646
- ),
12647
- defaultStyle: false
12484
+ )
12648
12485
  }
12649
12486
  )
12650
12487
  ]
@@ -12674,11 +12511,11 @@ var TextProperty = ({
12674
12511
  input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12675
12512
  Textarea,
12676
12513
  {
12677
- className: (0, import_clsx43.default)({
12678
- "bg-surface-warning placeholder-warning": softRequired && !hasValue
12679
- }),
12514
+ className: (0, import_clsx42.default)(
12515
+ "default-style-none focus-style-none w-full",
12516
+ { "bg-surface-warning placeholder-warning": softRequired && !hasValue }
12517
+ ),
12680
12518
  rows: 5,
12681
- defaultStyle: false,
12682
12519
  value: value ?? "",
12683
12520
  readOnly,
12684
12521
  placeholder: `${translation("text")}...`,
@@ -12703,12 +12540,12 @@ var TextProperty = ({
12703
12540
  };
12704
12541
 
12705
12542
  // src/components/table/FillerRowElement.tsx
12706
- var import_clsx44 = require("clsx");
12543
+ var import_clsx43 = require("clsx");
12707
12544
  var import_jsx_runtime55 = require("react/jsx-runtime");
12708
12545
  var FillerRowElement = ({
12709
12546
  className
12710
12547
  }) => {
12711
- 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: "-" });
12548
+ 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: "-" });
12712
12549
  };
12713
12550
 
12714
12551
  // src/components/table/Filter.ts
@@ -12726,25 +12563,24 @@ var TableFilters = {
12726
12563
  };
12727
12564
 
12728
12565
  // src/components/table/Table.tsx
12729
- var import_react41 = require("react");
12730
- var import_clsx48 = __toESM(require("clsx"));
12566
+ var import_react42 = require("react");
12567
+ var import_clsx47 = __toESM(require("clsx"));
12731
12568
  var import_react_table = require("@tanstack/react-table");
12732
- var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
12733
12569
 
12734
12570
  // src/components/table/TableCell.tsx
12735
- var import_clsx45 = require("clsx");
12571
+ var import_clsx44 = require("clsx");
12736
12572
  var import_jsx_runtime56 = require("react/jsx-runtime");
12737
12573
  var TableCell = ({
12738
12574
  children,
12739
12575
  className
12740
12576
  }) => {
12741
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: (0, import_clsx45.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
12577
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: (0, import_clsx44.clsx)("block max-w-full overflow-ellipsis truncate", className), children });
12742
12578
  };
12743
12579
 
12744
12580
  // src/hooks/useResizeCallbackWrapper.ts
12745
- var import_react36 = require("react");
12581
+ var import_react37 = require("react");
12746
12582
  var useResizeCallbackWrapper = (callback) => {
12747
- (0, import_react36.useEffect)(() => {
12583
+ (0, import_react37.useEffect)(() => {
12748
12584
  window.addEventListener("resize", callback);
12749
12585
  return () => {
12750
12586
  window.removeEventListener("resize", callback);
@@ -12754,12 +12590,13 @@ var useResizeCallbackWrapper = (callback) => {
12754
12590
 
12755
12591
  // src/components/table/TableSortButton.tsx
12756
12592
  var import_lucide_react20 = require("lucide-react");
12757
- var import_clsx46 = __toESM(require("clsx"));
12593
+ var import_clsx45 = __toESM(require("clsx"));
12758
12594
  var import_jsx_runtime57 = require("react/jsx-runtime");
12759
12595
  var TableSortButton = ({
12760
12596
  sortDirection,
12761
12597
  invert = false,
12762
12598
  color = "neutral",
12599
+ size = "tiny",
12763
12600
  className,
12764
12601
  ...buttonProps
12765
12602
  }) => {
@@ -12772,11 +12609,12 @@ var TableSortButton = ({
12772
12609
  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" });
12773
12610
  }
12774
12611
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
12775
- IconButton,
12612
+ Button,
12776
12613
  {
12777
- size: "tiny",
12614
+ layout: "icon",
12778
12615
  color,
12779
- className: (0, import_clsx46.default)(className),
12616
+ size,
12617
+ className: (0, import_clsx45.default)(className),
12780
12618
  ...buttonProps,
12781
12619
  children: icon
12782
12620
  }
@@ -12787,8 +12625,8 @@ var TableSortButton = ({
12787
12625
  var import_lucide_react21 = require("lucide-react");
12788
12626
 
12789
12627
  // src/components/user-action/Menu.tsx
12790
- var import_react39 = require("react");
12791
- var import_clsx47 = __toESM(require("clsx"));
12628
+ var import_react40 = require("react");
12629
+ var import_clsx46 = __toESM(require("clsx"));
12792
12630
 
12793
12631
  // src/utils/bagFunctions.ts
12794
12632
  var resolve = (children, bag) => {
@@ -12859,15 +12697,15 @@ var usePopoverPosition = (trigger, options) => {
12859
12697
  };
12860
12698
 
12861
12699
  // src/hooks/useHoverState.ts
12862
- var import_react37 = require("react");
12700
+ var import_react38 = require("react");
12863
12701
  var defaultUseHoverStateProps = {
12864
12702
  closingDelay: 200,
12865
12703
  isDisabled: false
12866
12704
  };
12867
12705
  var useHoverState = (props = void 0) => {
12868
12706
  const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
12869
- const [isHovered, setIsHovered] = (0, import_react37.useState)(false);
12870
- const [timer, setTimer] = (0, import_react37.useState)();
12707
+ const [isHovered, setIsHovered] = (0, import_react38.useState)(false);
12708
+ const [timer, setTimer] = (0, import_react38.useState)();
12871
12709
  const onMouseEnter = () => {
12872
12710
  if (isDisabled) {
12873
12711
  return;
@@ -12883,14 +12721,14 @@ var useHoverState = (props = void 0) => {
12883
12721
  setIsHovered(false);
12884
12722
  }, closingDelay));
12885
12723
  };
12886
- (0, import_react37.useEffect)(() => {
12724
+ (0, import_react38.useEffect)(() => {
12887
12725
  if (timer) {
12888
12726
  return () => {
12889
12727
  clearTimeout(timer);
12890
12728
  };
12891
12729
  }
12892
12730
  });
12893
- (0, import_react37.useEffect)(() => {
12731
+ (0, import_react38.useEffect)(() => {
12894
12732
  if (timer) {
12895
12733
  clearTimeout(timer);
12896
12734
  }
@@ -12903,9 +12741,9 @@ var useHoverState = (props = void 0) => {
12903
12741
  };
12904
12742
 
12905
12743
  // src/hooks/useOutsideClick.ts
12906
- var import_react38 = require("react");
12744
+ var import_react39 = require("react");
12907
12745
  var useOutsideClick = (refs, handler) => {
12908
- (0, import_react38.useEffect)(() => {
12746
+ (0, import_react39.useEffect)(() => {
12909
12747
  const listener = (event) => {
12910
12748
  if (event.target === null) return;
12911
12749
  if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
@@ -12933,7 +12771,7 @@ var MenuItem = ({
12933
12771
  }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
12934
12772
  "div",
12935
12773
  {
12936
- 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", {
12774
+ className: (0, import_clsx46.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
12937
12775
  "text-right": alignment === "right",
12938
12776
  "text-left": alignment === "left",
12939
12777
  "text-disabled cursor-not-allowed": isDisabled,
@@ -12963,10 +12801,10 @@ var Menu = ({
12963
12801
  menuClassName = ""
12964
12802
  }) => {
12965
12803
  const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
12966
- const triggerRef = (0, import_react39.useRef)(null);
12967
- const menuRef = (0, import_react39.useRef)(null);
12804
+ const triggerRef = (0, import_react40.useRef)(null);
12805
+ const menuRef = (0, import_react40.useRef)(null);
12968
12806
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
12969
- const [isHidden, setIsHidden] = (0, import_react39.useState)(true);
12807
+ const [isHidden, setIsHidden] = (0, import_react40.useState)(true);
12970
12808
  const bag = {
12971
12809
  isOpen,
12972
12810
  close: () => setIsOpen(false),
@@ -12977,7 +12815,7 @@ var Menu = ({
12977
12815
  triggerRef.current?.getBoundingClientRect(),
12978
12816
  { verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
12979
12817
  );
12980
- (0, import_react39.useEffect)(() => {
12818
+ (0, import_react40.useEffect)(() => {
12981
12819
  if (!isOpen) return;
12982
12820
  const triggerEl = triggerRef.current;
12983
12821
  if (!triggerEl) return;
@@ -12994,11 +12832,12 @@ var Menu = ({
12994
12832
  window.removeEventListener("resize", close);
12995
12833
  };
12996
12834
  }, [isOpen, setIsOpen]);
12997
- (0, import_react39.useEffect)(() => {
12835
+ (0, import_react40.useEffect)(() => {
12998
12836
  if (isOpen) {
12999
12837
  setIsHidden(false);
13000
12838
  }
13001
12839
  }, [isOpen]);
12840
+ const zIndex = useZIndexRegister(isOpen);
13002
12841
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
13003
12842
  trigger(bag, triggerRef),
13004
12843
  (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
@@ -13006,7 +12845,7 @@ var Menu = ({
13006
12845
  {
13007
12846
  ref: menuRef,
13008
12847
  onClick: (e) => e.stopPropagation(),
13009
- className: (0, import_clsx47.default)(
12848
+ className: (0, import_clsx46.default)(
13010
12849
  "absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
13011
12850
  {
13012
12851
  "animate-pop-in": isOpen,
@@ -13021,7 +12860,8 @@ var Menu = ({
13021
12860
  }
13022
12861
  },
13023
12862
  style: {
13024
- ...menuPosition
12863
+ ...menuPosition,
12864
+ zIndex
13025
12865
  },
13026
12866
  children: BagFunctionUtil.resolve(children, bag)
13027
12867
  }
@@ -13030,7 +12870,7 @@ var Menu = ({
13030
12870
  };
13031
12871
 
13032
12872
  // src/components/table/TableFilterButton.tsx
13033
- var import_react40 = require("react");
12873
+ var import_react41 = require("react");
13034
12874
  var import_jsx_runtime59 = require("react/jsx-runtime");
13035
12875
  var TableFilterButton = ({
13036
12876
  filterType,
@@ -13038,16 +12878,25 @@ var TableFilterButton = ({
13038
12878
  }) => {
13039
12879
  const translation = useHightideTranslation();
13040
12880
  const columnFilterValue = column.getFilterValue();
13041
- const [filterValue, setFilterValue] = (0, import_react40.useState)(columnFilterValue);
12881
+ const [filterValue, setFilterValue] = (0, import_react41.useState)(columnFilterValue);
13042
12882
  const hasFilter = !!filterValue;
13043
- (0, import_react40.useEffect)(() => {
12883
+ (0, import_react41.useEffect)(() => {
13044
12884
  setFilterValue(columnFilterValue);
13045
12885
  }, [columnFilterValue]);
13046
12886
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13047
12887
  Menu,
13048
12888
  {
13049
12889
  trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: "relative", children: [
13050
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.FilterIcon, {}) }),
12890
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
12891
+ Button,
12892
+ {
12893
+ layout: "icon",
12894
+ color: "neutral",
12895
+ size: "tiny",
12896
+ onClick: toggleOpen,
12897
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react21.FilterIcon, {})
12898
+ }
12899
+ ),
13051
12900
  hasFilter && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
13052
12901
  "div",
13053
12902
  {
@@ -13126,11 +12975,11 @@ var TableFilterButton = ({
13126
12975
  )
13127
12976
  ] }),
13128
12977
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
13129
- hasFilter && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
12978
+ hasFilter && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { color: "negative", size: "small", onClick: () => {
13130
12979
  column.setFilterValue(void 0);
13131
12980
  close();
13132
12981
  }, children: translation("remove") }),
13133
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SolidButton, { size: "small", onClick: () => {
12982
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { size: "small", onClick: () => {
13134
12983
  column.setFilterValue(filterValue);
13135
12984
  close();
13136
12985
  }, children: translation("apply") })
@@ -13149,27 +12998,28 @@ var Table = ({
13149
12998
  onRowClick,
13150
12999
  className,
13151
13000
  tableClassName,
13001
+ tableContainerClassName,
13152
13002
  defaultColumn,
13153
13003
  state,
13154
13004
  columns,
13155
13005
  ...tableOptions
13156
13006
  }) => {
13157
- const ref = (0, import_react41.useRef)(null);
13158
- const tableRef = (0, import_react41.useRef)(null);
13159
- const [columnSizing, setColumnSizing] = (0, import_react41.useState)(columns.reduce((previousValue, currentValue) => {
13007
+ const ref = (0, import_react42.useRef)(null);
13008
+ const tableRef = (0, import_react42.useRef)(null);
13009
+ const [columnSizing, setColumnSizing] = (0, import_react42.useState)(columns.reduce((previousValue, currentValue) => {
13160
13010
  return {
13161
13011
  ...previousValue,
13162
13012
  [currentValue.id]: currentValue.minSize ?? defaultColumn.minSize
13163
13013
  };
13164
13014
  }, {}));
13165
- const [columnSizingInfo, setColumnSizingInfo] = (0, import_react41.useState)();
13166
- const [pagination, setPagination] = (0, import_react41.useState)({
13015
+ const [columnSizingInfo, setColumnSizingInfo] = (0, import_react42.useState)();
13016
+ const [pagination, setPagination] = (0, import_react42.useState)({
13167
13017
  pageSize: 10,
13168
13018
  pageIndex: 0,
13169
13019
  ...initialState?.pagination
13170
13020
  });
13171
- const [columnFilters, setColumnFilters] = (0, import_react41.useState)(initialState?.columnFilters);
13172
- const computedColumnMinWidths = (0, import_react41.useMemo)(() => {
13021
+ const [columnFilters, setColumnFilters] = (0, import_react42.useState)(initialState?.columnFilters);
13022
+ const computedColumnMinWidths = (0, import_react42.useMemo)(() => {
13173
13023
  return columns.reduce((previousValue, column) => {
13174
13024
  return {
13175
13025
  ...previousValue,
@@ -13178,7 +13028,7 @@ var Table = ({
13178
13028
  };
13179
13029
  }, {});
13180
13030
  }, [columns, defaultColumn]);
13181
- const computedColumnMaxWidths = (0, import_react41.useMemo)(() => {
13031
+ const computedColumnMaxWidths = (0, import_react42.useMemo)(() => {
13182
13032
  return columns.reduce((previousValue, column) => {
13183
13033
  return {
13184
13034
  ...previousValue,
@@ -13186,12 +13036,12 @@ var Table = ({
13186
13036
  };
13187
13037
  }, {});
13188
13038
  }, [columns, defaultColumn]);
13189
- const tableMinWidth = (0, import_react41.useMemo)(() => {
13039
+ const tableMinWidth = (0, import_react42.useMemo)(() => {
13190
13040
  return columns.reduce((sum, column) => {
13191
13041
  return sum + computedColumnMinWidths[column.id];
13192
13042
  }, 0);
13193
13043
  }, [columns, computedColumnMinWidths]);
13194
- const updateColumnSizes = (0, import_react41.useMemo)(() => {
13044
+ const updateColumnSizes = (0, import_react42.useMemo)(() => {
13195
13045
  return (previous) => {
13196
13046
  const updateSizing = {
13197
13047
  ...columnSizing,
@@ -13308,18 +13158,18 @@ var Table = ({
13308
13158
  columnResizeMode: "onChange",
13309
13159
  ...tableOptions
13310
13160
  });
13311
- const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react41.useState)(false);
13312
- (0, import_react41.useEffect)(() => {
13161
+ const [hasInitializedSizing, setHasInitializedSizing] = (0, import_react42.useState)(false);
13162
+ (0, import_react42.useEffect)(() => {
13313
13163
  if (!hasInitializedSizing && ref.current) {
13314
13164
  setHasInitializedSizing(true);
13315
13165
  table.setColumnSizing(updateColumnSizes(columnSizing));
13316
13166
  }
13317
13167
  }, [columnSizing, hasInitializedSizing]);
13318
- useResizeCallbackWrapper((0, import_react41.useCallback)(() => {
13168
+ useResizeCallbackWrapper((0, import_react42.useCallback)(() => {
13319
13169
  table.setColumnSizing(updateColumnSizes);
13320
13170
  }, [updateColumnSizes]));
13321
13171
  const pageCount = table.getPageCount();
13322
- (0, import_react41.useEffect)(() => {
13172
+ (0, import_react42.useEffect)(() => {
13323
13173
  const totalPages = pageCount;
13324
13174
  if (totalPages === 0) {
13325
13175
  if (pagination.pageIndex !== 0) {
@@ -13335,7 +13185,7 @@ var Table = ({
13335
13185
  }));
13336
13186
  }
13337
13187
  }, [data, pageCount, pagination.pageSize, pagination.pageIndex]);
13338
- const columnSizeVars = (0, import_react41.useMemo)(() => {
13188
+ const columnSizeVars = (0, import_react42.useMemo)(() => {
13339
13189
  const headers = table.getFlatHeaders();
13340
13190
  const colSizes = {};
13341
13191
  for (let i = 0; i < headers.length; i++) {
@@ -13345,125 +13195,115 @@ var Table = ({
13345
13195
  }
13346
13196
  return colSizes;
13347
13197
  }, [table.getState().columnSizingInfo, table.getState().columnSizing]);
13348
- console.log(table.getState().sorting);
13349
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: (0, import_clsx48.default)("flex-col-4", className), children: [
13350
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13351
- import_react_custom_scrollbars_23.Scrollbars,
13198
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { ref, className: (0, import_clsx47.default)("flex-col-4", className), children: [
13199
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: (0, import_clsx47.default)("flex-col-0 w-full overflow-auto", tableContainerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13200
+ "table",
13352
13201
  {
13353
- autoHeight: true,
13354
- autoHeightMax: tableRef.current?.offsetHeight ? tableRef.current?.offsetHeight + 2 : void 0,
13355
- autoHide: true,
13356
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13357
- "table",
13358
- {
13359
- ref: tableRef,
13360
- className: (0, import_clsx48.default)(tableClassName),
13361
- style: {
13362
- ...columnSizeVars,
13363
- width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
13202
+ ref: tableRef,
13203
+ className: (0, import_clsx47.default)(tableClassName),
13204
+ style: {
13205
+ ...columnSizeVars,
13206
+ width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
13207
+ },
13208
+ children: [
13209
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13210
+ "col",
13211
+ {
13212
+ style: {
13213
+ width: `calc(var(--header-${header?.id}-size) * 1px)`,
13214
+ minWidth: header.column.columnDef.minSize,
13215
+ maxWidth: header.column.columnDef.maxSize
13216
+ }
13364
13217
  },
13365
- children: [
13366
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13367
- "col",
13368
- {
13369
- style: {
13370
- width: `calc(var(--header-${header?.id}-size) * 1px)`,
13371
- minWidth: header.column.columnDef.minSize,
13372
- maxWidth: header.column.columnDef.maxSize
13373
- }
13374
- },
13375
- header.id
13376
- )) }, headerGroup.id)),
13377
- /* @__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) => {
13378
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13379
- "th",
13380
- {
13381
- colSpan: header.colSpan,
13382
- className: (0, import_clsx48.default)("relative group", header.column.columnDef.meta?.className),
13383
- children: [
13384
- /* @__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: [
13385
- header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13386
- TableSortButton,
13387
- {
13388
- sortDirection: header.column.getIsSorted(),
13389
- onClick: () => {
13390
- const sorted = header.column.getIsSorted();
13391
- const isMulti = header.column.getCanMultiSort();
13392
- console.log(isMulti, header.column.id);
13393
- if (!isMulti) {
13394
- table.resetSorting();
13395
- }
13396
- if (!sorted) {
13397
- header.column.toggleSorting(true, isMulti);
13398
- return;
13399
- } else if (sorted === "desc") {
13400
- header.column.toggleSorting(false, isMulti);
13401
- }
13402
- if (sorted === "asc") {
13403
- header.column.clearSorting();
13404
- }
13405
- }
13218
+ header.id
13219
+ )) }, headerGroup.id)),
13220
+ /* @__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) => {
13221
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
13222
+ "th",
13223
+ {
13224
+ colSpan: header.colSpan,
13225
+ className: (0, import_clsx47.default)("relative group", header.column.columnDef.meta?.className),
13226
+ children: [
13227
+ /* @__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: [
13228
+ header.column.getCanSort() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13229
+ TableSortButton,
13230
+ {
13231
+ sortDirection: header.column.getIsSorted(),
13232
+ onClick: () => {
13233
+ const sorted = header.column.getIsSorted();
13234
+ const isMulti = header.column.getCanMultiSort();
13235
+ if (!isMulti) {
13236
+ table.resetSorting();
13406
13237
  }
13407
- ),
13408
- header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13409
- TableFilterButton,
13410
- {
13411
- column: header.column,
13412
- filterType: header.column.columnDef.meta.filterType
13238
+ if (!sorted) {
13239
+ header.column.toggleSorting(true, isMulti);
13240
+ return;
13241
+ } else if (sorted === "desc") {
13242
+ header.column.toggleSorting(false, isMulti);
13413
13243
  }
13414
- ) : null,
13415
- (0, import_react_table.flexRender)(
13416
- header.column.columnDef.header,
13417
- header.getContext()
13418
- )
13419
- ] }) }),
13420
- header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13421
- "div",
13422
- {
13423
- onMouseDown: header.getResizeHandler(),
13424
- onTouchStart: header.getResizeHandler(),
13425
- onDoubleClick: () => {
13426
- header.column.resetSize();
13427
- },
13428
- className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
13429
- style: {
13430
- opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
13244
+ if (sorted === "asc") {
13245
+ header.column.clearSorting();
13431
13246
  }
13432
13247
  }
13433
- )
13434
- ]
13435
- },
13436
- header.id
13437
- );
13438
- }) }, headerGroup.id)) }),
13439
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("tbody", { children: [
13440
- table.getRowModel().rows.map((row) => {
13441
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13442
- "tr",
13248
+ }
13249
+ ),
13250
+ header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13251
+ TableFilterButton,
13252
+ {
13253
+ column: header.column,
13254
+ filterType: header.column.columnDef.meta.filterType
13255
+ }
13256
+ ) : null,
13257
+ (0, import_react_table.flexRender)(
13258
+ header.column.columnDef.header,
13259
+ header.getContext()
13260
+ )
13261
+ ] }) }),
13262
+ header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13263
+ "div",
13443
13264
  {
13444
- onClick: () => onRowClick?.(row, table),
13445
- className: table.options.meta?.bodyRowClassName,
13446
- children: row.getVisibleCells().map((cell) => {
13447
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: (0, import_react_table.flexRender)(
13448
- cell.column.columnDef.cell,
13449
- cell.getContext()
13450
- ) }, cell.id);
13451
- })
13452
- },
13453
- row.id
13454
- );
13455
- }),
13456
- range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
13457
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { children: columns.map((column) => {
13458
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FillerRowElement, {}) }, column.id);
13459
- }) }, "filler-row-" + index);
13460
- })
13461
- ] })
13462
- ]
13463
- }
13464
- )
13265
+ onMouseDown: header.getResizeHandler(),
13266
+ onTouchStart: header.getResizeHandler(),
13267
+ onDoubleClick: () => {
13268
+ header.column.resetSize();
13269
+ },
13270
+ className: "table-resize-indicator w-2 rounded bg-primary cursor-col-resize select-none touch-none opacity-0 group-hover:opacity-100 transition-opacity",
13271
+ style: {
13272
+ opacity: !columnSizingInfo?.columnSizingStart ? void 0 : columnSizingInfo?.columnSizingStart?.findIndex(([id, _]) => id === header.column.id) !== -1 ? 1 : columnSizingInfo?.columnSizingStart?.length !== 0 ? 0 : void 0
13273
+ }
13274
+ }
13275
+ )
13276
+ ]
13277
+ },
13278
+ header.id
13279
+ );
13280
+ }) }, headerGroup.id)) }),
13281
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("tbody", { children: [
13282
+ table.getRowModel().rows.map((row) => {
13283
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13284
+ "tr",
13285
+ {
13286
+ onClick: () => onRowClick?.(row, table),
13287
+ className: table.options.meta?.bodyRowClassName,
13288
+ children: row.getVisibleCells().map((cell) => {
13289
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: (0, import_react_table.flexRender)(
13290
+ cell.column.columnDef.cell,
13291
+ cell.getContext()
13292
+ ) }, cell.id);
13293
+ })
13294
+ },
13295
+ row.id
13296
+ );
13297
+ }),
13298
+ range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
13299
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("tr", { children: columns.map((column) => {
13300
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FillerRowElement, {}) }, column.id);
13301
+ }) }, "filler-row-" + index);
13302
+ })
13303
+ ] })
13304
+ ]
13465
13305
  }
13466
- ),
13306
+ ) }),
13467
13307
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
13468
13308
  Pagination,
13469
13309
  {
@@ -13495,7 +13335,7 @@ var TableWithSelection = ({
13495
13335
  meta,
13496
13336
  ...props
13497
13337
  }) => {
13498
- const columnsWithSelection = (0, import_react41.useMemo)(() => {
13338
+ const columnsWithSelection = (0, import_react42.useMemo)(() => {
13499
13339
  return [
13500
13340
  {
13501
13341
  id: selectionRowId,
@@ -13553,7 +13393,7 @@ var TableWithSelection = ({
13553
13393
  },
13554
13394
  meta: {
13555
13395
  ...meta,
13556
- bodyRowClassName: (0, import_clsx48.default)(
13396
+ bodyRowClassName: (0, import_clsx47.default)(
13557
13397
  { "cursor-pointer": !disableClickRowClickSelection },
13558
13398
  meta?.bodyRowClassName
13559
13399
  )
@@ -13564,8 +13404,8 @@ var TableWithSelection = ({
13564
13404
  };
13565
13405
 
13566
13406
  // src/components/user-action/CopyToClipboardWrapper.tsx
13567
- var import_react42 = require("react");
13568
- var import_clsx49 = require("clsx");
13407
+ var import_react43 = require("react");
13408
+ var import_clsx48 = require("clsx");
13569
13409
 
13570
13410
  // src/utils/writeToClipboard.ts
13571
13411
  var writeToClipboard = (text) => {
@@ -13584,8 +13424,8 @@ var CopyToClipboardWrapper = ({
13584
13424
  zIndex = 10
13585
13425
  }) => {
13586
13426
  const translation = useHightideTranslation();
13587
- const [isShowingIndication, setIsShowingIndication] = (0, import_react42.useState)(false);
13588
- const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react42.useState)(false);
13427
+ const [isShowingIndication, setIsShowingIndication] = (0, import_react43.useState)(false);
13428
+ const [isShowingConfirmation, setIsShowingConfirmation] = (0, import_react43.useState)(false);
13589
13429
  const positionClasses = {
13590
13430
  top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
13591
13431
  bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
@@ -13608,7 +13448,7 @@ var CopyToClipboardWrapper = ({
13608
13448
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13609
13449
  "div",
13610
13450
  {
13611
- className: (0, import_clsx49.clsx)("relative inline-block cursor-copy", containerClassName),
13451
+ className: (0, import_clsx48.clsx)("relative inline-block cursor-copy", containerClassName),
13612
13452
  onMouseEnter: () => {
13613
13453
  setIsShowingIndication(true);
13614
13454
  },
@@ -13626,7 +13466,7 @@ var CopyToClipboardWrapper = ({
13626
13466
  /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
13627
13467
  "div",
13628
13468
  {
13629
- className: (0, import_clsx49.clsx)(
13469
+ className: (0, import_clsx48.clsx)(
13630
13470
  `absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
13631
13471
  shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
13632
13472
  "transition-opacity duration-200",
@@ -13649,7 +13489,7 @@ var CopyToClipboardWrapper = ({
13649
13489
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
13650
13490
  "div",
13651
13491
  {
13652
- className: (0, import_clsx49.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
13492
+ className: (0, import_clsx48.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
13653
13493
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
13654
13494
  }
13655
13495
  )
@@ -13662,7 +13502,7 @@ var CopyToClipboardWrapper = ({
13662
13502
  };
13663
13503
 
13664
13504
  // src/components/user-action/DateAndTimePicker.tsx
13665
- var import_clsx50 = __toESM(require("clsx"));
13505
+ var import_clsx49 = __toESM(require("clsx"));
13666
13506
  var import_jsx_runtime62 = require("react/jsx-runtime");
13667
13507
  var DateTimePicker = ({
13668
13508
  value = /* @__PURE__ */ new Date(),
@@ -13685,8 +13525,8 @@ var DateTimePicker = ({
13685
13525
  DatePicker,
13686
13526
  {
13687
13527
  ...datePickerProps,
13688
- className: "min-w-[320px] min-h-[250px]",
13689
- yearMonthPickerProps: { maxHeight: 218 },
13528
+ className: "min-w-80 min-h-71 max-h-71",
13529
+ yearMonthPickerProps: { className: "h-full grow" },
13690
13530
  value,
13691
13531
  start,
13692
13532
  end,
@@ -13699,8 +13539,7 @@ var DateTimePicker = ({
13699
13539
  TimePicker,
13700
13540
  {
13701
13541
  ...timePickerProps,
13702
- className: (0, import_clsx50.default)("h-full", { "justify-between w-full": mode === "time" }),
13703
- maxHeight: 250,
13542
+ className: (0, import_clsx49.default)("min-h-71 max-h-71", { "justify-between w-full": mode === "time" }),
13704
13543
  time: value,
13705
13544
  onChange
13706
13545
  }
@@ -13712,9 +13551,9 @@ var DateTimePicker = ({
13712
13551
  timeDisplay
13713
13552
  ] }),
13714
13553
  /* @__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: [
13715
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
13554
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Button, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
13716
13555
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
13717
- SolidButton,
13556
+ Button,
13718
13557
  {
13719
13558
  size: "medium",
13720
13559
  onClick: () => onFinish?.(value),
@@ -13726,8 +13565,8 @@ var DateTimePicker = ({
13726
13565
  };
13727
13566
 
13728
13567
  // src/components/user-action/ScrollPicker.tsx
13729
- var import_react43 = require("react");
13730
- var import_clsx51 = __toESM(require("clsx"));
13568
+ var import_react44 = require("react");
13569
+ var import_clsx50 = __toESM(require("clsx"));
13731
13570
  var import_jsx_runtime63 = require("react/jsx-runtime");
13732
13571
  var up = 1;
13733
13572
  var down = -1;
@@ -13747,7 +13586,7 @@ var ScrollPicker = ({
13747
13586
  transition,
13748
13587
  items,
13749
13588
  lastTimeStamp
13750
- }, setAnimation] = (0, import_react43.useState)({
13589
+ }, setAnimation] = (0, import_react44.useState)({
13751
13590
  targetIndex: selectedIndex,
13752
13591
  currentIndex: disabled ? selectedIndex : 0,
13753
13592
  velocity: 0,
@@ -13763,7 +13602,7 @@ var ScrollPicker = ({
13763
13602
  const itemHeight = 40;
13764
13603
  const distance = 8;
13765
13604
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
13766
- const getDirection = (0, import_react43.useCallback)((targetIndex, currentIndex2, transition2, length) => {
13605
+ const getDirection = (0, import_react44.useCallback)((targetIndex, currentIndex2, transition2, length) => {
13767
13606
  if (targetIndex === currentIndex2) {
13768
13607
  return transition2 > 0 ? up : down;
13769
13608
  }
@@ -13773,7 +13612,7 @@ var ScrollPicker = ({
13773
13612
  }
13774
13613
  return distanceForward >= length / 2 ? down : up;
13775
13614
  }, []);
13776
- const animate = (0, import_react43.useCallback)((timestamp, startTime) => {
13615
+ const animate = (0, import_react44.useCallback)((timestamp, startTime) => {
13777
13616
  setAnimation((prevState) => {
13778
13617
  const {
13779
13618
  targetIndex,
@@ -13846,7 +13685,7 @@ var ScrollPicker = ({
13846
13685
  };
13847
13686
  });
13848
13687
  }, [disabled, getDirection, onChange]);
13849
- (0, import_react43.useEffect)(() => {
13688
+ (0, import_react44.useEffect)(() => {
13850
13689
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
13851
13690
  });
13852
13691
  const opacity = (transition2, index, itemsCount) => {
@@ -13897,7 +13736,7 @@ var ScrollPicker = ({
13897
13736
  children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13898
13737
  "div",
13899
13738
  {
13900
- className: (0, import_clsx51.default)(
13739
+ className: (0, import_clsx50.default)(
13901
13740
  `flex-col-2 items-center justify-center rounded-md`,
13902
13741
  {
13903
13742
  "text-primary font-bold": currentIndex === index,
@@ -13923,41 +13762,16 @@ var ScrollPicker = ({
13923
13762
  );
13924
13763
  };
13925
13764
 
13926
- // src/components/user-action/SearchBar.tsx
13927
- var import_lucide_react23 = require("lucide-react");
13928
- var import_clsx52 = require("clsx");
13929
- var import_jsx_runtime64 = require("react/jsx-runtime");
13930
- var SearchBar = ({
13931
- placeholder,
13932
- onSearch,
13933
- disableOnSearch,
13934
- containerClassName,
13935
- ...inputProps
13936
- }) => {
13937
- const translation = useHightideTranslation();
13938
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: (0, import_clsx52.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
13939
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
13940
- Input,
13941
- {
13942
- ...inputProps,
13943
- placeholder: placeholder ?? translation("search")
13944
- }
13945
- ),
13946
- onSearch && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react23.Search, { className: "w-full h-full" }) })
13947
- ] });
13948
- };
13949
-
13950
13765
  // src/components/user-action/Tooltip.tsx
13951
- var import_clsx53 = require("clsx");
13952
- var import_jsx_runtime65 = require("react/jsx-runtime");
13766
+ var import_clsx51 = require("clsx");
13767
+ var import_jsx_runtime64 = require("react/jsx-runtime");
13953
13768
  var Tooltip = ({
13954
13769
  tooltip,
13955
13770
  children,
13956
13771
  animationDelay = 650,
13957
13772
  tooltipClassName = "",
13958
13773
  containerClassName = "",
13959
- position = "bottom",
13960
- zIndex = 10
13774
+ position = "bottom"
13961
13775
  }) => {
13962
13776
  const { isHovered, handlers } = useHoverState();
13963
13777
  const positionClasses = {
@@ -13979,17 +13793,18 @@ var Tooltip = ({
13979
13793
  left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
13980
13794
  right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
13981
13795
  };
13982
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
13796
+ const zIndex = useZIndexRegister(isHovered);
13797
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
13983
13798
  "div",
13984
13799
  {
13985
- className: (0, import_clsx53.clsx)("relative inline-block", containerClassName),
13800
+ className: (0, import_clsx51.clsx)("relative inline-block", containerClassName),
13986
13801
  ...handlers,
13987
13802
  children: [
13988
13803
  children,
13989
- isHovered && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
13804
+ isHovered && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
13990
13805
  "div",
13991
13806
  {
13992
- className: (0, import_clsx53.clsx)(
13807
+ className: (0, import_clsx51.clsx)(
13993
13808
  `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
13994
13809
  animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,
13995
13810
  positionClasses[position],
@@ -13998,10 +13813,10 @@ var Tooltip = ({
13998
13813
  style: { zIndex, animationDelay: animationDelay + "ms" },
13999
13814
  children: [
14000
13815
  tooltip,
14001
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
13816
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
14002
13817
  "div",
14003
13818
  {
14004
- className: (0, import_clsx53.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
13819
+ className: (0, import_clsx51.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
14005
13820
  style: { ...triangleStyle[position], zIndex: zIndex + 1 }
14006
13821
  }
14007
13822
  )
@@ -14014,26 +13829,26 @@ var Tooltip = ({
14014
13829
  };
14015
13830
 
14016
13831
  // src/components/user-action/input/InsideLabelInput.tsx
14017
- var import_react44 = require("react");
14018
13832
  var import_react45 = require("react");
14019
- var import_clsx54 = __toESM(require("clsx"));
14020
- var import_jsx_runtime66 = require("react/jsx-runtime");
14021
- var InsideLabelInput = (0, import_react45.forwardRef)(function InsideLabelInput2({
13833
+ var import_react46 = require("react");
13834
+ var import_clsx52 = __toESM(require("clsx"));
13835
+ var import_jsx_runtime65 = require("react/jsx-runtime");
13836
+ var InsideLabelInput = (0, import_react46.forwardRef)(function InsideLabelInput2({
14022
13837
  id: customId,
14023
13838
  label,
14024
13839
  ...props
14025
13840
  }, forwardedRef) {
14026
13841
  const { value } = props;
14027
- const [isFocused, setIsFocused] = (0, import_react45.useState)(false);
14028
- const generatedId = (0, import_react44.useId)();
13842
+ const [isFocused, setIsFocused] = (0, import_react46.useState)(false);
13843
+ const generatedId = (0, import_react45.useId)();
14029
13844
  const id = customId ?? generatedId;
14030
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx54.default)("relative"), children: [
14031
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13845
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: (0, import_clsx52.default)("relative"), children: [
13846
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14032
13847
  Input,
14033
13848
  {
14034
13849
  ...props,
14035
13850
  id,
14036
- className: (0, import_clsx54.default)("h-14 px-4 pb-2 py-6.5", props.className),
13851
+ className: (0, import_clsx52.default)("h-14 px-4 pb-2 py-6.5", props.className),
14037
13852
  ref: forwardedRef,
14038
13853
  "aria-labelledby": id + "-label",
14039
13854
  onFocus: (event) => {
@@ -14046,13 +13861,13 @@ var InsideLabelInput = (0, import_react45.forwardRef)(function InsideLabelInput2
14046
13861
  }
14047
13862
  }
14048
13863
  ),
14049
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13864
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14050
13865
  "label",
14051
13866
  {
14052
13867
  id: id + "-label",
14053
13868
  "aria-hidden": true,
14054
13869
  "data-display": isFocused || !!value ? "small" : "full",
14055
- className: (0, import_clsx54.default)(
13870
+ className: (0, import_clsx52.default)(
14056
13871
  // margin left to account for the border which is ignored for absolute positions
14057
13872
  "absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
14058
13873
  "data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
@@ -14068,7 +13883,7 @@ var InsideLabelInputUncontrolled = ({
14068
13883
  ...props
14069
13884
  }) => {
14070
13885
  const [value, setValue] = useOverwritableState(initialValue, props.onChangeText);
14071
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13886
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
14072
13887
  InsideLabelInput,
14073
13888
  {
14074
13889
  ...props,
@@ -14078,26 +13893,62 @@ var InsideLabelInputUncontrolled = ({
14078
13893
  );
14079
13894
  };
14080
13895
 
13896
+ // src/components/user-action/input/SearchBar.tsx
13897
+ var import_lucide_react23 = require("lucide-react");
13898
+ var import_clsx53 = require("clsx");
13899
+ var import_jsx_runtime66 = require("react/jsx-runtime");
13900
+ var SearchBar = ({
13901
+ onSearch,
13902
+ searchButtonProps,
13903
+ containerProps,
13904
+ ...inputProps
13905
+ }) => {
13906
+ const translation = useHightideTranslation();
13907
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { ...containerProps, className: (0, import_clsx53.clsx)("relative", containerProps?.className), children: [
13908
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13909
+ InputUncontrolled,
13910
+ {
13911
+ ...inputProps,
13912
+ placeholder: inputProps.placeholder ?? translation("search"),
13913
+ className: (0, import_clsx53.clsx)("pr-10 w-full", inputProps.className)
13914
+ }
13915
+ ),
13916
+ onSearch && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
13917
+ Button,
13918
+ {
13919
+ ...searchButtonProps,
13920
+ size: "small",
13921
+ layout: "icon",
13922
+ color: "neutral",
13923
+ coloringStyle: "text",
13924
+ onClick: (event) => onSearch(event),
13925
+ className: (0, import_clsx53.clsx)("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
13926
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_lucide_react23.Search, { className: "w-full h-full" })
13927
+ }
13928
+ )
13929
+ ] });
13930
+ };
13931
+
14081
13932
  // src/components/user-action/input/ToggleableInput.tsx
14082
- var import_react46 = require("react");
13933
+ var import_react47 = require("react");
14083
13934
  var import_lucide_react24 = require("lucide-react");
14084
- var import_clsx55 = __toESM(require("clsx"));
13935
+ var import_clsx54 = __toESM(require("clsx"));
14085
13936
  var import_jsx_runtime67 = require("react/jsx-runtime");
14086
- var ToggleableInput = (0, import_react46.forwardRef)(function ToggleableInput2({
13937
+ var ToggleableInput = (0, import_react47.forwardRef)(function ToggleableInput2({
14087
13938
  value,
14088
13939
  initialState = "display",
14089
13940
  editCompleteOptions,
14090
13941
  ...props
14091
13942
  }, forwardedRef) {
14092
- const [isEditing, setIsEditing] = (0, import_react46.useState)(initialState !== "display");
14093
- const innerRef = (0, import_react46.useRef)(null);
14094
- (0, import_react46.useImperativeHandle)(forwardedRef, () => innerRef.current);
14095
- (0, import_react46.useEffect)(() => {
13943
+ const [isEditing, setIsEditing] = (0, import_react47.useState)(initialState !== "display");
13944
+ const innerRef = (0, import_react47.useRef)(null);
13945
+ (0, import_react47.useImperativeHandle)(forwardedRef, () => innerRef.current);
13946
+ (0, import_react47.useEffect)(() => {
14096
13947
  if (isEditing) {
14097
13948
  innerRef.current?.focus();
14098
13949
  }
14099
13950
  }, [isEditing]);
14100
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: (0, import_clsx55.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
13951
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: (0, import_clsx54.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
14101
13952
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
14102
13953
  Input,
14103
13954
  {
@@ -14117,16 +13968,16 @@ var ToggleableInput = (0, import_react46.forwardRef)(function ToggleableInput2({
14117
13968
  ...editCompleteOptions,
14118
13969
  allowEnterComplete: true
14119
13970
  },
14120
- className: (0, import_clsx55.default)(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {
14121
- "underline": isEditing,
13971
+ "data-name": props["data-name"] ?? "togglable-input",
13972
+ "data-isEditing": isEditing ? "" : void 0,
13973
+ className: (0, import_clsx54.default)(`w-full rounded-md`, {
14122
13974
  "text-transparent": !isEditing
14123
- }),
14124
- defaultStyle: false
13975
+ })
14125
13976
  }
14126
13977
  ),
14127
13978
  !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: [
14128
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: (0, import_clsx55.default)(" truncate"), children: value }),
14129
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react24.Pencil, { className: (0, import_clsx55.default)(`size-force-4`, { "text-transparent": isEditing }) })
13979
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: (0, import_clsx54.default)(" truncate"), children: value }),
13980
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_lucide_react24.Pencil, { className: (0, import_clsx54.default)(`size-force-4`, { "text-transparent": isEditing }) })
14130
13981
  ] })
14131
13982
  ] });
14132
13983
  });
@@ -14147,33 +13998,33 @@ var ToggleableInputUncontrolled = ({
14147
13998
  };
14148
13999
 
14149
14000
  // src/components/utils/FocusTrap.tsx
14150
- var import_react47 = require("react");
14151
14001
  var import_react48 = require("react");
14152
14002
  var import_react49 = require("react");
14003
+ var import_react50 = require("react");
14153
14004
  var import_jsx_runtime68 = require("react/jsx-runtime");
14154
- var FocusTrap = (0, import_react49.forwardRef)(function FocusTrap2({
14005
+ var FocusTrap = (0, import_react50.forwardRef)(function FocusTrap2({
14155
14006
  active = true,
14156
14007
  initialFocus,
14157
14008
  focusFirst = false,
14158
14009
  ...props
14159
14010
  }, forwardedRef) {
14160
- const innerRef = (0, import_react47.useRef)(null);
14161
- (0, import_react48.useImperativeHandle)(forwardedRef, () => innerRef.current);
14011
+ const innerRef = (0, import_react48.useRef)(null);
14012
+ (0, import_react49.useImperativeHandle)(forwardedRef, () => innerRef.current);
14162
14013
  useFocusTrap({ container: innerRef, active, initialFocus, focusFirst });
14163
14014
  return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ref: innerRef, ...props });
14164
14015
  });
14165
14016
 
14166
14017
  // src/components/utils/Transition.tsx
14167
- var import_react50 = require("react");
14018
+ var import_react51 = require("react");
14168
14019
  function Transition({
14169
14020
  children,
14170
14021
  show,
14171
14022
  includeAnimation = true
14172
14023
  }) {
14173
- const [isOpen, setIsOpen] = (0, import_react50.useState)(show);
14174
- const [isTransitioning, setIsTransitioning] = (0, import_react50.useState)(!isOpen);
14024
+ const [isOpen, setIsOpen] = (0, import_react51.useState)(show);
14025
+ const [isTransitioning, setIsTransitioning] = (0, import_react51.useState)(!isOpen);
14175
14026
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
14176
- (0, import_react50.useEffect)(() => {
14027
+ (0, import_react51.useEffect)(() => {
14177
14028
  setIsOpen(show);
14178
14029
  setIsTransitioning(true);
14179
14030
  }, [show]);
@@ -14198,7 +14049,7 @@ function Transition({
14198
14049
  }
14199
14050
 
14200
14051
  // src/hooks/focus/useFocusGuards.ts
14201
- var import_react51 = require("react");
14052
+ var import_react52 = require("react");
14202
14053
  var selectorName = "data-hw-focus-guard";
14203
14054
  function FocusGuard() {
14204
14055
  const element = document.createElement("div");
@@ -14236,7 +14087,7 @@ var FocusGuardsService = class _FocusGuardsService {
14236
14087
  }
14237
14088
  };
14238
14089
  var useFocusGuards = () => {
14239
- (0, import_react51.useEffect)(() => {
14090
+ (0, import_react52.useEffect)(() => {
14240
14091
  FocusGuardsService.getInstance().add();
14241
14092
  return () => {
14242
14093
  FocusGuardsService.getInstance().remove();
@@ -14245,10 +14096,10 @@ var useFocusGuards = () => {
14245
14096
  };
14246
14097
 
14247
14098
  // src/hooks/focus/useFocusOnceVisible.ts
14248
- var import_react52 = __toESM(require("react"));
14099
+ var import_react53 = __toESM(require("react"));
14249
14100
  var useFocusOnceVisible = (ref, disable = false) => {
14250
- const [hasUsedFocus, setHasUsedFocus] = import_react52.default.useState(false);
14251
- (0, import_react52.useEffect)(() => {
14101
+ const [hasUsedFocus, setHasUsedFocus] = import_react53.default.useState(false);
14102
+ (0, import_react53.useEffect)(() => {
14252
14103
  if (disable || hasUsedFocus) {
14253
14104
  return;
14254
14105
  }
@@ -14268,13 +14119,13 @@ var useFocusOnceVisible = (ref, disable = false) => {
14268
14119
  };
14269
14120
 
14270
14121
  // src/hooks/useRerender.ts
14271
- var import_react53 = require("react");
14122
+ var import_react54 = require("react");
14272
14123
  var useRerender = () => {
14273
- return (0, import_react53.useReducer)(() => ({}), {})[1];
14124
+ return (0, import_react54.useReducer)(() => ({}), {})[1];
14274
14125
  };
14275
14126
 
14276
14127
  // src/hooks/useSearch.ts
14277
- var import_react54 = require("react");
14128
+ var import_react55 = require("react");
14278
14129
 
14279
14130
  // src/utils/simpleSearch.ts
14280
14131
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -14313,34 +14164,34 @@ var useSearch = ({
14313
14164
  filter,
14314
14165
  disabled = false
14315
14166
  }) => {
14316
- const [search, setSearch] = (0, import_react54.useState)(initialSearch ?? "");
14317
- const [result, setResult] = (0, import_react54.useState)(list);
14318
- const searchTags = (0, import_react54.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
14319
- const updateSearch = (0, import_react54.useCallback)((newSearch) => {
14167
+ const [search, setSearch] = (0, import_react55.useState)(initialSearch ?? "");
14168
+ const [result, setResult] = (0, import_react55.useState)(list);
14169
+ const searchTags = (0, import_react55.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
14170
+ const updateSearch = (0, import_react55.useCallback)((newSearch) => {
14320
14171
  const usedSearch = newSearch ?? search;
14321
14172
  if (newSearch) {
14322
14173
  setSearch(search);
14323
14174
  }
14324
14175
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
14325
14176
  }, [searchTags, list, search, searchMapping]);
14326
- (0, import_react54.useEffect)(() => {
14177
+ (0, import_react55.useEffect)(() => {
14327
14178
  if (isSearchInstant) {
14328
14179
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
14329
14180
  }
14330
14181
  }, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
14331
- const filteredResult = (0, import_react54.useMemo)(() => {
14182
+ const filteredResult = (0, import_react55.useMemo)(() => {
14332
14183
  if (!filter) {
14333
14184
  return result;
14334
14185
  }
14335
14186
  return result.filter(filter);
14336
14187
  }, [result, filter]);
14337
- const sortedAndFilteredResult = (0, import_react54.useMemo)(() => {
14188
+ const sortedAndFilteredResult = (0, import_react55.useMemo)(() => {
14338
14189
  if (!sortingFunction) {
14339
14190
  return filteredResult;
14340
14191
  }
14341
14192
  return filteredResult.sort(sortingFunction);
14342
14193
  }, [filteredResult, sortingFunction]);
14343
- const usedResult = (0, import_react54.useMemo)(() => {
14194
+ const usedResult = (0, import_react55.useMemo)(() => {
14344
14195
  if (!disabled) {
14345
14196
  return sortedAndFilteredResult;
14346
14197
  }
@@ -14572,7 +14423,7 @@ var PromiseUtils = {
14572
14423
  AvatarUtil,
14573
14424
  BagFunctionUtil,
14574
14425
  BreadCrumb,
14575
- ButtonColorUtil,
14426
+ Button,
14576
14427
  ButtonUtil,
14577
14428
  Carousel,
14578
14429
  CarouselSlide,
@@ -14606,8 +14457,6 @@ var PromiseUtils = {
14606
14457
  FormElementWrapper,
14607
14458
  HelpwaveBadge,
14608
14459
  HelpwaveLogo,
14609
- IconButton,
14610
- IconButtonUtil,
14611
14460
  Input,
14612
14461
  InputDialog,
14613
14462
  InputUncontrolled,
@@ -14643,7 +14492,6 @@ var PromiseUtils = {
14643
14492
  Navigation,
14644
14493
  NavigationItemList,
14645
14494
  NumberProperty,
14646
- OutlineButton,
14647
14495
  Pagination,
14648
14496
  ProgressIndicator,
14649
14497
  PromiseUtils,
@@ -14664,7 +14512,6 @@ var PromiseUtils = {
14664
14512
  SimpleSearch,
14665
14513
  SimpleSearchWithMapping,
14666
14514
  SingleSelectProperty,
14667
- SolidButton,
14668
14515
  StepperBar,
14669
14516
  StepperBarUncontrolled,
14670
14517
  Tab,
@@ -14677,7 +14524,6 @@ var PromiseUtils = {
14677
14524
  TableUncontrolled,
14678
14525
  TableWithSelection,
14679
14526
  TagIcon,
14680
- TextButton,
14681
14527
  TextImage,
14682
14528
  TextProperty,
14683
14529
  Textarea,
@@ -14709,7 +14555,6 @@ var PromiseUtils = {
14709
14555
  equalSizeGroups,
14710
14556
  formatDate,
14711
14557
  formatDateTime,
14712
- generateShadingColors,
14713
14558
  getBetweenDuration,
14714
14559
  getDaysInMonth,
14715
14560
  getNeighbours,
@@ -14722,7 +14567,6 @@ var PromiseUtils = {
14722
14567
  noop,
14723
14568
  range,
14724
14569
  resolveSetState,
14725
- shadingColorValues,
14726
14570
  subtractDuration,
14727
14571
  useDelay,
14728
14572
  useFloatingElement,
@@ -14747,6 +14591,7 @@ var PromiseUtils = {
14747
14591
  useTabContext,
14748
14592
  useTheme,
14749
14593
  useTranslatedValidators,
14594
+ useZIndexRegister,
14750
14595
  validateEmail,
14751
14596
  weekDayList,
14752
14597
  writeToClipboard