@douglasneuroinformatics/libui 4.9.1 → 5.0.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 (29) hide show
  1. package/dist/components.d.ts +5 -48
  2. package/dist/components.js +1139 -725
  3. package/dist/components.js.map +1 -1
  4. package/dist/hooks.d.ts +4 -2
  5. package/dist/{types-9zYgx7C8.d.ts → types-CQ7qbFhC.d.ts} +57 -1
  6. package/package.json +3 -2
  7. package/src/components/DataTable/DataTable.stories.tsx +207 -37
  8. package/src/components/DataTable/DataTable.tsx +22 -279
  9. package/src/components/DataTable/DataTableBody.tsx +69 -0
  10. package/src/components/DataTable/DataTableContent.tsx +36 -0
  11. package/src/components/DataTable/DataTableControls.tsx +55 -0
  12. package/src/components/DataTable/DataTableEmptyState.tsx +25 -0
  13. package/src/components/DataTable/DataTableHead.tsx +58 -0
  14. package/src/components/DataTable/DataTablePagination.tsx +62 -0
  15. package/src/components/DataTable/DataTableRowActionCell.tsx +67 -0
  16. package/src/components/DataTable/__tests__/DataTable.spec.tsx +60 -0
  17. package/src/components/DataTable/constants.ts +7 -0
  18. package/src/components/DataTable/context.ts +5 -0
  19. package/src/components/DataTable/hooks.ts +60 -0
  20. package/src/components/DataTable/store.ts +203 -0
  21. package/src/components/DataTable/types.ts +99 -0
  22. package/src/components/DataTable/utils.tsx +138 -0
  23. package/src/components/Form/ErrorMessage.tsx +29 -7
  24. package/src/components/Form/Form.tsx +5 -1
  25. package/src/hooks/useDestructiveAction/useDestructiveActionStore.test.ts +2 -7
  26. package/src/hooks/useNotificationsStore/useNotificationsStore.test.ts +1 -8
  27. package/src/testing/setup-tests.ts +1 -3
  28. package/src/components/DataTable/DestructiveActionDialog.tsx +0 -67
  29. package/src/components/DataTable/RowActionsDropdown.tsx +0 -64
@@ -10,6 +10,7 @@ import {
10
10
  import {
11
11
  ChartContext,
12
12
  useChart,
13
+ useDestructiveAction,
13
14
  useNotificationsStore,
14
15
  useTheme,
15
16
  useTranslation
@@ -1530,26 +1531,313 @@ var CopyButton = ({
1530
1531
  };
1531
1532
 
1532
1533
  // src/components/DataTable/DataTable.tsx
1533
- import { useEffect, useMemo as useMemo2, useState as useState3 } from "react";
1534
- import {
1535
- flexRender,
1536
- getCoreRowModel,
1537
- getFilteredRowModel,
1538
- getPaginationRowModel,
1539
- getSortedRowModel,
1540
- useReactTable
1541
- } from "@tanstack/react-table";
1542
- import { range as range2 } from "lodash-es";
1543
- import { ArrowUpDownIcon, ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon4, ChevronsLeftIcon, ChevronsRightIcon } from "lucide-react";
1534
+ import { useEffect as useEffect3, useRef as useRef2 } from "react";
1535
+
1536
+ // src/components/DataTable/context.ts
1537
+ import { createContext } from "react";
1538
+ var DataTableContext = createContext(null);
1539
+
1540
+ // src/components/DataTable/constants.ts
1541
+ var ACTIONS_COLUMN_ID = "__actions";
1542
+ var MEMOIZED_HANDLE_ID = Symbol();
1543
+ var ROW_ACTIONS_METADATA_KEY = Symbol();
1544
+ var TABLE_NAME_METADATA_KEY = Symbol();
1545
+
1546
+ // src/components/DataTable/DataTableEmptyState.tsx
1547
+ import { jsx as jsx70, jsxs as jsxs18 } from "react/jsx-runtime";
1548
+ var DataTableEmptyState = ({
1549
+ className,
1550
+ description,
1551
+ icon: Icon,
1552
+ title
1553
+ }) => {
1554
+ return /* @__PURE__ */ jsxs18("div", { className: cn("flex flex-col items-center justify-center", className), "data-testid": "data-table-empty-state", children: [
1555
+ Icon && /* @__PURE__ */ jsx70(Icon, { className: "text-muted-foreground mb-2", style: { height: "20px", width: "20px" } }),
1556
+ /* @__PURE__ */ jsx70("h3", { className: "text-foreground text-sm font-semibold", children: title }),
1557
+ description && /* @__PURE__ */ jsx70("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
1558
+ ] });
1559
+ };
1560
+
1561
+ // src/components/DataTable/hooks.ts
1562
+ import { useContext, useEffect, useRef } from "react";
1563
+ import { useStore } from "zustand";
1564
+ import { useStoreWithEqualityFn } from "zustand/traditional";
1565
+ function useContainerRef() {
1566
+ const containerRef = useRef(null);
1567
+ const setContainerWidth = useDataTableStore((state) => state.setContainerWidth);
1568
+ useEffect(() => {
1569
+ let timeout;
1570
+ let delay = 0;
1571
+ const observer = new ResizeObserver(([entry]) => {
1572
+ clearTimeout(timeout);
1573
+ timeout = setTimeout(() => {
1574
+ delay = 100;
1575
+ if (entry?.contentBoxSize[0]?.inlineSize) {
1576
+ const containerWidth = entry.contentBoxSize[0].inlineSize;
1577
+ setContainerWidth(containerWidth);
1578
+ }
1579
+ }, delay);
1580
+ });
1581
+ if (containerRef.current) {
1582
+ observer.observe(containerRef.current);
1583
+ }
1584
+ return () => {
1585
+ observer.disconnect();
1586
+ clearTimeout(timeout);
1587
+ };
1588
+ }, []);
1589
+ return containerRef;
1590
+ }
1591
+ function useDataTableStore(selector) {
1592
+ const context = useContext(DataTableContext);
1593
+ return useStore(context.store, selector);
1594
+ }
1595
+ function useDataTableHandle(key, forceRender = false) {
1596
+ const context = useContext(DataTableContext);
1597
+ const { handle } = useStoreWithEqualityFn(
1598
+ context.store,
1599
+ // the function is already updated by the time of equality check, so we cache it here
1600
+ (store) => ({
1601
+ globalKey: store._key,
1602
+ handle: store.$handles[key],
1603
+ handleKey: store.$handles[key][MEMOIZED_HANDLE_ID]
1604
+ }),
1605
+ forceRender ? (a, b) => a.globalKey === b.globalKey : (a, b) => a.handleKey === b.handleKey
1606
+ );
1607
+ return handle();
1608
+ }
1609
+
1610
+ // src/components/DataTable/utils.tsx
1611
+ import { sum } from "lodash-es";
1612
+
1613
+ // src/components/DataTable/DataTableRowActionCell.tsx
1614
+ import { MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
1615
+ import { jsx as jsx71, jsxs as jsxs19 } from "react/jsx-runtime";
1616
+ var DataTableRowActionCell = ({ row, table }) => {
1617
+ const destructiveAction = useDestructiveAction();
1618
+ const rowActions = table.options.meta?.[ROW_ACTIONS_METADATA_KEY];
1619
+ const tableName = table.options.meta?.[TABLE_NAME_METADATA_KEY];
1620
+ const { t } = useTranslation();
1621
+ if (!rowActions) {
1622
+ console.error("Expected rowActions to be defined in table metadata");
1623
+ return null;
1624
+ }
1625
+ return /* @__PURE__ */ jsx71("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsxs19(DropdownMenu, { children: [
1626
+ /* @__PURE__ */ jsx71(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx71(
1627
+ Button,
1628
+ {
1629
+ className: "-m-1.5",
1630
+ "data-table-name": table.options.meta?.name,
1631
+ "data-testid": "row-actions-trigger",
1632
+ size: "icon",
1633
+ variant: "ghost",
1634
+ children: /* @__PURE__ */ jsx71(MoreHorizontalIcon2, { className: "h-4 w-4" })
1635
+ }
1636
+ ) }),
1637
+ /* @__PURE__ */ jsxs19(DropdownMenu.Content, { align: "end", "data-table-name": tableName, "data-testid": "row-actions-dropdown", children: [
1638
+ /* @__PURE__ */ jsx71(DropdownMenu.Label, { children: t({
1639
+ en: "Actions",
1640
+ fr: "Actions"
1641
+ }) }),
1642
+ rowActions.map(({ destructive, disabled, label, onSelect }, i) => /* @__PURE__ */ jsx71(
1643
+ DropdownMenu.Item,
1644
+ {
1645
+ className: cn(
1646
+ "cursor-pointer data-[disabled]:pointer-events-auto data-[disabled]:cursor-not-allowed",
1647
+ destructive && "text-destructive"
1648
+ ),
1649
+ disabled: typeof disabled === "function" ? disabled(row.original) : disabled,
1650
+ onSelect: () => {
1651
+ if (destructive) {
1652
+ destructiveAction(() => void onSelect(row.original, table));
1653
+ } else {
1654
+ void onSelect(row.original, table);
1655
+ }
1656
+ },
1657
+ children: label
1658
+ },
1659
+ i
1660
+ ))
1661
+ ] })
1662
+ ] }) });
1663
+ };
1664
+
1665
+ // src/components/DataTable/utils.tsx
1666
+ import { jsx as jsx72 } from "react/jsx-runtime";
1667
+ function applyUpdater(updater, current) {
1668
+ return typeof updater === "function" ? updater(current) : updater;
1669
+ }
1670
+ function calculateColumnSizing(table, containerWidth) {
1671
+ const updatedColumnSizing = {};
1672
+ const visibleCenterLeafColumns = table.getCenterLeafColumns().filter((column) => column.getIsVisible());
1673
+ const visibleCenterLeafColumnIds = visibleCenterLeafColumns.map((column) => column.id);
1674
+ const visibleNonCenteredLeafColumns = table.getVisibleLeafColumns().filter((column) => {
1675
+ return !visibleCenterLeafColumnIds.includes(column.id);
1676
+ });
1677
+ visibleNonCenteredLeafColumns.forEach((column) => {
1678
+ const defaultSize = column.columnDef.size;
1679
+ if (!defaultSize) {
1680
+ console.error(`Size must be specified for pinned column with ID '${column.id}', defaulting to 200px`);
1681
+ updatedColumnSizing[column.id] = 200;
1682
+ } else {
1683
+ updatedColumnSizing[column.id] = defaultSize;
1684
+ }
1685
+ });
1686
+ const nonCenteredColumnsSize = sum(Object.values(updatedColumnSizing));
1687
+ const availableCenterSize = containerWidth - nonCenteredColumnsSize;
1688
+ let maxCenterColumns;
1689
+ if (containerWidth < 512) {
1690
+ maxCenterColumns = 1;
1691
+ } else if (containerWidth < 768) {
1692
+ maxCenterColumns = 2;
1693
+ } else if (containerWidth < 1024) {
1694
+ maxCenterColumns = 3;
1695
+ } else if (containerWidth < 1280) {
1696
+ maxCenterColumns = 4;
1697
+ } else {
1698
+ maxCenterColumns = 5;
1699
+ }
1700
+ const centerColumnsToDisplay = Math.min(visibleCenterLeafColumns.length, maxCenterColumns);
1701
+ if (centerColumnsToDisplay) {
1702
+ visibleCenterLeafColumns.forEach((column) => {
1703
+ updatedColumnSizing[column.id] = availableCenterSize / centerColumnsToDisplay;
1704
+ });
1705
+ } else {
1706
+ visibleNonCenteredLeafColumns.forEach((column) => {
1707
+ updatedColumnSizing[column.id] = containerWidth / visibleNonCenteredLeafColumns.length;
1708
+ });
1709
+ }
1710
+ return updatedColumnSizing;
1711
+ }
1712
+ function defineMemoizedHandle(target) {
1713
+ const handle = target;
1714
+ handle[MEMOIZED_HANDLE_ID] = Symbol();
1715
+ handle.invalidate = function() {
1716
+ this[MEMOIZED_HANDLE_ID] = Symbol();
1717
+ };
1718
+ return handle;
1719
+ }
1720
+ function flexRender(Comp, props) {
1721
+ return !Comp ? null : isReactComponent(Comp) ? /* @__PURE__ */ jsx72(Comp, { ...props }) : Comp;
1722
+ }
1723
+ function getColumnsWithActions({ columns, rowActions }) {
1724
+ if (!rowActions) {
1725
+ return columns;
1726
+ }
1727
+ return [
1728
+ ...columns,
1729
+ {
1730
+ cell: DataTableRowActionCell,
1731
+ enableHiding: false,
1732
+ enableResizing: false,
1733
+ id: ACTIONS_COLUMN_ID,
1734
+ size: 64
1735
+ }
1736
+ ];
1737
+ }
1738
+ function getTanstackTableState({ initialState, rowActions }) {
1739
+ var _a;
1740
+ const { columnFilters = [], columnPinning = {}, sorting = [] } = initialState ?? {};
1741
+ const state = {
1742
+ columnFilters,
1743
+ columnOrder: [],
1744
+ columnPinning,
1745
+ columnSizing: {},
1746
+ columnSizingInfo: {
1747
+ columnSizingStart: [],
1748
+ deltaOffset: null,
1749
+ deltaPercentage: null,
1750
+ isResizingColumn: false,
1751
+ startOffset: null,
1752
+ startSize: null
1753
+ },
1754
+ columnVisibility: {},
1755
+ expanded: {},
1756
+ globalFilter: void 0,
1757
+ grouping: [],
1758
+ pagination: {
1759
+ pageIndex: 0,
1760
+ pageSize: 10
1761
+ },
1762
+ rowPinning: {},
1763
+ rowSelection: {},
1764
+ sorting
1765
+ };
1766
+ if (rowActions) {
1767
+ (_a = state.columnPinning).right ?? (_a.right = []);
1768
+ state.columnPinning.right.push(ACTIONS_COLUMN_ID);
1769
+ }
1770
+ return state;
1771
+ }
1772
+ function isReactComponent(component) {
1773
+ return typeof component === "function";
1774
+ }
1775
+
1776
+ // src/components/DataTable/DataTableBody.tsx
1777
+ import { jsx as jsx73 } from "react/jsx-runtime";
1778
+ var DataTableBody = ({
1779
+ emptyStateProps
1780
+ }) => {
1781
+ const rows = useDataTableHandle("rows");
1782
+ const { t } = useTranslation();
1783
+ return /* @__PURE__ */ jsx73("div", { className: "flex flex-col", "data-testid": "data-table-body", children: rows.length === 0 ? /* @__PURE__ */ jsx73(
1784
+ "div",
1785
+ {
1786
+ className: "sticky left-0 flex h-72 items-center justify-center px-6 py-3",
1787
+ style: {
1788
+ width: "calc(var(--table-container-width) * 1px)"
1789
+ },
1790
+ children: /* @__PURE__ */ jsx73(
1791
+ DataTableEmptyState,
1792
+ {
1793
+ title: t({
1794
+ en: "No Results",
1795
+ fr: "Aucun r\xE9sultat"
1796
+ }),
1797
+ ...emptyStateProps
1798
+ }
1799
+ )
1800
+ }
1801
+ ) : rows.map((row) => /* @__PURE__ */ jsx73("div", { className: "flex border-b last:border-b-0", "data-testid": "data-table-row", id: row.id, children: row.getVisibleCells().map((cell) => {
1802
+ const style = {
1803
+ width: `calc(var(--col-${cell.column.id}-size) * 1px)`
1804
+ };
1805
+ if (cell.column.getIsPinned() === "left") {
1806
+ style.left = `${cell.column.getStart("left")}px`;
1807
+ style.position = "sticky";
1808
+ style.zIndex = 20;
1809
+ } else if (cell.column.getIsPinned() === "right") {
1810
+ style.right = `${cell.column.getAfter("right")}px`;
1811
+ style.position = "sticky";
1812
+ style.zIndex = 20;
1813
+ }
1814
+ if (cell.column.getIsLastColumn("center")) {
1815
+ style.borderRight = "none";
1816
+ }
1817
+ const content = flexRender(cell.column.columnDef.cell, cell.getContext());
1818
+ return /* @__PURE__ */ jsx73(
1819
+ "div",
1820
+ {
1821
+ className: "bg-background flex items-center border-r px-4 py-2 last:border-r-0",
1822
+ style,
1823
+ children: content && typeof content === "object" ? content : /* @__PURE__ */ jsx73("span", { className: "block truncate", children: content })
1824
+ },
1825
+ cell.id
1826
+ );
1827
+ }) }, row.id)) });
1828
+ };
1829
+
1830
+ // src/components/DataTable/DataTableControls.tsx
1831
+ import { useEffect as useEffect2, useState as useState3 } from "react";
1544
1832
 
1545
1833
  // src/components/SearchBar/SearchBar.tsx
1546
1834
  import { SearchIcon as SearchIcon2 } from "lucide-react";
1547
1835
 
1548
1836
  // src/components/Input/Input.tsx
1549
1837
  import * as React15 from "react";
1550
- import { jsx as jsx70 } from "react/jsx-runtime";
1838
+ import { jsx as jsx74 } from "react/jsx-runtime";
1551
1839
  var Input = React15.forwardRef(function Input2({ className, type, ...props }, ref) {
1552
- return /* @__PURE__ */ jsx70(
1840
+ return /* @__PURE__ */ jsx74(
1553
1841
  "input",
1554
1842
  {
1555
1843
  autoComplete: "off",
@@ -1566,7 +1854,7 @@ var Input = React15.forwardRef(function Input2({ className, type, ...props }, re
1566
1854
  });
1567
1855
 
1568
1856
  // src/components/SearchBar/SearchBar.tsx
1569
- import { jsx as jsx71, jsxs as jsxs18 } from "react/jsx-runtime";
1857
+ import { jsx as jsx75, jsxs as jsxs20 } from "react/jsx-runtime";
1570
1858
  var SearchBar = ({
1571
1859
  className,
1572
1860
  onClick,
@@ -1577,9 +1865,9 @@ var SearchBar = ({
1577
1865
  ...props
1578
1866
  }) => {
1579
1867
  const { t } = useTranslation("libui");
1580
- return /* @__PURE__ */ jsxs18("form", { className: cn("relative", className), ...props, children: [
1581
- /* @__PURE__ */ jsx71(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
1582
- /* @__PURE__ */ jsx71(
1868
+ return /* @__PURE__ */ jsxs20("form", { className: cn("relative", className), ...props, children: [
1869
+ /* @__PURE__ */ jsx75(SearchIcon2, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
1870
+ /* @__PURE__ */ jsx75(
1583
1871
  Input,
1584
1872
  {
1585
1873
  className: "pl-8",
@@ -1596,285 +1884,384 @@ var SearchBar = ({
1596
1884
  ] });
1597
1885
  };
1598
1886
 
1599
- // src/components/DataTable/DestructiveActionDialog.tsx
1600
- import { jsx as jsx72, jsxs as jsxs19 } from "react/jsx-runtime";
1601
- var DestructiveActionDialog = ({ destructiveActionPending, setDestructiveActionPending }) => {
1887
+ // src/components/DataTable/DataTableControls.tsx
1888
+ import { jsx as jsx76, jsxs as jsxs21 } from "react/jsx-runtime";
1889
+ var DataTableControls = ({
1890
+ onSearchChange,
1891
+ togglesComponent: Toggles
1892
+ }) => {
1893
+ const table = useDataTableHandle("table");
1894
+ const setGlobalFilter = useDataTableStore((store) => store.setGlobalFilter);
1895
+ const [searchValue, setSearchValue] = useState3("");
1602
1896
  const { t } = useTranslation();
1603
- return /* @__PURE__ */ jsx72(
1604
- Dialog,
1605
- {
1606
- open: destructiveActionPending !== null,
1607
- onOpenChange: (open) => {
1608
- if (!open) {
1609
- setDestructiveActionPending(null);
1897
+ useEffect2(() => {
1898
+ if (onSearchChange) {
1899
+ onSearchChange(searchValue, table);
1900
+ } else {
1901
+ setGlobalFilter(searchValue || void 0);
1902
+ }
1903
+ }, [onSearchChange, searchValue]);
1904
+ return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-4 pb-4 md:flex-row", children: [
1905
+ /* @__PURE__ */ jsx76(
1906
+ SearchBar,
1907
+ {
1908
+ className: "w-full grow",
1909
+ "data-testid": "data-table-search-bar",
1910
+ placeholder: t({
1911
+ en: "Search...",
1912
+ fr: "Rechercher..."
1913
+ }),
1914
+ value: searchValue,
1915
+ onValueChange: (value) => {
1916
+ setSearchValue(value);
1610
1917
  }
1611
- },
1612
- children: /* @__PURE__ */ jsxs19(Dialog.Content, { onOpenAutoFocus: (event) => event.preventDefault(), children: [
1613
- /* @__PURE__ */ jsxs19(Dialog.Header, { children: [
1614
- /* @__PURE__ */ jsx72(Dialog.Title, { children: t({
1615
- en: "Confirm Action",
1616
- fr: "Confirmer l'action"
1617
- }) }),
1618
- /* @__PURE__ */ jsx72(Dialog.Description, { children: t({
1619
- en: "This action cannot be reversed. Please confirm that you would like to continue.",
1620
- fr: "Cette action ne peut \xEAtre invers\xE9e. Veuillez confirmer que vous souhaitez poursuivre."
1621
- }) })
1622
- ] }),
1623
- /* @__PURE__ */ jsxs19(Dialog.Footer, { children: [
1624
- /* @__PURE__ */ jsx72(
1625
- Button,
1626
- {
1627
- className: "min-w-16",
1628
- type: "button",
1629
- variant: "danger",
1630
- onClick: async () => {
1631
- await destructiveActionPending?.();
1632
- setDestructiveActionPending(null);
1633
- },
1634
- children: t("libui.yes")
1635
- }
1636
- ),
1637
- /* @__PURE__ */ jsx72(
1638
- Button,
1918
+ }
1919
+ ),
1920
+ Toggles && /* @__PURE__ */ jsx76("div", { className: "flex w-full items-center gap-2 md:w-auto", children: /* @__PURE__ */ jsx76(Toggles, { table }) })
1921
+ ] });
1922
+ };
1923
+
1924
+ // src/components/DataTable/DataTableHead.tsx
1925
+ import { jsx as jsx77, jsxs as jsxs22 } from "react/jsx-runtime";
1926
+ var DataTableHead = () => {
1927
+ const headerGroups = useDataTableHandle("headerGroups");
1928
+ const rowCount = useDataTableHandle("rowCount");
1929
+ return /* @__PURE__ */ jsx77("div", { className: "flex flex-col", "data-testid": "data-table-head", style: { display: rowCount ? "flex" : "none" }, children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx77("div", { className: "flex", children: headerGroup.headers.map((header) => {
1930
+ const style = {
1931
+ // TODO - add more robust solution - should be able to block centering also - also set correct typing
1932
+ justifyContent: header.column.columnDef.meta?.centered ? "center" : "start",
1933
+ width: `calc(var(--header-${header?.id}-size) * 1px)`
1934
+ };
1935
+ if (header.column.getIsPinned() === "left") {
1936
+ style.left = `${header.column.getStart("left")}px`;
1937
+ style.position = "sticky";
1938
+ style.zIndex = 20;
1939
+ } else if (header.column.getIsPinned() === "right") {
1940
+ style.right = `${header.column.getAfter("right")}px`;
1941
+ style.position = "sticky";
1942
+ style.zIndex = 20;
1943
+ }
1944
+ if (header.column.getIsLastColumn("center")) {
1945
+ style.borderRight = "none";
1946
+ }
1947
+ return /* @__PURE__ */ jsxs22(
1948
+ "div",
1949
+ {
1950
+ className: "group/cell bg-background relative flex items-center border-r border-b px-4 py-2 last:border-r-0",
1951
+ style,
1952
+ children: [
1953
+ !header.isPlaceholder && flexRender(header.column.columnDef.header, header.getContext()),
1954
+ header.column.getCanResize() && /* @__PURE__ */ jsx77("div", { className: "absolute top-0 right-0 z-10 h-full w-[1px]", children: /* @__PURE__ */ jsx77(
1955
+ "button",
1639
1956
  {
1640
- className: "min-w-16",
1957
+ className: "group-hover/cell:bg-border absolute -right-[1px] h-full w-full cursor-col-resize touch-none rounded-md bg-transparent select-none group-hover/cell:-right-[2px] group-hover/cell:w-[3px]",
1958
+ style: { transform: header.column.getIsLastColumn() ? "translateX(-2px)" : void 0 },
1641
1959
  type: "button",
1642
- variant: "primary",
1643
- onClick: () => setDestructiveActionPending(null),
1644
- children: t("libui.no")
1960
+ onDoubleClick: header.column.resetSize,
1961
+ onMouseDown: header.getResizeHandler(),
1962
+ onTouchStart: header.getResizeHandler()
1645
1963
  }
1646
- )
1647
- ] })
1648
- ] })
1649
- }
1650
- );
1964
+ ) })
1965
+ ]
1966
+ },
1967
+ header.id
1968
+ );
1969
+ }) }, headerGroup.id)) });
1651
1970
  };
1652
1971
 
1653
- // src/components/DataTable/RowActionsDropdown.tsx
1654
- import { MoreHorizontalIcon as MoreHorizontalIcon2 } from "lucide-react";
1655
- import { jsx as jsx73, jsxs as jsxs20 } from "react/jsx-runtime";
1656
- var RowActionsDropdown = ({
1657
- row,
1658
- rowActions,
1659
- setDestructiveActionPending
1660
- }) => {
1661
- const { t } = useTranslation();
1662
- return /* @__PURE__ */ jsx73("div", { className: "flex w-full justify-end", children: /* @__PURE__ */ jsxs20(DropdownMenu, { children: [
1663
- /* @__PURE__ */ jsx73(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx73(Button, { className: "-m-1.5", size: "icon", variant: "ghost", children: /* @__PURE__ */ jsx73(MoreHorizontalIcon2, { className: "h-4 w-4" }) }) }),
1664
- /* @__PURE__ */ jsxs20(DropdownMenu.Content, { align: "end", children: [
1665
- /* @__PURE__ */ jsx73(DropdownMenu.Label, { children: t({
1666
- en: "Actions",
1667
- fr: "Actions"
1668
- }) }),
1669
- rowActions.map(({ destructive, label, onSelect }, i) => /* @__PURE__ */ jsx73(
1670
- DropdownMenu.Item,
1671
- {
1672
- className: destructive ? "text-destructive" : void 0,
1673
- onSelect: () => {
1674
- if (destructive) {
1675
- setDestructiveActionPending(() => () => void onSelect(row.original));
1676
- } else {
1677
- void onSelect(row.original);
1678
- }
1679
- },
1680
- children: label
1681
- },
1682
- i
1683
- ))
1684
- ] })
1685
- ] }) });
1972
+ // src/components/DataTable/DataTablePagination.tsx
1973
+ import { range as range2 } from "lodash-es";
1974
+ import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon4, ChevronsLeftIcon, ChevronsRightIcon } from "lucide-react";
1975
+ import { jsx as jsx78, jsxs as jsxs23 } from "react/jsx-runtime";
1976
+ var DataTablePagination = () => {
1977
+ const { pageCount, pageIndex } = useDataTableHandle("paginationInfo");
1978
+ const setPageIndex = useDataTableStore((store) => store.setPageIndex);
1979
+ const start = Math.max(0, Math.min(pageIndex - 1, pageCount - 3));
1980
+ const end = Math.max(Math.min(start + 3, pageCount), 1);
1981
+ const pageIndexOptions = range2(start, end);
1982
+ const lastPageIndex = pageCount - 1;
1983
+ return /* @__PURE__ */ jsxs23("div", { className: "mx-auto flex w-min gap-0.5 py-4 [&>button]:h-9", children: [
1984
+ /* @__PURE__ */ jsx78(Button, { disabled: pageIndex === 0, size: "icon", type: "button", variant: "ghost", onClick: () => setPageIndex(0), children: /* @__PURE__ */ jsx78(ChevronsLeftIcon, { className: "h-4 w-4" }) }),
1985
+ /* @__PURE__ */ jsx78(
1986
+ Button,
1987
+ {
1988
+ disabled: pageIndex === 0,
1989
+ size: "icon",
1990
+ type: "button",
1991
+ variant: "ghost",
1992
+ onClick: () => setPageIndex(pageIndex - 1),
1993
+ children: /* @__PURE__ */ jsx78(ChevronLeftIcon, { className: "h-4 w-4" })
1994
+ }
1995
+ ),
1996
+ pageIndexOptions.map((index) => /* @__PURE__ */ jsx78(
1997
+ Button,
1998
+ {
1999
+ size: "icon",
2000
+ type: "button",
2001
+ variant: index === pageIndex ? "outline" : "ghost",
2002
+ onClick: () => setPageIndex(index),
2003
+ children: index + 1
2004
+ },
2005
+ index
2006
+ )),
2007
+ /* @__PURE__ */ jsx78(
2008
+ Button,
2009
+ {
2010
+ disabled: pageIndex === lastPageIndex,
2011
+ size: "icon",
2012
+ type: "button",
2013
+ variant: "ghost",
2014
+ onClick: () => setPageIndex(pageIndex + 1),
2015
+ children: /* @__PURE__ */ jsx78(ChevronRightIcon4, { className: "h-4 w-4" })
2016
+ }
2017
+ ),
2018
+ /* @__PURE__ */ jsx78(
2019
+ Button,
2020
+ {
2021
+ disabled: pageIndex === lastPageIndex,
2022
+ size: "icon",
2023
+ type: "button",
2024
+ variant: "ghost",
2025
+ onClick: () => setPageIndex(lastPageIndex),
2026
+ children: /* @__PURE__ */ jsx78(ChevronsRightIcon, { className: "h-4 w-4" })
2027
+ }
2028
+ )
2029
+ ] });
1686
2030
  };
1687
2031
 
1688
- // src/components/DataTable/DataTable.tsx
1689
- import { jsx as jsx74, jsxs as jsxs21 } from "react/jsx-runtime";
1690
- function isStaticColumn(column) {
1691
- return typeof column.key === "string";
1692
- }
1693
- var DataTable = ({
1694
- columns,
1695
- data,
1696
- headerActions,
1697
- rowActions,
1698
- search
2032
+ // src/components/DataTable/DataTableContent.tsx
2033
+ import { jsx as jsx79, jsxs as jsxs24 } from "react/jsx-runtime";
2034
+ var DataTableContent = ({
2035
+ emptyStateProps,
2036
+ onSearchChange,
2037
+ togglesComponent
1699
2038
  }) => {
1700
- const [columnFilters, setColumnFilters] = useState3([]);
1701
- const [sorting, setSorting] = useState3([]);
1702
- const [searchValue, setSearchValue] = useState3("");
1703
- const [destructiveActionPending, setDestructiveActionPending] = useState3(null);
1704
- const { t } = useTranslation("libui");
1705
- const [pagination, setPagination] = useState3({
1706
- pageIndex: 0,
1707
- pageSize: 10
1708
- });
1709
- const columnDefs = useMemo2(() => {
1710
- const result = columns.map((col) => {
1711
- let def;
1712
- if (isStaticColumn(col)) {
1713
- def = {
1714
- accessorKey: col.key,
1715
- header: col.sortable ? ({ column }) => /* @__PURE__ */ jsxs21(
1716
- "button",
1717
- {
1718
- className: "flex items-center justify-between gap-2",
1719
- onClick: () => column.toggleSorting(column.getIsSorted() === "asc"),
1720
- children: [
1721
- col.label,
1722
- /* @__PURE__ */ jsx74(ArrowUpDownIcon, { className: "h-4 w-4" })
1723
- ]
1724
- }
1725
- ) : col.label
1726
- };
1727
- if (col.format) {
1728
- def.cell = ({ getValue }) => {
1729
- const value = getValue();
1730
- if (typeof col.format === "function") {
1731
- return col.format(value);
1732
- } else if (col.format === "email") {
1733
- return /* @__PURE__ */ jsx74("a", { className: "hover:underline", href: `mailto:${value}`, children: value });
1734
- }
1735
- return value;
1736
- };
1737
- }
1738
- } else {
1739
- def = {
1740
- accessorFn: col.compute,
1741
- header: col.label
1742
- };
1743
- }
1744
- return def;
1745
- });
1746
- if (rowActions) {
1747
- result.push({
1748
- cell: ({ row }) => {
1749
- return /* @__PURE__ */ jsx74(
1750
- RowActionsDropdown,
1751
- {
1752
- row,
1753
- rowActions,
1754
- setDestructiveActionPending
1755
- }
1756
- );
1757
- },
1758
- id: "__actions"
1759
- });
1760
- }
1761
- return result;
1762
- }, [columns]);
1763
- const table = useReactTable({
1764
- columns: columnDefs,
1765
- data,
1766
- getCoreRowModel: getCoreRowModel(),
1767
- getFilteredRowModel: getFilteredRowModel(),
1768
- getPaginationRowModel: getPaginationRowModel(),
1769
- getSortedRowModel: getSortedRowModel(),
1770
- onColumnFiltersChange: setColumnFilters,
1771
- onPaginationChange: setPagination,
1772
- onSortingChange: setSorting,
1773
- state: {
1774
- columnFilters,
1775
- pagination,
1776
- sorting
1777
- }
1778
- });
1779
- useEffect(() => {
1780
- if (search) {
1781
- table.getColumn(search.key)?.setFilterValue(searchValue);
2039
+ const containerRef = useContainerRef();
2040
+ const meta = useDataTableHandle("tableMeta");
2041
+ const style = useDataTableStore((state) => state.style);
2042
+ return /* @__PURE__ */ jsxs24(
2043
+ "div",
2044
+ {
2045
+ className: "bg-background flex w-full flex-col",
2046
+ "data-name": meta[TABLE_NAME_METADATA_KEY],
2047
+ "data-testid": "data-table",
2048
+ children: [
2049
+ /* @__PURE__ */ jsx79(DataTableControls, { togglesComponent, onSearchChange }),
2050
+ /* @__PURE__ */ jsx79("div", { className: "relative w-full overflow-auto rounded-md border", ref: containerRef, children: /* @__PURE__ */ jsxs24("div", { className: "flex min-w-full flex-col text-sm tracking-tight", style, children: [
2051
+ /* @__PURE__ */ jsx79(DataTableHead, {}),
2052
+ /* @__PURE__ */ jsx79(DataTableBody, { emptyStateProps })
2053
+ ] }) }),
2054
+ /* @__PURE__ */ jsx79(DataTablePagination, {})
2055
+ ]
1782
2056
  }
1783
- }, [table, searchValue]);
1784
- const headerGroups = table.getHeaderGroups();
1785
- const { rows } = table.getRowModel();
1786
- const pageCount = table.getPageCount();
1787
- const currentPage = pagination.pageIndex;
1788
- const start = Math.max(0, Math.min(currentPage - 1, pageCount - 3));
1789
- const end = Math.min(start + 3, pageCount);
1790
- const pageIndexOptions = range2(start, end);
1791
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", children: [
1792
- /* @__PURE__ */ jsx74(
1793
- DestructiveActionDialog,
1794
- {
1795
- destructiveActionPending,
1796
- setDestructiveActionPending
2057
+ );
2058
+ };
2059
+
2060
+ // src/components/DataTable/store.ts
2061
+ import {
2062
+ createTable,
2063
+ getCoreRowModel,
2064
+ getFilteredRowModel,
2065
+ getPaginationRowModel,
2066
+ getSortedRowModel
2067
+ } from "@tanstack/table-core";
2068
+ import { createStore } from "zustand";
2069
+ function createDataTableStore(params) {
2070
+ return createStore((set2, get2) => {
2071
+ const _state = getTanstackTableState(params);
2072
+ const invalidateHandles = (keys) => {
2073
+ set2((state) => {
2074
+ (keys ?? Object.keys(state.$handles)).forEach((key) => {
2075
+ state.$handles[key].invalidate();
2076
+ });
2077
+ return { _key: Symbol() };
2078
+ });
2079
+ };
2080
+ const setTableState = (key, updaterOrValue) => {
2081
+ const state = table.getState();
2082
+ const value = applyUpdater(updaterOrValue, state[key]);
2083
+ table.setOptions((prev) => ({ ...prev, state: { ...prev.state, [key]: value } }));
2084
+ };
2085
+ const updateColumnSizing = () => {
2086
+ const { _containerWidth } = get2();
2087
+ if (!_containerWidth) {
2088
+ return;
1797
2089
  }
1798
- ),
1799
- search && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-4 py-4", children: [
1800
- /* @__PURE__ */ jsx74(
1801
- SearchBar,
1802
- {
1803
- className: "grow",
1804
- placeholder: search.placeholder,
1805
- value: searchValue,
1806
- onValueChange: setSearchValue
2090
+ setTableState("columnSizing", calculateColumnSizing(table, _containerWidth));
2091
+ };
2092
+ const updateStyle = () => {
2093
+ set2((state) => {
2094
+ const headers = table.getFlatHeaders();
2095
+ const style = {
2096
+ width: table.getTotalSize()
2097
+ };
2098
+ if (state._containerWidth === null) {
2099
+ style["--table-container-width"] = state._containerWidth;
2100
+ style.visibility = "hidden";
2101
+ } else {
2102
+ style["--table-container-width"] = state._containerWidth;
2103
+ style.visibility = "visible";
1807
2104
  }
1808
- ),
1809
- headerActions && /* @__PURE__ */ jsx74("div", { className: "flex gap-2", children: headerActions.map(({ label, onClick }, i) => /* @__PURE__ */ jsx74(Button, { type: "button", variant: "outline", onClick, children: label }, i)) })
1810
- ] }),
1811
- /* @__PURE__ */ jsx74("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs21(Table, { children: [
1812
- /* @__PURE__ */ jsx74(Table.Header, { children: headerGroups.map((headerGroup) => /* @__PURE__ */ jsx74(Table.Row, { children: headerGroup.headers.map((header) => {
1813
- return /* @__PURE__ */ jsx74(Table.Head, { children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
1814
- }) }, headerGroup.id)) }),
1815
- /* @__PURE__ */ jsx74(Table.Body, { children: rows?.length ? rows.map((row) => /* @__PURE__ */ jsx74(Table.Row, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx74(Table.Cell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) : /* @__PURE__ */ jsx74(Table.Row, { children: /* @__PURE__ */ jsx74(Table.Cell, { className: "h-24 text-center", colSpan: rowActions ? columns.length + 1 : columns.length, children: t({
1816
- en: "No Results",
1817
- fr: "Aucun r\xE9sultat"
1818
- }) }) }) })
1819
- ] }) }),
1820
- /* @__PURE__ */ jsxs21("div", { className: "flex w-min gap-0.5 py-4 [&>button]:h-9", children: [
1821
- /* @__PURE__ */ jsx74(
1822
- Button,
1823
- {
1824
- disabled: !table.getCanPreviousPage(),
1825
- size: "icon",
1826
- type: "button",
1827
- variant: "ghost",
1828
- onClick: () => table.firstPage(),
1829
- children: /* @__PURE__ */ jsx74(ChevronsLeftIcon, { className: "h-4 w-4" })
2105
+ for (const header of headers) {
2106
+ style[`--header-${header.id}-size`] = header.getSize();
2107
+ style[`--col-${header.column.id}-size`] = header.column.getSize();
1830
2108
  }
1831
- ),
1832
- /* @__PURE__ */ jsx74(
1833
- Button,
1834
- {
1835
- disabled: !table.getCanPreviousPage(),
1836
- size: "icon",
1837
- type: "button",
1838
- variant: "ghost",
1839
- onClick: () => table.previousPage(),
1840
- children: /* @__PURE__ */ jsx74(ChevronLeftIcon, { className: "h-4 w-4" })
2109
+ return { style };
2110
+ });
2111
+ };
2112
+ const table = createTable({
2113
+ columnResizeMode: "onChange",
2114
+ columns: getColumnsWithActions(params),
2115
+ data: params.data,
2116
+ enableSortingRemoval: false,
2117
+ getCoreRowModel: getCoreRowModel(),
2118
+ getFilteredRowModel: getFilteredRowModel(),
2119
+ getPaginationRowModel: getPaginationRowModel(),
2120
+ getSortedRowModel: getSortedRowModel(),
2121
+ meta: {
2122
+ ...params.meta,
2123
+ [ROW_ACTIONS_METADATA_KEY]: params.rowActions,
2124
+ [TABLE_NAME_METADATA_KEY]: params.tableName
2125
+ },
2126
+ onColumnFiltersChange: (updaterOrValue) => {
2127
+ setTableState("columnFilters", updaterOrValue);
2128
+ invalidateHandles();
2129
+ },
2130
+ onColumnPinningChange: (updaterOrValue) => {
2131
+ setTableState("columnPinning", updaterOrValue);
2132
+ invalidateHandles();
2133
+ },
2134
+ onColumnSizingChange: (updaterOrValue) => {
2135
+ const { _containerWidth: containerWidth } = get2();
2136
+ const { columnSizing: prevColumnSizing } = table.getState();
2137
+ if (!containerWidth) {
2138
+ console.error("Cannot set column sizing: container width is null");
2139
+ return;
1841
2140
  }
1842
- ),
1843
- pageIndexOptions.map((index) => /* @__PURE__ */ jsx74(
1844
- Button,
1845
- {
1846
- size: "icon",
1847
- type: "button",
1848
- variant: index === pagination.pageIndex ? "outline" : "ghost",
1849
- onClick: () => table.setPageIndex(index),
1850
- children: index + 1
1851
- },
1852
- index
1853
- )),
1854
- /* @__PURE__ */ jsx74(
1855
- Button,
1856
- {
1857
- disabled: !table.getCanNextPage(),
1858
- size: "icon",
1859
- type: "button",
1860
- variant: "ghost",
1861
- onClick: () => table.nextPage(),
1862
- children: /* @__PURE__ */ jsx74(ChevronRightIcon4, { className: "h-4 w-4" })
2141
+ const updatedColumnSizing = applyUpdater(updaterOrValue, prevColumnSizing);
2142
+ const computedWidth = table.getVisibleLeafColumns().reduce((previous, current) => {
2143
+ return previous + (updatedColumnSizing[current.id] ?? current.getSize());
2144
+ }, 0);
2145
+ if (Number.isNaN(computedWidth)) {
2146
+ console.error("Failed to compute width for columns");
2147
+ return;
1863
2148
  }
1864
- ),
1865
- /* @__PURE__ */ jsx74(
1866
- Button,
1867
- {
1868
- disabled: !table.getCanNextPage(),
1869
- size: "icon",
1870
- type: "button",
1871
- variant: "ghost",
1872
- onClick: () => table.lastPage(),
1873
- children: /* @__PURE__ */ jsx74(ChevronsRightIcon, { className: "h-4 w-4" })
2149
+ if (containerWidth > computedWidth) {
2150
+ return;
1874
2151
  }
1875
- )
1876
- ] })
1877
- ] });
2152
+ setTableState("columnSizing", updatedColumnSizing);
2153
+ updateStyle();
2154
+ invalidateHandles();
2155
+ },
2156
+ onColumnSizingInfoChange: (updaterOrValue) => {
2157
+ setTableState("columnSizingInfo", updaterOrValue);
2158
+ updateStyle();
2159
+ invalidateHandles();
2160
+ },
2161
+ onColumnVisibilityChange: (updaterOrValue) => {
2162
+ setTableState("columnVisibility", updaterOrValue);
2163
+ updateColumnSizing();
2164
+ updateStyle();
2165
+ invalidateHandles();
2166
+ },
2167
+ onGlobalFilterChange: (updaterOrValue) => {
2168
+ setTableState("globalFilter", updaterOrValue);
2169
+ invalidateHandles();
2170
+ },
2171
+ onPaginationChange: (updaterOrValue) => {
2172
+ setTableState("pagination", updaterOrValue);
2173
+ invalidateHandles();
2174
+ },
2175
+ onSortingChange: (updaterOrValue) => {
2176
+ setTableState("sorting", updaterOrValue);
2177
+ invalidateHandles();
2178
+ },
2179
+ onStateChange: (updaterOrValue) => {
2180
+ const prevState = table.getState();
2181
+ table.setOptions((prev) => ({
2182
+ ...prev,
2183
+ state: typeof updaterOrValue === "function" ? updaterOrValue(prevState) : updaterOrValue
2184
+ }));
2185
+ invalidateHandles();
2186
+ },
2187
+ renderFallbackValue: null,
2188
+ state: _state
2189
+ });
2190
+ return {
2191
+ $handles: {
2192
+ headerGroups: defineMemoizedHandle(() => table.getHeaderGroups()),
2193
+ paginationInfo: defineMemoizedHandle(() => {
2194
+ const { pagination } = table.getState();
2195
+ return {
2196
+ pageCount: table.getPageCount(),
2197
+ pageIndex: pagination.pageIndex
2198
+ };
2199
+ }),
2200
+ rowCount: defineMemoizedHandle(() => table.getRowCount()),
2201
+ rows: defineMemoizedHandle(() => {
2202
+ const { rows } = table.getRowModel();
2203
+ return rows;
2204
+ }),
2205
+ table: defineMemoizedHandle(() => table),
2206
+ tableMeta: defineMemoizedHandle(() => table.options.meta ?? {})
2207
+ },
2208
+ _containerWidth: null,
2209
+ _key: Symbol(),
2210
+ reset: (params2) => {
2211
+ table.setOptions((options) => ({
2212
+ ...options,
2213
+ columns: getColumnsWithActions(params2),
2214
+ data: params2.data,
2215
+ meta: {
2216
+ ...params2.meta,
2217
+ [ROW_ACTIONS_METADATA_KEY]: params2.rowActions,
2218
+ [TABLE_NAME_METADATA_KEY]: params2.tableName
2219
+ },
2220
+ state: getTanstackTableState(params2)
2221
+ }));
2222
+ invalidateHandles();
2223
+ },
2224
+ setContainerWidth: (containerWidth) => {
2225
+ set2(() => {
2226
+ return { _containerWidth: containerWidth };
2227
+ });
2228
+ updateColumnSizing();
2229
+ updateStyle();
2230
+ },
2231
+ setGlobalFilter: (globalFilter) => {
2232
+ table.setGlobalFilter(globalFilter);
2233
+ },
2234
+ setPageIndex: (index) => {
2235
+ table.setPageIndex(index);
2236
+ },
2237
+ style: {
2238
+ visibility: "hidden"
2239
+ }
2240
+ };
2241
+ });
2242
+ }
2243
+
2244
+ // src/components/DataTable/DataTable.tsx
2245
+ import { jsx as jsx80 } from "react/jsx-runtime";
2246
+ var DataTable = ({
2247
+ emptyStateProps,
2248
+ onSearchChange,
2249
+ togglesComponent,
2250
+ ...props
2251
+ }) => {
2252
+ const storeRef = useRef2(createDataTableStore(props));
2253
+ useEffect3(() => {
2254
+ const { reset } = storeRef.current.getState();
2255
+ reset(props);
2256
+ }, [props]);
2257
+ return /* @__PURE__ */ jsx80(DataTableContext.Provider, { value: { store: storeRef.current }, children: /* @__PURE__ */ jsx80(
2258
+ DataTableContent,
2259
+ {
2260
+ emptyStateProps,
2261
+ togglesComponent,
2262
+ onSearchChange
2263
+ }
2264
+ ) });
1878
2265
  };
1879
2266
 
1880
2267
  // src/components/DatePicker/DatePicker.tsx
@@ -1886,7 +2273,7 @@ import { AnimatePresence as AnimatePresence3, motion as motion3 } from "motion/r
1886
2273
  import { forwardRef as forwardRef58 } from "react";
1887
2274
  import { range as range3 } from "lodash-es";
1888
2275
  import { AnimatePresence as AnimatePresence2, motion as motion2 } from "motion/react";
1889
- import { jsx as jsx75, jsxs as jsxs22 } from "react/jsx-runtime";
2276
+ import { jsx as jsx81, jsxs as jsxs25 } from "react/jsx-runtime";
1890
2277
  var CALENDAR_ANIMATION_DURATION = 0.2;
1891
2278
  var Calendar = forwardRef58(function Calendar2(props, ref) {
1892
2279
  const { t } = useTranslation("libui");
@@ -1902,17 +2289,17 @@ var Calendar = forwardRef58(function Calendar2(props, ref) {
1902
2289
  t("days.friday"),
1903
2290
  t("days.saturday")
1904
2291
  ];
1905
- return /* @__PURE__ */ jsx75(AnimatePresence2, { initial: false, mode: "wait", children: /* @__PURE__ */ jsx75(
2292
+ return /* @__PURE__ */ jsx81(AnimatePresence2, { initial: false, mode: "wait", children: /* @__PURE__ */ jsx81(
1906
2293
  motion2.div,
1907
2294
  {
1908
2295
  animate: { opacity: 1, x: 0 },
1909
2296
  exit: { opacity: 0, x: -20 },
1910
2297
  initial: { opacity: 0, x: 20 },
1911
2298
  transition: { duration: CALENDAR_ANIMATION_DURATION },
1912
- children: /* @__PURE__ */ jsxs22("div", { className: "grid h-56 w-56 grid-cols-7 text-sm", ref, children: [
1913
- daysOfWeek.map((label) => /* @__PURE__ */ jsx75("div", { className: "flex h-8 w-8 items-center justify-center text-muted-foreground", children: label.charAt(0).toUpperCase() }, label)),
1914
- /* @__PURE__ */ jsx75("div", { style: { gridColumn: `span ${firstDay} / span ${firstDay}` } }),
1915
- days.map((day) => /* @__PURE__ */ jsx75(
2299
+ children: /* @__PURE__ */ jsxs25("div", { className: "grid h-56 w-56 grid-cols-7 text-sm", ref, children: [
2300
+ daysOfWeek.map((label) => /* @__PURE__ */ jsx81("div", { className: "flex h-8 w-8 items-center justify-center text-muted-foreground", children: label.charAt(0).toUpperCase() }, label)),
2301
+ /* @__PURE__ */ jsx81("div", { style: { gridColumn: `span ${firstDay} / span ${firstDay}` } }),
2302
+ days.map((day) => /* @__PURE__ */ jsx81(
1916
2303
  "button",
1917
2304
  {
1918
2305
  className: "dark:hover:bg-extra-muted flex h-8 w-8 items-center justify-center rounded-md hover:bg-slate-200 dark:hover:bg-slate-700",
@@ -1932,7 +2319,7 @@ var Calendar = forwardRef58(function Calendar2(props, ref) {
1932
2319
  });
1933
2320
 
1934
2321
  // src/components/DatePicker/YearSelector.tsx
1935
- import { useEffect as useEffect2, useRef } from "react";
2322
+ import { useEffect as useEffect4, useRef as useRef3 } from "react";
1936
2323
  import { range as range4 } from "lodash-es";
1937
2324
 
1938
2325
  // src/components/ScrollArea/ScrollArea.tsx
@@ -1942,9 +2329,9 @@ import { Corner, Root as Root8, Viewport } from "@radix-ui/react-scroll-area";
1942
2329
  // src/components/ScrollArea/ScrollBar.tsx
1943
2330
  import { forwardRef as forwardRef59 } from "react";
1944
2331
  import { ScrollAreaScrollbar, ScrollAreaThumb } from "@radix-ui/react-scroll-area";
1945
- import { jsx as jsx76 } from "react/jsx-runtime";
2332
+ import { jsx as jsx82 } from "react/jsx-runtime";
1946
2333
  var ScrollBar = forwardRef59(function ScrollBar2({ className, orientation = "vertical", ...props }, ref) {
1947
- return /* @__PURE__ */ jsx76(
2334
+ return /* @__PURE__ */ jsx82(
1948
2335
  ScrollAreaScrollbar,
1949
2336
  {
1950
2337
  className: cn(
@@ -1956,35 +2343,35 @@ var ScrollBar = forwardRef59(function ScrollBar2({ className, orientation = "ver
1956
2343
  orientation,
1957
2344
  ref,
1958
2345
  ...props,
1959
- children: /* @__PURE__ */ jsx76(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
2346
+ children: /* @__PURE__ */ jsx82(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
1960
2347
  }
1961
2348
  );
1962
2349
  });
1963
2350
 
1964
2351
  // src/components/ScrollArea/ScrollArea.tsx
1965
- import { jsx as jsx77, jsxs as jsxs23 } from "react/jsx-runtime";
2352
+ import { jsx as jsx83, jsxs as jsxs26 } from "react/jsx-runtime";
1966
2353
  var ScrollArea = forwardRef60(
1967
2354
  function ScrollArea2({ children, className, ...props }, ref) {
1968
- return /* @__PURE__ */ jsxs23(Root8, { className: cn("relative overflow-hidden", className), "data-testid": "scroll-area", ref, ...props, children: [
1969
- /* @__PURE__ */ jsx77(Viewport, { className: "h-full w-full rounded-[inherit]", children }),
1970
- /* @__PURE__ */ jsx77(ScrollBar, {}),
1971
- /* @__PURE__ */ jsx77(Corner, {})
2355
+ return /* @__PURE__ */ jsxs26(Root8, { className: cn("relative overflow-hidden", className), "data-testid": "scroll-area", ref, ...props, children: [
2356
+ /* @__PURE__ */ jsx83(Viewport, { className: "h-full w-full rounded-[inherit]", children }),
2357
+ /* @__PURE__ */ jsx83(ScrollBar, {}),
2358
+ /* @__PURE__ */ jsx83(Corner, {})
1972
2359
  ] });
1973
2360
  }
1974
2361
  );
1975
2362
 
1976
2363
  // src/components/DatePicker/YearSelector.tsx
1977
- import { jsx as jsx78 } from "react/jsx-runtime";
2364
+ import { jsx as jsx84 } from "react/jsx-runtime";
1978
2365
  var YearSelector = (props) => {
1979
- const selectedRef = useRef(null);
2366
+ const selectedRef = useRef3(null);
1980
2367
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
1981
2368
  const years = Array.from(range4(currentYear - 100, currentYear + 8)).reverse();
1982
- useEffect2(() => {
2369
+ useEffect4(() => {
1983
2370
  if (selectedRef.current) {
1984
2371
  selectedRef.current.scrollIntoView({ block: "center" });
1985
2372
  }
1986
2373
  }, []);
1987
- return /* @__PURE__ */ jsx78(ScrollArea, { className: "h-56 w-56", children: /* @__PURE__ */ jsx78("div", { className: "grid grid-cols-3 gap-x-2 gap-y-1 text-sm text-muted-foreground", children: years.map((year) => /* @__PURE__ */ jsx78("div", { className: "flex h-7 items-center justify-center", children: /* @__PURE__ */ jsx78(
2374
+ return /* @__PURE__ */ jsx84(ScrollArea, { className: "h-56 w-56", children: /* @__PURE__ */ jsx84("div", { className: "grid grid-cols-3 gap-x-2 gap-y-1 text-sm text-muted-foreground", children: years.map((year) => /* @__PURE__ */ jsx84("div", { className: "flex h-7 items-center justify-center", children: /* @__PURE__ */ jsx84(
1988
2375
  "button",
1989
2376
  {
1990
2377
  className: cn(
@@ -2003,7 +2390,7 @@ var YearSelector = (props) => {
2003
2390
  };
2004
2391
 
2005
2392
  // src/components/DatePicker/DatePicker.tsx
2006
- import { jsx as jsx79, jsxs as jsxs24 } from "react/jsx-runtime";
2393
+ import { jsx as jsx85, jsxs as jsxs27 } from "react/jsx-runtime";
2007
2394
  var MONTHS = [
2008
2395
  "january",
2009
2396
  "february",
@@ -2042,11 +2429,11 @@ var DatePicker = React16.forwardRef(function DatePicker2({ onSelection, ...props
2042
2429
  dispatch({ type: "set-year", value: date2.getFullYear() });
2043
2430
  setShowYearSelector(false);
2044
2431
  };
2045
- return /* @__PURE__ */ jsxs24(Card, { className: "w-fit p-3", "data-testid": "datepicker", ref, ...props, children: [
2046
- /* @__PURE__ */ jsxs24("div", { className: "mb-3 flex items-center justify-between px-1", children: [
2047
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center", children: [
2048
- /* @__PURE__ */ jsx79("span", { className: "mx-1 text-sm font-medium tracking-tight", children: `${monthName} ${date.getFullYear()}` }),
2049
- /* @__PURE__ */ jsx79(
2432
+ return /* @__PURE__ */ jsxs27(Card, { className: "w-fit p-3", "data-testid": "datepicker", ref, ...props, children: [
2433
+ /* @__PURE__ */ jsxs27("div", { className: "mb-3 flex items-center justify-between px-1", children: [
2434
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center", children: [
2435
+ /* @__PURE__ */ jsx85("span", { className: "mx-1 text-sm font-medium tracking-tight", children: `${monthName} ${date.getFullYear()}` }),
2436
+ /* @__PURE__ */ jsx85(
2050
2437
  ArrowToggle,
2051
2438
  {
2052
2439
  className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
@@ -2060,8 +2447,8 @@ var DatePicker = React16.forwardRef(function DatePicker2({ onSelection, ...props
2060
2447
  }
2061
2448
  )
2062
2449
  ] }),
2063
- /* @__PURE__ */ jsxs24("div", { className: cn("flex", { hidden: showYearSelector }), children: [
2064
- /* @__PURE__ */ jsx79(
2450
+ /* @__PURE__ */ jsxs27("div", { className: cn("flex", { hidden: showYearSelector }), children: [
2451
+ /* @__PURE__ */ jsx85(
2065
2452
  ArrowToggle,
2066
2453
  {
2067
2454
  className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
@@ -2078,7 +2465,7 @@ var DatePicker = React16.forwardRef(function DatePicker2({ onSelection, ...props
2078
2465
  }
2079
2466
  }
2080
2467
  ),
2081
- /* @__PURE__ */ jsx79(
2468
+ /* @__PURE__ */ jsx85(
2082
2469
  ArrowToggle,
2083
2470
  {
2084
2471
  className: "flex items-center justify-center rounded-full p-1 hover:bg-slate-200 dark:hover:bg-slate-700",
@@ -2097,24 +2484,24 @@ var DatePicker = React16.forwardRef(function DatePicker2({ onSelection, ...props
2097
2484
  )
2098
2485
  ] })
2099
2486
  ] }),
2100
- /* @__PURE__ */ jsx79("div", { children: /* @__PURE__ */ jsx79(AnimatePresence3, { initial: false, mode: "wait", children: showYearSelector ? /* @__PURE__ */ jsx79(
2487
+ /* @__PURE__ */ jsx85("div", { children: /* @__PURE__ */ jsx85(AnimatePresence3, { initial: false, mode: "wait", children: showYearSelector ? /* @__PURE__ */ jsx85(
2101
2488
  motion3.div,
2102
2489
  {
2103
2490
  animate: { opacity: 1, y: 0 },
2104
2491
  exit: { opacity: 0, y: 10 },
2105
2492
  initial: { opacity: 0, y: 10 },
2106
2493
  transition: { duration: 0.2 },
2107
- children: /* @__PURE__ */ jsx79(YearSelector, { selected: date, onSelection: handleYearSelection })
2494
+ children: /* @__PURE__ */ jsx85(YearSelector, { selected: date, onSelection: handleYearSelection })
2108
2495
  },
2109
2496
  0
2110
- ) : /* @__PURE__ */ jsx79(
2497
+ ) : /* @__PURE__ */ jsx85(
2111
2498
  motion3.div,
2112
2499
  {
2113
2500
  animate: { opacity: 1, y: 0 },
2114
2501
  exit: { opacity: 0, y: -10 },
2115
2502
  initial: { opacity: 0, y: -10 },
2116
2503
  transition: { duration: 0.2 },
2117
- children: /* @__PURE__ */ jsx79(Calendar, { month: date.getMonth(), year: date.getFullYear(), onSelection })
2504
+ children: /* @__PURE__ */ jsx85(Calendar, { month: date.getMonth(), year: date.getFullYear(), onSelection })
2118
2505
  },
2119
2506
  1
2120
2507
  ) }) })
@@ -2128,11 +2515,11 @@ import { Drawer as DrawerPrimitive4 } from "vaul";
2128
2515
  // src/components/Drawer/DrawerContent.tsx
2129
2516
  import { forwardRef as forwardRef62 } from "react";
2130
2517
  import { Drawer as DrawerPrimitive } from "vaul";
2131
- import { jsx as jsx80, jsxs as jsxs25 } from "react/jsx-runtime";
2518
+ import { jsx as jsx86, jsxs as jsxs28 } from "react/jsx-runtime";
2132
2519
  var DrawerContent = forwardRef62(function DrawerContent2({ children, className, ...props }, ref) {
2133
- return /* @__PURE__ */ jsxs25(DrawerPrimitive.Portal, { children: [
2134
- /* @__PURE__ */ jsx80(DrawerPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80", className), ref, ...props }),
2135
- /* @__PURE__ */ jsxs25(
2520
+ return /* @__PURE__ */ jsxs28(DrawerPrimitive.Portal, { children: [
2521
+ /* @__PURE__ */ jsx86(DrawerPrimitive.Overlay, { className: cn("fixed inset-0 z-50 bg-black/80", className), ref, ...props }),
2522
+ /* @__PURE__ */ jsxs28(
2136
2523
  DrawerPrimitive.Content,
2137
2524
  {
2138
2525
  className: cn(
@@ -2142,7 +2529,7 @@ var DrawerContent = forwardRef62(function DrawerContent2({ children, className,
2142
2529
  ref,
2143
2530
  ...props,
2144
2531
  children: [
2145
- /* @__PURE__ */ jsx80("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2532
+ /* @__PURE__ */ jsx86("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2146
2533
  children
2147
2534
  ]
2148
2535
  }
@@ -2153,27 +2540,27 @@ var DrawerContent = forwardRef62(function DrawerContent2({ children, className,
2153
2540
  // src/components/Drawer/DrawerDescription.tsx
2154
2541
  import { forwardRef as forwardRef63 } from "react";
2155
2542
  import { Drawer as DrawerPrimitive2 } from "vaul";
2156
- import { jsx as jsx81 } from "react/jsx-runtime";
2543
+ import { jsx as jsx87 } from "react/jsx-runtime";
2157
2544
  var DrawerDescription = forwardRef63(function DrawerDescription2({ className, ...props }, ref) {
2158
- return /* @__PURE__ */ jsx81(DrawerPrimitive2.Description, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
2545
+ return /* @__PURE__ */ jsx87(DrawerPrimitive2.Description, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
2159
2546
  });
2160
2547
 
2161
2548
  // src/components/Drawer/DrawerFooter.tsx
2162
2549
  import "react";
2163
- import { jsx as jsx82 } from "react/jsx-runtime";
2164
- var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx82("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
2550
+ import { jsx as jsx88 } from "react/jsx-runtime";
2551
+ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx88("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props });
2165
2552
 
2166
2553
  // src/components/Drawer/DrawerHeader.tsx
2167
2554
  import "react";
2168
- import { jsx as jsx83 } from "react/jsx-runtime";
2169
- var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx83("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
2555
+ import { jsx as jsx89 } from "react/jsx-runtime";
2556
+ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx89("div", { className: cn("grid gap-1.5 p-4 text-center sm:text-left", className), ...props });
2170
2557
 
2171
2558
  // src/components/Drawer/DrawerTitle.tsx
2172
2559
  import { forwardRef as forwardRef64 } from "react";
2173
2560
  import { Drawer as DrawerPrimitive3 } from "vaul";
2174
- import { jsx as jsx84 } from "react/jsx-runtime";
2561
+ import { jsx as jsx90 } from "react/jsx-runtime";
2175
2562
  var DrawerTitle = forwardRef64(function DrawerTitle2({ className, ...props }, ref) {
2176
- return /* @__PURE__ */ jsx84(
2563
+ return /* @__PURE__ */ jsx90(
2177
2564
  DrawerPrimitive3.Title,
2178
2565
  {
2179
2566
  className: cn("text-lg font-semibold leading-none tracking-tight", className),
@@ -2184,8 +2571,8 @@ var DrawerTitle = forwardRef64(function DrawerTitle2({ className, ...props }, re
2184
2571
  });
2185
2572
 
2186
2573
  // src/components/Drawer/Drawer.tsx
2187
- import { jsx as jsx85 } from "react/jsx-runtime";
2188
- var DrawerRoot = ({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsx85(DrawerPrimitive4.Root, { shouldScaleBackground, ...props });
2574
+ import { jsx as jsx91 } from "react/jsx-runtime";
2575
+ var DrawerRoot = ({ shouldScaleBackground = true, ...props }) => /* @__PURE__ */ jsx91(DrawerPrimitive4.Root, { shouldScaleBackground, ...props });
2189
2576
  var Drawer = Object.assign(DrawerRoot, {
2190
2577
  Close: DrawerPrimitive4.Close,
2191
2578
  Content: DrawerContent,
@@ -2201,22 +2588,22 @@ import "react";
2201
2588
  import { ErrorBoundary as ReactErrorBoundary } from "react-error-boundary";
2202
2589
 
2203
2590
  // src/components/ErrorFallback/ErrorFallback.tsx
2204
- import { useEffect as useEffect3 } from "react";
2205
- import { jsx as jsx86, jsxs as jsxs26 } from "react/jsx-runtime";
2591
+ import { useEffect as useEffect5 } from "react";
2592
+ import { jsx as jsx92, jsxs as jsxs29 } from "react/jsx-runtime";
2206
2593
  var ErrorFallback = ({ error }) => {
2207
- useEffect3(() => {
2594
+ useEffect5(() => {
2208
2595
  console.error(error);
2209
2596
  }, [error]);
2210
- return /* @__PURE__ */ jsxs26(
2597
+ return /* @__PURE__ */ jsxs29(
2211
2598
  "div",
2212
2599
  {
2213
2600
  className: "flex min-h-screen flex-col items-center justify-center gap-1 p-3 text-center",
2214
2601
  "data-testid": "error-fallback",
2215
2602
  children: [
2216
- /* @__PURE__ */ jsx86("h1", { className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase", children: "Unexpected Error" }),
2217
- /* @__PURE__ */ jsx86("h3", { className: "text-3xl font-extrabold tracking-tight sm:text-4xl md:text-5xl", children: "Something Went Wrong" }),
2218
- /* @__PURE__ */ jsx86("p", { className: "text-muted-foreground mt-2 max-w-prose text-sm sm:text-base", children: "We apologize for the inconvenience. Please contact us for further assistance." }),
2219
- /* @__PURE__ */ jsx86("div", { className: "mt-6", children: /* @__PURE__ */ jsxs26(
2603
+ /* @__PURE__ */ jsx92("h1", { className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase", children: "Unexpected Error" }),
2604
+ /* @__PURE__ */ jsx92("h3", { className: "text-3xl font-extrabold tracking-tight sm:text-4xl md:text-5xl", children: "Something Went Wrong" }),
2605
+ /* @__PURE__ */ jsx92("p", { className: "text-muted-foreground mt-2 max-w-prose text-sm sm:text-base", children: "We apologize for the inconvenience. Please contact us for further assistance." }),
2606
+ /* @__PURE__ */ jsx92("div", { className: "mt-6", children: /* @__PURE__ */ jsxs29(
2220
2607
  "button",
2221
2608
  {
2222
2609
  className: "text-sky-800 underline-offset-4 hover:text-sky-700 hover:underline dark:text-sky-200 dark:hover:text-sky-300",
@@ -2226,7 +2613,7 @@ var ErrorFallback = ({ error }) => {
2226
2613
  },
2227
2614
  children: [
2228
2615
  "Reload Page",
2229
- /* @__PURE__ */ jsx86("span", { "aria-hidden": "true", children: " \u2192" })
2616
+ /* @__PURE__ */ jsx92("span", { "aria-hidden": "true", children: " \u2192" })
2230
2617
  ]
2231
2618
  }
2232
2619
  ) })
@@ -2236,16 +2623,16 @@ var ErrorFallback = ({ error }) => {
2236
2623
  };
2237
2624
 
2238
2625
  // src/components/ErrorBoundary/ErrorBoundary.tsx
2239
- import { jsx as jsx87 } from "react/jsx-runtime";
2626
+ import { jsx as jsx93 } from "react/jsx-runtime";
2240
2627
  var ErrorBoundary = ({ children }) => {
2241
- return /* @__PURE__ */ jsx87(ReactErrorBoundary, { FallbackComponent: ErrorFallback, children });
2628
+ return /* @__PURE__ */ jsx93(ReactErrorBoundary, { FallbackComponent: ErrorFallback, children });
2242
2629
  };
2243
2630
 
2244
2631
  // src/components/FileDropzone/FileDropzone.tsx
2245
2632
  import { useCallback } from "react";
2246
2633
  import { UploadIcon } from "lucide-react";
2247
2634
  import { useDropzone } from "react-dropzone";
2248
- import { jsx as jsx88, jsxs as jsxs27 } from "react/jsx-runtime";
2635
+ import { jsx as jsx94, jsxs as jsxs30 } from "react/jsx-runtime";
2249
2636
  var FileDropzone = ({
2250
2637
  acceptedFileTypes,
2251
2638
  className,
@@ -2277,7 +2664,7 @@ var FileDropzone = ({
2277
2664
  en: "Drag and drop files or click on box to upload",
2278
2665
  fr: "Glissez-d\xE9posez les fichiers ou cliquez sur la case pour les t\xE9l\xE9charger"
2279
2666
  });
2280
- return /* @__PURE__ */ jsxs27(
2667
+ return /* @__PURE__ */ jsxs30(
2281
2668
  "div",
2282
2669
  {
2283
2670
  className: cn(
@@ -2287,38 +2674,38 @@ var FileDropzone = ({
2287
2674
  "data-testid": "dropzone",
2288
2675
  ...getRootProps(),
2289
2676
  children: [
2290
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2291
- /* @__PURE__ */ jsx88(UploadIcon, { style: { height: 24, strokeWidth: 2, width: 24 } }),
2292
- /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-1 text-center", children: [
2293
- /* @__PURE__ */ jsx88("h3", { className: "text-lg font-semibold tracking-tight", "data-testid": "dropzone-title", children: file ? file.name : isDragActive ? dragActiveTitle : dragInactiveTitle }),
2294
- description && /* @__PURE__ */ jsx88("p", { className: "text-sm text-muted-foreground", children: description })
2677
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2678
+ /* @__PURE__ */ jsx94(UploadIcon, { style: { height: 24, strokeWidth: 2, width: 24 } }),
2679
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center gap-1 text-center", children: [
2680
+ /* @__PURE__ */ jsx94("h3", { className: "text-lg font-semibold tracking-tight", "data-testid": "dropzone-title", children: file ? file.name : isDragActive ? dragActiveTitle : dragInactiveTitle }),
2681
+ description && /* @__PURE__ */ jsx94("p", { className: "text-sm text-muted-foreground", children: description })
2295
2682
  ] })
2296
2683
  ] }),
2297
- /* @__PURE__ */ jsx88("input", { ...getInputProps() })
2684
+ /* @__PURE__ */ jsx94("input", { ...getInputProps() })
2298
2685
  ]
2299
2686
  }
2300
2687
  );
2301
2688
  };
2302
2689
 
2303
2690
  // src/components/Form/Form.tsx
2304
- import { useEffect as useEffect11, useState as useState9 } from "react";
2691
+ import { useEffect as useEffect13, useState as useState9 } from "react";
2305
2692
  import { get, set } from "lodash-es";
2306
2693
  import { twMerge } from "tailwind-merge";
2307
2694
 
2308
2695
  // src/components/Heading/Heading.tsx
2309
- import { jsx as jsx89 } from "react/jsx-runtime";
2696
+ import { jsx as jsx95 } from "react/jsx-runtime";
2310
2697
  var Heading = ({ children, className, variant }) => {
2311
2698
  switch (variant) {
2312
2699
  case "h1":
2313
- return /* @__PURE__ */ jsx89("h1", { className: cn("text-3xl font-bold tracking-tight", className), children });
2700
+ return /* @__PURE__ */ jsx95("h1", { className: cn("text-3xl font-bold tracking-tight", className), children });
2314
2701
  case "h2":
2315
- return /* @__PURE__ */ jsx89("h2", { className: cn("text-2xl font-semibold tracking-tight", className), children });
2702
+ return /* @__PURE__ */ jsx95("h2", { className: cn("text-2xl font-semibold tracking-tight", className), children });
2316
2703
  case "h3":
2317
- return /* @__PURE__ */ jsx89("h3", { className: cn("text-xl font-semibold tracking-tight", className), children });
2704
+ return /* @__PURE__ */ jsx95("h3", { className: cn("text-xl font-semibold tracking-tight", className), children });
2318
2705
  case "h4":
2319
- return /* @__PURE__ */ jsx89("h4", { className: cn("text-lg font-semibold tracking-tight", className), children });
2706
+ return /* @__PURE__ */ jsx95("h4", { className: cn("text-lg font-semibold tracking-tight", className), children });
2320
2707
  case "h5":
2321
- return /* @__PURE__ */ jsx89("h5", { className: cn("text-base font-semibold tracking-tight", className), children });
2708
+ return /* @__PURE__ */ jsx95("h5", { className: cn("text-base font-semibold tracking-tight", className), children });
2322
2709
  default:
2323
2710
  throw new Error(`Unhandled heading variant: ${variant}`);
2324
2711
  }
@@ -2327,9 +2714,9 @@ var Heading = ({ children, className, variant }) => {
2327
2714
  // src/components/Separator/Separator.tsx
2328
2715
  import { forwardRef as forwardRef65 } from "react";
2329
2716
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
2330
- import { jsx as jsx90 } from "react/jsx-runtime";
2717
+ import { jsx as jsx96 } from "react/jsx-runtime";
2331
2718
  var Separator3 = forwardRef65(function Separator4({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
2332
- return /* @__PURE__ */ jsx90(
2719
+ return /* @__PURE__ */ jsx96(
2333
2720
  SeparatorPrimitive.Root,
2334
2721
  {
2335
2722
  className: cn(
@@ -2349,19 +2736,46 @@ var Separator3 = forwardRef65(function Separator4({ className, decorative = true
2349
2736
  // src/components/Form/ErrorMessage.tsx
2350
2737
  import "react";
2351
2738
  import { CircleAlertIcon } from "lucide-react";
2352
- import { jsx as jsx91, jsxs as jsxs28 } from "react/jsx-runtime";
2353
- var ErrorMessage = ({ className, error }) => {
2354
- return error ? /* @__PURE__ */ jsx91("div", { className: "flex flex-col gap-1.5", children: error.map((message) => /* @__PURE__ */ jsxs28("div", { className: cn("text-destructive flex w-full items-center text-sm font-medium", className), children: [
2355
- /* @__PURE__ */ jsx91(CircleAlertIcon, { className: "mr-1", style: { strokeWidth: "2px" } }),
2356
- /* @__PURE__ */ jsx91("span", { "data-testid": "error-message-text", children: message })
2357
- ] }, message)) ?? null }) : null;
2739
+ import { jsx as jsx97, jsxs as jsxs31 } from "react/jsx-runtime";
2740
+ var ErrorMessage = ({
2741
+ className,
2742
+ error,
2743
+ hideIconOnWrap
2744
+ }) => {
2745
+ if (!error) {
2746
+ return null;
2747
+ }
2748
+ return /* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-1.5", children: error.map((message) => /* @__PURE__ */ jsxs31(
2749
+ "div",
2750
+ {
2751
+ className: cn(
2752
+ "text-destructive flex w-full items-center text-sm font-medium",
2753
+ hideIconOnWrap && "flex-wrap",
2754
+ className
2755
+ ),
2756
+ children: [
2757
+ /* @__PURE__ */ jsxs31("div", { className: "@container/alert mr-1.5 flex min-w-4 shrink-0 flex-grow-[1] items-center justify-start", children: [
2758
+ /* @__PURE__ */ jsx97("div", { className: "h-0 w-0" }),
2759
+ /* @__PURE__ */ jsx97(
2760
+ CircleAlertIcon,
2761
+ {
2762
+ className: "@min-[24px]/alert:hidden",
2763
+ style: { height: "16px", strokeWidth: "2px", width: "16px" }
2764
+ }
2765
+ )
2766
+ ] }),
2767
+ /* @__PURE__ */ jsx97("span", { className: "flex-grow-[999]", "data-testid": "error-message-text", children: message })
2768
+ ]
2769
+ },
2770
+ message
2771
+ )) });
2358
2772
  };
2359
2773
 
2360
2774
  // src/components/Form/FieldsComponent.tsx
2361
2775
  import "react";
2362
2776
 
2363
2777
  // src/components/Form/DynamicField.tsx
2364
- import { useEffect as useEffect10, useMemo as useMemo3, useState as useState8 } from "react";
2778
+ import { useEffect as useEffect12, useMemo as useMemo2, useState as useState8 } from "react";
2365
2779
  import "react";
2366
2780
  import { pick } from "lodash-es";
2367
2781
 
@@ -2371,25 +2785,25 @@ import "react";
2371
2785
  import { match as match7 } from "ts-pattern";
2372
2786
 
2373
2787
  // src/components/Form/NumberRecordField.tsx
2374
- import { useEffect as useEffect5, useRef as useRef3 } from "react";
2788
+ import { useEffect as useEffect7, useRef as useRef5 } from "react";
2375
2789
 
2376
2790
  // src/components/Form/NumberField/NumberField.tsx
2377
2791
  import { match as match2 } from "ts-pattern";
2378
2792
 
2379
2793
  // src/components/Form/NumberField/NumberFieldInput.tsx
2380
- import { useEffect as useEffect4, useId as useId2, useRef as useRef2, useState as useState5 } from "react";
2794
+ import { useEffect as useEffect6, useId as useId2, useRef as useRef4, useState as useState5 } from "react";
2381
2795
  import { parseNumber } from "@douglasneuroinformatics/libjs";
2382
2796
 
2383
2797
  // src/components/Label/Label.tsx
2384
2798
  import { forwardRef as forwardRef66 } from "react";
2385
2799
  import * as LabelPrimitive from "@radix-ui/react-label";
2386
2800
  import { cva as cva2 } from "class-variance-authority";
2387
- import { jsx as jsx92 } from "react/jsx-runtime";
2801
+ import { jsx as jsx98 } from "react/jsx-runtime";
2388
2802
  var labelVariants = cva2(
2389
2803
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 aria-disabled:cursor-not-allowed aria-disabled:opacity-70"
2390
2804
  );
2391
2805
  var Label3 = forwardRef66(function Label4({ className, ...props }, ref) {
2392
- return /* @__PURE__ */ jsx92(LabelPrimitive.Root, { className: cn(labelVariants(), className), ref, ...props });
2806
+ return /* @__PURE__ */ jsx98(LabelPrimitive.Root, { className: cn(labelVariants(), className), ref, ...props });
2393
2807
  });
2394
2808
 
2395
2809
  // src/components/Form/FieldGroup/FieldGroupDescription.tsx
@@ -2402,10 +2816,10 @@ import { Root as PopoverRoot, Trigger as PopoverTrigger } from "@radix-ui/react-
2402
2816
  // src/components/Popover/PopoverContent.tsx
2403
2817
  import * as React22 from "react";
2404
2818
  import { Content as Content6, Portal as Portal6 } from "@radix-ui/react-popover";
2405
- import { jsx as jsx93 } from "react/jsx-runtime";
2819
+ import { jsx as jsx99 } from "react/jsx-runtime";
2406
2820
  var PopoverContent = React22.forwardRef(
2407
2821
  function PopoverContent2({ align = "center", asChild, autofocus = true, className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
2408
- return /* @__PURE__ */ jsx93(Portal6, { children: /* @__PURE__ */ jsx93(
2822
+ return /* @__PURE__ */ jsx99(Portal6, { children: /* @__PURE__ */ jsx99(
2409
2823
  Content6,
2410
2824
  {
2411
2825
  align,
@@ -2431,21 +2845,21 @@ var Popover = Object.assign(PopoverRoot.bind(null), {
2431
2845
  });
2432
2846
 
2433
2847
  // src/components/Form/FieldGroup/FieldGroupDescription.tsx
2434
- import { jsx as jsx94, jsxs as jsxs29 } from "react/jsx-runtime";
2435
- var FieldGroupDescription = ({ description }) => description ? /* @__PURE__ */ jsxs29(Popover, { children: [
2436
- /* @__PURE__ */ jsx94(Popover.Trigger, { tabIndex: -1, children: /* @__PURE__ */ jsx94(CircleHelpIcon, { className: "text-muted-foreground" }) }),
2437
- /* @__PURE__ */ jsx94(Popover.Content, { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx94("p", { children: description }) })
2848
+ import { jsx as jsx100, jsxs as jsxs32 } from "react/jsx-runtime";
2849
+ var FieldGroupDescription = ({ description }) => description ? /* @__PURE__ */ jsxs32(Popover, { children: [
2850
+ /* @__PURE__ */ jsx100(Popover.Trigger, { tabIndex: -1, children: /* @__PURE__ */ jsx100(CircleHelpIcon, { className: "text-muted-foreground" }) }),
2851
+ /* @__PURE__ */ jsx100(Popover.Content, { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx100("p", { children: description }) })
2438
2852
  ] }) : null;
2439
2853
 
2440
2854
  // src/components/Form/FieldGroup/FieldGroupRoot.tsx
2441
2855
  import "react";
2442
- import { jsx as jsx95 } from "react/jsx-runtime";
2443
- var FieldGroupRoot = ({ children, name }) => /* @__PURE__ */ jsx95("div", { className: "flex flex-col gap-3 @container", "data-field-group": name, children });
2856
+ import { jsx as jsx101 } from "react/jsx-runtime";
2857
+ var FieldGroupRoot = ({ children, name }) => /* @__PURE__ */ jsx101("div", { className: "flex flex-col gap-3 @container", "data-field-group": name, children });
2444
2858
 
2445
2859
  // src/components/Form/FieldGroup/FieldGroupRow.tsx
2446
2860
  import "react";
2447
- import { jsx as jsx96 } from "react/jsx-runtime";
2448
- var FieldGroupRow = ({ children }) => /* @__PURE__ */ jsx96("div", { className: "relative flex items-center gap-2", children });
2861
+ import { jsx as jsx102 } from "react/jsx-runtime";
2862
+ var FieldGroupRow = ({ children }) => /* @__PURE__ */ jsx102("div", { className: "relative flex items-center gap-2", children });
2449
2863
 
2450
2864
  // src/components/Form/FieldGroup/FieldGroup.tsx
2451
2865
  var FieldGroup = Object.assign(FieldGroupRoot, {
@@ -2455,7 +2869,7 @@ var FieldGroup = Object.assign(FieldGroupRoot, {
2455
2869
  });
2456
2870
 
2457
2871
  // src/components/Form/NumberField/NumberFieldInput.tsx
2458
- import { jsx as jsx97, jsxs as jsxs30 } from "react/jsx-runtime";
2872
+ import { jsx as jsx103, jsxs as jsxs33 } from "react/jsx-runtime";
2459
2873
  var NumberFieldInput = ({
2460
2874
  description,
2461
2875
  disabled,
@@ -2470,7 +2884,7 @@ var NumberFieldInput = ({
2470
2884
  }) => {
2471
2885
  const id = useId2();
2472
2886
  const [inputValue, setInputValue] = useState5(value?.toString() ?? "");
2473
- const valueRef = useRef2(value);
2887
+ const valueRef = useRef4(value);
2474
2888
  const parseInputValue = (value2) => {
2475
2889
  const isSignOrEmpty = /^[+-]?$/.test(value2);
2476
2890
  if (isSignOrEmpty) {
@@ -2492,7 +2906,7 @@ var NumberFieldInput = ({
2492
2906
  setValue(updatedValue);
2493
2907
  valueRef.current = updatedValue;
2494
2908
  };
2495
- useEffect4(() => {
2909
+ useEffect6(() => {
2496
2910
  if (valueRef.current === value) {
2497
2911
  return;
2498
2912
  }
@@ -2500,12 +2914,12 @@ var NumberFieldInput = ({
2500
2914
  setInputValue(updatedInputValue);
2501
2915
  valueRef.current = value;
2502
2916
  }, [value]);
2503
- return /* @__PURE__ */ jsxs30(FieldGroup, { name, children: [
2504
- /* @__PURE__ */ jsxs30(FieldGroup.Row, { children: [
2505
- /* @__PURE__ */ jsx97(Label3, { htmlFor: id, children: label }),
2506
- /* @__PURE__ */ jsx97(FieldGroup.Description, { description })
2917
+ return /* @__PURE__ */ jsxs33(FieldGroup, { name, children: [
2918
+ /* @__PURE__ */ jsxs33(FieldGroup.Row, { children: [
2919
+ /* @__PURE__ */ jsx103(Label3, { htmlFor: id, children: label }),
2920
+ /* @__PURE__ */ jsx103(FieldGroup.Description, { description })
2507
2921
  ] }),
2508
- /* @__PURE__ */ jsx97(
2922
+ /* @__PURE__ */ jsx103(
2509
2923
  Input,
2510
2924
  {
2511
2925
  disabled: disabled || readOnly,
@@ -2518,7 +2932,7 @@ var NumberFieldInput = ({
2518
2932
  onChange: handleChange
2519
2933
  }
2520
2934
  ),
2521
- /* @__PURE__ */ jsx97(FieldGroup.Error, { error })
2935
+ /* @__PURE__ */ jsx103(FieldGroup.Error, { error })
2522
2936
  ] });
2523
2937
  };
2524
2938
 
@@ -2530,9 +2944,9 @@ import * as RadioGroupPrimitive2 from "@radix-ui/react-radio-group";
2530
2944
  import { forwardRef as forwardRef68 } from "react";
2531
2945
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
2532
2946
  import { CircleIcon as CircleIcon3 } from "lucide-react";
2533
- import { jsx as jsx98 } from "react/jsx-runtime";
2947
+ import { jsx as jsx104 } from "react/jsx-runtime";
2534
2948
  var RadioGroupItem = forwardRef68(function RadioGroupItem2({ className, ...props }, ref) {
2535
- return /* @__PURE__ */ jsx98(
2949
+ return /* @__PURE__ */ jsx104(
2536
2950
  RadioGroupPrimitive.Item,
2537
2951
  {
2538
2952
  className: cn(
@@ -2541,7 +2955,7 @@ var RadioGroupItem = forwardRef68(function RadioGroupItem2({ className, ...props
2541
2955
  ),
2542
2956
  ref,
2543
2957
  ...props,
2544
- children: /* @__PURE__ */ jsx98(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx98(
2958
+ children: /* @__PURE__ */ jsx104(RadioGroupPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx104(
2545
2959
  CircleIcon3,
2546
2960
  {
2547
2961
  className: "fill-current text-current",
@@ -2553,16 +2967,16 @@ var RadioGroupItem = forwardRef68(function RadioGroupItem2({ className, ...props
2553
2967
  });
2554
2968
 
2555
2969
  // src/components/RadioGroup/RadioGroup.tsx
2556
- import { jsx as jsx99 } from "react/jsx-runtime";
2970
+ import { jsx as jsx105 } from "react/jsx-runtime";
2557
2971
  var RadioGroupRoot = React26.forwardRef(function RadioGroup3({ className, ...props }, ref) {
2558
- return /* @__PURE__ */ jsx99(RadioGroupPrimitive2.Root, { className: cn("grid gap-2", className), "data-testid": "radio-group", ...props, ref });
2972
+ return /* @__PURE__ */ jsx105(RadioGroupPrimitive2.Root, { className: cn("grid gap-2", className), "data-testid": "radio-group", ...props, ref });
2559
2973
  });
2560
2974
  var RadioGroup4 = Object.assign(RadioGroupRoot, {
2561
2975
  Item: RadioGroupItem
2562
2976
  });
2563
2977
 
2564
2978
  // src/components/Form/NumberField/NumberFieldRadio.tsx
2565
- import { jsx as jsx100, jsxs as jsxs31 } from "react/jsx-runtime";
2979
+ import { jsx as jsx106, jsxs as jsxs34 } from "react/jsx-runtime";
2566
2980
  var NumberFieldRadio = ({
2567
2981
  description,
2568
2982
  disableAutoPrefix,
@@ -2576,12 +2990,12 @@ var NumberFieldRadio = ({
2576
2990
  value
2577
2991
  }) => {
2578
2992
  const optionsCount = Object.keys(options).length;
2579
- return /* @__PURE__ */ jsxs31(FieldGroup, { name, children: [
2580
- /* @__PURE__ */ jsxs31(FieldGroup.Row, { children: [
2581
- /* @__PURE__ */ jsx100(Label3, { children: label }),
2582
- /* @__PURE__ */ jsx100(FieldGroup.Description, { description })
2993
+ return /* @__PURE__ */ jsxs34(FieldGroup, { name, children: [
2994
+ /* @__PURE__ */ jsxs34(FieldGroup.Row, { children: [
2995
+ /* @__PURE__ */ jsx106(Label3, { children: label }),
2996
+ /* @__PURE__ */ jsx106(FieldGroup.Description, { description })
2583
2997
  ] }),
2584
- /* @__PURE__ */ jsx100(
2998
+ /* @__PURE__ */ jsx106(
2585
2999
  RadioGroup4,
2586
3000
  {
2587
3001
  className: cn(
@@ -2593,9 +3007,9 @@ var NumberFieldRadio = ({
2593
3007
  onValueChange: (value2) => setValue(parseInt(value2)),
2594
3008
  children: Object.keys(options).map((val) => parseInt(val)).toSorted((a, b) => a - b).map((val) => {
2595
3009
  const text = (disableAutoPrefix ? "" : `${val} - `) + options[val];
2596
- return /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
2597
- /* @__PURE__ */ jsx100(RadioGroup4.Item, { disabled: disabled || readOnly, id: `${name}-${val}`, value: val.toString() }),
2598
- /* @__PURE__ */ jsx100(
3010
+ return /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
3011
+ /* @__PURE__ */ jsx106(RadioGroup4.Item, { disabled: disabled || readOnly, id: `${name}-${val}`, value: val.toString() }),
3012
+ /* @__PURE__ */ jsx106(
2599
3013
  Label3,
2600
3014
  {
2601
3015
  "aria-disabled": disabled || readOnly,
@@ -2608,7 +3022,7 @@ var NumberFieldRadio = ({
2608
3022
  })
2609
3023
  }
2610
3024
  ),
2611
- /* @__PURE__ */ jsx100(FieldGroup.Error, { error })
3025
+ /* @__PURE__ */ jsx106(FieldGroup.Error, { error })
2612
3026
  ] });
2613
3027
  };
2614
3028
 
@@ -2623,15 +3037,15 @@ import * as SelectPrimitive3 from "@radix-ui/react-select";
2623
3037
  import { forwardRef as forwardRef70 } from "react";
2624
3038
  import * as SelectPrimitive from "@radix-ui/react-select";
2625
3039
  import { ChevronDownIcon as ChevronDownIcon4 } from "lucide-react";
2626
- import { jsx as jsx101 } from "react/jsx-runtime";
3040
+ import { jsx as jsx107 } from "react/jsx-runtime";
2627
3041
  var SelectScrollDownButton = forwardRef70(function SelectScrollDownButton2({ className, ...props }, ref) {
2628
- return /* @__PURE__ */ jsx101(
3042
+ return /* @__PURE__ */ jsx107(
2629
3043
  SelectPrimitive.ScrollDownButton,
2630
3044
  {
2631
3045
  className: cn("flex cursor-default items-center justify-center py-1", className),
2632
3046
  ref,
2633
3047
  ...props,
2634
- children: /* @__PURE__ */ jsx101(ChevronDownIcon4, {})
3048
+ children: /* @__PURE__ */ jsx107(ChevronDownIcon4, {})
2635
3049
  }
2636
3050
  );
2637
3051
  });
@@ -2640,23 +3054,23 @@ var SelectScrollDownButton = forwardRef70(function SelectScrollDownButton2({ cla
2640
3054
  import { forwardRef as forwardRef71 } from "react";
2641
3055
  import * as SelectPrimitive2 from "@radix-ui/react-select";
2642
3056
  import { ChevronUpIcon as ChevronUpIcon2 } from "lucide-react";
2643
- import { jsx as jsx102 } from "react/jsx-runtime";
3057
+ import { jsx as jsx108 } from "react/jsx-runtime";
2644
3058
  var SelectScrollUpButton = forwardRef71(function SelectScrollUpButton2({ className, ...props }, ref) {
2645
- return /* @__PURE__ */ jsx102(
3059
+ return /* @__PURE__ */ jsx108(
2646
3060
  SelectPrimitive2.ScrollUpButton,
2647
3061
  {
2648
3062
  className: cn("flex cursor-default items-center justify-center py-1", className),
2649
3063
  ref,
2650
3064
  ...props,
2651
- children: /* @__PURE__ */ jsx102(ChevronUpIcon2, {})
3065
+ children: /* @__PURE__ */ jsx108(ChevronUpIcon2, {})
2652
3066
  }
2653
3067
  );
2654
3068
  });
2655
3069
 
2656
3070
  // src/components/Select/SelectContent.tsx
2657
- import { jsx as jsx103, jsxs as jsxs32 } from "react/jsx-runtime";
3071
+ import { jsx as jsx109, jsxs as jsxs35 } from "react/jsx-runtime";
2658
3072
  var SelectContent = forwardRef72(function SelectContent2({ children, className, position = "popper", ...props }, ref) {
2659
- return /* @__PURE__ */ jsx103(SelectPrimitive3.Portal, { children: /* @__PURE__ */ jsxs32(
3073
+ return /* @__PURE__ */ jsx109(SelectPrimitive3.Portal, { children: /* @__PURE__ */ jsxs35(
2660
3074
  SelectPrimitive3.Content,
2661
3075
  {
2662
3076
  className: cn(
@@ -2668,8 +3082,8 @@ var SelectContent = forwardRef72(function SelectContent2({ children, className,
2668
3082
  ref,
2669
3083
  ...props,
2670
3084
  children: [
2671
- /* @__PURE__ */ jsx103(SelectScrollUpButton, {}),
2672
- /* @__PURE__ */ jsx103(
3085
+ /* @__PURE__ */ jsx109(SelectScrollUpButton, {}),
3086
+ /* @__PURE__ */ jsx109(
2673
3087
  SelectPrimitive3.Viewport,
2674
3088
  {
2675
3089
  className: cn(
@@ -2679,7 +3093,7 @@ var SelectContent = forwardRef72(function SelectContent2({ children, className,
2679
3093
  children
2680
3094
  }
2681
3095
  ),
2682
- /* @__PURE__ */ jsx103(SelectScrollDownButton, {})
3096
+ /* @__PURE__ */ jsx109(SelectScrollDownButton, {})
2683
3097
  ]
2684
3098
  }
2685
3099
  ) });
@@ -2689,9 +3103,9 @@ var SelectContent = forwardRef72(function SelectContent2({ children, className,
2689
3103
  import { forwardRef as forwardRef73 } from "react";
2690
3104
  import * as SelectPrimitive4 from "@radix-ui/react-select";
2691
3105
  import { CheckIcon as CheckIcon4 } from "lucide-react";
2692
- import { jsx as jsx104, jsxs as jsxs33 } from "react/jsx-runtime";
3106
+ import { jsx as jsx110, jsxs as jsxs36 } from "react/jsx-runtime";
2693
3107
  var SelectItem = forwardRef73(function SelectItem2({ children, className, ...props }, ref) {
2694
- return /* @__PURE__ */ jsxs33(
3108
+ return /* @__PURE__ */ jsxs36(
2695
3109
  SelectPrimitive4.Item,
2696
3110
  {
2697
3111
  className: cn(
@@ -2701,8 +3115,8 @@ var SelectItem = forwardRef73(function SelectItem2({ children, className, ...pro
2701
3115
  ref,
2702
3116
  ...props,
2703
3117
  children: [
2704
- /* @__PURE__ */ jsx104("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx104(SelectPrimitive4.ItemIndicator, { children: /* @__PURE__ */ jsx104(CheckIcon4, { className: "h-4 w-4" }) }) }),
2705
- /* @__PURE__ */ jsx104(SelectPrimitive4.ItemText, { children })
3118
+ /* @__PURE__ */ jsx110("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx110(SelectPrimitive4.ItemIndicator, { children: /* @__PURE__ */ jsx110(CheckIcon4, { className: "h-4 w-4" }) }) }),
3119
+ /* @__PURE__ */ jsx110(SelectPrimitive4.ItemText, { children })
2706
3120
  ]
2707
3121
  }
2708
3122
  );
@@ -2711,25 +3125,25 @@ var SelectItem = forwardRef73(function SelectItem2({ children, className, ...pro
2711
3125
  // src/components/Select/SelectLabel.tsx
2712
3126
  import { forwardRef as forwardRef74 } from "react";
2713
3127
  import * as SelectPrimitive5 from "@radix-ui/react-select";
2714
- import { jsx as jsx105 } from "react/jsx-runtime";
3128
+ import { jsx as jsx111 } from "react/jsx-runtime";
2715
3129
  var SelectLabel = forwardRef74(function SelectLabel2({ className, ...props }, ref) {
2716
- return /* @__PURE__ */ jsx105(SelectPrimitive5.Label, { className: cn("px-2 py-1.5 text-sm font-semibold", className), ref, ...props });
3130
+ return /* @__PURE__ */ jsx111(SelectPrimitive5.Label, { className: cn("px-2 py-1.5 text-sm font-semibold", className), ref, ...props });
2717
3131
  });
2718
3132
 
2719
3133
  // src/components/Select/SelectSeparator.tsx
2720
3134
  import { forwardRef as forwardRef75 } from "react";
2721
3135
  import * as SelectPrimitive6 from "@radix-ui/react-select";
2722
- import { jsx as jsx106 } from "react/jsx-runtime";
3136
+ import { jsx as jsx112 } from "react/jsx-runtime";
2723
3137
  var SelectSeparator = forwardRef75(function SelectSeparator2({ className, ...props }, ref) {
2724
- return /* @__PURE__ */ jsx106(SelectPrimitive6.Separator, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
3138
+ return /* @__PURE__ */ jsx112(SelectPrimitive6.Separator, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
2725
3139
  });
2726
3140
 
2727
3141
  // src/components/Select/SelectTrigger.tsx
2728
3142
  import { forwardRef as forwardRef76 } from "react";
2729
3143
  import * as SelectPrimitive7 from "@radix-ui/react-select";
2730
- import { jsx as jsx107 } from "react/jsx-runtime";
3144
+ import { jsx as jsx113 } from "react/jsx-runtime";
2731
3145
  var SelectTrigger = forwardRef76(function SelectTrigger2({ children, className, ...props }, ref) {
2732
- return /* @__PURE__ */ jsx107(SelectPrimitive7.Trigger, { asChild: true, className, ref, ...props, children: /* @__PURE__ */ jsx107(DropdownButton, { children }) });
3146
+ return /* @__PURE__ */ jsx113(SelectPrimitive7.Trigger, { asChild: true, className, ref, ...props, children: /* @__PURE__ */ jsx113(DropdownButton, { children }) });
2733
3147
  });
2734
3148
 
2735
3149
  // src/components/Select/Select.tsx
@@ -2746,7 +3160,7 @@ var Select = Object.assign(SelectPrimitive8.Root.bind(null), {
2746
3160
  });
2747
3161
 
2748
3162
  // src/components/Form/NumberField/NumberFieldSelect.tsx
2749
- import { jsx as jsx108, jsxs as jsxs34 } from "react/jsx-runtime";
3163
+ import { jsx as jsx114, jsxs as jsxs37 } from "react/jsx-runtime";
2750
3164
  var NumberFieldSelect = ({
2751
3165
  description,
2752
3166
  disableAutoPrefix,
@@ -2759,29 +3173,29 @@ var NumberFieldSelect = ({
2759
3173
  setValue,
2760
3174
  value
2761
3175
  }) => {
2762
- return /* @__PURE__ */ jsxs34(FieldGroup, { name, children: [
2763
- /* @__PURE__ */ jsxs34(FieldGroup.Row, { children: [
2764
- /* @__PURE__ */ jsx108(Label3, { children: label }),
2765
- /* @__PURE__ */ jsx108(FieldGroup.Description, { description })
3176
+ return /* @__PURE__ */ jsxs37(FieldGroup, { name, children: [
3177
+ /* @__PURE__ */ jsxs37(FieldGroup.Row, { children: [
3178
+ /* @__PURE__ */ jsx114(Label3, { children: label }),
3179
+ /* @__PURE__ */ jsx114(FieldGroup.Description, { description })
2766
3180
  ] }),
2767
- /* @__PURE__ */ jsxs34(Select, { name, value: value?.toString() ?? "", onValueChange: (value2) => setValue(parseFloat(value2)), children: [
2768
- /* @__PURE__ */ jsx108(Select.Trigger, { "data-testid": `${name}-select-trigger`, disabled: disabled || readOnly, children: /* @__PURE__ */ jsx108(Select.Value, {}) }),
2769
- /* @__PURE__ */ jsx108(Select.Content, { "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => {
3181
+ /* @__PURE__ */ jsxs37(Select, { name, value: value?.toString() ?? "", onValueChange: (value2) => setValue(parseFloat(value2)), children: [
3182
+ /* @__PURE__ */ jsx114(Select.Trigger, { "data-testid": `${name}-select-trigger`, disabled: disabled || readOnly, children: /* @__PURE__ */ jsx114(Select.Value, {}) }),
3183
+ /* @__PURE__ */ jsx114(Select.Content, { "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => {
2770
3184
  const text = (disableAutoPrefix ? "" : `${option} - `) + options[option];
2771
- return /* @__PURE__ */ jsx108(Select.Item, { "data-testid": `${name}-select-item-${option}`, value: option, children: text }, option);
3185
+ return /* @__PURE__ */ jsx114(Select.Item, { "data-testid": `${name}-select-item-${option}`, value: option, children: text }, option);
2772
3186
  }) })
2773
3187
  ] }),
2774
- /* @__PURE__ */ jsx108(FieldGroup.Error, { error })
3188
+ /* @__PURE__ */ jsx114(FieldGroup.Error, { error })
2775
3189
  ] });
2776
3190
  };
2777
3191
 
2778
3192
  // src/components/Slider/Slider.tsx
2779
3193
  import { forwardRef as forwardRef77 } from "react";
2780
3194
  import { Range, Root as Root13, Thumb, Track } from "@radix-ui/react-slider";
2781
- import { jsx as jsx109, jsxs as jsxs35 } from "react/jsx-runtime";
3195
+ import { jsx as jsx115, jsxs as jsxs38 } from "react/jsx-runtime";
2782
3196
  var Slider = forwardRef77(
2783
3197
  function Slider2({ className, disabled, ...props }, ref) {
2784
- return /* @__PURE__ */ jsxs35(
3198
+ return /* @__PURE__ */ jsxs38(
2785
3199
  Root13,
2786
3200
  {
2787
3201
  className: cn("relative flex w-full touch-none items-center py-1.5 select-none", className),
@@ -2789,16 +3203,16 @@ var Slider = forwardRef77(
2789
3203
  ref,
2790
3204
  ...props,
2791
3205
  children: [
2792
- /* @__PURE__ */ jsx109(
3206
+ /* @__PURE__ */ jsx115(
2793
3207
  Track,
2794
3208
  {
2795
3209
  "aria-disabled": disabled,
2796
3210
  className: "bg-primary relative h-1.5 w-full grow overflow-hidden rounded-full opacity-15 aria-disabled:cursor-not-allowed aria-disabled:opacity-10",
2797
3211
  "data-testid": "slider-track",
2798
- children: /* @__PURE__ */ jsx109(Range, { className: "bg-primary absolute h-full" })
3212
+ children: /* @__PURE__ */ jsx115(Range, { className: "bg-primary absolute h-full" })
2799
3213
  }
2800
3214
  ),
2801
- /* @__PURE__ */ jsx109(
3215
+ /* @__PURE__ */ jsx115(
2802
3216
  Thumb,
2803
3217
  {
2804
3218
  "aria-disabled": disabled,
@@ -2813,7 +3227,7 @@ var Slider = forwardRef77(
2813
3227
  );
2814
3228
 
2815
3229
  // src/components/Form/NumberField/NumberFieldSlider.tsx
2816
- import { jsx as jsx110, jsxs as jsxs36 } from "react/jsx-runtime";
3230
+ import { jsx as jsx116, jsxs as jsxs39 } from "react/jsx-runtime";
2817
3231
  var NumberFieldSlider = ({
2818
3232
  description,
2819
3233
  disabled,
@@ -2826,13 +3240,13 @@ var NumberFieldSlider = ({
2826
3240
  setValue,
2827
3241
  value
2828
3242
  }) => {
2829
- return /* @__PURE__ */ jsxs36(FieldGroup, { name, children: [
2830
- /* @__PURE__ */ jsxs36(FieldGroup.Row, { children: [
2831
- /* @__PURE__ */ jsx110(Label3, { children: label }),
2832
- /* @__PURE__ */ jsx110(FieldGroup.Description, { description })
3243
+ return /* @__PURE__ */ jsxs39(FieldGroup, { name, children: [
3244
+ /* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
3245
+ /* @__PURE__ */ jsx116(Label3, { children: label }),
3246
+ /* @__PURE__ */ jsx116(FieldGroup.Description, { description })
2833
3247
  ] }),
2834
- /* @__PURE__ */ jsxs36(FieldGroup.Row, { children: [
2835
- /* @__PURE__ */ jsx110(
3248
+ /* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
3249
+ /* @__PURE__ */ jsx116(
2836
3250
  Slider,
2837
3251
  {
2838
3252
  disabled: disabled || readOnly,
@@ -2843,20 +3257,20 @@ var NumberFieldSlider = ({
2843
3257
  onValueChange: ([value2]) => setValue(value2)
2844
3258
  }
2845
3259
  ),
2846
- /* @__PURE__ */ jsx110("span", { className: "flex h-full w-8 items-center justify-center text-sm text-muted-foreground", children: value ?? "NA" })
3260
+ /* @__PURE__ */ jsx116("span", { className: "flex h-full w-8 items-center justify-center text-sm text-muted-foreground", children: value ?? "NA" })
2847
3261
  ] }),
2848
- /* @__PURE__ */ jsx110(FieldGroup.Error, { error })
3262
+ /* @__PURE__ */ jsx116(FieldGroup.Error, { error })
2849
3263
  ] });
2850
3264
  };
2851
3265
 
2852
3266
  // src/components/Form/NumberField/NumberField.tsx
2853
- import { jsx as jsx111 } from "react/jsx-runtime";
3267
+ import { jsx as jsx117 } from "react/jsx-runtime";
2854
3268
  var NumberField = (props) => {
2855
- return match2(props).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx111(NumberFieldInput, { ...props2 })).with({ variant: "slider" }, (props2) => /* @__PURE__ */ jsx111(NumberFieldSlider, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx111(NumberFieldRadio, { ...props2 })).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx111(NumberFieldSelect, { ...props2 })).exhaustive();
3269
+ return match2(props).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx117(NumberFieldInput, { ...props2 })).with({ variant: "slider" }, (props2) => /* @__PURE__ */ jsx117(NumberFieldSlider, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx117(NumberFieldRadio, { ...props2 })).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx117(NumberFieldSelect, { ...props2 })).exhaustive();
2856
3270
  };
2857
3271
 
2858
3272
  // src/components/Form/NumberRecordField.tsx
2859
- import { jsx as jsx112, jsxs as jsxs37 } from "react/jsx-runtime";
3273
+ import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
2860
3274
  var NumberRecordField = ({
2861
3275
  disabled,
2862
3276
  error: recordError,
@@ -2868,13 +3282,13 @@ var NumberRecordField = ({
2868
3282
  setValue: setRecordValue,
2869
3283
  value: recordValue
2870
3284
  }) => {
2871
- const optionsRef = useRef3(options);
2872
- useEffect5(() => {
3285
+ const optionsRef = useRef5(options);
3286
+ useEffect7(() => {
2873
3287
  if (!recordValue) {
2874
3288
  setRecordValue({});
2875
3289
  }
2876
3290
  }, []);
2877
- useEffect5(() => {
3291
+ useEffect7(() => {
2878
3292
  if (optionsRef.current !== options) {
2879
3293
  setRecordValue({});
2880
3294
  optionsRef.current = options;
@@ -2883,11 +3297,11 @@ var NumberRecordField = ({
2883
3297
  if (!recordValue) {
2884
3298
  return null;
2885
3299
  }
2886
- return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-4", children: [
2887
- /* @__PURE__ */ jsx112(Heading, { className: "font-medium", variant: "h5", children: label }),
2888
- /* @__PURE__ */ jsx112("div", { className: "flex flex-col gap-6", children: Object.keys(items).map((name) => {
3300
+ return /* @__PURE__ */ jsxs40("div", { className: "flex flex-col gap-4", children: [
3301
+ /* @__PURE__ */ jsx118(Heading, { className: "font-medium", variant: "h5", children: label }),
3302
+ /* @__PURE__ */ jsx118("div", { className: "flex flex-col gap-6", children: Object.keys(items).map((name) => {
2889
3303
  const item = items[name];
2890
- return /* @__PURE__ */ jsx112(
3304
+ return /* @__PURE__ */ jsx118(
2891
3305
  NumberField,
2892
3306
  {
2893
3307
  error: recordError?.[name],
@@ -2908,14 +3322,14 @@ var NumberRecordField = ({
2908
3322
  };
2909
3323
 
2910
3324
  // src/components/Form/RecordArrayField.tsx
2911
- import { memo, useEffect as useEffect9, useRef as useRef4 } from "react";
3325
+ import { memo, useEffect as useEffect11, useRef as useRef6 } from "react";
2912
3326
  import { MinusCircleIcon, PlusCircleIcon } from "lucide-react";
2913
3327
 
2914
3328
  // src/components/Form/BooleanField/BooleanField.tsx
2915
3329
  import { match as match4 } from "ts-pattern";
2916
3330
 
2917
3331
  // src/components/Form/BooleanField/BooleanFieldCheckbox.tsx
2918
- import { jsx as jsx113, jsxs as jsxs38 } from "react/jsx-runtime";
3332
+ import { jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
2919
3333
  var BooleanFieldCheckbox = ({
2920
3334
  description,
2921
3335
  disabled,
@@ -2926,9 +3340,9 @@ var BooleanFieldCheckbox = ({
2926
3340
  setValue,
2927
3341
  value
2928
3342
  }) => {
2929
- return /* @__PURE__ */ jsxs38(FieldGroup, { name, children: [
2930
- /* @__PURE__ */ jsxs38(FieldGroup.Row, { children: [
2931
- /* @__PURE__ */ jsx113(
3343
+ return /* @__PURE__ */ jsxs41(FieldGroup, { name, children: [
3344
+ /* @__PURE__ */ jsxs41(FieldGroup.Row, { children: [
3345
+ /* @__PURE__ */ jsx119(
2932
3346
  Checkbox,
2933
3347
  {
2934
3348
  checked: Boolean(value),
@@ -2942,17 +3356,17 @@ var BooleanFieldCheckbox = ({
2942
3356
  }
2943
3357
  }
2944
3358
  ),
2945
- /* @__PURE__ */ jsx113(Label3, { htmlFor: name, children: label }),
2946
- /* @__PURE__ */ jsx113(FieldGroup.Description, { description })
3359
+ /* @__PURE__ */ jsx119(Label3, { htmlFor: name, children: label }),
3360
+ /* @__PURE__ */ jsx119(FieldGroup.Description, { description })
2947
3361
  ] }),
2948
- /* @__PURE__ */ jsx113(FieldGroup.Error, { error })
3362
+ /* @__PURE__ */ jsx119(FieldGroup.Error, { error })
2949
3363
  ] });
2950
3364
  };
2951
3365
 
2952
3366
  // src/components/Form/BooleanField/BooleanFieldRadio.tsx
2953
3367
  import { useCallback as useCallback2 } from "react";
2954
3368
  import { match as match3 } from "ts-pattern";
2955
- import { jsx as jsx114, jsxs as jsxs39 } from "react/jsx-runtime";
3369
+ import { jsx as jsx120, jsxs as jsxs42 } from "react/jsx-runtime";
2956
3370
  var stringifyBoolean = (value) => match3(value).with(void 0, () => "").with(true, () => "true").with(false, () => "false").exhaustive();
2957
3371
  var BooleanFieldRadio = ({
2958
3372
  description,
@@ -2972,12 +3386,12 @@ var BooleanFieldRadio = ({
2972
3386
  },
2973
3387
  [match3, setValue]
2974
3388
  );
2975
- return /* @__PURE__ */ jsxs39(FieldGroup, { name, children: [
2976
- /* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
2977
- /* @__PURE__ */ jsx114(Label3, { children: label }),
2978
- /* @__PURE__ */ jsx114(FieldGroup.Description, { description })
3389
+ return /* @__PURE__ */ jsxs42(FieldGroup, { name, children: [
3390
+ /* @__PURE__ */ jsxs42(FieldGroup.Row, { children: [
3391
+ /* @__PURE__ */ jsx120(Label3, { children: label }),
3392
+ /* @__PURE__ */ jsx120(FieldGroup.Description, { description })
2979
3393
  ] }),
2980
- /* @__PURE__ */ jsxs39(
3394
+ /* @__PURE__ */ jsxs42(
2981
3395
  RadioGroup4,
2982
3396
  {
2983
3397
  disabled: disabled || readOnly,
@@ -2985,37 +3399,37 @@ var BooleanFieldRadio = ({
2985
3399
  value: stringifyBoolean(value),
2986
3400
  onValueChange: handleValueChange,
2987
3401
  children: [
2988
- /* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
2989
- /* @__PURE__ */ jsx114(RadioGroup4.Item, { id: `${name}-true`, value: "true" }),
2990
- /* @__PURE__ */ jsx114(Label3, { "aria-disabled": disabled || readOnly, className: "text-muted-foreground", htmlFor: `${name}-true`, children: options?.true ?? t("form.radioLabels.true") })
3402
+ /* @__PURE__ */ jsxs42(FieldGroup.Row, { children: [
3403
+ /* @__PURE__ */ jsx120(RadioGroup4.Item, { id: `${name}-true`, value: "true" }),
3404
+ /* @__PURE__ */ jsx120(Label3, { "aria-disabled": disabled || readOnly, className: "text-muted-foreground", htmlFor: `${name}-true`, children: options?.true ?? t("form.radioLabels.true") })
2991
3405
  ] }),
2992
- /* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
2993
- /* @__PURE__ */ jsx114(RadioGroup4.Item, { id: `${name}-false`, value: "false" }),
2994
- /* @__PURE__ */ jsx114(Label3, { "aria-disabled": disabled || readOnly, className: "text-muted-foreground", htmlFor: `${name}-false`, children: options?.false ?? t("form.radioLabels.false") })
3406
+ /* @__PURE__ */ jsxs42(FieldGroup.Row, { children: [
3407
+ /* @__PURE__ */ jsx120(RadioGroup4.Item, { id: `${name}-false`, value: "false" }),
3408
+ /* @__PURE__ */ jsx120(Label3, { "aria-disabled": disabled || readOnly, className: "text-muted-foreground", htmlFor: `${name}-false`, children: options?.false ?? t("form.radioLabels.false") })
2995
3409
  ] })
2996
3410
  ]
2997
3411
  }
2998
3412
  ),
2999
- /* @__PURE__ */ jsx114(FieldGroup.Error, { error })
3413
+ /* @__PURE__ */ jsx120(FieldGroup.Error, { error })
3000
3414
  ] });
3001
3415
  };
3002
3416
 
3003
3417
  // src/components/Form/BooleanField/BooleanField.tsx
3004
- import { jsx as jsx115 } from "react/jsx-runtime";
3418
+ import { jsx as jsx121 } from "react/jsx-runtime";
3005
3419
  var BooleanField = (props) => {
3006
- return match4(props).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx115(BooleanFieldRadio, { ...props2 })).with({ variant: "checkbox" }, (props2) => /* @__PURE__ */ jsx115(BooleanFieldCheckbox, { ...props2 })).exhaustive();
3420
+ return match4(props).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx121(BooleanFieldRadio, { ...props2 })).with({ variant: "checkbox" }, (props2) => /* @__PURE__ */ jsx121(BooleanFieldCheckbox, { ...props2 })).exhaustive();
3007
3421
  };
3008
3422
 
3009
3423
  // src/components/Form/DateField/DateField.tsx
3010
- import { useEffect as useEffect6, useState as useState6 } from "react";
3424
+ import { useEffect as useEffect8, useState as useState6 } from "react";
3011
3425
  import { toBasicISOString as toBasicISOString2 } from "@douglasneuroinformatics/libjs";
3012
- import { jsx as jsx116, jsxs as jsxs40 } from "react/jsx-runtime";
3426
+ import { jsx as jsx122, jsxs as jsxs43 } from "react/jsx-runtime";
3013
3427
  var isValidDateString = (s) => /^(\d{4})-((0[1-9])|(1[0-2]))-((0[1-9])|([12])[0-9]|3[01])$/.test(s);
3014
3428
  var DateField = ({ disabled, error, label, name, readOnly, setValue, value }) => {
3015
3429
  const [isDatePickerOpen, setIsDatePickerOpen] = useState6(false);
3016
3430
  const [isInputFocused, setIsInputFocused] = useState6(false);
3017
3431
  const [inputValue, setInputValue] = useState6(value ? toBasicISOString2(value) : "");
3018
- useEffect6(() => {
3432
+ useEffect8(() => {
3019
3433
  const isSelecting = isDatePickerOpen || isInputFocused;
3020
3434
  if (isSelecting) {
3021
3435
  return;
@@ -3025,13 +3439,13 @@ var DateField = ({ disabled, error, label, name, readOnly, setValue, value }) =>
3025
3439
  setInputValue("");
3026
3440
  }
3027
3441
  }, [isDatePickerOpen, isInputFocused]);
3028
- useEffect6(() => {
3442
+ useEffect8(() => {
3029
3443
  setInputValue(value ? toBasicISOString2(value) : "");
3030
3444
  }, [value]);
3031
- return /* @__PURE__ */ jsxs40(FieldGroup, { name, children: [
3032
- /* @__PURE__ */ jsx116(Label3, { htmlFor: name, children: label }),
3033
- /* @__PURE__ */ jsxs40(Popover, { open: isDatePickerOpen, onOpenChange: setIsDatePickerOpen, children: [
3034
- /* @__PURE__ */ jsx116(Popover.Trigger, { children: /* @__PURE__ */ jsx116(
3445
+ return /* @__PURE__ */ jsxs43(FieldGroup, { name, children: [
3446
+ /* @__PURE__ */ jsx122(Label3, { htmlFor: name, children: label }),
3447
+ /* @__PURE__ */ jsxs43(Popover, { open: isDatePickerOpen, onOpenChange: setIsDatePickerOpen, children: [
3448
+ /* @__PURE__ */ jsx122(Popover.Trigger, { children: /* @__PURE__ */ jsx122(
3035
3449
  Input,
3036
3450
  {
3037
3451
  autoComplete: "off",
@@ -3046,7 +3460,7 @@ var DateField = ({ disabled, error, label, name, readOnly, setValue, value }) =>
3046
3460
  onFocus: () => setIsInputFocused(true)
3047
3461
  }
3048
3462
  ) }),
3049
- /* @__PURE__ */ jsx116(Popover.Content, { asChild: true, align: "start", autofocus: false, className: "w-auto", children: /* @__PURE__ */ jsx116(
3463
+ /* @__PURE__ */ jsx122(Popover.Content, { asChild: true, align: "start", autofocus: false, className: "w-auto", children: /* @__PURE__ */ jsx122(
3050
3464
  DatePicker,
3051
3465
  {
3052
3466
  onSelection: (value2) => {
@@ -3056,16 +3470,16 @@ var DateField = ({ disabled, error, label, name, readOnly, setValue, value }) =>
3056
3470
  }
3057
3471
  ) })
3058
3472
  ] }),
3059
- /* @__PURE__ */ jsx116(FieldGroup.Error, { error })
3473
+ /* @__PURE__ */ jsx122(FieldGroup.Error, { error })
3060
3474
  ] });
3061
3475
  };
3062
3476
 
3063
3477
  // src/components/Form/SetField/SetField.tsx
3064
- import { useEffect as useEffect7 } from "react";
3478
+ import { useEffect as useEffect9 } from "react";
3065
3479
  import { match as match5 } from "ts-pattern";
3066
3480
 
3067
3481
  // src/components/Form/SetField/SetFieldListbox.tsx
3068
- import { jsx as jsx117, jsxs as jsxs41 } from "react/jsx-runtime";
3482
+ import { jsx as jsx123, jsxs as jsxs44 } from "react/jsx-runtime";
3069
3483
  var SetFieldListbox = ({
3070
3484
  description,
3071
3485
  disabled,
@@ -3077,13 +3491,13 @@ var SetFieldListbox = ({
3077
3491
  readOnly,
3078
3492
  value
3079
3493
  }) => {
3080
- return /* @__PURE__ */ jsxs41(FieldGroup, { name, children: [
3081
- /* @__PURE__ */ jsxs41(FieldGroup.Row, { children: [
3082
- /* @__PURE__ */ jsx117(Label3, { children: label }),
3083
- /* @__PURE__ */ jsx117(FieldGroup.Description, { description })
3494
+ return /* @__PURE__ */ jsxs44(FieldGroup, { name, children: [
3495
+ /* @__PURE__ */ jsxs44(FieldGroup.Row, { children: [
3496
+ /* @__PURE__ */ jsx123(Label3, { children: label }),
3497
+ /* @__PURE__ */ jsx123(FieldGroup.Description, { description })
3084
3498
  ] }),
3085
- /* @__PURE__ */ jsx117("div", { className: "grid gap-2", children: Object.keys(options).map((option) => /* @__PURE__ */ jsxs41(FieldGroup.Row, { children: [
3086
- /* @__PURE__ */ jsx117(
3499
+ /* @__PURE__ */ jsx123("div", { className: "grid gap-2", children: Object.keys(options).map((option) => /* @__PURE__ */ jsxs44(FieldGroup.Row, { children: [
3500
+ /* @__PURE__ */ jsx123(
3087
3501
  Checkbox,
3088
3502
  {
3089
3503
  checked: value?.has(option) ?? false,
@@ -3094,14 +3508,14 @@ var SetFieldListbox = ({
3094
3508
  }
3095
3509
  }
3096
3510
  ),
3097
- /* @__PURE__ */ jsx117(Label3, { className: "font-normal text-muted-foreground", htmlFor: `${name}-${option}`, children: options[option] })
3511
+ /* @__PURE__ */ jsx123(Label3, { className: "font-normal text-muted-foreground", htmlFor: `${name}-${option}`, children: options[option] })
3098
3512
  ] }, option)) }),
3099
- /* @__PURE__ */ jsx117(FieldGroup.Error, { error })
3513
+ /* @__PURE__ */ jsx123(FieldGroup.Error, { error })
3100
3514
  ] });
3101
3515
  };
3102
3516
 
3103
3517
  // src/components/Form/SetField/SetFieldSelect.tsx
3104
- import { jsx as jsx118, jsxs as jsxs42 } from "react/jsx-runtime";
3518
+ import { jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
3105
3519
  var SetFieldSelect = ({
3106
3520
  description,
3107
3521
  disabled,
@@ -3113,16 +3527,16 @@ var SetFieldSelect = ({
3113
3527
  readOnly,
3114
3528
  value
3115
3529
  }) => {
3116
- return value ? /* @__PURE__ */ jsxs42(FieldGroup, { name, children: [
3117
- /* @__PURE__ */ jsxs42(FieldGroup.Row, { children: [
3118
- /* @__PURE__ */ jsx118(Label3, { children: label }),
3119
- /* @__PURE__ */ jsx118(FieldGroup.Description, { description })
3530
+ return value ? /* @__PURE__ */ jsxs45(FieldGroup, { name, children: [
3531
+ /* @__PURE__ */ jsxs45(FieldGroup.Row, { children: [
3532
+ /* @__PURE__ */ jsx124(Label3, { children: label }),
3533
+ /* @__PURE__ */ jsx124(FieldGroup.Description, { description })
3120
3534
  ] }),
3121
- /* @__PURE__ */ jsxs42(DropdownMenu, { children: [
3122
- /* @__PURE__ */ jsx118(DropdownMenu.Trigger, { asChild: true, className: "w-full", disabled: disabled || readOnly, children: /* @__PURE__ */ jsx118(DropdownButton, { children: value.size ? /* @__PURE__ */ jsx118("div", { className: "flex items-center gap-2", children: Array.from(value).map((option) => /* @__PURE__ */ jsx118(Badge, { className: "font-normal", variant: "outline", children: options[option] }, option)) }) : null }) }),
3123
- /* @__PURE__ */ jsx118(DropdownMenu.Content, { widthFull: true, align: "start", children: Object.keys(options).map((option) => {
3535
+ /* @__PURE__ */ jsxs45(DropdownMenu, { children: [
3536
+ /* @__PURE__ */ jsx124(DropdownMenu.Trigger, { asChild: true, className: "w-full", disabled: disabled || readOnly, children: /* @__PURE__ */ jsx124(DropdownButton, { children: value.size ? /* @__PURE__ */ jsx124("div", { className: "flex items-center gap-2", children: Array.from(value).map((option) => /* @__PURE__ */ jsx124(Badge, { className: "font-normal", variant: "outline", children: options[option] }, option)) }) : null }) }),
3537
+ /* @__PURE__ */ jsx124(DropdownMenu.Content, { widthFull: true, align: "start", children: Object.keys(options).map((option) => {
3124
3538
  const checked = value.has(option);
3125
- return /* @__PURE__ */ jsx118(
3539
+ return /* @__PURE__ */ jsx124(
3126
3540
  DropdownMenu.CheckboxItem,
3127
3541
  {
3128
3542
  checked,
@@ -3136,14 +3550,14 @@ var SetFieldSelect = ({
3136
3550
  );
3137
3551
  }) })
3138
3552
  ] }),
3139
- /* @__PURE__ */ jsx118(FieldGroup.Error, { error })
3553
+ /* @__PURE__ */ jsx124(FieldGroup.Error, { error })
3140
3554
  ] }) : null;
3141
3555
  };
3142
3556
 
3143
3557
  // src/components/Form/SetField/SetField.tsx
3144
- import { jsx as jsx119 } from "react/jsx-runtime";
3558
+ import { jsx as jsx125 } from "react/jsx-runtime";
3145
3559
  var SetField = (props) => {
3146
- useEffect7(() => {
3560
+ useEffect9(() => {
3147
3561
  if (!props.value) {
3148
3562
  props.setValue(/* @__PURE__ */ new Set([]));
3149
3563
  }
@@ -3159,14 +3573,14 @@ var SetField = (props) => {
3159
3573
  props.setValue(updatedValue);
3160
3574
  }
3161
3575
  };
3162
- return match5(props).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx119(SetFieldSelect, { onCheckedChange: handleCheckedChange, ...props2 })).with({ variant: "listbox" }, (props2) => /* @__PURE__ */ jsx119(SetFieldListbox, { onCheckedChange: handleCheckedChange, ...props2 })).exhaustive();
3576
+ return match5(props).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx125(SetFieldSelect, { onCheckedChange: handleCheckedChange, ...props2 })).with({ variant: "listbox" }, (props2) => /* @__PURE__ */ jsx125(SetFieldListbox, { onCheckedChange: handleCheckedChange, ...props2 })).exhaustive();
3163
3577
  };
3164
3578
 
3165
3579
  // src/components/Form/StringField/StringField.tsx
3166
3580
  import { match as match6 } from "ts-pattern";
3167
3581
 
3168
3582
  // src/components/Form/StringField/StringFieldInput.tsx
3169
- import { jsx as jsx120, jsxs as jsxs43 } from "react/jsx-runtime";
3583
+ import { jsx as jsx126, jsxs as jsxs46 } from "react/jsx-runtime";
3170
3584
  var StringFieldInput = ({
3171
3585
  description,
3172
3586
  disabled,
@@ -3178,12 +3592,12 @@ var StringFieldInput = ({
3178
3592
  setValue,
3179
3593
  value
3180
3594
  }) => {
3181
- return /* @__PURE__ */ jsxs43(FieldGroup, { name, children: [
3182
- /* @__PURE__ */ jsxs43(FieldGroup.Row, { children: [
3183
- /* @__PURE__ */ jsx120(Label3, { htmlFor: name, children: label }),
3184
- /* @__PURE__ */ jsx120(FieldGroup.Description, { description })
3595
+ return /* @__PURE__ */ jsxs46(FieldGroup, { name, children: [
3596
+ /* @__PURE__ */ jsxs46(FieldGroup.Row, { children: [
3597
+ /* @__PURE__ */ jsx126(Label3, { htmlFor: name, children: label }),
3598
+ /* @__PURE__ */ jsx126(FieldGroup.Description, { description })
3185
3599
  ] }),
3186
- /* @__PURE__ */ jsx120(
3600
+ /* @__PURE__ */ jsx126(
3187
3601
  Input,
3188
3602
  {
3189
3603
  disabled: disabled || readOnly,
@@ -3195,15 +3609,15 @@ var StringFieldInput = ({
3195
3609
  onChange: (event) => setValue(event.target.value)
3196
3610
  }
3197
3611
  ),
3198
- /* @__PURE__ */ jsx120(FieldGroup.Error, { error })
3612
+ /* @__PURE__ */ jsx126(FieldGroup.Error, { error })
3199
3613
  ] });
3200
3614
  };
3201
3615
 
3202
3616
  // src/components/Form/StringField/StringFieldPassword.tsx
3203
- import { useEffect as useEffect8, useState as useState7 } from "react";
3617
+ import { useEffect as useEffect10, useState as useState7 } from "react";
3204
3618
  import { EyeIcon, EyeOffIcon } from "lucide-react";
3205
3619
  import { motion as motion4 } from "motion/react";
3206
- import { jsx as jsx121, jsxs as jsxs44 } from "react/jsx-runtime";
3620
+ import { jsx as jsx127, jsxs as jsxs47 } from "react/jsx-runtime";
3207
3621
  var StringFieldPassword = ({
3208
3622
  calculateStrength,
3209
3623
  description,
@@ -3217,18 +3631,18 @@ var StringFieldPassword = ({
3217
3631
  }) => {
3218
3632
  const [strength, setStrength] = useState7(calculateStrength ? 0 : null);
3219
3633
  const [show, setShow] = useState7(false);
3220
- useEffect8(() => {
3634
+ useEffect10(() => {
3221
3635
  if (calculateStrength) {
3222
3636
  setStrength(value ? calculateStrength(value) : 0);
3223
3637
  }
3224
3638
  }, [value]);
3225
- return /* @__PURE__ */ jsxs44(FieldGroup, { name, children: [
3226
- /* @__PURE__ */ jsxs44(FieldGroup.Row, { children: [
3227
- /* @__PURE__ */ jsx121(Label3, { htmlFor: name, children: label }),
3228
- /* @__PURE__ */ jsx121(FieldGroup.Description, { description })
3639
+ return /* @__PURE__ */ jsxs47(FieldGroup, { name, children: [
3640
+ /* @__PURE__ */ jsxs47(FieldGroup.Row, { children: [
3641
+ /* @__PURE__ */ jsx127(Label3, { htmlFor: name, children: label }),
3642
+ /* @__PURE__ */ jsx127(FieldGroup.Description, { description })
3229
3643
  ] }),
3230
- /* @__PURE__ */ jsxs44(FieldGroup.Row, { children: [
3231
- /* @__PURE__ */ jsx121(
3644
+ /* @__PURE__ */ jsxs47(FieldGroup.Row, { children: [
3645
+ /* @__PURE__ */ jsx127(
3232
3646
  Input,
3233
3647
  {
3234
3648
  disabled: disabled || readOnly,
@@ -3239,7 +3653,7 @@ var StringFieldPassword = ({
3239
3653
  onChange: (event) => setValue(event.target.value)
3240
3654
  }
3241
3655
  ),
3242
- /* @__PURE__ */ jsxs44(
3656
+ /* @__PURE__ */ jsxs47(
3243
3657
  "button",
3244
3658
  {
3245
3659
  className: "text-muted-foreground absolute right-0 flex h-full w-8 items-center justify-center",
@@ -3248,20 +3662,20 @@ var StringFieldPassword = ({
3248
3662
  type: "button",
3249
3663
  onClick: () => setShow(!show),
3250
3664
  children: [
3251
- /* @__PURE__ */ jsx121(EyeIcon, { className: cn("absolute transition-all", show ? "scale-0 -rotate-90" : "scale-100 rotate-0") }),
3252
- /* @__PURE__ */ jsx121(EyeOffIcon, { className: cn("absolute transition-all", !show ? "scale-0 rotate-90" : "scale-100 rotate-0") })
3665
+ /* @__PURE__ */ jsx127(EyeIcon, { className: cn("absolute transition-all", show ? "scale-0 -rotate-90" : "scale-100 rotate-0") }),
3666
+ /* @__PURE__ */ jsx127(EyeOffIcon, { className: cn("absolute transition-all", !show ? "scale-0 rotate-90" : "scale-100 rotate-0") })
3253
3667
  ]
3254
3668
  }
3255
3669
  )
3256
3670
  ] }),
3257
- strength !== null && /* @__PURE__ */ jsx121(
3671
+ strength !== null && /* @__PURE__ */ jsx127(
3258
3672
  motion4.div,
3259
3673
  {
3260
3674
  animate: { width: `${Math.max(strength * 25, 5)}%` },
3261
3675
  className: "h-1 w-full overflow-hidden rounded-sm",
3262
3676
  initial: { width: "5%" },
3263
3677
  transition: { duration: 0.5 },
3264
- children: /* @__PURE__ */ jsx121(
3678
+ children: /* @__PURE__ */ jsx127(
3265
3679
  "div",
3266
3680
  {
3267
3681
  className: cn(
@@ -3274,13 +3688,13 @@ var StringFieldPassword = ({
3274
3688
  )
3275
3689
  }
3276
3690
  ),
3277
- /* @__PURE__ */ jsx121(FieldGroup.Error, { error })
3691
+ /* @__PURE__ */ jsx127(FieldGroup.Error, { error })
3278
3692
  ] });
3279
3693
  };
3280
3694
 
3281
3695
  // src/components/Form/BaseRadioField.tsx
3282
3696
  import { cva as cva3 } from "class-variance-authority";
3283
- import { jsx as jsx122, jsxs as jsxs45 } from "react/jsx-runtime";
3697
+ import { jsx as jsx128, jsxs as jsxs48 } from "react/jsx-runtime";
3284
3698
  var baseRadioFieldVariants = cva3("flex", {
3285
3699
  defaultVariants: {
3286
3700
  orientation: "vertical"
@@ -3305,21 +3719,21 @@ var BaseRadioField = ({
3305
3719
  value
3306
3720
  }) => {
3307
3721
  const optionsCount = Object.keys(options).length;
3308
- return /* @__PURE__ */ jsxs45(FieldGroup, { name, children: [
3309
- /* @__PURE__ */ jsxs45(FieldGroup.Row, { children: [
3310
- /* @__PURE__ */ jsx122(Label3, { children: label }),
3311
- /* @__PURE__ */ jsx122(FieldGroup.Description, { description })
3722
+ return /* @__PURE__ */ jsxs48(FieldGroup, { name, children: [
3723
+ /* @__PURE__ */ jsxs48(FieldGroup.Row, { children: [
3724
+ /* @__PURE__ */ jsx128(Label3, { children: label }),
3725
+ /* @__PURE__ */ jsx128(FieldGroup.Description, { description })
3312
3726
  ] }),
3313
- /* @__PURE__ */ jsx122(
3727
+ /* @__PURE__ */ jsx128(
3314
3728
  RadioGroup4,
3315
3729
  {
3316
3730
  className: baseRadioFieldVariants({ orientation: optionsCount > 5 ? "vertical" : orientation }),
3317
3731
  name,
3318
3732
  value: value ?? "",
3319
3733
  onValueChange: (value2) => setValue(value2),
3320
- children: Object.keys(options).map((option) => /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
3321
- /* @__PURE__ */ jsx122(RadioGroup4.Item, { disabled: disabled || readOnly, id: `${name}-${option}`, value: option }),
3322
- /* @__PURE__ */ jsx122(
3734
+ children: Object.keys(options).map((option) => /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
3735
+ /* @__PURE__ */ jsx128(RadioGroup4.Item, { disabled: disabled || readOnly, id: `${name}-${option}`, value: option }),
3736
+ /* @__PURE__ */ jsx128(
3323
3737
  Label3,
3324
3738
  {
3325
3739
  "aria-disabled": disabled || readOnly,
@@ -3331,18 +3745,18 @@ var BaseRadioField = ({
3331
3745
  ] }, option))
3332
3746
  }
3333
3747
  ),
3334
- /* @__PURE__ */ jsx122(FieldGroup.Error, { error })
3748
+ /* @__PURE__ */ jsx128(FieldGroup.Error, { error })
3335
3749
  ] });
3336
3750
  };
3337
3751
 
3338
3752
  // src/components/Form/StringField/StringFieldRadio.tsx
3339
- import { jsx as jsx123 } from "react/jsx-runtime";
3753
+ import { jsx as jsx129 } from "react/jsx-runtime";
3340
3754
  var StringFieldRadio = (props) => {
3341
- return /* @__PURE__ */ jsx123(BaseRadioField, { ...props });
3755
+ return /* @__PURE__ */ jsx129(BaseRadioField, { ...props });
3342
3756
  };
3343
3757
 
3344
3758
  // src/components/Form/StringField/StringFieldSelect.tsx
3345
- import { jsx as jsx124, jsxs as jsxs46 } from "react/jsx-runtime";
3759
+ import { jsx as jsx130, jsxs as jsxs49 } from "react/jsx-runtime";
3346
3760
  var StringFieldSelect = ({
3347
3761
  description,
3348
3762
  disabled,
@@ -3354,24 +3768,24 @@ var StringFieldSelect = ({
3354
3768
  setValue,
3355
3769
  value
3356
3770
  }) => {
3357
- return /* @__PURE__ */ jsxs46(FieldGroup, { name, children: [
3358
- /* @__PURE__ */ jsxs46(FieldGroup.Row, { children: [
3359
- /* @__PURE__ */ jsx124(Label3, { children: label }),
3360
- /* @__PURE__ */ jsx124(FieldGroup.Description, { description })
3771
+ return /* @__PURE__ */ jsxs49(FieldGroup, { name, children: [
3772
+ /* @__PURE__ */ jsxs49(FieldGroup.Row, { children: [
3773
+ /* @__PURE__ */ jsx130(Label3, { children: label }),
3774
+ /* @__PURE__ */ jsx130(FieldGroup.Description, { description })
3361
3775
  ] }),
3362
- /* @__PURE__ */ jsxs46(Select, { name, value: value ?? "", onValueChange: (value2) => setValue(value2), children: [
3363
- /* @__PURE__ */ jsx124(Select.Trigger, { "data-testid": `${name}-select-trigger`, disabled: disabled || readOnly, children: /* @__PURE__ */ jsx124(Select.Value, {}) }),
3364
- /* @__PURE__ */ jsx124(Select.Content, { "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx124(Select.Item, { "data-testid": `${name}-select-item-${option}`, value: option, children: options[option] }, option)) })
3776
+ /* @__PURE__ */ jsxs49(Select, { name, value: value ?? "", onValueChange: (value2) => setValue(value2), children: [
3777
+ /* @__PURE__ */ jsx130(Select.Trigger, { "data-testid": `${name}-select-trigger`, disabled: disabled || readOnly, children: /* @__PURE__ */ jsx130(Select.Value, {}) }),
3778
+ /* @__PURE__ */ jsx130(Select.Content, { "data-testid": `${name}-select-content`, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx130(Select.Item, { "data-testid": `${name}-select-item-${option}`, value: option, children: options[option] }, option)) })
3365
3779
  ] }),
3366
- /* @__PURE__ */ jsx124(FieldGroup.Error, { error })
3780
+ /* @__PURE__ */ jsx130(FieldGroup.Error, { error })
3367
3781
  ] });
3368
3782
  };
3369
3783
 
3370
3784
  // src/components/TextArea/TextArea.tsx
3371
3785
  import * as React27 from "react";
3372
- import { jsx as jsx125 } from "react/jsx-runtime";
3786
+ import { jsx as jsx131 } from "react/jsx-runtime";
3373
3787
  var TextArea = React27.forwardRef(function TextArea2({ className, ...props }, ref) {
3374
- return /* @__PURE__ */ jsx125(
3788
+ return /* @__PURE__ */ jsx131(
3375
3789
  "textarea",
3376
3790
  {
3377
3791
  autoComplete: "off",
@@ -3387,7 +3801,7 @@ var TextArea = React27.forwardRef(function TextArea2({ className, ...props }, re
3387
3801
  });
3388
3802
 
3389
3803
  // src/components/Form/StringField/StringFieldTextArea.tsx
3390
- import { jsx as jsx126, jsxs as jsxs47 } from "react/jsx-runtime";
3804
+ import { jsx as jsx132, jsxs as jsxs50 } from "react/jsx-runtime";
3391
3805
  var StringFieldTextArea = ({
3392
3806
  description,
3393
3807
  disabled,
@@ -3399,12 +3813,12 @@ var StringFieldTextArea = ({
3399
3813
  setValue,
3400
3814
  value
3401
3815
  }) => {
3402
- return /* @__PURE__ */ jsxs47(FieldGroup, { name, children: [
3403
- /* @__PURE__ */ jsxs47(FieldGroup.Row, { children: [
3404
- /* @__PURE__ */ jsx126(Label3, { htmlFor: name, children: label }),
3405
- /* @__PURE__ */ jsx126(FieldGroup.Description, { description })
3816
+ return /* @__PURE__ */ jsxs50(FieldGroup, { name, children: [
3817
+ /* @__PURE__ */ jsxs50(FieldGroup.Row, { children: [
3818
+ /* @__PURE__ */ jsx132(Label3, { htmlFor: name, children: label }),
3819
+ /* @__PURE__ */ jsx132(FieldGroup.Description, { description })
3406
3820
  ] }),
3407
- /* @__PURE__ */ jsx126(
3821
+ /* @__PURE__ */ jsx132(
3408
3822
  TextArea,
3409
3823
  {
3410
3824
  disabled: disabled || readOnly,
@@ -3416,37 +3830,37 @@ var StringFieldTextArea = ({
3416
3830
  onChange: (event) => setValue(event.target.value)
3417
3831
  }
3418
3832
  ),
3419
- /* @__PURE__ */ jsx126(FieldGroup.Error, { error })
3833
+ /* @__PURE__ */ jsx132(FieldGroup.Error, { error })
3420
3834
  ] });
3421
3835
  };
3422
3836
 
3423
3837
  // src/components/Form/StringField/StringField.tsx
3424
- import { jsx as jsx127 } from "react/jsx-runtime";
3838
+ import { jsx as jsx133 } from "react/jsx-runtime";
3425
3839
  var StringField = (props) => {
3426
- return match6(props).with({ variant: "textarea" }, (props2) => /* @__PURE__ */ jsx127(StringFieldTextArea, { ...props2 })).with({ variant: "password" }, (props2) => /* @__PURE__ */ jsx127(StringFieldPassword, { ...props2 })).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx127(StringFieldInput, { ...props2 })).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx127(StringFieldSelect, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx127(StringFieldRadio, { ...props2 })).exhaustive();
3840
+ return match6(props).with({ variant: "textarea" }, (props2) => /* @__PURE__ */ jsx133(StringFieldTextArea, { ...props2 })).with({ variant: "password" }, (props2) => /* @__PURE__ */ jsx133(StringFieldPassword, { ...props2 })).with({ variant: "input" }, (props2) => /* @__PURE__ */ jsx133(StringFieldInput, { ...props2 })).with({ variant: "select" }, (props2) => /* @__PURE__ */ jsx133(StringFieldSelect, { ...props2 })).with({ variant: "radio" }, (props2) => /* @__PURE__ */ jsx133(StringFieldRadio, { ...props2 })).exhaustive();
3427
3841
  };
3428
3842
 
3429
3843
  // src/components/Form/ScalarField.tsx
3430
- import { jsx as jsx128 } from "react/jsx-runtime";
3844
+ import { jsx as jsx134 } from "react/jsx-runtime";
3431
3845
  var ScalarField = ({ field, ...props }) => {
3432
3846
  switch (field.kind) {
3433
3847
  case "boolean":
3434
- return /* @__PURE__ */ jsx128(BooleanField, { ...field, ...props });
3848
+ return /* @__PURE__ */ jsx134(BooleanField, { ...field, ...props });
3435
3849
  case "date":
3436
- return /* @__PURE__ */ jsx128(DateField, { ...field, ...props });
3850
+ return /* @__PURE__ */ jsx134(DateField, { ...field, ...props });
3437
3851
  case "number":
3438
- return /* @__PURE__ */ jsx128(NumberField, { ...field, ...props });
3852
+ return /* @__PURE__ */ jsx134(NumberField, { ...field, ...props });
3439
3853
  case "set":
3440
- return /* @__PURE__ */ jsx128(SetField, { ...field, ...props });
3854
+ return /* @__PURE__ */ jsx134(SetField, { ...field, ...props });
3441
3855
  case "string":
3442
- return /* @__PURE__ */ jsx128(StringField, { ...field, ...props });
3856
+ return /* @__PURE__ */ jsx134(StringField, { ...field, ...props });
3443
3857
  default:
3444
3858
  throw new Error(`Unexpected value for kind: ${Reflect.get(field, "kind")}`);
3445
3859
  }
3446
3860
  };
3447
3861
 
3448
3862
  // src/components/Form/RecordArrayField.tsx
3449
- import { jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
3863
+ import { jsx as jsx135, jsxs as jsxs51 } from "react/jsx-runtime";
3450
3864
  var RecordArrayField = memo(function RecordArrayField2({
3451
3865
  disabled,
3452
3866
  error: arrayError,
@@ -3457,15 +3871,15 @@ var RecordArrayField = memo(function RecordArrayField2({
3457
3871
  setValue: setArrayValue,
3458
3872
  value: arrayValue
3459
3873
  }) {
3460
- const fieldsetRef = useRef4(fieldset);
3874
+ const fieldsetRef = useRef6(fieldset);
3461
3875
  const { t } = useTranslation("libui");
3462
3876
  const createNewRecord = () => Object.fromEntries(Object.keys(fieldset).map((fieldName) => [fieldName, void 0]));
3463
- useEffect9(() => {
3877
+ useEffect11(() => {
3464
3878
  if (!arrayValue) {
3465
3879
  setArrayValue([createNewRecord()]);
3466
3880
  }
3467
3881
  }, []);
3468
- useEffect9(() => {
3882
+ useEffect11(() => {
3469
3883
  if (fieldsetRef.current !== fieldset) {
3470
3884
  setArrayValue([createNewRecord()]);
3471
3885
  fieldsetRef.current = fieldset;
@@ -3482,17 +3896,17 @@ var RecordArrayField = memo(function RecordArrayField2({
3482
3896
  setArrayValue(arrayValue.slice(0, arrayValue.length - 1));
3483
3897
  }
3484
3898
  };
3485
- return /* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-4", children: [
3486
- /* @__PURE__ */ jsx129(Heading, { className: "font-medium", variant: "h5", children: label }),
3487
- /* @__PURE__ */ jsx129("div", { className: "flex flex-col gap-6", children: arrayValue.map((fields, i) => /* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-4", children: [
3488
- /* @__PURE__ */ jsx129(Label3, { className: "font-semibold italic", children: label + " " + (i + 1) }),
3899
+ return /* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-4", children: [
3900
+ /* @__PURE__ */ jsx135(Heading, { className: "font-medium", variant: "h5", children: label }),
3901
+ /* @__PURE__ */ jsx135("div", { className: "flex flex-col gap-6", children: arrayValue.map((fields, i) => /* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-4", children: [
3902
+ /* @__PURE__ */ jsx135(Label3, { className: "font-semibold italic", children: label + " " + (i + 1) }),
3489
3903
  Object.keys(fields).map((name) => {
3490
3904
  const field = fieldset[name];
3491
3905
  const fieldProps = field?.kind === "dynamic" ? field.render.call(void 0, fields) : field;
3492
3906
  if (!fieldProps) {
3493
3907
  return null;
3494
3908
  }
3495
- return /* @__PURE__ */ jsx129(
3909
+ return /* @__PURE__ */ jsx135(
3496
3910
  ScalarField,
3497
3911
  {
3498
3912
  error: arrayError?.[i]?.[name],
@@ -3519,21 +3933,21 @@ var RecordArrayField = memo(function RecordArrayField2({
3519
3933
  );
3520
3934
  })
3521
3935
  ] }, i)) }),
3522
- /* @__PURE__ */ jsxs48("div", { className: "flex gap-3", children: [
3523
- /* @__PURE__ */ jsxs48(Button, { disabled: disabled || readOnly, type: "button", variant: "outline", onClick: appendField, children: [
3936
+ /* @__PURE__ */ jsxs51("div", { className: "flex gap-3", children: [
3937
+ /* @__PURE__ */ jsxs51(Button, { disabled: disabled || readOnly, type: "button", variant: "outline", onClick: appendField, children: [
3524
3938
  t("form.append"),
3525
- /* @__PURE__ */ jsx129(PlusCircleIcon, { className: "ml-2" })
3939
+ /* @__PURE__ */ jsx135(PlusCircleIcon, { className: "ml-2" })
3526
3940
  ] }),
3527
- /* @__PURE__ */ jsxs48(Button, { disabled: disabled || readOnly, type: "button", variant: "outline", onClick: removeField, children: [
3941
+ /* @__PURE__ */ jsxs51(Button, { disabled: disabled || readOnly, type: "button", variant: "outline", onClick: removeField, children: [
3528
3942
  t("form.remove"),
3529
- /* @__PURE__ */ jsx129(MinusCircleIcon, { className: "ml-2" })
3943
+ /* @__PURE__ */ jsx135(MinusCircleIcon, { className: "ml-2" })
3530
3944
  ] })
3531
3945
  ] })
3532
3946
  ] });
3533
3947
  });
3534
3948
 
3535
3949
  // src/components/Form/StaticField.tsx
3536
- import { jsx as jsx130 } from "react/jsx-runtime";
3950
+ import { jsx as jsx136 } from "react/jsx-runtime";
3537
3951
  var StaticField = ({
3538
3952
  errors,
3539
3953
  field,
@@ -3555,7 +3969,7 @@ var StaticField = ({
3555
3969
  },
3556
3970
  [setValues]
3557
3971
  );
3558
- return match7(field).with({ kind: "record-array" }, (field2) => /* @__PURE__ */ jsx130(
3972
+ return match7(field).with({ kind: "record-array" }, (field2) => /* @__PURE__ */ jsx136(
3559
3973
  RecordArrayField,
3560
3974
  {
3561
3975
  ...field2,
@@ -3566,7 +3980,7 @@ var StaticField = ({
3566
3980
  setValue,
3567
3981
  value: values[name]
3568
3982
  }
3569
- )).with({ kind: "number-record" }, (field2) => /* @__PURE__ */ jsx130(
3983
+ )).with({ kind: "number-record" }, (field2) => /* @__PURE__ */ jsx136(
3570
3984
  NumberRecordField,
3571
3985
  {
3572
3986
  ...field2,
@@ -3577,7 +3991,7 @@ var StaticField = ({
3577
3991
  setValue,
3578
3992
  value: values[name]
3579
3993
  }
3580
- )).otherwise((field2) => /* @__PURE__ */ jsx130(
3994
+ )).otherwise((field2) => /* @__PURE__ */ jsx136(
3581
3995
  ScalarField,
3582
3996
  {
3583
3997
  error: errors[name],
@@ -3592,7 +4006,7 @@ var StaticField = ({
3592
4006
  };
3593
4007
 
3594
4008
  // src/components/Form/DynamicField.tsx
3595
- import { jsx as jsx131 } from "react/jsx-runtime";
4009
+ import { jsx as jsx137 } from "react/jsx-runtime";
3596
4010
  var DynamicField = ({
3597
4011
  field,
3598
4012
  name,
@@ -3602,15 +4016,15 @@ var DynamicField = ({
3602
4016
  ...props
3603
4017
  }) => {
3604
4018
  const [dependentValues, setDependentValues] = useState8(pick(values, field.deps));
3605
- const staticField = useMemo3(() => {
4019
+ const staticField = useMemo2(() => {
3606
4020
  return field.render.call(void 0, values);
3607
4021
  }, [dependentValues, field.render]);
3608
- useEffect10(() => {
4022
+ useEffect12(() => {
3609
4023
  if (!staticField) {
3610
4024
  setValues((prevValues) => ({ ...prevValues, [name]: void 0 }));
3611
4025
  }
3612
4026
  }, [staticField]);
3613
- useEffect10(() => {
4027
+ useEffect12(() => {
3614
4028
  for (const key of field.deps) {
3615
4029
  if (dependentValues[key] !== values[key]) {
3616
4030
  setDependentValues(pick(values, field.deps));
@@ -3621,7 +4035,7 @@ var DynamicField = ({
3621
4035
  if (!staticField) {
3622
4036
  return null;
3623
4037
  }
3624
- return /* @__PURE__ */ jsx131(StaticField, { ...props, field: staticField, name, readOnly, setValues, values });
4038
+ return /* @__PURE__ */ jsx137(StaticField, { ...props, field: staticField, name, readOnly, setValues, values });
3625
4039
  };
3626
4040
 
3627
4041
  // src/components/Form/FieldsComponent.tsx
@@ -3653,7 +4067,7 @@ function getInitialValues(values) {
3653
4067
  }
3654
4068
 
3655
4069
  // src/components/Form/Form.tsx
3656
- import { Fragment as Fragment2, jsx as jsx132, jsxs as jsxs49 } from "react/jsx-runtime";
4070
+ import { Fragment as Fragment2, jsx as jsx138, jsxs as jsxs52 } from "react/jsx-runtime";
3657
4071
  var Form = ({
3658
4072
  additionalButtons,
3659
4073
  className,
@@ -3703,7 +4117,7 @@ var Form = ({
3703
4117
  onError(error);
3704
4118
  }
3705
4119
  };
3706
- useEffect11(() => {
4120
+ useEffect13(() => {
3707
4121
  if (!subscribe) {
3708
4122
  return;
3709
4123
  }
@@ -3761,12 +4175,12 @@ var Form = ({
3761
4175
  }).catch(console.error);
3762
4176
  }
3763
4177
  };
3764
- useEffect11(() => {
4178
+ useEffect13(() => {
3765
4179
  setErrors({});
3766
4180
  setRootErrors([]);
3767
4181
  }, [resolvedLanguage]);
3768
4182
  const isSuspended = Boolean(suspendWhileSubmitting && isSubmitting);
3769
- return /* @__PURE__ */ jsxs49(
4183
+ return /* @__PURE__ */ jsxs52(
3770
4184
  "form",
3771
4185
  {
3772
4186
  autoComplete: "off",
@@ -3776,15 +4190,15 @@ var Form = ({
3776
4190
  onSubmit: (event) => void handleSubmit(event),
3777
4191
  ...props,
3778
4192
  children: [
3779
- isSubmitting && /* @__PURE__ */ jsx132("div", { className: "absolute z-10 h-full w-full cursor-wait" }),
4193
+ isSubmitting && /* @__PURE__ */ jsx138("div", { className: "absolute z-10 h-full w-full cursor-wait" }),
3780
4194
  isGrouped ? content.map((fieldGroup, i) => {
3781
- return /* @__PURE__ */ jsxs49(Fragment2, { children: [
3782
- /* @__PURE__ */ jsxs49("div", { className: "flex flex-col gap-6 [&:not(:first-child)]:pt-8", children: [
3783
- /* @__PURE__ */ jsxs49("div", { className: "flex flex-col gap-1", children: [
3784
- fieldGroup.title && /* @__PURE__ */ jsx132(Heading, { className: "text-base", variant: "h4", children: fieldGroup.title }),
3785
- fieldGroup.description && /* @__PURE__ */ jsx132("p", { className: "text-muted-foreground text-sm leading-tight italic", children: fieldGroup.description })
4195
+ return /* @__PURE__ */ jsxs52(Fragment2, { children: [
4196
+ /* @__PURE__ */ jsxs52("div", { className: "flex flex-col gap-6 [&:not(:first-child)]:pt-8", children: [
4197
+ /* @__PURE__ */ jsxs52("div", { className: "flex flex-col gap-1", children: [
4198
+ fieldGroup.title && /* @__PURE__ */ jsx138(Heading, { className: "text-base", variant: "h4", children: fieldGroup.title }),
4199
+ fieldGroup.description && /* @__PURE__ */ jsx138("p", { className: "text-muted-foreground text-sm leading-tight italic", children: fieldGroup.description })
3786
4200
  ] }),
3787
- /* @__PURE__ */ jsx132(
4201
+ /* @__PURE__ */ jsx138(
3788
4202
  FieldsComponent,
3789
4203
  {
3790
4204
  errors,
@@ -3796,9 +4210,9 @@ var Form = ({
3796
4210
  }
3797
4211
  )
3798
4212
  ] }, i),
3799
- /* @__PURE__ */ jsx132(Separator3, { className: "mt-8" })
4213
+ /* @__PURE__ */ jsx138(Separator3, { className: "mt-8" })
3800
4214
  ] });
3801
- }) : /* @__PURE__ */ jsx132(
4215
+ }) : /* @__PURE__ */ jsx138(
3802
4216
  FieldsComponent,
3803
4217
  {
3804
4218
  errors,
@@ -3809,11 +4223,11 @@ var Form = ({
3809
4223
  values
3810
4224
  }
3811
4225
  ),
3812
- Boolean(rootErrors.length) && /* @__PURE__ */ jsx132(ErrorMessage, { className: "-mt-3", error: rootErrors }),
4226
+ Boolean(rootErrors.length) && /* @__PURE__ */ jsx138("div", { className: "-mt-3", children: /* @__PURE__ */ jsx138(ErrorMessage, { hideIconOnWrap: true, error: rootErrors }) }),
3813
4227
  fieldsFooter,
3814
- /* @__PURE__ */ jsxs49("div", { className: "flex w-full gap-3", children: [
4228
+ /* @__PURE__ */ jsxs52("div", { className: "flex w-full gap-3", children: [
3815
4229
  additionalButtons?.left,
3816
- /* @__PURE__ */ jsxs49(
4230
+ /* @__PURE__ */ jsxs52(
3817
4231
  Button,
3818
4232
  {
3819
4233
  "aria-label": "Submit",
@@ -3823,7 +4237,7 @@ var Form = ({
3823
4237
  variant: "primary",
3824
4238
  children: [
3825
4239
  submitBtnLabel ?? t("form.submit"),
3826
- /* @__PURE__ */ jsx132(
4240
+ /* @__PURE__ */ jsx138(
3827
4241
  "svg",
3828
4242
  {
3829
4243
  className: cn("hidden h-4 w-4 animate-spin", isSuspended && "block"),
@@ -3836,13 +4250,13 @@ var Form = ({
3836
4250
  viewBox: "0 0 24 24",
3837
4251
  width: "24",
3838
4252
  xmlns: "http://www.w3.org/2000/svg",
3839
- children: /* @__PURE__ */ jsx132("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
4253
+ children: /* @__PURE__ */ jsx138("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
3840
4254
  }
3841
4255
  )
3842
4256
  ]
3843
4257
  }
3844
4258
  ),
3845
- resetBtn && /* @__PURE__ */ jsx132(
4259
+ resetBtn && /* @__PURE__ */ jsx138(
3846
4260
  Button,
3847
4261
  {
3848
4262
  "aria-label": "Reset",
@@ -3867,9 +4281,9 @@ import { Root as Root14, Trigger as Trigger7 } from "@radix-ui/react-hover-card"
3867
4281
  // src/components/HoverCard/HoverCardContent.tsx
3868
4282
  import { forwardRef as forwardRef79 } from "react";
3869
4283
  import { Content as Content8 } from "@radix-ui/react-hover-card";
3870
- import { jsx as jsx133 } from "react/jsx-runtime";
4284
+ import { jsx as jsx139 } from "react/jsx-runtime";
3871
4285
  var HoverCardContent = forwardRef79(function HoverCardContent2({ align = "center", className, sideOffset = 4, ...props }, ref) {
3872
- return /* @__PURE__ */ jsx133(
4286
+ return /* @__PURE__ */ jsx139(
3873
4287
  Content8,
3874
4288
  {
3875
4289
  align,
@@ -3892,7 +4306,7 @@ var HoverCard = Object.assign(Root14.bind(null), {
3892
4306
 
3893
4307
  // src/components/LanguageToggle/LanguageToggle.tsx
3894
4308
  import { LanguagesIcon } from "lucide-react";
3895
- import { jsx as jsx134, jsxs as jsxs50 } from "react/jsx-runtime";
4309
+ import { jsx as jsx140, jsxs as jsxs53 } from "react/jsx-runtime";
3896
4310
  var LanguageToggle = ({
3897
4311
  align = "start",
3898
4312
  contentClassName,
@@ -3902,9 +4316,9 @@ var LanguageToggle = ({
3902
4316
  variant = "outline"
3903
4317
  }) => {
3904
4318
  const { changeLanguage } = useTranslation("libui");
3905
- return /* @__PURE__ */ jsxs50(DropdownMenu, { children: [
3906
- /* @__PURE__ */ jsx134(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx134(Button, { className: triggerClassName, size: "icon", variant, children: /* @__PURE__ */ jsx134(LanguagesIcon, {}) }) }),
3907
- /* @__PURE__ */ jsx134(DropdownMenu.Content, { align, className: contentClassName, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx134(
4319
+ return /* @__PURE__ */ jsxs53(DropdownMenu, { children: [
4320
+ /* @__PURE__ */ jsx140(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx140(Button, { className: triggerClassName, size: "icon", variant, children: /* @__PURE__ */ jsx140(LanguagesIcon, {}) }) }),
4321
+ /* @__PURE__ */ jsx140(DropdownMenu.Content, { align, className: contentClassName, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx140(
3908
4322
  DropdownMenu.Item,
3909
4323
  {
3910
4324
  className: itemClassName,
@@ -3931,7 +4345,7 @@ import {
3931
4345
  XAxis,
3932
4346
  YAxis
3933
4347
  } from "recharts";
3934
- import { jsx as jsx135, jsxs as jsxs51 } from "react/jsx-runtime";
4348
+ import { jsx as jsx141, jsxs as jsxs54 } from "react/jsx-runtime";
3935
4349
  import { createElement as createElement2 } from "react";
3936
4350
  var strokeColors = {
3937
4351
  dark: "#cbd5e1",
@@ -3960,9 +4374,9 @@ function LineGraphComponent({
3960
4374
  }) {
3961
4375
  const { resolvedLanguage } = useTranslation("libui");
3962
4376
  const [theme] = useTheme();
3963
- return /* @__PURE__ */ jsx135(ResponsiveContainer2, { height: 400, width: "100%", children: /* @__PURE__ */ jsxs51(LineChart, { data: [...data], margin: { bottom: 5, left: 15, right: 15, top: 5 }, children: [
3964
- /* @__PURE__ */ jsx135(CartesianGrid, { stroke: "#64748b", strokeDasharray: "5 5" }),
3965
- /* @__PURE__ */ jsx135(
4377
+ return /* @__PURE__ */ jsx141(ResponsiveContainer2, { height: 400, width: "100%", children: /* @__PURE__ */ jsxs54(LineChart, { data: [...data], margin: { bottom: 5, left: 15, right: 15, top: 5 }, children: [
4378
+ /* @__PURE__ */ jsx141(CartesianGrid, { stroke: "#64748b", strokeDasharray: "5 5" }),
4379
+ /* @__PURE__ */ jsx141(
3966
4380
  XAxis,
3967
4381
  {
3968
4382
  axisLine: { stroke: "#64748b" },
@@ -3977,10 +4391,10 @@ function LineGraphComponent({
3977
4391
  tickMargin: 8,
3978
4392
  tickSize: 8,
3979
4393
  type: "number",
3980
- children: /* @__PURE__ */ jsx135(Label6, { fill: strokeColors[theme], offset: 0, position: "insideBottom", value: xAxis?.label })
4394
+ children: /* @__PURE__ */ jsx141(Label6, { fill: strokeColors[theme], offset: 0, position: "insideBottom", value: xAxis?.label })
3981
4395
  }
3982
4396
  ),
3983
- /* @__PURE__ */ jsx135(
4397
+ /* @__PURE__ */ jsx141(
3984
4398
  YAxis,
3985
4399
  {
3986
4400
  axisLine: { stroke: "#64748b" },
@@ -3991,7 +4405,7 @@ function LineGraphComponent({
3991
4405
  width: 40
3992
4406
  }
3993
4407
  ),
3994
- /* @__PURE__ */ jsx135(
4408
+ /* @__PURE__ */ jsx141(
3995
4409
  Tooltip3,
3996
4410
  {
3997
4411
  contentStyle: tooltipStyles[theme],
@@ -4015,16 +4429,16 @@ function LineGraphComponent({
4015
4429
  stroke: stroke ?? strokeColors[theme],
4016
4430
  type: type ?? "linear"
4017
4431
  },
4018
- err && /* @__PURE__ */ jsx135(ErrorBar, { dataKey: err, stroke: "#64748b" })
4432
+ err && /* @__PURE__ */ jsx141(ErrorBar, { dataKey: err, stroke: "#64748b" })
4019
4433
  )),
4020
- /* @__PURE__ */ jsx135(Legend2, { wrapperStyle: { paddingLeft: 40, paddingTop: 10 } })
4434
+ /* @__PURE__ */ jsx141(Legend2, { wrapperStyle: { paddingLeft: 40, paddingTop: 10 } })
4021
4435
  ] }) });
4022
4436
  }
4023
4437
  var LineGraph = React31.memo(LineGraphComponent);
4024
4438
 
4025
4439
  // src/components/ListboxDropdown/ListboxDropdown.tsx
4026
4440
  import "react";
4027
- import { jsx as jsx136, jsxs as jsxs52 } from "react/jsx-runtime";
4441
+ import { jsx as jsx142, jsxs as jsxs55 } from "react/jsx-runtime";
4028
4442
  var ListboxDropdown = ({
4029
4443
  contentClassName,
4030
4444
  disabled,
@@ -4035,11 +4449,11 @@ var ListboxDropdown = ({
4035
4449
  triggerClassName,
4036
4450
  widthFull
4037
4451
  }) => {
4038
- return /* @__PURE__ */ jsxs52(DropdownMenu, { children: [
4039
- /* @__PURE__ */ jsx136(DropdownMenu.Trigger, { asChild: true, className: cn("w-full", triggerClassName), disabled, children: /* @__PURE__ */ jsx136(DropdownButton, { children: title }) }),
4040
- /* @__PURE__ */ jsx136(DropdownMenu.Content, { align: "start", className: contentClassName, widthFull, children: options.map((option) => {
4452
+ return /* @__PURE__ */ jsxs55(DropdownMenu, { children: [
4453
+ /* @__PURE__ */ jsx142(DropdownMenu.Trigger, { asChild: true, className: cn("w-full", triggerClassName), disabled, children: /* @__PURE__ */ jsx142(DropdownButton, { children: title }) }),
4454
+ /* @__PURE__ */ jsx142(DropdownMenu.Content, { align: "start", className: contentClassName, widthFull, children: options.map((option) => {
4041
4455
  const checked = Boolean(selected.find((selectedOption) => selectedOption.key === option.key));
4042
- return /* @__PURE__ */ jsx136(
4456
+ return /* @__PURE__ */ jsx142(
4043
4457
  DropdownMenu.CheckboxItem,
4044
4458
  {
4045
4459
  checked,
@@ -4070,9 +4484,9 @@ import { Group as Group4, Menu, Portal as Portal9, RadioGroup as RadioGroup5, Su
4070
4484
  import { forwardRef as forwardRef80 } from "react";
4071
4485
  import { CheckboxItem as CheckboxItem3, ItemIndicator as ItemIndicator6 } from "@radix-ui/react-menubar";
4072
4486
  import { CheckIcon as CheckIcon5 } from "lucide-react";
4073
- import { jsx as jsx137, jsxs as jsxs53 } from "react/jsx-runtime";
4487
+ import { jsx as jsx143, jsxs as jsxs56 } from "react/jsx-runtime";
4074
4488
  var MenuBarCheckboxItem = forwardRef80(function MenuBarCheckboxItem2({ checked, children, className, ...props }, ref) {
4075
- return /* @__PURE__ */ jsxs53(
4489
+ return /* @__PURE__ */ jsxs56(
4076
4490
  CheckboxItem3,
4077
4491
  {
4078
4492
  checked,
@@ -4083,7 +4497,7 @@ var MenuBarCheckboxItem = forwardRef80(function MenuBarCheckboxItem2({ checked,
4083
4497
  ref,
4084
4498
  ...props,
4085
4499
  children: [
4086
- /* @__PURE__ */ jsx137("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx137(ItemIndicator6, { children: /* @__PURE__ */ jsx137(CheckIcon5, { className: "h-4 w-4" }) }) }),
4500
+ /* @__PURE__ */ jsx143("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx143(ItemIndicator6, { children: /* @__PURE__ */ jsx143(CheckIcon5, { className: "h-4 w-4" }) }) }),
4087
4501
  children
4088
4502
  ]
4089
4503
  }
@@ -4093,9 +4507,9 @@ var MenuBarCheckboxItem = forwardRef80(function MenuBarCheckboxItem2({ checked,
4093
4507
  // src/components/MenuBar/MenuBarContent.tsx
4094
4508
  import { forwardRef as forwardRef81 } from "react";
4095
4509
  import { Content as Content9, Portal as Portal8 } from "@radix-ui/react-menubar";
4096
- import { jsx as jsx138 } from "react/jsx-runtime";
4510
+ import { jsx as jsx144 } from "react/jsx-runtime";
4097
4511
  var MenuBarContent = forwardRef81(function MenuBarContent2({ align = "start", alignOffset = -4, className, sideOffset = 8, ...props }, ref) {
4098
- return /* @__PURE__ */ jsx138(Portal8, { children: /* @__PURE__ */ jsx138(
4512
+ return /* @__PURE__ */ jsx144(Portal8, { children: /* @__PURE__ */ jsx144(
4099
4513
  Content9,
4100
4514
  {
4101
4515
  align,
@@ -4114,9 +4528,9 @@ var MenuBarContent = forwardRef81(function MenuBarContent2({ align = "start", al
4114
4528
  // src/components/MenuBar/MenuBarItem.tsx
4115
4529
  import { forwardRef as forwardRef82 } from "react";
4116
4530
  import { Item as Item6 } from "@radix-ui/react-menubar";
4117
- import { jsx as jsx139 } from "react/jsx-runtime";
4531
+ import { jsx as jsx145 } from "react/jsx-runtime";
4118
4532
  var MenuBarItem = forwardRef82(function MenuBarItem2({ className, inset, ...props }, ref) {
4119
- return /* @__PURE__ */ jsx139(
4533
+ return /* @__PURE__ */ jsx145(
4120
4534
  Item6,
4121
4535
  {
4122
4536
  className: cn(
@@ -4133,18 +4547,18 @@ var MenuBarItem = forwardRef82(function MenuBarItem2({ className, inset, ...prop
4133
4547
  // src/components/MenuBar/MenuBarLabel.tsx
4134
4548
  import { forwardRef as forwardRef83 } from "react";
4135
4549
  import { Label as Label7 } from "@radix-ui/react-menubar";
4136
- import { jsx as jsx140 } from "react/jsx-runtime";
4550
+ import { jsx as jsx146 } from "react/jsx-runtime";
4137
4551
  var MenuBarLabel = forwardRef83(function MenuBarLabel2({ className, inset, ...props }, ref) {
4138
- return /* @__PURE__ */ jsx140(Label7, { className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ref, ...props });
4552
+ return /* @__PURE__ */ jsx146(Label7, { className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ref, ...props });
4139
4553
  });
4140
4554
 
4141
4555
  // src/components/MenuBar/MenuBarRadioItem.tsx
4142
4556
  import { forwardRef as forwardRef84 } from "react";
4143
4557
  import { ItemIndicator as ItemIndicator7, RadioItem as RadioItem3 } from "@radix-ui/react-menubar";
4144
4558
  import { CircleIcon as CircleIcon4 } from "lucide-react";
4145
- import { jsx as jsx141, jsxs as jsxs54 } from "react/jsx-runtime";
4559
+ import { jsx as jsx147, jsxs as jsxs57 } from "react/jsx-runtime";
4146
4560
  var MenuBarRadioItem = forwardRef84(function MenuBarRadioItem2({ children, className, ...props }, ref) {
4147
- return /* @__PURE__ */ jsxs54(
4561
+ return /* @__PURE__ */ jsxs57(
4148
4562
  RadioItem3,
4149
4563
  {
4150
4564
  className: cn(
@@ -4154,7 +4568,7 @@ var MenuBarRadioItem = forwardRef84(function MenuBarRadioItem2({ children, class
4154
4568
  ref,
4155
4569
  ...props,
4156
4570
  children: [
4157
- /* @__PURE__ */ jsx141("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx141(ItemIndicator7, { children: /* @__PURE__ */ jsx141(CircleIcon4, { className: "fill-current", style: { height: 8, width: 8 } }) }) }),
4571
+ /* @__PURE__ */ jsx147("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx147(ItemIndicator7, { children: /* @__PURE__ */ jsx147(CircleIcon4, { className: "fill-current", style: { height: 8, width: 8 } }) }) }),
4158
4572
  children
4159
4573
  ]
4160
4574
  }
@@ -4164,10 +4578,10 @@ var MenuBarRadioItem = forwardRef84(function MenuBarRadioItem2({ children, class
4164
4578
  // src/components/MenuBar/MenuBarRoot.tsx
4165
4579
  import { forwardRef as forwardRef85 } from "react";
4166
4580
  import { Root as Root15 } from "@radix-ui/react-menubar";
4167
- import { jsx as jsx142 } from "react/jsx-runtime";
4581
+ import { jsx as jsx148 } from "react/jsx-runtime";
4168
4582
  var MenuBarRoot = forwardRef85(
4169
4583
  function MenuBarRoot2({ className, ...props }, ref) {
4170
- return /* @__PURE__ */ jsx142(
4584
+ return /* @__PURE__ */ jsx148(
4171
4585
  Root15,
4172
4586
  {
4173
4587
  className: cn("bg-background flex h-9 items-center space-x-1 rounded-md border p-1 shadow-xs", className),
@@ -4181,24 +4595,24 @@ var MenuBarRoot = forwardRef85(
4181
4595
  // src/components/MenuBar/MenuBarSeparator.tsx
4182
4596
  import { forwardRef as forwardRef86 } from "react";
4183
4597
  import { Separator as Separator6 } from "@radix-ui/react-menubar";
4184
- import { jsx as jsx143 } from "react/jsx-runtime";
4598
+ import { jsx as jsx149 } from "react/jsx-runtime";
4185
4599
  var MenuBarSeparator = forwardRef86(function MenuBarSeparator2({ className, ...props }, ref) {
4186
- return /* @__PURE__ */ jsx143(Separator6, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
4600
+ return /* @__PURE__ */ jsx149(Separator6, { className: cn("-mx-1 my-1 h-px bg-muted", className), ref, ...props });
4187
4601
  });
4188
4602
 
4189
4603
  // src/components/MenuBar/MenuBarShortcut.tsx
4190
4604
  import "react";
4191
- import { jsx as jsx144 } from "react/jsx-runtime";
4605
+ import { jsx as jsx150 } from "react/jsx-runtime";
4192
4606
  var MenuBarShortcut = ({ className, ...props }) => {
4193
- return /* @__PURE__ */ jsx144("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
4607
+ return /* @__PURE__ */ jsx150("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
4194
4608
  };
4195
4609
 
4196
4610
  // src/components/MenuBar/MenuBarSubContent.tsx
4197
4611
  import { forwardRef as forwardRef87 } from "react";
4198
4612
  import { SubContent as SubContent3 } from "@radix-ui/react-menubar";
4199
- import { jsx as jsx145 } from "react/jsx-runtime";
4613
+ import { jsx as jsx151 } from "react/jsx-runtime";
4200
4614
  var MenuBarSubContent = forwardRef87(function MenuBarSubContent2({ className, ...props }, ref) {
4201
- return /* @__PURE__ */ jsx145(
4615
+ return /* @__PURE__ */ jsx151(
4202
4616
  SubContent3,
4203
4617
  {
4204
4618
  className: cn(
@@ -4215,9 +4629,9 @@ var MenuBarSubContent = forwardRef87(function MenuBarSubContent2({ className, ..
4215
4629
  import { forwardRef as forwardRef88 } from "react";
4216
4630
  import { SubTrigger as SubTrigger3 } from "@radix-ui/react-menubar";
4217
4631
  import { ChevronRightIcon as ChevronRightIcon5 } from "lucide-react";
4218
- import { jsx as jsx146, jsxs as jsxs55 } from "react/jsx-runtime";
4632
+ import { jsx as jsx152, jsxs as jsxs58 } from "react/jsx-runtime";
4219
4633
  var MenuBarSubTrigger = forwardRef88(function MenuBarSubTrigger2({ children, className, inset, ...props }, ref) {
4220
- return /* @__PURE__ */ jsxs55(
4634
+ return /* @__PURE__ */ jsxs58(
4221
4635
  SubTrigger3,
4222
4636
  {
4223
4637
  className: cn(
@@ -4229,7 +4643,7 @@ var MenuBarSubTrigger = forwardRef88(function MenuBarSubTrigger2({ children, cla
4229
4643
  ...props,
4230
4644
  children: [
4231
4645
  children,
4232
- /* @__PURE__ */ jsx146(ChevronRightIcon5, { className: "ml-auto h-4 w-4" })
4646
+ /* @__PURE__ */ jsx152(ChevronRightIcon5, { className: "ml-auto h-4 w-4" })
4233
4647
  ]
4234
4648
  }
4235
4649
  );
@@ -4238,9 +4652,9 @@ var MenuBarSubTrigger = forwardRef88(function MenuBarSubTrigger2({ children, cla
4238
4652
  // src/components/MenuBar/MenuBarTrigger.tsx
4239
4653
  import { forwardRef as forwardRef89 } from "react";
4240
4654
  import { Trigger as Trigger8 } from "@radix-ui/react-menubar";
4241
- import { jsx as jsx147 } from "react/jsx-runtime";
4655
+ import { jsx as jsx153 } from "react/jsx-runtime";
4242
4656
  var MenuBarTrigger = forwardRef89(function MenuBarTrigger2({ className, ...props }, ref) {
4243
- return /* @__PURE__ */ jsx147(
4657
+ return /* @__PURE__ */ jsx153(
4244
4658
  Trigger8,
4245
4659
  {
4246
4660
  className: cn(
@@ -4273,8 +4687,8 @@ var MenuBar = Object.assign(MenuBarRoot, {
4273
4687
  });
4274
4688
 
4275
4689
  // src/components/OneTimePasswordInput/OneTimePasswordInput.tsx
4276
- import { useEffect as useEffect12, useRef as useRef5, useState as useState10 } from "react";
4277
- import { jsx as jsx148 } from "react/jsx-runtime";
4690
+ import { useEffect as useEffect14, useRef as useRef7, useState as useState10 } from "react";
4691
+ import { jsx as jsx154 } from "react/jsx-runtime";
4278
4692
  var CODE_LENGTH = 6;
4279
4693
  var EMPTY_CODE = Object.freeze(Array(CODE_LENGTH).fill(null));
4280
4694
  function getUpdatedDigits(digits, index, value) {
@@ -4286,8 +4700,8 @@ var OneTimePasswordInput = ({ className, onComplete, ...props }) => {
4286
4700
  const notifications = useNotificationsStore();
4287
4701
  const { t } = useTranslation("libui");
4288
4702
  const [digits, setDigits] = useState10([...EMPTY_CODE]);
4289
- const inputRefs = digits.map(() => useRef5(null));
4290
- useEffect12(() => {
4703
+ const inputRefs = digits.map(() => useRef7(null));
4704
+ useEffect14(() => {
4291
4705
  const isComplete = digits.every((value) => Number.isInteger(value));
4292
4706
  if (isComplete) {
4293
4707
  void onComplete(parseInt(digits.join("")));
@@ -4334,7 +4748,7 @@ var OneTimePasswordInput = ({ className, onComplete, ...props }) => {
4334
4748
  });
4335
4749
  }
4336
4750
  };
4337
- return /* @__PURE__ */ jsx148("div", { className: cn("flex gap-2", className), ...props, children: digits.map((_, index) => /* @__PURE__ */ jsx148(
4751
+ return /* @__PURE__ */ jsx154("div", { className: cn("flex gap-2", className), ...props, children: digits.map((_, index) => /* @__PURE__ */ jsx154(
4338
4752
  "input",
4339
4753
  {
4340
4754
  className: "w-1/6 rounded-md border border-slate-300 bg-transparent p-2 text-center shadow-xs hover:border-slate-300 focus:border-sky-800 focus:outline-hidden dark:border-slate-600 dark:hover:border-slate-400 dark:focus:border-sky-500",
@@ -4357,15 +4771,15 @@ var OneTimePasswordInput = ({ className, onComplete, ...props }) => {
4357
4771
  // src/components/Progress/Progress.tsx
4358
4772
  import { forwardRef as forwardRef90 } from "react";
4359
4773
  import * as ProgressPrimitive from "@radix-ui/react-progress";
4360
- import { jsx as jsx149 } from "react/jsx-runtime";
4774
+ import { jsx as jsx155 } from "react/jsx-runtime";
4361
4775
  var Progress = forwardRef90(function Progress2({ className, value, ...props }, ref) {
4362
- return /* @__PURE__ */ jsx149(
4776
+ return /* @__PURE__ */ jsx155(
4363
4777
  ProgressPrimitive.Root,
4364
4778
  {
4365
4779
  className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
4366
4780
  ref,
4367
4781
  ...props,
4368
- children: /* @__PURE__ */ jsx149(
4782
+ children: /* @__PURE__ */ jsx155(
4369
4783
  ProgressPrimitive.Indicator,
4370
4784
  {
4371
4785
  className: "h-full w-full flex-1 bg-primary transition-all",
@@ -4384,8 +4798,8 @@ import { Panel } from "react-resizable-panels";
4384
4798
  import "react";
4385
4799
  import { GripVertical } from "lucide-react";
4386
4800
  import { PanelResizeHandle } from "react-resizable-panels";
4387
- import { jsx as jsx150 } from "react/jsx-runtime";
4388
- var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ jsx150(
4801
+ import { jsx as jsx156 } from "react/jsx-runtime";
4802
+ var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ jsx156(
4389
4803
  PanelResizeHandle,
4390
4804
  {
4391
4805
  className: cn(
@@ -4393,15 +4807,15 @@ var ResizableHandle = ({ className, withHandle, ...props }) => /* @__PURE__ */ j
4393
4807
  className
4394
4808
  ),
4395
4809
  ...props,
4396
- children: withHandle && /* @__PURE__ */ jsx150("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx150(GripVertical, { className: "h-2.5 w-2.5" }) })
4810
+ children: withHandle && /* @__PURE__ */ jsx156("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx156(GripVertical, { className: "h-2.5 w-2.5" }) })
4397
4811
  }
4398
4812
  );
4399
4813
 
4400
4814
  // src/components/Resizable/ResizablePanelGroup.tsx
4401
4815
  import "react";
4402
4816
  import { PanelGroup } from "react-resizable-panels";
4403
- import { jsx as jsx151 } from "react/jsx-runtime";
4404
- var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx151(
4817
+ import { jsx as jsx157 } from "react/jsx-runtime";
4818
+ var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx157(
4405
4819
  PanelGroup,
4406
4820
  {
4407
4821
  className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
@@ -4410,8 +4824,8 @@ var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsx151(
4410
4824
  );
4411
4825
 
4412
4826
  // src/components/Resizable/Resizable.tsx
4413
- import { Fragment as Fragment3, jsx as jsx152 } from "react/jsx-runtime";
4414
- var ResizableRoot = ({ children }) => /* @__PURE__ */ jsx152(Fragment3, { children });
4827
+ import { Fragment as Fragment3, jsx as jsx158 } from "react/jsx-runtime";
4828
+ var ResizableRoot = ({ children }) => /* @__PURE__ */ jsx158(Fragment3, { children });
4415
4829
  var Resizable = Object.assign(ResizableRoot, {
4416
4830
  Handle: ResizableHandle,
4417
4831
  Panel,
@@ -4423,13 +4837,13 @@ import { Close as Close2, Portal as Portal11, Root as Root17, Trigger as Trigger
4423
4837
 
4424
4838
  // src/components/Sheet/SheetBody.tsx
4425
4839
  import "react";
4426
- import { jsx as jsx153 } from "react/jsx-runtime";
4840
+ import { jsx as jsx159 } from "react/jsx-runtime";
4427
4841
  var SheetBody = ({
4428
4842
  children,
4429
4843
  className,
4430
4844
  ...props
4431
4845
  }) => {
4432
- return /* @__PURE__ */ jsx153("div", { className: cn("py-4", className), ...props, children });
4846
+ return /* @__PURE__ */ jsx159("div", { className: cn("py-4", className), ...props, children });
4433
4847
  };
4434
4848
 
4435
4849
  // src/components/Sheet/SheetContent.tsx
@@ -4441,9 +4855,9 @@ import { XIcon } from "lucide-react";
4441
4855
  // src/components/Sheet/SheetOverlay.tsx
4442
4856
  import { forwardRef as forwardRef91 } from "react";
4443
4857
  import { Overlay as Overlay2 } from "@radix-ui/react-dialog";
4444
- import { jsx as jsx154 } from "react/jsx-runtime";
4858
+ import { jsx as jsx160 } from "react/jsx-runtime";
4445
4859
  var SheetOverlay = forwardRef91(function SheetOverlay2({ className, ...props }, ref) {
4446
- return /* @__PURE__ */ jsx154(
4860
+ return /* @__PURE__ */ jsx160(
4447
4861
  Overlay2,
4448
4862
  {
4449
4863
  className: cn(
@@ -4457,7 +4871,7 @@ var SheetOverlay = forwardRef91(function SheetOverlay2({ className, ...props },
4457
4871
  });
4458
4872
 
4459
4873
  // src/components/Sheet/SheetContent.tsx
4460
- import { jsx as jsx155, jsxs as jsxs56 } from "react/jsx-runtime";
4874
+ import { jsx as jsx161, jsxs as jsxs59 } from "react/jsx-runtime";
4461
4875
  var sheetVariants = cva4(
4462
4876
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
4463
4877
  {
@@ -4475,13 +4889,13 @@ var sheetVariants = cva4(
4475
4889
  }
4476
4890
  );
4477
4891
  var SheetContent = React38.forwardRef(function SheetContent2({ children, className, side = "right", ...props }, ref) {
4478
- return /* @__PURE__ */ jsxs56(Portal10, { children: [
4479
- /* @__PURE__ */ jsx155(SheetOverlay, {}),
4480
- /* @__PURE__ */ jsxs56(Content10, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
4892
+ return /* @__PURE__ */ jsxs59(Portal10, { children: [
4893
+ /* @__PURE__ */ jsx161(SheetOverlay, {}),
4894
+ /* @__PURE__ */ jsxs59(Content10, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
4481
4895
  children,
4482
- /* @__PURE__ */ jsxs56(Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
4483
- /* @__PURE__ */ jsx155(XIcon, { className: "h-4 w-4" }),
4484
- /* @__PURE__ */ jsx155("span", { className: "sr-only", children: "Close" })
4896
+ /* @__PURE__ */ jsxs59(Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
4897
+ /* @__PURE__ */ jsx161(XIcon, { className: "h-4 w-4" }),
4898
+ /* @__PURE__ */ jsx161("span", { className: "sr-only", children: "Close" })
4485
4899
  ] })
4486
4900
  ] })
4487
4901
  ] });
@@ -4490,28 +4904,28 @@ var SheetContent = React38.forwardRef(function SheetContent2({ children, classNa
4490
4904
  // src/components/Sheet/SheetDescription.tsx
4491
4905
  import { forwardRef as forwardRef93 } from "react";
4492
4906
  import { Description as Description2 } from "@radix-ui/react-dialog";
4493
- import { jsx as jsx156 } from "react/jsx-runtime";
4907
+ import { jsx as jsx162 } from "react/jsx-runtime";
4494
4908
  var SheetDescription = forwardRef93(function SheetDescription2({ className, ...props }, ref) {
4495
- return /* @__PURE__ */ jsx156(Description2, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
4909
+ return /* @__PURE__ */ jsx162(Description2, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
4496
4910
  });
4497
4911
 
4498
4912
  // src/components/Sheet/SheetFooter.tsx
4499
4913
  import "react";
4500
- import { jsx as jsx157 } from "react/jsx-runtime";
4501
- var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx157("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
4914
+ import { jsx as jsx163 } from "react/jsx-runtime";
4915
+ var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx163("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
4502
4916
 
4503
4917
  // src/components/Sheet/SheetHeader.tsx
4504
4918
  import "react";
4505
- import { jsx as jsx158 } from "react/jsx-runtime";
4506
- var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx158("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
4919
+ import { jsx as jsx164 } from "react/jsx-runtime";
4920
+ var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx164("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
4507
4921
 
4508
4922
  // src/components/Sheet/SheetTitle.tsx
4509
4923
  import { forwardRef as forwardRef94 } from "react";
4510
4924
  import { Title as Title2 } from "@radix-ui/react-dialog";
4511
- import { jsx as jsx159 } from "react/jsx-runtime";
4925
+ import { jsx as jsx165 } from "react/jsx-runtime";
4512
4926
  var SheetTitle = forwardRef94(
4513
4927
  function SheetTitle2({ className, ...props }, ref) {
4514
- return /* @__PURE__ */ jsx159(Title2, { className: cn("text-lg font-semibold text-foreground", className), ref, ...props });
4928
+ return /* @__PURE__ */ jsx165(Title2, { className: cn("text-lg font-semibold text-foreground", className), ref, ...props });
4515
4929
  }
4516
4930
  );
4517
4931
 
@@ -4529,9 +4943,9 @@ var Sheet = Object.assign(Root17.bind(null), {
4529
4943
  });
4530
4944
 
4531
4945
  // src/components/Spinner/Spinner.tsx
4532
- import { jsx as jsx160 } from "react/jsx-runtime";
4946
+ import { jsx as jsx166 } from "react/jsx-runtime";
4533
4947
  var Spinner = ({ className, ...props }) => {
4534
- return /* @__PURE__ */ jsx160("div", { className: cn("flex h-full w-full items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx160(
4948
+ return /* @__PURE__ */ jsx166("div", { className: cn("flex h-full w-full items-center justify-center", className), ...props, children: /* @__PURE__ */ jsx166(
4535
4949
  "span",
4536
4950
  {
4537
4951
  className: "relative animate-spinner overflow-hidden text-slate-900 dark:text-slate-100",
@@ -4549,8 +4963,8 @@ var Spinner = ({ className, ...props }) => {
4549
4963
 
4550
4964
  // src/components/SpinnerIcon/SpinnerIcon.tsx
4551
4965
  import "react";
4552
- import { jsx as jsx161 } from "react/jsx-runtime";
4553
- var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx161(
4966
+ import { jsx as jsx167 } from "react/jsx-runtime";
4967
+ var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx167(
4554
4968
  "svg",
4555
4969
  {
4556
4970
  className: cn("animate-spin", className),
@@ -4564,25 +4978,25 @@ var SpinnerIcon = ({ className, ...props }) => /* @__PURE__ */ jsx161(
4564
4978
  width: "24",
4565
4979
  xmlns: "http://www.w3.org/2000/svg",
4566
4980
  ...props,
4567
- children: /* @__PURE__ */ jsx161("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
4981
+ children: /* @__PURE__ */ jsx167("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
4568
4982
  }
4569
4983
  );
4570
4984
 
4571
4985
  // src/components/StatisticCard/StatisticCard.tsx
4572
- import { useEffect as useEffect13 } from "react";
4986
+ import { useEffect as useEffect15 } from "react";
4573
4987
  import { motion as motion5, useSpring, useTransform } from "motion/react";
4574
- import { jsx as jsx162, jsxs as jsxs57 } from "react/jsx-runtime";
4988
+ import { jsx as jsx168, jsxs as jsxs60 } from "react/jsx-runtime";
4575
4989
  var StatisticCard = ({ className, icon, label, value, ...props }) => {
4576
4990
  const spring = useSpring(0, { bounce: 0 });
4577
4991
  const rounded = useTransform(spring, (latest) => Math.floor(latest));
4578
- useEffect13(() => {
4992
+ useEffect15(() => {
4579
4993
  spring.set(value);
4580
4994
  }, [spring, value]);
4581
- return /* @__PURE__ */ jsxs57(Card, { className: cn("flex w-full rounded-lg p-4", className), ...props, children: [
4582
- icon && /* @__PURE__ */ jsx162("div", { className: "mr-2 flex items-center justify-center text-4xl", children: icon }),
4583
- /* @__PURE__ */ jsxs57("div", { className: "w-full text-center", children: [
4584
- /* @__PURE__ */ jsx162(motion5.h3, { className: "title-font text-2xl font-semibold text-slate-900 dark:text-slate-100 sm:text-3xl", children: rounded }),
4585
- /* @__PURE__ */ jsx162("p", { className: "font-medium leading-relaxed", children: label })
4995
+ return /* @__PURE__ */ jsxs60(Card, { className: cn("flex w-full rounded-lg p-4", className), ...props, children: [
4996
+ icon && /* @__PURE__ */ jsx168("div", { className: "mr-2 flex items-center justify-center text-4xl", children: icon }),
4997
+ /* @__PURE__ */ jsxs60("div", { className: "w-full text-center", children: [
4998
+ /* @__PURE__ */ jsx168(motion5.h3, { className: "title-font text-2xl font-semibold text-slate-900 dark:text-slate-100 sm:text-3xl", children: rounded }),
4999
+ /* @__PURE__ */ jsx168("p", { className: "font-medium leading-relaxed", children: label })
4586
5000
  ] })
4587
5001
  ] });
4588
5002
  };
@@ -4590,9 +5004,9 @@ var StatisticCard = ({ className, icon, label, value, ...props }) => {
4590
5004
  // src/components/Switch/Switch.tsx
4591
5005
  import { forwardRef as forwardRef95 } from "react";
4592
5006
  import * as SwitchPrimitives from "@radix-ui/react-switch";
4593
- import { jsx as jsx163 } from "react/jsx-runtime";
5007
+ import { jsx as jsx169 } from "react/jsx-runtime";
4594
5008
  var Switch = forwardRef95(function Switch2({ className, ...props }, ref) {
4595
- return /* @__PURE__ */ jsx163(
5009
+ return /* @__PURE__ */ jsx169(
4596
5010
  SwitchPrimitives.Root,
4597
5011
  {
4598
5012
  className: cn(
@@ -4601,7 +5015,7 @@ var Switch = forwardRef95(function Switch2({ className, ...props }, ref) {
4601
5015
  ),
4602
5016
  ...props,
4603
5017
  ref,
4604
- children: /* @__PURE__ */ jsx163(
5018
+ children: /* @__PURE__ */ jsx169(
4605
5019
  SwitchPrimitives.Thumb,
4606
5020
  {
4607
5021
  className: cn(
@@ -4616,9 +5030,9 @@ var Switch = forwardRef95(function Switch2({ className, ...props }, ref) {
4616
5030
  // src/components/Tabs/TabsContent.tsx
4617
5031
  import { forwardRef as forwardRef96 } from "react";
4618
5032
  import * as TabsPrimitive from "@radix-ui/react-tabs";
4619
- import { jsx as jsx164 } from "react/jsx-runtime";
5033
+ import { jsx as jsx170 } from "react/jsx-runtime";
4620
5034
  var TabsContent = forwardRef96(function TabsContent2({ className, ...props }, ref) {
4621
- return /* @__PURE__ */ jsx164(
5035
+ return /* @__PURE__ */ jsx170(
4622
5036
  TabsPrimitive.Content,
4623
5037
  {
4624
5038
  className: cn(
@@ -4634,9 +5048,9 @@ var TabsContent = forwardRef96(function TabsContent2({ className, ...props }, re
4634
5048
  // src/components/Tabs/TabsList.tsx
4635
5049
  import { forwardRef as forwardRef97 } from "react";
4636
5050
  import * as TabsPrimitive2 from "@radix-ui/react-tabs";
4637
- import { jsx as jsx165 } from "react/jsx-runtime";
5051
+ import { jsx as jsx171 } from "react/jsx-runtime";
4638
5052
  var TabsList = forwardRef97(function TabsList2({ className, ...props }, ref) {
4639
- return /* @__PURE__ */ jsx165(
5053
+ return /* @__PURE__ */ jsx171(
4640
5054
  TabsPrimitive2.List,
4641
5055
  {
4642
5056
  className: cn(
@@ -4652,19 +5066,19 @@ var TabsList = forwardRef97(function TabsList2({ className, ...props }, ref) {
4652
5066
  // src/components/Tabs/TabsRoot.tsx
4653
5067
  import { forwardRef as forwardRef98 } from "react";
4654
5068
  import { Root as Root19 } from "@radix-ui/react-tabs";
4655
- import { jsx as jsx166 } from "react/jsx-runtime";
5069
+ import { jsx as jsx172 } from "react/jsx-runtime";
4656
5070
  var TabsRoot = forwardRef98(
4657
5071
  function TabsRoot2(props, ref) {
4658
- return /* @__PURE__ */ jsx166(Root19, { ref, ...props });
5072
+ return /* @__PURE__ */ jsx172(Root19, { ref, ...props });
4659
5073
  }
4660
5074
  );
4661
5075
 
4662
5076
  // src/components/Tabs/TabsTrigger.tsx
4663
5077
  import { forwardRef as forwardRef99 } from "react";
4664
5078
  import * as TabsPrimitive3 from "@radix-ui/react-tabs";
4665
- import { jsx as jsx167 } from "react/jsx-runtime";
5079
+ import { jsx as jsx173 } from "react/jsx-runtime";
4666
5080
  var TabsTrigger = forwardRef99(function TabsTrigger2({ className, ...props }, ref) {
4667
- return /* @__PURE__ */ jsx167(
5081
+ return /* @__PURE__ */ jsx173(
4668
5082
  TabsPrimitive3.Trigger,
4669
5083
  {
4670
5084
  className: cn(
@@ -4686,13 +5100,13 @@ var Tabs = Object.assign(TabsRoot, {
4686
5100
 
4687
5101
  // src/components/ThemeToggle/ThemeToggle.tsx
4688
5102
  import { MoonIcon, SunIcon } from "lucide-react";
4689
- import { jsx as jsx168, jsxs as jsxs58 } from "react/jsx-runtime";
5103
+ import { jsx as jsx174, jsxs as jsxs61 } from "react/jsx-runtime";
4690
5104
  var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
4691
5105
  const [theme, setTheme] = useTheme();
4692
5106
  const toggleTheme = () => {
4693
5107
  setTheme(theme === "dark" ? "light" : "dark");
4694
5108
  };
4695
- return /* @__PURE__ */ jsxs58(
5109
+ return /* @__PURE__ */ jsxs61(
4696
5110
  Button,
4697
5111
  {
4698
5112
  size: "icon",
@@ -4703,8 +5117,8 @@ var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
4703
5117
  },
4704
5118
  ...props,
4705
5119
  children: [
4706
- /* @__PURE__ */ jsx168(SunIcon, { className: "rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
4707
- /* @__PURE__ */ jsx168(MoonIcon, { className: "absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
5120
+ /* @__PURE__ */ jsx174(SunIcon, { className: "rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
5121
+ /* @__PURE__ */ jsx174(MoonIcon, { className: "absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" })
4708
5122
  ]
4709
5123
  }
4710
5124
  );
@@ -4713,10 +5127,10 @@ var ThemeToggle = ({ onClick, variant = "outline", ...props }) => {
4713
5127
  // src/components/Tooltip/TooltipContent.tsx
4714
5128
  import * as React42 from "react";
4715
5129
  import { Content as Content12 } from "@radix-ui/react-tooltip";
4716
- import { jsx as jsx169 } from "react/jsx-runtime";
5130
+ import { jsx as jsx175 } from "react/jsx-runtime";
4717
5131
  var TooltipContent = React42.forwardRef(
4718
5132
  function TooltipContent2({ className, collisionPadding = 0, sideOffset = 4, ...props }, ref) {
4719
- return /* @__PURE__ */ jsx169(
5133
+ return /* @__PURE__ */ jsx175(
4720
5134
  Content12,
4721
5135
  {
4722
5136
  className: cn(
@@ -4735,7 +5149,7 @@ var TooltipContent = React42.forwardRef(
4735
5149
  // src/components/Tooltip/TooltipRoot.tsx
4736
5150
  import "react";
4737
5151
  import { Provider, Root as Root20 } from "@radix-ui/react-tooltip";
4738
- import { jsx as jsx170 } from "react/jsx-runtime";
5152
+ import { jsx as jsx176 } from "react/jsx-runtime";
4739
5153
  var TooltipRoot = ({
4740
5154
  children,
4741
5155
  delayDuration = 0,
@@ -4743,15 +5157,15 @@ var TooltipRoot = ({
4743
5157
  open,
4744
5158
  skipDelayDuration = 300
4745
5159
  }) => {
4746
- return /* @__PURE__ */ jsx170(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx170(Root20, { open, onOpenChange, children }) });
5160
+ return /* @__PURE__ */ jsx176(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx176(Root20, { open, onOpenChange, children }) });
4747
5161
  };
4748
5162
 
4749
5163
  // src/components/Tooltip/TooltipTrigger.tsx
4750
5164
  import { forwardRef as forwardRef101 } from "react";
4751
5165
  import { Trigger as Trigger11 } from "@radix-ui/react-tooltip";
4752
- import { jsx as jsx171 } from "react/jsx-runtime";
5166
+ import { jsx as jsx177 } from "react/jsx-runtime";
4753
5167
  var TooltipTrigger = forwardRef101(function TooltipTrigger2({ variant = "outline", ...props }, ref) {
4754
- return /* @__PURE__ */ jsx171(Trigger11, { asChild: true, ref, children: /* @__PURE__ */ jsx171(Button, { variant, ...props }) });
5168
+ return /* @__PURE__ */ jsx177(Trigger11, { asChild: true, ref, children: /* @__PURE__ */ jsx177(Button, { variant, ...props }) });
4755
5169
  });
4756
5170
 
4757
5171
  // src/components/Tooltip/Tooltip.tsx