@rufous/ui 0.1.83 → 0.1.85
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/main.cjs +414 -92
- package/dist/main.css +266 -3
- package/dist/main.d.cts +62 -3
- package/dist/main.d.ts +62 -3
- package/dist/main.js +737 -418
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -28650,6 +28650,7 @@ __export(main_exports, {
|
|
|
28650
28650
|
BaseDialog: () => BaseDialog_default,
|
|
28651
28651
|
Box: () => Box,
|
|
28652
28652
|
Breadcrumbs: () => Breadcrumbs,
|
|
28653
|
+
CameraIcon: () => cameraIcon_default,
|
|
28653
28654
|
CancelButton: () => cancelButton_default,
|
|
28654
28655
|
Card: () => Card,
|
|
28655
28656
|
CardActions: () => CardActions,
|
|
@@ -28684,6 +28685,7 @@ __export(main_exports, {
|
|
|
28684
28685
|
Grow: () => Grow,
|
|
28685
28686
|
HelpOutlinedIcon: () => helpOutlinedIcon_default,
|
|
28686
28687
|
HierarchyIcon: () => hierarchyIcon_default,
|
|
28688
|
+
ImageField: () => ImageField,
|
|
28687
28689
|
InactiveGroupIcon: () => inactiveGroupIcon_default,
|
|
28688
28690
|
IndustryIcon: () => industryIcon_default,
|
|
28689
28691
|
InvoiceIcon: () => invoiceIcon_default,
|
|
@@ -28747,6 +28749,7 @@ __export(main_exports, {
|
|
|
28747
28749
|
SuspendUserIcon: () => suspendUserIcon_default,
|
|
28748
28750
|
Switch: () => Switch,
|
|
28749
28751
|
Tab: () => Tab,
|
|
28752
|
+
TabPanel: () => TabPanel,
|
|
28750
28753
|
Tabs: () => Tabs,
|
|
28751
28754
|
TechnicalSkillsIcon: () => technicalSkillsIcon_default,
|
|
28752
28755
|
TextField: () => TextField,
|
|
@@ -29829,8 +29832,23 @@ var React56 = __toESM(require("react"), 1);
|
|
|
29829
29832
|
var QualificationsIcon = ({ color: color2 = "#3a3a3a", ...props }) => /* @__PURE__ */ React56.createElement("svg", { width: "24", height: "17", viewBox: "0 0 24 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React56.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.096 0.920005L1.422 5.25601C1.29964 5.31928 1.18771 5.40089 1.09003 5.49801C0.982986 5.61801 0.923828 5.7732 0.923828 5.934C0.923828 6.09481 0.982986 6.25 1.09003 6.37001C1.18134 6.47434 1.29472 6.55701 1.422 6.61201L5.35498 8.29801V12.829C5.35246 12.8915 5.36648 12.9535 5.39563 13.0088C5.42478 13.0641 5.46804 13.1108 5.521 13.144L11.909 16.23C11.9351 16.2419 11.9634 16.248 11.992 16.248C12.0206 16.248 12.049 16.2419 12.075 16.23L18.482 13.144C18.5377 13.1137 18.5831 13.0677 18.6127 13.0116C18.6422 12.9556 18.6545 12.892 18.648 12.829V8.29901L21.842 7.04001C21.6965 8.80938 21.6882 10.5874 21.817 12.358C21.817 12.843 22.217 12.843 22.217 12.358C22.4317 10.5206 22.4729 8.66711 22.34 6.82201C22.5425 6.68685 22.7337 6.5357 22.912 6.37001C23.019 6.25 23.0782 6.09481 23.0782 5.934C23.0782 5.7732 23.019 5.61801 22.912 5.49801C22.8142 5.40101 22.7023 5.31941 22.58 5.25601L12.905 0.919005C12.3228 0.692932 11.6771 0.692932 11.095 0.919005L11.096 0.920005ZM12.696 1.86701L21.785 5.94101C21.837 5.96401 21.837 5.98601 21.872 6.00901C21.838 6.03201 21.838 6.05501 21.785 6.07701L17.485 8.01201C17.451 8.01201 17.398 8.01201 17.385 8.05701L12.702 10.151C12.253 10.3102 11.763 10.3102 11.314 10.151L6.62201 8.03401C6.58701 8.03401 6.56998 8.01101 6.55298 8.01101L2.22198 6.07601C2.16898 6.05301 2.16901 6.03101 2.13501 6.00801C2.16901 5.98501 2.16898 5.962 2.22198 5.962L11.31 1.86201C11.5331 1.78448 11.7678 1.74624 12.004 1.74901C12.239 1.7475 12.4725 1.78709 12.694 1.866L12.696 1.86701ZM17.665 8.657V12.482L12.002 15.272L6.33899 12.728V8.90301L11.156 10.926C11.4239 11.0384 11.7115 11.0963 12.002 11.0963C12.2925 11.0963 12.5801 11.0384 12.848 10.926L17.248 8.95501L17.665 8.657Z", fill: color2, stroke: color2, strokeWidth: "0.2" }));
|
|
29830
29833
|
var qualificationsIcon_default = QualificationsIcon;
|
|
29831
29834
|
|
|
29832
|
-
// lib/
|
|
29835
|
+
// lib/icons/cameraIcon.tsx
|
|
29833
29836
|
var React57 = __toESM(require("react"), 1);
|
|
29837
|
+
var CameraIcon = ({ color: color2 = "#ffffff", ...props }) => /* @__PURE__ */ React57.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React57.createElement(
|
|
29838
|
+
"path",
|
|
29839
|
+
{
|
|
29840
|
+
d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z",
|
|
29841
|
+
stroke: color2,
|
|
29842
|
+
strokeWidth: "2",
|
|
29843
|
+
strokeLinecap: "round",
|
|
29844
|
+
strokeLinejoin: "round",
|
|
29845
|
+
fill: "none"
|
|
29846
|
+
}
|
|
29847
|
+
), /* @__PURE__ */ React57.createElement("circle", { cx: "12", cy: "13", r: "4", stroke: color2, strokeWidth: "2", fill: "none" }));
|
|
29848
|
+
var cameraIcon_default = CameraIcon;
|
|
29849
|
+
|
|
29850
|
+
// lib/Buttons/addButton.tsx
|
|
29851
|
+
var React58 = __toESM(require("react"), 1);
|
|
29834
29852
|
|
|
29835
29853
|
// lib/utils/sx.ts
|
|
29836
29854
|
var import_react13 = require("react");
|
|
@@ -29879,15 +29897,15 @@ function useSx(sx) {
|
|
|
29879
29897
|
// lib/Buttons/addButton.tsx
|
|
29880
29898
|
var AddButton = ({ children, sx, className, ...props }) => {
|
|
29881
29899
|
const sxClass = useSx(sx);
|
|
29882
|
-
return /* @__PURE__ */
|
|
29900
|
+
return /* @__PURE__ */ React58.createElement("button", { className: ["btn add-btn", sxClass, className].filter(Boolean).join(" "), ...props }, "+ ", children);
|
|
29883
29901
|
};
|
|
29884
29902
|
var addButton_default = AddButton;
|
|
29885
29903
|
|
|
29886
29904
|
// lib/Buttons/submitButton.tsx
|
|
29887
|
-
var
|
|
29905
|
+
var React60 = __toESM(require("react"), 1);
|
|
29888
29906
|
|
|
29889
29907
|
// lib/Progress/circularProgress.tsx
|
|
29890
|
-
var
|
|
29908
|
+
var React59 = __toESM(require("react"), 1);
|
|
29891
29909
|
var CircularProgress = ({
|
|
29892
29910
|
size: size3 = 50,
|
|
29893
29911
|
color: color2 = "#a81c08",
|
|
@@ -29896,14 +29914,14 @@ var CircularProgress = ({
|
|
|
29896
29914
|
...props
|
|
29897
29915
|
}) => {
|
|
29898
29916
|
const sxClass = useSx(sx);
|
|
29899
|
-
return /* @__PURE__ */
|
|
29917
|
+
return /* @__PURE__ */ React59.createElement(
|
|
29900
29918
|
"div",
|
|
29901
29919
|
{
|
|
29902
29920
|
className: ["rufous-loader", sxClass, className].filter(Boolean).join(" "),
|
|
29903
29921
|
style: { width: size3, height: size3 },
|
|
29904
29922
|
...props
|
|
29905
29923
|
},
|
|
29906
|
-
/* @__PURE__ */
|
|
29924
|
+
/* @__PURE__ */ React59.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React59.createElement(
|
|
29907
29925
|
"circle",
|
|
29908
29926
|
{
|
|
29909
29927
|
className: "rufous-loader-circle",
|
|
@@ -29925,7 +29943,7 @@ var CircularProgressIcon = ({
|
|
|
29925
29943
|
className
|
|
29926
29944
|
}) => {
|
|
29927
29945
|
const sxClass = useSx(sx);
|
|
29928
|
-
return /* @__PURE__ */
|
|
29946
|
+
return /* @__PURE__ */ React59.createElement("div", { className: ["rufous-loader rufous-loader--with-icon", sxClass, className].filter(Boolean).join(" "), style: { width: size3, height: size3 } }, /* @__PURE__ */ React59.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React59.createElement(
|
|
29929
29947
|
"circle",
|
|
29930
29948
|
{
|
|
29931
29949
|
className: "rufous-loader-circle",
|
|
@@ -29934,7 +29952,7 @@ var CircularProgressIcon = ({
|
|
|
29934
29952
|
r: "45",
|
|
29935
29953
|
stroke: color2
|
|
29936
29954
|
}
|
|
29937
|
-
)), /* @__PURE__ */
|
|
29955
|
+
)), /* @__PURE__ */ React59.createElement("div", { className: "rufous-loader__icon-wrap" }, /* @__PURE__ */ React59.createElement("div", { className: spinIcon ? "rufous-loader__icon--spin-y" : void 0 }, icon)));
|
|
29938
29956
|
};
|
|
29939
29957
|
|
|
29940
29958
|
// lib/Buttons/submitButton.tsx
|
|
@@ -29950,8 +29968,8 @@ var SubmitButton = ({
|
|
|
29950
29968
|
...props
|
|
29951
29969
|
}) => {
|
|
29952
29970
|
const sxClass = useSx(sx);
|
|
29953
|
-
const [loading, setLoading] =
|
|
29954
|
-
const clickTimeout =
|
|
29971
|
+
const [loading, setLoading] = React60.useState(false);
|
|
29972
|
+
const clickTimeout = React60.useRef(null);
|
|
29955
29973
|
const handleClick = async (e) => {
|
|
29956
29974
|
const currentTarget = e.currentTarget;
|
|
29957
29975
|
if (loading) return;
|
|
@@ -29986,7 +30004,7 @@ var SubmitButton = ({
|
|
|
29986
30004
|
}
|
|
29987
30005
|
}
|
|
29988
30006
|
};
|
|
29989
|
-
return /* @__PURE__ */
|
|
30007
|
+
return /* @__PURE__ */ React60.createElement(
|
|
29990
30008
|
"button",
|
|
29991
30009
|
{
|
|
29992
30010
|
...props,
|
|
@@ -29996,29 +30014,29 @@ var SubmitButton = ({
|
|
|
29996
30014
|
onClick: handleClick,
|
|
29997
30015
|
onDoubleClick: handleDoubleClick
|
|
29998
30016
|
},
|
|
29999
|
-
/* @__PURE__ */
|
|
30017
|
+
/* @__PURE__ */ React60.createElement("span", { className: "btn-content" }, children, (loading || isLoading) && /* @__PURE__ */ React60.createElement("span", { className: "btn-loader" }, /* @__PURE__ */ React60.createElement(circularProgress_default, { size: 18, color: props.disabled || loading || isLoading ? "#00000042" : void 0 })))
|
|
30000
30018
|
);
|
|
30001
30019
|
};
|
|
30002
30020
|
var submitButton_default = SubmitButton;
|
|
30003
30021
|
|
|
30004
30022
|
// lib/Buttons/cancelButton.tsx
|
|
30005
|
-
var
|
|
30023
|
+
var React61 = __toESM(require("react"), 1);
|
|
30006
30024
|
var CancelButton = ({ children, sx, className, ...props }) => {
|
|
30007
30025
|
const sxClass = useSx(sx);
|
|
30008
|
-
return /* @__PURE__ */
|
|
30026
|
+
return /* @__PURE__ */ React61.createElement("button", { className: ["btn cancel-btn", sxClass, className].filter(Boolean).join(" "), ...props }, children);
|
|
30009
30027
|
};
|
|
30010
30028
|
var cancelButton_default = CancelButton;
|
|
30011
30029
|
|
|
30012
30030
|
// lib/Buttons/stdButton.tsx
|
|
30013
|
-
var
|
|
30031
|
+
var React62 = __toESM(require("react"), 1);
|
|
30014
30032
|
var StandardButton = ({ children, sx, className, ...props }) => {
|
|
30015
30033
|
const sxClass = useSx(sx);
|
|
30016
|
-
return /* @__PURE__ */
|
|
30034
|
+
return /* @__PURE__ */ React62.createElement("button", { className: ["btn standard-btn", sxClass, className].filter(Boolean).join(" "), ...props }, children);
|
|
30017
30035
|
};
|
|
30018
30036
|
var stdButton_default = StandardButton;
|
|
30019
30037
|
|
|
30020
30038
|
// lib/Dialogs/BaseDialog.tsx
|
|
30021
|
-
var
|
|
30039
|
+
var React63 = __toESM(require("react"), 1);
|
|
30022
30040
|
var import_react14 = require("react");
|
|
30023
30041
|
var import_lucide_react = require("lucide-react");
|
|
30024
30042
|
var BaseDialog = ({
|
|
@@ -30053,7 +30071,7 @@ var BaseDialog = ({
|
|
|
30053
30071
|
const sxClass = useSx(sx);
|
|
30054
30072
|
if (!open) return null;
|
|
30055
30073
|
const isButtonLoading = isSubmitting || loading;
|
|
30056
|
-
const renderButtons = () => /* @__PURE__ */
|
|
30074
|
+
const renderButtons = () => /* @__PURE__ */ React63.createElement("div", { className: "dialog-footer", style: { justifyContent: buttonAlign } }, showCancelButton && /* @__PURE__ */ React63.createElement(
|
|
30057
30075
|
"button",
|
|
30058
30076
|
{
|
|
30059
30077
|
className: "btn-cancel",
|
|
@@ -30061,7 +30079,7 @@ var BaseDialog = ({
|
|
|
30061
30079
|
disabled: isLoading || isButtonLoading
|
|
30062
30080
|
},
|
|
30063
30081
|
cancelText
|
|
30064
|
-
), onConfirm && /* @__PURE__ */
|
|
30082
|
+
), onConfirm && /* @__PURE__ */ React63.createElement(
|
|
30065
30083
|
"button",
|
|
30066
30084
|
{
|
|
30067
30085
|
className: "btn-confirm",
|
|
@@ -30073,10 +30091,10 @@ var BaseDialog = ({
|
|
|
30073
30091
|
setIsSubmitting(false);
|
|
30074
30092
|
}
|
|
30075
30093
|
},
|
|
30076
|
-
/* @__PURE__ */
|
|
30077
|
-
isButtonLoading && /* @__PURE__ */
|
|
30094
|
+
/* @__PURE__ */ React63.createElement("span", { style: { visibility: isButtonLoading ? "hidden" : "visible" } }, confirmText),
|
|
30095
|
+
isButtonLoading && /* @__PURE__ */ React63.createElement("span", { className: "spinner", style: { position: "absolute" } })
|
|
30078
30096
|
));
|
|
30079
|
-
return /* @__PURE__ */
|
|
30097
|
+
return /* @__PURE__ */ React63.createElement("div", { className: `dialog-overlay ${size3 === "fullScreen" ? "overlay-fullscreen" : ""}` }, /* @__PURE__ */ React63.createElement(
|
|
30080
30098
|
"div",
|
|
30081
30099
|
{
|
|
30082
30100
|
className: ["dialog-container", size3 ? `size-${size3}` : "", sxClass, className].filter(Boolean).join(" "),
|
|
@@ -30085,15 +30103,15 @@ var BaseDialog = ({
|
|
|
30085
30103
|
minHeight
|
|
30086
30104
|
}
|
|
30087
30105
|
},
|
|
30088
|
-
/* @__PURE__ */
|
|
30106
|
+
/* @__PURE__ */ React63.createElement("div", { className: "dialog-title" }, /* @__PURE__ */ React63.createElement("h2", null, formatTitle ? title?.charAt(0).toUpperCase() + title?.slice(1) : title), showCloseButton && /* @__PURE__ */ React63.createElement("button", { className: "btn-close", onClick: onClose }, /* @__PURE__ */ React63.createElement(
|
|
30089
30107
|
import_lucide_react.X,
|
|
30090
30108
|
{
|
|
30091
30109
|
size: 18,
|
|
30092
30110
|
color: themeConfig?.icon || "#666666"
|
|
30093
30111
|
}
|
|
30094
30112
|
))),
|
|
30095
|
-
/* @__PURE__ */
|
|
30096
|
-
/* @__PURE__ */
|
|
30113
|
+
/* @__PURE__ */ React63.createElement("div", { className: "dialog-divider" }),
|
|
30114
|
+
/* @__PURE__ */ React63.createElement(
|
|
30097
30115
|
"div",
|
|
30098
30116
|
{
|
|
30099
30117
|
className: "dialog-body",
|
|
@@ -30104,7 +30122,7 @@ var BaseDialog = ({
|
|
|
30104
30122
|
},
|
|
30105
30123
|
children
|
|
30106
30124
|
),
|
|
30107
|
-
/* @__PURE__ */
|
|
30125
|
+
/* @__PURE__ */ React63.createElement("div", { className: "dialog-divider" }),
|
|
30108
30126
|
customButtons || renderButtons()
|
|
30109
30127
|
));
|
|
30110
30128
|
};
|
|
@@ -30627,10 +30645,25 @@ var MONTHS = [
|
|
|
30627
30645
|
"November",
|
|
30628
30646
|
"December"
|
|
30629
30647
|
];
|
|
30648
|
+
var MONTHS_SHORT = [
|
|
30649
|
+
"Jan",
|
|
30650
|
+
"Feb",
|
|
30651
|
+
"Mar",
|
|
30652
|
+
"Apr",
|
|
30653
|
+
"May",
|
|
30654
|
+
"Jun",
|
|
30655
|
+
"Jul",
|
|
30656
|
+
"Aug",
|
|
30657
|
+
"Sep",
|
|
30658
|
+
"Oct",
|
|
30659
|
+
"Nov",
|
|
30660
|
+
"Dec"
|
|
30661
|
+
];
|
|
30630
30662
|
var formatDisplay = (d, fmt = "MM/DD/YYYY") => {
|
|
30631
30663
|
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
|
30632
30664
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
30633
30665
|
const yyyy = String(d.getFullYear());
|
|
30666
|
+
const day = d.getDate();
|
|
30634
30667
|
switch (fmt) {
|
|
30635
30668
|
case "DD/MM/YYYY":
|
|
30636
30669
|
return `${dd}/${mm}/${yyyy}`;
|
|
@@ -30642,13 +30675,49 @@ var formatDisplay = (d, fmt = "MM/DD/YYYY") => {
|
|
|
30642
30675
|
return `${mm}-${dd}-${yyyy}`;
|
|
30643
30676
|
case "YYYY/MM/DD":
|
|
30644
30677
|
return `${yyyy}/${mm}/${dd}`;
|
|
30678
|
+
case "DD MMM YYYY":
|
|
30679
|
+
return `${dd} ${MONTHS_SHORT[d.getMonth()]} ${yyyy}`;
|
|
30680
|
+
case "MMM DD, YYYY":
|
|
30681
|
+
return `${MONTHS_SHORT[d.getMonth()]} ${dd}, ${yyyy}`;
|
|
30682
|
+
case "DD MMMM YYYY":
|
|
30683
|
+
return `${dd} ${MONTHS[d.getMonth()]} ${yyyy}`;
|
|
30684
|
+
case "MMMM DD, YYYY":
|
|
30685
|
+
return `${MONTHS[d.getMonth()]} ${dd}, ${yyyy}`;
|
|
30645
30686
|
case "MM/DD/YYYY":
|
|
30646
30687
|
default:
|
|
30647
30688
|
return `${mm}/${dd}/${yyyy}`;
|
|
30648
30689
|
}
|
|
30649
30690
|
};
|
|
30650
30691
|
var formatTimeDisplay = (h, m, ampm) => `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")} ${ampm}`;
|
|
30692
|
+
var parseMonthName = (name) => {
|
|
30693
|
+
const lower = name.toLowerCase();
|
|
30694
|
+
let idx = MONTHS.findIndex((m) => m.toLowerCase() === lower);
|
|
30695
|
+
if (idx >= 0) return idx;
|
|
30696
|
+
idx = MONTHS_SHORT.findIndex((m) => m.toLowerCase() === lower);
|
|
30697
|
+
return idx;
|
|
30698
|
+
};
|
|
30651
30699
|
var parseDisplay = (str, fmt = "MM/DD/YYYY") => {
|
|
30700
|
+
if (fmt === "DD MMM YYYY" || fmt === "DD MMMM YYYY") {
|
|
30701
|
+
const parts2 = str.split(" ");
|
|
30702
|
+
if (parts2.length !== 3) return null;
|
|
30703
|
+
const dd2 = parseInt(parts2[0], 10);
|
|
30704
|
+
const mm2 = parseMonthName(parts2[1]);
|
|
30705
|
+
const yyyy2 = parseInt(parts2[2], 10);
|
|
30706
|
+
if (isNaN(dd2) || mm2 < 0 || isNaN(yyyy2) || yyyy2 < 1e3) return null;
|
|
30707
|
+
const d2 = new Date(yyyy2, mm2, dd2);
|
|
30708
|
+
return isNaN(d2.getTime()) ? null : d2;
|
|
30709
|
+
}
|
|
30710
|
+
if (fmt === "MMM DD, YYYY" || fmt === "MMMM DD, YYYY") {
|
|
30711
|
+
const cleaned = str.replace(",", "");
|
|
30712
|
+
const parts2 = cleaned.split(" ").filter(Boolean);
|
|
30713
|
+
if (parts2.length !== 3) return null;
|
|
30714
|
+
const mm2 = parseMonthName(parts2[0]);
|
|
30715
|
+
const dd2 = parseInt(parts2[1], 10);
|
|
30716
|
+
const yyyy2 = parseInt(parts2[2], 10);
|
|
30717
|
+
if (mm2 < 0 || isNaN(dd2) || isNaN(yyyy2) || yyyy2 < 1e3) return null;
|
|
30718
|
+
const d2 = new Date(yyyy2, mm2, dd2);
|
|
30719
|
+
return isNaN(d2.getTime()) ? null : d2;
|
|
30720
|
+
}
|
|
30652
30721
|
const sep = str.includes("/") ? "/" : "-";
|
|
30653
30722
|
const parts = str.split(sep);
|
|
30654
30723
|
if (parts.length !== 3) return null;
|
|
@@ -30833,27 +30902,89 @@ var CalendarBody = ({
|
|
|
30833
30902
|
dayCells,
|
|
30834
30903
|
onDayClick,
|
|
30835
30904
|
onPrev,
|
|
30836
|
-
onNext
|
|
30837
|
-
|
|
30838
|
-
|
|
30839
|
-
|
|
30840
|
-
const
|
|
30841
|
-
const
|
|
30842
|
-
|
|
30905
|
+
onNext,
|
|
30906
|
+
onMonthSelect,
|
|
30907
|
+
onYearSelect
|
|
30908
|
+
}) => {
|
|
30909
|
+
const [pickerView, setPickerView] = (0, import_react19.useState)("calendar");
|
|
30910
|
+
const handleMonthClick = () => {
|
|
30911
|
+
setPickerView(pickerView === "month" ? "calendar" : "month");
|
|
30912
|
+
};
|
|
30913
|
+
const handleYearClick = () => {
|
|
30914
|
+
setPickerView(pickerView === "year" ? "calendar" : "year");
|
|
30915
|
+
};
|
|
30916
|
+
const handleMonthPick = (month) => {
|
|
30917
|
+
onMonthSelect(month);
|
|
30918
|
+
setPickerView("calendar");
|
|
30919
|
+
};
|
|
30920
|
+
const handleYearPick = (year) => {
|
|
30921
|
+
onYearSelect(year);
|
|
30922
|
+
setPickerView("calendar");
|
|
30923
|
+
};
|
|
30924
|
+
const currentYear = todayDate.getFullYear();
|
|
30925
|
+
const yearStart = viewYear - 6;
|
|
30926
|
+
const years = Array.from({ length: 16 }, (_, i) => yearStart + i);
|
|
30927
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__header" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__header-labels" }, /* @__PURE__ */ import_react19.default.createElement(
|
|
30928
|
+
"span",
|
|
30929
|
+
{
|
|
30930
|
+
className: `rf-date-picker__month-label ${pickerView === "month" ? "rf-date-picker__month-label--active" : ""}`,
|
|
30931
|
+
onClick: handleMonthClick
|
|
30932
|
+
},
|
|
30933
|
+
MONTHS[viewMonth]
|
|
30934
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
|
30935
|
+
"span",
|
|
30936
|
+
{
|
|
30937
|
+
className: `rf-date-picker__year-label ${pickerView === "year" ? "rf-date-picker__year-label--active" : ""}`,
|
|
30938
|
+
onClick: handleYearClick
|
|
30939
|
+
},
|
|
30940
|
+
viewYear
|
|
30941
|
+
)), /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__nav" }, pickerView === "year" ? /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: () => onYearSelect(viewYear - 16), "aria-label": "Previous years" }, "\u2039"), /* @__PURE__ */ import_react19.default.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: () => onYearSelect(viewYear + 16), "aria-label": "Next years" }, "\u203A")) : /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: onPrev, "aria-label": "Previous month" }, "\u2039"), /* @__PURE__ */ import_react19.default.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: onNext, "aria-label": "Next month" }, "\u203A")))), pickerView === "month" && /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__month-grid" }, MONTHS_SHORT.map((m, idx) => /* @__PURE__ */ import_react19.default.createElement(
|
|
30843
30942
|
"button",
|
|
30844
30943
|
{
|
|
30845
|
-
key:
|
|
30944
|
+
key: m,
|
|
30846
30945
|
type: "button",
|
|
30847
30946
|
className: [
|
|
30848
|
-
"rf-date-
|
|
30849
|
-
|
|
30850
|
-
|
|
30947
|
+
"rf-date-picker__month-cell",
|
|
30948
|
+
idx === viewMonth ? "rf-date-picker__month-cell--selected" : "",
|
|
30949
|
+
idx === todayDate.getMonth() && viewYear === currentYear ? "rf-date-picker__month-cell--current" : ""
|
|
30851
30950
|
].filter(Boolean).join(" "),
|
|
30852
|
-
onClick: () =>
|
|
30951
|
+
onClick: () => handleMonthPick(idx)
|
|
30853
30952
|
},
|
|
30854
|
-
|
|
30855
|
-
)
|
|
30856
|
-
|
|
30953
|
+
m
|
|
30954
|
+
))), pickerView === "year" && /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__year-grid" }, years.map((y) => /* @__PURE__ */ import_react19.default.createElement(
|
|
30955
|
+
"button",
|
|
30956
|
+
{
|
|
30957
|
+
key: y,
|
|
30958
|
+
type: "button",
|
|
30959
|
+
className: [
|
|
30960
|
+
"rf-date-picker__year-cell",
|
|
30961
|
+
y === viewYear ? "rf-date-picker__year-cell--selected" : "",
|
|
30962
|
+
y === currentYear ? "rf-date-picker__year-cell--current" : ""
|
|
30963
|
+
].filter(Boolean).join(" "),
|
|
30964
|
+
onClick: () => handleYearPick(y)
|
|
30965
|
+
},
|
|
30966
|
+
y
|
|
30967
|
+
))), pickerView === "calendar" && /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__weekdays" }, WEEKDAYS.map((w) => /* @__PURE__ */ import_react19.default.createElement("div", { key: w, className: "rf-date-picker__weekday" }, w))), /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__grid" }, dayCells.map((day, idx) => {
|
|
30968
|
+
if (day === null) return /* @__PURE__ */ import_react19.default.createElement("div", { key: `e-${idx}`, className: "rf-date-picker__day rf-date-picker__day--empty" });
|
|
30969
|
+
const cellDate = new Date(viewYear, viewMonth, day);
|
|
30970
|
+
const isSelected = selectedDate ? isSameDay(cellDate, selectedDate) : false;
|
|
30971
|
+
const isToday = isSameDay(cellDate, todayDate);
|
|
30972
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
30973
|
+
"button",
|
|
30974
|
+
{
|
|
30975
|
+
key: day,
|
|
30976
|
+
type: "button",
|
|
30977
|
+
className: [
|
|
30978
|
+
"rf-date-picker__day",
|
|
30979
|
+
isSelected ? "rf-date-picker__day--selected" : "",
|
|
30980
|
+
isToday && !isSelected ? "rf-date-picker__day--today" : ""
|
|
30981
|
+
].filter(Boolean).join(" "),
|
|
30982
|
+
onClick: () => onDayClick(day)
|
|
30983
|
+
},
|
|
30984
|
+
day
|
|
30985
|
+
);
|
|
30986
|
+
}))));
|
|
30987
|
+
};
|
|
30857
30988
|
var DateField = ({
|
|
30858
30989
|
label,
|
|
30859
30990
|
value,
|
|
@@ -30911,7 +31042,9 @@ var DateField = ({
|
|
|
30911
31042
|
const MINUTES = Array.from({ length: 60 }, (_, i) => String(i).padStart(2, "0"));
|
|
30912
31043
|
const AMPMS = ["AM", "PM"];
|
|
30913
31044
|
const containerRef = (0, import_react19.useRef)(null);
|
|
30914
|
-
const
|
|
31045
|
+
const pickerRef = (0, import_react19.useRef)(null);
|
|
31046
|
+
const [dropUp, setDropUp] = (0, import_react19.useState)(false);
|
|
31047
|
+
const inputId = (0, import_react19.useRef)(`rf-df-${Math.random().toString(36).substring(2, 11)}`).current;
|
|
30915
31048
|
(0, import_react19.useEffect)(() => {
|
|
30916
31049
|
if (value === void 0) return;
|
|
30917
31050
|
if (!value) {
|
|
@@ -30943,6 +31076,13 @@ var DateField = ({
|
|
|
30943
31076
|
document.addEventListener("mousedown", handler);
|
|
30944
31077
|
return () => document.removeEventListener("mousedown", handler);
|
|
30945
31078
|
}, [open]);
|
|
31079
|
+
(0, import_react19.useEffect)(() => {
|
|
31080
|
+
if (!open || !containerRef.current) return;
|
|
31081
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
31082
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
31083
|
+
const pickerHeight = 400;
|
|
31084
|
+
setDropUp(spaceBelow < pickerHeight && rect.top > pickerHeight);
|
|
31085
|
+
}, [open]);
|
|
30946
31086
|
const commitDate = (0, import_react19.useCallback)((d, h, m, ap) => {
|
|
30947
31087
|
setSelectedDate(d);
|
|
30948
31088
|
if (!d) {
|
|
@@ -31135,9 +31275,11 @@ var DateField = ({
|
|
|
31135
31275
|
), open && !disabled && /* @__PURE__ */ import_react19.default.createElement(
|
|
31136
31276
|
"div",
|
|
31137
31277
|
{
|
|
31278
|
+
ref: pickerRef,
|
|
31138
31279
|
className: [
|
|
31139
31280
|
"rf-date-picker",
|
|
31140
|
-
isSideVariant ? "rf-date-picker--side" : ""
|
|
31281
|
+
isSideVariant ? "rf-date-picker--side" : "",
|
|
31282
|
+
dropUp ? "rf-date-picker--drop-up" : ""
|
|
31141
31283
|
].filter(Boolean).join(" "),
|
|
31142
31284
|
onMouseDown: (e) => e.preventDefault()
|
|
31143
31285
|
},
|
|
@@ -31151,7 +31293,9 @@ var DateField = ({
|
|
|
31151
31293
|
dayCells,
|
|
31152
31294
|
onDayClick: handleDayClick,
|
|
31153
31295
|
onPrev: prevMonth,
|
|
31154
|
-
onNext: nextMonth
|
|
31296
|
+
onNext: nextMonth,
|
|
31297
|
+
onMonthSelect: setViewMonth,
|
|
31298
|
+
onYearSelect: setViewYear
|
|
31155
31299
|
}
|
|
31156
31300
|
), type === "datetime" && /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__time-section" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "rf-date-picker__time-label" }, "Time"), /* @__PURE__ */ import_react19.default.createElement(
|
|
31157
31301
|
SpinnerPanel,
|
|
@@ -31223,7 +31367,7 @@ var MONTHS2 = [
|
|
|
31223
31367
|
"November",
|
|
31224
31368
|
"December"
|
|
31225
31369
|
];
|
|
31226
|
-
var
|
|
31370
|
+
var MONTHS_SHORT2 = [
|
|
31227
31371
|
"Jan",
|
|
31228
31372
|
"Feb",
|
|
31229
31373
|
"Mar",
|
|
@@ -31260,14 +31404,14 @@ var dateToISO = (d) => {
|
|
|
31260
31404
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
31261
31405
|
return `${y}-${mo}-${dd}`;
|
|
31262
31406
|
};
|
|
31263
|
-
var formatShort = (d) => `${String(d.getDate()).padStart(2, "0")} ${
|
|
31407
|
+
var formatShort = (d) => `${String(d.getDate()).padStart(2, "0")} ${MONTHS_SHORT2[d.getMonth()]} ${d.getFullYear()}`;
|
|
31264
31408
|
var parseInputDate = (str) => {
|
|
31265
31409
|
const s = str.trim();
|
|
31266
31410
|
if (!s) return null;
|
|
31267
31411
|
const shortMatch = s.match(/^(\d{1,2})\s+([A-Za-z]+)\s+(\d{4})$/);
|
|
31268
31412
|
if (shortMatch) {
|
|
31269
31413
|
const day = parseInt(shortMatch[1], 10);
|
|
31270
|
-
const monthIdx =
|
|
31414
|
+
const monthIdx = MONTHS_SHORT2.findIndex((m) => m.toLowerCase() === shortMatch[2].toLowerCase());
|
|
31271
31415
|
const year = parseInt(shortMatch[3], 10);
|
|
31272
31416
|
if (monthIdx !== -1 && day >= 1 && day <= 31 && year >= 1e3) {
|
|
31273
31417
|
const d = new Date(year, monthIdx, day);
|
|
@@ -32218,13 +32362,13 @@ var Autocomplete = import_react21.default.forwardRef(AutocompleteInner);
|
|
|
32218
32362
|
Autocomplete.displayName = "Autocomplete";
|
|
32219
32363
|
|
|
32220
32364
|
// lib/Progress/RufousLogoLoader.tsx
|
|
32221
|
-
var
|
|
32365
|
+
var React71 = __toESM(require("react"), 1);
|
|
32222
32366
|
var _uid = 0;
|
|
32223
32367
|
var RufousLogoLoader = ({ size: size3 = 80, sx, className }) => {
|
|
32224
|
-
const clipId =
|
|
32368
|
+
const clipId = React71.useRef(`rll-${++_uid}`).current;
|
|
32225
32369
|
const height = size3 * (38.795 / 54.585);
|
|
32226
32370
|
const sxClass = useSx(sx);
|
|
32227
|
-
return /* @__PURE__ */
|
|
32371
|
+
return /* @__PURE__ */ React71.createElement("div", { className: ["rufous-logo-loader", sxClass, className].filter(Boolean).join(" "), style: { width: size3, height } }, /* @__PURE__ */ React71.createElement(
|
|
32228
32372
|
"svg",
|
|
32229
32373
|
{
|
|
32230
32374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32233,14 +32377,14 @@ var RufousLogoLoader = ({ size: size3 = 80, sx, className }) => {
|
|
|
32233
32377
|
height,
|
|
32234
32378
|
className: "rufous-logo-loader__svg"
|
|
32235
32379
|
},
|
|
32236
|
-
/* @__PURE__ */
|
|
32380
|
+
/* @__PURE__ */ React71.createElement("defs", null, /* @__PURE__ */ React71.createElement("clipPath", { id: clipId }, /* @__PURE__ */ React71.createElement(
|
|
32237
32381
|
"path",
|
|
32238
32382
|
{
|
|
32239
32383
|
transform: "translate(2208 18.205)",
|
|
32240
32384
|
d: "M.7,38.8a3.783,3.783,0,0,1-.5-.045l-.031,0A.26.26,0,0,1,0,38.564a.279.279,0,0,1,.14-.2c.222-.126.45-.251.671-.371l.047-.026c.357-.194.8-.435,1.209-.685.783-.479,1.565-.993,2.32-1.489l.033-.022.218-.143.49-.32c.575-.374,1.226-.8,1.824-1.241.98-.726,1.834-1.407,2.611-2.081a22.444,22.444,0,0,0,1.783-1.774A14.2,14.2,0,0,0,12.5,28.749l.012-.016a15.8,15.8,0,0,0,1.151-1.8,10.351,10.351,0,0,0,.586-1.511l0-.011.092-.278a4.425,4.425,0,0,0,.14-.583l.007-.036c.024-.119.048-.243.079-.363a4.639,4.639,0,0,0-.034-2.566c-.064-.212-.126-.43-.184-.636l-.008-.028c-.111-.391-.225-.8-.369-1.181a8.71,8.71,0,0,0-2.279-3.24,14.363,14.363,0,0,0-3.239-2.326c-.75-.4-1.553-.727-2.329-1.046L6.1,13.114l-.157-.065c-.294-.122-.6-.221-.9-.318l-.025-.008c-.19-.061-.427-.136-.649-.218-.108-.04-.265-.172-.252-.229a.7.7,0,0,1,.235-.4.915.915,0,0,1,.449-.112c.383-.029.77-.063,1.165-.1.969-.085,1.971-.174,2.962-.181h.119a13.145,13.145,0,0,1,2.907.315,11.888,11.888,0,0,1,3.128,1.123,10.286,10.286,0,0,1,2.3,1.554.92.92,0,0,1,.273.4,12.722,12.722,0,0,1,.458,3.3c-.009,1.494-.014,2.867-.014,4.2,0,.309.013.588.039.852a1.013,1.013,0,0,0,.078.26l0,.01c.027.067.051.129.077.207.029-.064.054-.116.076-.161l.009-.017.006-.012a.823.823,0,0,0,.076-.189c.051-.247.1-.494.164-.767.136-.618.276-1.257.359-1.9a24.362,24.362,0,0,0,0-6.777,13.01,13.01,0,0,0-.559-2.1c-.061-.185-.125-.382-.187-.579a9.42,9.42,0,0,0-.583-1.469c-.367-.727-.786-1.449-1.184-2.126a9.376,9.376,0,0,0-.643-.918c-.076-.1-.151-.2-.224-.3L15.548,6.3a8.128,8.128,0,0,0-.865-1.057,32.021,32.021,0,0,0-2.466-2.183,12.673,12.673,0,0,0-1.905-1.188c-.48-.256-1-.485-1.462-.687-.221-.1-.457-.2-.683-.306a.663.663,0,0,1-.11-.071L8.039.795c-.027-.02-.058-.043-.1-.069L8.062.667,8.108.644a1.786,1.786,0,0,1,.27-.12A11.679,11.679,0,0,1,11.866,0a13.332,13.332,0,0,1,1.769.121A13.927,13.927,0,0,1,15.9.693l.471.147a10.775,10.775,0,0,1,1.656.658,9.622,9.622,0,0,1,1.768,1.041,32.024,32.024,0,0,1,3.092,2.717,25.62,25.62,0,0,1,2.245,2.829l.084.117c.617.86,1.171,1.777,1.678,2.641.255.435.484.9.687,1.3.14.281.285.572.436.854.262.491.534.977.835,1.516l.005.01q.169.3.337.6c.064.116.13.232.2.347l.027.047c.12.212.244.431.357.651a8.518,8.518,0,0,0,2.121,2.695c.065.024.137.054.212.086l.013.006a1.268,1.268,0,0,0,.376.123.087.087,0,0,0,.063-.02.209.209,0,0,0,.083-.151c0-.083-.08-.153-.157-.22a.694.694,0,0,1-.135-.142c-.134-.216-.273-.436-.407-.649l-.063-.1c-.373-.587-.8-1.251-1.157-1.923s-.666-1.373-.964-2.057l0-.008q-.123-.284-.247-.564a1.707,1.707,0,0,1,.239-1.554l.026-.046.005-.009A12.918,12.918,0,0,1,31.408,9.3,7.814,7.814,0,0,1,33.75,7.612a5.391,5.391,0,0,1,2.218-.444,11.369,11.369,0,0,1,1.882.186,9.211,9.211,0,0,1,2.845,1.022c.138.071.261.135.373.188a4.155,4.155,0,0,0,1.849.464h.093c1.993-.052,4-.14,5.95-.224l.846-.036c.9-.038,1.808-.066,2.682-.093L52.7,8.67l1.007-.031h.041a1.787,1.787,0,0,1,.73.163c.1.051.109.256.109.318,0,.081-.147.169-.257.175-.466.028-.994.043-1.485.043a37.855,37.855,0,0,0-6.3.577A9.221,9.221,0,0,0,42.7,11.3a7.884,7.884,0,0,0-1.565,1.5c-.593.743-1.116,1.545-1.621,2.321l-.121.185c-.228.35-.435.709-.662,1.109l-.041.071c-.136.236-.276.481-.42.717l-.007.012c-.349.572-.709,1.162-1.1,1.716l-.216.307-.01.014a21.585,21.585,0,0,1-1.451,1.907c-1.317,1.485-2.538,2.8-3.734,4.006a30.822,30.822,0,0,1-2.5,2.207c-.548.446-1.139.86-1.71,1.26l-.01.007q-.254.177-.5.355c-.536.379-1.109.78-1.7,1.157-.545.35-1.143.71-1.828,1.1-.842.483-1.586.9-2.275,1.26-.271.144-.553.272-.868.412-.13.058-.3.135-.467.213a6.838,6.838,0,0,1-1.18.3,5.079,5.079,0,0,1,.647-.771l.008-.008c.132-.136.251-.26.365-.393l.048-.056c.566-.667,1.151-1.357,1.7-2.059s1.126-1.439,1.649-2.2c.4-.579.749-1.2,1.134-1.888l.016-.028c.406-.734.826-1.493,1.181-2.266.274-.6.733-1.787.866-2.189l.023-.07c.13-.389.215-.646-.013-.916a.369.369,0,0,1-.041.031l0,0c-.028.021-.055.041-.058.065a2.307,2.307,0,0,1-.146.5,5.257,5.257,0,0,1-.374.709c-.281.468-.536.959-.782,1.434-.2.385-.379.731-.57,1.069a20.042,20.042,0,0,1-1.161,1.871,30.689,30.689,0,0,1-1.985,2.531c-.74.821-1.567,1.648-2.6,2.6a21.448,21.448,0,0,1-2.1,1.669c-.85.606-1.754,1.2-2.688,1.768a17.867,17.867,0,0,1-1.993,1.037c-.994.445-2.066.891-3.185,1.324a12.127,12.127,0,0,1-1.714.514c-.955.213-1.969.413-3.1.611-1.023.18-2.054.328-2.927.449A1.41,1.41,0,0,1,.7,38.8ZM37.945,10.58l-.007,0a.583.583,0,0,0-.223.048.677.677,0,0,0-.437.555.637.637,0,0,0,.426.527.621.621,0,0,0,.209.046h.016a.72.72,0,0,0,.464-.194.676.676,0,0,0,.194-.282l0-.011,0-.005,0-.006,0-.009a.415.415,0,0,0,.014-.109.734.734,0,0,0-.657-.56Z"
|
|
32241
32385
|
}
|
|
32242
32386
|
))),
|
|
32243
|
-
/* @__PURE__ */
|
|
32387
|
+
/* @__PURE__ */ React71.createElement("g", { transform: "translate(-123.275 -24)" }, /* @__PURE__ */ React71.createElement("g", { transform: "translate(-2084.725 5.795)", clipPath: `url(#${clipId})` }, /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-1", width: "40", height: "6", transform: "translate(2208 58) rotate(-90)", fill: "#d07f6f" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-2", width: "40", height: "6", transform: "translate(2214 58) rotate(-90)", fill: "#c66958" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-3", width: "40", height: "7", transform: "translate(2220 58) rotate(-90)", fill: "#bb5341" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-4", width: "40", height: "6", transform: "translate(2227 58) rotate(-90)", fill: "#b03a28" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-5", width: "40", height: "6", transform: "translate(2233 58) rotate(-90)", fill: "#a41b06" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-6", width: "40", height: "6", transform: "translate(2239 58) rotate(-90)", fill: "#8e1604" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-7", width: "40", height: "6", transform: "translate(2245 58) rotate(-90)", fill: "#791103" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-8", width: "40", height: "5", transform: "translate(2251 58) rotate(-90)", fill: "#640c02" }), /* @__PURE__ */ React71.createElement("rect", { className: "rufous-ls rufous-ls-9", width: "40", height: "7", transform: "translate(2256 58) rotate(-90)", fill: "#500801" })))
|
|
32244
32388
|
));
|
|
32245
32389
|
};
|
|
32246
32390
|
|
|
@@ -32295,8 +32439,11 @@ function DataGrid({
|
|
|
32295
32439
|
actions,
|
|
32296
32440
|
pageSize: initialPageSize = 10,
|
|
32297
32441
|
pageSizeOptions = [5, 10, 25, 50],
|
|
32298
|
-
title
|
|
32442
|
+
title,
|
|
32443
|
+
className,
|
|
32444
|
+
sx
|
|
32299
32445
|
}) {
|
|
32446
|
+
const sxClass = useSx(sx);
|
|
32300
32447
|
const [columnOverrides, setColumnOverrides] = (0, import_react22.useState)({});
|
|
32301
32448
|
const resolvedColumns = (0, import_react22.useMemo)(() => {
|
|
32302
32449
|
return initialColumnsProp.map((col) => {
|
|
@@ -32597,7 +32744,7 @@ function DataGrid({
|
|
|
32597
32744
|
return offset2;
|
|
32598
32745
|
};
|
|
32599
32746
|
const hasActiveFilters = advancedFilters.some((f) => f.value);
|
|
32600
|
-
return /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-root" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header-info" }, /* @__PURE__ */ import_react22.default.createElement("h2", null, title), /* @__PURE__ */ import_react22.default.createElement("p", null, filteredData.length, " total records")), /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header-actions" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-search-wrap" }, /* @__PURE__ */ import_react22.default.createElement(import_lucide_react2.Search, { size: 15 }), /* @__PURE__ */ import_react22.default.createElement(
|
|
32747
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { className: ["dg-root", sxClass, className].filter(Boolean).join(" ") }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header-info" }, /* @__PURE__ */ import_react22.default.createElement("h2", null, title), /* @__PURE__ */ import_react22.default.createElement("p", null, filteredData.length, " total records")), /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-header-actions" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "dg-search-wrap" }, /* @__PURE__ */ import_react22.default.createElement(import_lucide_react2.Search, { size: 15 }), /* @__PURE__ */ import_react22.default.createElement(
|
|
32601
32748
|
"input",
|
|
32602
32749
|
{
|
|
32603
32750
|
className: "dg-search",
|
|
@@ -34922,8 +35069,8 @@ var Tooltip = ({
|
|
|
34922
35069
|
Tooltip.displayName = "Tooltip";
|
|
34923
35070
|
|
|
34924
35071
|
// lib/Box/Box.tsx
|
|
34925
|
-
var
|
|
34926
|
-
var Box =
|
|
35072
|
+
var React87 = __toESM(require("react"), 1);
|
|
35073
|
+
var Box = React87.forwardRef(
|
|
34927
35074
|
({
|
|
34928
35075
|
component: component2 = "div",
|
|
34929
35076
|
children,
|
|
@@ -34936,6 +35083,23 @@ var Box = React86.forwardRef(
|
|
|
34936
35083
|
margin,
|
|
34937
35084
|
width,
|
|
34938
35085
|
height,
|
|
35086
|
+
minWidth,
|
|
35087
|
+
maxWidth,
|
|
35088
|
+
minHeight,
|
|
35089
|
+
maxHeight,
|
|
35090
|
+
flex,
|
|
35091
|
+
flexWrap,
|
|
35092
|
+
flexGrow,
|
|
35093
|
+
flexShrink,
|
|
35094
|
+
overflow,
|
|
35095
|
+
position: position2,
|
|
35096
|
+
top,
|
|
35097
|
+
right,
|
|
35098
|
+
bottom,
|
|
35099
|
+
left,
|
|
35100
|
+
borderRadius,
|
|
35101
|
+
bgcolor,
|
|
35102
|
+
color: color2,
|
|
34939
35103
|
className,
|
|
34940
35104
|
style,
|
|
34941
35105
|
sx,
|
|
@@ -34952,18 +35116,35 @@ var Box = React86.forwardRef(
|
|
|
34952
35116
|
...margin !== void 0 ? { margin: typeof margin === "number" ? `${margin}px` : margin } : {},
|
|
34953
35117
|
...width !== void 0 ? { width: typeof width === "number" ? `${width}px` : width } : {},
|
|
34954
35118
|
...height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : {},
|
|
35119
|
+
...minWidth !== void 0 ? { minWidth: typeof minWidth === "number" ? `${minWidth}px` : minWidth } : {},
|
|
35120
|
+
...maxWidth !== void 0 ? { maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth } : {},
|
|
35121
|
+
...minHeight !== void 0 ? { minHeight: typeof minHeight === "number" ? `${minHeight}px` : minHeight } : {},
|
|
35122
|
+
...maxHeight !== void 0 ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight } : {},
|
|
35123
|
+
...flex !== void 0 ? { flex } : {},
|
|
35124
|
+
...flexWrap !== void 0 ? { flexWrap } : {},
|
|
35125
|
+
...flexGrow !== void 0 ? { flexGrow } : {},
|
|
35126
|
+
...flexShrink !== void 0 ? { flexShrink } : {},
|
|
35127
|
+
...overflow !== void 0 ? { overflow } : {},
|
|
35128
|
+
...position2 !== void 0 ? { position: position2 } : {},
|
|
35129
|
+
...top !== void 0 ? { top: typeof top === "number" ? `${top}px` : top } : {},
|
|
35130
|
+
...right !== void 0 ? { right: typeof right === "number" ? `${right}px` : right } : {},
|
|
35131
|
+
...bottom !== void 0 ? { bottom: typeof bottom === "number" ? `${bottom}px` : bottom } : {},
|
|
35132
|
+
...left !== void 0 ? { left: typeof left === "number" ? `${left}px` : left } : {},
|
|
35133
|
+
...borderRadius !== void 0 ? { borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius } : {},
|
|
35134
|
+
...bgcolor !== void 0 ? { backgroundColor: bgcolor } : {},
|
|
35135
|
+
...color2 !== void 0 ? { color: color2 } : {},
|
|
34955
35136
|
...style
|
|
34956
35137
|
};
|
|
34957
35138
|
const classes = ["rf-box", sxClass, className].filter(Boolean).join(" ");
|
|
34958
35139
|
const Tag = component2;
|
|
34959
|
-
return /* @__PURE__ */
|
|
35140
|
+
return /* @__PURE__ */ React87.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, children);
|
|
34960
35141
|
}
|
|
34961
35142
|
);
|
|
34962
35143
|
Box.displayName = "Box";
|
|
34963
35144
|
|
|
34964
35145
|
// lib/Stack/Stack.tsx
|
|
34965
|
-
var
|
|
34966
|
-
var Stack2 =
|
|
35146
|
+
var React88 = __toESM(require("react"), 1);
|
|
35147
|
+
var Stack2 = React88.forwardRef(
|
|
34967
35148
|
({
|
|
34968
35149
|
direction = "column",
|
|
34969
35150
|
spacing,
|
|
@@ -34972,6 +35153,8 @@ var Stack2 = React87.forwardRef(
|
|
|
34972
35153
|
divider,
|
|
34973
35154
|
flexWrap,
|
|
34974
35155
|
useFlexGap = true,
|
|
35156
|
+
flex,
|
|
35157
|
+
overflow,
|
|
34975
35158
|
component: component2 = "div",
|
|
34976
35159
|
children,
|
|
34977
35160
|
className,
|
|
@@ -34987,19 +35170,21 @@ var Stack2 = React87.forwardRef(
|
|
|
34987
35170
|
...justifyContent !== void 0 ? { justifyContent } : {},
|
|
34988
35171
|
...flexWrap !== void 0 ? { flexWrap } : {},
|
|
34989
35172
|
...gapValue !== void 0 && useFlexGap ? { gap: gapValue } : {},
|
|
35173
|
+
...flex !== void 0 ? { flex } : {},
|
|
35174
|
+
...overflow !== void 0 ? { overflow } : {},
|
|
34990
35175
|
...style
|
|
34991
35176
|
};
|
|
34992
35177
|
const classes = ["rf-stack", sxClass, className].filter(Boolean).join(" ");
|
|
34993
35178
|
let content;
|
|
34994
35179
|
if (divider) {
|
|
34995
|
-
const childArray =
|
|
35180
|
+
const childArray = React88.Children.toArray(children).filter(
|
|
34996
35181
|
(child) => child !== null && child !== void 0
|
|
34997
35182
|
);
|
|
34998
35183
|
content = childArray.reduce((acc, child, idx) => {
|
|
34999
35184
|
acc.push(child);
|
|
35000
35185
|
if (idx < childArray.length - 1) {
|
|
35001
35186
|
acc.push(
|
|
35002
|
-
/* @__PURE__ */
|
|
35187
|
+
/* @__PURE__ */ React88.createElement("div", { key: `divider-${idx}`, className: "rf-stack-divider" }, divider)
|
|
35003
35188
|
);
|
|
35004
35189
|
}
|
|
35005
35190
|
return acc;
|
|
@@ -35008,13 +35193,13 @@ var Stack2 = React87.forwardRef(
|
|
|
35008
35193
|
content = children;
|
|
35009
35194
|
}
|
|
35010
35195
|
const Tag = component2;
|
|
35011
|
-
return /* @__PURE__ */
|
|
35196
|
+
return /* @__PURE__ */ React88.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, content);
|
|
35012
35197
|
}
|
|
35013
35198
|
);
|
|
35014
35199
|
Stack2.displayName = "Stack";
|
|
35015
35200
|
|
|
35016
35201
|
// lib/Grid/Grid.tsx
|
|
35017
|
-
var
|
|
35202
|
+
var React89 = __toESM(require("react"), 1);
|
|
35018
35203
|
function getBreakpointClass(bp, val2) {
|
|
35019
35204
|
if (val2 === void 0) return "";
|
|
35020
35205
|
if (val2 === true) return `rf-grid-${bp}-12`;
|
|
@@ -35027,7 +35212,7 @@ function getSpacingGap(spacing) {
|
|
|
35027
35212
|
const base = spacing.xs ?? spacing.sm ?? spacing.md ?? 0;
|
|
35028
35213
|
return `${base * 8}px`;
|
|
35029
35214
|
}
|
|
35030
|
-
var Grid =
|
|
35215
|
+
var Grid = React89.forwardRef(
|
|
35031
35216
|
({
|
|
35032
35217
|
container = false,
|
|
35033
35218
|
item = false,
|
|
@@ -35077,14 +35262,14 @@ var Grid = React88.forwardRef(
|
|
|
35077
35262
|
className
|
|
35078
35263
|
].filter(Boolean).join(" ");
|
|
35079
35264
|
const Tag = component2;
|
|
35080
|
-
return /* @__PURE__ */
|
|
35265
|
+
return /* @__PURE__ */ React89.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, children);
|
|
35081
35266
|
}
|
|
35082
35267
|
);
|
|
35083
35268
|
Grid.displayName = "Grid";
|
|
35084
35269
|
|
|
35085
35270
|
// lib/Paper/Paper.tsx
|
|
35086
|
-
var
|
|
35087
|
-
var Paper =
|
|
35271
|
+
var React90 = __toESM(require("react"), 1);
|
|
35272
|
+
var Paper = React90.forwardRef(
|
|
35088
35273
|
({
|
|
35089
35274
|
elevation = 1,
|
|
35090
35275
|
square = false,
|
|
@@ -35106,14 +35291,14 @@ var Paper = React89.forwardRef(
|
|
|
35106
35291
|
className
|
|
35107
35292
|
].filter(Boolean).join(" ");
|
|
35108
35293
|
const Tag = component2;
|
|
35109
|
-
return /* @__PURE__ */
|
|
35294
|
+
return /* @__PURE__ */ React90.createElement(Tag, { ref, className: classes, style, ...rest }, children);
|
|
35110
35295
|
}
|
|
35111
35296
|
);
|
|
35112
35297
|
Paper.displayName = "Paper";
|
|
35113
35298
|
|
|
35114
35299
|
// lib/Card/Card.tsx
|
|
35115
|
-
var
|
|
35116
|
-
var Card =
|
|
35300
|
+
var React91 = __toESM(require("react"), 1);
|
|
35301
|
+
var Card = React91.forwardRef(
|
|
35117
35302
|
({
|
|
35118
35303
|
elevation = 1,
|
|
35119
35304
|
variant = "elevation",
|
|
@@ -35132,33 +35317,33 @@ var Card = React90.forwardRef(
|
|
|
35132
35317
|
sxClass,
|
|
35133
35318
|
className
|
|
35134
35319
|
].filter(Boolean).join(" ");
|
|
35135
|
-
return /* @__PURE__ */
|
|
35320
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
35136
35321
|
}
|
|
35137
35322
|
);
|
|
35138
35323
|
Card.displayName = "Card";
|
|
35139
|
-
var CardContent =
|
|
35324
|
+
var CardContent = React91.forwardRef(
|
|
35140
35325
|
({ children, className, style, sx, ...rest }, ref) => {
|
|
35141
35326
|
const sxClass = useSx(sx);
|
|
35142
35327
|
const classes = ["rf-card-content", sxClass, className].filter(Boolean).join(" ");
|
|
35143
|
-
return /* @__PURE__ */
|
|
35328
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
35144
35329
|
}
|
|
35145
35330
|
);
|
|
35146
35331
|
CardContent.displayName = "CardContent";
|
|
35147
|
-
var CardHeader =
|
|
35332
|
+
var CardHeader = React91.forwardRef(
|
|
35148
35333
|
({ title, subheader, avatar, action, className, style, sx, ...rest }, ref) => {
|
|
35149
35334
|
const sxClass = useSx(sx);
|
|
35150
35335
|
const classes = ["rf-card-header", sxClass, className].filter(Boolean).join(" ");
|
|
35151
|
-
return /* @__PURE__ */
|
|
35336
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, avatar && /* @__PURE__ */ React91.createElement("div", { className: "rf-card-header-avatar" }, avatar), /* @__PURE__ */ React91.createElement("div", { className: "rf-card-header-content" }, /* @__PURE__ */ React91.createElement("div", { className: "rf-card-header-title" }, title), subheader && /* @__PURE__ */ React91.createElement("div", { className: "rf-card-header-subheader" }, subheader)), action && /* @__PURE__ */ React91.createElement("div", { className: "rf-card-header-action" }, action));
|
|
35152
35337
|
}
|
|
35153
35338
|
);
|
|
35154
35339
|
CardHeader.displayName = "CardHeader";
|
|
35155
|
-
var CardMedia =
|
|
35340
|
+
var CardMedia = React91.forwardRef(
|
|
35156
35341
|
({ component: component2 = "div", image: image2, src, height, alt, className, style, sx, ...rest }, ref) => {
|
|
35157
35342
|
const sxClass = useSx(sx);
|
|
35158
35343
|
const classes = ["rf-card-media", sxClass, className].filter(Boolean).join(" ");
|
|
35159
35344
|
const computedHeight = height !== void 0 ? typeof height === "number" ? `${height}px` : height : "200px";
|
|
35160
35345
|
if (component2 === "img") {
|
|
35161
|
-
return /* @__PURE__ */
|
|
35346
|
+
return /* @__PURE__ */ React91.createElement(
|
|
35162
35347
|
"img",
|
|
35163
35348
|
{
|
|
35164
35349
|
ref,
|
|
@@ -35171,7 +35356,7 @@ var CardMedia = React90.forwardRef(
|
|
|
35171
35356
|
);
|
|
35172
35357
|
}
|
|
35173
35358
|
if (component2 === "video") {
|
|
35174
|
-
return /* @__PURE__ */
|
|
35359
|
+
return /* @__PURE__ */ React91.createElement(
|
|
35175
35360
|
"video",
|
|
35176
35361
|
{
|
|
35177
35362
|
ref,
|
|
@@ -35187,7 +35372,7 @@ var CardMedia = React90.forwardRef(
|
|
|
35187
35372
|
...image2 ? { backgroundImage: `url(${image2})` } : {},
|
|
35188
35373
|
...style
|
|
35189
35374
|
};
|
|
35190
|
-
return /* @__PURE__ */
|
|
35375
|
+
return /* @__PURE__ */ React91.createElement(
|
|
35191
35376
|
"div",
|
|
35192
35377
|
{
|
|
35193
35378
|
ref,
|
|
@@ -35199,7 +35384,7 @@ var CardMedia = React90.forwardRef(
|
|
|
35199
35384
|
}
|
|
35200
35385
|
);
|
|
35201
35386
|
CardMedia.displayName = "CardMedia";
|
|
35202
|
-
var CardActions =
|
|
35387
|
+
var CardActions = React91.forwardRef(
|
|
35203
35388
|
({ disableSpacing = false, children, className, style, sx, ...rest }, ref) => {
|
|
35204
35389
|
const sxClass = useSx(sx);
|
|
35205
35390
|
const classes = [
|
|
@@ -35208,13 +35393,13 @@ var CardActions = React90.forwardRef(
|
|
|
35208
35393
|
sxClass,
|
|
35209
35394
|
className
|
|
35210
35395
|
].filter(Boolean).join(" ");
|
|
35211
|
-
return /* @__PURE__ */
|
|
35396
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
35212
35397
|
}
|
|
35213
35398
|
);
|
|
35214
35399
|
CardActions.displayName = "CardActions";
|
|
35215
35400
|
|
|
35216
35401
|
// lib/Accordion/Accordion.tsx
|
|
35217
|
-
var
|
|
35402
|
+
var React92 = __toESM(require("react"), 1);
|
|
35218
35403
|
var import_react37 = require("react");
|
|
35219
35404
|
var AccordionContext = (0, import_react37.createContext)({
|
|
35220
35405
|
expanded: false,
|
|
@@ -35222,7 +35407,7 @@ var AccordionContext = (0, import_react37.createContext)({
|
|
|
35222
35407
|
toggle: () => {
|
|
35223
35408
|
}
|
|
35224
35409
|
});
|
|
35225
|
-
var Accordion =
|
|
35410
|
+
var Accordion = React92.forwardRef(
|
|
35226
35411
|
({
|
|
35227
35412
|
expanded: expandedProp,
|
|
35228
35413
|
defaultExpanded = false,
|
|
@@ -35257,11 +35442,11 @@ var Accordion = React91.forwardRef(
|
|
|
35257
35442
|
sxClass,
|
|
35258
35443
|
className
|
|
35259
35444
|
].filter(Boolean).join(" ");
|
|
35260
|
-
return /* @__PURE__ */
|
|
35445
|
+
return /* @__PURE__ */ React92.createElement(AccordionContext.Provider, { value: { expanded, disabled, toggle } }, /* @__PURE__ */ React92.createElement("div", { ref, className: classes, style, ...rest }, children));
|
|
35261
35446
|
}
|
|
35262
35447
|
);
|
|
35263
35448
|
Accordion.displayName = "Accordion";
|
|
35264
|
-
var ChevronIcon = () => /* @__PURE__ */
|
|
35449
|
+
var ChevronIcon = () => /* @__PURE__ */ React92.createElement(
|
|
35265
35450
|
"svg",
|
|
35266
35451
|
{
|
|
35267
35452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -35275,9 +35460,9 @@ var ChevronIcon = () => /* @__PURE__ */ React91.createElement(
|
|
|
35275
35460
|
strokeLinejoin: "round",
|
|
35276
35461
|
"aria-hidden": "true"
|
|
35277
35462
|
},
|
|
35278
|
-
/* @__PURE__ */
|
|
35463
|
+
/* @__PURE__ */ React92.createElement("polyline", { points: "6 9 12 15 18 9" })
|
|
35279
35464
|
);
|
|
35280
|
-
var AccordionSummary =
|
|
35465
|
+
var AccordionSummary = React92.forwardRef(
|
|
35281
35466
|
({ expandIcon, children, sx, className, style, ...rest }, ref) => {
|
|
35282
35467
|
const sxClass = useSx(sx);
|
|
35283
35468
|
const { expanded, toggle, disabled } = (0, import_react37.useContext)(AccordionContext);
|
|
@@ -35291,7 +35476,7 @@ var AccordionSummary = React91.forwardRef(
|
|
|
35291
35476
|
"rf-accordion-summary-icon",
|
|
35292
35477
|
expanded ? "rf-accordion-icon-expanded" : ""
|
|
35293
35478
|
].filter(Boolean).join(" ");
|
|
35294
|
-
return /* @__PURE__ */
|
|
35479
|
+
return /* @__PURE__ */ React92.createElement(
|
|
35295
35480
|
"button",
|
|
35296
35481
|
{
|
|
35297
35482
|
ref,
|
|
@@ -35303,13 +35488,13 @@ var AccordionSummary = React91.forwardRef(
|
|
|
35303
35488
|
"aria-expanded": expanded,
|
|
35304
35489
|
...rest
|
|
35305
35490
|
},
|
|
35306
|
-
/* @__PURE__ */
|
|
35307
|
-
/* @__PURE__ */
|
|
35491
|
+
/* @__PURE__ */ React92.createElement("span", { className: "rf-accordion-summary-content" }, children),
|
|
35492
|
+
/* @__PURE__ */ React92.createElement("span", { className: iconClasses }, expandIcon !== void 0 ? expandIcon : /* @__PURE__ */ React92.createElement(ChevronIcon, null))
|
|
35308
35493
|
);
|
|
35309
35494
|
}
|
|
35310
35495
|
);
|
|
35311
35496
|
AccordionSummary.displayName = "AccordionSummary";
|
|
35312
|
-
var AccordionDetails =
|
|
35497
|
+
var AccordionDetails = React92.forwardRef(
|
|
35313
35498
|
({ children, sx, className, style, ...rest }, ref) => {
|
|
35314
35499
|
const sxClass = useSx(sx);
|
|
35315
35500
|
const { expanded } = (0, import_react37.useContext)(AccordionContext);
|
|
@@ -35322,7 +35507,7 @@ var AccordionDetails = React91.forwardRef(
|
|
|
35322
35507
|
sxClass,
|
|
35323
35508
|
className
|
|
35324
35509
|
].filter(Boolean).join(" ");
|
|
35325
|
-
return /* @__PURE__ */
|
|
35510
|
+
return /* @__PURE__ */ React92.createElement("div", { className: wrapperClasses }, /* @__PURE__ */ React92.createElement("div", { className: "rf-accordion-details-inner" }, /* @__PURE__ */ React92.createElement("div", { ref, className: detailsClasses, style, ...rest }, children)));
|
|
35326
35511
|
}
|
|
35327
35512
|
);
|
|
35328
35513
|
AccordionDetails.displayName = "AccordionDetails";
|
|
@@ -35475,6 +35660,30 @@ var Tabs = ({
|
|
|
35475
35660
|
));
|
|
35476
35661
|
};
|
|
35477
35662
|
Tabs.displayName = "Tabs";
|
|
35663
|
+
var TabPanel = ({
|
|
35664
|
+
value,
|
|
35665
|
+
activeValue,
|
|
35666
|
+
children,
|
|
35667
|
+
keepMounted = false,
|
|
35668
|
+
className = "",
|
|
35669
|
+
style,
|
|
35670
|
+
sx
|
|
35671
|
+
}) => {
|
|
35672
|
+
const sxClass = useSx(sx);
|
|
35673
|
+
const isActive = value === activeValue;
|
|
35674
|
+
if (!isActive && !keepMounted) return null;
|
|
35675
|
+
return /* @__PURE__ */ import_react38.default.createElement(
|
|
35676
|
+
"div",
|
|
35677
|
+
{
|
|
35678
|
+
role: "tabpanel",
|
|
35679
|
+
hidden: !isActive,
|
|
35680
|
+
className: ["rf-tab-panel", sxClass, className].filter(Boolean).join(" "),
|
|
35681
|
+
style
|
|
35682
|
+
},
|
|
35683
|
+
isActive && children
|
|
35684
|
+
);
|
|
35685
|
+
};
|
|
35686
|
+
TabPanel.displayName = "TabPanel";
|
|
35478
35687
|
|
|
35479
35688
|
// lib/Breadcrumbs/Breadcrumbs.tsx
|
|
35480
35689
|
var import_react39 = __toESM(require("react"), 1);
|
|
@@ -36654,6 +36863,116 @@ var Zoom = ({
|
|
|
36654
36863
|
});
|
|
36655
36864
|
};
|
|
36656
36865
|
Zoom.displayName = "Zoom";
|
|
36866
|
+
|
|
36867
|
+
// lib/ImageField/ImageField.tsx
|
|
36868
|
+
var import_react48 = __toESM(require("react"), 1);
|
|
36869
|
+
function getSizeStyle2(size3) {
|
|
36870
|
+
if (size3 === "small") return { className: "rf-image-field--small" };
|
|
36871
|
+
if (size3 === "large") return { className: "rf-image-field--large" };
|
|
36872
|
+
if (typeof size3 === "number") {
|
|
36873
|
+
return {
|
|
36874
|
+
className: "",
|
|
36875
|
+
style: { width: size3, height: size3 }
|
|
36876
|
+
};
|
|
36877
|
+
}
|
|
36878
|
+
return { className: "rf-image-field--medium" };
|
|
36879
|
+
}
|
|
36880
|
+
var ImageField = import_react48.default.forwardRef(
|
|
36881
|
+
({
|
|
36882
|
+
src,
|
|
36883
|
+
alt = "",
|
|
36884
|
+
variant = "circular",
|
|
36885
|
+
size: size3 = "medium",
|
|
36886
|
+
accept = "image/*",
|
|
36887
|
+
onChange,
|
|
36888
|
+
overlayText = "Upload",
|
|
36889
|
+
disabled = false,
|
|
36890
|
+
className = "",
|
|
36891
|
+
style,
|
|
36892
|
+
sx
|
|
36893
|
+
}, ref) => {
|
|
36894
|
+
const sxClass = useSx(sx);
|
|
36895
|
+
const inputRef = (0, import_react48.useRef)(null);
|
|
36896
|
+
const [preview, setPreview] = (0, import_react48.useState)(null);
|
|
36897
|
+
const { className: sizeClass, style: sizeStyle } = getSizeStyle2(size3);
|
|
36898
|
+
const displaySrc = preview || src;
|
|
36899
|
+
const handleClick = (0, import_react48.useCallback)(() => {
|
|
36900
|
+
if (!disabled) {
|
|
36901
|
+
inputRef.current?.click();
|
|
36902
|
+
}
|
|
36903
|
+
}, [disabled]);
|
|
36904
|
+
const handleKeyDown = (0, import_react48.useCallback)(
|
|
36905
|
+
(e) => {
|
|
36906
|
+
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
36907
|
+
e.preventDefault();
|
|
36908
|
+
inputRef.current?.click();
|
|
36909
|
+
}
|
|
36910
|
+
},
|
|
36911
|
+
[disabled]
|
|
36912
|
+
);
|
|
36913
|
+
const handleFileChange = (0, import_react48.useCallback)(
|
|
36914
|
+
(e) => {
|
|
36915
|
+
const file = e.target.files?.[0];
|
|
36916
|
+
if (!file) return;
|
|
36917
|
+
const objectUrl = URL.createObjectURL(file);
|
|
36918
|
+
setPreview(objectUrl);
|
|
36919
|
+
onChange?.(file);
|
|
36920
|
+
e.target.value = "";
|
|
36921
|
+
},
|
|
36922
|
+
[onChange]
|
|
36923
|
+
);
|
|
36924
|
+
const classes = [
|
|
36925
|
+
"rf-image-field",
|
|
36926
|
+
`rf-image-field--${variant}`,
|
|
36927
|
+
sizeClass,
|
|
36928
|
+
disabled ? "rf-image-field--disabled" : "",
|
|
36929
|
+
sxClass,
|
|
36930
|
+
className
|
|
36931
|
+
].filter(Boolean).join(" ");
|
|
36932
|
+
const iconSize = typeof size3 === "number" ? Math.max(size3 * 0.25, 16) : size3 === "small" ? 16 : size3 === "large" ? 28 : 22;
|
|
36933
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
36934
|
+
"div",
|
|
36935
|
+
{
|
|
36936
|
+
ref,
|
|
36937
|
+
className: classes,
|
|
36938
|
+
style: { ...sizeStyle, ...style },
|
|
36939
|
+
role: "button",
|
|
36940
|
+
tabIndex: disabled ? -1 : 0,
|
|
36941
|
+
"aria-label": alt || overlayText,
|
|
36942
|
+
onClick: handleClick,
|
|
36943
|
+
onKeyDown: handleKeyDown
|
|
36944
|
+
},
|
|
36945
|
+
displaySrc ? /* @__PURE__ */ import_react48.default.createElement(
|
|
36946
|
+
"img",
|
|
36947
|
+
{
|
|
36948
|
+
src: displaySrc,
|
|
36949
|
+
alt,
|
|
36950
|
+
className: "rf-image-field__img"
|
|
36951
|
+
}
|
|
36952
|
+
) : /* @__PURE__ */ import_react48.default.createElement("div", { className: "rf-image-field__placeholder" }, /* @__PURE__ */ import_react48.default.createElement(
|
|
36953
|
+
cameraIcon_default,
|
|
36954
|
+
{
|
|
36955
|
+
width: iconSize,
|
|
36956
|
+
height: iconSize,
|
|
36957
|
+
color: "var(--text-secondary)"
|
|
36958
|
+
}
|
|
36959
|
+
)),
|
|
36960
|
+
/* @__PURE__ */ import_react48.default.createElement("div", { className: "rf-image-field__overlay" }, /* @__PURE__ */ import_react48.default.createElement(cameraIcon_default, { width: iconSize, height: iconSize, color: "#ffffff" }), overlayText && /* @__PURE__ */ import_react48.default.createElement("span", { className: "rf-image-field__overlay-text" }, overlayText)),
|
|
36961
|
+
/* @__PURE__ */ import_react48.default.createElement(
|
|
36962
|
+
"input",
|
|
36963
|
+
{
|
|
36964
|
+
ref: inputRef,
|
|
36965
|
+
type: "file",
|
|
36966
|
+
accept,
|
|
36967
|
+
className: "rf-image-field__input",
|
|
36968
|
+
onChange: handleFileChange,
|
|
36969
|
+
disabled
|
|
36970
|
+
}
|
|
36971
|
+
)
|
|
36972
|
+
);
|
|
36973
|
+
}
|
|
36974
|
+
);
|
|
36975
|
+
ImageField.displayName = "ImageField";
|
|
36657
36976
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36658
36977
|
0 && (module.exports = {
|
|
36659
36978
|
APP_THEMES,
|
|
@@ -36671,6 +36990,7 @@ Zoom.displayName = "Zoom";
|
|
|
36671
36990
|
BaseDialog,
|
|
36672
36991
|
Box,
|
|
36673
36992
|
Breadcrumbs,
|
|
36993
|
+
CameraIcon,
|
|
36674
36994
|
CancelButton,
|
|
36675
36995
|
Card,
|
|
36676
36996
|
CardActions,
|
|
@@ -36705,6 +37025,7 @@ Zoom.displayName = "Zoom";
|
|
|
36705
37025
|
Grow,
|
|
36706
37026
|
HelpOutlinedIcon,
|
|
36707
37027
|
HierarchyIcon,
|
|
37028
|
+
ImageField,
|
|
36708
37029
|
InactiveGroupIcon,
|
|
36709
37030
|
IndustryIcon,
|
|
36710
37031
|
InvoiceIcon,
|
|
@@ -36768,6 +37089,7 @@ Zoom.displayName = "Zoom";
|
|
|
36768
37089
|
SuspendUserIcon,
|
|
36769
37090
|
Switch,
|
|
36770
37091
|
Tab,
|
|
37092
|
+
TabPanel,
|
|
36771
37093
|
Tabs,
|
|
36772
37094
|
TechnicalSkillsIcon,
|
|
36773
37095
|
TextField,
|