@candidhealth/react-vitals 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +311 -286
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -180
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -86,11 +86,14 @@ __export(index_exports, {
|
|
|
86
86
|
Modal: () => Modal,
|
|
87
87
|
MultiSelect: () => MultiSelect,
|
|
88
88
|
OverflowTooltip: () => OverflowTooltip,
|
|
89
|
+
PageContainer: () => PageContainer,
|
|
89
90
|
PercentInput: () => PercentInput,
|
|
90
91
|
PhoneNumber: () => PhoneNumber,
|
|
91
92
|
Popover: () => Popover,
|
|
93
|
+
RESPONSIVE_PADDING: () => RESPONSIVE_PADDING,
|
|
92
94
|
RadioButtonGroup: () => RadioButtonGroup,
|
|
93
95
|
RadioButtonItem: () => RadioButtonItem,
|
|
96
|
+
ScreenHeightPageContainer: () => ScreenHeightPageContainer,
|
|
94
97
|
ScrollTabsLayout: () => ScrollTabsLayout,
|
|
95
98
|
Select: () => Select,
|
|
96
99
|
SelectListItem: () => SelectListItem,
|
|
@@ -534,7 +537,7 @@ var AvatarGroup = ({ items, maxVisible = 3, overflowTitle, size = "md" }) => {
|
|
|
534
537
|
};
|
|
535
538
|
|
|
536
539
|
// src/core/callout/Callout.tsx
|
|
537
|
-
var
|
|
540
|
+
var import_free_solid_svg_icons = require("@fortawesome/free-solid-svg-icons");
|
|
538
541
|
var import_tailwind_merge8 = require("tailwind-merge");
|
|
539
542
|
|
|
540
543
|
// src/core/icon/Icon.tsx
|
|
@@ -563,10 +566,10 @@ var calloutBorderStyles = {
|
|
|
563
566
|
danger: "border-[1px] border-red-100"
|
|
564
567
|
};
|
|
565
568
|
var calloutIcons = {
|
|
566
|
-
default:
|
|
567
|
-
warning:
|
|
568
|
-
primary:
|
|
569
|
-
danger:
|
|
569
|
+
default: import_free_solid_svg_icons.faCircleInfo,
|
|
570
|
+
warning: import_free_solid_svg_icons.faTriangleExclamation,
|
|
571
|
+
primary: import_free_solid_svg_icons.faDiamond,
|
|
572
|
+
danger: import_free_solid_svg_icons.faCircle
|
|
570
573
|
};
|
|
571
574
|
var Callout = ({
|
|
572
575
|
title,
|
|
@@ -648,7 +651,7 @@ var IndeterminateCheckbox = ({
|
|
|
648
651
|
};
|
|
649
652
|
|
|
650
653
|
// src/core/collapsible/Collapsible.tsx
|
|
651
|
-
var
|
|
654
|
+
var import_free_solid_svg_icons2 = require("@fortawesome/free-solid-svg-icons");
|
|
652
655
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
653
656
|
var import_react4 = require("react");
|
|
654
657
|
var import_tailwind_merge11 = require("tailwind-merge");
|
|
@@ -674,9 +677,9 @@ var Collapsible = ({
|
|
|
674
677
|
asChild: true,
|
|
675
678
|
className: (0, import_tailwind_merge11.twMerge)("flex cursor-pointer items-center gap-2 font-medium text-muted", triggerClassName),
|
|
676
679
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
|
|
677
|
-
!hideIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "min-w-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { icon: isOpen ?
|
|
680
|
+
!hideIcon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "min-w-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { icon: isOpen ? import_free_solid_svg_icons2.faChevronDown : import_free_solid_svg_icons2.faChevronRight }) }),
|
|
678
681
|
title,
|
|
679
|
-
!hideIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "min-w-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { icon: isOpen ?
|
|
682
|
+
!hideIcon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "min-w-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { icon: isOpen ? import_free_solid_svg_icons2.faChevronDown : import_free_solid_svg_icons2.faChevronRight }) })
|
|
680
683
|
] })
|
|
681
684
|
}
|
|
682
685
|
),
|
|
@@ -685,7 +688,7 @@ var Collapsible = ({
|
|
|
685
688
|
};
|
|
686
689
|
|
|
687
690
|
// src/core/collapsible-section/CollapsibleSection.tsx
|
|
688
|
-
var
|
|
691
|
+
var import_free_solid_svg_icons3 = require("@fortawesome/free-solid-svg-icons");
|
|
689
692
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
690
693
|
var import_tailwind_merge12 = require("tailwind-merge");
|
|
691
694
|
|
|
@@ -746,7 +749,7 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
746
749
|
var ToggleButton = ({ children, ...rest }) => {
|
|
747
750
|
const { state: isVisible, toggle } = useIsVisible();
|
|
748
751
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_slot.Slot, { onClick: toggle, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Button, { variant: "transparent", size: "xs", ...rest, children: [
|
|
749
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: (0, import_tailwind_merge12.twJoin)("transition-transform", !isVisible && "-rotate-90"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { icon:
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: (0, import_tailwind_merge12.twJoin)("transition-transform", !isVisible && "-rotate-90"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { icon: import_free_solid_svg_icons3.faChevronDown }) }),
|
|
750
753
|
children
|
|
751
754
|
] }) });
|
|
752
755
|
};
|
|
@@ -762,7 +765,7 @@ CollapsibleSection.ToggleButton = ToggleButton;
|
|
|
762
765
|
CollapsibleSection.Content = Content4;
|
|
763
766
|
|
|
764
767
|
// src/core/copyable/Copyable.tsx
|
|
765
|
-
var
|
|
768
|
+
var import_free_solid_svg_icons4 = require("@fortawesome/free-solid-svg-icons");
|
|
766
769
|
var RadixTooltip2 = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
767
770
|
var import_tailwind_merge13 = require("tailwind-merge");
|
|
768
771
|
|
|
@@ -843,7 +846,7 @@ var Copyable = ({ children, value, tooltip, onClick, asChild, className }) => {
|
|
|
843
846
|
"z-101 grid h-6 w-6 place-items-center rounded-sm bg-white shadow-lg",
|
|
844
847
|
state !== "copying" && "animate-fade-in"
|
|
845
848
|
),
|
|
846
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: state === "copied" ? "text-green-500" : "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { icon: state === "copied" ?
|
|
849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: state === "copied" ? "text-green-500" : "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { icon: state === "copied" ? import_free_solid_svg_icons4.faCheck : import_free_solid_svg_icons4.faCopy }) })
|
|
847
850
|
}
|
|
848
851
|
) })
|
|
849
852
|
] });
|
|
@@ -854,7 +857,7 @@ var import_react8 = require("react");
|
|
|
854
857
|
var import_react_datepicker = __toESM(require("react-datepicker"), 1);
|
|
855
858
|
|
|
856
859
|
// src/core/date-picker/DatePickerHeader.tsx
|
|
857
|
-
var
|
|
860
|
+
var import_free_solid_svg_icons5 = require("@fortawesome/free-solid-svg-icons");
|
|
858
861
|
var import_date_fns = require("date-fns");
|
|
859
862
|
var import_lodash_es = require("lodash-es");
|
|
860
863
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
@@ -884,7 +887,7 @@ var DatePickerHeader = ({
|
|
|
884
887
|
}) => {
|
|
885
888
|
const datePickerContainer = document.querySelector(".react-datepicker") ?? void 0;
|
|
886
889
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-2 p-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
887
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: decreaseMonth, disabled: prevMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon:
|
|
890
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: decreaseMonth, disabled: prevMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon: import_free_solid_svg_icons5.faChevronLeft }) }),
|
|
888
891
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
889
892
|
Select,
|
|
890
893
|
{
|
|
@@ -909,12 +912,12 @@ var DatePickerHeader = ({
|
|
|
909
912
|
items: years.map((year) => ({ label: year.toString(), value: year.toString() }))
|
|
910
913
|
}
|
|
911
914
|
),
|
|
912
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: increaseMonth, disabled: nextMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon:
|
|
915
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, { onClick: increaseMonth, disabled: nextMonthButtonDisabled, variant: "transparent", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon, { icon: import_free_solid_svg_icons5.faChevronRight }) })
|
|
913
916
|
] }) });
|
|
914
917
|
};
|
|
915
918
|
|
|
916
919
|
// src/core/date-picker/shared.tsx
|
|
917
|
-
var
|
|
920
|
+
var import_free_solid_svg_icons6 = require("@fortawesome/free-solid-svg-icons");
|
|
918
921
|
|
|
919
922
|
// src/core/date-picker/DatePickerInput.tsx
|
|
920
923
|
var import_react5 = require("react");
|
|
@@ -966,7 +969,7 @@ var customInputFieldFactory = ({
|
|
|
966
969
|
inputProps,
|
|
967
970
|
errorNode,
|
|
968
971
|
hasError,
|
|
969
|
-
rightAction: isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-disabled", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { icon:
|
|
972
|
+
rightAction: isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-disabled", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { icon: import_free_solid_svg_icons6.faCalendar }) }) : !disabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { size: "xs", onClick: onClearInput, variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { icon: import_free_solid_svg_icons6.faXmark }) }) }) : null
|
|
970
973
|
}
|
|
971
974
|
);
|
|
972
975
|
|
|
@@ -1366,7 +1369,7 @@ var FieldDescription = ({ styles, children }) => {
|
|
|
1366
1369
|
};
|
|
1367
1370
|
|
|
1368
1371
|
// src/core/form/components/form-item/FieldErrorMessage.tsx
|
|
1369
|
-
var
|
|
1372
|
+
var import_free_solid_svg_icons7 = require("@fortawesome/free-solid-svg-icons");
|
|
1370
1373
|
|
|
1371
1374
|
// src/core/overflow-tooltip/OverflowTooltip.tsx
|
|
1372
1375
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
@@ -1394,7 +1397,7 @@ var FieldErrorMessage = ({ error }) => {
|
|
|
1394
1397
|
}
|
|
1395
1398
|
const message = handleErrorOrErrorArrayMessage(error);
|
|
1396
1399
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex h-4.5 items-center gap-x-1 pt-0.5 text-sm", children: [
|
|
1397
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-red-400", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { icon:
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-red-400", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { icon: import_free_solid_svg_icons7.faCircleExclamation }) }),
|
|
1398
1401
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1399
1402
|
OverflowTooltip,
|
|
1400
1403
|
{
|
|
@@ -1406,7 +1409,7 @@ var FieldErrorMessage = ({ error }) => {
|
|
|
1406
1409
|
};
|
|
1407
1410
|
|
|
1408
1411
|
// src/core/form/components/form-item/FieldLabelWithTooltip.tsx
|
|
1409
|
-
var
|
|
1412
|
+
var import_free_solid_svg_icons8 = require("@fortawesome/free-solid-svg-icons");
|
|
1410
1413
|
var import_tailwind_merge20 = require("tailwind-merge");
|
|
1411
1414
|
|
|
1412
1415
|
// src/core/form/components/form-item/FieldLabel.tsx
|
|
@@ -1433,7 +1436,7 @@ var FieldLabelWithTooltip = ({ styles, htmlFor, label, options }) => {
|
|
|
1433
1436
|
{
|
|
1434
1437
|
content: options?.tooltip,
|
|
1435
1438
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "inline-flex items-baseline space-x-1", children: [
|
|
1436
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "leading-none", children: options.tooltipIcon ? options.tooltipIcon : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon:
|
|
1439
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "leading-none", children: options.tooltipIcon ? options.tooltipIcon : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon: import_free_solid_svg_icons8.faCircleQuestion }) }) }),
|
|
1437
1440
|
options?.tooltipLabel && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-normal text-muted", children: options?.tooltipLabel })
|
|
1438
1441
|
] })
|
|
1439
1442
|
}
|
|
@@ -1557,7 +1560,7 @@ var FormInput = ({
|
|
|
1557
1560
|
);
|
|
1558
1561
|
|
|
1559
1562
|
// src/core/form/components/FormDollarInput.tsx
|
|
1560
|
-
var
|
|
1563
|
+
var import_free_solid_svg_icons9 = require("@fortawesome/free-solid-svg-icons");
|
|
1561
1564
|
var import_react19 = require("react");
|
|
1562
1565
|
var import_tailwind_merge23 = require("tailwind-merge");
|
|
1563
1566
|
|
|
@@ -1646,7 +1649,7 @@ var DollarInput = (0, import_react19.forwardRef)(
|
|
|
1646
1649
|
"flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-muted",
|
|
1647
1650
|
hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-surface-warning text-warning" : hasSuccess ? "border-green-300 bg-surface-success text-success" : "border-surface-neutral bg-surface-neutral"
|
|
1648
1651
|
),
|
|
1649
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon:
|
|
1652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_free_solid_svg_icons9.faDollarSign })
|
|
1650
1653
|
}
|
|
1651
1654
|
),
|
|
1652
1655
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
@@ -1670,15 +1673,15 @@ var DollarInput = (0, import_react19.forwardRef)(
|
|
|
1670
1673
|
}
|
|
1671
1674
|
),
|
|
1672
1675
|
hasWarning && message && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-warning", children: [
|
|
1673
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon:
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_free_solid_svg_icons9.faTriangleExclamation }),
|
|
1674
1677
|
message
|
|
1675
1678
|
] }),
|
|
1676
1679
|
hasError && message && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-red-700", children: [
|
|
1677
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon:
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_free_solid_svg_icons9.faCircleExclamation }),
|
|
1678
1681
|
message
|
|
1679
1682
|
] }),
|
|
1680
1683
|
hasSuccess && message && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-1 text-sm font-normal text-success", children: [
|
|
1681
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon:
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: import_free_solid_svg_icons9.faCircleCheck }),
|
|
1682
1685
|
message
|
|
1683
1686
|
] })
|
|
1684
1687
|
] });
|
|
@@ -1720,7 +1723,7 @@ var FormDollarInput = (0, import_react19.forwardRef)(
|
|
|
1720
1723
|
);
|
|
1721
1724
|
|
|
1722
1725
|
// src/core/form/components/FormPercentInput.tsx
|
|
1723
|
-
var
|
|
1726
|
+
var import_free_solid_svg_icons10 = require("@fortawesome/free-solid-svg-icons");
|
|
1724
1727
|
var import_react20 = require("react");
|
|
1725
1728
|
var import_tailwind_merge24 = require("tailwind-merge");
|
|
1726
1729
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
@@ -1786,7 +1789,7 @@ var PercentInput = (0, import_react20.forwardRef)(
|
|
|
1786
1789
|
"flex h-md w-9.5 items-center justify-center rounded-l-md border-y border-l px-2.5 text-sm text-muted",
|
|
1787
1790
|
hasError ? "border-red-300 bg-red-200 text-red-700" : hasWarning ? "border-yellow-300 bg-surface-warning text-warning" : hasSuccess ? "border-green-300 bg-surface-success text-success" : "border-surface-neutral bg-surface-neutral"
|
|
1788
1791
|
),
|
|
1789
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon:
|
|
1792
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_free_solid_svg_icons10.faPercent })
|
|
1790
1793
|
}
|
|
1791
1794
|
),
|
|
1792
1795
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
@@ -1809,15 +1812,15 @@ var PercentInput = (0, import_react20.forwardRef)(
|
|
|
1809
1812
|
}
|
|
1810
1813
|
),
|
|
1811
1814
|
hasWarning && message && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-warning", children: [
|
|
1812
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon:
|
|
1815
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_free_solid_svg_icons10.faTriangleExclamation }),
|
|
1813
1816
|
message
|
|
1814
1817
|
] }),
|
|
1815
1818
|
hasError && message && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Text, { as: "span", variant: "body-2", className: "flex items-center gap-1 text-red-700", children: [
|
|
1816
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon:
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_free_solid_svg_icons10.faCircleExclamation }),
|
|
1817
1820
|
message
|
|
1818
1821
|
] }),
|
|
1819
1822
|
hasSuccess && message && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-1 text-sm font-normal text-success", children: [
|
|
1820
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon:
|
|
1823
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: import_free_solid_svg_icons10.faCircleCheck }),
|
|
1821
1824
|
message
|
|
1822
1825
|
] })
|
|
1823
1826
|
] });
|
|
@@ -2047,22 +2050,22 @@ var useAsyncSelect = ({
|
|
|
2047
2050
|
// src/core/select/AsyncMultiSelect.tsx
|
|
2048
2051
|
var import_core4 = require("@dnd-kit/core");
|
|
2049
2052
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
2050
|
-
var
|
|
2053
|
+
var import_free_solid_svg_icons13 = require("@fortawesome/free-solid-svg-icons");
|
|
2051
2054
|
var import_react23 = require("react");
|
|
2052
2055
|
var import_tailwind_merge27 = require("tailwind-merge");
|
|
2053
2056
|
|
|
2054
2057
|
// src/core/dropdown-chevron/DropdownChevron.tsx
|
|
2055
|
-
var
|
|
2058
|
+
var import_free_solid_svg_icons11 = require("@fortawesome/free-solid-svg-icons");
|
|
2056
2059
|
var import_tailwind_merge25 = require("tailwind-merge");
|
|
2057
2060
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2058
2061
|
var DropdownChevron = () => {
|
|
2059
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: (0, import_tailwind_merge25.twJoin)("w-3 text-sm text-muted"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon:
|
|
2062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: (0, import_tailwind_merge25.twJoin)("w-3 text-sm text-muted"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { icon: import_free_solid_svg_icons11.faChevronDown }) });
|
|
2060
2063
|
};
|
|
2061
2064
|
|
|
2062
2065
|
// src/core/select/SelectListItem.tsx
|
|
2063
2066
|
var import_sortable = require("@dnd-kit/sortable");
|
|
2064
2067
|
var import_utilities = require("@dnd-kit/utilities");
|
|
2065
|
-
var
|
|
2068
|
+
var import_free_solid_svg_icons12 = require("@fortawesome/free-solid-svg-icons");
|
|
2066
2069
|
var import_react22 = require("react");
|
|
2067
2070
|
var import_tailwind_merge26 = require("tailwind-merge");
|
|
2068
2071
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
@@ -2108,7 +2111,7 @@ var SelectListItem = ({
|
|
|
2108
2111
|
e.stopPropagation();
|
|
2109
2112
|
listeners?.onClick(e);
|
|
2110
2113
|
},
|
|
2111
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { icon:
|
|
2114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { icon: import_free_solid_svg_icons12.faGripVertical })
|
|
2112
2115
|
}
|
|
2113
2116
|
),
|
|
2114
2117
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex w-full flex-1 items-center justify-between", children })
|
|
@@ -2299,7 +2302,7 @@ var AsyncMultiSelect = ({
|
|
|
2299
2302
|
] })),
|
|
2300
2303
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "w-72", children: [
|
|
2301
2304
|
(!hideSearch || allowCustomValues) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(InputBox, { variant: "transparent", children: [
|
|
2302
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-3 text-sm text-placeholder", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon:
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "w-3 text-sm text-placeholder", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: import_free_solid_svg_icons13.faMagnifyingGlass }) }),
|
|
2303
2306
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2304
2307
|
InputBox.Input,
|
|
2305
2308
|
{
|
|
@@ -2357,7 +2360,7 @@ var AsyncMultiSelect = ({
|
|
|
2357
2360
|
};
|
|
2358
2361
|
var SelectOption = ({ children, focused, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SelectListItem, { focused, ...rest, children: [
|
|
2359
2362
|
children,
|
|
2360
|
-
focused && !rest.disabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "w-3 text-sm text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon:
|
|
2363
|
+
focused && !rest.disabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "w-3 text-sm text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: import_free_solid_svg_icons13.faArrowTurnDown }) })
|
|
2361
2364
|
] });
|
|
2362
2365
|
var SelectedItems = ({
|
|
2363
2366
|
value = [],
|
|
@@ -2433,7 +2436,7 @@ var SelectedItems = ({
|
|
|
2433
2436
|
item.icon,
|
|
2434
2437
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: item.label })
|
|
2435
2438
|
] }),
|
|
2436
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex w-3 justify-center text-sm text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: minSelection === 1 ?
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex w-3 justify-center text-sm text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: minSelection === 1 ? import_free_solid_svg_icons13.faCheck : import_free_solid_svg_icons13.faXmark }) })
|
|
2437
2440
|
]
|
|
2438
2441
|
},
|
|
2439
2442
|
val
|
|
@@ -2948,11 +2951,11 @@ var import_react30 = require("react");
|
|
|
2948
2951
|
var import_tailwind_merge35 = require("tailwind-merge");
|
|
2949
2952
|
|
|
2950
2953
|
// src/core/loaders/Spinner.tsx
|
|
2954
|
+
var import_free_solid_svg_icons14 = require("@fortawesome/free-solid-svg-icons");
|
|
2951
2955
|
var import_react_fontawesome2 = require("@fortawesome/react-fontawesome");
|
|
2952
|
-
var import_sharp_solid_svg_icons14 = require("@fortawesome/sharp-solid-svg-icons");
|
|
2953
2956
|
var import_tailwind_merge32 = require("tailwind-merge");
|
|
2954
2957
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2955
|
-
var Spinner = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_fontawesome2.FontAwesomeIcon, { ...props, className: (0, import_tailwind_merge32.twJoin)("animate-spin text-muted", className), icon:
|
|
2958
|
+
var Spinner = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react_fontawesome2.FontAwesomeIcon, { ...props, className: (0, import_tailwind_merge32.twJoin)("animate-spin text-muted", className), icon: import_free_solid_svg_icons14.faSpinner });
|
|
2956
2959
|
|
|
2957
2960
|
// src/core/loaders/LoadingState.tsx
|
|
2958
2961
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
@@ -3226,7 +3229,7 @@ var Drawer = (0, import_react30.forwardRef)(
|
|
|
3226
3229
|
);
|
|
3227
3230
|
|
|
3228
3231
|
// src/core/drawer/DrawerHeader.tsx
|
|
3229
|
-
var
|
|
3232
|
+
var import_free_solid_svg_icons15 = require("@fortawesome/free-solid-svg-icons");
|
|
3230
3233
|
var import_tailwind_merge40 = require("tailwind-merge");
|
|
3231
3234
|
|
|
3232
3235
|
// src/core/skeleton/Skeleton.tsx
|
|
@@ -3299,16 +3302,16 @@ var DrawerHeader = ({
|
|
|
3299
3302
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "z-1 flex w-full flex-col items-stretch shadow", children: [
|
|
3300
3303
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex justify-between px-8 py-1 shadow-sm", children: [
|
|
3301
3304
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center gap-1.5 text-base text-muted", children: resource && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
|
|
3302
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon: resource.icon ||
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon: resource.icon || import_free_solid_svg_icons15.faBookmark }),
|
|
3303
3306
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { children: resource.name })
|
|
3304
3307
|
] }) }),
|
|
3305
3308
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3306
3309
|
pagination && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex gap-1", children: [
|
|
3307
3310
|
pagination.extra,
|
|
3308
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "sm", onClick: pagination.onPrevious, disabled: !pagination.hasPrevious, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon:
|
|
3309
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "sm", onClick: pagination.onNext, disabled: !pagination.hasNext, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon:
|
|
3311
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "sm", onClick: pagination.onPrevious, disabled: !pagination.hasPrevious, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon: import_free_solid_svg_icons15.faChevronUp }) }),
|
|
3312
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "sm", onClick: pagination.onNext, disabled: !pagination.hasNext, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon: import_free_solid_svg_icons15.faChevronDown }) })
|
|
3310
3313
|
] }),
|
|
3311
|
-
closeAction ?? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "xs", variant: "transparent", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-xl text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon:
|
|
3314
|
+
closeAction ?? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { size: "xs", variant: "transparent", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-xl text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon, { icon: import_free_solid_svg_icons15.faXmark }) }) })
|
|
3312
3315
|
] })
|
|
3313
3316
|
] }),
|
|
3314
3317
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-2 px-8 py-2", children: [
|
|
@@ -3330,12 +3333,12 @@ var DrawerHeaderSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
|
3330
3333
|
] });
|
|
3331
3334
|
|
|
3332
3335
|
// src/core/empty-state/EmptyState.tsx
|
|
3336
|
+
var import_free_solid_svg_icons16 = require("@fortawesome/free-solid-svg-icons");
|
|
3333
3337
|
var import_react_fontawesome3 = require("@fortawesome/react-fontawesome");
|
|
3334
|
-
var import_sharp_solid_svg_icons16 = require("@fortawesome/sharp-solid-svg-icons");
|
|
3335
3338
|
var import_react31 = require("react");
|
|
3336
3339
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3337
3340
|
var EmptyState = (0, import_react31.forwardRef)(
|
|
3338
|
-
({ icon =
|
|
3341
|
+
({ icon = import_free_solid_svg_icons16.faCircle, title, description }, ref) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col items-center justify-center gap-3 p-4", ref, children: [
|
|
3339
3342
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react_fontawesome3.FontAwesomeIcon, { className: "text-muted ring-transparent", icon, size: "2x" }),
|
|
3340
3343
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex max-w-prose flex-col text-center", children: [
|
|
3341
3344
|
title && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { variant: "title-3", className: "text-muted", children: title }),
|
|
@@ -3425,24 +3428,43 @@ var LabelImpl2 = ({ children, intent, size, variant, ...rest }, ref) => {
|
|
|
3425
3428
|
};
|
|
3426
3429
|
var Label = React12.forwardRef(LabelImpl2);
|
|
3427
3430
|
|
|
3428
|
-
// src/core/
|
|
3429
|
-
var
|
|
3430
|
-
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
3431
|
+
// src/core/layouts/PageContainer.tsx
|
|
3432
|
+
var import_react32 = require("react");
|
|
3431
3433
|
var import_tailwind_merge43 = require("tailwind-merge");
|
|
3432
3434
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3435
|
+
var RESPONSIVE_PADDING = "px-4 md:px-8 lg:px-12 xl:px-16";
|
|
3436
|
+
var PageContainer = (0, import_react32.forwardRef)(
|
|
3437
|
+
({ children, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref, className: (0, import_tailwind_merge43.twMerge)("h-full w-full overflow-y-auto pt-8", className, RESPONSIVE_PADDING), children })
|
|
3438
|
+
);
|
|
3439
|
+
var ScreenHeightPageContainer = (0, import_react32.forwardRef)(
|
|
3440
|
+
({ children, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3441
|
+
"div",
|
|
3442
|
+
{
|
|
3443
|
+
ref,
|
|
3444
|
+
className: (0, import_tailwind_merge43.twMerge)("flex h-screen w-full flex-col overflow-y-hidden", className, RESPONSIVE_PADDING),
|
|
3445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex h-screen w-full flex-1 flex-col overflow-y-hidden pt-8 pb-4", children })
|
|
3446
|
+
}
|
|
3447
|
+
)
|
|
3448
|
+
);
|
|
3449
|
+
|
|
3450
|
+
// src/core/menu/Menu.tsx
|
|
3451
|
+
var import_free_solid_svg_icons17 = require("@fortawesome/free-solid-svg-icons");
|
|
3452
|
+
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
3453
|
+
var import_tailwind_merge44 = require("tailwind-merge");
|
|
3454
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
3433
3455
|
var MenuTrigger = ({ children, ...rest }) => {
|
|
3434
3456
|
if (children == null) {
|
|
3435
|
-
return /* @__PURE__ */ (0,
|
|
3457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon, { icon: import_free_solid_svg_icons17.faEllipsis }) }) });
|
|
3436
3458
|
}
|
|
3437
3459
|
if (typeof children === "string") {
|
|
3438
|
-
return /* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Button, { ...rest, children: [
|
|
3461
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children }),
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DropdownChevron, {})
|
|
3441
3463
|
] }) });
|
|
3442
3464
|
}
|
|
3443
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Button, { ...rest, children }) });
|
|
3444
3466
|
};
|
|
3445
|
-
var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__PURE__ */ (0,
|
|
3467
|
+
var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3446
3468
|
import_react_dropdown_menu.Content,
|
|
3447
3469
|
{
|
|
3448
3470
|
collisionPadding: 8,
|
|
@@ -3450,15 +3472,15 @@ var MenuContent = ({ children, unrestrictedHeight = false, ...props }) => /* @__
|
|
|
3450
3472
|
align: "end",
|
|
3451
3473
|
className: "z-100 min-w-48 rounded-lg bg-white p-1.5 shadow-lg",
|
|
3452
3474
|
...props,
|
|
3453
|
-
children: /* @__PURE__ */ (0,
|
|
3475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: (0, import_tailwind_merge44.twJoin)("overflow-y-auto", !unrestrictedHeight && "max-h-[252px]"), children })
|
|
3454
3476
|
}
|
|
3455
3477
|
) });
|
|
3456
|
-
var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE__ */ (0,
|
|
3478
|
+
var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3457
3479
|
import_react_dropdown_menu.Item,
|
|
3458
3480
|
{
|
|
3459
3481
|
"data-loading": loading || void 0,
|
|
3460
3482
|
disabled: loading || disabled,
|
|
3461
|
-
className: (0,
|
|
3483
|
+
className: (0, import_tailwind_merge44.twJoin)(
|
|
3462
3484
|
"on-menu-item-active group flex w-full cursor-pointer items-center rounded-md p-2 text-neutral outline-hidden select-none data-disabled:cursor-not-allowed data-disabled:text-placeholder data-highlighted:bg-surface-neutral data-loading:bg-transparent data-loading:text-placeholder",
|
|
3463
3485
|
size === "default" ? "gap-1.5 text-sm" : "gap-2 text-base"
|
|
3464
3486
|
),
|
|
@@ -3467,31 +3489,31 @@ var MenuItem = ({ loading, disabled, size = "default", ...rest }) => /* @__PURE_
|
|
|
3467
3489
|
);
|
|
3468
3490
|
var MenuItemWithDisabledTooltip = ({ tooltip, onSelect, ...props }) => {
|
|
3469
3491
|
if (!props.disabled || !tooltip) {
|
|
3470
|
-
return /* @__PURE__ */ (0,
|
|
3492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuItem, { ...props, onSelect });
|
|
3471
3493
|
}
|
|
3472
|
-
return /* @__PURE__ */ (0,
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
3473
3495
|
Tooltip,
|
|
3474
3496
|
{
|
|
3475
|
-
trigger: /* @__PURE__ */ (0,
|
|
3497
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuItem, { ...props }) }),
|
|
3476
3498
|
content: tooltip,
|
|
3477
3499
|
side: "left"
|
|
3478
3500
|
}
|
|
3479
3501
|
);
|
|
3480
3502
|
};
|
|
3481
|
-
var MenuRoot = (props) => /* @__PURE__ */ (0,
|
|
3482
|
-
var MenuSeparator = () => /* @__PURE__ */ (0,
|
|
3503
|
+
var MenuRoot = (props) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Root, { modal: false, ...props });
|
|
3504
|
+
var MenuSeparator = () => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_dropdown_menu.Separator, { className: "my-[5px] h-px bg-surface-dark" });
|
|
3483
3505
|
var Menu = ({ children, trigger, align, variant = "default", triggerSize, ...rest }) => {
|
|
3484
3506
|
switch (variant) {
|
|
3485
3507
|
case "minimal":
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3488
|
-
/* @__PURE__ */ (0,
|
|
3508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(MenuRoot, { ...rest, children: [
|
|
3509
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuTrigger, { ...rest, size: triggerSize || "xs", variant: "transparent", children: trigger }),
|
|
3510
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuContent, { align, children })
|
|
3489
3511
|
] });
|
|
3490
3512
|
case "default":
|
|
3491
3513
|
default:
|
|
3492
|
-
return /* @__PURE__ */ (0,
|
|
3493
|
-
/* @__PURE__ */ (0,
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(MenuRoot, { ...rest, children: [
|
|
3515
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuTrigger, { size: triggerSize, ...rest, children: trigger }),
|
|
3516
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuContent, { align, children })
|
|
3495
3517
|
] });
|
|
3496
3518
|
}
|
|
3497
3519
|
};
|
|
@@ -3504,33 +3526,33 @@ Menu.ItemWithDisabledToolTip = MenuItemWithDisabledTooltip;
|
|
|
3504
3526
|
Menu.Separator = MenuSeparator;
|
|
3505
3527
|
|
|
3506
3528
|
// src/core/modal/components/ModalActions.tsx
|
|
3507
|
-
var
|
|
3529
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
3508
3530
|
var ModalActions = ({ children }) => {
|
|
3509
3531
|
if (children == null) {
|
|
3510
3532
|
return null;
|
|
3511
3533
|
}
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "sticky bottom-0 z-2 flex items-center justify-end gap-x-2 overflow-clip rounded-b-xl bg-white/80 px-8 pt-2 pb-6 backdrop-blur-sm", children });
|
|
3513
3535
|
};
|
|
3514
3536
|
|
|
3515
3537
|
// src/core/modal/components/ModalBody.tsx
|
|
3516
|
-
var
|
|
3538
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
3517
3539
|
var ModalBody = ({ children }) => {
|
|
3518
3540
|
if (children == null) {
|
|
3519
3541
|
return null;
|
|
3520
3542
|
}
|
|
3521
|
-
return /* @__PURE__ */ (0,
|
|
3543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "px-8 py-1.5", children });
|
|
3522
3544
|
};
|
|
3523
3545
|
|
|
3524
3546
|
// src/core/modal/components/ModalCloseButton.tsx
|
|
3525
3547
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
3526
|
-
var
|
|
3527
|
-
var ModalCloseButton = (props) => /* @__PURE__ */ (0,
|
|
3548
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
3549
|
+
var ModalCloseButton = (props) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Button, { ...props }) });
|
|
3528
3550
|
|
|
3529
3551
|
// src/core/modal/components/ModalContent.tsx
|
|
3530
3552
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
3531
|
-
var
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
3553
|
+
var import_react33 = require("react");
|
|
3554
|
+
var import_tailwind_merge45 = require("tailwind-merge");
|
|
3555
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
3534
3556
|
var preventDismiss = (e) => e.preventDefault();
|
|
3535
3557
|
var handleDismiss = (dismissible) => {
|
|
3536
3558
|
if (dismissible) {
|
|
@@ -3538,7 +3560,7 @@ var handleDismiss = (dismissible) => {
|
|
|
3538
3560
|
}
|
|
3539
3561
|
return preventDismiss;
|
|
3540
3562
|
};
|
|
3541
|
-
var ModalContent = (0,
|
|
3563
|
+
var ModalContent = (0, import_react33.forwardRef)(
|
|
3542
3564
|
({
|
|
3543
3565
|
children,
|
|
3544
3566
|
maxWidthClassName = "max-w-prose",
|
|
@@ -3547,22 +3569,22 @@ var ModalContent = (0, import_react32.forwardRef)(
|
|
|
3547
3569
|
dismissible = true,
|
|
3548
3570
|
fullscreen,
|
|
3549
3571
|
...rest
|
|
3550
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
3572
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_dialog2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3551
3573
|
import_react_dialog2.Overlay,
|
|
3552
3574
|
{
|
|
3553
3575
|
className: "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-fade-in-custom-easing",
|
|
3554
|
-
children: /* @__PURE__ */ (0,
|
|
3576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
3555
3577
|
import_react_dialog2.Content,
|
|
3556
3578
|
{
|
|
3557
3579
|
...rest,
|
|
3558
3580
|
ref,
|
|
3559
|
-
className: (0,
|
|
3581
|
+
className: (0, import_tailwind_merge45.twJoin)(
|
|
3560
3582
|
fullscreen ? "h-[calc(100vh-1rem)] w-[calc(100vw-1rem)]" : `max-h-[calc(100vh-2rem)] w-[clamp(100vw-2rem,100%,100vw-2rem)] ${maxWidthClassName}`,
|
|
3561
3583
|
`fixed top-1/2 left-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl bg-white shadow-lg focus:outline-hidden data-[state=open]:animate-fade-in-subtle-movement ${overflowYClassName}`
|
|
3562
3584
|
),
|
|
3563
3585
|
onPointerDownOutside: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
|
|
3564
3586
|
onEscapeKeyDown: fullscreen ? handleDismiss() : onDismiss ?? handleDismiss(dismissible),
|
|
3565
|
-
children: /* @__PURE__ */ (0,
|
|
3587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "relative flex h-full min-w-0 flex-1 flex-col", children })
|
|
3566
3588
|
}
|
|
3567
3589
|
)
|
|
3568
3590
|
}
|
|
@@ -3571,58 +3593,58 @@ var ModalContent = (0, import_react32.forwardRef)(
|
|
|
3571
3593
|
|
|
3572
3594
|
// src/core/modal/components/ModalDescription.tsx
|
|
3573
3595
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
3574
|
-
var
|
|
3596
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
3575
3597
|
var ModalDescription = ({ children }) => {
|
|
3576
3598
|
if (children == null) {
|
|
3577
3599
|
return null;
|
|
3578
3600
|
}
|
|
3579
|
-
return /* @__PURE__ */ (0,
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_react_dialog3.Description, { className: "pb-3 text-base/6 font-normal text-neutral", children });
|
|
3580
3602
|
};
|
|
3581
3603
|
|
|
3582
3604
|
// src/core/modal/components/ModalErrorCallout.tsx
|
|
3583
|
-
var
|
|
3605
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
3584
3606
|
var ModalErrorCallout = ({ children }) => {
|
|
3585
3607
|
if (!children) {
|
|
3586
3608
|
return null;
|
|
3587
3609
|
}
|
|
3588
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "sticky top-14 z-10 px-5", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Callout, { intent: "danger", children }) });
|
|
3589
3611
|
};
|
|
3590
3612
|
|
|
3591
3613
|
// src/core/modal/components/ModalRoot.tsx
|
|
3592
3614
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
3593
|
-
var
|
|
3615
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
3594
3616
|
var ModalRoot = (props) => {
|
|
3595
|
-
return /* @__PURE__ */ (0,
|
|
3617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react_dialog4.Root, { ...props });
|
|
3596
3618
|
};
|
|
3597
3619
|
|
|
3598
3620
|
// src/core/modal/components/ModalTitle.tsx
|
|
3599
3621
|
var import_react_dialog6 = require("@radix-ui/react-dialog");
|
|
3600
3622
|
|
|
3601
3623
|
// src/core/modal/components/ModalCloseX.tsx
|
|
3602
|
-
var
|
|
3624
|
+
var import_free_solid_svg_icons18 = require("@fortawesome/free-solid-svg-icons");
|
|
3603
3625
|
var import_react_dialog5 = require("@radix-ui/react-dialog");
|
|
3604
|
-
var
|
|
3605
|
-
var ModalCloseX = () => /* @__PURE__ */ (0,
|
|
3626
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
3627
|
+
var ModalCloseX = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "absolute top-2.5 right-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react_dialog5.Close, { asChild: true, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Button, { variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "px-0.5 text-xl text-muted", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Icon, { icon: import_free_solid_svg_icons18.faXmark }) }) }) }) });
|
|
3606
3628
|
|
|
3607
3629
|
// src/core/modal/components/ModalTitle.tsx
|
|
3608
|
-
var
|
|
3630
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
3609
3631
|
var ModalTitle = ({ children, showX = true }) => {
|
|
3610
3632
|
if (children == null) {
|
|
3611
3633
|
return null;
|
|
3612
3634
|
}
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
3614
|
-
/* @__PURE__ */ (0,
|
|
3615
|
-
showX && /* @__PURE__ */ (0,
|
|
3635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "sticky top-0 z-2 overflow-clip rounded-t-xl bg-white/80 px-8 pt-8 pb-1.5 backdrop-blur-sm", children: [
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_dialog6.Title, { className: "text-xl font-semibold text-dark", children }),
|
|
3637
|
+
showX && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ModalCloseX, {})
|
|
3616
3638
|
] });
|
|
3617
3639
|
};
|
|
3618
3640
|
|
|
3619
3641
|
// src/core/modal/components/ModalTriggerButton.tsx
|
|
3620
3642
|
var import_react_dialog7 = require("@radix-ui/react-dialog");
|
|
3621
|
-
var
|
|
3622
|
-
var ModalTriggerButton = (props) => /* @__PURE__ */ (0,
|
|
3643
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
3644
|
+
var ModalTriggerButton = (props) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react_dialog7.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Button, { ...props }) });
|
|
3623
3645
|
|
|
3624
3646
|
// src/core/modal/Modal.tsx
|
|
3625
|
-
var
|
|
3647
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
3626
3648
|
var ModalBodyImpl = ({
|
|
3627
3649
|
children,
|
|
3628
3650
|
title,
|
|
@@ -3630,14 +3652,14 @@ var ModalBodyImpl = ({
|
|
|
3630
3652
|
description,
|
|
3631
3653
|
actions,
|
|
3632
3654
|
showX = true
|
|
3633
|
-
}) => /* @__PURE__ */ (0,
|
|
3634
|
-
/* @__PURE__ */ (0,
|
|
3635
|
-
/* @__PURE__ */ (0,
|
|
3636
|
-
(description || children) && /* @__PURE__ */ (0,
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3655
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalTitle, { showX, children: title }),
|
|
3657
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalErrorCallout, { children: error }),
|
|
3658
|
+
(description || children) && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(ModalBody, { children: [
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalDescription, { children: description }),
|
|
3638
3660
|
children
|
|
3639
3661
|
] }),
|
|
3640
|
-
/* @__PURE__ */ (0,
|
|
3662
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalActions, { children: actions })
|
|
3641
3663
|
] });
|
|
3642
3664
|
var Modal = ({
|
|
3643
3665
|
children,
|
|
@@ -3651,7 +3673,7 @@ var Modal = ({
|
|
|
3651
3673
|
description,
|
|
3652
3674
|
actions,
|
|
3653
3675
|
...rest
|
|
3654
|
-
}) => /* @__PURE__ */ (0,
|
|
3676
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
3655
3677
|
ModalRoot,
|
|
3656
3678
|
{
|
|
3657
3679
|
open: isOpen,
|
|
@@ -3664,7 +3686,7 @@ var Modal = ({
|
|
|
3664
3686
|
},
|
|
3665
3687
|
children: [
|
|
3666
3688
|
trigger,
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalContent, { "aria-describedby": description || void 0, ...rest, children: children !== void 0 ? children : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(ModalBodyImpl, { title, error, description, actions, children: content }) })
|
|
3668
3690
|
]
|
|
3669
3691
|
}
|
|
3670
3692
|
);
|
|
@@ -3677,8 +3699,8 @@ var React13 = __toESM(require("react"), 1);
|
|
|
3677
3699
|
|
|
3678
3700
|
// src/core/modal/FullscreenModalHeader.tsx
|
|
3679
3701
|
var import_react_dialog8 = require("@radix-ui/react-dialog");
|
|
3680
|
-
var
|
|
3681
|
-
var
|
|
3702
|
+
var import_tailwind_merge46 = require("tailwind-merge");
|
|
3703
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
3682
3704
|
var FullscreenModalHeader = ({
|
|
3683
3705
|
className,
|
|
3684
3706
|
title,
|
|
@@ -3686,22 +3708,22 @@ var FullscreenModalHeader = ({
|
|
|
3686
3708
|
leftSlot,
|
|
3687
3709
|
rightSlot
|
|
3688
3710
|
}) => {
|
|
3689
|
-
return /* @__PURE__ */ (0,
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
3711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: (0, import_tailwind_merge46.twJoin)("flex items-center justify-between gap-4", className), children: [
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-1 items-center gap-4", children: [
|
|
3691
3713
|
leftSlot,
|
|
3692
|
-
/* @__PURE__ */ (0,
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3694
|
-
description && /* @__PURE__ */ (0,
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3715
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_react_dialog8.Title, { className: "text-2xl font-medium text-neutral", children: title }),
|
|
3716
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "text-base/6 text-muted", children: description })
|
|
3695
3717
|
] })
|
|
3696
3718
|
] }),
|
|
3697
|
-
/* @__PURE__ */ (0,
|
|
3719
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex gap-2", children: rightSlot })
|
|
3698
3720
|
] });
|
|
3699
3721
|
};
|
|
3700
3722
|
|
|
3701
3723
|
// src/core/modal/FullscreenModal.tsx
|
|
3702
|
-
var
|
|
3724
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
3703
3725
|
var FullscreenModal = React13.forwardRef(
|
|
3704
|
-
({ children, trigger, isOpen, onClose, onOpenChange, fullscreen = true, showX = false, title, ...rest }, ref) => /* @__PURE__ */ (0,
|
|
3726
|
+
({ children, trigger, isOpen, onClose, onOpenChange, fullscreen = true, showX = false, title, ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
3705
3727
|
ModalRoot,
|
|
3706
3728
|
{
|
|
3707
3729
|
open: isOpen,
|
|
@@ -3714,7 +3736,7 @@ var FullscreenModal = React13.forwardRef(
|
|
|
3714
3736
|
},
|
|
3715
3737
|
children: [
|
|
3716
3738
|
trigger,
|
|
3717
|
-
/* @__PURE__ */ (0,
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalContent, { fullscreen, ...rest, ref, children: title ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Modal.Body, { title, showX, children }) : children })
|
|
3718
3740
|
]
|
|
3719
3741
|
}
|
|
3720
3742
|
)
|
|
@@ -3726,15 +3748,15 @@ var FullscreenModalNamespace = Object.assign(FullscreenModal, {
|
|
|
3726
3748
|
});
|
|
3727
3749
|
|
|
3728
3750
|
// src/core/modal/AlertModal.tsx
|
|
3729
|
-
var
|
|
3730
|
-
var ModalBodyImpl2 = ({ children, title, error, description, actions }) => /* @__PURE__ */ (0,
|
|
3731
|
-
/* @__PURE__ */ (0,
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3733
|
-
(description || children) && /* @__PURE__ */ (0,
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3751
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
3752
|
+
var ModalBodyImpl2 = ({ children, title, error, description, actions }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalTitle, { showX: false, children: title }),
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalErrorCallout, { children: error }),
|
|
3755
|
+
(description || children) && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ModalBody, { children: [
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalDescription, { children: description }),
|
|
3735
3757
|
children
|
|
3736
3758
|
] }),
|
|
3737
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalActions, { children: actions })
|
|
3738
3760
|
] });
|
|
3739
3761
|
var AlertModal = ({
|
|
3740
3762
|
children,
|
|
@@ -3748,7 +3770,7 @@ var AlertModal = ({
|
|
|
3748
3770
|
description,
|
|
3749
3771
|
actions,
|
|
3750
3772
|
...rest
|
|
3751
|
-
}) => /* @__PURE__ */ (0,
|
|
3773
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
3752
3774
|
ModalRoot,
|
|
3753
3775
|
{
|
|
3754
3776
|
open: isOpen,
|
|
@@ -3761,7 +3783,7 @@ var AlertModal = ({
|
|
|
3761
3783
|
},
|
|
3762
3784
|
children: [
|
|
3763
3785
|
trigger,
|
|
3764
|
-
/* @__PURE__ */ (0,
|
|
3786
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalContent, { ...rest, dismissible: false, children: children !== void 0 ? children : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalBodyImpl2, { title, error, description, actions, children: content }) })
|
|
3765
3787
|
]
|
|
3766
3788
|
}
|
|
3767
3789
|
);
|
|
@@ -3772,20 +3794,20 @@ AlertModal.CloseButton = ModalCloseButton;
|
|
|
3772
3794
|
// src/core/phone-number/PhoneNumber.tsx
|
|
3773
3795
|
var import_style = require("react-international-phone/style.css");
|
|
3774
3796
|
var import_react_international_phone = require("react-international-phone");
|
|
3775
|
-
var
|
|
3776
|
-
var
|
|
3797
|
+
var import_tailwind_merge47 = require("tailwind-merge");
|
|
3798
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
3777
3799
|
var PhoneNumber = ({
|
|
3778
3800
|
hasError,
|
|
3779
3801
|
onChange,
|
|
3780
3802
|
...props
|
|
3781
3803
|
}) => {
|
|
3782
|
-
return /* @__PURE__ */ (0,
|
|
3804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
3783
3805
|
import_react_international_phone.PhoneInput,
|
|
3784
3806
|
{
|
|
3785
3807
|
defaultCountry: props.defaultCountry ?? "us",
|
|
3786
3808
|
disableDialCodeAndPrefix: true,
|
|
3787
3809
|
showDisabledDialCodeAndPrefix: true,
|
|
3788
|
-
inputClassName: (0,
|
|
3810
|
+
inputClassName: (0, import_tailwind_merge47.twJoin)(
|
|
3789
3811
|
"flex-1 placeholder:text-placeholder",
|
|
3790
3812
|
hasError ? "border-red-300!" : "border-surface-neutral!"
|
|
3791
3813
|
),
|
|
@@ -3835,16 +3857,16 @@ var isValidPhoneNumber = (input) => {
|
|
|
3835
3857
|
};
|
|
3836
3858
|
|
|
3837
3859
|
// src/core/table/Table.tsx
|
|
3838
|
-
var
|
|
3839
|
-
var
|
|
3860
|
+
var import_react35 = require("react");
|
|
3861
|
+
var import_tailwind_merge50 = require("tailwind-merge");
|
|
3840
3862
|
|
|
3841
3863
|
// src/core/utils/useIntersectionObserver.ts
|
|
3842
|
-
var
|
|
3864
|
+
var import_react34 = require("react");
|
|
3843
3865
|
var useIntersectionObserver = (options = {}) => {
|
|
3844
3866
|
const { threshold = 1, root = null, rootMargin = "0px" } = options;
|
|
3845
|
-
const [entry, setEntry] = (0,
|
|
3846
|
-
const previousObserver = (0,
|
|
3847
|
-
const customRef = (0,
|
|
3867
|
+
const [entry, setEntry] = (0, import_react34.useState)(null);
|
|
3868
|
+
const previousObserver = (0, import_react34.useRef)(null);
|
|
3869
|
+
const customRef = (0, import_react34.useCallback)(
|
|
3848
3870
|
(node) => {
|
|
3849
3871
|
if (previousObserver.current) {
|
|
3850
3872
|
previousObserver.current.disconnect();
|
|
@@ -3867,10 +3889,10 @@ var useIntersectionObserver = (options = {}) => {
|
|
|
3867
3889
|
};
|
|
3868
3890
|
|
|
3869
3891
|
// src/core/table/TableBody.tsx
|
|
3870
|
-
var
|
|
3892
|
+
var import_free_solid_svg_icons19 = require("@fortawesome/free-solid-svg-icons");
|
|
3871
3893
|
|
|
3872
3894
|
// src/core/table/TableRow.tsx
|
|
3873
|
-
var
|
|
3895
|
+
var import_tailwind_merge48 = require("tailwind-merge");
|
|
3874
3896
|
|
|
3875
3897
|
// src/core/table/utils.ts
|
|
3876
3898
|
var import_react_table = require("@tanstack/react-table");
|
|
@@ -3950,7 +3972,7 @@ var handleHeaderStyle = handleStyle;
|
|
|
3950
3972
|
var handleCellStyle = handleStyle;
|
|
3951
3973
|
|
|
3952
3974
|
// src/core/table/TableRow.tsx
|
|
3953
|
-
var
|
|
3975
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
3954
3976
|
var TableRow = ({ table, rowClassName, cellClassName, row }) => {
|
|
3955
3977
|
const hasRowClick = !!table.options.meta?.onRowClick;
|
|
3956
3978
|
const isStaticSubRow = !!table.options.meta?.staticSubRows;
|
|
@@ -3960,18 +3982,18 @@ var TableRow = ({ table, rowClassName, cellClassName, row }) => {
|
|
|
3960
3982
|
}
|
|
3961
3983
|
};
|
|
3962
3984
|
const cells = row.getVisibleCells();
|
|
3963
|
-
return /* @__PURE__ */ (0,
|
|
3985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
3964
3986
|
"tr",
|
|
3965
3987
|
{
|
|
3966
3988
|
"data-active": table.options.meta?.activeRowId === row.id ? "" : void 0,
|
|
3967
3989
|
"data-clickable": !isStaticSubRow && (hasRowClick || row.getCanExpand()) ? "" : void 0,
|
|
3968
3990
|
"data-depth": isStaticSubRow ? row.depth : void 0,
|
|
3969
3991
|
onClick: !isStaticSubRow && row.getCanExpand() ? row.getToggleExpandedHandler() : void 0,
|
|
3970
|
-
className: (0,
|
|
3992
|
+
className: (0, import_tailwind_merge48.twJoin)(
|
|
3971
3993
|
"data-[active]:bg-indigo-100 data-[clickable]:hover:cursor-pointer data-[clickable]:hover:bg-surface-primary data-[active]:data-[clickable]:hover:bg-indigo-200",
|
|
3972
3994
|
rowClassName
|
|
3973
3995
|
),
|
|
3974
|
-
children: cells.map((cell) => /* @__PURE__ */ (0,
|
|
3996
|
+
children: cells.map((cell) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
3975
3997
|
"td",
|
|
3976
3998
|
{
|
|
3977
3999
|
onClickCapture: hasRowClick ? (ev) => onRowClick(ev, row) : void 0,
|
|
@@ -3986,40 +4008,40 @@ var TableRow = ({ table, rowClassName, cellClassName, row }) => {
|
|
|
3986
4008
|
};
|
|
3987
4009
|
|
|
3988
4010
|
// src/core/table/TableBody.tsx
|
|
3989
|
-
var
|
|
4011
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
3990
4012
|
var TableBody = ({ table, loading, rootClassName, afterRows, ...props }) => {
|
|
3991
4013
|
const { rows } = table.getRowModel();
|
|
3992
4014
|
if (rows.length === 0) {
|
|
3993
4015
|
if (loading) {
|
|
3994
4016
|
const colCount = table.getAllLeafColumns().length;
|
|
3995
|
-
return /* @__PURE__ */ (0,
|
|
4017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tbody", { className: rootClassName, children: Array.from({ length: 20 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
3996
4018
|
"tr",
|
|
3997
4019
|
{
|
|
3998
4020
|
className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200",
|
|
3999
|
-
children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ (0,
|
|
4021
|
+
children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Skeleton, { className: "h-3 w-full" }) }, j))
|
|
4000
4022
|
},
|
|
4001
4023
|
`skeleton-${i}`
|
|
4002
4024
|
)) });
|
|
4003
4025
|
}
|
|
4004
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
-
/* @__PURE__ */ (0,
|
|
4026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("tbody", { className: rootClassName, children: [
|
|
4027
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(EmptyRowsTd, { colSpan: table.getAllLeafColumns().length, emptyText: table.options.meta?.emptyText }) }),
|
|
4006
4028
|
afterRows
|
|
4007
4029
|
] });
|
|
4008
4030
|
}
|
|
4009
|
-
return /* @__PURE__ */ (0,
|
|
4010
|
-
rows.map((row) => /* @__PURE__ */ (0,
|
|
4031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("tbody", { className: rootClassName, children: [
|
|
4032
|
+
rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TableRow, { ...props, table, row }, row.id)),
|
|
4011
4033
|
afterRows
|
|
4012
4034
|
] });
|
|
4013
4035
|
};
|
|
4014
|
-
var EmptyRowsTd = ({ emptyText = "No rows found", ...props }) => /* @__PURE__ */ (0,
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
4036
|
+
var EmptyRowsTd = ({ emptyText = "No rows found", ...props }) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("td", { ...props, className: "h-full", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "flex h-full min-h-12 w-full items-center justify-center gap-2 text-2xl/none text-placeholder", children: [
|
|
4037
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon, { icon: import_free_solid_svg_icons19.faTable }) }),
|
|
4038
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-base/none font-medium", children: emptyText })
|
|
4017
4039
|
] }) });
|
|
4018
4040
|
|
|
4019
4041
|
// src/core/table/TableHeader.tsx
|
|
4020
|
-
var
|
|
4021
|
-
var
|
|
4022
|
-
var
|
|
4042
|
+
var import_free_solid_svg_icons20 = require("@fortawesome/free-solid-svg-icons");
|
|
4043
|
+
var import_tailwind_merge49 = require("tailwind-merge");
|
|
4044
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
4023
4045
|
var TableHeader = ({
|
|
4024
4046
|
table,
|
|
4025
4047
|
variant,
|
|
@@ -4027,7 +4049,7 @@ var TableHeader = ({
|
|
|
4027
4049
|
rowClassName,
|
|
4028
4050
|
cellClassName
|
|
4029
4051
|
}) => {
|
|
4030
|
-
return /* @__PURE__ */ (0,
|
|
4052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("thead", { className: rootClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tr", { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4031
4053
|
Th,
|
|
4032
4054
|
{
|
|
4033
4055
|
scope: "col",
|
|
@@ -4050,14 +4072,14 @@ var Th = ({
|
|
|
4050
4072
|
const isLastInRow = header.index === header.headerGroup.headers.length - 1;
|
|
4051
4073
|
const canResize = !isLastInRow && !!header.getContext().table.options.columnResizeMode && header.column.getCanResize();
|
|
4052
4074
|
const isSubtable = variant === "subtable";
|
|
4053
|
-
const resizeHandle = canResize && /* @__PURE__ */ (0,
|
|
4075
|
+
const resizeHandle = canResize && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
4054
4076
|
"div",
|
|
4055
4077
|
{
|
|
4056
4078
|
onMouseDown: header.getResizeHandler(),
|
|
4057
4079
|
onTouchStart: header.getResizeHandler(),
|
|
4058
4080
|
onClick: (e) => e.stopPropagation(),
|
|
4059
4081
|
"data-resizing": header.column.getIsResizing() ? "" : void 0,
|
|
4060
|
-
className: (0,
|
|
4082
|
+
className: (0, import_tailwind_merge49.twJoin)(
|
|
4061
4083
|
"absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize touch-none select-none",
|
|
4062
4084
|
"after:pointer-events-none after:absolute after:top-0 after:right-0 after:h-screen after:w-0.5 after:transition-colors after:duration-150 after:content-['']",
|
|
4063
4085
|
isSubtable ? "hover:after:bg-indigo-600 data-resizing:after:bg-indigo-600" : "group-hover:after:bg-gray-200 hover:after:bg-indigo-600 data-resizing:after:bg-indigo-600"
|
|
@@ -4065,54 +4087,54 @@ var Th = ({
|
|
|
4065
4087
|
}
|
|
4066
4088
|
);
|
|
4067
4089
|
if (header.column.getIsSorted()) {
|
|
4068
|
-
return /* @__PURE__ */ (0,
|
|
4090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
4069
4091
|
"th",
|
|
4070
4092
|
{
|
|
4071
4093
|
...props,
|
|
4072
4094
|
"data-clickable": "ok",
|
|
4073
4095
|
onClick: header.column.getToggleSortingHandler(),
|
|
4074
|
-
className: (0,
|
|
4096
|
+
className: (0, import_tailwind_merge49.twJoin)(props.className, canResize && "group relative"),
|
|
4075
4097
|
children: [
|
|
4076
4098
|
children,
|
|
4077
|
-
/* @__PURE__ */ (0,
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "ml-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SortIcon, { dir: header.column.getIsSorted() }) }),
|
|
4078
4100
|
resizeHandle
|
|
4079
4101
|
]
|
|
4080
4102
|
}
|
|
4081
4103
|
);
|
|
4082
4104
|
}
|
|
4083
4105
|
if (header.column.getCanSort()) {
|
|
4084
|
-
return /* @__PURE__ */ (0,
|
|
4106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
4085
4107
|
"th",
|
|
4086
4108
|
{
|
|
4087
4109
|
...props,
|
|
4088
4110
|
"data-clickable": "ok",
|
|
4089
4111
|
onClick: header.column.getToggleSortingHandler(),
|
|
4090
|
-
className: (0,
|
|
4112
|
+
className: (0, import_tailwind_merge49.twJoin)(props.className, canResize && "group relative"),
|
|
4091
4113
|
children: [
|
|
4092
4114
|
children,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "invisible ml-1.5 group-hover:visible", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(SortIcon, { dir: header.column.getNextSortingOrder() }) }),
|
|
4094
4116
|
resizeHandle
|
|
4095
4117
|
]
|
|
4096
4118
|
}
|
|
4097
4119
|
);
|
|
4098
4120
|
}
|
|
4099
|
-
return /* @__PURE__ */ (0,
|
|
4121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("th", { ...props, className: (0, import_tailwind_merge49.twJoin)(props.className, canResize && "group relative"), children: [
|
|
4100
4122
|
children,
|
|
4101
4123
|
resizeHandle
|
|
4102
4124
|
] });
|
|
4103
4125
|
};
|
|
4104
4126
|
var SortIcon = ({ dir }) => {
|
|
4105
4127
|
if (dir === "asc") {
|
|
4106
|
-
return /* @__PURE__ */ (0,
|
|
4128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { icon: import_free_solid_svg_icons20.faArrowUpWideShort });
|
|
4107
4129
|
}
|
|
4108
4130
|
if (dir === "desc") {
|
|
4109
|
-
return /* @__PURE__ */ (0,
|
|
4131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { icon: import_free_solid_svg_icons20.faArrowDownWideShort });
|
|
4110
4132
|
}
|
|
4111
4133
|
return null;
|
|
4112
4134
|
};
|
|
4113
4135
|
|
|
4114
4136
|
// src/core/table/Table.tsx
|
|
4115
|
-
var
|
|
4137
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
4116
4138
|
var tableVariants = {
|
|
4117
4139
|
default: "default",
|
|
4118
4140
|
seamless: "seamless",
|
|
@@ -4177,63 +4199,63 @@ var Table = ({ variant = "default", loading: loadingProp, ...props }) => {
|
|
|
4177
4199
|
const tableElementRef = props.table.options.meta?.tableElementRef ?? null;
|
|
4178
4200
|
switch (variant) {
|
|
4179
4201
|
case tableVariants.transparent:
|
|
4180
|
-
return /* @__PURE__ */ (0,
|
|
4202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "relative mb-auto min-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
4181
4203
|
"table",
|
|
4182
4204
|
{
|
|
4183
4205
|
ref: tableElementRef,
|
|
4184
4206
|
"data-ui": uiLoading,
|
|
4185
4207
|
style: resizeStyle,
|
|
4186
|
-
className: (0,
|
|
4208
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4187
4209
|
"min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
|
|
4188
4210
|
resizeStyle && "overflow-clip"
|
|
4189
4211
|
),
|
|
4190
4212
|
children: [
|
|
4191
|
-
/* @__PURE__ */ (0,
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4213
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableBody, { ...props, ...bodyClassNames(variant), loading })
|
|
4193
4215
|
]
|
|
4194
4216
|
}
|
|
4195
4217
|
) });
|
|
4196
4218
|
case tableVariants.subtable:
|
|
4197
|
-
return /* @__PURE__ */ (0,
|
|
4198
|
-
showLoadingBar && /* @__PURE__ */ (0,
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "relative mb-auto min-w-full", children: [
|
|
4220
|
+
showLoadingBar && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(LoadingBar, { className: "absolute top-0 right-0 left-0 z-10 h-1 rounded-none" }),
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
4200
4222
|
"table",
|
|
4201
4223
|
{
|
|
4202
4224
|
ref: tableElementRef,
|
|
4203
4225
|
"data-ui": uiLoading,
|
|
4204
4226
|
style: resizeStyle,
|
|
4205
|
-
className: (0,
|
|
4227
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4206
4228
|
"min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
|
|
4207
4229
|
resizeStyle && "overflow-clip"
|
|
4208
4230
|
),
|
|
4209
4231
|
children: [
|
|
4210
|
-
/* @__PURE__ */ (0,
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableBody, { ...props, ...bodyClassNames(variant), loading })
|
|
4212
4234
|
]
|
|
4213
4235
|
}
|
|
4214
4236
|
)
|
|
4215
4237
|
] });
|
|
4216
4238
|
case tableVariants.seamless:
|
|
4217
|
-
return /* @__PURE__ */ (0,
|
|
4239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
4218
4240
|
"div",
|
|
4219
4241
|
{
|
|
4220
|
-
className: (0,
|
|
4242
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4221
4243
|
"relative mb-auto rounded-md border bg-white",
|
|
4222
4244
|
loading && coreRows.length === 0 ? "overflow-hidden" : "overflow-auto"
|
|
4223
4245
|
),
|
|
4224
|
-
children: /* @__PURE__ */ (0,
|
|
4246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
4225
4247
|
"table",
|
|
4226
4248
|
{
|
|
4227
4249
|
ref: tableElementRef,
|
|
4228
4250
|
"data-ui": uiLoading,
|
|
4229
4251
|
style: resizeStyle,
|
|
4230
|
-
className: (0,
|
|
4252
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4231
4253
|
"relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
|
|
4232
4254
|
resizeStyle && "overflow-clip"
|
|
4233
4255
|
),
|
|
4234
4256
|
children: [
|
|
4235
|
-
/* @__PURE__ */ (0,
|
|
4236
|
-
/* @__PURE__ */ (0,
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableHeader, { ...props, variant, ...headerClassNames(variant) }),
|
|
4258
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableBody, { ...props, ...bodyClassNames(variant), loading })
|
|
4237
4259
|
]
|
|
4238
4260
|
}
|
|
4239
4261
|
)
|
|
@@ -4241,7 +4263,7 @@ var Table = ({ variant = "default", loading: loadingProp, ...props }) => {
|
|
|
4241
4263
|
);
|
|
4242
4264
|
case tableVariants.default:
|
|
4243
4265
|
default:
|
|
4244
|
-
return /* @__PURE__ */ (0,
|
|
4266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(DefaultTable, { ...props, loading, fetching });
|
|
4245
4267
|
}
|
|
4246
4268
|
};
|
|
4247
4269
|
var DefaultTable = ({ table, loading, fetching }) => {
|
|
@@ -4253,42 +4275,42 @@ var DefaultTable = ({ table, loading, fetching }) => {
|
|
|
4253
4275
|
const showLoadingBar = fetching && coreRows.length > 0;
|
|
4254
4276
|
const resizeStyle = table.options.enableColumnResizing ? { width: table.getCenterTotalSize(), tableLayout: "fixed" } : void 0;
|
|
4255
4277
|
const tableElementRef = table.options.meta?.tableElementRef ?? null;
|
|
4256
|
-
(0,
|
|
4278
|
+
(0, import_react35.useEffect)(() => {
|
|
4257
4279
|
if (entry?.isIntersecting && infiniteScroll?.hasNextPage && !infiniteScroll.isFetchingNextPage) {
|
|
4258
4280
|
infiniteScroll.fetchNextPage();
|
|
4259
4281
|
}
|
|
4260
4282
|
}, [entry?.isIntersecting, infiniteScroll]);
|
|
4261
|
-
const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0,
|
|
4262
|
-
return /* @__PURE__ */ (0,
|
|
4283
|
+
const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("tr", { className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200", children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("td", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Skeleton, { className: "h-3 w-full" }) }, j)) }, `skeleton-${i}`)) : null;
|
|
4284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
4263
4285
|
"div",
|
|
4264
4286
|
{
|
|
4265
|
-
className: (0,
|
|
4287
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4266
4288
|
"relative mb-auto rounded-md border bg-white",
|
|
4267
|
-
coreRows.length === 0 ? (0,
|
|
4289
|
+
coreRows.length === 0 ? (0, import_tailwind_merge50.twJoin)("h-full min-h-0", loading ? "overflow-hidden" : "overflow-auto") : "max-h-full min-h-0 overflow-auto"
|
|
4268
4290
|
),
|
|
4269
4291
|
children: [
|
|
4270
|
-
showLoadingBar && /* @__PURE__ */ (0,
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4292
|
+
showLoadingBar && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(LoadingBar, { className: "sticky top-0 right-0 left-0 z-10 -mb-1 h-1 rounded-none" }),
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
4272
4294
|
"table",
|
|
4273
4295
|
{
|
|
4274
4296
|
ref: tableElementRef,
|
|
4275
4297
|
"data-ui": uiLoading,
|
|
4276
4298
|
style: resizeStyle,
|
|
4277
|
-
className: (0,
|
|
4299
|
+
className: (0, import_tailwind_merge50.twJoin)(
|
|
4278
4300
|
"relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
|
|
4279
4301
|
coreRows.length === 0 && !loading && "h-full",
|
|
4280
4302
|
resizeStyle && "overflow-clip"
|
|
4281
4303
|
),
|
|
4282
4304
|
children: [
|
|
4283
|
-
/* @__PURE__ */ (0,
|
|
4284
|
-
/* @__PURE__ */ (0,
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(TableHeader, { table, variant: "default", ...headerClassNames("default") }),
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
4285
4307
|
TableBody,
|
|
4286
4308
|
{
|
|
4287
4309
|
table,
|
|
4288
4310
|
...bodyClassNames("default"),
|
|
4289
4311
|
loading,
|
|
4290
|
-
afterRows: /* @__PURE__ */ (0,
|
|
4291
|
-
infiniteScroll?.hasNextPage && /* @__PURE__ */ (0,
|
|
4312
|
+
afterRows: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
|
|
4313
|
+
infiniteScroll?.hasNextPage && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("tr", { ref: sentinelRef, "aria-hidden": "true", style: { height: 0, border: "none", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("td", { colSpan: colCount, style: { height: 0, border: "none", padding: 0 } }) }),
|
|
4292
4314
|
skeletonRows
|
|
4293
4315
|
] })
|
|
4294
4316
|
}
|
|
@@ -4303,9 +4325,9 @@ var DefaultTable = ({ table, loading, fetching }) => {
|
|
|
4303
4325
|
|
|
4304
4326
|
// src/core/table/VirtualizedTable.tsx
|
|
4305
4327
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
4306
|
-
var
|
|
4307
|
-
var
|
|
4308
|
-
var
|
|
4328
|
+
var import_react36 = require("react");
|
|
4329
|
+
var import_tailwind_merge51 = require("tailwind-merge");
|
|
4330
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
4309
4331
|
var DEFAULT_ROW_HEIGHT = 37;
|
|
4310
4332
|
var DEFAULT_OVERSCAN = 5;
|
|
4311
4333
|
var VirtualizedTable = ({
|
|
@@ -4317,7 +4339,7 @@ var VirtualizedTable = ({
|
|
|
4317
4339
|
}) => {
|
|
4318
4340
|
const loading = loadingProp ?? table.options.meta?.isLoading;
|
|
4319
4341
|
const fetching = loadingProp ?? table.options.meta?.isFetching;
|
|
4320
|
-
const scrollRef = (0,
|
|
4342
|
+
const scrollRef = (0, import_react36.useRef)(null);
|
|
4321
4343
|
const isSubtable = variant === "subtable";
|
|
4322
4344
|
const infiniteScroll = table.options.meta?.infiniteScroll;
|
|
4323
4345
|
const colCount = table.getVisibleLeafColumns().length;
|
|
@@ -4334,55 +4356,55 @@ var VirtualizedTable = ({
|
|
|
4334
4356
|
overscan
|
|
4335
4357
|
});
|
|
4336
4358
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
4337
|
-
(0,
|
|
4359
|
+
(0, import_react36.useEffect)(() => {
|
|
4338
4360
|
const lastItem = virtualRows.at(-1);
|
|
4339
4361
|
if (!lastItem) return;
|
|
4340
4362
|
if (lastItem.index >= rows.length - 1 && infiniteScroll?.hasNextPage && !infiniteScroll.isFetchingNextPage) {
|
|
4341
4363
|
infiniteScroll.fetchNextPage();
|
|
4342
4364
|
}
|
|
4343
4365
|
}, [virtualRows, rows.length, infiniteScroll]);
|
|
4344
|
-
const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0,
|
|
4366
|
+
const skeletonRows = infiniteScroll?.hasNextPage ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tr", { className: "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-gray-200", children: Array.from({ length: colCount }).map((_2, j) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { className: "p-2", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Skeleton, { className: "h-3 w-full" }) }, j)) }, `skeleton-${i}`)) : null;
|
|
4345
4367
|
const paddingTop = virtualRows.length > 0 ? virtualRows[0]?.start ?? 0 : 0;
|
|
4346
4368
|
const paddingBottom = virtualRows.length > 0 ? rowVirtualizer.getTotalSize() - (virtualRows.at(-1)?.end ?? 0) : 0;
|
|
4347
4369
|
const { rootClassName: bodyRootClassName, ...bodyRowCellClassNames } = bodyClassNames(variant);
|
|
4348
|
-
return /* @__PURE__ */ (0,
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4349
4371
|
"div",
|
|
4350
4372
|
{
|
|
4351
4373
|
ref: scrollRef,
|
|
4352
|
-
className: (0,
|
|
4374
|
+
className: (0, import_tailwind_merge51.twJoin)(
|
|
4353
4375
|
"relative mb-auto",
|
|
4354
|
-
isSubtable ? "min-w-full" : (0,
|
|
4376
|
+
isSubtable ? "min-w-full" : (0, import_tailwind_merge51.twJoin)(
|
|
4355
4377
|
"rounded-md border bg-white",
|
|
4356
|
-
coreRows.length === 0 ? (0,
|
|
4378
|
+
coreRows.length === 0 ? (0, import_tailwind_merge51.twJoin)("h-full", loading ? "overflow-hidden" : "overflow-auto overscroll-none") : "max-h-full min-h-0 overflow-auto overscroll-none"
|
|
4357
4379
|
)
|
|
4358
4380
|
),
|
|
4359
4381
|
children: [
|
|
4360
|
-
showLoadingBar && /* @__PURE__ */ (0,
|
|
4382
|
+
showLoadingBar && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
4361
4383
|
LoadingBar,
|
|
4362
4384
|
{
|
|
4363
|
-
className: (0,
|
|
4385
|
+
className: (0, import_tailwind_merge51.twJoin)("top-0 right-0 left-0 z-10 h-1 rounded-none", isSubtable ? "absolute" : "sticky -mb-1")
|
|
4364
4386
|
}
|
|
4365
4387
|
),
|
|
4366
|
-
/* @__PURE__ */ (0,
|
|
4388
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
4367
4389
|
"table",
|
|
4368
4390
|
{
|
|
4369
4391
|
ref: tableElementRef,
|
|
4370
4392
|
"data-ui": uiLoading,
|
|
4371
4393
|
style: resizeStyle,
|
|
4372
|
-
className: (0,
|
|
4394
|
+
className: (0, import_tailwind_merge51.twJoin)(
|
|
4373
4395
|
"relative min-w-full border-separate border-spacing-0 data-[ui=loading]:pointer-events-none",
|
|
4374
4396
|
!isSubtable && coreRows.length === 0 && !loading && "h-full",
|
|
4375
4397
|
resizeStyle && "overflow-clip"
|
|
4376
4398
|
),
|
|
4377
4399
|
children: [
|
|
4378
|
-
/* @__PURE__ */ (0,
|
|
4379
|
-
rows.length === 0 ? /* @__PURE__ */ (0,
|
|
4380
|
-
paddingTop > 0 && /* @__PURE__ */ (0,
|
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TableHeader, { table, variant, ...headerClassNames(variant) }),
|
|
4401
|
+
rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TableBody, { table, ...bodyClassNames(variant), loading }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("tbody", { className: bodyRootClassName, children: [
|
|
4402
|
+
paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { colSpan: colCount, style: { height: paddingTop, padding: 0, border: "none" } }) }),
|
|
4381
4403
|
virtualRows.map((virtualRow) => {
|
|
4382
4404
|
const row = rows[virtualRow.index];
|
|
4383
|
-
return /* @__PURE__ */ (0,
|
|
4405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(TableRow, { table, row, ...bodyRowCellClassNames }, row.id);
|
|
4384
4406
|
}),
|
|
4385
|
-
paddingBottom > 0 && /* @__PURE__ */ (0,
|
|
4407
|
+
paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("td", { colSpan: colCount, style: { height: paddingBottom, padding: 0, border: "none" } }) }),
|
|
4386
4408
|
skeletonRows
|
|
4387
4409
|
] })
|
|
4388
4410
|
]
|
|
@@ -4395,7 +4417,7 @@ var VirtualizedTable = ({
|
|
|
4395
4417
|
|
|
4396
4418
|
// src/core/table/useTable.ts
|
|
4397
4419
|
var import_react_table2 = require("@tanstack/react-table");
|
|
4398
|
-
var
|
|
4420
|
+
var import_react37 = require("react");
|
|
4399
4421
|
var import_use_effect_event = require("use-effect-event");
|
|
4400
4422
|
var useTable = ({ tableRef, ...options }) => {
|
|
4401
4423
|
const enableSorting = !!options.state?.sorting && !!options.onSortingChange;
|
|
@@ -4427,7 +4449,7 @@ var useTable = ({ tableRef, ...options }) => {
|
|
|
4427
4449
|
const syncTableRef = (0, import_use_effect_event.useEffectEvent)(() => {
|
|
4428
4450
|
tableRef?.(table);
|
|
4429
4451
|
});
|
|
4430
|
-
(0,
|
|
4452
|
+
(0, import_react37.useLayoutEffect)(() => {
|
|
4431
4453
|
syncTableRef();
|
|
4432
4454
|
}, [table]);
|
|
4433
4455
|
return table;
|
|
@@ -4435,18 +4457,18 @@ var useTable = ({ tableRef, ...options }) => {
|
|
|
4435
4457
|
|
|
4436
4458
|
// src/core/tab-group/TabGroup.tsx
|
|
4437
4459
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
4438
|
-
var
|
|
4439
|
-
var
|
|
4440
|
-
var
|
|
4441
|
-
var
|
|
4460
|
+
var import_react38 = require("motion/react");
|
|
4461
|
+
var import_react39 = require("react");
|
|
4462
|
+
var import_tailwind_merge52 = require("tailwind-merge");
|
|
4463
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
4442
4464
|
var TabGroup = ({
|
|
4443
4465
|
tabs,
|
|
4444
4466
|
currentTab,
|
|
4445
4467
|
setCurrentTab,
|
|
4446
4468
|
size = "md"
|
|
4447
4469
|
}) => {
|
|
4448
|
-
const layoutId = (0,
|
|
4449
|
-
return /* @__PURE__ */ (0,
|
|
4470
|
+
const layoutId = (0, import_react39.useId)();
|
|
4471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4450
4472
|
import_react_toggle_group.ToggleGroup,
|
|
4451
4473
|
{
|
|
4452
4474
|
type: "single",
|
|
@@ -4454,17 +4476,17 @@ var TabGroup = ({
|
|
|
4454
4476
|
onValueChange: (value) => {
|
|
4455
4477
|
setCurrentTab(value);
|
|
4456
4478
|
},
|
|
4457
|
-
className: (0,
|
|
4479
|
+
className: (0, import_tailwind_merge52.twJoin)(
|
|
4458
4480
|
"flex w-full justify-between gap-1 rounded-lg border border-surface-neutral bg-surface-light",
|
|
4459
4481
|
size === "sm" ? "p-1" : "p-0.5"
|
|
4460
4482
|
),
|
|
4461
|
-
children: tabs.map(({ id, label, disabled }, index) => /* @__PURE__ */ (0,
|
|
4462
|
-
/* @__PURE__ */ (0,
|
|
4483
|
+
children: tabs.map(({ id, label, disabled }, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react39.Fragment, { children: [
|
|
4484
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
|
|
4463
4485
|
import_react_toggle_group.ToggleGroupItem,
|
|
4464
4486
|
{
|
|
4465
4487
|
value: id,
|
|
4466
4488
|
disabled,
|
|
4467
|
-
className: (0,
|
|
4489
|
+
className: (0, import_tailwind_merge52.twJoin)(
|
|
4468
4490
|
"relative flex w-full items-center justify-center rounded-md border transition-colors",
|
|
4469
4491
|
disabled && "cursor-not-allowed opacity-50",
|
|
4470
4492
|
!disabled && "focus-visible:border-indigo-700 focus-visible:outline-none",
|
|
@@ -4474,19 +4496,19 @@ var TabGroup = ({
|
|
|
4474
4496
|
size === "sm" ? "px-1.5 py-1" : "px-2 py-1"
|
|
4475
4497
|
),
|
|
4476
4498
|
children: [
|
|
4477
|
-
id === currentTab && !disabled && /* @__PURE__ */ (0,
|
|
4478
|
-
|
|
4499
|
+
id === currentTab && !disabled && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
4500
|
+
import_react38.motion.span,
|
|
4479
4501
|
{
|
|
4480
4502
|
layoutId,
|
|
4481
4503
|
className: "absolute inset-0 rounded-md bg-button-white ring-2 ring-indigo-100",
|
|
4482
4504
|
transition: { type: "spring", stiffness: 500, damping: 40 }
|
|
4483
4505
|
}
|
|
4484
4506
|
),
|
|
4485
|
-
/* @__PURE__ */ (0,
|
|
4507
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "relative z-1", children: label })
|
|
4486
4508
|
]
|
|
4487
4509
|
}
|
|
4488
4510
|
),
|
|
4489
|
-
index !== tabs.length - 1 && /* @__PURE__ */ (0,
|
|
4511
|
+
index !== tabs.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "z-2 my-1 flex w-px bg-gray-300" })
|
|
4490
4512
|
] }, id))
|
|
4491
4513
|
}
|
|
4492
4514
|
);
|
|
@@ -4494,14 +4516,14 @@ var TabGroup = ({
|
|
|
4494
4516
|
|
|
4495
4517
|
// src/core/tabs/Tabs.tsx
|
|
4496
4518
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
4497
|
-
var
|
|
4498
|
-
var
|
|
4519
|
+
var import_react41 = require("react");
|
|
4520
|
+
var import_tailwind_merge54 = require("tailwind-merge");
|
|
4499
4521
|
|
|
4500
4522
|
// src/core/tabs/Trigger.tsx
|
|
4501
4523
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
4502
|
-
var
|
|
4503
|
-
var
|
|
4504
|
-
var
|
|
4524
|
+
var import_react40 = require("motion/react");
|
|
4525
|
+
var import_tailwind_merge53 = require("tailwind-merge");
|
|
4526
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
4505
4527
|
var TabsTrigger = ({
|
|
4506
4528
|
id,
|
|
4507
4529
|
label,
|
|
@@ -4511,10 +4533,10 @@ var TabsTrigger = ({
|
|
|
4511
4533
|
className,
|
|
4512
4534
|
isActive,
|
|
4513
4535
|
layoutId
|
|
4514
|
-
}) => /* @__PURE__ */ (0,
|
|
4536
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
4515
4537
|
import_react_tabs.Trigger,
|
|
4516
4538
|
{
|
|
4517
|
-
className: (0,
|
|
4539
|
+
className: (0, import_tailwind_merge53.twMerge)(
|
|
4518
4540
|
"relative h-full border-b-2 border-transparent px-1 py-1 font-medium whitespace-nowrap transition-colors duration-150 data-[state='active']:text-indigo-700 data-[state='inactive']:text-muted data-[state='inactive']:hover:border-surface-neutral data-[state='inactive']:hover:text-neutral",
|
|
4519
4541
|
className
|
|
4520
4542
|
),
|
|
@@ -4523,9 +4545,9 @@ var TabsTrigger = ({
|
|
|
4523
4545
|
"fs-id": fsId,
|
|
4524
4546
|
children: [
|
|
4525
4547
|
label,
|
|
4526
|
-
extra && /* @__PURE__ */ (0,
|
|
4527
|
-
isActive && /* @__PURE__ */ (0,
|
|
4528
|
-
|
|
4548
|
+
extra && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { children: extra }),
|
|
4549
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
4550
|
+
import_react40.motion.span,
|
|
4529
4551
|
{
|
|
4530
4552
|
layoutId,
|
|
4531
4553
|
className: "absolute right-0 -bottom-0.5 left-0 h-0.5 bg-current",
|
|
@@ -4537,7 +4559,7 @@ var TabsTrigger = ({
|
|
|
4537
4559
|
);
|
|
4538
4560
|
|
|
4539
4561
|
// src/core/tabs/Tabs.tsx
|
|
4540
|
-
var
|
|
4562
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
4541
4563
|
var [Provider2, useContext6] = createContextHelper();
|
|
4542
4564
|
var Tabs = ({
|
|
4543
4565
|
tabs,
|
|
@@ -4550,10 +4572,10 @@ var Tabs = ({
|
|
|
4550
4572
|
children,
|
|
4551
4573
|
extraNode
|
|
4552
4574
|
}) => {
|
|
4553
|
-
const layoutId = (0,
|
|
4554
|
-
return /* @__PURE__ */ (0,
|
|
4555
|
-
/* @__PURE__ */ (0,
|
|
4556
|
-
/* @__PURE__ */ (0,
|
|
4575
|
+
const layoutId = (0, import_react41.useId)();
|
|
4576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Provider2, { currentTab, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_react_tabs2.Root, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children: [
|
|
4577
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_tailwind_merge54.twJoin)("flex gap-4", tabsListContainerClassName), children: [
|
|
4578
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_tabs2.List, { className: (0, import_tailwind_merge54.twJoin)("flex space-x-4 overflow-x-auto", tabsListClassName), children: tabs.map(({ id, label, disabled, fsId }) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
4557
4579
|
TabsTrigger,
|
|
4558
4580
|
{
|
|
4559
4581
|
id,
|
|
@@ -4572,7 +4594,7 @@ var Tabs = ({
|
|
|
4572
4594
|
] }) });
|
|
4573
4595
|
};
|
|
4574
4596
|
var TabContent = ({ id, ...rest }) => {
|
|
4575
|
-
return /* @__PURE__ */ (0,
|
|
4597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_tabs2.Content, { value: id, ...rest });
|
|
4576
4598
|
};
|
|
4577
4599
|
var AlwaysMountedTabContent = ({
|
|
4578
4600
|
id,
|
|
@@ -4582,20 +4604,20 @@ var AlwaysMountedTabContent = ({
|
|
|
4582
4604
|
}) => {
|
|
4583
4605
|
const { currentTab } = useContext6();
|
|
4584
4606
|
const visible = id === currentTab;
|
|
4585
|
-
return /* @__PURE__ */ (0,
|
|
4607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: (0, import_tailwind_merge54.twJoin)(visible ? visibleClassName : "hidden", className), children });
|
|
4586
4608
|
};
|
|
4587
4609
|
Tabs.TabContent = TabContent;
|
|
4588
4610
|
Tabs.AlwaysMountedTabContent = AlwaysMountedTabContent;
|
|
4589
4611
|
|
|
4590
4612
|
// src/core/tabs/ScrollTabsLayout.tsx
|
|
4591
|
-
var
|
|
4592
|
-
var
|
|
4593
|
-
var
|
|
4613
|
+
var import_react42 = require("react");
|
|
4614
|
+
var import_tailwind_merge55 = require("tailwind-merge");
|
|
4615
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
4594
4616
|
var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
|
|
4595
|
-
const [selectedTabName, setSelectedTabName] = (0,
|
|
4596
|
-
const scrollContainerRef = (0,
|
|
4597
|
-
const tabRefs = (0,
|
|
4598
|
-
const handleSelectTab = (0,
|
|
4617
|
+
const [selectedTabName, setSelectedTabName] = (0, import_react42.useState)(tabs[0].tabName);
|
|
4618
|
+
const scrollContainerRef = (0, import_react42.useRef)(null);
|
|
4619
|
+
const tabRefs = (0, import_react42.useRef)({});
|
|
4620
|
+
const handleSelectTab = (0, import_react42.useCallback)(
|
|
4599
4621
|
(tabId) => {
|
|
4600
4622
|
scrollContainerRef.current?.scrollTo({
|
|
4601
4623
|
top: tabRefs.current[tabId].offsetTop,
|
|
@@ -4606,7 +4628,7 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
|
|
|
4606
4628
|
},
|
|
4607
4629
|
[onSelectTab]
|
|
4608
4630
|
);
|
|
4609
|
-
(0,
|
|
4631
|
+
(0, import_react42.useEffect)(() => {
|
|
4610
4632
|
const scrollContainer = scrollContainerRef.current;
|
|
4611
4633
|
const handleScroll = (e) => {
|
|
4612
4634
|
Object.entries(tabRefs.current).forEach(([tabName, tabRef]) => {
|
|
@@ -4621,8 +4643,8 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
|
|
|
4621
4643
|
scrollContainer?.removeEventListener("scroll", handleScroll);
|
|
4622
4644
|
};
|
|
4623
4645
|
});
|
|
4624
|
-
return /* @__PURE__ */ (0,
|
|
4625
|
-
/* @__PURE__ */ (0,
|
|
4646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
|
|
4647
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
4626
4648
|
Tabs,
|
|
4627
4649
|
{
|
|
4628
4650
|
currentTab: selectedTabName,
|
|
@@ -4630,32 +4652,32 @@ var ScrollTabsLayout = ({ tabs, onSelectTab, sectionClassName }) => {
|
|
|
4630
4652
|
tabs: tabs.map((tab) => ({ id: tab.tabName, label: tab.tabName }))
|
|
4631
4653
|
}
|
|
4632
4654
|
),
|
|
4633
|
-
/* @__PURE__ */ (0,
|
|
4634
|
-
/* @__PURE__ */ (0,
|
|
4635
|
-
tabs.map((tab) => /* @__PURE__ */ (0,
|
|
4655
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("hr", {}),
|
|
4656
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { ref: scrollContainerRef, className: "relative h-screen overflow-y-auto", children: [
|
|
4657
|
+
tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
4636
4658
|
"div",
|
|
4637
4659
|
{
|
|
4638
4660
|
ref: (el) => el ? tabRefs.current[tab.tabName] = el : void 0,
|
|
4639
|
-
className: (0,
|
|
4661
|
+
className: (0, import_tailwind_merge55.twJoin)("first:pt-4", sectionClassName),
|
|
4640
4662
|
children: tab.content
|
|
4641
4663
|
},
|
|
4642
4664
|
tab.tabName
|
|
4643
4665
|
)),
|
|
4644
|
-
/* @__PURE__ */ (0,
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "h-screen" })
|
|
4645
4667
|
] })
|
|
4646
4668
|
] });
|
|
4647
4669
|
};
|
|
4648
4670
|
|
|
4649
4671
|
// src/core/tabs/ComposableTabs.tsx
|
|
4650
4672
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
4651
|
-
var
|
|
4652
|
-
var
|
|
4653
|
-
var
|
|
4673
|
+
var import_react43 = require("react");
|
|
4674
|
+
var import_tailwind_merge56 = require("tailwind-merge");
|
|
4675
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
4654
4676
|
var [TabsProvider, useTabsContext] = createContextHelper();
|
|
4655
4677
|
var ComposableTabsList = ({ className, containerClassName, extraNode }) => {
|
|
4656
4678
|
const { tabs, currentTab, layoutId } = useTabsContext();
|
|
4657
|
-
return /* @__PURE__ */ (0,
|
|
4658
|
-
/* @__PURE__ */ (0,
|
|
4679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: (0, import_tailwind_merge56.twJoin)("flex gap-4", containerClassName), children: [
|
|
4680
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_tabs3.List, { className: (0, import_tailwind_merge56.twJoin)("flex space-x-4 overflow-x-auto", className), children: tabs.map(({ id, label, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
4659
4681
|
TabsTrigger,
|
|
4660
4682
|
{
|
|
4661
4683
|
id,
|
|
@@ -4670,7 +4692,7 @@ var ComposableTabsList = ({ className, containerClassName, extraNode }) => {
|
|
|
4670
4692
|
] });
|
|
4671
4693
|
};
|
|
4672
4694
|
var ComposableTabContent = ({ id, ...rest }) => {
|
|
4673
|
-
return /* @__PURE__ */ (0,
|
|
4695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_tabs3.Content, { value: id, ...rest });
|
|
4674
4696
|
};
|
|
4675
4697
|
var ComposableAlwaysMountedTabContent = ({
|
|
4676
4698
|
id,
|
|
@@ -4680,7 +4702,7 @@ var ComposableAlwaysMountedTabContent = ({
|
|
|
4680
4702
|
}) => {
|
|
4681
4703
|
const { currentTab } = useTabsContext();
|
|
4682
4704
|
const visible = id === currentTab;
|
|
4683
|
-
return /* @__PURE__ */ (0,
|
|
4705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: (0, import_tailwind_merge56.twJoin)(visible ? visibleClassName : "hidden", className), children });
|
|
4684
4706
|
};
|
|
4685
4707
|
var ComposableTabsRoot = ({
|
|
4686
4708
|
tabs,
|
|
@@ -4689,8 +4711,8 @@ var ComposableTabsRoot = ({
|
|
|
4689
4711
|
className,
|
|
4690
4712
|
children
|
|
4691
4713
|
}) => {
|
|
4692
|
-
const layoutId = (0,
|
|
4693
|
-
return /* @__PURE__ */ (0,
|
|
4714
|
+
const layoutId = (0, import_react43.useId)();
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(TabsProvider, { tabs, currentTab, layoutId, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_react_tabs3.Root, { className, value: currentTab, onValueChange: (id) => setCurrentTab(id), children }) });
|
|
4694
4716
|
};
|
|
4695
4717
|
var ComposableTabs = {
|
|
4696
4718
|
Root: ComposableTabsRoot,
|
|
@@ -4700,33 +4722,33 @@ var ComposableTabs = {
|
|
|
4700
4722
|
};
|
|
4701
4723
|
|
|
4702
4724
|
// src/core/tag/Tag.tsx
|
|
4703
|
-
var
|
|
4725
|
+
var import_free_solid_svg_icons21 = require("@fortawesome/free-solid-svg-icons");
|
|
4704
4726
|
var React14 = __toESM(require("react"), 1);
|
|
4705
|
-
var
|
|
4706
|
-
var TagLabel = ({ children, removable, onRemove, intent = "default", ...rest }, ref) => /* @__PURE__ */ (0,
|
|
4727
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
4728
|
+
var TagLabel = ({ children, removable, onRemove, intent = "default", ...rest }, ref) => /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Label, { ...rest, ref, intent, children: [
|
|
4707
4729
|
children,
|
|
4708
|
-
removable && /* @__PURE__ */ (0,
|
|
4730
|
+
removable && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
4709
4731
|
"button",
|
|
4710
4732
|
{
|
|
4711
4733
|
className: "ml-1 inline-flex h-xs items-center px-1 text-muted hover:text-neutral focus:outline-hidden",
|
|
4712
4734
|
onClick: onRemove,
|
|
4713
|
-
children: /* @__PURE__ */ (0,
|
|
4735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { icon: import_free_solid_svg_icons21.faXmark })
|
|
4714
4736
|
}
|
|
4715
4737
|
)
|
|
4716
4738
|
] });
|
|
4717
4739
|
var TagImpl = React14.forwardRef(TagLabel);
|
|
4718
4740
|
var Tag = ({ tooltip, ...rest }) => {
|
|
4719
4741
|
if (!tooltip) {
|
|
4720
|
-
return /* @__PURE__ */ (0,
|
|
4742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TagImpl, { ...rest });
|
|
4721
4743
|
}
|
|
4722
|
-
return /* @__PURE__ */ (0,
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Tooltip, { trigger: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TagImpl, { ...rest }), content: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "text-sm", children: tooltip }) });
|
|
4723
4745
|
};
|
|
4724
4746
|
|
|
4725
4747
|
// src/core/utils/useIsHovered.ts
|
|
4726
|
-
var
|
|
4748
|
+
var import_react44 = require("react");
|
|
4727
4749
|
var useIsHovered = (ref) => {
|
|
4728
|
-
const [isHovered, setIsHovered] = (0,
|
|
4729
|
-
(0,
|
|
4750
|
+
const [isHovered, setIsHovered] = (0, import_react44.useState)(false);
|
|
4751
|
+
(0, import_react44.useEffect)(() => {
|
|
4730
4752
|
const handleMouseMove = () => {
|
|
4731
4753
|
if (ref.current?.matches(":hover")) {
|
|
4732
4754
|
setIsHovered(true);
|
|
@@ -4808,11 +4830,14 @@ var useIsHovered = (ref) => {
|
|
|
4808
4830
|
Modal,
|
|
4809
4831
|
MultiSelect,
|
|
4810
4832
|
OverflowTooltip,
|
|
4833
|
+
PageContainer,
|
|
4811
4834
|
PercentInput,
|
|
4812
4835
|
PhoneNumber,
|
|
4813
4836
|
Popover,
|
|
4837
|
+
RESPONSIVE_PADDING,
|
|
4814
4838
|
RadioButtonGroup,
|
|
4815
4839
|
RadioButtonItem,
|
|
4840
|
+
ScreenHeightPageContainer,
|
|
4816
4841
|
ScrollTabsLayout,
|
|
4817
4842
|
Select,
|
|
4818
4843
|
SelectListItem,
|