@helpwave/hightide 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/coloring/shading.cjs +106 -100
  2. package/dist/coloring/shading.cjs.map +1 -1
  3. package/dist/coloring/shading.js +108 -102
  4. package/dist/coloring/shading.js.map +1 -1
  5. package/dist/components/{modals → dialogs}/ConfirmDialog.cjs +187 -31
  6. package/dist/components/dialogs/ConfirmDialog.cjs.map +1 -0
  7. package/dist/components/{modals → dialogs}/ConfirmDialog.d.cts +7 -8
  8. package/dist/components/{modals → dialogs}/ConfirmDialog.d.ts +7 -8
  9. package/dist/components/{modals → dialogs}/ConfirmDialog.js +186 -30
  10. package/dist/components/dialogs/ConfirmDialog.js.map +1 -0
  11. package/dist/components/layout-and-navigation/Overlay.cjs +11 -18
  12. package/dist/components/layout-and-navigation/Overlay.cjs.map +1 -1
  13. package/dist/components/layout-and-navigation/Overlay.d.cts +14 -9
  14. package/dist/components/layout-and-navigation/Overlay.d.ts +14 -9
  15. package/dist/components/layout-and-navigation/Overlay.js +9 -16
  16. package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
  17. package/dist/components/modals/ConfirmModal.cjs +524 -0
  18. package/dist/components/modals/ConfirmModal.cjs.map +1 -0
  19. package/dist/components/modals/ConfirmModal.d.cts +36 -0
  20. package/dist/components/modals/ConfirmModal.d.ts +36 -0
  21. package/dist/components/modals/ConfirmModal.js +487 -0
  22. package/dist/components/modals/ConfirmModal.js.map +1 -0
  23. package/dist/components/modals/DiscardChangesModal.cjs +126 -59
  24. package/dist/components/modals/DiscardChangesModal.cjs.map +1 -1
  25. package/dist/components/modals/DiscardChangesModal.d.cts +4 -2
  26. package/dist/components/modals/DiscardChangesModal.d.ts +4 -2
  27. package/dist/components/modals/DiscardChangesModal.js +125 -58
  28. package/dist/components/modals/DiscardChangesModal.js.map +1 -1
  29. package/dist/components/modals/InputModal.cjs +186 -30
  30. package/dist/components/modals/InputModal.cjs.map +1 -1
  31. package/dist/components/modals/InputModal.d.cts +1 -1
  32. package/dist/components/modals/InputModal.d.ts +1 -1
  33. package/dist/components/modals/InputModal.js +186 -30
  34. package/dist/components/modals/InputModal.js.map +1 -1
  35. package/dist/components/modals/LanguageModal.cjs +5 -5
  36. package/dist/components/modals/LanguageModal.cjs.map +1 -1
  37. package/dist/components/modals/LanguageModal.js +5 -5
  38. package/dist/components/modals/LanguageModal.js.map +1 -1
  39. package/dist/components/modals/ThemeModal.cjs +5 -5
  40. package/dist/components/modals/ThemeModal.cjs.map +1 -1
  41. package/dist/components/modals/ThemeModal.js +5 -5
  42. package/dist/components/modals/ThemeModal.js.map +1 -1
  43. package/dist/css/globals.css +8 -4
  44. package/dist/css/uncompiled/globals.css +8 -5
  45. package/dist/index.cjs +1726 -1675
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +3 -2
  48. package/dist/index.d.ts +3 -2
  49. package/dist/index.js +1693 -1643
  50. package/dist/index.js.map +1 -1
  51. package/package.json +6 -6
  52. package/dist/components/modals/ConfirmDialog.cjs.map +0 -1
  53. package/dist/components/modals/ConfirmDialog.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -46,6 +46,7 @@ __export(index_exports, {
46
46
  ChipList: () => ChipList,
47
47
  Circle: () => Circle,
48
48
  ConfirmDialog: () => ConfirmDialog,
49
+ ConfirmModal: () => ConfirmModal,
49
50
  DatePicker: () => DatePicker,
50
51
  DatePickerUncontrolled: () => DatePickerUncontrolled,
51
52
  DateProperty: () => DateProperty,
@@ -80,7 +81,6 @@ __export(index_exports, {
80
81
  Menu: () => Menu2,
81
82
  MenuItem: () => MenuItem,
82
83
  Modal: () => Modal,
83
- ModalHeader: () => ModalHeader,
84
84
  MultiSearchWithMapping: () => MultiSearchWithMapping,
85
85
  MultiSelect: () => MultiSelect,
86
86
  MultiSelectProperty: () => MultiSelectProperty,
@@ -88,6 +88,7 @@ __export(index_exports, {
88
88
  NumberProperty: () => NumberProperty,
89
89
  OutlineButton: () => OutlineButton,
90
90
  Overlay: () => Overlay,
91
+ OverlayHeader: () => OverlayHeader,
91
92
  Pagination: () => Pagination,
92
93
  ProgressIndicator: () => ProgressIndicator,
93
94
  PropertyBase: () => PropertyBase,
@@ -1515,1504 +1516,1555 @@ var TimePickerUncontrolled = ({
1515
1516
  );
1516
1517
  };
1517
1518
 
1518
- // src/components/icons-and-geometry/Avatar.tsx
1519
- var import_image2 = __toESM(require("next/image"), 1);
1520
- var import_clsx10 = __toESM(require("clsx"), 1);
1521
- var import_jsx_runtime12 = require("react/jsx-runtime");
1522
- var avtarSizeList = ["tiny", "small", "medium", "large"];
1523
- var avatarSizeMapping = {
1524
- tiny: 24,
1525
- small: 32,
1526
- medium: 48,
1527
- large: 64
1528
- };
1529
- var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
1530
- avatarUrl = "https://cdn.helpwave.de/boringavatar.svg";
1531
- const avtarSize = {
1532
- tiny: 24,
1533
- small: 32,
1534
- medium: 48,
1535
- large: 64
1536
- }[size];
1537
- const style = {
1538
- width: avtarSize + "px",
1539
- height: avtarSize + "px",
1540
- maxWidth: avtarSize + "px",
1541
- maxHeight: avtarSize + "px",
1542
- minWidth: avtarSize + "px",
1543
- minHeight: avtarSize + "px"
1544
- };
1545
- return (
1546
- // TODO transparent or white background later
1547
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: (0, import_clsx10.default)(`rounded-full bg-primary`, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1548
- import_image2.default,
1549
- {
1550
- className: "rounded-full border border-gray-200",
1551
- style,
1552
- src: avatarUrl,
1553
- alt,
1554
- width: avtarSize,
1555
- height: avtarSize
1556
- }
1557
- ) })
1558
- );
1559
- };
1560
- var AvatarGroup = ({
1561
- avatars,
1562
- maxShownProfiles = 5,
1563
- size = "tiny"
1564
- }) => {
1565
- const displayedProfiles = avatars.length < maxShownProfiles ? avatars : avatars.slice(0, maxShownProfiles);
1566
- const diameter = avatarSizeMapping[size];
1567
- const stackingOverlap = 0.5;
1568
- const notDisplayedProfiles = avatars.length - maxShownProfiles;
1569
- const avatarGroupWidth = diameter * (stackingOverlap * (displayedProfiles.length - 1) + 1);
1570
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "row relative", style: { height: diameter + "px" }, children: [
1571
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { width: avatarGroupWidth + "px" }, children: displayedProfiles.map((avatar, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1572
- "div",
1573
- {
1574
- className: "absolute",
1575
- style: { left: index * diameter * stackingOverlap + "px", zIndex: maxShownProfiles - index },
1576
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Avatar, { avatarUrl: avatar.avatarUrl, alt: avatar.alt, size })
1577
- },
1578
- index
1579
- )) }),
1580
- notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1581
- "div",
1582
- {
1583
- className: "truncate row items-center",
1584
- style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
1585
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
1586
- "+ ",
1587
- notDisplayedProfiles
1588
- ] })
1589
- }
1590
- )
1591
- ] });
1592
- };
1519
+ // src/components/dialogs/ConfirmDialog.tsx
1520
+ var import_clsx12 = __toESM(require("clsx"), 1);
1593
1521
 
1594
- // src/components/icons-and-geometry/Circle.tsx
1522
+ // src/components/layout-and-navigation/Overlay.tsx
1523
+ var import_react9 = require("react");
1524
+ var import_react_dom = __toESM(require("react-dom"), 1);
1595
1525
  var import_clsx11 = __toESM(require("clsx"), 1);
1596
- var import_jsx_runtime13 = require("react/jsx-runtime");
1597
- var Circle = ({
1598
- radius = 20,
1599
- className = "bg-primary",
1600
- style,
1601
- ...restProps
1602
- }) => {
1603
- const size = radius * 2;
1604
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1605
- "div",
1606
- {
1607
- className: (0, import_clsx11.default)(`rounded-full`, className),
1608
- style: {
1609
- width: `${size}px`,
1610
- height: `${size}px`,
1611
- ...style
1612
- },
1613
- ...restProps
1526
+
1527
+ // src/hooks/useHoverState.ts
1528
+ var import_react8 = require("react");
1529
+ var defaultUseHoverStateProps = {
1530
+ closingDelay: 200,
1531
+ isDisabled: false
1532
+ };
1533
+ var useHoverState = (props = void 0) => {
1534
+ const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
1535
+ const [isHovered, setIsHovered] = (0, import_react8.useState)(false);
1536
+ const [timer, setTimer] = (0, import_react8.useState)();
1537
+ const onMouseEnter = () => {
1538
+ if (isDisabled) {
1539
+ return;
1614
1540
  }
1615
- );
1541
+ clearTimeout(timer);
1542
+ setIsHovered(true);
1543
+ };
1544
+ const onMouseLeave = () => {
1545
+ if (isDisabled) {
1546
+ return;
1547
+ }
1548
+ setTimer(setTimeout(() => {
1549
+ setIsHovered(false);
1550
+ }, closingDelay));
1551
+ };
1552
+ (0, import_react8.useEffect)(() => {
1553
+ if (timer) {
1554
+ return () => {
1555
+ clearTimeout(timer);
1556
+ };
1557
+ }
1558
+ });
1559
+ (0, import_react8.useEffect)(() => {
1560
+ if (timer) {
1561
+ clearTimeout(timer);
1562
+ }
1563
+ }, [isDisabled]);
1564
+ return {
1565
+ isHovered,
1566
+ setIsHovered,
1567
+ handlers: { onMouseEnter, onMouseLeave }
1568
+ };
1616
1569
  };
1617
1570
 
1618
- // src/components/icons-and-geometry/Ring.tsx
1619
- var import_react8 = require("react");
1620
- var import_clsx12 = __toESM(require("clsx"), 1);
1621
- var import_jsx_runtime14 = require("react/jsx-runtime");
1622
- var Ring = ({
1623
- innerSize = 20,
1624
- width = 7,
1625
- className = "outline-primary"
1571
+ // src/components/user-action/Tooltip.tsx
1572
+ var import_clsx10 = require("clsx");
1573
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1574
+ var Tooltip = ({
1575
+ tooltip,
1576
+ children,
1577
+ animationDelay = 650,
1578
+ tooltipClassName = "",
1579
+ containerClassName = "",
1580
+ position = "bottom",
1581
+ zIndex = 10
1626
1582
  }) => {
1627
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1583
+ const { isHovered, handlers } = useHoverState();
1584
+ const positionClasses = {
1585
+ top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
1586
+ bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
1587
+ left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
1588
+ right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
1589
+ };
1590
+ const triangleSize = 6;
1591
+ const triangleClasses = {
1592
+ top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
1593
+ bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
1594
+ left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
1595
+ right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
1596
+ };
1597
+ const triangleStyle = {
1598
+ top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
1599
+ bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
1600
+ left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
1601
+ right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
1602
+ };
1603
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1628
1604
  "div",
1629
1605
  {
1630
- className: (0, import_clsx12.default)(`bg-transparent rounded-full outline`, className),
1631
- style: {
1632
- width: `${innerSize}px`,
1633
- height: `${innerSize}px`,
1634
- outlineWidth: `${width}px`
1635
- }
1606
+ className: (0, import_clsx10.clsx)("relative inline-block", containerClassName),
1607
+ ...handlers,
1608
+ children: [
1609
+ children,
1610
+ isHovered && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1611
+ "div",
1612
+ {
1613
+ className: (0, import_clsx10.clsx)(
1614
+ `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
1615
+ animate-tooltip-fade-in shadow-lg bg-tooltip-background`,
1616
+ positionClasses[position],
1617
+ tooltipClassName
1618
+ ),
1619
+ style: { zIndex, animationDelay: animationDelay + "ms" },
1620
+ children: [
1621
+ tooltip,
1622
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1623
+ "div",
1624
+ {
1625
+ className: (0, import_clsx10.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
1626
+ style: { ...triangleStyle[position], zIndex }
1627
+ }
1628
+ )
1629
+ ]
1630
+ }
1631
+ )
1632
+ ]
1636
1633
  }
1637
1634
  );
1638
1635
  };
1639
- var AnimatedRing = ({
1640
- innerSize,
1641
- width,
1642
- className,
1643
- fillAnimationDuration = 3,
1644
- repeating = false,
1645
- onAnimationFinished = noop,
1646
- style
1636
+
1637
+ // src/components/layout-and-navigation/Overlay.tsx
1638
+ var import_lucide_react3 = require("lucide-react");
1639
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1640
+ var Overlay = ({
1641
+ children,
1642
+ isOpen,
1643
+ onBackgroundClick,
1644
+ backgroundClassName
1647
1645
  }) => {
1648
- const [currentWidth, setCurrentWidth] = (0, import_react8.useState)(0);
1649
- const milliseconds = 1e3 * fillAnimationDuration;
1650
- const animate = (0, import_react8.useCallback)((timestamp, startTime) => {
1651
- const progress = Math.min((timestamp - startTime) / milliseconds, 1);
1652
- const newWidth = Math.min(width * progress, width);
1653
- setCurrentWidth(newWidth);
1654
- if (progress < 1) {
1655
- requestAnimationFrame((newTimestamp) => animate(newTimestamp, startTime));
1656
- } else {
1657
- onAnimationFinished();
1658
- if (repeating) {
1659
- setCurrentWidth(0);
1660
- requestAnimationFrame((newTimestamp) => animate(newTimestamp, newTimestamp));
1661
- }
1662
- }
1663
- }, [milliseconds, onAnimationFinished, repeating, width]);
1664
- (0, import_react8.useEffect)(() => {
1665
- if (currentWidth < width) {
1666
- requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
1667
- }
1646
+ const [root, setRoot] = (0, import_react9.useState)();
1647
+ (0, import_react9.useEffect)(() => {
1648
+ setRoot(document.body);
1668
1649
  }, []);
1669
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1670
- "div",
1671
- {
1672
- className: "row items-center justify-center",
1673
- style: {
1674
- width: `${innerSize + 2 * width}px`,
1675
- height: `${innerSize + 2 * width}px`,
1676
- ...style
1677
- },
1678
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1679
- Ring,
1650
+ if (!root || !isOpen) return null;
1651
+ return import_react_dom.default.createPortal(
1652
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_clsx11.default)("fixed inset-0 z-[9999]"), children: [
1653
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1654
+ "div",
1680
1655
  {
1681
- innerSize,
1682
- width: currentWidth,
1683
- className
1656
+ className: (0, import_clsx11.default)("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
1657
+ onClick: onBackgroundClick
1684
1658
  }
1685
- )
1686
- }
1659
+ ),
1660
+ children
1661
+ ] }),
1662
+ root
1687
1663
  );
1688
1664
  };
1689
- var RingWave = ({
1690
- startInnerSize = 20,
1691
- endInnerSize = 30,
1692
- width,
1665
+ var overlayStack = [];
1666
+ var defaultModalHeaderTranslation = {
1667
+ en: {
1668
+ close: "Close"
1669
+ },
1670
+ de: {
1671
+ close: "Schlie\xDFen"
1672
+ }
1673
+ };
1674
+ var OverlayHeader = ({
1675
+ overwriteTranslation,
1676
+ onClose,
1677
+ title,
1678
+ titleText = "",
1679
+ description,
1680
+ descriptionText = ""
1681
+ }) => {
1682
+ const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
1683
+ const hasTitleRow = !!title || !!titleText || !!onClose;
1684
+ const titleRow = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "row justify-between items-start gap-x-8", children: [
1685
+ title ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1686
+ "h2",
1687
+ {
1688
+ className: (0, import_clsx11.default)("textstyle-title-lg", {
1689
+ "mb-1": description || descriptionText
1690
+ }),
1691
+ children: titleText
1692
+ }
1693
+ ),
1694
+ !!onClose && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tooltip, { tooltip: translation.close, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { color: "neutral", size: "small", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react3.X, { className: "w-full h-full" }) }) })
1695
+ ] });
1696
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "col", children: [
1697
+ hasTitleRow && titleRow,
1698
+ description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "textstyle-description", children: descriptionText }))
1699
+ ] });
1700
+ };
1701
+ var Modal = ({
1702
+ children,
1703
+ isOpen,
1704
+ onClose,
1693
1705
  className,
1694
- fillAnimationDuration = 3,
1695
- repeating = false,
1696
- onAnimationFinished = noop,
1697
- style
1706
+ backgroundClassName,
1707
+ headerProps
1698
1708
  }) => {
1699
- const [currentInnerSize, setCurrentInnerSize] = (0, import_react8.useState)(startInnerSize);
1700
- const distance = endInnerSize - startInnerSize;
1701
- const milliseconds = 1e3 * fillAnimationDuration;
1702
- const animate = (0, import_react8.useCallback)((timestamp, startTime) => {
1703
- const progress = Math.min((timestamp - startTime) / milliseconds, 1);
1704
- const newInnerSize = Math.min(
1705
- startInnerSize + distance * progress,
1706
- endInnerSize
1709
+ const ref = (0, import_react9.useRef)(null);
1710
+ (0, import_react9.useEffect)(() => {
1711
+ if (!isOpen) return;
1712
+ const modal = ref.current;
1713
+ if (!modal) {
1714
+ console.error("modal open, but no ref found");
1715
+ return;
1716
+ }
1717
+ overlayStack.push(modal);
1718
+ const focusable = modal?.querySelectorAll(
1719
+ 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
1707
1720
  );
1708
- setCurrentInnerSize(newInnerSize);
1709
- if (progress < 1) {
1710
- requestAnimationFrame((newTimestamp) => animate(newTimestamp, startTime));
1711
- } else {
1712
- onAnimationFinished();
1713
- if (repeating) {
1714
- setCurrentInnerSize(startInnerSize);
1715
- requestAnimationFrame((newTimestamp) => animate(newTimestamp, newTimestamp));
1721
+ const first = focusable[0];
1722
+ const last = focusable[focusable.length - 1];
1723
+ const handleKeyDown = (e) => {
1724
+ const isTopmost = overlayStack[overlayStack.length - 1] === modal;
1725
+ if (!isTopmost) return;
1726
+ if (e.key === "Escape") {
1727
+ e.stopPropagation();
1728
+ onClose();
1729
+ } else if (e.key === "Tab") {
1730
+ if (focusable.length === 0) return;
1731
+ if (e.shiftKey && document.activeElement === first) {
1732
+ e.preventDefault();
1733
+ last.focus();
1734
+ } else if (!e.shiftKey && document.activeElement === last) {
1735
+ e.preventDefault();
1736
+ first.focus();
1737
+ }
1716
1738
  }
1739
+ };
1740
+ modal.focus();
1741
+ document.addEventListener("keydown", handleKeyDown);
1742
+ return () => {
1743
+ document.removeEventListener("keydown", handleKeyDown);
1744
+ overlayStack = overlayStack.filter((m) => m !== modal);
1745
+ };
1746
+ }, [isOpen, onClose]);
1747
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1748
+ Overlay,
1749
+ {
1750
+ isOpen,
1751
+ onBackgroundClick: onClose,
1752
+ backgroundClassName,
1753
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1754
+ "div",
1755
+ {
1756
+ ref,
1757
+ tabIndex: -1,
1758
+ className: (0, import_clsx11.default)(
1759
+ "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
1760
+ className
1761
+ ),
1762
+ role: "dialog",
1763
+ "aria-modal": true,
1764
+ children: [
1765
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(OverlayHeader, { ...headerProps, onClose }),
1766
+ children
1767
+ ]
1768
+ }
1769
+ )
1717
1770
  }
1718
- }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
1719
- (0, import_react8.useEffect)(() => {
1720
- if (currentInnerSize < endInnerSize) {
1721
- requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
1771
+ );
1772
+ };
1773
+ var Dialog = ({
1774
+ children,
1775
+ isOpen,
1776
+ className,
1777
+ backgroundClassName,
1778
+ headerProps
1779
+ }) => {
1780
+ const ref = (0, import_react9.useRef)(null);
1781
+ (0, import_react9.useEffect)(() => {
1782
+ if (!isOpen) return;
1783
+ const dialog = ref.current;
1784
+ if (!dialog) {
1785
+ console.error("dialog open, but no ref found");
1786
+ return;
1722
1787
  }
1723
- }, []);
1724
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1725
- "div",
1788
+ overlayStack.push(dialog);
1789
+ const focusable = dialog?.querySelectorAll(
1790
+ 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
1791
+ );
1792
+ const first = focusable[0];
1793
+ const last = focusable[focusable.length - 1];
1794
+ const handleKeyDown = (e) => {
1795
+ const isTopmost = overlayStack[overlayStack.length - 1] === dialog;
1796
+ if (!isTopmost) return;
1797
+ if (e.key === "Escape") {
1798
+ e.stopPropagation();
1799
+ } else if (e.key === "Tab") {
1800
+ if (focusable.length === 0) return;
1801
+ if (e.shiftKey && document.activeElement === first) {
1802
+ e.preventDefault();
1803
+ last.focus();
1804
+ } else if (!e.shiftKey && document.activeElement === last) {
1805
+ e.preventDefault();
1806
+ first.focus();
1807
+ }
1808
+ }
1809
+ };
1810
+ dialog.focus();
1811
+ document.addEventListener("keydown", handleKeyDown);
1812
+ return () => {
1813
+ document.removeEventListener("keydown", handleKeyDown);
1814
+ overlayStack = overlayStack.filter((m) => m !== dialog);
1815
+ };
1816
+ }, [isOpen]);
1817
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1818
+ Overlay,
1726
1819
  {
1727
- className: "row items-center justify-center",
1728
- style: {
1729
- width: `${endInnerSize + 2 * width}px`,
1730
- height: `${endInnerSize + 2 * width}px`,
1731
- ...style
1732
- },
1733
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1734
- Ring,
1820
+ isOpen,
1821
+ backgroundClassName,
1822
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1823
+ "div",
1735
1824
  {
1736
- innerSize: currentInnerSize,
1737
- width,
1738
- className
1825
+ ref,
1826
+ tabIndex: -1,
1827
+ className: (0, import_clsx11.default)(
1828
+ "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
1829
+ className
1830
+ ),
1831
+ role: "dialog",
1832
+ "aria-modal": true,
1833
+ children: [
1834
+ !!headerProps && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(OverlayHeader, { ...headerProps }),
1835
+ children
1836
+ ]
1739
1837
  }
1740
1838
  )
1741
1839
  }
1742
1840
  );
1743
1841
  };
1744
- var RadialRings = ({
1745
- circle1ClassName = "bg-primary/90 outline-primary/90",
1746
- circle2ClassName = "bg-primary/60 outline-primary/60",
1747
- circle3ClassName = "bg-primary/40 outline-primary/40",
1748
- waveWidth = 10,
1749
- waveBaseColor = "outline-white/20",
1750
- sizeCircle1 = 100,
1751
- sizeCircle2 = 200,
1752
- sizeCircle3 = 300
1842
+
1843
+ // src/components/dialogs/ConfirmDialog.tsx
1844
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1845
+ var defaultConfirmDialogTranslation = {
1846
+ en: {
1847
+ confirm: "Confirm",
1848
+ decline: "Decline"
1849
+ },
1850
+ de: {
1851
+ confirm: "Best\xE4tigen",
1852
+ decline: "Ablehnen"
1853
+ }
1854
+ };
1855
+ var ConfirmDialog = ({
1856
+ overwriteTranslation,
1857
+ children,
1858
+ onConfirm,
1859
+ onDecline,
1860
+ confirmType = "positive",
1861
+ buttonOverwrites,
1862
+ className,
1863
+ ...restProps
1753
1864
  }) => {
1754
- const [currentRing, setCurrentRing] = (0, import_react8.useState)(0);
1755
- const size = sizeCircle3;
1756
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1757
- "div",
1758
- {
1759
- className: "relative",
1760
- style: {
1761
- width: `${sizeCircle3}px`,
1762
- height: `${sizeCircle3}px`
1763
- },
1764
- children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1766
- Circle,
1767
- {
1768
- radius: sizeCircle1 / 2,
1769
- className: (0, import_clsx12.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
1770
- style: {
1771
- left: `${size / 2}px`,
1772
- top: `${size / 2}px`
1773
- }
1774
- }
1775
- ),
1776
- currentRing === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1777
- AnimatedRing,
1778
- {
1779
- innerSize: sizeCircle1,
1780
- width: (sizeCircle2 - sizeCircle1) / 2,
1781
- onAnimationFinished: () => currentRing === 0 ? setCurrentRing(1) : null,
1782
- repeating: true,
1783
- className: (0, import_clsx12.default)(
1784
- circle2ClassName,
1785
- { "opacity-5": currentRing !== 0 }
1786
- ),
1787
- style: {
1788
- left: `${size / 2}px`,
1789
- top: `${size / 2}px`,
1790
- position: "absolute",
1791
- translate: `-50% -50%`,
1792
- zIndex: 9
1793
- }
1794
- }
1795
- ) : null,
1796
- currentRing === 2 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1797
- RingWave,
1798
- {
1799
- startInnerSize: sizeCircle1 - waveWidth,
1800
- endInnerSize: sizeCircle2,
1801
- width: waveWidth,
1802
- repeating: true,
1803
- className: (0, import_clsx12.default)(waveBaseColor, `opacity-5`),
1804
- style: {
1805
- left: `${size / 2}px`,
1806
- top: `${size / 2}px`,
1807
- position: "absolute",
1808
- translate: `-50% -50%`,
1809
- zIndex: 9
1810
- }
1811
- }
1812
- ) : null,
1813
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1814
- Circle,
1815
- {
1816
- radius: sizeCircle2 / 2,
1817
- className: (0, import_clsx12.default)(
1818
- circle2ClassName,
1819
- { "opacity-20": currentRing < 1 },
1820
- `absolute z-[8] -translate-y-1/2 -translate-x-1/2`
1821
- ),
1822
- style: {
1823
- left: `${size / 2}px`,
1824
- top: `${size / 2}px`
1825
- }
1826
- }
1827
- ),
1828
- currentRing === 1 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1829
- AnimatedRing,
1830
- {
1831
- innerSize: sizeCircle2 - 1,
1832
- width: (sizeCircle3 - sizeCircle2) / 2,
1833
- onAnimationFinished: () => currentRing === 1 ? setCurrentRing(2) : null,
1834
- repeating: true,
1835
- className: (0, import_clsx12.default)(circle3ClassName),
1836
- style: {
1837
- left: `${size / 2}px`,
1838
- top: `${size / 2}px`,
1839
- position: "absolute",
1840
- translate: `-50% -50%`,
1841
- zIndex: 7
1842
- }
1843
- }
1844
- ) : null,
1845
- currentRing === 2 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1846
- RingWave,
1847
- {
1848
- startInnerSize: sizeCircle2,
1849
- endInnerSize: sizeCircle3 - waveWidth,
1850
- width: waveWidth,
1851
- repeating: true,
1852
- className: (0, import_clsx12.default)(waveBaseColor, `opacity-5`),
1853
- style: {
1854
- left: `${size / 2}px`,
1855
- top: `${size / 2}px`,
1856
- position: "absolute",
1857
- translate: `-50% -50%`,
1858
- zIndex: 7
1859
- }
1860
- }
1861
- ) : null,
1862
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1863
- Circle,
1864
- {
1865
- radius: sizeCircle3 / 2,
1866
- className: (0, import_clsx12.default)(
1867
- circle3ClassName,
1868
- { "opacity-20": currentRing < 2 },
1869
- `absolute z-[6] -translate-y-1/2 -translate-x-1/2`
1870
- ),
1871
- style: {
1872
- left: `${size / 2}px`,
1873
- top: `${size / 2}px`
1874
- }
1875
- }
1876
- )
1877
- ]
1878
- }
1879
- );
1865
+ const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
1866
+ const mapping = {
1867
+ neutral: "primary",
1868
+ negative: "negative",
1869
+ positive: "positive",
1870
+ primary: "primary"
1871
+ };
1872
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(Dialog, { ...restProps, className: (0, import_clsx12.default)("justify-between", className), children: [
1873
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "col grow", children }),
1874
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
1875
+ onDecline && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1876
+ SolidButton,
1877
+ {
1878
+ color: buttonOverwrites?.[0].color ?? "negative",
1879
+ onClick: onDecline,
1880
+ disabled: buttonOverwrites?.[0].disabled ?? false,
1881
+ children: buttonOverwrites?.[0].text ?? translation.decline
1882
+ }
1883
+ ),
1884
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1885
+ SolidButton,
1886
+ {
1887
+ autoFocus: true,
1888
+ color: buttonOverwrites?.[1].color ?? mapping[confirmType],
1889
+ onClick: onConfirm,
1890
+ disabled: buttonOverwrites?.[1].disabled ?? false,
1891
+ children: buttonOverwrites?.[1].text ?? translation.confirm
1892
+ }
1893
+ )
1894
+ ] })
1895
+ ] });
1880
1896
  };
1881
1897
 
1882
- // src/components/icons-and-geometry/Tag.tsx
1883
- var import_image3 = __toESM(require("next/image"), 1);
1898
+ // src/components/icons-and-geometry/Avatar.tsx
1899
+ var import_image2 = __toESM(require("next/image"), 1);
1900
+ var import_clsx13 = __toESM(require("clsx"), 1);
1884
1901
  var import_jsx_runtime15 = require("react/jsx-runtime");
1885
- var TagIcon = ({
1886
- className,
1887
- width = 16,
1888
- height = 16,
1889
- ...props
1890
- }) => {
1891
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1892
- import_image3.default,
1893
- {
1894
- ...props,
1895
- width,
1896
- height,
1897
- alt: "",
1898
- src: "https://cdn.helpwave.de/icons/label.png",
1899
- className
1900
- }
1902
+ var avtarSizeList = ["tiny", "small", "medium", "large"];
1903
+ var avatarSizeMapping = {
1904
+ tiny: 24,
1905
+ small: 32,
1906
+ medium: 48,
1907
+ large: 64
1908
+ };
1909
+ var Avatar = ({ avatarUrl, alt, size = "medium", className = "" }) => {
1910
+ avatarUrl = "https://cdn.helpwave.de/boringavatar.svg";
1911
+ const avtarSize = {
1912
+ tiny: 24,
1913
+ small: 32,
1914
+ medium: 48,
1915
+ large: 64
1916
+ }[size];
1917
+ const style = {
1918
+ width: avtarSize + "px",
1919
+ height: avtarSize + "px",
1920
+ maxWidth: avtarSize + "px",
1921
+ maxHeight: avtarSize + "px",
1922
+ minWidth: avtarSize + "px",
1923
+ minHeight: avtarSize + "px"
1924
+ };
1925
+ return (
1926
+ // TODO transparent or white background later
1927
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_clsx13.default)(`rounded-full bg-primary`, className), style, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1928
+ import_image2.default,
1929
+ {
1930
+ className: "rounded-full border border-gray-200",
1931
+ style,
1932
+ src: avatarUrl,
1933
+ alt,
1934
+ width: avtarSize,
1935
+ height: avtarSize
1936
+ }
1937
+ ) })
1901
1938
  );
1902
1939
  };
1903
-
1904
- // src/components/layout-and-navigation/BreadCrumb.tsx
1905
- var import_link = __toESM(require("next/link"), 1);
1906
- var import_clsx13 = __toESM(require("clsx"), 1);
1907
- var import_jsx_runtime16 = require("react/jsx-runtime");
1908
- var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
1909
- const color = "text-description";
1910
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_clsx13.default)("row", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
1911
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1912
- import_link.default,
1940
+ var AvatarGroup = ({
1941
+ avatars,
1942
+ maxShownProfiles = 5,
1943
+ size = "tiny"
1944
+ }) => {
1945
+ const displayedProfiles = avatars.length < maxShownProfiles ? avatars : avatars.slice(0, maxShownProfiles);
1946
+ const diameter = avatarSizeMapping[size];
1947
+ const stackingOverlap = 0.5;
1948
+ const notDisplayedProfiles = avatars.length - maxShownProfiles;
1949
+ const avatarGroupWidth = diameter * (stackingOverlap * (displayedProfiles.length - 1) + 1);
1950
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "row relative", style: { height: diameter + "px" }, children: [
1951
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { width: avatarGroupWidth + "px" }, children: displayedProfiles.map((avatar, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1952
+ "div",
1913
1953
  {
1914
- href: crumb.link,
1915
- className: (0, import_clsx13.default)(linkClassName, { [`${color} hover:brightness-60`]: index !== crumbs.length - 1 }),
1916
- children: crumb.display
1954
+ className: "absolute",
1955
+ style: { left: index * diameter * stackingOverlap + "px", zIndex: maxShownProfiles - index },
1956
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Avatar, { avatarUrl: avatar.avatarUrl, alt: avatar.alt, size })
1957
+ },
1958
+ index
1959
+ )) }),
1960
+ notDisplayedProfiles > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1961
+ "div",
1962
+ {
1963
+ className: "truncate row items-center",
1964
+ style: { fontSize: diameter / 2 + "px", marginLeft: 1 + diameter / 16 + "px" },
1965
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
1966
+ "+ ",
1967
+ notDisplayedProfiles
1968
+ ] })
1917
1969
  }
1918
- ),
1919
- index !== crumbs.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: (0, import_clsx13.default)(`px-1`, color), children: "/" })
1920
- ] }, index)) });
1970
+ )
1971
+ ] });
1921
1972
  };
1922
1973
 
1923
- // src/components/layout-and-navigation/Carousel.tsx
1924
- var import_react9 = require("react");
1974
+ // src/components/icons-and-geometry/Circle.tsx
1925
1975
  var import_clsx14 = __toESM(require("clsx"), 1);
1926
- var import_lucide_react3 = require("lucide-react");
1927
-
1928
- // src/util/math.ts
1929
- var clamp = (value, min = 0, max = 1) => {
1930
- return Math.min(Math.max(value, min), max);
1931
- };
1932
-
1933
- // src/util/easeFunctions.ts
1934
- var EaseFunctions = class _EaseFunctions {
1935
- static cubicBezierGeneric(x1, y1, x2, y2) {
1936
- const cx = 3 * x1;
1937
- const bx = 3 * (x2 - x1) - cx;
1938
- const ax = 1 - cx - bx;
1939
- const cy = 3 * y1;
1940
- const by = 3 * (y2 - y1) - cy;
1941
- const ay = 1 - cy - by;
1942
- const x = (t) => ((ax * t + bx) * t + cx) * t;
1943
- const y = (t) => ((ay * t + by) * t + cy) * t;
1944
- return {
1945
- x,
1946
- y
1947
- };
1948
- }
1949
- static cubicBezier(x1, y1, x2, y2) {
1950
- const { y } = _EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2);
1951
- return (t) => {
1952
- t = clamp(t);
1953
- return y(t);
1954
- };
1955
- }
1956
- static easeInEaseOut(t) {
1957
- return _EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t);
1958
- }
1976
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1977
+ var Circle = ({
1978
+ radius = 20,
1979
+ className = "bg-primary",
1980
+ style,
1981
+ ...restProps
1982
+ }) => {
1983
+ const size = radius * 2;
1984
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1985
+ "div",
1986
+ {
1987
+ className: (0, import_clsx14.default)(`rounded-full`, className),
1988
+ style: {
1989
+ width: `${size}px`,
1990
+ height: `${size}px`,
1991
+ ...style
1992
+ },
1993
+ ...restProps
1994
+ }
1995
+ );
1959
1996
  };
1960
1997
 
1961
- // src/util/loopingArray.ts
1962
- var LoopingArrayCalculator = class _LoopingArrayCalculator {
1963
- constructor(length, isLooping = true, allowedOverScroll = 0.1) {
1964
- if (allowedOverScroll < 0 || length < 1) {
1965
- throw new Error("Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true");
1998
+ // src/components/icons-and-geometry/Ring.tsx
1999
+ var import_react10 = require("react");
2000
+ var import_clsx15 = __toESM(require("clsx"), 1);
2001
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2002
+ var Ring = ({
2003
+ innerSize = 20,
2004
+ width = 7,
2005
+ className = "outline-primary"
2006
+ }) => {
2007
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2008
+ "div",
2009
+ {
2010
+ className: (0, import_clsx15.default)(`bg-transparent rounded-full outline`, className),
2011
+ style: {
2012
+ width: `${innerSize}px`,
2013
+ height: `${innerSize}px`,
2014
+ outlineWidth: `${width}px`
2015
+ }
1966
2016
  }
1967
- this.length = length;
1968
- this.isLooping = isLooping;
1969
- this.allowedOverScroll = allowedOverScroll;
1970
- }
1971
- getCorrectedPosition(position) {
1972
- if (!this.isLooping) {
1973
- return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position));
1974
- }
1975
- if (position >= this.length) {
1976
- return position % this.length;
1977
- }
1978
- if (position < 0) {
1979
- return this.length - Math.abs(position) % this.length;
1980
- }
1981
- return position;
1982
- }
1983
- static withoutOffset(position) {
1984
- return position + _LoopingArrayCalculator.getOffset(position);
1985
- }
1986
- static getOffset(position) {
1987
- return Math.round(position) - position;
1988
- }
1989
- /**
1990
- * @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)
1991
- */
1992
- getDistanceDirectional(position, target, direction) {
1993
- if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {
1994
- throw new Error("Invalid parameters: position is out of bounds.");
1995
- }
1996
- const isForwardInvalid = direction === 1 && position > target;
1997
- const isBackwardInvalid = direction === -1 && target < position;
1998
- if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {
1999
- return Infinity;
2000
- }
2001
- if (direction === -1) {
2002
- return this.getDistanceDirectional(target, position, 1);
2003
- }
2004
- position = this.getCorrectedPosition(position);
2005
- target = this.getCorrectedPosition(target);
2006
- let distance = (target - position) * direction;
2007
- if (distance < 0) {
2008
- distance = this.length - Math.abs(position) % this.length + target;
2009
- }
2010
- return distance;
2011
- }
2012
- getDistanceForward(position, target) {
2013
- return this.getDistanceDirectional(position, target, 1);
2014
- }
2015
- getDistanceBackward(position, target) {
2016
- return this.getDistanceDirectional(position, target, -1);
2017
- }
2018
- getDistance(position, target) {
2019
- const forwardDistance = this.getDistanceForward(position, target);
2020
- const backwardDistance = this.getDistanceBackward(position, target);
2021
- return Math.min(forwardDistance, backwardDistance);
2022
- }
2023
- getBestDirection(position, target) {
2024
- const forwardDistance = this.getDistanceForward(position, target);
2025
- const backwardDistance = this.getDistanceBackward(position, target);
2026
- return forwardDistance < backwardDistance ? 1 : -1;
2027
- }
2017
+ );
2028
2018
  };
2029
-
2030
- // src/components/layout-and-navigation/Carousel.tsx
2031
- var import_jsx_runtime17 = require("react/jsx-runtime");
2032
- var Carousel = ({
2033
- children,
2034
- animationTime = 200,
2035
- isLooping = false,
2036
- isAutoLooping = false,
2037
- autoLoopingTimeOut = 5e3,
2038
- autoLoopAnimationTime = 500,
2039
- hintNext = false,
2040
- arrows = false,
2041
- dots = true,
2042
- overScrollThreshold = 0.1,
2043
- blurColor = "from-white",
2044
- className = "",
2045
- heightClassName = "h-[24rem]",
2046
- widthClassName = "w-[70%] desktop:w-1/2"
2019
+ var AnimatedRing = ({
2020
+ innerSize,
2021
+ width,
2022
+ className,
2023
+ fillAnimationDuration = 3,
2024
+ repeating = false,
2025
+ onAnimationFinished = noop,
2026
+ style
2047
2027
  }) => {
2048
- if (isAutoLooping && !isLooping) {
2049
- console.error("When isAutoLooping is true, isLooping should also be true");
2050
- isLooping = true;
2051
- }
2052
- const [{
2053
- currentPosition,
2054
- dragState,
2055
- animationState
2056
- }, setCarouselInformation] = (0, import_react9.useState)({
2057
- currentPosition: 0
2058
- });
2059
- const animationId = (0, import_react9.useRef)(void 0);
2060
- const timeOut = (0, import_react9.useRef)(void 0);
2061
- autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
2062
- const length = children.length;
2063
- const paddingItemCount = 3;
2064
- const util = (0, import_react9.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
2065
- const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
2066
- animationTime = Math.max(200, animationTime);
2067
- autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
2068
- const getStyleOffset = (index) => {
2069
- const baseOffset = -50 + (index - currentPosition) * 100;
2070
- return `${baseOffset}%`;
2071
- };
2072
- const animation = (0, import_react9.useCallback)((time) => {
2073
- let keepAnimating = true;
2074
- setCarouselInformation((state) => {
2075
- const {
2076
- animationState: animationState2,
2077
- dragState: dragState2
2078
- } = state;
2079
- if (animationState2 === void 0 || dragState2 !== void 0) {
2080
- keepAnimating = false;
2081
- return state;
2082
- }
2083
- if (!animationState2.startTime || !animationState2.lastUpdateTime) {
2084
- return {
2085
- ...state,
2086
- animationState: {
2087
- ...animationState2,
2088
- startTime: time,
2089
- lastUpdateTime: time
2090
- }
2091
- };
2092
- }
2093
- const useAnimationTime = animationState2.isAutoLooping ? autoLoopAnimationTime : animationTime;
2094
- const progress = clamp((time - animationState2.startTime) / useAnimationTime);
2095
- const easedProgress = EaseFunctions.easeInEaseOut(progress);
2096
- const distance = util.getDistanceDirectional(animationState2.startPosition, animationState2.targetPosition, animationState2.direction);
2097
- const newPosition = util.getCorrectedPosition(easedProgress * distance * animationState2.direction + animationState2.startPosition);
2098
- if (animationState2.targetPosition === newPosition || progress === 1) {
2099
- keepAnimating = false;
2100
- return {
2101
- currentPosition: LoopingArrayCalculator.withoutOffset(newPosition),
2102
- animationState: void 0
2103
- };
2028
+ const [currentWidth, setCurrentWidth] = (0, import_react10.useState)(0);
2029
+ const milliseconds = 1e3 * fillAnimationDuration;
2030
+ const animate = (0, import_react10.useCallback)((timestamp, startTime) => {
2031
+ const progress = Math.min((timestamp - startTime) / milliseconds, 1);
2032
+ const newWidth = Math.min(width * progress, width);
2033
+ setCurrentWidth(newWidth);
2034
+ if (progress < 1) {
2035
+ requestAnimationFrame((newTimestamp) => animate(newTimestamp, startTime));
2036
+ } else {
2037
+ onAnimationFinished();
2038
+ if (repeating) {
2039
+ setCurrentWidth(0);
2040
+ requestAnimationFrame((newTimestamp) => animate(newTimestamp, newTimestamp));
2104
2041
  }
2105
- return {
2106
- currentPosition: newPosition,
2107
- animationState: {
2108
- ...animationState2,
2109
- lastUpdateTime: time
2110
- }
2111
- };
2112
- });
2113
- if (keepAnimating) {
2114
- animationId.current = requestAnimationFrame((time1) => animation(time1));
2115
2042
  }
2116
- }, [animationTime, autoLoopAnimationTime, util]);
2117
- (0, import_react9.useEffect)(() => {
2118
- if (animationState) {
2119
- animationId.current = requestAnimationFrame(animation);
2043
+ }, [milliseconds, onAnimationFinished, repeating, width]);
2044
+ (0, import_react10.useEffect)(() => {
2045
+ if (currentWidth < width) {
2046
+ requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
2120
2047
  }
2121
- return () => {
2122
- if (animationId.current) {
2123
- cancelAnimationFrame(animationId.current);
2124
- animationId.current = 0;
2125
- }
2126
- };
2127
- }, [animationState]);
2128
- const startAutoLoop = () => setCarouselInformation((prevState) => ({
2129
- ...prevState,
2130
- dragState: prevState.dragState,
2131
- animationState: prevState.animationState || prevState.dragState ? prevState.animationState : {
2132
- startPosition: currentPosition,
2133
- targetPosition: (currentPosition + 1) % length,
2134
- direction: 1,
2135
- // always move forward
2136
- isAutoLooping: true
2048
+ }, []);
2049
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2050
+ "div",
2051
+ {
2052
+ className: "row items-center justify-center",
2053
+ style: {
2054
+ width: `${innerSize + 2 * width}px`,
2055
+ height: `${innerSize + 2 * width}px`,
2056
+ ...style
2057
+ },
2058
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2059
+ Ring,
2060
+ {
2061
+ innerSize,
2062
+ width: currentWidth,
2063
+ className
2064
+ }
2065
+ )
2137
2066
  }
2138
- }));
2139
- (0, import_react9.useEffect)(() => {
2140
- if (!animationId.current && !animationState && !dragState && !timeOut.current) {
2141
- if (autoLoopingTimeOut > 0) {
2142
- timeOut.current = setTimeout(() => {
2143
- startAutoLoop();
2144
- timeOut.current = void 0;
2145
- }, autoLoopingTimeOut);
2146
- } else {
2147
- startAutoLoop();
2067
+ );
2068
+ };
2069
+ var RingWave = ({
2070
+ startInnerSize = 20,
2071
+ endInnerSize = 30,
2072
+ width,
2073
+ className,
2074
+ fillAnimationDuration = 3,
2075
+ repeating = false,
2076
+ onAnimationFinished = noop,
2077
+ style
2078
+ }) => {
2079
+ const [currentInnerSize, setCurrentInnerSize] = (0, import_react10.useState)(startInnerSize);
2080
+ const distance = endInnerSize - startInnerSize;
2081
+ const milliseconds = 1e3 * fillAnimationDuration;
2082
+ const animate = (0, import_react10.useCallback)((timestamp, startTime) => {
2083
+ const progress = Math.min((timestamp - startTime) / milliseconds, 1);
2084
+ const newInnerSize = Math.min(
2085
+ startInnerSize + distance * progress,
2086
+ endInnerSize
2087
+ );
2088
+ setCurrentInnerSize(newInnerSize);
2089
+ if (progress < 1) {
2090
+ requestAnimationFrame((newTimestamp) => animate(newTimestamp, startTime));
2091
+ } else {
2092
+ onAnimationFinished();
2093
+ if (repeating) {
2094
+ setCurrentInnerSize(startInnerSize);
2095
+ requestAnimationFrame((newTimestamp) => animate(newTimestamp, newTimestamp));
2148
2096
  }
2149
2097
  }
2150
- }, [animationState, dragState, animationId.current, timeOut.current]);
2151
- const startAnimation = (targetPosition) => {
2152
- if (targetPosition === void 0) {
2153
- targetPosition = LoopingArrayCalculator.withoutOffset(currentPosition);
2154
- }
2155
- if (targetPosition === currentPosition) {
2156
- return;
2157
- }
2158
- const direction = util.getBestDirection(currentPosition, targetPosition);
2159
- clearTimeout(timeOut.current);
2160
- timeOut.current = void 0;
2161
- if (animationId.current) {
2162
- cancelAnimationFrame(animationId.current);
2163
- animationId.current = void 0;
2098
+ }, [distance, endInnerSize, milliseconds, onAnimationFinished, repeating, startInnerSize]);
2099
+ (0, import_react10.useEffect)(() => {
2100
+ if (currentInnerSize < endInnerSize) {
2101
+ requestAnimationFrame((timestamp) => animate(timestamp, timestamp));
2164
2102
  }
2165
- setCarouselInformation((prevState) => ({
2166
- ...prevState,
2167
- dragState: void 0,
2168
- animationState: {
2169
- targetPosition,
2170
- direction,
2171
- startPosition: currentPosition,
2172
- isAutoLooping: false
2103
+ }, []);
2104
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2105
+ "div",
2106
+ {
2107
+ className: "row items-center justify-center",
2108
+ style: {
2109
+ width: `${endInnerSize + 2 * width}px`,
2110
+ height: `${endInnerSize + 2 * width}px`,
2111
+ ...style
2173
2112
  },
2174
- timeOut: void 0
2175
- }));
2176
- };
2177
- const canGoLeft = () => {
2178
- return isLooping || currentPosition !== 0;
2179
- };
2180
- const canGoRight = () => {
2181
- return isLooping || currentPosition !== length - 1;
2182
- };
2183
- const left = () => {
2184
- if (canGoLeft()) {
2185
- startAnimation(currentPosition === 0 ? length - 1 : LoopingArrayCalculator.withoutOffset(currentPosition - 1));
2186
- }
2187
- };
2188
- const right = () => {
2189
- if (canGoRight()) {
2190
- startAnimation(LoopingArrayCalculator.withoutOffset((currentPosition + 1) % length));
2191
- }
2192
- };
2193
- let items = children.map((item, index) => ({
2194
- index,
2195
- item
2196
- }));
2197
- if (isLooping) {
2198
- const before = createLoopingListWithIndex(children, length - 1, paddingItemCount, false).reverse().map(([index, item]) => ({
2199
- index,
2200
- item
2201
- }));
2202
- const after = createLoopingListWithIndex(children, 0, paddingItemCount).map(([index, item]) => ({
2203
- index,
2204
- item
2205
- }));
2206
- items = [
2207
- ...before,
2208
- ...items,
2209
- ...after
2210
- ];
2211
- }
2212
- const onDragStart = (x) => setCarouselInformation((prevState) => ({
2213
- ...prevState,
2214
- dragState: {
2215
- lastX: x,
2216
- startX: x,
2217
- startTime: Date.now(),
2218
- startIndex: currentPosition
2219
- },
2220
- animationState: void 0
2221
- // cancel animation
2222
- }));
2223
- const onDrag = (x, width) => {
2224
- if (!dragState || x === 0) {
2225
- return;
2226
- }
2227
- const offsetUpdate = (dragState.lastX - x) / width;
2228
- const newPosition = util.getCorrectedPosition(currentPosition + offsetUpdate);
2229
- setCarouselInformation((prevState) => ({
2230
- ...prevState,
2231
- currentPosition: newPosition,
2232
- dragState: {
2233
- ...dragState,
2234
- lastX: x
2235
- }
2236
- }));
2237
- };
2238
- const onDragEnd = (x, width) => {
2239
- if (!dragState) {
2240
- return;
2241
- }
2242
- const distance = dragState.startX - x;
2243
- const relativeDistance = distance / width;
2244
- const duration = Date.now() - dragState.startTime;
2245
- const velocity = distance / (Date.now() - dragState.startTime);
2246
- const isSlide = Math.abs(velocity) > 2 || duration < 200 && (Math.abs(relativeDistance) > 0.2 || Math.abs(distance) > 50);
2247
- if (isSlide) {
2248
- if (distance > 0 && canGoRight()) {
2249
- right();
2250
- return;
2251
- } else if (distance < 0 && canGoLeft()) {
2252
- left();
2253
- return;
2254
- }
2113
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2114
+ Ring,
2115
+ {
2116
+ innerSize: currentInnerSize,
2117
+ width,
2118
+ className
2119
+ }
2120
+ )
2255
2121
  }
2256
- startAnimation();
2257
- };
2258
- const dragHandlers = {
2259
- draggable: true,
2260
- onDragStart: (event) => {
2261
- onDragStart(event.clientX);
2262
- event.dataTransfer.setDragImage(document.createElement("div"), 0, 0);
2263
- },
2264
- onDrag: (event) => onDrag(event.clientX, event.target.getBoundingClientRect().width),
2265
- onDragEnd: (event) => onDragEnd(event.clientX, event.target.getBoundingClientRect().width),
2266
- onTouchStart: (event) => onDragStart(event.touches[0].clientX),
2267
- onTouchMove: (event) => onDrag(event.touches[0].clientX, event.target.getBoundingClientRect().width),
2268
- onTouchEnd: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width),
2269
- onTouchCancel: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width)
2270
- };
2271
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "col items-center w-full gap-y-2", children: [
2272
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_clsx14.default)(`relative w-full overflow-hidden`, heightClassName, className), children: [
2273
- arrows && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2122
+ );
2123
+ };
2124
+ var RadialRings = ({
2125
+ circle1ClassName = "bg-primary/90 outline-primary/90",
2126
+ circle2ClassName = "bg-primary/60 outline-primary/60",
2127
+ circle3ClassName = "bg-primary/40 outline-primary/40",
2128
+ waveWidth = 10,
2129
+ waveBaseColor = "outline-white/20",
2130
+ sizeCircle1 = 100,
2131
+ sizeCircle2 = 200,
2132
+ sizeCircle3 = 300
2133
+ }) => {
2134
+ const [currentRing, setCurrentRing] = (0, import_react10.useState)(0);
2135
+ const size = sizeCircle3;
2136
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2137
+ "div",
2138
+ {
2139
+ className: "relative",
2140
+ style: {
2141
+ width: `${sizeCircle3}px`,
2142
+ height: `${sizeCircle3}px`
2143
+ },
2144
+ children: [
2274
2145
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2275
- "div",
2146
+ Circle,
2276
2147
  {
2277
- className: (0, import_clsx14.default)("absolute z-10 left-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoLeft() }),
2278
- onClick: () => left(),
2279
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react3.ChevronLeft, { size: 32 })
2148
+ radius: sizeCircle1 / 2,
2149
+ className: (0, import_clsx15.default)(circle1ClassName, `absolute z-[10] -translate-y-1/2 -translate-x-1/2`),
2150
+ style: {
2151
+ left: `${size / 2}px`,
2152
+ top: `${size / 2}px`
2153
+ }
2280
2154
  }
2281
2155
  ),
2282
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2283
- "div",
2156
+ currentRing === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2157
+ AnimatedRing,
2284
2158
  {
2285
- className: (0, import_clsx14.default)("absolute z-10 right-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoRight() }),
2286
- onClick: () => right(),
2287
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react3.ChevronRight, { size: 32 })
2159
+ innerSize: sizeCircle1,
2160
+ width: (sizeCircle2 - sizeCircle1) / 2,
2161
+ onAnimationFinished: () => currentRing === 0 ? setCurrentRing(1) : null,
2162
+ repeating: true,
2163
+ className: (0, import_clsx15.default)(
2164
+ circle2ClassName,
2165
+ { "opacity-5": currentRing !== 0 }
2166
+ ),
2167
+ style: {
2168
+ left: `${size / 2}px`,
2169
+ top: `${size / 2}px`,
2170
+ position: "absolute",
2171
+ translate: `-50% -50%`,
2172
+ zIndex: 9
2173
+ }
2288
2174
  }
2289
- )
2290
- ] }),
2291
- hintNext ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_clsx14.default)(`relative row h-full`, heightClassName), children: [
2292
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "relative row h-full w-full px-2 overflow-hidden", children: items.map(({
2293
- item,
2294
- index
2295
- }, listIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2296
- "div",
2175
+ ) : null,
2176
+ currentRing === 2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2177
+ RingWave,
2297
2178
  {
2298
- className: (0, import_clsx14.default)(`absolute left-[50%] h-full overflow-hidden`, widthClassName, { "!cursor-grabbing": !!dragState }),
2299
- style: { translate: getStyleOffset(listIndex - (isLooping ? paddingItemCount : 0)) },
2300
- ...dragHandlers,
2301
- onClick: () => startAnimation(index),
2302
- children: item
2303
- },
2304
- listIndex
2305
- )) }),
2179
+ startInnerSize: sizeCircle1 - waveWidth,
2180
+ endInnerSize: sizeCircle2,
2181
+ width: waveWidth,
2182
+ repeating: true,
2183
+ className: (0, import_clsx15.default)(waveBaseColor, `opacity-5`),
2184
+ style: {
2185
+ left: `${size / 2}px`,
2186
+ top: `${size / 2}px`,
2187
+ position: "absolute",
2188
+ translate: `-50% -50%`,
2189
+ zIndex: 9
2190
+ }
2191
+ }
2192
+ ) : null,
2306
2193
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2307
- "div",
2194
+ Circle,
2308
2195
  {
2309
- className: (0, import_clsx14.default)(`hidden pointer-events-none desktop:block absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
2196
+ radius: sizeCircle2 / 2,
2197
+ className: (0, import_clsx15.default)(
2198
+ circle2ClassName,
2199
+ { "opacity-20": currentRing < 1 },
2200
+ `absolute z-[8] -translate-y-1/2 -translate-x-1/2`
2201
+ ),
2202
+ style: {
2203
+ left: `${size / 2}px`,
2204
+ top: `${size / 2}px`
2205
+ }
2310
2206
  }
2311
2207
  ),
2208
+ currentRing === 1 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2209
+ AnimatedRing,
2210
+ {
2211
+ innerSize: sizeCircle2 - 1,
2212
+ width: (sizeCircle3 - sizeCircle2) / 2,
2213
+ onAnimationFinished: () => currentRing === 1 ? setCurrentRing(2) : null,
2214
+ repeating: true,
2215
+ className: (0, import_clsx15.default)(circle3ClassName),
2216
+ style: {
2217
+ left: `${size / 2}px`,
2218
+ top: `${size / 2}px`,
2219
+ position: "absolute",
2220
+ translate: `-50% -50%`,
2221
+ zIndex: 7
2222
+ }
2223
+ }
2224
+ ) : null,
2225
+ currentRing === 2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2226
+ RingWave,
2227
+ {
2228
+ startInnerSize: sizeCircle2,
2229
+ endInnerSize: sizeCircle3 - waveWidth,
2230
+ width: waveWidth,
2231
+ repeating: true,
2232
+ className: (0, import_clsx15.default)(waveBaseColor, `opacity-5`),
2233
+ style: {
2234
+ left: `${size / 2}px`,
2235
+ top: `${size / 2}px`,
2236
+ position: "absolute",
2237
+ translate: `-50% -50%`,
2238
+ zIndex: 7
2239
+ }
2240
+ }
2241
+ ) : null,
2312
2242
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2313
- "div",
2243
+ Circle,
2314
2244
  {
2315
- className: (0, import_clsx14.default)(`hidden pointer-events-none desktop:block absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
2245
+ radius: sizeCircle3 / 2,
2246
+ className: (0, import_clsx15.default)(
2247
+ circle3ClassName,
2248
+ { "opacity-20": currentRing < 2 },
2249
+ `absolute z-[6] -translate-y-1/2 -translate-x-1/2`
2250
+ ),
2251
+ style: {
2252
+ left: `${size / 2}px`,
2253
+ top: `${size / 2}px`
2254
+ }
2316
2255
  }
2317
2256
  )
2318
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_clsx14.default)("px-16 h-full", { "!cursor-grabbing": !!dragState }), ...dragHandlers, children: children[currentIndex] })
2319
- ] }),
2320
- dots && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2321
- "div",
2322
- {
2323
- className: "row items-center justify-center w-full my-2",
2324
- children: range(0, length - 1).map((index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2325
- "button",
2326
- {
2327
- className: (0, import_clsx14.default)("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem] hover:bg-primary hover:brightness-90 first:rounded-l-md last:rounded-r-md", {
2328
- "bg-gray-200": currentIndex !== index,
2329
- "bg-primary": currentIndex === index
2330
- }),
2331
- onClick: () => startAnimation(index)
2332
- },
2333
- index
2334
- ))
2335
- }
2336
- )
2337
- ] });
2257
+ ]
2258
+ }
2259
+ );
2338
2260
  };
2339
2261
 
2340
- // src/components/layout-and-navigation/Chip.tsx
2341
- var import_clsx15 = __toESM(require("clsx"), 1);
2262
+ // src/components/icons-and-geometry/Tag.tsx
2263
+ var import_image3 = __toESM(require("next/image"), 1);
2342
2264
  var import_jsx_runtime18 = require("react/jsx-runtime");
2343
- var Chip = ({
2344
- children,
2345
- trailingIcon,
2346
- color = "default",
2347
- variant = "normal",
2348
- className = "",
2349
- ...restProps
2265
+ var TagIcon = ({
2266
+ className,
2267
+ width = 16,
2268
+ height = 16,
2269
+ ...props
2350
2270
  }) => {
2351
- const colorMapping = {
2352
- default: "text-tag-default-text bg-tag-default-background",
2353
- dark: "text-tag-dark-text bg-tag-dark-background",
2354
- red: "text-tag-red-text bg-tag-red-background",
2355
- yellow: "text-tag-yellow-text bg-tag-yellow-background",
2356
- green: "text-tag-green-text bg-tag-green-background",
2357
- blue: "text-tag-blue-text bg-tag-blue-background",
2358
- pink: "text-tag-pink-text bg-tag-pink-background"
2359
- }[color];
2360
- const colorMappingIcon = {
2361
- default: "text-tag-default-icon",
2362
- dark: "text-tag-dark-icon",
2363
- red: "text-tag-red-icon",
2364
- yellow: "text-tag-yellow-icon",
2365
- green: "text-tag-green-icon",
2366
- blue: "text-tag-blue-icon",
2367
- pink: "text-tag-pink-icon"
2368
- }[color];
2369
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2370
- "div",
2271
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2272
+ import_image3.default,
2371
2273
  {
2372
- ...restProps,
2373
- className: (0, import_clsx15.default)(
2374
- `row w-fit px-2 py-1`,
2375
- colorMapping,
2376
- {
2377
- "rounded-md": variant === "normal",
2378
- "rounded-full": variant === "fullyRounded"
2379
- },
2380
- className
2381
- ),
2382
- children: [
2383
- children,
2384
- trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
2385
- ]
2274
+ ...props,
2275
+ width,
2276
+ height,
2277
+ alt: "",
2278
+ src: "https://cdn.helpwave.de/icons/label.png",
2279
+ className
2386
2280
  }
2387
2281
  );
2388
2282
  };
2389
- var ChipList = ({
2390
- list,
2391
- className = ""
2392
- }) => {
2393
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_clsx15.default)("flex flex-wrap gap-x-4 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2394
- Chip,
2395
- {
2396
- ...value,
2397
- color: value.color ?? "dark",
2398
- variant: value.variant ?? "normal",
2399
- children: value.children
2400
- },
2401
- index
2402
- )) });
2403
- };
2404
2283
 
2405
- // src/components/layout-and-navigation/DividerInserter.tsx
2284
+ // src/components/layout-and-navigation/BreadCrumb.tsx
2285
+ var import_link = __toESM(require("next/link"), 1);
2406
2286
  var import_clsx16 = __toESM(require("clsx"), 1);
2407
2287
  var import_jsx_runtime19 = require("react/jsx-runtime");
2408
- var DividerInserter = ({
2409
- children,
2410
- divider,
2411
- className,
2412
- ...restProps
2413
- }) => {
2414
- const nodes = [];
2415
- for (let index = 0; index < children.length; index++) {
2416
- const element = children[index];
2417
- if (element !== void 0) {
2418
- nodes.push(element);
2419
- if (index < children.length - 1) {
2420
- nodes.push(divider(index));
2288
+ var BreadCrumb = ({ crumbs, linkClassName, containerClassName }) => {
2289
+ const color = "text-description";
2290
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)("row", containerClassName), children: crumbs.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
2291
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2292
+ import_link.default,
2293
+ {
2294
+ href: crumb.link,
2295
+ className: (0, import_clsx16.default)(linkClassName, { [`${color} hover:brightness-60`]: index !== crumbs.length - 1 }),
2296
+ children: crumb.display
2421
2297
  }
2422
- }
2423
- }
2424
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx16.default)(className), ...restProps, children: nodes });
2298
+ ),
2299
+ index !== crumbs.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: (0, import_clsx16.default)(`px-1`, color), children: "/" })
2300
+ ] }, index)) });
2425
2301
  };
2426
2302
 
2427
- // src/components/layout-and-navigation/FAQSection.tsx
2303
+ // src/components/layout-and-navigation/Carousel.tsx
2304
+ var import_react11 = require("react");
2428
2305
  var import_clsx17 = __toESM(require("clsx"), 1);
2429
2306
  var import_lucide_react4 = require("lucide-react");
2430
2307
 
2431
- // src/components/layout-and-navigation/MarkdownInterpreter.tsx
2432
- var import_jsx_runtime20 = require("react/jsx-runtime");
2433
- var astNodeInserterType = ["helpwave", "newline"];
2434
- var ASTNodeInterpreter = ({
2435
- node,
2436
- isRoot = false,
2437
- className = ""
2438
- }) => {
2439
- switch (node.type) {
2440
- case "newline":
2441
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("br", {});
2442
- case "text":
2443
- return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className, children: node.text }) : node.text;
2444
- case "helpwave":
2445
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-bold font-space no-underline", children: "helpwave" });
2446
- case "none":
2447
- return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className, children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2448
- ASTNodeInterpreter,
2449
- {
2450
- node: value
2451
- },
2452
- index
2453
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2454
- case "bold":
2455
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("b", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2456
- case "italic":
2457
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("i", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2458
- case "underline":
2459
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("u", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2460
- case "font-space":
2461
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "font-space", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2462
- ASTNodeInterpreter,
2463
- {
2464
- node: value
2465
- },
2466
- index
2467
- )) });
2468
- case "primary":
2469
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-primary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2470
- ASTNodeInterpreter,
2471
- {
2472
- node: value
2473
- },
2474
- index
2475
- )) });
2476
- case "secondary":
2477
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-secondary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2478
- ASTNodeInterpreter,
2479
- {
2480
- node: value
2481
- },
2482
- index
2483
- )) });
2484
- case "warn":
2485
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-warning", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2486
- ASTNodeInterpreter,
2487
- {
2488
- node: value
2489
- },
2490
- index
2491
- )) });
2492
- case "positive":
2493
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-positive", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2494
- ASTNodeInterpreter,
2495
- {
2496
- node: value
2497
- },
2498
- index
2499
- )) });
2500
- case "negative":
2501
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-negative", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2502
- ASTNodeInterpreter,
2503
- {
2504
- node: value
2505
- },
2506
- index
2507
- )) });
2508
- default:
2509
- return null;
2308
+ // src/util/math.ts
2309
+ var clamp = (value, min = 0, max = 1) => {
2310
+ return Math.min(Math.max(value, min), max);
2311
+ };
2312
+
2313
+ // src/util/easeFunctions.ts
2314
+ var EaseFunctions = class _EaseFunctions {
2315
+ static cubicBezierGeneric(x1, y1, x2, y2) {
2316
+ const cx = 3 * x1;
2317
+ const bx = 3 * (x2 - x1) - cx;
2318
+ const ax = 1 - cx - bx;
2319
+ const cy = 3 * y1;
2320
+ const by = 3 * (y2 - y1) - cy;
2321
+ const ay = 1 - cy - by;
2322
+ const x = (t) => ((ax * t + bx) * t + cx) * t;
2323
+ const y = (t) => ((ay * t + by) * t + cy) * t;
2324
+ return {
2325
+ x,
2326
+ y
2327
+ };
2328
+ }
2329
+ static cubicBezier(x1, y1, x2, y2) {
2330
+ const { y } = _EaseFunctions.cubicBezierGeneric(x1, y1, x2, y2);
2331
+ return (t) => {
2332
+ t = clamp(t);
2333
+ return y(t);
2334
+ };
2335
+ }
2336
+ static easeInEaseOut(t) {
2337
+ return _EaseFunctions.cubicBezier(0.65, 0, 0.35, 1)(t);
2510
2338
  }
2511
2339
  };
2512
- var modifierIdentifierMapping = [
2513
- { id: "i", name: "italic" },
2514
- { id: "b", name: "bold" },
2515
- { id: "u", name: "underline" },
2516
- { id: "space", name: "font-space" },
2517
- { id: "primary", name: "primary" },
2518
- { id: "secondary", name: "secondary" },
2519
- { id: "warn", name: "warn" },
2520
- { id: "positive", name: "positive" },
2521
- { id: "negative", name: "negative" }
2522
- ];
2523
- var inserterIdentifierMapping = [
2524
- { id: "helpwave", name: "helpwave" },
2525
- { id: "newline", name: "newline" }
2526
- ];
2527
- var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
2528
- let start = text.indexOf(commandStart);
2529
- const children = [];
2530
- while (text !== "") {
2531
- if (start === -1) {
2532
- children.push({
2533
- type: "text",
2534
- text
2535
- });
2536
- break;
2537
- }
2538
- children.push(parseMarkdown(text.substring(0, start)));
2539
- text = text.substring(start);
2540
- if (text.length <= 1) {
2541
- children.push({
2542
- type: "text",
2543
- text
2544
- });
2545
- text = "";
2546
- continue;
2340
+
2341
+ // src/util/loopingArray.ts
2342
+ var LoopingArrayCalculator = class _LoopingArrayCalculator {
2343
+ constructor(length, isLooping = true, allowedOverScroll = 0.1) {
2344
+ if (allowedOverScroll < 0 || length < 1) {
2345
+ throw new Error("Invalid parameters: allowedOverScroll >= 0 and length >= 1 must be true");
2547
2346
  }
2548
- const simpleReplace = [commandStart, open, close];
2549
- if (simpleReplace.some((value) => text[1] === value)) {
2550
- children.push({
2551
- type: "text",
2552
- text: simpleReplace.find((value) => text[1] === value)
2553
- });
2554
- text = text.substring(2);
2555
- start = text.indexOf(commandStart);
2556
- continue;
2347
+ this.length = length;
2348
+ this.isLooping = isLooping;
2349
+ this.allowedOverScroll = allowedOverScroll;
2350
+ }
2351
+ getCorrectedPosition(position) {
2352
+ if (!this.isLooping) {
2353
+ return Math.max(-this.allowedOverScroll, Math.min(this.allowedOverScroll + this.length - 1, position));
2557
2354
  }
2558
- const inserter = inserterIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
2559
- if (inserter) {
2560
- children.push({
2561
- type: inserter.name
2562
- });
2563
- text = text.substring(inserter.id.length + 1);
2564
- start = text.indexOf(commandStart);
2565
- continue;
2355
+ if (position >= this.length) {
2356
+ return position % this.length;
2566
2357
  }
2567
- const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
2568
- if (modifier) {
2569
- if (text[modifier.id.length + 1] !== open) {
2570
- children.push({
2571
- type: "text",
2572
- text: text.substring(0, modifier.id.length + 1)
2573
- });
2574
- text = text.substring(modifier.id.length + 2);
2575
- start = text.indexOf(commandStart);
2576
- continue;
2577
- }
2578
- let closing = -1;
2579
- let index = modifier.id.length + 2;
2580
- let counter = 1;
2581
- let escaping = false;
2582
- while (index < text.length) {
2583
- if (text[index] === open && !escaping) {
2584
- counter++;
2585
- }
2586
- if (text[index] === close && !escaping) {
2587
- counter--;
2588
- if (counter === 0) {
2589
- closing = index;
2590
- break;
2591
- }
2592
- }
2593
- escaping = text[index] === commandStart;
2594
- index++;
2595
- }
2596
- if (closing !== -1) {
2597
- children.push({
2598
- type: modifier.name,
2599
- children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]
2600
- });
2601
- text = text.substring(closing + 1);
2602
- start = text.indexOf(commandStart);
2603
- continue;
2604
- }
2358
+ if (position < 0) {
2359
+ return this.length - Math.abs(position) % this.length;
2605
2360
  }
2606
- children.push({
2607
- type: "text",
2608
- text: text[0]
2609
- });
2610
- text = text.substring(1);
2611
- start = text.indexOf(commandStart);
2612
- }
2613
- return {
2614
- type: "none",
2615
- children
2616
- };
2617
- };
2618
- var optimizeTree = (node) => {
2619
- if (node.type === "text") {
2620
- return !node.text ? void 0 : node;
2621
- }
2622
- if (astNodeInserterType.some((value) => value === node.type)) {
2623
- return node;
2624
- }
2625
- const currentNode = node;
2626
- if (currentNode.children.length === 0) {
2627
- return void 0;
2361
+ return position;
2628
2362
  }
2629
- let children = [];
2630
- for (let i = 0; i < currentNode.children.length; i++) {
2631
- const child = optimizeTree(currentNode.children[i]);
2632
- if (!child) {
2633
- continue;
2634
- }
2635
- if (child.type === "none") {
2636
- children.push(...child.children);
2637
- } else {
2638
- children.push(child);
2639
- }
2363
+ static withoutOffset(position) {
2364
+ return position + _LoopingArrayCalculator.getOffset(position);
2640
2365
  }
2641
- currentNode.children = children;
2642
- children = [];
2643
- for (let i = 0; i < currentNode.children.length; i++) {
2644
- const child = currentNode.children[i];
2645
- if (child) {
2646
- if (child.type === "text" && children[children.length - 1]?.type === "text") {
2647
- children[children.length - 1].text += child.text;
2648
- } else {
2649
- children.push(child);
2650
- }
2651
- }
2366
+ static getOffset(position) {
2367
+ return Math.round(position) - position;
2652
2368
  }
2653
- currentNode.children = children;
2654
- return currentNode;
2655
- };
2656
- var MarkdownInterpreter = ({ text, className }) => {
2657
- const tree = parseMarkdown(text);
2658
- const optimizedTree = optimizeTree(tree);
2659
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ASTNodeInterpreter, { node: optimizedTree, isRoot: true, className });
2660
- };
2661
-
2662
- // src/components/layout-and-navigation/FAQSection.tsx
2663
- var import_jsx_runtime21 = require("react/jsx-runtime");
2664
- var FAQSection = ({
2665
- entries,
2666
- expandableClassName
2667
- }) => {
2668
- const chevronSize = 28;
2669
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2670
- Expandable,
2671
- {
2672
- ...restProps,
2673
- label: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { id, className: "textstyle-title-md", children: title }),
2674
- clickOnlyOnHeader: false,
2675
- icon: (expanded) => expanded ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.ChevronUp, { size: chevronSize, className: "text-primary", style: { minWidth: `${chevronSize}px` } }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.ChevronDown, { size: chevronSize, className: "text-primary" }),
2676
- className: (0, import_clsx17.default)("rounded-xl", expandableClassName),
2677
- headerClassName: "px-6 py-4",
2678
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "mt-2 px-6 pb-4", children: content.type === "markdown" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MarkdownInterpreter, { text: content.value }) : content.value })
2679
- },
2680
- id
2681
- )) });
2682
- };
2683
-
2684
- // src/components/layout-and-navigation/Overlay.tsx
2685
- var import_react11 = require("react");
2686
- var import_react_dom = __toESM(require("react-dom"), 1);
2687
- var import_clsx19 = __toESM(require("clsx"), 1);
2688
-
2689
- // src/hooks/useHoverState.ts
2690
- var import_react10 = require("react");
2691
- var defaultUseHoverStateProps = {
2692
- closingDelay: 200,
2693
- isDisabled: false
2694
- };
2695
- var useHoverState = (props = void 0) => {
2696
- const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
2697
- const [isHovered, setIsHovered] = (0, import_react10.useState)(false);
2698
- const [timer, setTimer] = (0, import_react10.useState)();
2699
- const onMouseEnter = () => {
2700
- if (isDisabled) {
2701
- return;
2369
+ /**
2370
+ * @return absolute distance forwards or Infinity when the target cannot be reached (only possible when not isLooping)
2371
+ */
2372
+ getDistanceDirectional(position, target, direction) {
2373
+ if (!this.isLooping && (position < -this.allowedOverScroll || position > this.allowedOverScroll + this.length - 1)) {
2374
+ throw new Error("Invalid parameters: position is out of bounds.");
2702
2375
  }
2703
- clearTimeout(timer);
2704
- setIsHovered(true);
2705
- };
2706
- const onMouseLeave = () => {
2707
- if (isDisabled) {
2708
- return;
2376
+ const isForwardInvalid = direction === 1 && position > target;
2377
+ const isBackwardInvalid = direction === -1 && target < position;
2378
+ if (!this.isLooping && (isForwardInvalid || isBackwardInvalid)) {
2379
+ return Infinity;
2709
2380
  }
2710
- setTimer(setTimeout(() => {
2711
- setIsHovered(false);
2712
- }, closingDelay));
2713
- };
2714
- (0, import_react10.useEffect)(() => {
2715
- if (timer) {
2716
- return () => {
2717
- clearTimeout(timer);
2718
- };
2381
+ if (direction === -1) {
2382
+ return this.getDistanceDirectional(target, position, 1);
2719
2383
  }
2720
- });
2721
- (0, import_react10.useEffect)(() => {
2722
- if (timer) {
2723
- clearTimeout(timer);
2384
+ position = this.getCorrectedPosition(position);
2385
+ target = this.getCorrectedPosition(target);
2386
+ let distance = (target - position) * direction;
2387
+ if (distance < 0) {
2388
+ distance = this.length - Math.abs(position) % this.length + target;
2724
2389
  }
2725
- }, [isDisabled]);
2726
- return {
2727
- isHovered,
2728
- setIsHovered,
2729
- handlers: { onMouseEnter, onMouseLeave }
2730
- };
2390
+ return distance;
2391
+ }
2392
+ getDistanceForward(position, target) {
2393
+ return this.getDistanceDirectional(position, target, 1);
2394
+ }
2395
+ getDistanceBackward(position, target) {
2396
+ return this.getDistanceDirectional(position, target, -1);
2397
+ }
2398
+ getDistance(position, target) {
2399
+ const forwardDistance = this.getDistanceForward(position, target);
2400
+ const backwardDistance = this.getDistanceBackward(position, target);
2401
+ return Math.min(forwardDistance, backwardDistance);
2402
+ }
2403
+ getBestDirection(position, target) {
2404
+ const forwardDistance = this.getDistanceForward(position, target);
2405
+ const backwardDistance = this.getDistanceBackward(position, target);
2406
+ return forwardDistance < backwardDistance ? 1 : -1;
2407
+ }
2731
2408
  };
2732
2409
 
2733
- // src/components/user-action/Tooltip.tsx
2734
- var import_clsx18 = require("clsx");
2735
- var import_jsx_runtime22 = require("react/jsx-runtime");
2736
- var Tooltip = ({
2737
- tooltip,
2410
+ // src/components/layout-and-navigation/Carousel.tsx
2411
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2412
+ var Carousel = ({
2738
2413
  children,
2739
- animationDelay = 650,
2740
- tooltipClassName = "",
2741
- containerClassName = "",
2742
- position = "bottom",
2743
- zIndex = 10
2414
+ animationTime = 200,
2415
+ isLooping = false,
2416
+ isAutoLooping = false,
2417
+ autoLoopingTimeOut = 5e3,
2418
+ autoLoopAnimationTime = 500,
2419
+ hintNext = false,
2420
+ arrows = false,
2421
+ dots = true,
2422
+ overScrollThreshold = 0.1,
2423
+ blurColor = "from-white",
2424
+ className = "",
2425
+ heightClassName = "h-[24rem]",
2426
+ widthClassName = "w-[70%] desktop:w-1/2"
2744
2427
  }) => {
2745
- const { isHovered, handlers } = useHoverState();
2746
- const positionClasses = {
2747
- top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,
2748
- bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,
2749
- left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,
2750
- right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`
2428
+ if (isAutoLooping && !isLooping) {
2429
+ console.error("When isAutoLooping is true, isLooping should also be true");
2430
+ isLooping = true;
2431
+ }
2432
+ const [{
2433
+ currentPosition,
2434
+ dragState,
2435
+ animationState
2436
+ }, setCarouselInformation] = (0, import_react11.useState)({
2437
+ currentPosition: 0
2438
+ });
2439
+ const animationId = (0, import_react11.useRef)(void 0);
2440
+ const timeOut = (0, import_react11.useRef)(void 0);
2441
+ autoLoopingTimeOut = Math.max(0, autoLoopingTimeOut);
2442
+ const length = children.length;
2443
+ const paddingItemCount = 3;
2444
+ const util = (0, import_react11.useMemo)(() => new LoopingArrayCalculator(length, isLooping, overScrollThreshold), [length, isLooping, overScrollThreshold]);
2445
+ const currentIndex = util.getCorrectedPosition(LoopingArrayCalculator.withoutOffset(currentPosition));
2446
+ animationTime = Math.max(200, animationTime);
2447
+ autoLoopAnimationTime = Math.max(200, autoLoopAnimationTime);
2448
+ const getStyleOffset = (index) => {
2449
+ const baseOffset = -50 + (index - currentPosition) * 100;
2450
+ return `${baseOffset}%`;
2751
2451
  };
2752
- const triangleSize = 6;
2753
- const triangleClasses = {
2754
- top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,
2755
- bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,
2756
- left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,
2757
- right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`
2758
- };
2759
- const triangleStyle = {
2760
- top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },
2761
- bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },
2762
- left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },
2763
- right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }
2764
- };
2765
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2766
- "div",
2767
- {
2768
- className: (0, import_clsx18.clsx)("relative inline-block", containerClassName),
2769
- ...handlers,
2770
- children: [
2771
- children,
2772
- isHovered && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2773
- "div",
2774
- {
2775
- className: (0, import_clsx18.clsx)(
2776
- `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
2777
- animate-tooltip-fade-in shadow-lg bg-tooltip-background`,
2778
- positionClasses[position],
2779
- tooltipClassName
2780
- ),
2781
- style: { zIndex, animationDelay: animationDelay + "ms" },
2782
- children: [
2783
- tooltip,
2784
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2785
- "div",
2786
- {
2787
- className: (0, import_clsx18.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
2788
- style: { ...triangleStyle[position], zIndex }
2789
- }
2790
- )
2791
- ]
2452
+ const animation = (0, import_react11.useCallback)((time) => {
2453
+ let keepAnimating = true;
2454
+ setCarouselInformation((state) => {
2455
+ const {
2456
+ animationState: animationState2,
2457
+ dragState: dragState2
2458
+ } = state;
2459
+ if (animationState2 === void 0 || dragState2 !== void 0) {
2460
+ keepAnimating = false;
2461
+ return state;
2462
+ }
2463
+ if (!animationState2.startTime || !animationState2.lastUpdateTime) {
2464
+ return {
2465
+ ...state,
2466
+ animationState: {
2467
+ ...animationState2,
2468
+ startTime: time,
2469
+ lastUpdateTime: time
2792
2470
  }
2793
- )
2794
- ]
2471
+ };
2472
+ }
2473
+ const useAnimationTime = animationState2.isAutoLooping ? autoLoopAnimationTime : animationTime;
2474
+ const progress = clamp((time - animationState2.startTime) / useAnimationTime);
2475
+ const easedProgress = EaseFunctions.easeInEaseOut(progress);
2476
+ const distance = util.getDistanceDirectional(animationState2.startPosition, animationState2.targetPosition, animationState2.direction);
2477
+ const newPosition = util.getCorrectedPosition(easedProgress * distance * animationState2.direction + animationState2.startPosition);
2478
+ if (animationState2.targetPosition === newPosition || progress === 1) {
2479
+ keepAnimating = false;
2480
+ return {
2481
+ currentPosition: LoopingArrayCalculator.withoutOffset(newPosition),
2482
+ animationState: void 0
2483
+ };
2484
+ }
2485
+ return {
2486
+ currentPosition: newPosition,
2487
+ animationState: {
2488
+ ...animationState2,
2489
+ lastUpdateTime: time
2490
+ }
2491
+ };
2492
+ });
2493
+ if (keepAnimating) {
2494
+ animationId.current = requestAnimationFrame((time1) => animation(time1));
2795
2495
  }
2796
- );
2797
- };
2798
-
2799
- // src/components/layout-and-navigation/Overlay.tsx
2800
- var import_lucide_react5 = require("lucide-react");
2801
- var import_jsx_runtime23 = require("react/jsx-runtime");
2802
- var Overlay = ({
2803
- children,
2804
- isOpen,
2805
- onBackgroundClick,
2806
- backgroundClassName
2807
- }) => {
2808
- const [root, setRoot] = (0, import_react11.useState)();
2496
+ }, [animationTime, autoLoopAnimationTime, util]);
2809
2497
  (0, import_react11.useEffect)(() => {
2810
- setRoot(document.body);
2811
- }, []);
2812
- if (!root || !isOpen) return null;
2813
- return import_react_dom.default.createPortal(
2814
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: (0, import_clsx19.default)("fixed inset-0 z-[9999]"), children: [
2815
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2816
- "div",
2817
- {
2818
- className: (0, import_clsx19.default)("fixed inset-0 h-screen w-screen bg-black/30", backgroundClassName),
2819
- onClick: onBackgroundClick
2820
- }
2821
- ),
2822
- children
2823
- ] }),
2824
- root
2825
- );
2826
- };
2827
- var overlayStack = [];
2828
- var defaultModalHeaderTranslation = {
2829
- en: {
2830
- close: "Close"
2831
- },
2832
- de: {
2833
- close: "Schlie\xDFen"
2834
- }
2835
- };
2836
- var ModalHeader = ({
2837
- overwriteTranslation,
2838
- onCloseClick,
2839
- title,
2840
- titleText = "",
2841
- description,
2842
- descriptionText = ""
2843
- }) => {
2844
- const translation = useTranslation(defaultModalHeaderTranslation, overwriteTranslation);
2845
- const hasTitleRow = !!title || !!titleText || !!onCloseClick;
2846
- const titleRow = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "row justify-between items-start gap-x-8", children: [
2847
- title ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2848
- "h2",
2849
- {
2850
- className: (0, import_clsx19.default)("textstyle-title-lg", {
2851
- "mb-1": description || descriptionText
2852
- }),
2853
- children: titleText
2498
+ if (animationState) {
2499
+ animationId.current = requestAnimationFrame(animation);
2500
+ }
2501
+ return () => {
2502
+ if (animationId.current) {
2503
+ cancelAnimationFrame(animationId.current);
2504
+ animationId.current = 0;
2854
2505
  }
2855
- ),
2856
- !!onCloseClick && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tooltip, { tooltip: translation.close, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconButton, { color: "neutral", size: "small", onClick: onCloseClick, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react5.X, { className: "w-full h-full" }) }) })
2857
- ] });
2858
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "col", children: [
2859
- hasTitleRow && titleRow,
2860
- description ?? (descriptionText && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "textstyle-description", children: descriptionText }))
2861
- ] });
2862
- };
2863
- var Modal = ({
2864
- children,
2865
- isOpen,
2866
- onClose,
2867
- className,
2868
- backgroundClassName,
2869
- headerProps
2870
- }) => {
2871
- const ref = (0, import_react11.useRef)(null);
2506
+ };
2507
+ }, [animationState]);
2508
+ const startAutoLoop = () => setCarouselInformation((prevState) => ({
2509
+ ...prevState,
2510
+ dragState: prevState.dragState,
2511
+ animationState: prevState.animationState || prevState.dragState ? prevState.animationState : {
2512
+ startPosition: currentPosition,
2513
+ targetPosition: (currentPosition + 1) % length,
2514
+ direction: 1,
2515
+ // always move forward
2516
+ isAutoLooping: true
2517
+ }
2518
+ }));
2872
2519
  (0, import_react11.useEffect)(() => {
2873
- if (!isOpen) return;
2874
- const modal = ref.current;
2875
- if (!modal) {
2876
- console.error("modal open, but no ref found");
2520
+ if (!animationId.current && !animationState && !dragState && !timeOut.current) {
2521
+ if (autoLoopingTimeOut > 0) {
2522
+ timeOut.current = setTimeout(() => {
2523
+ startAutoLoop();
2524
+ timeOut.current = void 0;
2525
+ }, autoLoopingTimeOut);
2526
+ } else {
2527
+ startAutoLoop();
2528
+ }
2529
+ }
2530
+ }, [animationState, dragState, animationId.current, timeOut.current]);
2531
+ const startAnimation = (targetPosition) => {
2532
+ if (targetPosition === void 0) {
2533
+ targetPosition = LoopingArrayCalculator.withoutOffset(currentPosition);
2534
+ }
2535
+ if (targetPosition === currentPosition) {
2877
2536
  return;
2878
2537
  }
2879
- overlayStack.push(modal);
2880
- const focusable = modal?.querySelectorAll(
2881
- 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
2882
- );
2883
- const first = focusable[0];
2884
- const last = focusable[focusable.length - 1];
2885
- const handleKeyDown = (e) => {
2886
- const isTopmost = overlayStack[overlayStack.length - 1] === modal;
2887
- if (!isTopmost) return;
2888
- if (e.key === "Escape") {
2889
- e.stopPropagation();
2890
- onClose();
2891
- } else if (e.key === "Tab") {
2892
- if (focusable.length === 0) return;
2893
- if (e.shiftKey && document.activeElement === first) {
2894
- e.preventDefault();
2895
- last.focus();
2896
- } else if (!e.shiftKey && document.activeElement === last) {
2897
- e.preventDefault();
2898
- first.focus();
2899
- }
2900
- }
2901
- };
2902
- modal.focus();
2903
- document.addEventListener("keydown", handleKeyDown);
2904
- return () => {
2905
- document.removeEventListener("keydown", handleKeyDown);
2906
- overlayStack = overlayStack.filter((m) => m !== modal);
2907
- };
2908
- }, [isOpen, onClose]);
2909
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2910
- Overlay,
2911
- {
2912
- isOpen,
2913
- onBackgroundClick: onClose,
2914
- backgroundClassName,
2915
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2916
- "div",
2917
- {
2918
- ref,
2919
- tabIndex: -1,
2920
- className: (0, import_clsx19.default)(
2921
- "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
2922
- className
2923
- ),
2924
- role: "dialog",
2925
- "aria-modal": true,
2926
- children: [
2927
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ModalHeader, { ...headerProps, onCloseClick: onClose }),
2928
- children
2929
- ]
2930
- }
2931
- )
2538
+ const direction = util.getBestDirection(currentPosition, targetPosition);
2539
+ clearTimeout(timeOut.current);
2540
+ timeOut.current = void 0;
2541
+ if (animationId.current) {
2542
+ cancelAnimationFrame(animationId.current);
2543
+ animationId.current = void 0;
2544
+ }
2545
+ setCarouselInformation((prevState) => ({
2546
+ ...prevState,
2547
+ dragState: void 0,
2548
+ animationState: {
2549
+ targetPosition,
2550
+ direction,
2551
+ startPosition: currentPosition,
2552
+ isAutoLooping: false
2553
+ },
2554
+ timeOut: void 0
2555
+ }));
2556
+ };
2557
+ const canGoLeft = () => {
2558
+ return isLooping || currentPosition !== 0;
2559
+ };
2560
+ const canGoRight = () => {
2561
+ return isLooping || currentPosition !== length - 1;
2562
+ };
2563
+ const left = () => {
2564
+ if (canGoLeft()) {
2565
+ startAnimation(currentPosition === 0 ? length - 1 : LoopingArrayCalculator.withoutOffset(currentPosition - 1));
2566
+ }
2567
+ };
2568
+ const right = () => {
2569
+ if (canGoRight()) {
2570
+ startAnimation(LoopingArrayCalculator.withoutOffset((currentPosition + 1) % length));
2571
+ }
2572
+ };
2573
+ let items = children.map((item, index) => ({
2574
+ index,
2575
+ item
2576
+ }));
2577
+ if (isLooping) {
2578
+ const before = createLoopingListWithIndex(children, length - 1, paddingItemCount, false).reverse().map(([index, item]) => ({
2579
+ index,
2580
+ item
2581
+ }));
2582
+ const after = createLoopingListWithIndex(children, 0, paddingItemCount).map(([index, item]) => ({
2583
+ index,
2584
+ item
2585
+ }));
2586
+ items = [
2587
+ ...before,
2588
+ ...items,
2589
+ ...after
2590
+ ];
2591
+ }
2592
+ const onDragStart = (x) => setCarouselInformation((prevState) => ({
2593
+ ...prevState,
2594
+ dragState: {
2595
+ lastX: x,
2596
+ startX: x,
2597
+ startTime: Date.now(),
2598
+ startIndex: currentPosition
2599
+ },
2600
+ animationState: void 0
2601
+ // cancel animation
2602
+ }));
2603
+ const onDrag = (x, width) => {
2604
+ if (!dragState || x === 0) {
2605
+ return;
2606
+ }
2607
+ const offsetUpdate = (dragState.lastX - x) / width;
2608
+ const newPosition = util.getCorrectedPosition(currentPosition + offsetUpdate);
2609
+ setCarouselInformation((prevState) => ({
2610
+ ...prevState,
2611
+ currentPosition: newPosition,
2612
+ dragState: {
2613
+ ...dragState,
2614
+ lastX: x
2615
+ }
2616
+ }));
2617
+ };
2618
+ const onDragEnd = (x, width) => {
2619
+ if (!dragState) {
2620
+ return;
2621
+ }
2622
+ const distance = dragState.startX - x;
2623
+ const relativeDistance = distance / width;
2624
+ const duration = Date.now() - dragState.startTime;
2625
+ const velocity = distance / (Date.now() - dragState.startTime);
2626
+ const isSlide = Math.abs(velocity) > 2 || duration < 200 && (Math.abs(relativeDistance) > 0.2 || Math.abs(distance) > 50);
2627
+ if (isSlide) {
2628
+ if (distance > 0 && canGoRight()) {
2629
+ right();
2630
+ return;
2631
+ } else if (distance < 0 && canGoLeft()) {
2632
+ left();
2633
+ return;
2634
+ }
2635
+ }
2636
+ startAnimation();
2637
+ };
2638
+ const dragHandlers = {
2639
+ draggable: true,
2640
+ onDragStart: (event) => {
2641
+ onDragStart(event.clientX);
2642
+ event.dataTransfer.setDragImage(document.createElement("div"), 0, 0);
2643
+ },
2644
+ onDrag: (event) => onDrag(event.clientX, event.target.getBoundingClientRect().width),
2645
+ onDragEnd: (event) => onDragEnd(event.clientX, event.target.getBoundingClientRect().width),
2646
+ onTouchStart: (event) => onDragStart(event.touches[0].clientX),
2647
+ onTouchMove: (event) => onDrag(event.touches[0].clientX, event.target.getBoundingClientRect().width),
2648
+ onTouchEnd: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width),
2649
+ onTouchCancel: (event) => onDragEnd(event.changedTouches[0].clientX, event.target.getBoundingClientRect().width)
2650
+ };
2651
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "col items-center w-full gap-y-2", children: [
2652
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_clsx17.default)(`relative w-full overflow-hidden`, heightClassName, className), children: [
2653
+ arrows && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
2654
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2655
+ "div",
2656
+ {
2657
+ className: (0, import_clsx17.default)("absolute z-10 left-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoLeft() }),
2658
+ onClick: () => left(),
2659
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react4.ChevronLeft, { size: 32 })
2660
+ }
2661
+ ),
2662
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2663
+ "div",
2664
+ {
2665
+ className: (0, import_clsx17.default)("absolute z-10 right-0 top-1/2 -translate-y-1/2 bg-gray-200 hover:bg-gray-300 rounded-lg cursor-pointer border-black border-2", { hidden: !canGoRight() }),
2666
+ onClick: () => right(),
2667
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react4.ChevronRight, { size: 32 })
2668
+ }
2669
+ )
2670
+ ] }),
2671
+ hintNext ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_clsx17.default)(`relative row h-full`, heightClassName), children: [
2672
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative row h-full w-full px-2 overflow-hidden", children: items.map(({
2673
+ item,
2674
+ index
2675
+ }, listIndex) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2676
+ "div",
2677
+ {
2678
+ className: (0, import_clsx17.default)(`absolute left-[50%] h-full overflow-hidden`, widthClassName, { "!cursor-grabbing": !!dragState }),
2679
+ style: { translate: getStyleOffset(listIndex - (isLooping ? paddingItemCount : 0)) },
2680
+ ...dragHandlers,
2681
+ onClick: () => startAnimation(index),
2682
+ children: item
2683
+ },
2684
+ listIndex
2685
+ )) }),
2686
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2687
+ "div",
2688
+ {
2689
+ className: (0, import_clsx17.default)(`hidden pointer-events-none desktop:block absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
2690
+ }
2691
+ ),
2692
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2693
+ "div",
2694
+ {
2695
+ className: (0, import_clsx17.default)(`hidden pointer-events-none desktop:block absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
2696
+ }
2697
+ )
2698
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: (0, import_clsx17.default)("px-16 h-full", { "!cursor-grabbing": !!dragState }), ...dragHandlers, children: children[currentIndex] })
2699
+ ] }),
2700
+ dots && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2701
+ "div",
2702
+ {
2703
+ className: "row items-center justify-center w-full my-2",
2704
+ children: range(0, length - 1).map((index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2705
+ "button",
2706
+ {
2707
+ className: (0, import_clsx17.default)("w-[2rem] min-w-[2rem] h-[0.75rem] min-h-[0.75rem] hover:bg-primary hover:brightness-90 first:rounded-l-md last:rounded-r-md", {
2708
+ "bg-gray-200": currentIndex !== index,
2709
+ "bg-primary": currentIndex === index
2710
+ }),
2711
+ onClick: () => startAnimation(index)
2712
+ },
2713
+ index
2714
+ ))
2715
+ }
2716
+ )
2717
+ ] });
2718
+ };
2719
+
2720
+ // src/components/layout-and-navigation/Chip.tsx
2721
+ var import_clsx18 = __toESM(require("clsx"), 1);
2722
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2723
+ var Chip = ({
2724
+ children,
2725
+ trailingIcon,
2726
+ color = "default",
2727
+ variant = "normal",
2728
+ className = "",
2729
+ ...restProps
2730
+ }) => {
2731
+ const colorMapping = {
2732
+ default: "text-tag-default-text bg-tag-default-background",
2733
+ dark: "text-tag-dark-text bg-tag-dark-background",
2734
+ red: "text-tag-red-text bg-tag-red-background",
2735
+ yellow: "text-tag-yellow-text bg-tag-yellow-background",
2736
+ green: "text-tag-green-text bg-tag-green-background",
2737
+ blue: "text-tag-blue-text bg-tag-blue-background",
2738
+ pink: "text-tag-pink-text bg-tag-pink-background"
2739
+ }[color];
2740
+ const colorMappingIcon = {
2741
+ default: "text-tag-default-icon",
2742
+ dark: "text-tag-dark-icon",
2743
+ red: "text-tag-red-icon",
2744
+ yellow: "text-tag-yellow-icon",
2745
+ green: "text-tag-green-icon",
2746
+ blue: "text-tag-blue-icon",
2747
+ pink: "text-tag-pink-icon"
2748
+ }[color];
2749
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2750
+ "div",
2751
+ {
2752
+ ...restProps,
2753
+ className: (0, import_clsx18.default)(
2754
+ `row w-fit px-2 py-1`,
2755
+ colorMapping,
2756
+ {
2757
+ "rounded-md": variant === "normal",
2758
+ "rounded-full": variant === "fullyRounded"
2759
+ },
2760
+ className
2761
+ ),
2762
+ children: [
2763
+ children,
2764
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
2765
+ ]
2766
+ }
2767
+ );
2768
+ };
2769
+ var ChipList = ({
2770
+ list,
2771
+ className = ""
2772
+ }) => {
2773
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: (0, import_clsx18.default)("flex flex-wrap gap-x-4 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2774
+ Chip,
2775
+ {
2776
+ ...value,
2777
+ color: value.color ?? "dark",
2778
+ variant: value.variant ?? "normal",
2779
+ children: value.children
2780
+ },
2781
+ index
2782
+ )) });
2783
+ };
2784
+
2785
+ // src/components/layout-and-navigation/DividerInserter.tsx
2786
+ var import_clsx19 = __toESM(require("clsx"), 1);
2787
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2788
+ var DividerInserter = ({
2789
+ children,
2790
+ divider,
2791
+ className,
2792
+ ...restProps
2793
+ }) => {
2794
+ const nodes = [];
2795
+ for (let index = 0; index < children.length; index++) {
2796
+ const element = children[index];
2797
+ if (element !== void 0) {
2798
+ nodes.push(element);
2799
+ if (index < children.length - 1) {
2800
+ nodes.push(divider(index));
2801
+ }
2802
+ }
2803
+ }
2804
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: (0, import_clsx19.default)(className), ...restProps, children: nodes });
2805
+ };
2806
+
2807
+ // src/components/layout-and-navigation/FAQSection.tsx
2808
+ var import_clsx20 = __toESM(require("clsx"), 1);
2809
+ var import_lucide_react5 = require("lucide-react");
2810
+
2811
+ // src/components/layout-and-navigation/MarkdownInterpreter.tsx
2812
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2813
+ var astNodeInserterType = ["helpwave", "newline"];
2814
+ var ASTNodeInterpreter = ({
2815
+ node,
2816
+ isRoot = false,
2817
+ className = ""
2818
+ }) => {
2819
+ switch (node.type) {
2820
+ case "newline":
2821
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("br", {});
2822
+ case "text":
2823
+ return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className, children: node.text }) : node.text;
2824
+ case "helpwave":
2825
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-bold font-space no-underline", children: "helpwave" });
2826
+ case "none":
2827
+ return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className, children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2828
+ ASTNodeInterpreter,
2829
+ {
2830
+ node: value
2831
+ },
2832
+ index
2833
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2834
+ case "bold":
2835
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("b", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2836
+ case "italic":
2837
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("i", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2838
+ case "underline":
2839
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("u", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ASTNodeInterpreter, { node: value }, index)) });
2840
+ case "font-space":
2841
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "font-space", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2842
+ ASTNodeInterpreter,
2843
+ {
2844
+ node: value
2845
+ },
2846
+ index
2847
+ )) });
2848
+ case "primary":
2849
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-primary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2850
+ ASTNodeInterpreter,
2851
+ {
2852
+ node: value
2853
+ },
2854
+ index
2855
+ )) });
2856
+ case "secondary":
2857
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-secondary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2858
+ ASTNodeInterpreter,
2859
+ {
2860
+ node: value
2861
+ },
2862
+ index
2863
+ )) });
2864
+ case "warn":
2865
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-warning", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2866
+ ASTNodeInterpreter,
2867
+ {
2868
+ node: value
2869
+ },
2870
+ index
2871
+ )) });
2872
+ case "positive":
2873
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-positive", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2874
+ ASTNodeInterpreter,
2875
+ {
2876
+ node: value
2877
+ },
2878
+ index
2879
+ )) });
2880
+ case "negative":
2881
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-negative", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2882
+ ASTNodeInterpreter,
2883
+ {
2884
+ node: value
2885
+ },
2886
+ index
2887
+ )) });
2888
+ default:
2889
+ return null;
2890
+ }
2891
+ };
2892
+ var modifierIdentifierMapping = [
2893
+ { id: "i", name: "italic" },
2894
+ { id: "b", name: "bold" },
2895
+ { id: "u", name: "underline" },
2896
+ { id: "space", name: "font-space" },
2897
+ { id: "primary", name: "primary" },
2898
+ { id: "secondary", name: "secondary" },
2899
+ { id: "warn", name: "warn" },
2900
+ { id: "positive", name: "positive" },
2901
+ { id: "negative", name: "negative" }
2902
+ ];
2903
+ var inserterIdentifierMapping = [
2904
+ { id: "helpwave", name: "helpwave" },
2905
+ { id: "newline", name: "newline" }
2906
+ ];
2907
+ var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
2908
+ let start = text.indexOf(commandStart);
2909
+ const children = [];
2910
+ while (text !== "") {
2911
+ if (start === -1) {
2912
+ children.push({
2913
+ type: "text",
2914
+ text
2915
+ });
2916
+ break;
2917
+ }
2918
+ children.push(parseMarkdown(text.substring(0, start)));
2919
+ text = text.substring(start);
2920
+ if (text.length <= 1) {
2921
+ children.push({
2922
+ type: "text",
2923
+ text
2924
+ });
2925
+ text = "";
2926
+ continue;
2927
+ }
2928
+ const simpleReplace = [commandStart, open, close];
2929
+ if (simpleReplace.some((value) => text[1] === value)) {
2930
+ children.push({
2931
+ type: "text",
2932
+ text: simpleReplace.find((value) => text[1] === value)
2933
+ });
2934
+ text = text.substring(2);
2935
+ start = text.indexOf(commandStart);
2936
+ continue;
2937
+ }
2938
+ const inserter = inserterIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
2939
+ if (inserter) {
2940
+ children.push({
2941
+ type: inserter.name
2942
+ });
2943
+ text = text.substring(inserter.id.length + 1);
2944
+ start = text.indexOf(commandStart);
2945
+ continue;
2946
+ }
2947
+ const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
2948
+ if (modifier) {
2949
+ if (text[modifier.id.length + 1] !== open) {
2950
+ children.push({
2951
+ type: "text",
2952
+ text: text.substring(0, modifier.id.length + 1)
2953
+ });
2954
+ text = text.substring(modifier.id.length + 2);
2955
+ start = text.indexOf(commandStart);
2956
+ continue;
2957
+ }
2958
+ let closing = -1;
2959
+ let index = modifier.id.length + 2;
2960
+ let counter = 1;
2961
+ let escaping = false;
2962
+ while (index < text.length) {
2963
+ if (text[index] === open && !escaping) {
2964
+ counter++;
2965
+ }
2966
+ if (text[index] === close && !escaping) {
2967
+ counter--;
2968
+ if (counter === 0) {
2969
+ closing = index;
2970
+ break;
2971
+ }
2972
+ }
2973
+ escaping = text[index] === commandStart;
2974
+ index++;
2975
+ }
2976
+ if (closing !== -1) {
2977
+ children.push({
2978
+ type: modifier.name,
2979
+ children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]
2980
+ });
2981
+ text = text.substring(closing + 1);
2982
+ start = text.indexOf(commandStart);
2983
+ continue;
2984
+ }
2985
+ }
2986
+ children.push({
2987
+ type: "text",
2988
+ text: text[0]
2989
+ });
2990
+ text = text.substring(1);
2991
+ start = text.indexOf(commandStart);
2992
+ }
2993
+ return {
2994
+ type: "none",
2995
+ children
2996
+ };
2997
+ };
2998
+ var optimizeTree = (node) => {
2999
+ if (node.type === "text") {
3000
+ return !node.text ? void 0 : node;
3001
+ }
3002
+ if (astNodeInserterType.some((value) => value === node.type)) {
3003
+ return node;
3004
+ }
3005
+ const currentNode = node;
3006
+ if (currentNode.children.length === 0) {
3007
+ return void 0;
3008
+ }
3009
+ let children = [];
3010
+ for (let i = 0; i < currentNode.children.length; i++) {
3011
+ const child = optimizeTree(currentNode.children[i]);
3012
+ if (!child) {
3013
+ continue;
3014
+ }
3015
+ if (child.type === "none") {
3016
+ children.push(...child.children);
3017
+ } else {
3018
+ children.push(child);
2932
3019
  }
2933
- );
3020
+ }
3021
+ currentNode.children = children;
3022
+ children = [];
3023
+ for (let i = 0; i < currentNode.children.length; i++) {
3024
+ const child = currentNode.children[i];
3025
+ if (child) {
3026
+ if (child.type === "text" && children[children.length - 1]?.type === "text") {
3027
+ children[children.length - 1].text += child.text;
3028
+ } else {
3029
+ children.push(child);
3030
+ }
3031
+ }
3032
+ }
3033
+ currentNode.children = children;
3034
+ return currentNode;
2934
3035
  };
2935
- var Dialog = ({
2936
- children,
2937
- isOpen,
2938
- className,
2939
- backgroundClassName,
2940
- title,
2941
- titleText
3036
+ var MarkdownInterpreter = ({ text, className }) => {
3037
+ const tree = parseMarkdown(text);
3038
+ const optimizedTree = optimizeTree(tree);
3039
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ASTNodeInterpreter, { node: optimizedTree, isRoot: true, className });
3040
+ };
3041
+
3042
+ // src/components/layout-and-navigation/FAQSection.tsx
3043
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3044
+ var FAQSection = ({
3045
+ entries,
3046
+ expandableClassName
2942
3047
  }) => {
2943
- const ref = (0, import_react11.useRef)(null);
2944
- (0, import_react11.useEffect)(() => {
2945
- if (!isOpen) return;
2946
- const dialog = ref.current;
2947
- if (!dialog) {
2948
- console.error("dialog open, but no ref found");
2949
- return;
2950
- }
2951
- overlayStack.push(dialog);
2952
- const focusable = dialog?.querySelectorAll(
2953
- 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])'
2954
- );
2955
- const first = focusable[0];
2956
- const last = focusable[focusable.length - 1];
2957
- const handleKeyDown = (e) => {
2958
- const isTopmost = overlayStack[overlayStack.length - 1] === dialog;
2959
- if (!isTopmost) return;
2960
- if (e.key === "Escape") {
2961
- e.stopPropagation();
2962
- } else if (e.key === "Tab") {
2963
- if (focusable.length === 0) return;
2964
- if (e.shiftKey && document.activeElement === first) {
2965
- e.preventDefault();
2966
- last.focus();
2967
- } else if (!e.shiftKey && document.activeElement === last) {
2968
- e.preventDefault();
2969
- first.focus();
2970
- }
2971
- }
2972
- };
2973
- dialog.focus();
2974
- document.addEventListener("keydown", handleKeyDown);
2975
- return () => {
2976
- document.removeEventListener("keydown", handleKeyDown);
2977
- overlayStack = overlayStack.filter((m) => m !== dialog);
2978
- };
2979
- }, [isOpen]);
2980
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2981
- Overlay,
3048
+ const chevronSize = 28;
3049
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "col gap-y-4", children: entries.map(({ id, title, content, ...restProps }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3050
+ Expandable,
2982
3051
  {
2983
- isOpen,
2984
- backgroundClassName,
2985
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2986
- "div",
2987
- {
2988
- ref,
2989
- tabIndex: -1,
2990
- className: (0, import_clsx19.default)(
2991
- "fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 col p-4 bg-overlay-background text-overlay-text rounded-xl shadow-xl",
2992
- className
2993
- ),
2994
- role: "dialog",
2995
- "aria-modal": true,
2996
- children: [
2997
- title ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2998
- "h2",
2999
- {
3000
- className: (0, import_clsx19.default)("textstyle-title-lg"),
3001
- children: titleText
3002
- }
3003
- ),
3004
- children
3005
- ]
3006
- }
3007
- )
3008
- }
3009
- );
3052
+ ...restProps,
3053
+ label: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { id, className: "textstyle-title-md", children: title }),
3054
+ clickOnlyOnHeader: false,
3055
+ icon: (expanded) => expanded ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.ChevronUp, { size: chevronSize, className: "text-primary", style: { minWidth: `${chevronSize}px` } }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react5.ChevronDown, { size: chevronSize, className: "text-primary" }),
3056
+ className: (0, import_clsx20.default)("rounded-xl", expandableClassName),
3057
+ headerClassName: "px-6 py-4",
3058
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mt-2 px-6 pb-4", children: content.type === "markdown" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MarkdownInterpreter, { text: content.value }) : content.value })
3059
+ },
3060
+ id
3061
+ )) });
3010
3062
  };
3011
3063
 
3012
3064
  // src/components/layout-and-navigation/Pagination.tsx
3013
3065
  var import_lucide_react6 = require("lucide-react");
3014
- var import_clsx20 = __toESM(require("clsx"), 1);
3015
- var import_jsx_runtime24 = require("react/jsx-runtime");
3066
+ var import_clsx21 = __toESM(require("clsx"), 1);
3067
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3016
3068
  var defaultPaginationTranslations = {
3017
3069
  en: {
3018
3070
  of: "of"
@@ -3034,23 +3086,23 @@ var Pagination = ({
3034
3086
  const noPages = numberOfPages === 0;
3035
3087
  const onFirstPage = page === 0 && !noPages;
3036
3088
  const onLastPage = page === numberOfPages - 1;
3037
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: (0, import_clsx20.default)("row", { "opacity-30": noPages }), children: [
3038
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => changePage(0), disabled: onFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronFirst, { className: (0, import_clsx20.default)({ "opacity-30": onFirstPage }) }) }),
3039
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => changePage(page - 1), disabled: onFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronLeft, { className: (0, import_clsx20.default)({ "opacity-30": onFirstPage }) }) }),
3040
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "min-w-[80px] justify-center mx-2", children: [
3041
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "select-none text-right flex-1", children: noPages ? 0 : page + 1 }),
3042
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "select-none mx-2", children: translation.of }),
3043
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "select-none text-left flex-1", children: numberOfPages })
3089
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_clsx21.default)("row", { "opacity-30": noPages }), children: [
3090
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { onClick: () => changePage(0), disabled: onFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronFirst, { className: (0, import_clsx21.default)({ "opacity-30": onFirstPage }) }) }),
3091
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { onClick: () => changePage(page - 1), disabled: onFirstPage, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronLeft, { className: (0, import_clsx21.default)({ "opacity-30": onFirstPage }) }) }),
3092
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-[80px] justify-center mx-2", children: [
3093
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "select-none text-right flex-1", children: noPages ? 0 : page + 1 }),
3094
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "select-none mx-2", children: translation.of }),
3095
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "select-none text-left flex-1", children: numberOfPages })
3044
3096
  ] }),
3045
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => changePage(page + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronRight, { className: (0, import_clsx20.default)({ "opacity-30": onLastPage }) }) }),
3046
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("button", { onClick: () => changePage(numberOfPages - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react6.ChevronLast, { className: (0, import_clsx20.default)({ "opacity-30": onLastPage }) }) })
3097
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { onClick: () => changePage(page + 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronRight, { className: (0, import_clsx21.default)({ "opacity-30": onLastPage }) }) }),
3098
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { onClick: () => changePage(numberOfPages - 1), disabled: onLastPage || noPages, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronLast, { className: (0, import_clsx21.default)({ "opacity-30": onLastPage }) }) })
3047
3099
  ] });
3048
3100
  };
3049
3101
 
3050
3102
  // src/components/layout-and-navigation/SearchableList.tsx
3051
3103
  var import_react14 = require("react");
3052
3104
  var import_lucide_react7 = require("lucide-react");
3053
- var import_clsx23 = __toESM(require("clsx"), 1);
3105
+ var import_clsx24 = __toESM(require("clsx"), 1);
3054
3106
 
3055
3107
  // src/util/simpleSearch.ts
3056
3108
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -3074,7 +3126,7 @@ var SimpleSearch = (search, objects) => {
3074
3126
 
3075
3127
  // src/components/user-action/Input.tsx
3076
3128
  var import_react13 = require("react");
3077
- var import_clsx22 = __toESM(require("clsx"), 1);
3129
+ var import_clsx23 = __toESM(require("clsx"), 1);
3078
3130
 
3079
3131
  // src/hooks/useSaveDelay.ts
3080
3132
  var import_react12 = require("react");
@@ -3117,8 +3169,8 @@ function useSaveDelay(setNotificationStatus, delay) {
3117
3169
  }
3118
3170
 
3119
3171
  // src/components/user-action/Label.tsx
3120
- var import_clsx21 = __toESM(require("clsx"), 1);
3121
- var import_jsx_runtime25 = require("react/jsx-runtime");
3172
+ var import_clsx22 = __toESM(require("clsx"), 1);
3173
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3122
3174
  var styleMapping = {
3123
3175
  labelSmall: "textstyle-label-sm",
3124
3176
  labelMedium: "textstyle-label-md",
@@ -3131,11 +3183,11 @@ var Label = ({
3131
3183
  className,
3132
3184
  ...props
3133
3185
  }) => {
3134
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { ...props, className: (0, import_clsx21.default)(styleMapping[labelType], className), children: children ? children : name });
3186
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { ...props, className: (0, import_clsx22.default)(styleMapping[labelType], className), children: children ? children : name });
3135
3187
  };
3136
3188
 
3137
3189
  // src/components/user-action/Input.tsx
3138
- var import_jsx_runtime26 = require("react/jsx-runtime");
3190
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3139
3191
  var Input = ({
3140
3192
  id,
3141
3193
  type = "text",
@@ -3161,9 +3213,9 @@ var Input = ({
3161
3213
  ref.current?.focus();
3162
3214
  }
3163
3215
  }, [autoFocus]);
3164
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_clsx22.default)({ "w-full": expanded }, containerClassName), children: [
3165
- label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx22.default)("mb-1", label.className) }),
3166
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3216
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)({ "w-full": expanded }, containerClassName), children: [
3217
+ label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx23.default)("mb-1", label.className) }),
3218
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3167
3219
  "input",
3168
3220
  {
3169
3221
  ref,
@@ -3202,7 +3254,7 @@ var InputUncontrolled = ({
3202
3254
  ...props
3203
3255
  }) => {
3204
3256
  const [value, setValue] = (0, import_react13.useState)(defaultValue);
3205
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3257
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3206
3258
  Input,
3207
3259
  {
3208
3260
  ...props,
@@ -3225,13 +3277,13 @@ var FormInput = (0, import_react13.forwardRef)(function FormInput2({
3225
3277
  required,
3226
3278
  ...restProps
3227
3279
  }, ref) {
3228
- const input = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3280
+ const input = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3229
3281
  "input",
3230
3282
  {
3231
3283
  ref,
3232
3284
  id,
3233
3285
  ...restProps,
3234
- className: (0, import_clsx22.default)(
3286
+ className: (0, import_clsx23.default)(
3235
3287
  {
3236
3288
  "focus:border-primary focus:ring-primary": !errorText,
3237
3289
  "focus:border-negative focus:ring-negative text-negative": !!errorText
@@ -3240,18 +3292,18 @@ var FormInput = (0, import_react13.forwardRef)(function FormInput2({
3240
3292
  )
3241
3293
  }
3242
3294
  );
3243
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_clsx22.default)("flex flex-col gap-y-1", containerClassName), children: [
3244
- labelText && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { htmlFor: id, className: (0, import_clsx22.default)("textstyle-label-md", labelClassName), children: [
3295
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)("flex flex-col gap-y-1", containerClassName), children: [
3296
+ labelText && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { htmlFor: id, className: (0, import_clsx23.default)("textstyle-label-md", labelClassName), children: [
3245
3297
  labelText,
3246
- required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-primary font-bold", children: "*" })
3298
+ required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-primary font-bold", children: "*" })
3247
3299
  ] }),
3248
3300
  input,
3249
- errorText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("label", { htmlFor: id, className: (0, import_clsx22.default)("text-negative", errorClassName), children: errorText })
3301
+ errorText && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: id, className: (0, import_clsx23.default)("text-negative", errorClassName), children: errorText })
3250
3302
  ] });
3251
3303
  });
3252
3304
 
3253
3305
  // src/components/layout-and-navigation/SearchableList.tsx
3254
- var import_jsx_runtime27 = require("react/jsx-runtime");
3306
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3255
3307
  var defaultSearchableListTranslation = {
3256
3308
  en: {
3257
3309
  search: "Search",
@@ -3274,20 +3326,20 @@ var SearchableList = ({
3274
3326
  const [search, setSearch] = (0, import_react14.useState)(initialSearch);
3275
3327
  (0, import_react14.useEffect)(() => setSearch(initialSearch), [initialSearch]);
3276
3328
  const filteredEntries = (0, import_react14.useMemo)(() => MultiSearchWithMapping(search, list, searchMapping), [search, list, searchMapping]);
3277
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx23.default)("col gap-y-2", className), children: [
3278
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "row justify-between gap-x-2 items-center", children: [
3279
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Input, { value: search, onChangeText: setSearch, placeholder: translation.search }) }),
3280
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react7.Search, { size: 20 })
3329
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx24.default)("col gap-y-2", className), children: [
3330
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "row justify-between gap-x-2 items-center", children: [
3331
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Input, { value: search, onChangeText: setSearch, placeholder: translation.search }) }),
3332
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react7.Search, { size: 20 })
3281
3333
  ] }),
3282
- filteredEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "col gap-y-1", children: filteredEntries.map(itemMapper) }),
3283
- !filteredEntries.length && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "row justify-center", children: translation.nothingFound })
3334
+ filteredEntries.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "col gap-y-1", children: filteredEntries.map(itemMapper) }),
3335
+ !filteredEntries.length && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "row justify-center", children: translation.nothingFound })
3284
3336
  ] });
3285
3337
  };
3286
3338
 
3287
3339
  // src/components/layout-and-navigation/StepperBar.tsx
3288
3340
  var import_lucide_react8 = require("lucide-react");
3289
- var import_clsx24 = __toESM(require("clsx"), 1);
3290
- var import_jsx_runtime28 = require("react/jsx-runtime");
3341
+ var import_clsx25 = __toESM(require("clsx"), 1);
3342
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3291
3343
  var defaultStepperBarTranslation = {
3292
3344
  en: {
3293
3345
  back: "Back",
@@ -3315,12 +3367,12 @@ var StepperBar = ({
3315
3367
  seenSteps.add(newStep);
3316
3368
  onChange({ step: newStep, seenSteps, lastStep });
3317
3369
  };
3318
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3370
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3319
3371
  "div",
3320
3372
  {
3321
- className: (0, import_clsx24.default)("sticky row p-2 border-2 justify-between rounded-lg shadow-lg", className),
3373
+ className: (0, import_clsx25.default)("sticky row p-2 border-2 justify-between rounded-lg shadow-lg", className),
3322
3374
  children: [
3323
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3375
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3324
3376
  SolidButton,
3325
3377
  {
3326
3378
  disabled: step === 0,
@@ -3329,18 +3381,18 @@ var StepperBar = ({
3329
3381
  },
3330
3382
  className: "row gap-x-1 items-center justify-center",
3331
3383
  children: [
3332
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react8.ChevronLeft, { size: 14 }),
3384
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronLeft, { size: 14 }),
3333
3385
  translation.back
3334
3386
  ]
3335
3387
  }
3336
3388
  ) }),
3337
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "row flex-[5] gap-x-2 justify-center items-center", children: showDots && dots.map((value, index) => {
3389
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "row flex-[5] gap-x-2 justify-center items-center", children: showDots && dots.map((value, index) => {
3338
3390
  const seen = seenSteps.has(index);
3339
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3391
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3340
3392
  "div",
3341
3393
  {
3342
3394
  onClick: () => seen && update(index),
3343
- className: (0, import_clsx24.default)(
3395
+ className: (0, import_clsx25.default)(
3344
3396
  "rounded-full w-4 h-4",
3345
3397
  {
3346
3398
  "bg-primary hover:brightness-75": index === step && seen,
@@ -3356,25 +3408,25 @@ var StepperBar = ({
3356
3408
  index
3357
3409
  );
3358
3410
  }) }),
3359
- step !== lastStep && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3411
+ step !== lastStep && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3360
3412
  SolidButton,
3361
3413
  {
3362
3414
  onClick: () => update(step + 1),
3363
3415
  className: "row gap-x-1 items-center justify-center",
3364
3416
  children: [
3365
3417
  translation.next,
3366
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react8.ChevronRight, { size: 14 })
3418
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.ChevronRight, { size: 14 })
3367
3419
  ]
3368
3420
  }
3369
3421
  ) }),
3370
- step === lastStep && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3422
+ step === lastStep && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-[2] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3371
3423
  SolidButton,
3372
3424
  {
3373
3425
  disabled: false,
3374
3426
  onClick: onFinish,
3375
3427
  className: "row gap-x-1 items-center justify-center",
3376
3428
  children: [
3377
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react8.Check, { size: 14 }),
3429
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react8.Check, { size: 14 }),
3378
3430
  translation.confirm
3379
3431
  ]
3380
3432
  }
@@ -3392,8 +3444,8 @@ var import_react_custom_scrollbars_23 = require("react-custom-scrollbars-2");
3392
3444
  var import_react15 = require("react");
3393
3445
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
3394
3446
  var import_lucide_react9 = require("lucide-react");
3395
- var import_clsx25 = __toESM(require("clsx"), 1);
3396
- var import_jsx_runtime29 = require("react/jsx-runtime");
3447
+ var import_clsx26 = __toESM(require("clsx"), 1);
3448
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3397
3449
  var checkboxSizeMapping = {
3398
3450
  small: "size-4",
3399
3451
  medium: "size-6",
@@ -3429,31 +3481,31 @@ var Checkbox = ({
3429
3481
  const newValue = checked === "indeterminate" ? false : !checked;
3430
3482
  propagateChange(newValue);
3431
3483
  };
3432
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_clsx25.default)("row justify-center items-center", containerClassName), children: [
3433
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3484
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_clsx26.default)("row justify-center items-center", containerClassName), children: [
3485
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3434
3486
  CheckboxPrimitive.Root,
3435
3487
  {
3436
3488
  onCheckedChange: propagateChange,
3437
3489
  checked,
3438
3490
  disabled,
3439
3491
  id,
3440
- className: (0, import_clsx25.default)(usedSizeClass, `items-center border-2 rounded outline-none focus:border-primary`, {
3492
+ className: (0, import_clsx26.default)(usedSizeClass, `items-center border-2 rounded outline-none focus:border-primary`, {
3441
3493
  "text-disabled-text border-disabled-text": disabled,
3442
3494
  "border-on-background": !disabled,
3443
3495
  "bg-primary/30 border-primary text-primary": checked === true || checked === "indeterminate",
3444
3496
  "hover:border-gray-400 focus:hover:border-primary": !checked
3445
3497
  }, className),
3446
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(CheckboxPrimitive.Indicator, { children: [
3447
- checked === true && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Check, { className: innerIconSize }),
3448
- checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react9.Minus, { className: innerIconSize })
3498
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(CheckboxPrimitive.Indicator, { children: [
3499
+ checked === true && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react9.Check, { className: innerIconSize }),
3500
+ checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react9.Minus, { className: innerIconSize })
3449
3501
  ] })
3450
3502
  }
3451
3503
  ),
3452
- label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3504
+ label && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3453
3505
  Label,
3454
3506
  {
3455
3507
  ...label,
3456
- className: (0, import_clsx25.default)("cursor-pointer", label.className),
3508
+ className: (0, import_clsx26.default)("cursor-pointer", label.className),
3457
3509
  htmlFor: id,
3458
3510
  onClick: changeValue
3459
3511
  }
@@ -3476,7 +3528,7 @@ var CheckboxUncontrolled = ({
3476
3528
  }
3477
3529
  setChecked(checked2);
3478
3530
  };
3479
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3531
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3480
3532
  Checkbox,
3481
3533
  {
3482
3534
  ...props,
@@ -3487,9 +3539,9 @@ var CheckboxUncontrolled = ({
3487
3539
  };
3488
3540
 
3489
3541
  // src/components/layout-and-navigation/Table.tsx
3490
- var import_clsx26 = __toESM(require("clsx"), 1);
3542
+ var import_clsx27 = __toESM(require("clsx"), 1);
3491
3543
  var import_lucide_react10 = require("lucide-react");
3492
- var import_jsx_runtime30 = require("react/jsx-runtime");
3544
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3493
3545
  var defaultTableStatePagination = {
3494
3546
  currentPage: 0,
3495
3547
  entriesPerPage: 5
@@ -3660,20 +3712,20 @@ var Table = ({
3660
3712
  window.removeEventListener("resize", handleResize);
3661
3713
  };
3662
3714
  }, [data, currentPage]);
3663
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_clsx26.default)("col gap-y-4 overflow-hidden", className), children: [
3664
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_custom_scrollbars_23.Scrollbars, { autoHeight: true, autoHeightMin: scrollbarsAutoHeightMin, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("table", { ref: tableRef, className: "w-full mb-[12px]", children: [
3665
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("tr", { className: headerRow, children: [
3666
- header && tableState.selection && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("th", { className: headerPaddingHead, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3715
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: (0, import_clsx27.default)("col gap-y-4 overflow-hidden", className), children: [
3716
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_custom_scrollbars_23.Scrollbars, { autoHeight: true, autoHeightMin: scrollbarsAutoHeightMin, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("table", { ref: tableRef, className: "w-full mb-[12px]", children: [
3717
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("tr", { className: headerRow, children: [
3718
+ header && tableState.selection && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("th", { className: headerPaddingHead, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3667
3719
  Checkbox,
3668
3720
  {
3669
3721
  checked: tableState.selection.hasSelectedSome ? "indeterminate" : tableState.selection.hasSelectedAll,
3670
3722
  onChange: () => updateTableState(changeTableSelectionAll(tableState, data, identifierMapping))
3671
3723
  }
3672
3724
  ) }),
3673
- header && header.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("th", { className: headerPaddingHead, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "row justify-start px-2", children: value }) }, `tableHeader${index}`))
3725
+ header && header.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("th", { className: headerPaddingHead, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "row justify-start px-2", children: value }) }, `tableHeader${index}`))
3674
3726
  ] }) }),
3675
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tbody", { children: shownElements.map((value, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("tr", { children: [
3676
- tableState.selection && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("td", { className: (0, import_clsx26.default)(cellPadding, { [headerPaddingBody]: rowIndex === 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3727
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tbody", { children: shownElements.map((value, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("tr", { children: [
3728
+ tableState.selection && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("td", { className: (0, import_clsx27.default)(cellPadding, { [headerPaddingBody]: rowIndex === 0 }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3677
3729
  Checkbox,
3678
3730
  {
3679
3731
  checked: isDataObjectSelected(tableState, value, identifierMapping),
@@ -3682,17 +3734,17 @@ var Table = ({
3682
3734
  }
3683
3735
  }
3684
3736
  ) }),
3685
- rowMappingToCells(value).map((value1, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3737
+ rowMappingToCells(value).map((value1, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3686
3738
  "td",
3687
3739
  {
3688
- className: (0, import_clsx26.default)(cellPadding, { [headerPaddingBody]: rowIndex === 0 }),
3740
+ className: (0, import_clsx27.default)(cellPadding, { [headerPaddingBody]: rowIndex === 0 }),
3689
3741
  children: value1
3690
3742
  },
3691
3743
  index
3692
3744
  ))
3693
3745
  ] }, identifierMapping(value))) })
3694
3746
  ] }) }) }),
3695
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "row justify-center", children: tableState.pagination && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Pagination, { page: currentPage, numberOfPages: pageCount, onPageChanged: (page) => updateTableState({
3747
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "row justify-center", children: tableState.pagination && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Pagination, { page: currentPage, numberOfPages: pageCount, onPageChanged: (page) => updateTableState({
3696
3748
  ...tableState,
3697
3749
  pagination: { entriesPerPage, currentPage: page }
3698
3750
  }) }) })
@@ -3705,23 +3757,23 @@ var SortButton = ({
3705
3757
  onClick,
3706
3758
  ...buttonProps
3707
3759
  }) => {
3708
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3760
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3709
3761
  TextButton,
3710
3762
  {
3711
3763
  color,
3712
3764
  onClick: () => onClick(ascending === "descending" ? "ascending" : "descending"),
3713
3765
  ...buttonProps,
3714
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "row gap-x-2", children: [
3766
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "row gap-x-2", children: [
3715
3767
  children,
3716
- ascending === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronUp, {}) : !ascending ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronsUpDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react10.ChevronDown, {})
3768
+ ascending === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react10.ChevronUp, {}) : !ascending ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react10.ChevronsUpDown, {}) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react10.ChevronDown, {})
3717
3769
  ] })
3718
3770
  }
3719
3771
  );
3720
3772
  };
3721
3773
 
3722
3774
  // src/components/layout-and-navigation/TextImage.tsx
3723
- var import_clsx27 = __toESM(require("clsx"), 1);
3724
- var import_jsx_runtime31 = require("react/jsx-runtime");
3775
+ var import_clsx28 = __toESM(require("clsx"), 1);
3776
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3725
3777
  var defaultTextImageTranslation = {
3726
3778
  de: {
3727
3779
  showMore: "Mehr anzeigen"
@@ -3752,25 +3804,25 @@ var TextImage = ({
3752
3804
  secondary: "text-text-image-secondary-text bg-linear-to-r from-30% from-text-image-secondary-background to-text-image-secondary-background/55",
3753
3805
  dark: "text-text-image-dark-text bg-linear-to-r from-30% from-text-image-dark-background to-text-image-dark-background/55"
3754
3806
  };
3755
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3807
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3756
3808
  "div",
3757
3809
  {
3758
- className: (0, import_clsx27.default)("rounded-2xl w-full", className),
3810
+ className: (0, import_clsx28.default)("rounded-2xl w-full", className),
3759
3811
  style: {
3760
3812
  backgroundImage: `url(${imageUrl})`,
3761
3813
  backgroundSize: "cover"
3762
3814
  },
3763
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3815
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3764
3816
  "div",
3765
3817
  {
3766
- className: (0, import_clsx27.default)(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
3818
+ className: (0, import_clsx28.default)(`col px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
3767
3819
  children: [
3768
- badge && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: (0, import_clsx27.default)(`chip-full bg-white mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
3769
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "col gap-y-1 text-white overflow-hidden", children: [
3770
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "textstyle-title-xl", children: title }),
3771
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
3820
+ badge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: (0, import_clsx28.default)(`chip-full bg-white mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
3821
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "col gap-y-1 text-white overflow-hidden", children: [
3822
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "textstyle-title-xl", children: title }),
3823
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
3772
3824
  ] }),
3773
- onShowMoreClicked && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "row mt-2 text-white underline", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { onClick: onShowMoreClicked, children: translation.showMore }) })
3825
+ onShowMoreClicked && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "row mt-2 text-white underline", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("button", { onClick: onShowMoreClicked, children: translation.showMore }) })
3774
3826
  ]
3775
3827
  }
3776
3828
  )
@@ -3779,7 +3831,7 @@ var TextImage = ({
3779
3831
  };
3780
3832
 
3781
3833
  // src/components/layout-and-navigation/VerticalDivider.tsx
3782
- var import_jsx_runtime32 = require("react/jsx-runtime");
3834
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3783
3835
  var VerticalDivider = ({
3784
3836
  width = 1,
3785
3837
  height = 100,
@@ -3787,7 +3839,7 @@ var VerticalDivider = ({
3787
3839
  dashGap = 4,
3788
3840
  dashLength = 4
3789
3841
  }) => {
3790
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { width: width + "px", height: height + "px" }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3842
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { width: width + "px", height: height + "px" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3791
3843
  "svg",
3792
3844
  {
3793
3845
  width,
@@ -3796,7 +3848,7 @@ var VerticalDivider = ({
3796
3848
  fill: "none",
3797
3849
  xmlns: "http://www.w3.org/2000/svg",
3798
3850
  children: [
3799
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3851
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3800
3852
  "line",
3801
3853
  {
3802
3854
  opacity: "0.5",
@@ -3810,7 +3862,7 @@ var VerticalDivider = ({
3810
3862
  strokeLinecap: "round"
3811
3863
  }
3812
3864
  ),
3813
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3865
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3814
3866
  "linearGradient",
3815
3867
  {
3816
3868
  id: "paint_linear",
@@ -3820,9 +3872,9 @@ var VerticalDivider = ({
3820
3872
  y2: height,
3821
3873
  gradientUnits: "userSpaceOnUse",
3822
3874
  children: [
3823
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("stop", { stopOpacity: "0", stopColor: "currentColor" }),
3824
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("stop", { offset: "0.5", stopColor: "currentColor" }),
3825
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
3875
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("stop", { stopOpacity: "0", stopColor: "currentColor" }),
3876
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("stop", { offset: "0.5", stopColor: "currentColor" }),
3877
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("stop", { offset: "1", stopColor: "currentColor", stopOpacity: "0" })
3826
3878
  ]
3827
3879
  }
3828
3880
  ) })
@@ -3833,8 +3885,8 @@ var VerticalDivider = ({
3833
3885
 
3834
3886
  // src/components/loading-states/ErrorComponent.tsx
3835
3887
  var import_lucide_react11 = require("lucide-react");
3836
- var import_clsx28 = __toESM(require("clsx"), 1);
3837
- var import_jsx_runtime33 = require("react/jsx-runtime");
3888
+ var import_clsx29 = __toESM(require("clsx"), 1);
3889
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3838
3890
  var defaultErrorComponentTranslation = {
3839
3891
  en: {
3840
3892
  errorOccurred: "An error occurred"
@@ -3849,8 +3901,8 @@ var ErrorComponent = ({
3849
3901
  classname
3850
3902
  }) => {
3851
3903
  const translation = useTranslation(defaultErrorComponentTranslation, overwriteTranslation);
3852
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: (0, import_clsx28.default)("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
3853
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react11.AlertOctagon, { size: 64, className: "text-warning" }),
3904
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: (0, import_clsx29.default)("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
3905
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react11.AlertOctagon, { size: 64, className: "text-warning" }),
3854
3906
  errorText ?? `${translation.errorOccurred} :(`
3855
3907
  ] });
3856
3908
  };
@@ -3859,8 +3911,8 @@ var ErrorComponent = ({
3859
3911
  var import_react17 = require("react");
3860
3912
 
3861
3913
  // src/components/loading-states/LoadingAnimation.tsx
3862
- var import_clsx29 = __toESM(require("clsx"), 1);
3863
- var import_jsx_runtime34 = require("react/jsx-runtime");
3914
+ var import_clsx30 = __toESM(require("clsx"), 1);
3915
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3864
3916
  var defaultLoadingAnimationTranslation = {
3865
3917
  en: {
3866
3918
  loading: "Loading data"
@@ -3875,14 +3927,14 @@ var LoadingAnimation = ({
3875
3927
  classname
3876
3928
  }) => {
3877
3929
  const translation = useTranslation(defaultLoadingAnimationTranslation, overwriteTranslation);
3878
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: (0, import_clsx29.default)("col items-center justify-center w-full h-24", classname), children: [
3879
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Helpwave, { animate: "loading" }),
3930
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: (0, import_clsx30.default)("col items-center justify-center w-full h-24", classname), children: [
3931
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Helpwave, { animate: "loading" }),
3880
3932
  loadingText ?? `${translation.loading}...`
3881
3933
  ] });
3882
3934
  };
3883
3935
 
3884
3936
  // src/components/loading-states/LoadingAndErrorComponent.tsx
3885
- var import_jsx_runtime35 = require("react/jsx-runtime");
3937
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3886
3938
  var LoadingAndErrorComponent = ({
3887
3939
  children,
3888
3940
  isLoading = false,
@@ -3901,27 +3953,27 @@ var LoadingAndErrorComponent = ({
3901
3953
  }, minimumLoadingDuration);
3902
3954
  }
3903
3955
  if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
3904
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoadingAnimation, { ...loadingProps });
3956
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LoadingAnimation, { ...loadingProps });
3905
3957
  }
3906
3958
  if (hasError) {
3907
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorComponent, { ...errorProps });
3959
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorComponent, { ...errorProps });
3908
3960
  }
3909
3961
  return children;
3910
3962
  };
3911
3963
 
3912
3964
  // src/components/loading-states/LoadingButton.tsx
3913
- var import_clsx30 = __toESM(require("clsx"), 1);
3914
- var import_jsx_runtime36 = require("react/jsx-runtime");
3965
+ var import_clsx31 = __toESM(require("clsx"), 1);
3966
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3915
3967
  var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
3916
3968
  const paddingClass = ButtonUtil.paddingMapping[size];
3917
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "inline-block relative", children: [
3918
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: (0, import_clsx30.default)("absolute inset-0 row items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Helpwave, { animate: "loading", className: "text-white" }) }),
3919
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
3969
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "inline-block relative", children: [
3970
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx31.default)("absolute inset-0 row items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Helpwave, { animate: "loading", className: "text-white" }) }),
3971
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
3920
3972
  ] });
3921
3973
  };
3922
3974
 
3923
3975
  // src/components/loading-states/ProgressIndicator.tsx
3924
- var import_jsx_runtime37 = require("react/jsx-runtime");
3976
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3925
3977
  var sizeMapping = { small: 16, medium: 24, big: 48 };
3926
3978
  var ProgressIndicator = ({
3927
3979
  progress,
@@ -3938,7 +3990,7 @@ var ProgressIndicator = ({
3938
3990
  if (direction === "clockwise") {
3939
3991
  rotation += 360 * progress;
3940
3992
  }
3941
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3993
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3942
3994
  "svg",
3943
3995
  {
3944
3996
  style: {
@@ -3947,7 +3999,7 @@ var ProgressIndicator = ({
3947
3999
  transform: `rotate(${rotation}deg)`
3948
4000
  },
3949
4001
  children: [
3950
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4002
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3951
4003
  "circle",
3952
4004
  {
3953
4005
  cx: center,
@@ -3958,7 +4010,7 @@ var ProgressIndicator = ({
3958
4010
  className: "stroke-primary"
3959
4011
  }
3960
4012
  ),
3961
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4013
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3962
4014
  "circle",
3963
4015
  {
3964
4016
  cx: center,
@@ -3976,10 +4028,10 @@ var ProgressIndicator = ({
3976
4028
  );
3977
4029
  };
3978
4030
 
3979
- // src/components/modals/ConfirmDialog.tsx
3980
- var import_clsx31 = __toESM(require("clsx"), 1);
3981
- var import_jsx_runtime38 = require("react/jsx-runtime");
3982
- var defaultConfirmDialogTranslation = {
4031
+ // src/components/modals/ConfirmModal.tsx
4032
+ var import_clsx32 = __toESM(require("clsx"), 1);
4033
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4034
+ var defaultConfirmDialogTranslation2 = {
3983
4035
  en: {
3984
4036
  confirm: "Confirm",
3985
4037
  cancel: "Cancel",
@@ -3991,7 +4043,7 @@ var defaultConfirmDialogTranslation = {
3991
4043
  decline: "Ablehnen"
3992
4044
  }
3993
4045
  };
3994
- var ConfirmDialog = ({
4046
+ var ConfirmModal = ({
3995
4047
  overwriteTranslation,
3996
4048
  children,
3997
4049
  onCancel,
@@ -4002,25 +4054,26 @@ var ConfirmDialog = ({
4002
4054
  className,
4003
4055
  ...restProps
4004
4056
  }) => {
4005
- const translation = useTranslation(defaultConfirmDialogTranslation, overwriteTranslation);
4057
+ const translation = useTranslation(defaultConfirmDialogTranslation2, overwriteTranslation);
4006
4058
  const mapping = {
4007
- neutral: "primary",
4059
+ neutral: "neutral",
4008
4060
  negative: "negative",
4009
- positive: "positive"
4061
+ positive: "positive",
4062
+ primary: "primary"
4010
4063
  };
4011
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Dialog, { ...restProps, className: (0, import_clsx31.default)("justify-between", className), children: [
4012
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "col grow", children }),
4013
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
4014
- onCancel && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4064
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Modal, { ...restProps, onClose: onCancel, className: (0, import_clsx32.default)("justify-between", className), children: [
4065
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "col grow", children }),
4066
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
4067
+ onCancel && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4015
4068
  SolidButton,
4016
4069
  {
4017
- color: buttonOverwrites?.[0].color ?? "primary",
4070
+ color: buttonOverwrites?.[0].color ?? "neutral",
4018
4071
  onClick: onCancel,
4019
4072
  disabled: buttonOverwrites?.[0].disabled ?? false,
4020
4073
  children: buttonOverwrites?.[0].text ?? translation.cancel
4021
4074
  }
4022
4075
  ),
4023
- onDecline && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4076
+ onDecline && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4024
4077
  SolidButton,
4025
4078
  {
4026
4079
  color: buttonOverwrites?.[1].color ?? "negative",
@@ -4029,7 +4082,7 @@ var ConfirmDialog = ({
4029
4082
  children: buttonOverwrites?.[1].text ?? translation.decline
4030
4083
  }
4031
4084
  ),
4032
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4085
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4033
4086
  SolidButton,
4034
4087
  {
4035
4088
  autoFocus: true,
@@ -4044,7 +4097,7 @@ var ConfirmDialog = ({
4044
4097
  };
4045
4098
 
4046
4099
  // src/components/modals/DiscardChangesModal.tsx
4047
- var import_jsx_runtime39 = require("react/jsx-runtime");
4100
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4048
4101
  var defaultDiscardChangesModalTranslation = {
4049
4102
  en: {
4050
4103
  save: "Save",
@@ -4071,40 +4124,37 @@ var DiscardChangesModal = ({
4071
4124
  ...modalProps
4072
4125
  }) => {
4073
4126
  const translation = useTranslation(defaultDiscardChangesModalTranslation, overwriteTranslation);
4074
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4075
- Modal,
4127
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4128
+ ConfirmModal,
4076
4129
  {
4077
4130
  headerProps: {
4078
4131
  ...headerProps,
4079
4132
  titleText: headerProps?.titleText ?? translation.title,
4080
4133
  descriptionText: headerProps?.descriptionText ?? translation.description
4081
4134
  },
4135
+ onConfirm: onSave,
4136
+ onCancel,
4137
+ onDecline: onDontSave,
4138
+ buttonOverwrites: [{ text: translation.cancel }, { text: translation.dontSave }, { text: translation.save }],
4082
4139
  ...modalProps,
4083
- children: [
4084
- children,
4085
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "row mt-3 gap-x-4 justify-end", children: [
4086
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SolidButton, { color: "positive", onClick: onSave, children: translation.save }),
4087
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SolidButton, { color: "negative", onClick: onDontSave, children: translation.dontSave }),
4088
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SolidButton, { autoFocus: true, color: "primary", onClick: onCancel, children: translation.cancel })
4089
- ] })
4090
- ]
4140
+ children
4091
4141
  }
4092
4142
  );
4093
4143
  };
4094
4144
 
4095
4145
  // src/components/modals/InputModal.tsx
4096
- var import_jsx_runtime40 = require("react/jsx-runtime");
4146
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4097
4147
  var InputModal = ({
4098
4148
  inputs,
4099
4149
  buttonOverwrites,
4100
4150
  ...restProps
4101
4151
  }) => {
4102
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4152
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4103
4153
  ConfirmDialog,
4104
4154
  {
4105
4155
  buttonOverwrites,
4106
4156
  ...restProps,
4107
- children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Input, { ...inputProps }, `input ${index}`))
4157
+ children: inputs.map((inputProps, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Input, { ...inputProps }, `input ${index}`))
4108
4158
  }
4109
4159
  );
4110
4160
  };
@@ -4113,8 +4163,8 @@ var InputModal = ({
4113
4163
  var import_react18 = require("@headlessui/react");
4114
4164
  var import_lucide_react12 = require("lucide-react");
4115
4165
  var import_react19 = require("react");
4116
- var import_clsx32 = __toESM(require("clsx"), 1);
4117
- var import_jsx_runtime41 = require("react/jsx-runtime");
4166
+ var import_clsx33 = __toESM(require("clsx"), 1);
4167
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4118
4168
  var Select = ({
4119
4169
  value,
4120
4170
  label,
@@ -4139,13 +4189,13 @@ var Select = ({
4139
4189
  console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
4140
4190
  }
4141
4191
  const borderColor = "border-menu-border";
4142
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: (0, import_clsx32.default)(className), children: [
4143
- label && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx32.default)("mb-1", label.className) }),
4144
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react18.Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
4145
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
4192
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: (0, import_clsx33.default)(className), children: [
4193
+ label && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { ...label, labelType: label.labelType ?? "labelBig", className: (0, import_clsx33.default)("mb-1", label.className) }),
4194
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.Menu, { as: "div", className: "relative text-menu-text", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
4195
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4146
4196
  import_react18.Menu.Button,
4147
4197
  {
4148
- className: (0, import_clsx32.default)(
4198
+ className: (0, import_clsx33.default)(
4149
4199
  "inline-flex w-full justify-between items-center rounded-t-lg border-2 px-4 py-2 font-medium bg-menu-background text-menu-text",
4150
4200
  textColor,
4151
4201
  borderColor,
@@ -4157,30 +4207,30 @@ var Select = ({
4157
4207
  ),
4158
4208
  disabled: isDisabled,
4159
4209
  children: [
4160
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: selectedDisplayOverwrite ?? selectedOption?.label ?? hintText }),
4161
- open ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react12.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react12.ChevronDown, {})
4210
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: selectedDisplayOverwrite ?? selectedOption?.label ?? hintText }),
4211
+ open ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.ChevronDown, {})
4162
4212
  ]
4163
4213
  }
4164
4214
  ),
4165
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
4215
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4166
4216
  import_react18.Menu.Items,
4167
4217
  {
4168
4218
  className: "absolute w-full z-10 rounded-b-lg bg-menu-background text-menu-text shadow-lg max-h-[500px] overflow-y-auto",
4169
4219
  children: [
4170
- (additionalItems ?? []).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4220
+ (additionalItems ?? []).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4171
4221
  "div",
4172
4222
  {
4173
- className: (0, import_clsx32.default)(borderColor, "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0", {
4223
+ className: (0, import_clsx33.default)(borderColor, "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0", {
4174
4224
  "border-b-0 rounded-b-lg": filteredOptions.length === 0 && index === (additionalItems?.length ?? 1) - 1
4175
4225
  }),
4176
4226
  children: item
4177
4227
  },
4178
4228
  `additionalItems${index}`
4179
4229
  )),
4180
- filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react18.Menu.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4230
+ filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.Menu.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4181
4231
  "div",
4182
4232
  {
4183
- className: (0, import_clsx32.default)(
4233
+ className: (0, import_clsx33.default)(
4184
4234
  "px-4 py-2 overflow-hidden whitespace-nowrap text-ellipsis border-2 border-t-0 cursor-pointer",
4185
4235
  option.className,
4186
4236
  borderColor,
@@ -4219,7 +4269,7 @@ var SelectUncontrolled = ({
4219
4269
  setSelected(value);
4220
4270
  }
4221
4271
  }, [options, value]);
4222
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4272
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4223
4273
  Select,
4224
4274
  {
4225
4275
  value: selected,
@@ -4241,14 +4291,14 @@ var SearchableSelect = ({
4241
4291
  }) => {
4242
4292
  const [search, setSearch] = (0, import_react19.useState)("");
4243
4293
  const filteredOptions = MultiSearchWithMapping(search, options, searchMapping);
4244
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4294
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4245
4295
  Select,
4246
4296
  {
4247
4297
  value,
4248
4298
  options: filteredOptions,
4249
- additionalItems: [/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "row gap-x-2 items-center", children: [
4250
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Input, { autoFocus: true, value: search, onChangeText: setSearch }),
4251
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react12.Search, {})
4299
+ additionalItems: [/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "row gap-x-2 items-center", children: [
4300
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Input, { autoFocus: true, value: search, onChangeText: setSearch }),
4301
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react12.Search, {})
4252
4302
  ] }, "selectSearch")],
4253
4303
  ...selectProps
4254
4304
  }
@@ -4256,7 +4306,7 @@ var SearchableSelect = ({
4256
4306
  };
4257
4307
 
4258
4308
  // src/components/modals/LanguageModal.tsx
4259
- var import_jsx_runtime42 = require("react/jsx-runtime");
4309
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4260
4310
  var defaultLanguageModalTranslation = {
4261
4311
  en: {
4262
4312
  title: "Language",
@@ -4279,7 +4329,7 @@ var LanguageModal = ({
4279
4329
  }) => {
4280
4330
  const { language, setLanguage } = useLanguage();
4281
4331
  const translation = useTranslation(defaultLanguageModalTranslation, overwriteTranslation);
4282
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4332
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4283
4333
  Modal,
4284
4334
  {
4285
4335
  headerProps: {
@@ -4289,8 +4339,8 @@ var LanguageModal = ({
4289
4339
  },
4290
4340
  onClose,
4291
4341
  ...modalProps,
4292
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "w-64", children: [
4293
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4342
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "w-64", children: [
4343
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4294
4344
  Select,
4295
4345
  {
4296
4346
  className: "mt-2",
@@ -4299,7 +4349,7 @@ var LanguageModal = ({
4299
4349
  onChange: (language2) => setLanguage(language2)
4300
4350
  }
4301
4351
  ),
4302
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation.done }) })
4352
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation.done }) })
4303
4353
  ] })
4304
4354
  }
4305
4355
  );
@@ -4307,7 +4357,7 @@ var LanguageModal = ({
4307
4357
 
4308
4358
  // src/theming/useTheme.tsx
4309
4359
  var import_react20 = require("react");
4310
- var import_jsx_runtime43 = require("react/jsx-runtime");
4360
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4311
4361
  var themes = ["light", "dark"];
4312
4362
  var defaultThemeTypeTranslation = {
4313
4363
  en: {
@@ -4338,13 +4388,13 @@ var ThemeProvider = ({ children, initialTheme = "light" }) => {
4338
4388
  (0, import_react20.useEffect)(() => {
4339
4389
  document.documentElement.setAttribute("data-theme", theme);
4340
4390
  }, [theme]);
4341
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
4391
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ThemeContext.Provider, { value: { theme, setTheme }, children });
4342
4392
  };
4343
4393
  var useTheme = () => (0, import_react20.useContext)(ThemeContext);
4344
4394
 
4345
4395
  // src/components/modals/ThemeModal.tsx
4346
- var import_jsx_runtime44 = require("react/jsx-runtime");
4347
- var defaultConfirmDialogTranslation2 = {
4396
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4397
+ var defaultConfirmDialogTranslation3 = {
4348
4398
  en: {
4349
4399
  title: "Theme",
4350
4400
  message: "Choose your preferred theme",
@@ -4365,8 +4415,8 @@ var ThemeModal = ({
4365
4415
  ...modalProps
4366
4416
  }) => {
4367
4417
  const { theme, setTheme } = useTheme();
4368
- const translation = useTranslation(defaultConfirmDialogTranslation2, overwriteTranslation);
4369
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4418
+ const translation = useTranslation(defaultConfirmDialogTranslation3, overwriteTranslation);
4419
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4370
4420
  Modal,
4371
4421
  {
4372
4422
  headerProps: {
@@ -4376,8 +4426,8 @@ var ThemeModal = ({
4376
4426
  },
4377
4427
  onClose,
4378
4428
  ...modalProps,
4379
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "w-64", children: [
4380
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4429
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "w-64", children: [
4430
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4381
4431
  Select,
4382
4432
  {
4383
4433
  className: "mt-2",
@@ -4386,7 +4436,7 @@ var ThemeModal = ({
4386
4436
  onChange: (theme2) => setTheme(theme2)
4387
4437
  }
4388
4438
  ),
4389
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation.done }) })
4439
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "row mt-3 gap-x-4 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation.done }) })
4390
4440
  ] })
4391
4441
  }
4392
4442
  );
@@ -4397,8 +4447,8 @@ var import_lucide_react14 = require("lucide-react");
4397
4447
 
4398
4448
  // src/components/properties/PropertyBase.tsx
4399
4449
  var import_lucide_react13 = require("lucide-react");
4400
- var import_clsx33 = __toESM(require("clsx"), 1);
4401
- var import_jsx_runtime45 = require("react/jsx-runtime");
4450
+ var import_clsx34 = __toESM(require("clsx"), 1);
4451
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4402
4452
  var defaultPropertyBaseTranslation = {
4403
4453
  en: {
4404
4454
  remove: "Remove"
@@ -4420,11 +4470,11 @@ var PropertyBase = ({
4420
4470
  }) => {
4421
4471
  const translation = useTranslation(defaultPropertyBaseTranslation, overwriteTranslation);
4422
4472
  const requiredAndNoValue = softRequired && !hasValue;
4423
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: (0, import_clsx33.default)("row gap-x-0 group", className), children: [
4424
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4473
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: (0, import_clsx34.default)("row gap-x-0 group", className), children: [
4474
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4425
4475
  "div",
4426
4476
  {
4427
- className: (0, import_clsx33.default)("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
4477
+ className: (0, import_clsx34.default)("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
4428
4478
  "bg-gray-100 text-black group-hover:border-primary border-gray-400": !requiredAndNoValue,
4429
4479
  "bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
4430
4480
  }, className),
@@ -4434,22 +4484,22 @@ var PropertyBase = ({
4434
4484
  ]
4435
4485
  }
4436
4486
  ),
4437
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4487
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4438
4488
  "div",
4439
4489
  {
4440
- className: (0, import_clsx33.default)("row grow justify-between items-center rounded-r-xl border-2 border-l-0", {
4490
+ className: (0, import_clsx34.default)("row grow justify-between items-center rounded-r-xl border-2 border-l-0", {
4441
4491
  "bg-white group-hover:border-primary border-gray-400": !requiredAndNoValue,
4442
4492
  "bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
4443
4493
  }, className),
4444
4494
  children: [
4445
4495
  input({ softRequired, hasValue }),
4446
- requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-warning pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react13.AlertTriangle, { size: 24 }) }),
4447
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4496
+ requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-warning pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react13.AlertTriangle, { size: 24 }) }),
4497
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4448
4498
  TextButton,
4449
4499
  {
4450
4500
  onClick: onRemove,
4451
4501
  color: "negative",
4452
- className: (0, import_clsx33.default)("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
4502
+ className: (0, import_clsx34.default)("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
4453
4503
  disabled: !hasValue || readOnly,
4454
4504
  children: translation.remove
4455
4505
  }
@@ -4461,7 +4511,7 @@ var PropertyBase = ({
4461
4511
  };
4462
4512
 
4463
4513
  // src/components/properties/CheckboxProperty.tsx
4464
- var import_jsx_runtime46 = require("react/jsx-runtime");
4514
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4465
4515
  var defaultCheckboxPropertyTranslation = {
4466
4516
  en: {
4467
4517
  yes: "Yes",
@@ -4480,14 +4530,14 @@ var CheckboxProperty = ({
4480
4530
  ...baseProps
4481
4531
  }) => {
4482
4532
  const translation = useTranslation(defaultCheckboxPropertyTranslation, overwriteTranslation);
4483
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4533
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4484
4534
  PropertyBase,
4485
4535
  {
4486
4536
  ...baseProps,
4487
4537
  hasValue: true,
4488
4538
  readOnly,
4489
- icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react14.Check, { size: 16 }),
4490
- input: () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4539
+ icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react14.Check, { size: 16 }),
4540
+ input: () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4491
4541
  Checkbox,
4492
4542
  {
4493
4543
  checked: value ?? true,
@@ -4502,8 +4552,8 @@ var CheckboxProperty = ({
4502
4552
 
4503
4553
  // src/components/properties/DateProperty.tsx
4504
4554
  var import_lucide_react15 = require("lucide-react");
4505
- var import_clsx34 = __toESM(require("clsx"), 1);
4506
- var import_jsx_runtime47 = require("react/jsx-runtime");
4555
+ var import_clsx35 = __toESM(require("clsx"), 1);
4556
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4507
4557
  var DateProperty = ({
4508
4558
  value,
4509
4559
  onChange = noop,
@@ -4514,20 +4564,20 @@ var DateProperty = ({
4514
4564
  }) => {
4515
4565
  const hasValue = !!value;
4516
4566
  const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
4517
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4567
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4518
4568
  PropertyBase,
4519
4569
  {
4520
4570
  ...baseProps,
4521
4571
  hasValue,
4522
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react15.CalendarDays, { size: 16 }),
4523
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4572
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react15.CalendarDays, { size: 16 }),
4573
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4524
4574
  "div",
4525
4575
  {
4526
- className: (0, import_clsx34.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
4527
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4576
+ className: (0, import_clsx35.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
4577
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4528
4578
  Input,
4529
4579
  {
4530
- className: (0, import_clsx34.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
4580
+ className: (0, import_clsx35.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
4531
4581
  value: dateText,
4532
4582
  type: type === "dateTime" ? "datetime-local" : "date",
4533
4583
  readOnly,
@@ -4551,16 +4601,16 @@ var DateProperty = ({
4551
4601
 
4552
4602
  // src/components/properties/MultiSelectProperty.tsx
4553
4603
  var import_lucide_react17 = require("lucide-react");
4554
- var import_clsx37 = __toESM(require("clsx"), 1);
4604
+ var import_clsx38 = __toESM(require("clsx"), 1);
4555
4605
 
4556
4606
  // src/components/user-action/MultiSelect.tsx
4557
4607
  var import_react23 = require("react");
4558
4608
  var import_lucide_react16 = require("lucide-react");
4559
- var import_clsx36 = __toESM(require("clsx"), 1);
4609
+ var import_clsx37 = __toESM(require("clsx"), 1);
4560
4610
 
4561
4611
  // src/components/user-action/Menu.tsx
4562
4612
  var import_react22 = require("react");
4563
- var import_clsx35 = __toESM(require("clsx"), 1);
4613
+ var import_clsx36 = __toESM(require("clsx"), 1);
4564
4614
 
4565
4615
  // src/hooks/useOutsideClick.ts
4566
4616
  var import_react21 = require("react");
@@ -4583,16 +4633,16 @@ var useOutsideClick = (refs, handler) => {
4583
4633
  };
4584
4634
 
4585
4635
  // src/components/user-action/Menu.tsx
4586
- var import_jsx_runtime48 = require("react/jsx-runtime");
4636
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4587
4637
  var MenuItem = ({
4588
4638
  children,
4589
4639
  onClick,
4590
4640
  alignment = "left",
4591
4641
  className
4592
- }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4642
+ }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4593
4643
  "div",
4594
4644
  {
4595
- className: (0, import_clsx35.default)("block px-3 py-1 bg-menu-background text-menu-text hover:brightness-90", {
4645
+ className: (0, import_clsx36.default)("block px-3 py-1 bg-menu-background text-menu-text hover:brightness-90", {
4596
4646
  "text-right": alignment === "right",
4597
4647
  "text-left": alignment === "left"
4598
4648
  }, className),
@@ -4611,19 +4661,19 @@ var Menu2 = ({
4611
4661
  const triggerRef = (0, import_react22.useRef)(null);
4612
4662
  const menuRef = (0, import_react22.useRef)(null);
4613
4663
  useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
4614
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4664
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4615
4665
  "div",
4616
4666
  {
4617
4667
  className: "relative",
4618
4668
  ...handlers,
4619
4669
  children: [
4620
4670
  trigger(() => setIsOpen(!isOpen), triggerRef),
4621
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4671
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4622
4672
  "div",
4623
4673
  {
4624
4674
  ref: menuRef,
4625
4675
  onClick: (e) => e.stopPropagation(),
4626
- className: (0, import_clsx35.default)("absolute top-full mt-1 py-2 w-60 rounded-lg bg-menu-background text-menu-text ring-1 ring-slate-900/5 text-sm leading-6 font-semibold shadow-md z-[1]", {
4676
+ className: (0, import_clsx36.default)("absolute top-full mt-1 py-2 w-60 rounded-lg bg-menu-background text-menu-text ring-1 ring-slate-900/5 text-sm leading-6 font-semibold shadow-md z-[1]", {
4627
4677
  " top-[8px]": alignment[0] === "t",
4628
4678
  " bottom-[8px]": alignment[0] === "b",
4629
4679
  " left-[-8px]": alignment[1] === "l",
@@ -4638,7 +4688,7 @@ var Menu2 = ({
4638
4688
  };
4639
4689
 
4640
4690
  // src/components/user-action/MultiSelect.tsx
4641
- var import_jsx_runtime49 = require("react/jsx-runtime");
4691
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4642
4692
  var defaultMultiSelectTranslation = {
4643
4693
  en: {
4644
4694
  select: "Select",
@@ -4679,28 +4729,28 @@ var MultiSelect = ({
4679
4729
  filteredOptions = filteredOptions.filter((value) => !value.disabled);
4680
4730
  }
4681
4731
  const selectedItems = options.filter((value) => value.selected);
4682
- const menuButtonText = selectedItems.length === 0 ? hintText ?? translation.select : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: `${selectedItems.length} ${translation.selected}` });
4732
+ const menuButtonText = selectedItems.length === 0 ? hintText ?? translation.select : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: `${selectedItems.length} ${translation.selected}` });
4683
4733
  const borderColor = "border-menu-border";
4684
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: (0, import_clsx36.default)(className), children: [
4685
- label && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4734
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: (0, import_clsx37.default)(className), children: [
4735
+ label && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4686
4736
  Label,
4687
4737
  {
4688
4738
  ...label,
4689
4739
  htmlFor: label.name,
4690
- className: (0, import_clsx36.default)(" mb-1", label.className),
4740
+ className: (0, import_clsx37.default)(" mb-1", label.className),
4691
4741
  labelType: label.labelType ?? "labelBig"
4692
4742
  }
4693
4743
  ),
4694
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4744
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4695
4745
  Menu2,
4696
4746
  {
4697
4747
  alignment: "t_",
4698
- trigger: (onClick, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4748
+ trigger: (onClick, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4699
4749
  "div",
4700
4750
  {
4701
4751
  ref,
4702
4752
  onClick: disabled ? void 0 : onClick,
4703
- className: (0, import_clsx36.default)(
4753
+ className: (0, import_clsx37.default)(
4704
4754
  borderColor,
4705
4755
  "bg-menu-background text-menu-text inline-w-full justify-between items-center rounded-lg border-2 px-4 py-2 font-medium",
4706
4756
  {
@@ -4712,27 +4762,27 @@ var MultiSelect = ({
4712
4762
  children: selectedDisplay ? selectedDisplay({ items: options, disabled }) : menuButtonText
4713
4763
  }
4714
4764
  ),
4715
- menuClassName: (0, import_clsx36.default)(
4765
+ menuClassName: (0, import_clsx37.default)(
4716
4766
  "!rounded-lg !shadow-lg !max-h-[500px] !min-w-[400px] !max-w-[70vh] !overflow-y-auto !border !border-2",
4717
4767
  borderColor,
4718
4768
  { "!py-0": !enableSearch, "!pb-0": enableSearch }
4719
4769
  ),
4720
4770
  children: [
4721
- enableSearch && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "row gap-x-2 items-center px-2 py-2", children: [
4722
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Input, { autoFocus: true, className: "w-full", value: searchText, onChangeText: setSearchText }),
4723
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react16.Search, {})
4771
+ enableSearch && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "row gap-x-2 items-center px-2 py-2", children: [
4772
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Input, { autoFocus: true, className: "w-full", value: searchText, onChangeText: setSearchText }),
4773
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react16.Search, {})
4724
4774
  ] }, "selectSearch"),
4725
- filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4775
+ filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4726
4776
  MenuItem,
4727
4777
  {
4728
- className: (0, import_clsx36.default)({
4778
+ className: (0, import_clsx37.default)({
4729
4779
  "cursor-not-allowed !bg-disabled-background !text-disabled-text hover:brightness-100": !!option.disabled,
4730
4780
  "cursor-pointer": !option.disabled
4731
4781
  }),
4732
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4782
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4733
4783
  "div",
4734
4784
  {
4735
- className: (0, import_clsx36.default)("overflow-hidden whitespace-nowrap text-ellipsis row items-center gap-x-2", option.className),
4785
+ className: (0, import_clsx37.default)("overflow-hidden whitespace-nowrap text-ellipsis row items-center gap-x-2", option.className),
4736
4786
  onClick: () => {
4737
4787
  if (!option.disabled) {
4738
4788
  onChange(options.map((value) => value.value === option.value ? {
@@ -4742,7 +4792,7 @@ var MultiSelect = ({
4742
4792
  }
4743
4793
  },
4744
4794
  children: [
4745
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Checkbox, { checked: option.selected, disabled: option.disabled, size: "small" }),
4795
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Checkbox, { checked: option.selected, disabled: option.disabled, size: "small" }),
4746
4796
  option.label
4747
4797
  ]
4748
4798
  }
@@ -4757,7 +4807,7 @@ var MultiSelect = ({
4757
4807
  };
4758
4808
 
4759
4809
  // src/components/properties/MultiSelectProperty.tsx
4760
- var import_jsx_runtime50 = require("react/jsx-runtime");
4810
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4761
4811
  var defaultMultiSelectPropertyTranslation = {
4762
4812
  en: {
4763
4813
  select: "Select"
@@ -4781,7 +4831,7 @@ var MultiSelectProperty = ({
4781
4831
  if (softRequired && !hasValue) {
4782
4832
  triggerClassName = "border-warning hover:brightness-90";
4783
4833
  }
4784
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4834
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4785
4835
  PropertyBase,
4786
4836
  {
4787
4837
  name,
@@ -4789,23 +4839,23 @@ var MultiSelectProperty = ({
4789
4839
  readOnly,
4790
4840
  softRequired,
4791
4841
  hasValue,
4792
- icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react17.List, { size: 16 }),
4793
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4842
+ icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react17.List, { size: 16 }),
4843
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4794
4844
  "div",
4795
4845
  {
4796
- className: (0, import_clsx37.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
4797
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4846
+ className: (0, import_clsx38.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
4847
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4798
4848
  MultiSelect,
4799
4849
  {
4800
4850
  ...multiSelectProps,
4801
- className: (0, import_clsx37.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
4851
+ className: (0, import_clsx38.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
4802
4852
  triggerClassName,
4803
4853
  selectedDisplay: ({ items }) => {
4804
4854
  const selected = items.filter((value) => value.selected);
4805
4855
  if (selected.length === 0) {
4806
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Select" });
4856
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Select" });
4807
4857
  }
4808
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChipList, { list: selected.map((value) => ({ children: value.label })) });
4858
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ChipList, { list: selected.map((value) => ({ children: value.label })) });
4809
4859
  },
4810
4860
  options,
4811
4861
  disabled: readOnly,
@@ -4820,8 +4870,8 @@ var MultiSelectProperty = ({
4820
4870
 
4821
4871
  // src/components/properties/NumberProperty.tsx
4822
4872
  var import_lucide_react18 = require("lucide-react");
4823
- var import_clsx38 = __toESM(require("clsx"), 1);
4824
- var import_jsx_runtime51 = require("react/jsx-runtime");
4873
+ var import_clsx39 = __toESM(require("clsx"), 1);
4874
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4825
4875
  var defaultNumberPropertyTranslation = {
4826
4876
  en: {
4827
4877
  value: "Value"
@@ -4842,23 +4892,23 @@ var NumberProperty = ({
4842
4892
  }) => {
4843
4893
  const translation = useTranslation(defaultNumberPropertyTranslation, overwriteTranslation);
4844
4894
  const hasValue = value !== void 0;
4845
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4895
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4846
4896
  PropertyBase,
4847
4897
  {
4848
4898
  ...baseProps,
4849
4899
  onRemove,
4850
4900
  hasValue,
4851
- icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react18.Binary, { size: 16 }),
4852
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4901
+ icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react18.Binary, { size: 16 }),
4902
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4853
4903
  "div",
4854
4904
  {
4855
- className: (0, import_clsx38.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
4905
+ className: (0, import_clsx39.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
4856
4906
  children: [
4857
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4907
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4858
4908
  Input,
4859
4909
  {
4860
4910
  expanded: false,
4861
- className: (0, import_clsx38.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
4911
+ className: (0, import_clsx39.default)("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
4862
4912
  value: value?.toString() ?? "",
4863
4913
  type: "number",
4864
4914
  readOnly,
@@ -4881,7 +4931,7 @@ var NumberProperty = ({
4881
4931
  }
4882
4932
  }
4883
4933
  ),
4884
- suffix && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: (0, import_clsx38.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
4934
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: (0, import_clsx39.default)("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
4885
4935
  ]
4886
4936
  }
4887
4937
  )
@@ -4891,8 +4941,8 @@ var NumberProperty = ({
4891
4941
 
4892
4942
  // src/components/properties/SelectProperty.tsx
4893
4943
  var import_lucide_react19 = require("lucide-react");
4894
- var import_clsx39 = __toESM(require("clsx"), 1);
4895
- var import_jsx_runtime52 = require("react/jsx-runtime");
4944
+ var import_clsx40 = __toESM(require("clsx"), 1);
4945
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4896
4946
  var defaultSingleSelectPropertyTranslation = {
4897
4947
  en: {
4898
4948
  select: "Select"
@@ -4913,7 +4963,7 @@ var SingleSelectProperty = ({
4913
4963
  }) => {
4914
4964
  const translation = useTranslation(defaultSingleSelectPropertyTranslation, overwriteTranslation);
4915
4965
  const hasValue = value !== void 0;
4916
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4966
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4917
4967
  PropertyBase,
4918
4968
  {
4919
4969
  name,
@@ -4921,19 +4971,19 @@ var SingleSelectProperty = ({
4921
4971
  readOnly,
4922
4972
  softRequired,
4923
4973
  hasValue,
4924
- icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react19.List, { size: 16 }),
4925
- input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4974
+ icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react19.List, { size: 16 }),
4975
+ input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4926
4976
  "div",
4927
4977
  {
4928
- className: (0, import_clsx39.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
4929
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4978
+ className: (0, import_clsx40.default)("row grow py-2 px-4 cursor-pointer", { "text-warning": softRequired2 && !hasValue }),
4979
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4930
4980
  SearchableSelect,
4931
4981
  {
4932
4982
  ...multiSelectProps,
4933
4983
  value,
4934
4984
  options,
4935
4985
  isDisabled: readOnly,
4936
- className: (0, import_clsx39.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
4986
+ className: (0, import_clsx40.default)("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
4937
4987
  hintText: `${translation.select}...`
4938
4988
  }
4939
4989
  )
@@ -4945,12 +4995,12 @@ var SingleSelectProperty = ({
4945
4995
 
4946
4996
  // src/components/properties/TextProperty.tsx
4947
4997
  var import_lucide_react20 = require("lucide-react");
4948
- var import_clsx41 = __toESM(require("clsx"), 1);
4998
+ var import_clsx42 = __toESM(require("clsx"), 1);
4949
4999
 
4950
5000
  // src/components/user-action/Textarea.tsx
4951
5001
  var import_react24 = require("react");
4952
- var import_clsx40 = __toESM(require("clsx"), 1);
4953
- var import_jsx_runtime53 = require("react/jsx-runtime");
5002
+ var import_clsx41 = __toESM(require("clsx"), 1);
5003
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4954
5004
  var Textarea = ({
4955
5005
  label,
4956
5006
  headline,
@@ -4971,27 +5021,27 @@ var Textarea = ({
4971
5021
  onEditCompleted(text);
4972
5022
  clearUpdateTimer();
4973
5023
  };
4974
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "w-full", children: [
4975
- label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5024
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "w-full", children: [
5025
+ label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4976
5026
  Label,
4977
5027
  {
4978
5028
  ...label,
4979
5029
  htmlFor: id,
4980
- className: (0, import_clsx40.default)("mb-1", label.className),
5030
+ className: (0, import_clsx41.default)("mb-1", label.className),
4981
5031
  labelType: label.labelType ?? "labelSmall"
4982
5032
  }
4983
5033
  ),
4984
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5034
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4985
5035
  "div",
4986
5036
  {
4987
- className: `${(0, import_clsx40.default)(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 border-gray-300 hover:border-primary rounded-lg": defaultStyle })}`,
5037
+ className: `${(0, import_clsx41.default)(" bg-surface text-on-surface focus-within:border-primary relative", { "shadow border-2 border-gray-300 hover:border-primary rounded-lg": defaultStyle })}`,
4988
5038
  children: [
4989
- headline && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "mx-3 mt-3 block text-gray-700 font-bold", children: headline }),
4990
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5039
+ headline && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "mx-3 mt-3 block text-gray-700 font-bold", children: headline }),
5040
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4991
5041
  "textarea",
4992
5042
  {
4993
5043
  id,
4994
- className: (0, import_clsx40.default)("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
5044
+ className: (0, import_clsx41.default)("pt-0 px-3 border-transparent focus:border-transparent focus:ring-0 appearance-none border w-full leading-tight focus:outline-none", {
4995
5045
  "resize-none": !resizable,
4996
5046
  "h-32": defaultStyle,
4997
5047
  "mt-3": !headline
@@ -5018,7 +5068,7 @@ var Textarea = ({
5018
5068
  ]
5019
5069
  }
5020
5070
  ),
5021
- hasFocus && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("label", { className: "text-negative", children: disclaimer })
5071
+ hasFocus && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("label", { className: "text-negative", children: disclaimer })
5022
5072
  ] });
5023
5073
  };
5024
5074
  var TextareaUncontrolled = ({
@@ -5030,7 +5080,7 @@ var TextareaUncontrolled = ({
5030
5080
  (0, import_react24.useEffect)(() => {
5031
5081
  setText(value);
5032
5082
  }, [value]);
5033
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5083
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5034
5084
  Textarea,
5035
5085
  {
5036
5086
  ...props,
@@ -5044,7 +5094,7 @@ var TextareaUncontrolled = ({
5044
5094
  };
5045
5095
 
5046
5096
  // src/components/properties/TextProperty.tsx
5047
- var import_jsx_runtime54 = require("react/jsx-runtime");
5097
+ var import_jsx_runtime55 = require("react/jsx-runtime");
5048
5098
  var defaultTextPropertyTranslation = {
5049
5099
  en: {
5050
5100
  value: "Text"
@@ -5064,21 +5114,21 @@ var TextProperty = ({
5064
5114
  }) => {
5065
5115
  const translation = useTranslation(defaultTextPropertyTranslation, overwriteTranslation);
5066
5116
  const hasValue = value !== void 0;
5067
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5117
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5068
5118
  PropertyBase,
5069
5119
  {
5070
5120
  ...baseProps,
5071
5121
  onRemove,
5072
5122
  hasValue,
5073
- icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react20.Text, { size: 16 }),
5074
- input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5123
+ icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react20.Text, { size: 16 }),
5124
+ input: ({ softRequired }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5075
5125
  "div",
5076
5126
  {
5077
- className: (0, import_clsx41.default)("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
5078
- children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5127
+ className: (0, import_clsx42.default)("row grow pt-2 pb-1 px-4 cursor-pointer", { "text-warning": softRequired && !hasValue }),
5128
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5079
5129
  Textarea,
5080
5130
  {
5081
- className: (0, import_clsx41.default)("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
5131
+ className: (0, import_clsx42.default)("ring-0 border-0 outline-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
5082
5132
  rows: 5,
5083
5133
  defaultStyle: false,
5084
5134
  value: value ?? "",
@@ -5107,8 +5157,8 @@ var TextProperty = ({
5107
5157
  };
5108
5158
 
5109
5159
  // src/components/user-action/DateAndTimePicker.tsx
5110
- var import_clsx42 = __toESM(require("clsx"), 1);
5111
- var import_jsx_runtime55 = require("react/jsx-runtime");
5160
+ var import_clsx43 = __toESM(require("clsx"), 1);
5161
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5112
5162
  var defaultTimeTranslation = {
5113
5163
  en: {
5114
5164
  clear: "Clear",
@@ -5167,7 +5217,7 @@ var DateTimePicker = ({
5167
5217
  let dateDisplay;
5168
5218
  let timeDisplay;
5169
5219
  if (useDate) {
5170
- dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5220
+ dateDisplay = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5171
5221
  DatePicker,
5172
5222
  {
5173
5223
  ...datePickerProps,
@@ -5181,25 +5231,25 @@ var DateTimePicker = ({
5181
5231
  );
5182
5232
  }
5183
5233
  if (useTime) {
5184
- timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5234
+ timeDisplay = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5185
5235
  TimePicker,
5186
5236
  {
5187
5237
  ...timePickerProps,
5188
- className: (0, import_clsx42.default)("h-full", { "justify-between w-full": mode === "time" }),
5238
+ className: (0, import_clsx43.default)("h-full", { "justify-between w-full": mode === "time" }),
5189
5239
  maxHeight: 250,
5190
5240
  time: value,
5191
5241
  onChange
5192
5242
  }
5193
5243
  );
5194
5244
  }
5195
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "col w-fit", children: [
5196
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "row gap-x-4", children: [
5245
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "col w-fit", children: [
5246
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "row gap-x-4", children: [
5197
5247
  dateDisplay,
5198
5248
  timeDisplay
5199
5249
  ] }),
5200
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "row justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "row gap-x-2 mt-1", children: [
5201
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation.clear }),
5202
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5250
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "row justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "row gap-x-2 mt-1", children: [
5251
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation.clear }),
5252
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5203
5253
  SolidButton,
5204
5254
  {
5205
5255
  size: "medium",
@@ -5213,8 +5263,8 @@ var DateTimePicker = ({
5213
5263
 
5214
5264
  // src/components/user-action/ScrollPicker.tsx
5215
5265
  var import_react25 = require("react");
5216
- var import_clsx43 = __toESM(require("clsx"), 1);
5217
- var import_jsx_runtime56 = require("react/jsx-runtime");
5266
+ var import_clsx44 = __toESM(require("clsx"), 1);
5267
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5218
5268
  var up = 1;
5219
5269
  var down = -1;
5220
5270
  var ScrollPicker = ({
@@ -5353,7 +5403,7 @@ var ScrollPicker = ({
5353
5403
  }
5354
5404
  return clamp(1 - opacityValue / max);
5355
5405
  };
5356
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5406
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5357
5407
  "div",
5358
5408
  {
5359
5409
  className: "relative overflow-hidden",
@@ -5363,15 +5413,15 @@ var ScrollPicker = ({
5363
5413
  setAnimation(({ velocity, ...animationData }) => ({ ...animationData, velocity: velocity + event.deltaY }));
5364
5414
  }
5365
5415
  },
5366
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
5367
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5416
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
5417
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5368
5418
  "div",
5369
5419
  {
5370
5420
  className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-y-2 border-x-0 border-[#00000033]",
5371
5421
  style: { height: `${itemHeight}px` }
5372
5422
  }
5373
5423
  ),
5374
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5424
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5375
5425
  "div",
5376
5426
  {
5377
5427
  className: "col select-none",
@@ -5379,10 +5429,10 @@ var ScrollPicker = ({
5379
5429
  transform: `translateY(${-transition * (distance + itemHeight)}px)`,
5380
5430
  columnGap: `${distance}px`
5381
5431
  },
5382
- children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5432
+ children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5383
5433
  "div",
5384
5434
  {
5385
- className: (0, import_clsx43.default)(
5435
+ className: (0, import_clsx44.default)(
5386
5436
  `col items-center justify-center rounded-md`,
5387
5437
  {
5388
5438
  "text-primary font-bold": currentIndex === index,
@@ -5411,8 +5461,8 @@ var ScrollPicker = ({
5411
5461
  // src/components/user-action/ToggleableInput.tsx
5412
5462
  var import_react26 = require("react");
5413
5463
  var import_lucide_react21 = require("lucide-react");
5414
- var import_clsx44 = __toESM(require("clsx"), 1);
5415
- var import_jsx_runtime57 = require("react/jsx-runtime");
5464
+ var import_clsx45 = __toESM(require("clsx"), 1);
5465
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5416
5466
  var ToggleableInput = ({
5417
5467
  type = "text",
5418
5468
  value,
@@ -5438,14 +5488,14 @@ var ToggleableInput = ({
5438
5488
  ref.current?.focus();
5439
5489
  }
5440
5490
  }, [isEditing]);
5441
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
5442
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5491
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
5492
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5443
5493
  "div",
5444
5494
  {
5445
- className: (0, import_clsx44.default)("row items-center w-full gap-x-2 overflow-hidden", { "cursor-pointer": !isEditing }),
5495
+ className: (0, import_clsx45.default)("row items-center w-full gap-x-2 overflow-hidden", { "cursor-pointer": !isEditing }),
5446
5496
  onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
5447
5497
  children: [
5448
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: (0, import_clsx44.default)("row overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5498
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: (0, import_clsx45.default)("row overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5449
5499
  "input",
5450
5500
  {
5451
5501
  ref,
@@ -5473,16 +5523,16 @@ var ToggleableInput = ({
5473
5523
  onEditCompletedWrapper(value);
5474
5524
  }
5475
5525
  },
5476
- className: (0, import_clsx44.default)(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
5526
+ className: (0, import_clsx45.default)(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
5477
5527
  underline: isEditing
5478
5528
  }, labelClassName),
5479
5529
  onFocus: (event) => event.target.select()
5480
5530
  }
5481
- ) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: (0, import_clsx44.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
5482
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5531
+ ) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: (0, import_clsx45.default)("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
5532
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5483
5533
  import_lucide_react21.Pencil,
5484
5534
  {
5485
- className: (0, import_clsx44.default)(`cursor-pointer`, { "text-transparent": isEditing }),
5535
+ className: (0, import_clsx45.default)(`cursor-pointer`, { "text-transparent": isEditing }),
5486
5536
  size,
5487
5537
  style: { minWidth: `${size}px` }
5488
5538
  }
@@ -5490,7 +5540,7 @@ var ToggleableInput = ({
5490
5540
  ]
5491
5541
  }
5492
5542
  ),
5493
- isEditing && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { className: "text-negative", children: disclaimer })
5543
+ isEditing && disclaimer && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("label", { className: "text-negative", children: disclaimer })
5494
5544
  ] });
5495
5545
  };
5496
5546
  var ToggleableInputUncontrolled = ({
@@ -5502,7 +5552,7 @@ var ToggleableInputUncontrolled = ({
5502
5552
  (0, import_react26.useEffect)(() => {
5503
5553
  setValue(initialValue);
5504
5554
  }, [initialValue]);
5505
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5555
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5506
5556
  ToggleableInput,
5507
5557
  {
5508
5558
  value,
@@ -5571,6 +5621,7 @@ var filterNews = (localizedNews, requiredKeys) => {
5571
5621
  ChipList,
5572
5622
  Circle,
5573
5623
  ConfirmDialog,
5624
+ ConfirmModal,
5574
5625
  DatePicker,
5575
5626
  DatePickerUncontrolled,
5576
5627
  DateProperty,
@@ -5605,7 +5656,6 @@ var filterNews = (localizedNews, requiredKeys) => {
5605
5656
  Menu,
5606
5657
  MenuItem,
5607
5658
  Modal,
5608
- ModalHeader,
5609
5659
  MultiSearchWithMapping,
5610
5660
  MultiSelect,
5611
5661
  MultiSelectProperty,
@@ -5613,6 +5663,7 @@ var filterNews = (localizedNews, requiredKeys) => {
5613
5663
  NumberProperty,
5614
5664
  OutlineButton,
5615
5665
  Overlay,
5666
+ OverlayHeader,
5616
5667
  Pagination,
5617
5668
  ProgressIndicator,
5618
5669
  PropertyBase,