@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.js
CHANGED
|
@@ -1061,8 +1061,23 @@ import * as React56 from "react";
|
|
|
1061
1061
|
var QualificationsIcon = ({ color = "#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: color, stroke: color, strokeWidth: "0.2" }));
|
|
1062
1062
|
var qualificationsIcon_default = QualificationsIcon;
|
|
1063
1063
|
|
|
1064
|
-
// lib/
|
|
1064
|
+
// lib/icons/cameraIcon.tsx
|
|
1065
1065
|
import * as React57 from "react";
|
|
1066
|
+
var CameraIcon = ({ color = "#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(
|
|
1067
|
+
"path",
|
|
1068
|
+
{
|
|
1069
|
+
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",
|
|
1070
|
+
stroke: color,
|
|
1071
|
+
strokeWidth: "2",
|
|
1072
|
+
strokeLinecap: "round",
|
|
1073
|
+
strokeLinejoin: "round",
|
|
1074
|
+
fill: "none"
|
|
1075
|
+
}
|
|
1076
|
+
), /* @__PURE__ */ React57.createElement("circle", { cx: "12", cy: "13", r: "4", stroke: color, strokeWidth: "2", fill: "none" }));
|
|
1077
|
+
var cameraIcon_default = CameraIcon;
|
|
1078
|
+
|
|
1079
|
+
// lib/Buttons/addButton.tsx
|
|
1080
|
+
import * as React58 from "react";
|
|
1066
1081
|
|
|
1067
1082
|
// lib/utils/sx.ts
|
|
1068
1083
|
import { useRef, useEffect } from "react";
|
|
@@ -1111,15 +1126,15 @@ function useSx(sx) {
|
|
|
1111
1126
|
// lib/Buttons/addButton.tsx
|
|
1112
1127
|
var AddButton = ({ children, sx, className, ...props }) => {
|
|
1113
1128
|
const sxClass = useSx(sx);
|
|
1114
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ React58.createElement("button", { className: ["btn add-btn", sxClass, className].filter(Boolean).join(" "), ...props }, "+ ", children);
|
|
1115
1130
|
};
|
|
1116
1131
|
var addButton_default = AddButton;
|
|
1117
1132
|
|
|
1118
1133
|
// lib/Buttons/submitButton.tsx
|
|
1119
|
-
import * as
|
|
1134
|
+
import * as React60 from "react";
|
|
1120
1135
|
|
|
1121
1136
|
// lib/Progress/circularProgress.tsx
|
|
1122
|
-
import * as
|
|
1137
|
+
import * as React59 from "react";
|
|
1123
1138
|
var CircularProgress = ({
|
|
1124
1139
|
size = 50,
|
|
1125
1140
|
color = "#a81c08",
|
|
@@ -1128,14 +1143,14 @@ var CircularProgress = ({
|
|
|
1128
1143
|
...props
|
|
1129
1144
|
}) => {
|
|
1130
1145
|
const sxClass = useSx(sx);
|
|
1131
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ React59.createElement(
|
|
1132
1147
|
"div",
|
|
1133
1148
|
{
|
|
1134
1149
|
className: ["rufous-loader", sxClass, className].filter(Boolean).join(" "),
|
|
1135
1150
|
style: { width: size, height: size },
|
|
1136
1151
|
...props
|
|
1137
1152
|
},
|
|
1138
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ React59.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React59.createElement(
|
|
1139
1154
|
"circle",
|
|
1140
1155
|
{
|
|
1141
1156
|
className: "rufous-loader-circle",
|
|
@@ -1157,7 +1172,7 @@ var CircularProgressIcon = ({
|
|
|
1157
1172
|
className
|
|
1158
1173
|
}) => {
|
|
1159
1174
|
const sxClass = useSx(sx);
|
|
1160
|
-
return /* @__PURE__ */
|
|
1175
|
+
return /* @__PURE__ */ React59.createElement("div", { className: ["rufous-loader rufous-loader--with-icon", sxClass, className].filter(Boolean).join(" "), style: { width: size, height: size } }, /* @__PURE__ */ React59.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React59.createElement(
|
|
1161
1176
|
"circle",
|
|
1162
1177
|
{
|
|
1163
1178
|
className: "rufous-loader-circle",
|
|
@@ -1166,7 +1181,7 @@ var CircularProgressIcon = ({
|
|
|
1166
1181
|
r: "45",
|
|
1167
1182
|
stroke: color
|
|
1168
1183
|
}
|
|
1169
|
-
)), /* @__PURE__ */
|
|
1184
|
+
)), /* @__PURE__ */ React59.createElement("div", { className: "rufous-loader__icon-wrap" }, /* @__PURE__ */ React59.createElement("div", { className: spinIcon ? "rufous-loader__icon--spin-y" : void 0 }, icon)));
|
|
1170
1185
|
};
|
|
1171
1186
|
|
|
1172
1187
|
// lib/Buttons/submitButton.tsx
|
|
@@ -1182,8 +1197,8 @@ var SubmitButton = ({
|
|
|
1182
1197
|
...props
|
|
1183
1198
|
}) => {
|
|
1184
1199
|
const sxClass = useSx(sx);
|
|
1185
|
-
const [loading, setLoading] =
|
|
1186
|
-
const clickTimeout =
|
|
1200
|
+
const [loading, setLoading] = React60.useState(false);
|
|
1201
|
+
const clickTimeout = React60.useRef(null);
|
|
1187
1202
|
const handleClick = async (e) => {
|
|
1188
1203
|
const currentTarget = e.currentTarget;
|
|
1189
1204
|
if (loading) return;
|
|
@@ -1218,7 +1233,7 @@ var SubmitButton = ({
|
|
|
1218
1233
|
}
|
|
1219
1234
|
}
|
|
1220
1235
|
};
|
|
1221
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ React60.createElement(
|
|
1222
1237
|
"button",
|
|
1223
1238
|
{
|
|
1224
1239
|
...props,
|
|
@@ -1228,29 +1243,29 @@ var SubmitButton = ({
|
|
|
1228
1243
|
onClick: handleClick,
|
|
1229
1244
|
onDoubleClick: handleDoubleClick
|
|
1230
1245
|
},
|
|
1231
|
-
/* @__PURE__ */
|
|
1246
|
+
/* @__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 })))
|
|
1232
1247
|
);
|
|
1233
1248
|
};
|
|
1234
1249
|
var submitButton_default = SubmitButton;
|
|
1235
1250
|
|
|
1236
1251
|
// lib/Buttons/cancelButton.tsx
|
|
1237
|
-
import * as
|
|
1252
|
+
import * as React61 from "react";
|
|
1238
1253
|
var CancelButton = ({ children, sx, className, ...props }) => {
|
|
1239
1254
|
const sxClass = useSx(sx);
|
|
1240
|
-
return /* @__PURE__ */
|
|
1255
|
+
return /* @__PURE__ */ React61.createElement("button", { className: ["btn cancel-btn", sxClass, className].filter(Boolean).join(" "), ...props }, children);
|
|
1241
1256
|
};
|
|
1242
1257
|
var cancelButton_default = CancelButton;
|
|
1243
1258
|
|
|
1244
1259
|
// lib/Buttons/stdButton.tsx
|
|
1245
|
-
import * as
|
|
1260
|
+
import * as React62 from "react";
|
|
1246
1261
|
var StandardButton = ({ children, sx, className, ...props }) => {
|
|
1247
1262
|
const sxClass = useSx(sx);
|
|
1248
|
-
return /* @__PURE__ */
|
|
1263
|
+
return /* @__PURE__ */ React62.createElement("button", { className: ["btn standard-btn", sxClass, className].filter(Boolean).join(" "), ...props }, children);
|
|
1249
1264
|
};
|
|
1250
1265
|
var stdButton_default = StandardButton;
|
|
1251
1266
|
|
|
1252
1267
|
// lib/Dialogs/BaseDialog.tsx
|
|
1253
|
-
import * as
|
|
1268
|
+
import * as React63 from "react";
|
|
1254
1269
|
import { useState as useState2 } from "react";
|
|
1255
1270
|
import { X } from "lucide-react";
|
|
1256
1271
|
var BaseDialog = ({
|
|
@@ -1285,7 +1300,7 @@ var BaseDialog = ({
|
|
|
1285
1300
|
const sxClass = useSx(sx);
|
|
1286
1301
|
if (!open) return null;
|
|
1287
1302
|
const isButtonLoading = isSubmitting || loading;
|
|
1288
|
-
const renderButtons = () => /* @__PURE__ */
|
|
1303
|
+
const renderButtons = () => /* @__PURE__ */ React63.createElement("div", { className: "dialog-footer", style: { justifyContent: buttonAlign } }, showCancelButton && /* @__PURE__ */ React63.createElement(
|
|
1289
1304
|
"button",
|
|
1290
1305
|
{
|
|
1291
1306
|
className: "btn-cancel",
|
|
@@ -1293,7 +1308,7 @@ var BaseDialog = ({
|
|
|
1293
1308
|
disabled: isLoading || isButtonLoading
|
|
1294
1309
|
},
|
|
1295
1310
|
cancelText
|
|
1296
|
-
), onConfirm && /* @__PURE__ */
|
|
1311
|
+
), onConfirm && /* @__PURE__ */ React63.createElement(
|
|
1297
1312
|
"button",
|
|
1298
1313
|
{
|
|
1299
1314
|
className: "btn-confirm",
|
|
@@ -1305,10 +1320,10 @@ var BaseDialog = ({
|
|
|
1305
1320
|
setIsSubmitting(false);
|
|
1306
1321
|
}
|
|
1307
1322
|
},
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
isButtonLoading && /* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ React63.createElement("span", { style: { visibility: isButtonLoading ? "hidden" : "visible" } }, confirmText),
|
|
1324
|
+
isButtonLoading && /* @__PURE__ */ React63.createElement("span", { className: "spinner", style: { position: "absolute" } })
|
|
1310
1325
|
));
|
|
1311
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ React63.createElement("div", { className: `dialog-overlay ${size === "fullScreen" ? "overlay-fullscreen" : ""}` }, /* @__PURE__ */ React63.createElement(
|
|
1312
1327
|
"div",
|
|
1313
1328
|
{
|
|
1314
1329
|
className: ["dialog-container", size ? `size-${size}` : "", sxClass, className].filter(Boolean).join(" "),
|
|
@@ -1317,15 +1332,15 @@ var BaseDialog = ({
|
|
|
1317
1332
|
minHeight
|
|
1318
1333
|
}
|
|
1319
1334
|
},
|
|
1320
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__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(
|
|
1321
1336
|
X,
|
|
1322
1337
|
{
|
|
1323
1338
|
size: 18,
|
|
1324
1339
|
color: themeConfig?.icon || "#666666"
|
|
1325
1340
|
}
|
|
1326
1341
|
))),
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ React63.createElement("div", { className: "dialog-divider" }),
|
|
1343
|
+
/* @__PURE__ */ React63.createElement(
|
|
1329
1344
|
"div",
|
|
1330
1345
|
{
|
|
1331
1346
|
className: "dialog-body",
|
|
@@ -1336,14 +1351,14 @@ var BaseDialog = ({
|
|
|
1336
1351
|
},
|
|
1337
1352
|
children
|
|
1338
1353
|
),
|
|
1339
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ React63.createElement("div", { className: "dialog-divider" }),
|
|
1340
1355
|
customButtons || renderButtons()
|
|
1341
1356
|
));
|
|
1342
1357
|
};
|
|
1343
1358
|
var BaseDialog_default = BaseDialog;
|
|
1344
1359
|
|
|
1345
1360
|
// lib/Contexts/rufousThemeProvider.tsx
|
|
1346
|
-
import
|
|
1361
|
+
import React64, {
|
|
1347
1362
|
createContext,
|
|
1348
1363
|
useContext,
|
|
1349
1364
|
useEffect as useEffect2,
|
|
@@ -1380,7 +1395,7 @@ var RufousThemeProvider = ({ children }) => {
|
|
|
1380
1395
|
setCommittedThemeKey(key);
|
|
1381
1396
|
};
|
|
1382
1397
|
const cancelTheme = () => setPreviewThemeKey(committedThemeKey);
|
|
1383
|
-
return /* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ React64.createElement(
|
|
1384
1399
|
RufousThemeContext.Provider,
|
|
1385
1400
|
{
|
|
1386
1401
|
value: {
|
|
@@ -1394,7 +1409,7 @@ var RufousThemeProvider = ({ children }) => {
|
|
|
1394
1409
|
updateSettings: (v) => setSettings(v)
|
|
1395
1410
|
}
|
|
1396
1411
|
},
|
|
1397
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ React64.createElement(
|
|
1398
1413
|
"div",
|
|
1399
1414
|
{
|
|
1400
1415
|
className: `theme-${previewThemeKey || committedThemeKey || "default"}`
|
|
@@ -1406,7 +1421,7 @@ var RufousThemeProvider = ({ children }) => {
|
|
|
1406
1421
|
var useRufousTheme = () => useContext(RufousThemeContext);
|
|
1407
1422
|
|
|
1408
1423
|
// lib/CheckBoxes/CheckBox.jsx
|
|
1409
|
-
import
|
|
1424
|
+
import React65 from "react";
|
|
1410
1425
|
var Checkbox = ({
|
|
1411
1426
|
id,
|
|
1412
1427
|
label,
|
|
@@ -1421,7 +1436,7 @@ var Checkbox = ({
|
|
|
1421
1436
|
const handleChange = (e) => {
|
|
1422
1437
|
if (onChange) onChange(e.target.checked);
|
|
1423
1438
|
};
|
|
1424
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ React65.createElement("div", { className: ["checkbox-wrapper-13", sxClass].filter(Boolean).join(" ") }, /* @__PURE__ */ React65.createElement("label", { className: `${className}`, style }, /* @__PURE__ */ React65.createElement(
|
|
1425
1440
|
"input",
|
|
1426
1441
|
{
|
|
1427
1442
|
id,
|
|
@@ -1430,11 +1445,11 @@ var Checkbox = ({
|
|
|
1430
1445
|
onChange: handleChange,
|
|
1431
1446
|
disabled
|
|
1432
1447
|
}
|
|
1433
|
-
), label && /* @__PURE__ */
|
|
1448
|
+
), label && /* @__PURE__ */ React65.createElement("span", { className: "checkbox-label" }, label)));
|
|
1434
1449
|
};
|
|
1435
1450
|
|
|
1436
1451
|
// lib/TextFields/TextField.tsx
|
|
1437
|
-
import
|
|
1452
|
+
import React66, { forwardRef } from "react";
|
|
1438
1453
|
var TextField = forwardRef(({
|
|
1439
1454
|
label,
|
|
1440
1455
|
name,
|
|
@@ -1481,7 +1496,7 @@ var TextField = forwardRef(({
|
|
|
1481
1496
|
sxClass,
|
|
1482
1497
|
className
|
|
1483
1498
|
].filter(Boolean).join(" ");
|
|
1484
|
-
const internalRef =
|
|
1499
|
+
const internalRef = React66.useRef(null);
|
|
1485
1500
|
const triggerChange = () => {
|
|
1486
1501
|
if (internalRef.current) {
|
|
1487
1502
|
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
@@ -1529,7 +1544,7 @@ var TextField = forwardRef(({
|
|
|
1529
1544
|
props.onKeyDown(e);
|
|
1530
1545
|
}
|
|
1531
1546
|
};
|
|
1532
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ React66.createElement("div", { ref, className: rootClasses, style }, /* @__PURE__ */ React66.createElement("div", { className: `rf-text-field__wrapper ${InputProps?.className || ""}`, style: InputProps?.style }, InputProps?.startAdornment && /* @__PURE__ */ React66.createElement("div", { className: "rf-text-field__adornment rf-text-field__adornment--start" }, InputProps.startAdornment), /* @__PURE__ */ React66.createElement(
|
|
1533
1548
|
"input",
|
|
1534
1549
|
{
|
|
1535
1550
|
ref: internalRef,
|
|
@@ -1547,12 +1562,12 @@ var TextField = forwardRef(({
|
|
|
1547
1562
|
...slotProps?.input,
|
|
1548
1563
|
...props
|
|
1549
1564
|
}
|
|
1550
|
-
), InputProps?.endAdornment && /* @__PURE__ */
|
|
1565
|
+
), InputProps?.endAdornment && /* @__PURE__ */ React66.createElement("div", { className: "rf-text-field__adornment rf-text-field__adornment--end" }, InputProps.endAdornment), type === "number" && !disabled && !readOnly && /* @__PURE__ */ React66.createElement("div", { className: "rf-text-field__number-controls" }, /* @__PURE__ */ React66.createElement("button", { type: "button", tabIndex: -1, onClick: handleIncrement, className: "rf-text-field__number-btn" }, /* @__PURE__ */ React66.createElement("svg", { width: "8", height: "5", viewBox: "0 0 8 5", fill: "currentColor" }, /* @__PURE__ */ React66.createElement("path", { d: "M4 0L8 5H0L4 0Z" }))), /* @__PURE__ */ React66.createElement("button", { type: "button", tabIndex: -1, onClick: handleDecrement, className: "rf-text-field__number-btn", style: { marginTop: 2 } }, /* @__PURE__ */ React66.createElement("svg", { width: "8", height: "5", viewBox: "0 0 8 5", fill: "currentColor" }, /* @__PURE__ */ React66.createElement("path", { d: "M4 5L0 0H8L4 5Z" })))), hasLabel && /* @__PURE__ */ React66.createElement("label", { htmlFor: inputId, className: "rf-text-field__label" }, label, " ", required && /* @__PURE__ */ React66.createElement("span", { className: "rf-text-field__asterisk" }, "*")), variant === "outlined" && /* @__PURE__ */ React66.createElement("fieldset", { className: "rf-text-field__notch" }, hasLabel ? /* @__PURE__ */ React66.createElement("legend", { className: "rf-text-field__legend" }, /* @__PURE__ */ React66.createElement("span", null, label, " ", required ? "*" : "")) : /* @__PURE__ */ React66.createElement("legend", { className: "rf-text-field__legend--empty" }))), helperText && /* @__PURE__ */ React66.createElement("div", { className: "rf-text-field__helper-text" }, helperText));
|
|
1551
1566
|
});
|
|
1552
1567
|
TextField.displayName = "TextField";
|
|
1553
1568
|
|
|
1554
1569
|
// lib/TextFields/AddressLookup.tsx
|
|
1555
|
-
import
|
|
1570
|
+
import React67, { useState as useState4, useRef as useRef3, useEffect as useEffect3 } from "react";
|
|
1556
1571
|
import Axios from "axios";
|
|
1557
1572
|
import { Country, State, City } from "country-state-city";
|
|
1558
1573
|
var AddressLookup = ({
|
|
@@ -1727,7 +1742,7 @@ var AddressLookup = ({
|
|
|
1727
1742
|
city: ""
|
|
1728
1743
|
});
|
|
1729
1744
|
};
|
|
1730
|
-
return /* @__PURE__ */
|
|
1745
|
+
return /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-container", style: sx, ref: containerRef }, /* @__PURE__ */ React67.createElement("div", { className: `address-lookup-grid address-lookup-grid-${layout}` }, /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-l1" }, /* @__PURE__ */ React67.createElement(
|
|
1731
1746
|
TextField,
|
|
1732
1747
|
{
|
|
1733
1748
|
label,
|
|
@@ -1760,7 +1775,7 @@ var AddressLookup = ({
|
|
|
1760
1775
|
},
|
|
1761
1776
|
onFocus: () => suggestions.length > 0 && setShowSuggestions(true)
|
|
1762
1777
|
}
|
|
1763
|
-
), loading && /* @__PURE__ */
|
|
1778
|
+
), loading && /* @__PURE__ */ React67.createElement("div", { className: "loading-indicator" }, /* @__PURE__ */ React67.createElement(circularProgress_default, { size: 20 })), showSuggestions && suggestions.length > 0 && /* @__PURE__ */ React67.createElement("div", { className: "autocomplete-dropdown" }, suggestions.map((option, idx) => /* @__PURE__ */ React67.createElement(
|
|
1764
1779
|
"div",
|
|
1765
1780
|
{
|
|
1766
1781
|
key: idx,
|
|
@@ -1771,9 +1786,9 @@ var AddressLookup = ({
|
|
|
1771
1786
|
fetchPlaceDetails(option.placePrediction.placeId, mainText);
|
|
1772
1787
|
}
|
|
1773
1788
|
},
|
|
1774
|
-
/* @__PURE__ */
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
))), error.addressLine1 && /* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ React67.createElement("div", { className: "autocomplete-main-text" }, option?.placePrediction?.structuredFormat?.mainText?.text),
|
|
1790
|
+
/* @__PURE__ */ React67.createElement("div", { className: "autocomplete-secondary-text" }, option?.placePrediction?.structuredFormat?.secondaryText?.text)
|
|
1791
|
+
))), error.addressLine1 && /* @__PURE__ */ React67.createElement("div", { className: "field-error-text" }, error.addressLine1)), layout === "compact" && /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-l2" }, /* @__PURE__ */ React67.createElement(
|
|
1777
1792
|
TextField,
|
|
1778
1793
|
{
|
|
1779
1794
|
label: "Address Line 2",
|
|
@@ -1782,7 +1797,7 @@ var AddressLookup = ({
|
|
|
1782
1797
|
value: value.addressLine2 || "",
|
|
1783
1798
|
onChange: (e) => handleChange("addressLine2", e.target.value)
|
|
1784
1799
|
}
|
|
1785
|
-
)), layout !== "compact" && /* @__PURE__ */
|
|
1800
|
+
)), layout !== "compact" && /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-l2" }, /* @__PURE__ */ React67.createElement(
|
|
1786
1801
|
TextField,
|
|
1787
1802
|
{
|
|
1788
1803
|
label: "Address Line 2",
|
|
@@ -1791,7 +1806,7 @@ var AddressLookup = ({
|
|
|
1791
1806
|
value: value.addressLine2 || "",
|
|
1792
1807
|
onChange: (e) => handleChange("addressLine2", e.target.value)
|
|
1793
1808
|
}
|
|
1794
|
-
)), /* @__PURE__ */
|
|
1809
|
+
)), /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-country" }, /* @__PURE__ */ React67.createElement(
|
|
1795
1810
|
TextField,
|
|
1796
1811
|
{
|
|
1797
1812
|
label: "Country",
|
|
@@ -1804,7 +1819,7 @@ var AddressLookup = ({
|
|
|
1804
1819
|
onChange: (e) => handleCountryChange(e.target.value),
|
|
1805
1820
|
list: "countries-list"
|
|
1806
1821
|
}
|
|
1807
|
-
), /* @__PURE__ */
|
|
1822
|
+
), /* @__PURE__ */ React67.createElement("datalist", { id: "countries-list" }, countries.map((c) => /* @__PURE__ */ React67.createElement("option", { key: c.isoCode, value: c.name }))), error.country && /* @__PURE__ */ React67.createElement("div", { className: "field-error-text" }, error.country)), /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-state" }, /* @__PURE__ */ React67.createElement(
|
|
1808
1823
|
TextField,
|
|
1809
1824
|
{
|
|
1810
1825
|
label: "State",
|
|
@@ -1818,7 +1833,7 @@ var AddressLookup = ({
|
|
|
1818
1833
|
onChange: (e) => handleStateChange(e.target.value),
|
|
1819
1834
|
list: "states-list"
|
|
1820
1835
|
}
|
|
1821
|
-
), /* @__PURE__ */
|
|
1836
|
+
), /* @__PURE__ */ React67.createElement("datalist", { id: "states-list" }, states.map((s) => /* @__PURE__ */ React67.createElement("option", { key: s.isoCode, value: s.name }))), error.state && /* @__PURE__ */ React67.createElement("div", { className: "field-error-text" }, error.state)), /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-city" }, /* @__PURE__ */ React67.createElement(
|
|
1822
1837
|
TextField,
|
|
1823
1838
|
{
|
|
1824
1839
|
label: "City",
|
|
@@ -1832,7 +1847,7 @@ var AddressLookup = ({
|
|
|
1832
1847
|
onChange: (e) => handleChange("city", e.target.value),
|
|
1833
1848
|
list: "cities-list"
|
|
1834
1849
|
}
|
|
1835
|
-
), /* @__PURE__ */
|
|
1850
|
+
), /* @__PURE__ */ React67.createElement("datalist", { id: "cities-list" }, cities.map((c, i) => /* @__PURE__ */ React67.createElement("option", { key: i, value: c.name }))), error.city && /* @__PURE__ */ React67.createElement("div", { className: "field-error-text" }, error.city)), /* @__PURE__ */ React67.createElement("div", { className: "address-lookup-grid-item col-pin" }, /* @__PURE__ */ React67.createElement(
|
|
1836
1851
|
TextField,
|
|
1837
1852
|
{
|
|
1838
1853
|
label: "Pincode",
|
|
@@ -1844,12 +1859,12 @@ var AddressLookup = ({
|
|
|
1844
1859
|
readOnly: googleFields.pincode && !!value.pincode,
|
|
1845
1860
|
onChange: (e) => handleChange("pincode", e.target.value)
|
|
1846
1861
|
}
|
|
1847
|
-
), error.pincode && /* @__PURE__ */
|
|
1862
|
+
), error.pincode && /* @__PURE__ */ React67.createElement("div", { className: "field-error-text" }, error.pincode))));
|
|
1848
1863
|
};
|
|
1849
1864
|
var AddressLookup_default = AddressLookup;
|
|
1850
1865
|
|
|
1851
1866
|
// lib/TextFields/DateField.tsx
|
|
1852
|
-
import
|
|
1867
|
+
import React68, {
|
|
1853
1868
|
useState as useState5,
|
|
1854
1869
|
useRef as useRef4,
|
|
1855
1870
|
useEffect as useEffect4,
|
|
@@ -1870,10 +1885,25 @@ var MONTHS = [
|
|
|
1870
1885
|
"November",
|
|
1871
1886
|
"December"
|
|
1872
1887
|
];
|
|
1888
|
+
var MONTHS_SHORT = [
|
|
1889
|
+
"Jan",
|
|
1890
|
+
"Feb",
|
|
1891
|
+
"Mar",
|
|
1892
|
+
"Apr",
|
|
1893
|
+
"May",
|
|
1894
|
+
"Jun",
|
|
1895
|
+
"Jul",
|
|
1896
|
+
"Aug",
|
|
1897
|
+
"Sep",
|
|
1898
|
+
"Oct",
|
|
1899
|
+
"Nov",
|
|
1900
|
+
"Dec"
|
|
1901
|
+
];
|
|
1873
1902
|
var formatDisplay = (d, fmt = "MM/DD/YYYY") => {
|
|
1874
1903
|
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
|
1875
1904
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
1876
1905
|
const yyyy = String(d.getFullYear());
|
|
1906
|
+
const day = d.getDate();
|
|
1877
1907
|
switch (fmt) {
|
|
1878
1908
|
case "DD/MM/YYYY":
|
|
1879
1909
|
return `${dd}/${mm}/${yyyy}`;
|
|
@@ -1885,13 +1915,49 @@ var formatDisplay = (d, fmt = "MM/DD/YYYY") => {
|
|
|
1885
1915
|
return `${mm}-${dd}-${yyyy}`;
|
|
1886
1916
|
case "YYYY/MM/DD":
|
|
1887
1917
|
return `${yyyy}/${mm}/${dd}`;
|
|
1918
|
+
case "DD MMM YYYY":
|
|
1919
|
+
return `${dd} ${MONTHS_SHORT[d.getMonth()]} ${yyyy}`;
|
|
1920
|
+
case "MMM DD, YYYY":
|
|
1921
|
+
return `${MONTHS_SHORT[d.getMonth()]} ${dd}, ${yyyy}`;
|
|
1922
|
+
case "DD MMMM YYYY":
|
|
1923
|
+
return `${dd} ${MONTHS[d.getMonth()]} ${yyyy}`;
|
|
1924
|
+
case "MMMM DD, YYYY":
|
|
1925
|
+
return `${MONTHS[d.getMonth()]} ${dd}, ${yyyy}`;
|
|
1888
1926
|
case "MM/DD/YYYY":
|
|
1889
1927
|
default:
|
|
1890
1928
|
return `${mm}/${dd}/${yyyy}`;
|
|
1891
1929
|
}
|
|
1892
1930
|
};
|
|
1893
1931
|
var formatTimeDisplay = (h, m, ampm) => `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")} ${ampm}`;
|
|
1932
|
+
var parseMonthName = (name) => {
|
|
1933
|
+
const lower = name.toLowerCase();
|
|
1934
|
+
let idx = MONTHS.findIndex((m) => m.toLowerCase() === lower);
|
|
1935
|
+
if (idx >= 0) return idx;
|
|
1936
|
+
idx = MONTHS_SHORT.findIndex((m) => m.toLowerCase() === lower);
|
|
1937
|
+
return idx;
|
|
1938
|
+
};
|
|
1894
1939
|
var parseDisplay = (str, fmt = "MM/DD/YYYY") => {
|
|
1940
|
+
if (fmt === "DD MMM YYYY" || fmt === "DD MMMM YYYY") {
|
|
1941
|
+
const parts2 = str.split(" ");
|
|
1942
|
+
if (parts2.length !== 3) return null;
|
|
1943
|
+
const dd2 = parseInt(parts2[0], 10);
|
|
1944
|
+
const mm2 = parseMonthName(parts2[1]);
|
|
1945
|
+
const yyyy2 = parseInt(parts2[2], 10);
|
|
1946
|
+
if (isNaN(dd2) || mm2 < 0 || isNaN(yyyy2) || yyyy2 < 1e3) return null;
|
|
1947
|
+
const d2 = new Date(yyyy2, mm2, dd2);
|
|
1948
|
+
return isNaN(d2.getTime()) ? null : d2;
|
|
1949
|
+
}
|
|
1950
|
+
if (fmt === "MMM DD, YYYY" || fmt === "MMMM DD, YYYY") {
|
|
1951
|
+
const cleaned = str.replace(",", "");
|
|
1952
|
+
const parts2 = cleaned.split(" ").filter(Boolean);
|
|
1953
|
+
if (parts2.length !== 3) return null;
|
|
1954
|
+
const mm2 = parseMonthName(parts2[0]);
|
|
1955
|
+
const dd2 = parseInt(parts2[1], 10);
|
|
1956
|
+
const yyyy2 = parseInt(parts2[2], 10);
|
|
1957
|
+
if (mm2 < 0 || isNaN(dd2) || isNaN(yyyy2) || yyyy2 < 1e3) return null;
|
|
1958
|
+
const d2 = new Date(yyyy2, mm2, dd2);
|
|
1959
|
+
return isNaN(d2.getTime()) ? null : d2;
|
|
1960
|
+
}
|
|
1895
1961
|
const sep = str.includes("/") ? "/" : "-";
|
|
1896
1962
|
const parts = str.split(sep);
|
|
1897
1963
|
if (parts.length !== 3) return null;
|
|
@@ -1949,9 +2015,9 @@ var parseTimeFromISO = (iso) => {
|
|
|
1949
2015
|
if (h === 0) h = 12;
|
|
1950
2016
|
return { h, m, ampm };
|
|
1951
2017
|
};
|
|
1952
|
-
var CalendarIcon = () => /* @__PURE__ */
|
|
1953
|
-
var ChevUp = () => /* @__PURE__ */
|
|
1954
|
-
var ChevDown = () => /* @__PURE__ */
|
|
2018
|
+
var CalendarIcon = () => /* @__PURE__ */ React68.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React68.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React68.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React68.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React68.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
|
|
2019
|
+
var ChevUp = () => /* @__PURE__ */ React68.createElement("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "currentColor" }, /* @__PURE__ */ React68.createElement("path", { d: "M5 0L10 7H0L5 0Z" }));
|
|
2020
|
+
var ChevDown = () => /* @__PURE__ */ React68.createElement("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "currentColor" }, /* @__PURE__ */ React68.createElement("path", { d: "M5 7L0 0H10L5 7Z" }));
|
|
1955
2021
|
var ITEM_H = 36;
|
|
1956
2022
|
var ScrollColumn = ({ items, selected, onSelect, infinite = true }) => {
|
|
1957
2023
|
const listRef = useRef4(null);
|
|
@@ -1999,15 +2065,15 @@ var ScrollColumn = ({ items, selected, onSelect, infinite = true }) => {
|
|
|
1999
2065
|
}
|
|
2000
2066
|
}, 100);
|
|
2001
2067
|
};
|
|
2002
|
-
return /* @__PURE__ */
|
|
2068
|
+
return /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__col-wrapper" }, /* @__PURE__ */ React68.createElement(
|
|
2003
2069
|
"div",
|
|
2004
2070
|
{
|
|
2005
2071
|
className: "rf-timescroll__col",
|
|
2006
2072
|
ref: listRef,
|
|
2007
2073
|
onScroll: handleScroll
|
|
2008
2074
|
},
|
|
2009
|
-
!infinite && /* @__PURE__ */
|
|
2010
|
-
virtualItems.map((label, idx) => /* @__PURE__ */
|
|
2075
|
+
!infinite && /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__spacer" }),
|
|
2076
|
+
virtualItems.map((label, idx) => /* @__PURE__ */ React68.createElement(
|
|
2011
2077
|
"div",
|
|
2012
2078
|
{
|
|
2013
2079
|
key: `${label}-${idx}`,
|
|
@@ -2015,8 +2081,8 @@ var ScrollColumn = ({ items, selected, onSelect, infinite = true }) => {
|
|
|
2015
2081
|
},
|
|
2016
2082
|
label
|
|
2017
2083
|
)),
|
|
2018
|
-
!infinite && /* @__PURE__ */
|
|
2019
|
-
), /* @__PURE__ */
|
|
2084
|
+
!infinite && /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__spacer" })
|
|
2085
|
+
), /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__mask rf-timescroll__mask--top" }), /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__mask rf-timescroll__mask--bottom" }));
|
|
2020
2086
|
};
|
|
2021
2087
|
var SpinnerPanel = ({
|
|
2022
2088
|
hour,
|
|
@@ -2027,7 +2093,7 @@ var SpinnerPanel = ({
|
|
|
2027
2093
|
onHourInput,
|
|
2028
2094
|
onMinuteInput,
|
|
2029
2095
|
onAmpmToggle
|
|
2030
|
-
}) => /* @__PURE__ */
|
|
2096
|
+
}) => /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-row" }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-input-wrap" }, /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__time-spin-btn", onMouseDown: (e) => e.preventDefault(), onClick: () => onHourChange(1) }, /* @__PURE__ */ React68.createElement(ChevUp, null)), /* @__PURE__ */ React68.createElement(
|
|
2031
2097
|
"input",
|
|
2032
2098
|
{
|
|
2033
2099
|
type: "number",
|
|
@@ -2038,7 +2104,7 @@ var SpinnerPanel = ({
|
|
|
2038
2104
|
onChange: onHourInput,
|
|
2039
2105
|
onMouseDown: (e) => e.stopPropagation()
|
|
2040
2106
|
}
|
|
2041
|
-
), /* @__PURE__ */
|
|
2107
|
+
), /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__time-spin-btn", onMouseDown: (e) => e.preventDefault(), onClick: () => onHourChange(-1) }, /* @__PURE__ */ React68.createElement(ChevDown, null))), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-colon" }, ":"), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-input-wrap" }, /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__time-spin-btn", onMouseDown: (e) => e.preventDefault(), onClick: () => onMinuteChange(1) }, /* @__PURE__ */ React68.createElement(ChevUp, null)), /* @__PURE__ */ React68.createElement(
|
|
2042
2108
|
"input",
|
|
2043
2109
|
{
|
|
2044
2110
|
type: "number",
|
|
@@ -2049,7 +2115,7 @@ var SpinnerPanel = ({
|
|
|
2049
2115
|
onChange: onMinuteInput,
|
|
2050
2116
|
onMouseDown: (e) => e.stopPropagation()
|
|
2051
2117
|
}
|
|
2052
|
-
), /* @__PURE__ */
|
|
2118
|
+
), /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__time-spin-btn", onMouseDown: (e) => e.preventDefault(), onClick: () => onMinuteChange(-1) }, /* @__PURE__ */ React68.createElement(ChevDown, null))), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__ampm" }, /* @__PURE__ */ React68.createElement(
|
|
2053
2119
|
"button",
|
|
2054
2120
|
{
|
|
2055
2121
|
type: "button",
|
|
@@ -2058,7 +2124,7 @@ var SpinnerPanel = ({
|
|
|
2058
2124
|
onClick: () => onAmpmToggle("AM")
|
|
2059
2125
|
},
|
|
2060
2126
|
"AM"
|
|
2061
|
-
), /* @__PURE__ */
|
|
2127
|
+
), /* @__PURE__ */ React68.createElement(
|
|
2062
2128
|
"button",
|
|
2063
2129
|
{
|
|
2064
2130
|
type: "button",
|
|
@@ -2076,27 +2142,89 @@ var CalendarBody = ({
|
|
|
2076
2142
|
dayCells,
|
|
2077
2143
|
onDayClick,
|
|
2078
2144
|
onPrev,
|
|
2079
|
-
onNext
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
const
|
|
2084
|
-
const
|
|
2085
|
-
|
|
2145
|
+
onNext,
|
|
2146
|
+
onMonthSelect,
|
|
2147
|
+
onYearSelect
|
|
2148
|
+
}) => {
|
|
2149
|
+
const [pickerView, setPickerView] = useState5("calendar");
|
|
2150
|
+
const handleMonthClick = () => {
|
|
2151
|
+
setPickerView(pickerView === "month" ? "calendar" : "month");
|
|
2152
|
+
};
|
|
2153
|
+
const handleYearClick = () => {
|
|
2154
|
+
setPickerView(pickerView === "year" ? "calendar" : "year");
|
|
2155
|
+
};
|
|
2156
|
+
const handleMonthPick = (month) => {
|
|
2157
|
+
onMonthSelect(month);
|
|
2158
|
+
setPickerView("calendar");
|
|
2159
|
+
};
|
|
2160
|
+
const handleYearPick = (year) => {
|
|
2161
|
+
onYearSelect(year);
|
|
2162
|
+
setPickerView("calendar");
|
|
2163
|
+
};
|
|
2164
|
+
const currentYear = todayDate.getFullYear();
|
|
2165
|
+
const yearStart = viewYear - 6;
|
|
2166
|
+
const years = Array.from({ length: 16 }, (_, i) => yearStart + i);
|
|
2167
|
+
return /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__header" }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__header-labels" }, /* @__PURE__ */ React68.createElement(
|
|
2168
|
+
"span",
|
|
2169
|
+
{
|
|
2170
|
+
className: `rf-date-picker__month-label ${pickerView === "month" ? "rf-date-picker__month-label--active" : ""}`,
|
|
2171
|
+
onClick: handleMonthClick
|
|
2172
|
+
},
|
|
2173
|
+
MONTHS[viewMonth]
|
|
2174
|
+
), /* @__PURE__ */ React68.createElement(
|
|
2175
|
+
"span",
|
|
2176
|
+
{
|
|
2177
|
+
className: `rf-date-picker__year-label ${pickerView === "year" ? "rf-date-picker__year-label--active" : ""}`,
|
|
2178
|
+
onClick: handleYearClick
|
|
2179
|
+
},
|
|
2180
|
+
viewYear
|
|
2181
|
+
)), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__nav" }, pickerView === "year" ? /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: () => onYearSelect(viewYear - 16), "aria-label": "Previous years" }, "\u2039"), /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: () => onYearSelect(viewYear + 16), "aria-label": "Next years" }, "\u203A")) : /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: onPrev, "aria-label": "Previous month" }, "\u2039"), /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__nav-btn", onClick: onNext, "aria-label": "Next month" }, "\u203A")))), pickerView === "month" && /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__month-grid" }, MONTHS_SHORT.map((m, idx) => /* @__PURE__ */ React68.createElement(
|
|
2086
2182
|
"button",
|
|
2087
2183
|
{
|
|
2088
|
-
key:
|
|
2184
|
+
key: m,
|
|
2089
2185
|
type: "button",
|
|
2090
2186
|
className: [
|
|
2091
|
-
"rf-date-
|
|
2092
|
-
|
|
2093
|
-
|
|
2187
|
+
"rf-date-picker__month-cell",
|
|
2188
|
+
idx === viewMonth ? "rf-date-picker__month-cell--selected" : "",
|
|
2189
|
+
idx === todayDate.getMonth() && viewYear === currentYear ? "rf-date-picker__month-cell--current" : ""
|
|
2094
2190
|
].filter(Boolean).join(" "),
|
|
2095
|
-
onClick: () =>
|
|
2191
|
+
onClick: () => handleMonthPick(idx)
|
|
2096
2192
|
},
|
|
2097
|
-
|
|
2098
|
-
)
|
|
2099
|
-
|
|
2193
|
+
m
|
|
2194
|
+
))), pickerView === "year" && /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__year-grid" }, years.map((y) => /* @__PURE__ */ React68.createElement(
|
|
2195
|
+
"button",
|
|
2196
|
+
{
|
|
2197
|
+
key: y,
|
|
2198
|
+
type: "button",
|
|
2199
|
+
className: [
|
|
2200
|
+
"rf-date-picker__year-cell",
|
|
2201
|
+
y === viewYear ? "rf-date-picker__year-cell--selected" : "",
|
|
2202
|
+
y === currentYear ? "rf-date-picker__year-cell--current" : ""
|
|
2203
|
+
].filter(Boolean).join(" "),
|
|
2204
|
+
onClick: () => handleYearPick(y)
|
|
2205
|
+
},
|
|
2206
|
+
y
|
|
2207
|
+
))), pickerView === "calendar" && /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__weekdays" }, WEEKDAYS.map((w) => /* @__PURE__ */ React68.createElement("div", { key: w, className: "rf-date-picker__weekday" }, w))), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__grid" }, dayCells.map((day, idx) => {
|
|
2208
|
+
if (day === null) return /* @__PURE__ */ React68.createElement("div", { key: `e-${idx}`, className: "rf-date-picker__day rf-date-picker__day--empty" });
|
|
2209
|
+
const cellDate = new Date(viewYear, viewMonth, day);
|
|
2210
|
+
const isSelected = selectedDate ? isSameDay(cellDate, selectedDate) : false;
|
|
2211
|
+
const isToday = isSameDay(cellDate, todayDate);
|
|
2212
|
+
return /* @__PURE__ */ React68.createElement(
|
|
2213
|
+
"button",
|
|
2214
|
+
{
|
|
2215
|
+
key: day,
|
|
2216
|
+
type: "button",
|
|
2217
|
+
className: [
|
|
2218
|
+
"rf-date-picker__day",
|
|
2219
|
+
isSelected ? "rf-date-picker__day--selected" : "",
|
|
2220
|
+
isToday && !isSelected ? "rf-date-picker__day--today" : ""
|
|
2221
|
+
].filter(Boolean).join(" "),
|
|
2222
|
+
onClick: () => onDayClick(day)
|
|
2223
|
+
},
|
|
2224
|
+
day
|
|
2225
|
+
);
|
|
2226
|
+
}))));
|
|
2227
|
+
};
|
|
2100
2228
|
var DateField = ({
|
|
2101
2229
|
label,
|
|
2102
2230
|
value,
|
|
@@ -2154,7 +2282,9 @@ var DateField = ({
|
|
|
2154
2282
|
const MINUTES = Array.from({ length: 60 }, (_, i) => String(i).padStart(2, "0"));
|
|
2155
2283
|
const AMPMS = ["AM", "PM"];
|
|
2156
2284
|
const containerRef = useRef4(null);
|
|
2157
|
-
const
|
|
2285
|
+
const pickerRef = useRef4(null);
|
|
2286
|
+
const [dropUp, setDropUp] = useState5(false);
|
|
2287
|
+
const inputId = useRef4(`rf-df-${Math.random().toString(36).substring(2, 11)}`).current;
|
|
2158
2288
|
useEffect4(() => {
|
|
2159
2289
|
if (value === void 0) return;
|
|
2160
2290
|
if (!value) {
|
|
@@ -2186,6 +2316,13 @@ var DateField = ({
|
|
|
2186
2316
|
document.addEventListener("mousedown", handler);
|
|
2187
2317
|
return () => document.removeEventListener("mousedown", handler);
|
|
2188
2318
|
}, [open]);
|
|
2319
|
+
useEffect4(() => {
|
|
2320
|
+
if (!open || !containerRef.current) return;
|
|
2321
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
2322
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
2323
|
+
const pickerHeight = 400;
|
|
2324
|
+
setDropUp(spaceBelow < pickerHeight && rect.top > pickerHeight);
|
|
2325
|
+
}, [open]);
|
|
2189
2326
|
const commitDate = useCallback((d, h, m, ap) => {
|
|
2190
2327
|
setSelectedDate(d);
|
|
2191
2328
|
if (!d) {
|
|
@@ -2333,7 +2470,7 @@ var DateField = ({
|
|
|
2333
2470
|
const inputPlaceholder = placeholder || (variant === "outlined" ? " " : void 0);
|
|
2334
2471
|
const todayDate = today();
|
|
2335
2472
|
const isSideVariant = type === "datetime-side" || type === "datetime-scroll";
|
|
2336
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ React68.createElement("div", { ref: containerRef, className: rootClasses, style }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-field__anchor" }, /* @__PURE__ */ React68.createElement(
|
|
2337
2474
|
"div",
|
|
2338
2475
|
{
|
|
2339
2476
|
className: "rf-text-field__wrapper",
|
|
@@ -2342,7 +2479,7 @@ var DateField = ({
|
|
|
2342
2479
|
},
|
|
2343
2480
|
style: { cursor: disabled ? "default" : "pointer" }
|
|
2344
2481
|
},
|
|
2345
|
-
/* @__PURE__ */
|
|
2482
|
+
/* @__PURE__ */ React68.createElement(
|
|
2346
2483
|
"input",
|
|
2347
2484
|
{
|
|
2348
2485
|
id: inputId,
|
|
@@ -2358,7 +2495,7 @@ var DateField = ({
|
|
|
2358
2495
|
}
|
|
2359
2496
|
}
|
|
2360
2497
|
),
|
|
2361
|
-
/* @__PURE__ */
|
|
2498
|
+
/* @__PURE__ */ React68.createElement("div", { className: "rf-text-field__adornment rf-text-field__adornment--end" }, /* @__PURE__ */ React68.createElement(
|
|
2362
2499
|
"button",
|
|
2363
2500
|
{
|
|
2364
2501
|
type: "button",
|
|
@@ -2371,20 +2508,22 @@ var DateField = ({
|
|
|
2371
2508
|
},
|
|
2372
2509
|
"aria-label": "Pick date"
|
|
2373
2510
|
},
|
|
2374
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ React68.createElement(CalendarIcon, null)
|
|
2375
2512
|
)),
|
|
2376
|
-
label && /* @__PURE__ */
|
|
2377
|
-
variant === "outlined" && /* @__PURE__ */
|
|
2378
|
-
), open && !disabled && /* @__PURE__ */
|
|
2513
|
+
label && /* @__PURE__ */ React68.createElement("label", { htmlFor: inputId, className: "rf-text-field__label" }, label, " ", required && /* @__PURE__ */ React68.createElement("span", { className: "rf-text-field__asterisk" }, "*")),
|
|
2514
|
+
variant === "outlined" && /* @__PURE__ */ React68.createElement("fieldset", { className: "rf-text-field__notch" }, label && /* @__PURE__ */ React68.createElement("legend", { className: "rf-text-field__legend" }, /* @__PURE__ */ React68.createElement("span", null, label, required ? " *" : "")))
|
|
2515
|
+
), open && !disabled && /* @__PURE__ */ React68.createElement(
|
|
2379
2516
|
"div",
|
|
2380
2517
|
{
|
|
2518
|
+
ref: pickerRef,
|
|
2381
2519
|
className: [
|
|
2382
2520
|
"rf-date-picker",
|
|
2383
|
-
isSideVariant ? "rf-date-picker--side" : ""
|
|
2521
|
+
isSideVariant ? "rf-date-picker--side" : "",
|
|
2522
|
+
dropUp ? "rf-date-picker--drop-up" : ""
|
|
2384
2523
|
].filter(Boolean).join(" "),
|
|
2385
2524
|
onMouseDown: (e) => e.preventDefault()
|
|
2386
2525
|
},
|
|
2387
|
-
/* @__PURE__ */
|
|
2526
|
+
/* @__PURE__ */ React68.createElement("div", { className: isSideVariant ? "rf-date-picker__cal-col" : void 0 }, /* @__PURE__ */ React68.createElement(
|
|
2388
2527
|
CalendarBody,
|
|
2389
2528
|
{
|
|
2390
2529
|
viewMonth,
|
|
@@ -2394,9 +2533,11 @@ var DateField = ({
|
|
|
2394
2533
|
dayCells,
|
|
2395
2534
|
onDayClick: handleDayClick,
|
|
2396
2535
|
onPrev: prevMonth,
|
|
2397
|
-
onNext: nextMonth
|
|
2536
|
+
onNext: nextMonth,
|
|
2537
|
+
onMonthSelect: setViewMonth,
|
|
2538
|
+
onYearSelect: setViewYear
|
|
2398
2539
|
}
|
|
2399
|
-
), type === "datetime" && /* @__PURE__ */
|
|
2540
|
+
), type === "datetime" && /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-section" }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__time-label" }, "Time"), /* @__PURE__ */ React68.createElement(
|
|
2400
2541
|
SpinnerPanel,
|
|
2401
2542
|
{
|
|
2402
2543
|
hour,
|
|
@@ -2408,8 +2549,8 @@ var DateField = ({
|
|
|
2408
2549
|
onMinuteInput: handleMinuteInput,
|
|
2409
2550
|
onAmpmToggle: handleAmpmToggle
|
|
2410
2551
|
}
|
|
2411
|
-
)), /* @__PURE__ */
|
|
2412
|
-
type === "datetime-side" && /* @__PURE__ */
|
|
2552
|
+
)), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__divider" }), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__footer" }, /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__footer-btn", onClick: handleToday }, "Today"), /* @__PURE__ */ React68.createElement("button", { type: "button", className: "rf-date-picker__footer-btn rf-date-picker__footer-btn--clear", onClick: handleClear }, "Clear"))),
|
|
2553
|
+
type === "datetime-side" && /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-panel" }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-label" }, "Time"), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-spinner" }, /* @__PURE__ */ React68.createElement(
|
|
2413
2554
|
SpinnerPanel,
|
|
2414
2555
|
{
|
|
2415
2556
|
hour,
|
|
@@ -2421,22 +2562,22 @@ var DateField = ({
|
|
|
2421
2562
|
onMinuteInput: handleMinuteInput,
|
|
2422
2563
|
onAmpmToggle: handleAmpmToggle
|
|
2423
2564
|
}
|
|
2424
|
-
)), /* @__PURE__ */
|
|
2425
|
-
type === "datetime-scroll" && /* @__PURE__ */
|
|
2565
|
+
)), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-time-display" }, String(hour).padStart(2, "0"), ":", String(minute).padStart(2, "0"), " ", ampm)),
|
|
2566
|
+
type === "datetime-scroll" && /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-panel" }, /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-label" }, "Time"), /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll" }, /* @__PURE__ */ React68.createElement(
|
|
2426
2567
|
ScrollColumn,
|
|
2427
2568
|
{
|
|
2428
2569
|
items: HOURS,
|
|
2429
2570
|
selected: hour - 1,
|
|
2430
2571
|
onSelect: handleScrollHour
|
|
2431
2572
|
}
|
|
2432
|
-
), /* @__PURE__ */
|
|
2573
|
+
), /* @__PURE__ */ React68.createElement("div", { className: "rf-timescroll__colon" }, ":"), /* @__PURE__ */ React68.createElement(
|
|
2433
2574
|
ScrollColumn,
|
|
2434
2575
|
{
|
|
2435
2576
|
items: MINUTES,
|
|
2436
2577
|
selected: minute,
|
|
2437
2578
|
onSelect: handleScrollMinute
|
|
2438
2579
|
}
|
|
2439
|
-
), /* @__PURE__ */
|
|
2580
|
+
), /* @__PURE__ */ React68.createElement(
|
|
2440
2581
|
ScrollColumn,
|
|
2441
2582
|
{
|
|
2442
2583
|
items: AMPMS,
|
|
@@ -2444,13 +2585,13 @@ var DateField = ({
|
|
|
2444
2585
|
onSelect: handleScrollAmpm,
|
|
2445
2586
|
infinite: false
|
|
2446
2587
|
}
|
|
2447
|
-
)), /* @__PURE__ */
|
|
2448
|
-
)), helperText && /* @__PURE__ */
|
|
2588
|
+
)), /* @__PURE__ */ React68.createElement("div", { className: "rf-date-picker__side-time-display" }, String(hour).padStart(2, "0"), ":", String(minute).padStart(2, "0"), " ", ampm))
|
|
2589
|
+
)), helperText && /* @__PURE__ */ React68.createElement("div", { className: "rf-text-field__helper-text" }, helperText));
|
|
2449
2590
|
};
|
|
2450
2591
|
DateField.displayName = "DateField";
|
|
2451
2592
|
|
|
2452
2593
|
// lib/TextFields/DateRangeField.tsx
|
|
2453
|
-
import
|
|
2594
|
+
import React69, {
|
|
2454
2595
|
useState as useState6,
|
|
2455
2596
|
useRef as useRef5,
|
|
2456
2597
|
useEffect as useEffect5
|
|
@@ -2470,7 +2611,7 @@ var MONTHS2 = [
|
|
|
2470
2611
|
"November",
|
|
2471
2612
|
"December"
|
|
2472
2613
|
];
|
|
2473
|
-
var
|
|
2614
|
+
var MONTHS_SHORT2 = [
|
|
2474
2615
|
"Jan",
|
|
2475
2616
|
"Feb",
|
|
2476
2617
|
"Mar",
|
|
@@ -2507,14 +2648,14 @@ var dateToISO = (d) => {
|
|
|
2507
2648
|
const dd = String(d.getDate()).padStart(2, "0");
|
|
2508
2649
|
return `${y}-${mo}-${dd}`;
|
|
2509
2650
|
};
|
|
2510
|
-
var formatShort = (d) => `${String(d.getDate()).padStart(2, "0")} ${
|
|
2651
|
+
var formatShort = (d) => `${String(d.getDate()).padStart(2, "0")} ${MONTHS_SHORT2[d.getMonth()]} ${d.getFullYear()}`;
|
|
2511
2652
|
var parseInputDate = (str) => {
|
|
2512
2653
|
const s = str.trim();
|
|
2513
2654
|
if (!s) return null;
|
|
2514
2655
|
const shortMatch = s.match(/^(\d{1,2})\s+([A-Za-z]+)\s+(\d{4})$/);
|
|
2515
2656
|
if (shortMatch) {
|
|
2516
2657
|
const day = parseInt(shortMatch[1], 10);
|
|
2517
|
-
const monthIdx =
|
|
2658
|
+
const monthIdx = MONTHS_SHORT2.findIndex((m) => m.toLowerCase() === shortMatch[2].toLowerCase());
|
|
2518
2659
|
const year = parseInt(shortMatch[3], 10);
|
|
2519
2660
|
if (monthIdx !== -1 && day >= 1 && day <= 31 && year >= 1e3) {
|
|
2520
2661
|
const d = new Date(year, monthIdx, day);
|
|
@@ -2579,7 +2720,7 @@ var detectPreset = (start, end) => {
|
|
|
2579
2720
|
if (isSameDay2(start, new Date(2e3, 0, 1)) && isSameDay2(end, today2)) return "all";
|
|
2580
2721
|
return null;
|
|
2581
2722
|
};
|
|
2582
|
-
var CalendarIcon2 = () => /* @__PURE__ */
|
|
2723
|
+
var CalendarIcon2 = () => /* @__PURE__ */ React69.createElement("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React69.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), /* @__PURE__ */ React69.createElement("line", { x1: "16", y1: "2", x2: "16", y2: "6" }), /* @__PURE__ */ React69.createElement("line", { x1: "8", y1: "2", x2: "8", y2: "6" }), /* @__PURE__ */ React69.createElement("line", { x1: "3", y1: "10", x2: "21", y2: "10" }));
|
|
2583
2724
|
var RangeCalendarBody = ({
|
|
2584
2725
|
viewYear,
|
|
2585
2726
|
viewMonth,
|
|
@@ -2604,7 +2745,7 @@ var RangeCalendarBody = ({
|
|
|
2604
2745
|
const hasRange = startDate != null && effectiveEnd != null && !isSameDay2(startDate, effectiveEnd);
|
|
2605
2746
|
const lo = startDate && effectiveEnd ? startDate <= effectiveEnd ? startDate : effectiveEnd : null;
|
|
2606
2747
|
const hi = startDate && effectiveEnd ? startDate <= effectiveEnd ? effectiveEnd : startDate : null;
|
|
2607
|
-
return /* @__PURE__ */
|
|
2748
|
+
return /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar" }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar__header" }, /* @__PURE__ */ React69.createElement(
|
|
2608
2749
|
"button",
|
|
2609
2750
|
{
|
|
2610
2751
|
type: "button",
|
|
@@ -2614,7 +2755,7 @@ var RangeCalendarBody = ({
|
|
|
2614
2755
|
"aria-label": "Previous month"
|
|
2615
2756
|
},
|
|
2616
2757
|
"\u2039"
|
|
2617
|
-
), /* @__PURE__ */
|
|
2758
|
+
), /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-calendar__month-label" }, MONTHS2[viewMonth], " ", viewYear), /* @__PURE__ */ React69.createElement(
|
|
2618
2759
|
"button",
|
|
2619
2760
|
{
|
|
2620
2761
|
type: "button",
|
|
@@ -2624,9 +2765,9 @@ var RangeCalendarBody = ({
|
|
|
2624
2765
|
"aria-label": "Next month"
|
|
2625
2766
|
},
|
|
2626
2767
|
"\u203A"
|
|
2627
|
-
)), /* @__PURE__ */
|
|
2768
|
+
)), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar__weekdays" }, WEEKDAYS2.map((w) => /* @__PURE__ */ React69.createElement("div", { key: w, className: "rf-dr-calendar__weekday" }, w))), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar__grid" }, dayCells.map((day, idx) => {
|
|
2628
2769
|
if (day === null) {
|
|
2629
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ React69.createElement("div", { key: `e-${idx}`, className: "rf-dr-calendar__cell rf-dr-calendar__cell--empty" });
|
|
2630
2771
|
}
|
|
2631
2772
|
const cellDate = new Date(viewYear, viewMonth, day);
|
|
2632
2773
|
const isStart = startDate ? isSameDay2(cellDate, startDate) : false;
|
|
@@ -2646,7 +2787,7 @@ var RangeCalendarBody = ({
|
|
|
2646
2787
|
isStart || isEnd ? "rf-dr-calendar__day--selected" : "",
|
|
2647
2788
|
isToday && !isStart && !isEnd ? "rf-dr-calendar__day--today" : ""
|
|
2648
2789
|
].filter(Boolean).join(" ");
|
|
2649
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ React69.createElement(
|
|
2650
2791
|
"div",
|
|
2651
2792
|
{
|
|
2652
2793
|
key: day,
|
|
@@ -2654,7 +2795,7 @@ var RangeCalendarBody = ({
|
|
|
2654
2795
|
onMouseEnter: () => onDayHover(cellDate),
|
|
2655
2796
|
onMouseLeave: () => onDayHover(null)
|
|
2656
2797
|
},
|
|
2657
|
-
/* @__PURE__ */
|
|
2798
|
+
/* @__PURE__ */ React69.createElement(
|
|
2658
2799
|
"button",
|
|
2659
2800
|
{
|
|
2660
2801
|
type: "button",
|
|
@@ -2688,14 +2829,14 @@ var MiniCalendar = ({ selectedDate, todayDate, onSelect, onClose }) => {
|
|
|
2688
2829
|
setViewYear((y) => y + 1);
|
|
2689
2830
|
} else setViewMonth((m) => m + 1);
|
|
2690
2831
|
};
|
|
2691
|
-
return /* @__PURE__ */
|
|
2832
|
+
return /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-mini-cal" }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-mini-cal__header" }, /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-calendar__nav-btn", onClick: prevMonth }, "\u2039"), /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-calendar__month-label", style: { fontSize: "0.88rem" } }, MONTHS2[viewMonth], " ", viewYear), /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-calendar__nav-btn", onClick: nextMonth }, "\u203A")), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar__weekdays" }, WEEKDAYS2.map((w) => /* @__PURE__ */ React69.createElement("div", { key: w, className: "rf-dr-calendar__weekday" }, w))), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-calendar__grid" }, dayCells.map((day, idx) => {
|
|
2692
2833
|
if (day === null) {
|
|
2693
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ React69.createElement("div", { key: `e-${idx}`, className: "rf-dr-calendar__cell rf-dr-calendar__cell--empty" });
|
|
2694
2835
|
}
|
|
2695
2836
|
const cellDate = new Date(viewYear, viewMonth, day);
|
|
2696
2837
|
const isSel = selectedDate ? isSameDay2(cellDate, selectedDate) : false;
|
|
2697
2838
|
const isToday = isSameDay2(cellDate, todayDate);
|
|
2698
|
-
return /* @__PURE__ */
|
|
2839
|
+
return /* @__PURE__ */ React69.createElement("div", { key: day, className: "rf-dr-calendar__cell" }, /* @__PURE__ */ React69.createElement(
|
|
2699
2840
|
"button",
|
|
2700
2841
|
{
|
|
2701
2842
|
type: "button",
|
|
@@ -2903,7 +3044,7 @@ var DateRangeField = ({
|
|
|
2903
3044
|
className
|
|
2904
3045
|
].filter(Boolean).join(" ");
|
|
2905
3046
|
const inputPlaceholder = variant === "outlined" ? " " : void 0;
|
|
2906
|
-
return /* @__PURE__ */
|
|
3047
|
+
return /* @__PURE__ */ React69.createElement("div", { ref: containerRef, className: rootClasses, style }, /* @__PURE__ */ React69.createElement("div", { className: "rf-date-field__anchor" }, /* @__PURE__ */ React69.createElement(
|
|
2907
3048
|
"div",
|
|
2908
3049
|
{
|
|
2909
3050
|
className: "rf-text-field__wrapper",
|
|
@@ -2912,7 +3053,7 @@ var DateRangeField = ({
|
|
|
2912
3053
|
},
|
|
2913
3054
|
style: { cursor: disabled ? "default" : "pointer" }
|
|
2914
3055
|
},
|
|
2915
|
-
/* @__PURE__ */
|
|
3056
|
+
/* @__PURE__ */ React69.createElement(
|
|
2916
3057
|
"input",
|
|
2917
3058
|
{
|
|
2918
3059
|
id: inputId,
|
|
@@ -2928,7 +3069,7 @@ var DateRangeField = ({
|
|
|
2928
3069
|
}
|
|
2929
3070
|
}
|
|
2930
3071
|
),
|
|
2931
|
-
/* @__PURE__ */
|
|
3072
|
+
/* @__PURE__ */ React69.createElement("div", { className: "rf-text-field__adornment rf-text-field__adornment--end" }, /* @__PURE__ */ React69.createElement(
|
|
2932
3073
|
"button",
|
|
2933
3074
|
{
|
|
2934
3075
|
type: "button",
|
|
@@ -2941,13 +3082,13 @@ var DateRangeField = ({
|
|
|
2941
3082
|
},
|
|
2942
3083
|
"aria-label": "Pick date range"
|
|
2943
3084
|
},
|
|
2944
|
-
/* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ React69.createElement(CalendarIcon2, null)
|
|
2945
3086
|
)),
|
|
2946
|
-
label && /* @__PURE__ */
|
|
2947
|
-
variant === "outlined" && /* @__PURE__ */
|
|
3087
|
+
label && /* @__PURE__ */ React69.createElement("label", { htmlFor: inputId, className: "rf-text-field__label" }, label, " ", required && /* @__PURE__ */ React69.createElement("span", { className: "rf-text-field__asterisk" }, "*")),
|
|
3088
|
+
variant === "outlined" && /* @__PURE__ */ React69.createElement("fieldset", { className: "rf-text-field__notch" }, label ? /* @__PURE__ */ React69.createElement("legend", { className: "rf-text-field__legend" }, /* @__PURE__ */ React69.createElement("span", null, label, required ? " *" : "")) : /* @__PURE__ */ React69.createElement("legend", { className: "rf-text-field__legend--empty" }))
|
|
2948
3089
|
), open && !disabled && (pickerType === "panel" ? (
|
|
2949
3090
|
/* ── Panel Mode ── */
|
|
2950
|
-
/* @__PURE__ */
|
|
3091
|
+
/* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker rf-dr-picker--panel", onMouseDown: (e) => e.preventDefault() }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__presets" }, PRESETS.map((p, i) => /* @__PURE__ */ React69.createElement(React69.Fragment, { key: p.id }, i > 0 && /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__preset-sep" }), /* @__PURE__ */ React69.createElement(
|
|
2951
3092
|
"button",
|
|
2952
3093
|
{
|
|
2953
3094
|
type: "button",
|
|
@@ -2958,7 +3099,7 @@ var DateRangeField = ({
|
|
|
2958
3099
|
onClick: () => handlePreset(p.id)
|
|
2959
3100
|
},
|
|
2960
3101
|
p.label
|
|
2961
|
-
)))), /* @__PURE__ */
|
|
3102
|
+
)))), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__manual" }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__date-field-wrap" }, /* @__PURE__ */ React69.createElement(
|
|
2962
3103
|
"div",
|
|
2963
3104
|
{
|
|
2964
3105
|
className: [
|
|
@@ -2966,8 +3107,8 @@ var DateRangeField = ({
|
|
|
2966
3107
|
inlineCal === "start" ? "rf-dr-picker__date-field--active" : ""
|
|
2967
3108
|
].filter(Boolean).join(" ")
|
|
2968
3109
|
},
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
3110
|
+
/* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__date-floating-label" }, "Start Date"),
|
|
3111
|
+
/* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__date-display" }, /* @__PURE__ */ React69.createElement(
|
|
2971
3112
|
"input",
|
|
2972
3113
|
{
|
|
2973
3114
|
type: "text",
|
|
@@ -2978,7 +3119,7 @@ var DateRangeField = ({
|
|
|
2978
3119
|
onBlur: handleStartInputBlur,
|
|
2979
3120
|
onMouseDown: (e) => e.stopPropagation()
|
|
2980
3121
|
}
|
|
2981
|
-
), /* @__PURE__ */
|
|
3122
|
+
), /* @__PURE__ */ React69.createElement(
|
|
2982
3123
|
"button",
|
|
2983
3124
|
{
|
|
2984
3125
|
type: "button",
|
|
@@ -2987,9 +3128,9 @@ var DateRangeField = ({
|
|
|
2987
3128
|
onClick: () => setInlineCal((v) => v === "start" ? null : "start"),
|
|
2988
3129
|
"aria-label": "Pick start date"
|
|
2989
3130
|
},
|
|
2990
|
-
/* @__PURE__ */
|
|
3131
|
+
/* @__PURE__ */ React69.createElement(CalendarIcon2, null)
|
|
2991
3132
|
))
|
|
2992
|
-
), inlineCal === "start" && /* @__PURE__ */
|
|
3133
|
+
), inlineCal === "start" && /* @__PURE__ */ React69.createElement(
|
|
2993
3134
|
MiniCalendar,
|
|
2994
3135
|
{
|
|
2995
3136
|
selectedDate: draftStart,
|
|
@@ -3000,7 +3141,7 @@ var DateRangeField = ({
|
|
|
3000
3141
|
},
|
|
3001
3142
|
onClose: () => setInlineCal(null)
|
|
3002
3143
|
}
|
|
3003
|
-
)), /* @__PURE__ */
|
|
3144
|
+
)), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__date-field-wrap" }, /* @__PURE__ */ React69.createElement(
|
|
3004
3145
|
"div",
|
|
3005
3146
|
{
|
|
3006
3147
|
className: [
|
|
@@ -3008,8 +3149,8 @@ var DateRangeField = ({
|
|
|
3008
3149
|
inlineCal === "end" ? "rf-dr-picker__date-field--active" : ""
|
|
3009
3150
|
].filter(Boolean).join(" ")
|
|
3010
3151
|
},
|
|
3011
|
-
/* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__date-floating-label" }, "End Date"),
|
|
3153
|
+
/* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__date-display" }, /* @__PURE__ */ React69.createElement(
|
|
3013
3154
|
"input",
|
|
3014
3155
|
{
|
|
3015
3156
|
type: "text",
|
|
@@ -3020,7 +3161,7 @@ var DateRangeField = ({
|
|
|
3020
3161
|
onBlur: handleEndInputBlur,
|
|
3021
3162
|
onMouseDown: (e) => e.stopPropagation()
|
|
3022
3163
|
}
|
|
3023
|
-
), /* @__PURE__ */
|
|
3164
|
+
), /* @__PURE__ */ React69.createElement(
|
|
3024
3165
|
"button",
|
|
3025
3166
|
{
|
|
3026
3167
|
type: "button",
|
|
@@ -3029,9 +3170,9 @@ var DateRangeField = ({
|
|
|
3029
3170
|
onClick: () => setInlineCal((v) => v === "end" ? null : "end"),
|
|
3030
3171
|
"aria-label": "Pick end date"
|
|
3031
3172
|
},
|
|
3032
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ React69.createElement(CalendarIcon2, null)
|
|
3033
3174
|
))
|
|
3034
|
-
), inlineCal === "end" && /* @__PURE__ */
|
|
3175
|
+
), inlineCal === "end" && /* @__PURE__ */ React69.createElement(
|
|
3035
3176
|
MiniCalendar,
|
|
3036
3177
|
{
|
|
3037
3178
|
selectedDate: draftEnd,
|
|
@@ -3042,7 +3183,7 @@ var DateRangeField = ({
|
|
|
3042
3183
|
},
|
|
3043
3184
|
onClose: () => setInlineCal(null)
|
|
3044
3185
|
}
|
|
3045
|
-
)), !inlineCal && /* @__PURE__ */
|
|
3186
|
+
)), !inlineCal && /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__days-section" }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__days-row" }, /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__days-label" }, "Days until today"), /* @__PURE__ */ React69.createElement(
|
|
3046
3187
|
"input",
|
|
3047
3188
|
{
|
|
3048
3189
|
type: "number",
|
|
@@ -3053,7 +3194,7 @@ var DateRangeField = ({
|
|
|
3053
3194
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3054
3195
|
placeholder: "\u2014"
|
|
3055
3196
|
}
|
|
3056
|
-
)), /* @__PURE__ */
|
|
3197
|
+
)), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__days-row" }, /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__days-label" }, "Days from today"), /* @__PURE__ */ React69.createElement(
|
|
3057
3198
|
"input",
|
|
3058
3199
|
{
|
|
3059
3200
|
type: "number",
|
|
@@ -3064,10 +3205,10 @@ var DateRangeField = ({
|
|
|
3064
3205
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3065
3206
|
placeholder: "\u2014"
|
|
3066
3207
|
}
|
|
3067
|
-
))), /* @__PURE__ */
|
|
3208
|
+
))), /* @__PURE__ */ React69.createElement("div", { style: { flex: 1 } }), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__footer" }, /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-picker__close-btn", onClick: handleClose }, "CLOSE"), /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-picker__apply-btn", onClick: handleApply }, "APPLY"))))
|
|
3068
3209
|
) : (
|
|
3069
3210
|
/* ── Calendar Mode ── */
|
|
3070
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker rf-dr-picker--calendar", onMouseDown: (e) => e.preventDefault() }, /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__calendars" }, /* @__PURE__ */ React69.createElement(
|
|
3071
3212
|
RangeCalendarBody,
|
|
3072
3213
|
{
|
|
3073
3214
|
viewYear: leftViewYear,
|
|
@@ -3082,7 +3223,7 @@ var DateRangeField = ({
|
|
|
3082
3223
|
onNext: nextMonth,
|
|
3083
3224
|
showNext: false
|
|
3084
3225
|
}
|
|
3085
|
-
), /* @__PURE__ */
|
|
3226
|
+
), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__cal-col-divider" }), /* @__PURE__ */ React69.createElement(
|
|
3086
3227
|
RangeCalendarBody,
|
|
3087
3228
|
{
|
|
3088
3229
|
viewYear: rightViewYear,
|
|
@@ -3097,21 +3238,21 @@ var DateRangeField = ({
|
|
|
3097
3238
|
onNext: nextMonth,
|
|
3098
3239
|
showPrev: false
|
|
3099
3240
|
}
|
|
3100
|
-
)), selecting === "end" && draftStart && /* @__PURE__ */
|
|
3101
|
-
))), helperText && /* @__PURE__ */
|
|
3241
|
+
)), selecting === "end" && draftStart && /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__cal-hint" }, /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__cal-hint-dot" }), /* @__PURE__ */ React69.createElement("span", null, "Select end date \xB7 started from ", /* @__PURE__ */ React69.createElement("strong", null, formatShort(draftStart)))), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__divider" }), /* @__PURE__ */ React69.createElement("div", { className: "rf-dr-picker__cal-footer" }, draftStart && draftEnd && /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__cal-range-label" }, formatShort(draftStart <= draftEnd ? draftStart : draftEnd), " \u2013 ", formatShort(draftStart <= draftEnd ? draftEnd : draftStart), /* @__PURE__ */ React69.createElement("span", { className: "rf-dr-picker__cal-range-days" }, " ", "(", Math.abs(daysBetween(draftStart, draftEnd)) + 1, " days)")), /* @__PURE__ */ React69.createElement("div", { style: { flex: 1 } }), /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-picker__close-btn", onClick: handleClose }, "CLOSE"), /* @__PURE__ */ React69.createElement("button", { type: "button", className: "rf-dr-picker__apply-btn", onClick: handleApply }, "APPLY")))
|
|
3242
|
+
))), helperText && /* @__PURE__ */ React69.createElement("div", { className: "rf-text-field__helper-text" }, helperText));
|
|
3102
3243
|
};
|
|
3103
3244
|
DateRangeField.displayName = "DateRangeField";
|
|
3104
3245
|
|
|
3105
3246
|
// lib/TextFields/Autocomplete.tsx
|
|
3106
|
-
import
|
|
3247
|
+
import React70, {
|
|
3107
3248
|
useState as useState7,
|
|
3108
3249
|
useRef as useRef6,
|
|
3109
3250
|
useEffect as useEffect6,
|
|
3110
3251
|
useCallback as useCallback2
|
|
3111
3252
|
} from "react";
|
|
3112
|
-
var ChevronDownIcon = () => /* @__PURE__ */
|
|
3113
|
-
var CloseSmIcon = ({ size = 16 }) => /* @__PURE__ */
|
|
3114
|
-
var CheckIcon = () => /* @__PURE__ */
|
|
3253
|
+
var ChevronDownIcon = () => /* @__PURE__ */ React70.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React70.createElement("polyline", { points: "6 9 12 15 18 9" }));
|
|
3254
|
+
var CloseSmIcon = ({ size = 16 }) => /* @__PURE__ */ React70.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }, /* @__PURE__ */ React70.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), /* @__PURE__ */ React70.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" }));
|
|
3255
|
+
var CheckIcon = () => /* @__PURE__ */ React70.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React70.createElement("polyline", { points: "20 6 9 17 4 12" }));
|
|
3115
3256
|
function defaultGetLabel(option) {
|
|
3116
3257
|
if (option === null || option === void 0) return "";
|
|
3117
3258
|
if (typeof option === "string") return option;
|
|
@@ -3337,7 +3478,7 @@ function AutocompleteInner(props, _ref) {
|
|
|
3337
3478
|
className
|
|
3338
3479
|
].filter(Boolean).join(" ");
|
|
3339
3480
|
const inputPlaceholder = placeholder || (variant === "outlined" ? " " : void 0);
|
|
3340
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ React70.createElement("div", { ref: containerRef, className: rootClasses, style }, /* @__PURE__ */ React70.createElement(
|
|
3341
3482
|
"div",
|
|
3342
3483
|
{
|
|
3343
3484
|
className: "rf-text-field__wrapper",
|
|
@@ -3348,7 +3489,7 @@ function AutocompleteInner(props, _ref) {
|
|
|
3348
3489
|
}
|
|
3349
3490
|
}
|
|
3350
3491
|
},
|
|
3351
|
-
multiple && visibleTags.map((opt, i) => /* @__PURE__ */
|
|
3492
|
+
multiple && visibleTags.map((opt, i) => /* @__PURE__ */ React70.createElement("span", { key: i, className: "rf-autocomplete__tag" }, /* @__PURE__ */ React70.createElement("span", { style: { overflow: "hidden", textOverflow: "ellipsis" } }, getOptionLabel(opt)), /* @__PURE__ */ React70.createElement(
|
|
3352
3493
|
"button",
|
|
3353
3494
|
{
|
|
3354
3495
|
type: "button",
|
|
@@ -3357,10 +3498,10 @@ function AutocompleteInner(props, _ref) {
|
|
|
3357
3498
|
onClick: (e) => removeTag(opt, e),
|
|
3358
3499
|
tabIndex: -1
|
|
3359
3500
|
},
|
|
3360
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ React70.createElement(CloseSmIcon, { size: 12 })
|
|
3361
3502
|
))),
|
|
3362
|
-
hiddenCount > 0 && /* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3503
|
+
hiddenCount > 0 && /* @__PURE__ */ React70.createElement("span", { className: "rf-autocomplete__tag-more" }, "+", hiddenCount, " more"),
|
|
3504
|
+
/* @__PURE__ */ React70.createElement(
|
|
3364
3505
|
"input",
|
|
3365
3506
|
{
|
|
3366
3507
|
ref: inputRef,
|
|
@@ -3382,9 +3523,9 @@ function AutocompleteInner(props, _ref) {
|
|
|
3382
3523
|
"aria-autocomplete": "list"
|
|
3383
3524
|
}
|
|
3384
3525
|
),
|
|
3385
|
-
label && /* @__PURE__ */
|
|
3386
|
-
variant === "outlined" && /* @__PURE__ */
|
|
3387
|
-
/* @__PURE__ */
|
|
3526
|
+
label && /* @__PURE__ */ React70.createElement("label", { htmlFor: inputId, className: "rf-text-field__label" }, label, required && /* @__PURE__ */ React70.createElement("span", { className: "rf-text-field__asterisk" }, " *")),
|
|
3527
|
+
variant === "outlined" && /* @__PURE__ */ React70.createElement("fieldset", { className: "rf-text-field__notch" }, label ? /* @__PURE__ */ React70.createElement("legend", { className: "rf-text-field__legend" }, /* @__PURE__ */ React70.createElement("span", null, label, required ? " *" : "")) : /* @__PURE__ */ React70.createElement("legend", { className: "rf-text-field__legend--empty" })),
|
|
3528
|
+
/* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__endgroup" }, hasClearable && /* @__PURE__ */ React70.createElement(
|
|
3388
3529
|
"button",
|
|
3389
3530
|
{
|
|
3390
3531
|
type: "button",
|
|
@@ -3394,8 +3535,8 @@ function AutocompleteInner(props, _ref) {
|
|
|
3394
3535
|
tabIndex: -1,
|
|
3395
3536
|
"aria-label": "Clear"
|
|
3396
3537
|
},
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
), !freeSolo && /* @__PURE__ */
|
|
3538
|
+
/* @__PURE__ */ React70.createElement(CloseSmIcon, { size: 16 })
|
|
3539
|
+
), !freeSolo && /* @__PURE__ */ React70.createElement(
|
|
3399
3540
|
"button",
|
|
3400
3541
|
{
|
|
3401
3542
|
type: "button",
|
|
@@ -3407,9 +3548,9 @@ function AutocompleteInner(props, _ref) {
|
|
|
3407
3548
|
tabIndex: -1,
|
|
3408
3549
|
"aria-label": open ? "Close" : "Open"
|
|
3409
3550
|
},
|
|
3410
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ React70.createElement(ChevronDownIcon, null)
|
|
3411
3552
|
))
|
|
3412
|
-
), helperText && /* @__PURE__ */
|
|
3553
|
+
), helperText && /* @__PURE__ */ React70.createElement("div", { className: `rf-text-field__helper-text${error ? " rf-text-field__helper-text--error" : ""}` }, helperText), open && !disabled && /* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__popup", role: "presentation" }, loading ? /* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__loading" }, /* @__PURE__ */ React70.createElement("span", { className: "rf-ac-spinner" }), loadingText) : flatEntries.length === 0 ? /* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__no-options" }, noOptionsText) : /* @__PURE__ */ React70.createElement("ul", { ref: listRef, className: "rf-autocomplete__listbox", role: "listbox" }, groupBy ? (
|
|
3413
3554
|
// Grouped render
|
|
3414
3555
|
(() => {
|
|
3415
3556
|
const rendered = [];
|
|
@@ -3419,7 +3560,7 @@ function AutocompleteInner(props, _ref) {
|
|
|
3419
3560
|
if (entry.kind === "group") {
|
|
3420
3561
|
if (groupItems.length > 0) {
|
|
3421
3562
|
rendered.push(
|
|
3422
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ React70.createElement("li", { key: `g-${currentGroup}`, role: "presentation" }, /* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__group-header" }, currentGroup), /* @__PURE__ */ React70.createElement("ul", { className: "rf-autocomplete__group-items", role: "group" }, groupItems))
|
|
3423
3564
|
);
|
|
3424
3565
|
groupItems = [];
|
|
3425
3566
|
}
|
|
@@ -3430,7 +3571,7 @@ function AutocompleteInner(props, _ref) {
|
|
|
3430
3571
|
}
|
|
3431
3572
|
if (ei === flatEntries.length - 1 && groupItems.length > 0) {
|
|
3432
3573
|
rendered.push(
|
|
3433
|
-
/* @__PURE__ */
|
|
3574
|
+
/* @__PURE__ */ React70.createElement("li", { key: `g-${currentGroup}`, role: "presentation" }, /* @__PURE__ */ React70.createElement("div", { className: "rf-autocomplete__group-header" }, currentGroup), /* @__PURE__ */ React70.createElement("ul", { className: "rf-autocomplete__group-items", role: "group" }, groupItems))
|
|
3434
3575
|
);
|
|
3435
3576
|
}
|
|
3436
3577
|
});
|
|
@@ -3442,7 +3583,7 @@ function AutocompleteInner(props, _ref) {
|
|
|
3442
3583
|
const focused = focusedIdx === flatIdx;
|
|
3443
3584
|
const optDisabled = getOptionDisabled?.(option) ?? false;
|
|
3444
3585
|
const label2 = getOptionLabel(option);
|
|
3445
|
-
return /* @__PURE__ */
|
|
3586
|
+
return /* @__PURE__ */ React70.createElement(
|
|
3446
3587
|
"li",
|
|
3447
3588
|
{
|
|
3448
3589
|
key: label2 + flatIdx,
|
|
@@ -3461,22 +3602,22 @@ function AutocompleteInner(props, _ref) {
|
|
|
3461
3602
|
onMouseDown: (e) => e.preventDefault(),
|
|
3462
3603
|
onClick: () => selectOption(option)
|
|
3463
3604
|
},
|
|
3464
|
-
renderOption ? renderOption(option, { selected, focused, index: flatIdx }) : /* @__PURE__ */
|
|
3465
|
-
!renderOption && /* @__PURE__ */
|
|
3605
|
+
renderOption ? renderOption(option, { selected, focused, index: flatIdx }) : /* @__PURE__ */ React70.createElement("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, label2),
|
|
3606
|
+
!renderOption && /* @__PURE__ */ React70.createElement("span", { className: "rf-autocomplete__option-check" }, /* @__PURE__ */ React70.createElement(CheckIcon, null))
|
|
3466
3607
|
);
|
|
3467
3608
|
}
|
|
3468
3609
|
}
|
|
3469
|
-
var Autocomplete =
|
|
3610
|
+
var Autocomplete = React70.forwardRef(AutocompleteInner);
|
|
3470
3611
|
Autocomplete.displayName = "Autocomplete";
|
|
3471
3612
|
|
|
3472
3613
|
// lib/Progress/RufousLogoLoader.tsx
|
|
3473
|
-
import * as
|
|
3614
|
+
import * as React71 from "react";
|
|
3474
3615
|
var _uid = 0;
|
|
3475
3616
|
var RufousLogoLoader = ({ size = 80, sx, className }) => {
|
|
3476
|
-
const clipId =
|
|
3617
|
+
const clipId = React71.useRef(`rll-${++_uid}`).current;
|
|
3477
3618
|
const height = size * (38.795 / 54.585);
|
|
3478
3619
|
const sxClass = useSx(sx);
|
|
3479
|
-
return /* @__PURE__ */
|
|
3620
|
+
return /* @__PURE__ */ React71.createElement("div", { className: ["rufous-logo-loader", sxClass, className].filter(Boolean).join(" "), style: { width: size, height } }, /* @__PURE__ */ React71.createElement(
|
|
3480
3621
|
"svg",
|
|
3481
3622
|
{
|
|
3482
3623
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3485,19 +3626,19 @@ var RufousLogoLoader = ({ size = 80, sx, className }) => {
|
|
|
3485
3626
|
height,
|
|
3486
3627
|
className: "rufous-logo-loader__svg"
|
|
3487
3628
|
},
|
|
3488
|
-
/* @__PURE__ */
|
|
3629
|
+
/* @__PURE__ */ React71.createElement("defs", null, /* @__PURE__ */ React71.createElement("clipPath", { id: clipId }, /* @__PURE__ */ React71.createElement(
|
|
3489
3630
|
"path",
|
|
3490
3631
|
{
|
|
3491
3632
|
transform: "translate(2208 18.205)",
|
|
3492
3633
|
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"
|
|
3493
3634
|
}
|
|
3494
3635
|
))),
|
|
3495
|
-
/* @__PURE__ */
|
|
3636
|
+
/* @__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" })))
|
|
3496
3637
|
));
|
|
3497
3638
|
};
|
|
3498
3639
|
|
|
3499
3640
|
// lib/DataGrid/DataGrid.tsx
|
|
3500
|
-
import
|
|
3641
|
+
import React72, { useState as useState8, useMemo as useMemo2, useRef as useRef8, useEffect as useEffect7 } from "react";
|
|
3501
3642
|
import {
|
|
3502
3643
|
ChevronUp,
|
|
3503
3644
|
ChevronDown,
|
|
@@ -3564,8 +3705,11 @@ function DataGrid({
|
|
|
3564
3705
|
actions,
|
|
3565
3706
|
pageSize: initialPageSize = 10,
|
|
3566
3707
|
pageSizeOptions = [5, 10, 25, 50],
|
|
3567
|
-
title
|
|
3708
|
+
title,
|
|
3709
|
+
className,
|
|
3710
|
+
sx
|
|
3568
3711
|
}) {
|
|
3712
|
+
const sxClass = useSx(sx);
|
|
3569
3713
|
const [columnOverrides, setColumnOverrides] = useState8({});
|
|
3570
3714
|
const resolvedColumns = useMemo2(() => {
|
|
3571
3715
|
return initialColumnsProp.map((col) => {
|
|
@@ -3866,7 +4010,7 @@ function DataGrid({
|
|
|
3866
4010
|
return offset;
|
|
3867
4011
|
};
|
|
3868
4012
|
const hasActiveFilters = advancedFilters.some((f) => f.value);
|
|
3869
|
-
return /* @__PURE__ */
|
|
4013
|
+
return /* @__PURE__ */ React72.createElement("div", { className: ["dg-root", sxClass, className].filter(Boolean).join(" ") }, /* @__PURE__ */ React72.createElement("div", { className: "dg-header" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-header-info" }, /* @__PURE__ */ React72.createElement("h2", null, title), /* @__PURE__ */ React72.createElement("p", null, filteredData.length, " total records")), /* @__PURE__ */ React72.createElement("div", { className: "dg-header-actions" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-search-wrap" }, /* @__PURE__ */ React72.createElement(Search, { size: 15 }), /* @__PURE__ */ React72.createElement(
|
|
3870
4014
|
"input",
|
|
3871
4015
|
{
|
|
3872
4016
|
className: "dg-search",
|
|
@@ -3877,52 +4021,52 @@ function DataGrid({
|
|
|
3877
4021
|
setCurrentPage(1);
|
|
3878
4022
|
}
|
|
3879
4023
|
}
|
|
3880
|
-
)), /* @__PURE__ */
|
|
4024
|
+
)), /* @__PURE__ */ React72.createElement(
|
|
3881
4025
|
"button",
|
|
3882
4026
|
{
|
|
3883
4027
|
className: `dg-icon-btn ${hasActiveFilters ? "active" : ""}`,
|
|
3884
4028
|
onClick: () => setShowAdvancedFilter(true),
|
|
3885
4029
|
title: "Filters"
|
|
3886
4030
|
},
|
|
3887
|
-
/* @__PURE__ */
|
|
3888
|
-
), /* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React72.createElement(Filter, { size: 16 })
|
|
4032
|
+
), /* @__PURE__ */ React72.createElement(
|
|
3889
4033
|
"button",
|
|
3890
4034
|
{
|
|
3891
4035
|
className: "dg-icon-btn",
|
|
3892
4036
|
onClick: () => setShowManageColumns(true),
|
|
3893
4037
|
title: "Manage Columns"
|
|
3894
4038
|
},
|
|
3895
|
-
/* @__PURE__ */
|
|
3896
|
-
), /* @__PURE__ */
|
|
4039
|
+
/* @__PURE__ */ React72.createElement(Columns, { size: 16 })
|
|
4040
|
+
), /* @__PURE__ */ React72.createElement("button", { className: "dg-action-btn", onClick: handleExport }, /* @__PURE__ */ React72.createElement(Download, { size: 14 }), " Export CSV"))), /* @__PURE__ */ React72.createElement("div", { className: "dg-table-wrap" }, /* @__PURE__ */ React72.createElement("table", { className: "dg-table" }, /* @__PURE__ */ React72.createElement("thead", null, /* @__PURE__ */ React72.createElement("tr", null, visibleColumns.map((col, idx) => {
|
|
3897
4041
|
const colField = String(col.field);
|
|
3898
4042
|
const width = columnWidths[colField] || 200;
|
|
3899
4043
|
const leftOffset = getLeftOffset(col, idx);
|
|
3900
4044
|
const rightOffset = getRightOffset(col, idx);
|
|
3901
4045
|
const isSorted = sortField === col.field;
|
|
3902
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ React72.createElement(
|
|
3903
4047
|
"th",
|
|
3904
4048
|
{
|
|
3905
4049
|
key: colField,
|
|
3906
4050
|
className: `dg-thead-cell${col.pinned === "left" ? " pinned-left" : col.pinned === "right" ? " pinned-right" : ""} ${col.headerClassName || ""}`,
|
|
3907
4051
|
style: { width, minWidth: width, left: leftOffset, right: rightOffset, flex: col.flex }
|
|
3908
4052
|
},
|
|
3909
|
-
/* @__PURE__ */
|
|
4053
|
+
/* @__PURE__ */ React72.createElement("div", { className: "dg-th-inner" }, /* @__PURE__ */ React72.createElement(
|
|
3910
4054
|
"div",
|
|
3911
4055
|
{
|
|
3912
4056
|
className: `dg-th-label${col.sortable === false ? " no-sort" : ""}`,
|
|
3913
4057
|
onClick: () => col.sortable !== false && handleSort(col.field || "")
|
|
3914
4058
|
},
|
|
3915
4059
|
col.headerName,
|
|
3916
|
-
isSorted && sortDirection === "asc" && /* @__PURE__ */
|
|
3917
|
-
isSorted && sortDirection === "desc" && /* @__PURE__ */
|
|
3918
|
-
), /* @__PURE__ */
|
|
4060
|
+
isSorted && sortDirection === "asc" && /* @__PURE__ */ React72.createElement(ChevronUp, { size: 12 }),
|
|
4061
|
+
isSorted && sortDirection === "desc" && /* @__PURE__ */ React72.createElement(ChevronDown, { size: 12 })
|
|
4062
|
+
), /* @__PURE__ */ React72.createElement("div", { className: "dg-th-actions" }, !col.disableColumnMenu && /* @__PURE__ */ React72.createElement(
|
|
3919
4063
|
"button",
|
|
3920
4064
|
{
|
|
3921
4065
|
className: "dg-th-menu-btn",
|
|
3922
4066
|
onClick: (e) => handleMenuOpen(e, colField)
|
|
3923
4067
|
},
|
|
3924
|
-
/* @__PURE__ */
|
|
3925
|
-
), /* @__PURE__ */
|
|
4068
|
+
/* @__PURE__ */ React72.createElement(MoreVertical, { size: 13 })
|
|
4069
|
+
), /* @__PURE__ */ React72.createElement(
|
|
3926
4070
|
"div",
|
|
3927
4071
|
{
|
|
3928
4072
|
className: `dg-resizer${resizingColumn === colField ? " resizing" : ""}`,
|
|
@@ -3935,12 +4079,12 @@ function DataGrid({
|
|
|
3935
4079
|
}
|
|
3936
4080
|
)))
|
|
3937
4081
|
);
|
|
3938
|
-
}), actions && /* @__PURE__ */
|
|
4082
|
+
}), actions && /* @__PURE__ */ React72.createElement("th", { style: { width: 0, padding: 0 } }))), /* @__PURE__ */ React72.createElement("tbody", null, paginatedData.length === 0 ? /* @__PURE__ */ React72.createElement("tr", null, /* @__PURE__ */ React72.createElement("td", { colSpan: visibleColumns.length + (actions ? 1 : 0), className: "dg-empty" }, "No records found")) : paginatedData.map((item) => /* @__PURE__ */ React72.createElement("tr", { key: item.id, className: "dg-tbody-row" }, visibleColumns.map((col, idx) => {
|
|
3939
4083
|
const colField = String(col.field);
|
|
3940
4084
|
const width = columnWidths[colField] || 200;
|
|
3941
4085
|
const leftOffset = getLeftOffset(col, idx);
|
|
3942
4086
|
const rightOffset = getRightOffset(col, idx);
|
|
3943
|
-
return /* @__PURE__ */
|
|
4087
|
+
return /* @__PURE__ */ React72.createElement(
|
|
3944
4088
|
"td",
|
|
3945
4089
|
{
|
|
3946
4090
|
key: `${item.id}-${colField}`,
|
|
@@ -3961,11 +4105,11 @@ function DataGrid({
|
|
|
3961
4105
|
return String(formattedValue ?? "");
|
|
3962
4106
|
})()
|
|
3963
4107
|
);
|
|
3964
|
-
}), actions && /* @__PURE__ */
|
|
4108
|
+
}), actions && /* @__PURE__ */ React72.createElement("td", { className: "dg-row-actions-cell" }, (() => {
|
|
3965
4109
|
const resolvedActions = typeof actions === "function" ? actions(item) : actions;
|
|
3966
4110
|
const visibleActions = resolvedActions.filter((a) => !a.show || a.show(item));
|
|
3967
4111
|
if (visibleActions.length === 0) return null;
|
|
3968
|
-
return /* @__PURE__ */
|
|
4112
|
+
return /* @__PURE__ */ React72.createElement("div", { className: "dg-row-actions" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-action-group" }, visibleActions.map((action, i) => /* @__PURE__ */ React72.createElement(
|
|
3969
4113
|
"button",
|
|
3970
4114
|
{
|
|
3971
4115
|
key: i,
|
|
@@ -3976,7 +4120,7 @@ function DataGrid({
|
|
|
3976
4120
|
},
|
|
3977
4121
|
action.icon
|
|
3978
4122
|
))));
|
|
3979
|
-
})())))))), /* @__PURE__ */
|
|
4123
|
+
})())))))), /* @__PURE__ */ React72.createElement("div", { className: "dg-pagination" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-page-info" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-per-page" }, /* @__PURE__ */ React72.createElement("span", null, "Rows per page:"), /* @__PURE__ */ React72.createElement(
|
|
3980
4124
|
"select",
|
|
3981
4125
|
{
|
|
3982
4126
|
value: pageSize,
|
|
@@ -3985,8 +4129,8 @@ function DataGrid({
|
|
|
3985
4129
|
setCurrentPage(1);
|
|
3986
4130
|
}
|
|
3987
4131
|
},
|
|
3988
|
-
pageSizeOptions.map((o) => /* @__PURE__ */
|
|
3989
|
-
)), /* @__PURE__ */
|
|
4132
|
+
pageSizeOptions.map((o) => /* @__PURE__ */ React72.createElement("option", { key: o, value: o }, o))
|
|
4133
|
+
)), /* @__PURE__ */ React72.createElement("span", null, (currentPage - 1) * pageSize + 1, "\u2013", Math.min(currentPage * pageSize, filteredData.length), " of ", filteredData.length)), /* @__PURE__ */ React72.createElement("div", { className: "dg-page-nav" }, /* @__PURE__ */ React72.createElement("button", { className: "dg-page-btn", disabled: currentPage === 1, onClick: () => setCurrentPage((p) => p - 1) }, /* @__PURE__ */ React72.createElement(ChevronLeft, { size: 15 })), /* @__PURE__ */ React72.createElement("span", { className: "dg-page-fraction" }, currentPage, " / ", totalPages), /* @__PURE__ */ React72.createElement("button", { className: "dg-page-btn", disabled: currentPage === totalPages, onClick: () => setCurrentPage((p) => p + 1) }, /* @__PURE__ */ React72.createElement(ChevronRight, { size: 15 })))), activeMenu && /* @__PURE__ */ React72.createElement(
|
|
3990
4134
|
"div",
|
|
3991
4135
|
{
|
|
3992
4136
|
ref: menuRef,
|
|
@@ -3997,25 +4141,25 @@ function DataGrid({
|
|
|
3997
4141
|
...menuPosition.right !== void 0 ? { right: menuPosition.right } : {}
|
|
3998
4142
|
}
|
|
3999
4143
|
},
|
|
4000
|
-
/* @__PURE__ */
|
|
4001
|
-
/* @__PURE__ */
|
|
4002
|
-
/* @__PURE__ */
|
|
4144
|
+
/* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => handleSort(activeMenu, "asc") }, /* @__PURE__ */ React72.createElement(ArrowUp, { size: 14 }), " Sort ascending"),
|
|
4145
|
+
/* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => handleSort(activeMenu, "desc") }, /* @__PURE__ */ React72.createElement(ArrowDown, { size: 14 }), " Sort descending"),
|
|
4146
|
+
/* @__PURE__ */ React72.createElement("div", { className: "dg-menu-divider" }),
|
|
4003
4147
|
(() => {
|
|
4004
4148
|
const col = resolvedColumns.find((c) => c.field === activeMenu);
|
|
4005
4149
|
if (!col) return null;
|
|
4006
|
-
return /* @__PURE__ */
|
|
4150
|
+
return /* @__PURE__ */ React72.createElement(React72.Fragment, null, col.pinned === "left" ? /* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "left") }, /* @__PURE__ */ React72.createElement(Pin, { size: 14, style: { transform: "rotate(0deg)", opacity: 0.5 } }), " Unpin") : /* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "left") }, /* @__PURE__ */ React72.createElement(Pin, { size: 14, style: { transform: "rotate(45deg)" } }), " Pin left"), col.pinned === "right" ? /* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "right") }, /* @__PURE__ */ React72.createElement(Pin, { size: 14, style: { transform: "rotate(0deg)", opacity: 0.5 } }), " Unpin") : /* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => togglePin(activeMenu, "right") }, /* @__PURE__ */ React72.createElement(Pin, { size: 14, style: { transform: "rotate(-45deg)" } }), " Pin right"));
|
|
4007
4151
|
})(),
|
|
4008
|
-
/* @__PURE__ */
|
|
4009
|
-
/* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ React72.createElement("div", { className: "dg-menu-divider" }),
|
|
4153
|
+
/* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => {
|
|
4010
4154
|
setShowAdvancedFilter(true);
|
|
4011
4155
|
setActiveMenu(null);
|
|
4012
|
-
} }, /* @__PURE__ */
|
|
4013
|
-
/* @__PURE__ */
|
|
4014
|
-
/* @__PURE__ */
|
|
4156
|
+
} }, /* @__PURE__ */ React72.createElement(Filter, { size: 14 }), " Filter\u2026"),
|
|
4157
|
+
/* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => toggleHide(activeMenu) }, /* @__PURE__ */ React72.createElement(EyeOff, { size: 14 }), " Hide column"),
|
|
4158
|
+
/* @__PURE__ */ React72.createElement("button", { className: "dg-menu-item", onClick: () => {
|
|
4015
4159
|
setShowManageColumns(true);
|
|
4016
4160
|
setActiveMenu(null);
|
|
4017
|
-
} }, /* @__PURE__ */
|
|
4018
|
-
), showManageColumns && /* @__PURE__ */
|
|
4161
|
+
} }, /* @__PURE__ */ React72.createElement(Columns, { size: 14 }), " Manage columns")
|
|
4162
|
+
), showManageColumns && /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-overlay", onClick: () => setShowManageColumns(false) }, /* @__PURE__ */ React72.createElement("div", { className: "dg-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-header" }, /* @__PURE__ */ React72.createElement("h3", null, "Manage Columns"), /* @__PURE__ */ React72.createElement("button", { className: "dg-icon-btn", onClick: () => setShowManageColumns(false) }, /* @__PURE__ */ React72.createElement(X2, { size: 18 }))), /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-body" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-search-wrap", style: { marginBottom: 8 } }, /* @__PURE__ */ React72.createElement(Search, { size: 14 }), /* @__PURE__ */ React72.createElement(
|
|
4019
4163
|
"input",
|
|
4020
4164
|
{
|
|
4021
4165
|
className: "dg-search",
|
|
@@ -4027,15 +4171,15 @@ function DataGrid({
|
|
|
4027
4171
|
)), resolvedColumns.filter((c) => c.header.toLowerCase().includes(colSearch.toLowerCase())).map((col) => {
|
|
4028
4172
|
const key = String(col.key);
|
|
4029
4173
|
const isUnhideable = col.hideable === false;
|
|
4030
|
-
return /* @__PURE__ */
|
|
4031
|
-
})), /* @__PURE__ */
|
|
4174
|
+
return /* @__PURE__ */ React72.createElement("div", { key, className: `dg-col-row${isUnhideable ? " disabled" : ""}` }, /* @__PURE__ */ React72.createElement("div", { className: "dg-col-label" }, /* @__PURE__ */ React72.createElement("div", { className: "dg-col-dot", style: { background: col.hidden ? "var(--border-color)" : "var(--primary-color)" } }), col.header), !isUnhideable && /* @__PURE__ */ React72.createElement("button", { className: "dg-icon-btn", onClick: () => toggleHide(key) }, col.hidden ? /* @__PURE__ */ React72.createElement(EyeOff, { size: 14 }) : /* @__PURE__ */ React72.createElement(EyeOff, { size: 14, style: { opacity: 0.4 } })));
|
|
4175
|
+
})), /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-footer" }, /* @__PURE__ */ React72.createElement("button", { className: "dg-action-btn", onClick: () => setColumnOverrides((prev) => {
|
|
4032
4176
|
const next = { ...prev };
|
|
4033
4177
|
resolvedColumns.forEach((c) => {
|
|
4034
4178
|
const k = String(c.key);
|
|
4035
4179
|
next[k] = { ...next[k], hidden: false };
|
|
4036
4180
|
});
|
|
4037
4181
|
return next;
|
|
4038
|
-
}) }, "Show All"), /* @__PURE__ */
|
|
4182
|
+
}) }, "Show All"), /* @__PURE__ */ React72.createElement("button", { className: "dg-action-btn", onClick: () => {
|
|
4039
4183
|
const newOverrides = { ...columnOverrides };
|
|
4040
4184
|
resolvedColumns.forEach((c) => {
|
|
4041
4185
|
if (c.hideable !== false) {
|
|
@@ -4044,21 +4188,21 @@ function DataGrid({
|
|
|
4044
4188
|
}
|
|
4045
4189
|
});
|
|
4046
4190
|
setColumnOverrides(newOverrides);
|
|
4047
|
-
} }, "Hide All")))), showAdvancedFilter && /* @__PURE__ */
|
|
4191
|
+
} }, "Hide All")))), showAdvancedFilter && /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-overlay", onClick: () => setShowAdvancedFilter(false) }, /* @__PURE__ */ React72.createElement("div", { className: "dg-modal dg-modal-wide dg-filter-modal", onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-header" }, /* @__PURE__ */ React72.createElement("h3", null, "Filters"), /* @__PURE__ */ React72.createElement("button", { className: "dg-icon-btn", onClick: () => setShowAdvancedFilter(false) }, /* @__PURE__ */ React72.createElement(X2, { size: 18 }))), /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-body" }, advancedFilters.map((f, idx) => /* @__PURE__ */ React72.createElement("div", { key: idx }, idx > 0 && /* @__PURE__ */ React72.createElement("div", { className: "dg-filter-logic" }, /* @__PURE__ */ React72.createElement(
|
|
4048
4192
|
"button",
|
|
4049
4193
|
{
|
|
4050
4194
|
className: `dg-logic-btn${f.logic === "AND" ? " active" : ""}`,
|
|
4051
4195
|
onClick: () => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, logic: "AND" } : fi))
|
|
4052
4196
|
},
|
|
4053
4197
|
"AND"
|
|
4054
|
-
), /* @__PURE__ */
|
|
4198
|
+
), /* @__PURE__ */ React72.createElement(
|
|
4055
4199
|
"button",
|
|
4056
4200
|
{
|
|
4057
4201
|
className: `dg-logic-btn${f.logic === "OR" ? " active" : ""}`,
|
|
4058
4202
|
onClick: () => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, logic: "OR" } : fi))
|
|
4059
4203
|
},
|
|
4060
4204
|
"OR"
|
|
4061
|
-
)), /* @__PURE__ */
|
|
4205
|
+
)), /* @__PURE__ */ React72.createElement("div", { className: "dg-filter-row" }, advancedFilters.length > 1 && /* @__PURE__ */ React72.createElement("button", { className: "dg-icon-btn", onClick: () => setAdvancedFilters((p) => p.filter((_, i) => i !== idx)) }, /* @__PURE__ */ React72.createElement(X2, { size: 14 })), /* @__PURE__ */ React72.createElement(
|
|
4062
4206
|
"select",
|
|
4063
4207
|
{
|
|
4064
4208
|
className: "dg-filter-select",
|
|
@@ -4070,20 +4214,20 @@ function DataGrid({
|
|
|
4070
4214
|
setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, column: newColKey, operator: defaultOp, value: "" } : fi));
|
|
4071
4215
|
}
|
|
4072
4216
|
},
|
|
4073
|
-
resolvedColumns.map((c) => /* @__PURE__ */
|
|
4217
|
+
resolvedColumns.map((c) => /* @__PURE__ */ React72.createElement("option", { key: String(c.key), value: String(c.key) }, c.header))
|
|
4074
4218
|
), (() => {
|
|
4075
4219
|
const col = resolvedColumns.find((c) => String(c.key) === f.column);
|
|
4076
4220
|
const operators = getOperatorsForType(col?.type);
|
|
4077
4221
|
const hideValue = f.operator === "is empty" || f.operator === "is not empty";
|
|
4078
|
-
return /* @__PURE__ */
|
|
4222
|
+
return /* @__PURE__ */ React72.createElement(React72.Fragment, null, /* @__PURE__ */ React72.createElement(
|
|
4079
4223
|
"select",
|
|
4080
4224
|
{
|
|
4081
4225
|
className: "dg-filter-select dg-filter-select-sm",
|
|
4082
4226
|
value: f.operator,
|
|
4083
4227
|
onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, operator: e.target.value, value: "" } : fi))
|
|
4084
4228
|
},
|
|
4085
|
-
operators.map((op) => /* @__PURE__ */
|
|
4086
|
-
), !hideValue && col?.type === "date" && /* @__PURE__ */
|
|
4229
|
+
operators.map((op) => /* @__PURE__ */ React72.createElement("option", { key: op.value, value: op.value }, op.label))
|
|
4230
|
+
), !hideValue && col?.type === "date" && /* @__PURE__ */ React72.createElement("div", { className: "dg-filter-datefield" }, /* @__PURE__ */ React72.createElement(
|
|
4087
4231
|
DateField,
|
|
4088
4232
|
{
|
|
4089
4233
|
value: f.value,
|
|
@@ -4092,17 +4236,17 @@ function DataGrid({
|
|
|
4092
4236
|
}
|
|
4093
4237
|
)), !hideValue && col?.type === "status" && (() => {
|
|
4094
4238
|
const options = col.statusOptions || [...new Set(data.map((item) => String(item[col.field || col.key || ""])))].filter((v) => v && v !== "undefined" && v !== "null").sort();
|
|
4095
|
-
return /* @__PURE__ */
|
|
4239
|
+
return /* @__PURE__ */ React72.createElement(
|
|
4096
4240
|
"select",
|
|
4097
4241
|
{
|
|
4098
4242
|
className: "dg-filter-select",
|
|
4099
4243
|
value: f.value,
|
|
4100
4244
|
onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, value: e.target.value } : fi))
|
|
4101
4245
|
},
|
|
4102
|
-
/* @__PURE__ */
|
|
4103
|
-
options.map((opt) => /* @__PURE__ */
|
|
4246
|
+
/* @__PURE__ */ React72.createElement("option", { value: "" }, "Select\u2026"),
|
|
4247
|
+
options.map((opt) => /* @__PURE__ */ React72.createElement("option", { key: opt, value: opt }, opt))
|
|
4104
4248
|
);
|
|
4105
|
-
})(), !hideValue && col?.type !== "date" && col?.type !== "status" && /* @__PURE__ */
|
|
4249
|
+
})(), !hideValue && col?.type !== "date" && col?.type !== "status" && /* @__PURE__ */ React72.createElement(
|
|
4106
4250
|
"input",
|
|
4107
4251
|
{
|
|
4108
4252
|
type: col?.type === "number" ? "number" : "text",
|
|
@@ -4112,7 +4256,7 @@ function DataGrid({
|
|
|
4112
4256
|
onChange: (e) => setAdvancedFilters((p) => p.map((fi, i) => i === idx ? { ...fi, value: e.target.value } : fi))
|
|
4113
4257
|
}
|
|
4114
4258
|
));
|
|
4115
|
-
})()))), /* @__PURE__ */
|
|
4259
|
+
})()))), /* @__PURE__ */ React72.createElement(
|
|
4116
4260
|
"button",
|
|
4117
4261
|
{
|
|
4118
4262
|
className: "dg-action-btn",
|
|
@@ -4123,9 +4267,9 @@ function DataGrid({
|
|
|
4123
4267
|
setAdvancedFilters((p) => [...p, { column: String(firstCol.key), operator: defaultOp, value: "", logic: "AND" }]);
|
|
4124
4268
|
}
|
|
4125
4269
|
},
|
|
4126
|
-
/* @__PURE__ */
|
|
4270
|
+
/* @__PURE__ */ React72.createElement(Plus, { size: 14 }),
|
|
4127
4271
|
" Add Filter"
|
|
4128
|
-
)), /* @__PURE__ */
|
|
4272
|
+
)), /* @__PURE__ */ React72.createElement("div", { className: "dg-modal-footer" }, /* @__PURE__ */ React72.createElement(
|
|
4129
4273
|
"button",
|
|
4130
4274
|
{
|
|
4131
4275
|
className: "dg-action-btn",
|
|
@@ -4134,13 +4278,13 @@ function DataGrid({
|
|
|
4134
4278
|
setAdvancedFilters([{ column: String(firstCol.key), operator: getDefaultOperator(firstCol?.type), value: "", logic: "AND" }]);
|
|
4135
4279
|
}
|
|
4136
4280
|
},
|
|
4137
|
-
/* @__PURE__ */
|
|
4281
|
+
/* @__PURE__ */ React72.createElement(Trash2, { size: 14 }),
|
|
4138
4282
|
" Reset"
|
|
4139
|
-
), /* @__PURE__ */
|
|
4283
|
+
), /* @__PURE__ */ React72.createElement("button", { className: "submit-btn", onClick: () => setShowAdvancedFilter(false) }, "Apply")))));
|
|
4140
4284
|
}
|
|
4141
4285
|
|
|
4142
4286
|
// lib/Editors/RichTextEditor.tsx
|
|
4143
|
-
import
|
|
4287
|
+
import React73, { useEffect as useEffect8, useRef as useRef9, useState as useState9 } from "react";
|
|
4144
4288
|
import JoditReact from "jodit-react";
|
|
4145
4289
|
var MOBILE_BREAKPOINT = 768;
|
|
4146
4290
|
var TODO_STATES = [
|
|
@@ -4449,7 +4593,7 @@ function RichTextEditor({
|
|
|
4449
4593
|
iconURL: showAll ? "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIi8+PHBvbHlsaW5lIHBvaW50cz0iOCAxNCAxMiAxMCAxNiAxNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=" : "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIi8+PHBvbHlsaW5lIHBvaW50cz0iOCAxMCAxMiAxNCAxNiAxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=",
|
|
4450
4594
|
exec: () => setShowAll((prev) => !prev)
|
|
4451
4595
|
};
|
|
4452
|
-
const config =
|
|
4596
|
+
const config = React73.useMemo(() => {
|
|
4453
4597
|
let uploadConfig = {};
|
|
4454
4598
|
if (uploadUrl) {
|
|
4455
4599
|
const uploadData = {};
|
|
@@ -4565,14 +4709,14 @@ function RichTextEditor({
|
|
|
4565
4709
|
safePluginList: ["changecase", "rteKeyLogger"]
|
|
4566
4710
|
};
|
|
4567
4711
|
}, [isMobile, showAll, isListening, disabled, aiSupport, licenseKey, translationKey, token, uploadUrl, mentions?.arr?.length, height, width, allowResizeY, fullSize, placeholder]);
|
|
4568
|
-
return /* @__PURE__ */
|
|
4712
|
+
return /* @__PURE__ */ React73.createElement(
|
|
4569
4713
|
"div",
|
|
4570
4714
|
{
|
|
4571
4715
|
ref: containerRef,
|
|
4572
4716
|
className: `rte-wrapper ${isListening ? "rte-listening" : ""} ${className}`,
|
|
4573
4717
|
style
|
|
4574
4718
|
},
|
|
4575
|
-
/* @__PURE__ */
|
|
4719
|
+
/* @__PURE__ */ React73.createElement(
|
|
4576
4720
|
JoditReact,
|
|
4577
4721
|
{
|
|
4578
4722
|
ref: editorRef,
|
|
@@ -4583,7 +4727,7 @@ function RichTextEditor({
|
|
|
4583
4727
|
onBlur: (v) => onBlur?.(v)
|
|
4584
4728
|
}
|
|
4585
4729
|
),
|
|
4586
|
-
/* @__PURE__ */
|
|
4730
|
+
/* @__PURE__ */ React73.createElement(
|
|
4587
4731
|
"div",
|
|
4588
4732
|
{
|
|
4589
4733
|
className: "rte-speech-popup",
|
|
@@ -4595,26 +4739,26 @@ function RichTextEditor({
|
|
|
4595
4739
|
pointerEvents: "none"
|
|
4596
4740
|
}
|
|
4597
4741
|
},
|
|
4598
|
-
/* @__PURE__ */
|
|
4599
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ React73.createElement("span", { className: "rte-speech-dot" }),
|
|
4743
|
+
/* @__PURE__ */ React73.createElement("span", null, speechText || "\u2026")
|
|
4600
4744
|
),
|
|
4601
|
-
error && /* @__PURE__ */
|
|
4745
|
+
error && /* @__PURE__ */ React73.createElement("p", { className: "rte-error" }, error)
|
|
4602
4746
|
);
|
|
4603
4747
|
}
|
|
4604
4748
|
|
|
4605
4749
|
// lib/Select/Select.tsx
|
|
4606
|
-
import
|
|
4750
|
+
import React74, {
|
|
4607
4751
|
useState as useState10,
|
|
4608
4752
|
useRef as useRef10,
|
|
4609
4753
|
useEffect as useEffect9,
|
|
4610
4754
|
useCallback as useCallback3
|
|
4611
4755
|
} from "react";
|
|
4612
|
-
var ChevronDownIcon2 = () => /* @__PURE__ */
|
|
4613
|
-
var CheckIcon2 = () => /* @__PURE__ */
|
|
4756
|
+
var ChevronDownIcon2 = () => /* @__PURE__ */ React74.createElement("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React74.createElement("polyline", { points: "6 9 12 15 18 9" }));
|
|
4757
|
+
var CheckIcon2 = () => /* @__PURE__ */ React74.createElement("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React74.createElement("polyline", { points: "20 6 9 17 4 12" }));
|
|
4614
4758
|
function normaliseOptions(options) {
|
|
4615
4759
|
return options.map((o) => typeof o === "string" ? { value: o, label: o } : o);
|
|
4616
4760
|
}
|
|
4617
|
-
var Select =
|
|
4761
|
+
var Select = React74.forwardRef(function Select2(props, ref) {
|
|
4618
4762
|
const {
|
|
4619
4763
|
options: rawOptions,
|
|
4620
4764
|
value,
|
|
@@ -4746,20 +4890,20 @@ var Select = React73.forwardRef(function Select2(props, ref) {
|
|
|
4746
4890
|
if (multiple) {
|
|
4747
4891
|
const labels = getSelectedLabels();
|
|
4748
4892
|
if (labels.length === 0) {
|
|
4749
|
-
return /* @__PURE__ */
|
|
4893
|
+
return /* @__PURE__ */ React74.createElement("div", { className: "rf-select__chips" }, placeholder && /* @__PURE__ */ React74.createElement("span", { className: "rf-select__display rf-select__display--placeholder" }, placeholder));
|
|
4750
4894
|
}
|
|
4751
4895
|
if (labels.length <= 2) {
|
|
4752
|
-
return /* @__PURE__ */
|
|
4896
|
+
return /* @__PURE__ */ React74.createElement("div", { className: "rf-select__chips" }, labels.map((l, i) => /* @__PURE__ */ React74.createElement("span", { key: i, className: "rf-select__chip" }, l)));
|
|
4753
4897
|
}
|
|
4754
|
-
return /* @__PURE__ */
|
|
4898
|
+
return /* @__PURE__ */ React74.createElement("div", { className: "rf-select__chips" }, labels.slice(0, 2).map((l, i) => /* @__PURE__ */ React74.createElement("span", { key: i, className: "rf-select__chip" }, l)), /* @__PURE__ */ React74.createElement("span", { className: "rf-select__count" }, "+", labels.length - 2));
|
|
4755
4899
|
}
|
|
4756
4900
|
const selectedOpt = options.find((o) => o.value === value);
|
|
4757
4901
|
if (selectedOpt) {
|
|
4758
|
-
return /* @__PURE__ */
|
|
4902
|
+
return /* @__PURE__ */ React74.createElement("div", { className: "rf-select__display" }, selectedOpt.label);
|
|
4759
4903
|
}
|
|
4760
|
-
return /* @__PURE__ */
|
|
4904
|
+
return /* @__PURE__ */ React74.createElement("div", { className: `rf-select__display${placeholder ? " rf-select__display--placeholder" : ""}` }, placeholder || "\xA0");
|
|
4761
4905
|
};
|
|
4762
|
-
return /* @__PURE__ */
|
|
4906
|
+
return /* @__PURE__ */ React74.createElement(
|
|
4763
4907
|
"div",
|
|
4764
4908
|
{
|
|
4765
4909
|
ref: (node) => {
|
|
@@ -4770,7 +4914,7 @@ var Select = React73.forwardRef(function Select2(props, ref) {
|
|
|
4770
4914
|
className: rootClasses,
|
|
4771
4915
|
style
|
|
4772
4916
|
},
|
|
4773
|
-
/* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ React74.createElement(
|
|
4774
4918
|
"div",
|
|
4775
4919
|
{
|
|
4776
4920
|
className: "rf-text-field__wrapper",
|
|
@@ -4784,15 +4928,15 @@ var Select = React73.forwardRef(function Select2(props, ref) {
|
|
|
4784
4928
|
onKeyDown: handleKeyDown
|
|
4785
4929
|
},
|
|
4786
4930
|
renderDisplay(),
|
|
4787
|
-
label && /* @__PURE__ */
|
|
4788
|
-
variant === "outlined" && /* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4931
|
+
label && /* @__PURE__ */ React74.createElement("label", { id: inputId, className: "rf-text-field__label" }, label, required && /* @__PURE__ */ React74.createElement("span", { className: "rf-text-field__asterisk" }, " *")),
|
|
4932
|
+
variant === "outlined" && /* @__PURE__ */ React74.createElement("fieldset", { className: "rf-text-field__notch" }, label ? /* @__PURE__ */ React74.createElement("legend", { className: "rf-text-field__legend" }, /* @__PURE__ */ React74.createElement("span", null, label, required ? " *" : "")) : /* @__PURE__ */ React74.createElement("legend", { className: "rf-text-field__legend--empty" })),
|
|
4933
|
+
/* @__PURE__ */ React74.createElement("div", { className: "rf-select__arrow", "aria-hidden": "true" }, /* @__PURE__ */ React74.createElement(ChevronDownIcon2, null))
|
|
4790
4934
|
),
|
|
4791
|
-
helperText && /* @__PURE__ */
|
|
4792
|
-
open && !disabled && /* @__PURE__ */
|
|
4935
|
+
helperText && /* @__PURE__ */ React74.createElement("div", { className: `rf-text-field__helper-text${error ? " rf-text-field__helper-text--error" : ""}` }, helperText),
|
|
4936
|
+
open && !disabled && /* @__PURE__ */ React74.createElement("div", { className: "rf-select__popup", role: "presentation" }, /* @__PURE__ */ React74.createElement("ul", { ref: listRef, className: "rf-select__listbox", role: "listbox", "aria-multiselectable": multiple }, options.map((opt, idx) => {
|
|
4793
4937
|
const selected = isSelected(opt.value);
|
|
4794
4938
|
const focused = focusedIdx === idx;
|
|
4795
|
-
return /* @__PURE__ */
|
|
4939
|
+
return /* @__PURE__ */ React74.createElement(
|
|
4796
4940
|
"li",
|
|
4797
4941
|
{
|
|
4798
4942
|
key: opt.value,
|
|
@@ -4811,8 +4955,8 @@ var Select = React73.forwardRef(function Select2(props, ref) {
|
|
|
4811
4955
|
onMouseDown: (e) => e.preventDefault(),
|
|
4812
4956
|
onClick: () => selectOption(opt)
|
|
4813
4957
|
},
|
|
4814
|
-
/* @__PURE__ */
|
|
4815
|
-
/* @__PURE__ */
|
|
4958
|
+
/* @__PURE__ */ React74.createElement("span", { className: "rf-select__option-label" }, opt.label),
|
|
4959
|
+
/* @__PURE__ */ React74.createElement("span", { className: "rf-select__option-check", "aria-hidden": "true" }, /* @__PURE__ */ React74.createElement(CheckIcon2, null))
|
|
4816
4960
|
);
|
|
4817
4961
|
})))
|
|
4818
4962
|
);
|
|
@@ -4820,7 +4964,7 @@ var Select = React73.forwardRef(function Select2(props, ref) {
|
|
|
4820
4964
|
Select.displayName = "Select";
|
|
4821
4965
|
|
|
4822
4966
|
// lib/Slider/Slider.tsx
|
|
4823
|
-
import
|
|
4967
|
+
import React75, {
|
|
4824
4968
|
useState as useState11,
|
|
4825
4969
|
useRef as useRef11,
|
|
4826
4970
|
useEffect as useEffect10,
|
|
@@ -4835,7 +4979,7 @@ function snapToStep(val, min, step) {
|
|
|
4835
4979
|
function pct(val, min, max) {
|
|
4836
4980
|
return (val - min) / (max - min) * 100;
|
|
4837
4981
|
}
|
|
4838
|
-
var Slider =
|
|
4982
|
+
var Slider = React75.forwardRef(function Slider2(props, ref) {
|
|
4839
4983
|
const {
|
|
4840
4984
|
value,
|
|
4841
4985
|
onChange,
|
|
@@ -4975,7 +5119,7 @@ var Slider = React74.forwardRef(function Slider2(props, ref) {
|
|
|
4975
5119
|
const val = vals[thumb];
|
|
4976
5120
|
const p = pct(val, min, max);
|
|
4977
5121
|
const thumbStyle = orientation === "vertical" ? { bottom: `${p}%`, transform: "translate(-50%, 50%)" } : { left: `${p}%` };
|
|
4978
|
-
return /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ React75.createElement(
|
|
4979
5123
|
"div",
|
|
4980
5124
|
{
|
|
4981
5125
|
key: thumb,
|
|
@@ -4991,30 +5135,30 @@ var Slider = React74.forwardRef(function Slider2(props, ref) {
|
|
|
4991
5135
|
onPointerDown: (e) => handleThumbPointerDown(e, thumb),
|
|
4992
5136
|
onKeyDown: (e) => handleThumbKeyDown(e, thumb)
|
|
4993
5137
|
},
|
|
4994
|
-
valueLabelDisplay !== "off" && /* @__PURE__ */
|
|
5138
|
+
valueLabelDisplay !== "off" && /* @__PURE__ */ React75.createElement("div", { className: "rf-slider__value-label", "aria-hidden": "true" }, val)
|
|
4995
5139
|
);
|
|
4996
5140
|
};
|
|
4997
|
-
return /* @__PURE__ */
|
|
5141
|
+
return /* @__PURE__ */ React75.createElement("div", { ref, className: rootClasses, style }, label && /* @__PURE__ */ React75.createElement("div", { className: "rf-slider__label" }, label), /* @__PURE__ */ React75.createElement(
|
|
4998
5142
|
"div",
|
|
4999
5143
|
{
|
|
5000
5144
|
ref: trackRef,
|
|
5001
5145
|
className: "rf-slider__track-container",
|
|
5002
5146
|
onPointerDown: handleTrackPointerDown
|
|
5003
5147
|
},
|
|
5004
|
-
/* @__PURE__ */
|
|
5005
|
-
/* @__PURE__ */
|
|
5148
|
+
/* @__PURE__ */ React75.createElement("div", { className: "rf-slider__rail", "aria-hidden": "true" }),
|
|
5149
|
+
/* @__PURE__ */ React75.createElement("div", { className: "rf-slider__track", style: trackStyle, "aria-hidden": "true" }),
|
|
5006
5150
|
computedMarks.map((mark) => {
|
|
5007
5151
|
const p = pct(mark.value, min, max);
|
|
5008
5152
|
const isActive = isRange ? mark.value >= vals[0] && mark.value <= vals[1] : mark.value <= vals[0];
|
|
5009
5153
|
const markStyle = orientation === "vertical" ? { bottom: `${p}%`, transform: "translate(-50%, 50%)" } : { left: `${p}%` };
|
|
5010
|
-
return /* @__PURE__ */
|
|
5154
|
+
return /* @__PURE__ */ React75.createElement(React75.Fragment, { key: mark.value }, /* @__PURE__ */ React75.createElement(
|
|
5011
5155
|
"div",
|
|
5012
5156
|
{
|
|
5013
5157
|
className: `rf-slider__mark${isActive ? " rf-slider__mark--active" : ""}`,
|
|
5014
5158
|
style: markStyle,
|
|
5015
5159
|
"aria-hidden": "true"
|
|
5016
5160
|
}
|
|
5017
|
-
), mark.label && orientation === "horizontal" && /* @__PURE__ */
|
|
5161
|
+
), mark.label && orientation === "horizontal" && /* @__PURE__ */ React75.createElement(
|
|
5018
5162
|
"div",
|
|
5019
5163
|
{
|
|
5020
5164
|
className: "rf-slider__mark-label",
|
|
@@ -5026,13 +5170,13 @@ var Slider = React74.forwardRef(function Slider2(props, ref) {
|
|
|
5026
5170
|
}),
|
|
5027
5171
|
renderThumb(0),
|
|
5028
5172
|
isRange && renderThumb(1)
|
|
5029
|
-
), hasLabelledMarks && orientation === "horizontal" && /* @__PURE__ */
|
|
5173
|
+
), hasLabelledMarks && orientation === "horizontal" && /* @__PURE__ */ React75.createElement("div", { className: "rf-slider__marks-labels", "aria-hidden": "true" }));
|
|
5030
5174
|
});
|
|
5031
5175
|
Slider.displayName = "Slider";
|
|
5032
5176
|
|
|
5033
5177
|
// lib/Switch/Switch.tsx
|
|
5034
|
-
import
|
|
5035
|
-
var Switch =
|
|
5178
|
+
import React76, { useRef as useRef12 } from "react";
|
|
5179
|
+
var Switch = React76.forwardRef(function Switch2(props, ref) {
|
|
5036
5180
|
const {
|
|
5037
5181
|
checked = false,
|
|
5038
5182
|
onChange,
|
|
@@ -5062,7 +5206,7 @@ var Switch = React75.forwardRef(function Switch2(props, ref) {
|
|
|
5062
5206
|
sxClass,
|
|
5063
5207
|
className
|
|
5064
5208
|
].filter(Boolean).join(" ");
|
|
5065
|
-
return /* @__PURE__ */
|
|
5209
|
+
return /* @__PURE__ */ React76.createElement(
|
|
5066
5210
|
"label",
|
|
5067
5211
|
{
|
|
5068
5212
|
ref,
|
|
@@ -5070,7 +5214,7 @@ var Switch = React75.forwardRef(function Switch2(props, ref) {
|
|
|
5070
5214
|
style,
|
|
5071
5215
|
htmlFor: inputId
|
|
5072
5216
|
},
|
|
5073
|
-
/* @__PURE__ */
|
|
5217
|
+
/* @__PURE__ */ React76.createElement(
|
|
5074
5218
|
"input",
|
|
5075
5219
|
{
|
|
5076
5220
|
ref: inputRef,
|
|
@@ -5085,16 +5229,16 @@ var Switch = React75.forwardRef(function Switch2(props, ref) {
|
|
|
5085
5229
|
"aria-checked": checked
|
|
5086
5230
|
}
|
|
5087
5231
|
),
|
|
5088
|
-
/* @__PURE__ */
|
|
5089
|
-
label && /* @__PURE__ */
|
|
5232
|
+
/* @__PURE__ */ React76.createElement("div", { className: "rf-switch__track", "aria-hidden": "true" }, /* @__PURE__ */ React76.createElement("div", { className: "rf-switch__thumb" })),
|
|
5233
|
+
label && /* @__PURE__ */ React76.createElement("span", { className: "rf-switch__label" }, label, required && /* @__PURE__ */ React76.createElement("span", { style: { color: "var(--tf-error-color, #d32f2f)" } }, " *"))
|
|
5090
5234
|
);
|
|
5091
5235
|
});
|
|
5092
5236
|
Switch.displayName = "Switch";
|
|
5093
5237
|
|
|
5094
5238
|
// lib/RadioGroup/RadioGroup.tsx
|
|
5095
|
-
import
|
|
5239
|
+
import React77, { useRef as useRef13, createContext as createContext2, useContext as useContext2 } from "react";
|
|
5096
5240
|
var RadioGroupContext = createContext2({});
|
|
5097
|
-
var Radio =
|
|
5241
|
+
var Radio = React77.forwardRef(function Radio2(props, ref) {
|
|
5098
5242
|
const ctx = useContext2(RadioGroupContext);
|
|
5099
5243
|
const {
|
|
5100
5244
|
value,
|
|
@@ -5125,7 +5269,7 @@ var Radio = React76.forwardRef(function Radio2(props, ref) {
|
|
|
5125
5269
|
isDisabled ? "rf-radio--disabled" : "",
|
|
5126
5270
|
sxClass
|
|
5127
5271
|
].filter(Boolean).join(" ");
|
|
5128
|
-
return /* @__PURE__ */
|
|
5272
|
+
return /* @__PURE__ */ React77.createElement("label", { ref, className: rootClasses, htmlFor: inputId }, /* @__PURE__ */ React77.createElement(
|
|
5129
5273
|
"input",
|
|
5130
5274
|
{
|
|
5131
5275
|
id: inputId,
|
|
@@ -5138,10 +5282,10 @@ var Radio = React76.forwardRef(function Radio2(props, ref) {
|
|
|
5138
5282
|
name,
|
|
5139
5283
|
"aria-checked": isChecked
|
|
5140
5284
|
}
|
|
5141
|
-
), /* @__PURE__ */
|
|
5285
|
+
), /* @__PURE__ */ React77.createElement("div", { className: "rf-radio__control", "aria-hidden": "true" }, /* @__PURE__ */ React77.createElement("div", { className: "rf-radio__ripple" }), /* @__PURE__ */ React77.createElement("div", { className: "rf-radio__outer" }, /* @__PURE__ */ React77.createElement("div", { className: "rf-radio__inner" }))), label && /* @__PURE__ */ React77.createElement("span", { className: "rf-radio__label" }, label));
|
|
5142
5286
|
});
|
|
5143
5287
|
Radio.displayName = "Radio";
|
|
5144
|
-
var RadioGroup =
|
|
5288
|
+
var RadioGroup = React77.forwardRef(function RadioGroup2(props, ref) {
|
|
5145
5289
|
const {
|
|
5146
5290
|
value,
|
|
5147
5291
|
onChange,
|
|
@@ -5165,7 +5309,7 @@ var RadioGroup = React76.forwardRef(function RadioGroup2(props, ref) {
|
|
|
5165
5309
|
sxClass,
|
|
5166
5310
|
className
|
|
5167
5311
|
].filter(Boolean).join(" ");
|
|
5168
|
-
return /* @__PURE__ */
|
|
5312
|
+
return /* @__PURE__ */ React77.createElement(RadioGroupContext.Provider, { value: { value, onChange, name: groupName, disabled, size } }, /* @__PURE__ */ React77.createElement(
|
|
5169
5313
|
"div",
|
|
5170
5314
|
{
|
|
5171
5315
|
ref,
|
|
@@ -5174,8 +5318,8 @@ var RadioGroup = React76.forwardRef(function RadioGroup2(props, ref) {
|
|
|
5174
5318
|
role: "radiogroup",
|
|
5175
5319
|
"aria-label": label
|
|
5176
5320
|
},
|
|
5177
|
-
label && /* @__PURE__ */
|
|
5178
|
-
options ? options.map((opt) => /* @__PURE__ */
|
|
5321
|
+
label && /* @__PURE__ */ React77.createElement("div", { className: "rf-radio-group__label" }, label),
|
|
5322
|
+
options ? options.map((opt) => /* @__PURE__ */ React77.createElement(
|
|
5179
5323
|
Radio,
|
|
5180
5324
|
{
|
|
5181
5325
|
key: opt.value,
|
|
@@ -5189,12 +5333,12 @@ var RadioGroup = React76.forwardRef(function RadioGroup2(props, ref) {
|
|
|
5189
5333
|
RadioGroup.displayName = "RadioGroup";
|
|
5190
5334
|
|
|
5191
5335
|
// lib/Rating/Rating.tsx
|
|
5192
|
-
import
|
|
5336
|
+
import React78, {
|
|
5193
5337
|
useState as useState12,
|
|
5194
5338
|
useRef as useRef14
|
|
5195
5339
|
} from "react";
|
|
5196
5340
|
var starSize = { small: 18, medium: 24, large: 32 };
|
|
5197
|
-
var FilledStarIcon = ({ size }) => /* @__PURE__ */
|
|
5341
|
+
var FilledStarIcon = ({ size }) => /* @__PURE__ */ React78.createElement(
|
|
5198
5342
|
"svg",
|
|
5199
5343
|
{
|
|
5200
5344
|
width: size,
|
|
@@ -5203,9 +5347,9 @@ var FilledStarIcon = ({ size }) => /* @__PURE__ */ React77.createElement(
|
|
|
5203
5347
|
fill: "currentColor",
|
|
5204
5348
|
"aria-hidden": "true"
|
|
5205
5349
|
},
|
|
5206
|
-
/* @__PURE__ */
|
|
5350
|
+
/* @__PURE__ */ React78.createElement("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" })
|
|
5207
5351
|
);
|
|
5208
|
-
var EmptyStarIcon = ({ size }) => /* @__PURE__ */
|
|
5352
|
+
var EmptyStarIcon = ({ size }) => /* @__PURE__ */ React78.createElement(
|
|
5209
5353
|
"svg",
|
|
5210
5354
|
{
|
|
5211
5355
|
width: size,
|
|
@@ -5216,9 +5360,9 @@ var EmptyStarIcon = ({ size }) => /* @__PURE__ */ React77.createElement(
|
|
|
5216
5360
|
strokeWidth: "1.6",
|
|
5217
5361
|
"aria-hidden": "true"
|
|
5218
5362
|
},
|
|
5219
|
-
/* @__PURE__ */
|
|
5363
|
+
/* @__PURE__ */ React78.createElement("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" })
|
|
5220
5364
|
);
|
|
5221
|
-
var Rating =
|
|
5365
|
+
var Rating = React78.forwardRef(function Rating2(props, ref) {
|
|
5222
5366
|
const {
|
|
5223
5367
|
value,
|
|
5224
5368
|
onChange,
|
|
@@ -5241,8 +5385,8 @@ var Rating = React77.forwardRef(function Rating2(props, ref) {
|
|
|
5241
5385
|
const currentValue = value ?? 0;
|
|
5242
5386
|
const displayValue = hoverValue !== null ? hoverValue : currentValue;
|
|
5243
5387
|
const iconSize = starSize[size] ?? 24;
|
|
5244
|
-
const renderedFilledIcon = icon ?? /* @__PURE__ */
|
|
5245
|
-
const renderedEmptyIcon = emptyIcon ?? /* @__PURE__ */
|
|
5388
|
+
const renderedFilledIcon = icon ?? /* @__PURE__ */ React78.createElement(FilledStarIcon, { size: iconSize });
|
|
5389
|
+
const renderedEmptyIcon = emptyIcon ?? /* @__PURE__ */ React78.createElement(EmptyStarIcon, { size: iconSize });
|
|
5246
5390
|
const isFilled = (pos) => {
|
|
5247
5391
|
if (highlightSelectedOnly) return displayValue === pos;
|
|
5248
5392
|
return displayValue >= pos - (precision < 1 ? 0.25 : 0);
|
|
@@ -5303,7 +5447,7 @@ var Rating = React77.forwardRef(function Rating2(props, ref) {
|
|
|
5303
5447
|
sxClass,
|
|
5304
5448
|
className
|
|
5305
5449
|
].filter(Boolean).join(" ");
|
|
5306
|
-
return /* @__PURE__ */
|
|
5450
|
+
return /* @__PURE__ */ React78.createElement("div", { ref, className: rootClasses, style }, label && /* @__PURE__ */ React78.createElement("div", { className: "rf-rating__label" }, label), /* @__PURE__ */ React78.createElement(
|
|
5307
5451
|
"div",
|
|
5308
5452
|
{
|
|
5309
5453
|
ref: starsRef,
|
|
@@ -5320,7 +5464,7 @@ var Rating = React77.forwardRef(function Rating2(props, ref) {
|
|
|
5320
5464
|
"rf-rating__item",
|
|
5321
5465
|
isHovered ? "rf-rating__item--hovered" : ""
|
|
5322
5466
|
].filter(Boolean).join(" ");
|
|
5323
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ React78.createElement(
|
|
5324
5468
|
"button",
|
|
5325
5469
|
{
|
|
5326
5470
|
key: pos,
|
|
@@ -5335,15 +5479,15 @@ var Rating = React77.forwardRef(function Rating2(props, ref) {
|
|
|
5335
5479
|
},
|
|
5336
5480
|
halfFilled ? (
|
|
5337
5481
|
// Half-star: show half filled + half empty
|
|
5338
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ React78.createElement("div", { className: "rf-rating__icon-container", style: { position: "relative" } }, /* @__PURE__ */ React78.createElement("span", { className: "rf-rating__icon--empty" }, renderedEmptyIcon), /* @__PURE__ */ React78.createElement(
|
|
5339
5483
|
"span",
|
|
5340
5484
|
{
|
|
5341
5485
|
className: "rf-rating__half-left",
|
|
5342
5486
|
style: { position: "absolute", inset: 0, width: "50%", overflow: "hidden" }
|
|
5343
5487
|
},
|
|
5344
|
-
/* @__PURE__ */
|
|
5488
|
+
/* @__PURE__ */ React78.createElement("span", { className: "rf-rating__icon--filled" }, renderedFilledIcon)
|
|
5345
5489
|
))
|
|
5346
|
-
) : /* @__PURE__ */
|
|
5490
|
+
) : /* @__PURE__ */ React78.createElement("div", { className: "rf-rating__icon-container" }, /* @__PURE__ */ React78.createElement("span", { className: filled ? "rf-rating__icon--filled" : "rf-rating__icon--empty" }, filled ? renderedFilledIcon : renderedEmptyIcon))
|
|
5347
5491
|
);
|
|
5348
5492
|
})
|
|
5349
5493
|
));
|
|
@@ -5351,12 +5495,12 @@ var Rating = React77.forwardRef(function Rating2(props, ref) {
|
|
|
5351
5495
|
Rating.displayName = "Rating";
|
|
5352
5496
|
|
|
5353
5497
|
// lib/ToggleButton/ToggleButton.tsx
|
|
5354
|
-
import
|
|
5498
|
+
import React79, {
|
|
5355
5499
|
createContext as createContext3,
|
|
5356
5500
|
useContext as useContext3
|
|
5357
5501
|
} from "react";
|
|
5358
5502
|
var ToggleGroupContext = createContext3({});
|
|
5359
|
-
var ToggleButton =
|
|
5503
|
+
var ToggleButton = React79.forwardRef(
|
|
5360
5504
|
function ToggleButton2(props, ref) {
|
|
5361
5505
|
const ctx = useContext3(ToggleGroupContext);
|
|
5362
5506
|
const { value, children, disabled: disabledProp, selected: selectedProp, sx } = props;
|
|
@@ -5389,7 +5533,7 @@ var ToggleButton = React78.forwardRef(
|
|
|
5389
5533
|
}
|
|
5390
5534
|
}
|
|
5391
5535
|
};
|
|
5392
|
-
const isIconOnly =
|
|
5536
|
+
const isIconOnly = React79.Children.count(children) === 1 && React79.isValidElement(children) && children.type === "svg";
|
|
5393
5537
|
const btnClasses = [
|
|
5394
5538
|
"rf-toggle-btn",
|
|
5395
5539
|
isSelected ? "rf-toggle-btn--selected" : "",
|
|
@@ -5397,7 +5541,7 @@ var ToggleButton = React78.forwardRef(
|
|
|
5397
5541
|
isIconOnly ? "rf-toggle-btn--icon-only" : "",
|
|
5398
5542
|
sxClass
|
|
5399
5543
|
].filter(Boolean).join(" ");
|
|
5400
|
-
return /* @__PURE__ */
|
|
5544
|
+
return /* @__PURE__ */ React79.createElement(
|
|
5401
5545
|
"button",
|
|
5402
5546
|
{
|
|
5403
5547
|
ref,
|
|
@@ -5412,7 +5556,7 @@ var ToggleButton = React78.forwardRef(
|
|
|
5412
5556
|
}
|
|
5413
5557
|
);
|
|
5414
5558
|
ToggleButton.displayName = "ToggleButton";
|
|
5415
|
-
var ToggleButtonGroup =
|
|
5559
|
+
var ToggleButtonGroup = React79.forwardRef(
|
|
5416
5560
|
function ToggleButtonGroup2(props, ref) {
|
|
5417
5561
|
const {
|
|
5418
5562
|
value,
|
|
@@ -5439,7 +5583,7 @@ var ToggleButtonGroup = React78.forwardRef(
|
|
|
5439
5583
|
sxClass,
|
|
5440
5584
|
className
|
|
5441
5585
|
].filter(Boolean).join(" ");
|
|
5442
|
-
return /* @__PURE__ */
|
|
5586
|
+
return /* @__PURE__ */ React79.createElement(ToggleGroupContext.Provider, { value: { value, onChange, exclusive, size, disabled, color } }, /* @__PURE__ */ React79.createElement(
|
|
5443
5587
|
"div",
|
|
5444
5588
|
{
|
|
5445
5589
|
ref,
|
|
@@ -5455,7 +5599,7 @@ var ToggleButtonGroup = React78.forwardRef(
|
|
|
5455
5599
|
ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
5456
5600
|
|
|
5457
5601
|
// lib/Avatar/Avatar.tsx
|
|
5458
|
-
import
|
|
5602
|
+
import React80, { useState as useState13 } from "react";
|
|
5459
5603
|
var DEFAULT_PALETTE = [
|
|
5460
5604
|
"#a41b06",
|
|
5461
5605
|
"#8b1605",
|
|
@@ -5490,7 +5634,7 @@ function getInitials(alt) {
|
|
|
5490
5634
|
}
|
|
5491
5635
|
return words[0][0].toUpperCase();
|
|
5492
5636
|
}
|
|
5493
|
-
var Avatar =
|
|
5637
|
+
var Avatar = React80.forwardRef(
|
|
5494
5638
|
({
|
|
5495
5639
|
src,
|
|
5496
5640
|
alt,
|
|
@@ -5525,7 +5669,7 @@ var Avatar = React79.forwardRef(
|
|
|
5525
5669
|
inlineStyle.backgroundColor = bgColor;
|
|
5526
5670
|
inlineStyle.color = "#ffffff";
|
|
5527
5671
|
}
|
|
5528
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ React80.createElement("div", { ref, className: classes, style: inlineStyle, "aria-label": alt, role: alt ? "img" : void 0, onClick, tabIndex: onClick ? 0 : void 0 }, showImage ? /* @__PURE__ */ React80.createElement(
|
|
5529
5673
|
"img",
|
|
5530
5674
|
{
|
|
5531
5675
|
src,
|
|
@@ -5534,7 +5678,7 @@ var Avatar = React79.forwardRef(
|
|
|
5534
5678
|
onError: () => setImgError(true),
|
|
5535
5679
|
...imgProps
|
|
5536
5680
|
}
|
|
5537
|
-
) : /* @__PURE__ */
|
|
5681
|
+
) : /* @__PURE__ */ React80.createElement("span", { className: "rf-avatar__initials" }, content));
|
|
5538
5682
|
}
|
|
5539
5683
|
);
|
|
5540
5684
|
Avatar.displayName = "Avatar";
|
|
@@ -5547,7 +5691,7 @@ var AvatarGroup = ({
|
|
|
5547
5691
|
sx
|
|
5548
5692
|
}) => {
|
|
5549
5693
|
const sxClass = useSx(sx);
|
|
5550
|
-
const childArray =
|
|
5694
|
+
const childArray = React80.Children.toArray(children);
|
|
5551
5695
|
const totalCount = childArray.length;
|
|
5552
5696
|
const overflowCount = totalCount > max ? totalCount - (max - 1) : 0;
|
|
5553
5697
|
const visibleChildren = overflowCount > 0 ? childArray.slice(0, max - 1) : childArray;
|
|
@@ -5561,7 +5705,7 @@ var AvatarGroup = ({
|
|
|
5561
5705
|
}
|
|
5562
5706
|
const classes = ["rf-avatar-group", spacingClass, sxClass, className].filter(Boolean).join(" ");
|
|
5563
5707
|
const avatarsToRender = [...visibleChildren].reverse();
|
|
5564
|
-
return /* @__PURE__ */
|
|
5708
|
+
return /* @__PURE__ */ React80.createElement("div", { className: classes, style, role: "group" }, overflowCount > 0 && /* @__PURE__ */ React80.createElement(
|
|
5565
5709
|
Avatar,
|
|
5566
5710
|
{
|
|
5567
5711
|
className: "rf-avatar-group__overflow",
|
|
@@ -5573,7 +5717,7 @@ var AvatarGroup = ({
|
|
|
5573
5717
|
), avatarsToRender.map((child, i) => {
|
|
5574
5718
|
if (typeof spacing === "number") {
|
|
5575
5719
|
const typedChild = child;
|
|
5576
|
-
return
|
|
5720
|
+
return React80.cloneElement(typedChild, {
|
|
5577
5721
|
key: i,
|
|
5578
5722
|
style: {
|
|
5579
5723
|
marginLeft: i < avatarsToRender.length - 1 ? -spacing : 0,
|
|
@@ -5587,7 +5731,7 @@ var AvatarGroup = ({
|
|
|
5587
5731
|
AvatarGroup.displayName = "AvatarGroup";
|
|
5588
5732
|
|
|
5589
5733
|
// lib/Chip/Chip.tsx
|
|
5590
|
-
import
|
|
5734
|
+
import React81 from "react";
|
|
5591
5735
|
var Chip = ({
|
|
5592
5736
|
label,
|
|
5593
5737
|
onDelete,
|
|
@@ -5625,7 +5769,7 @@ var Chip = ({
|
|
|
5625
5769
|
onDelete();
|
|
5626
5770
|
}
|
|
5627
5771
|
};
|
|
5628
|
-
return /* @__PURE__ */
|
|
5772
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5629
5773
|
"div",
|
|
5630
5774
|
{
|
|
5631
5775
|
className: classes,
|
|
@@ -5636,10 +5780,10 @@ var Chip = ({
|
|
|
5636
5780
|
onKeyDown: !disabled ? handleKeyDown : void 0,
|
|
5637
5781
|
"aria-disabled": disabled || void 0
|
|
5638
5782
|
},
|
|
5639
|
-
avatar && /* @__PURE__ */
|
|
5640
|
-
!avatar && icon && /* @__PURE__ */
|
|
5641
|
-
/* @__PURE__ */
|
|
5642
|
-
onDelete && /* @__PURE__ */
|
|
5783
|
+
avatar && /* @__PURE__ */ React81.createElement("span", { className: "rf-chip__avatar" }, avatar),
|
|
5784
|
+
!avatar && icon && /* @__PURE__ */ React81.createElement("span", { className: "rf-chip__icon", "aria-hidden": "true" }, icon),
|
|
5785
|
+
/* @__PURE__ */ React81.createElement("span", { className: "rf-chip__label" }, label),
|
|
5786
|
+
onDelete && /* @__PURE__ */ React81.createElement(
|
|
5643
5787
|
"button",
|
|
5644
5788
|
{
|
|
5645
5789
|
className: "rf-chip__delete",
|
|
@@ -5660,7 +5804,7 @@ var Chip = ({
|
|
|
5660
5804
|
Chip.displayName = "Chip";
|
|
5661
5805
|
|
|
5662
5806
|
// lib/Divider/Divider.tsx
|
|
5663
|
-
import
|
|
5807
|
+
import React82 from "react";
|
|
5664
5808
|
var Divider = ({
|
|
5665
5809
|
orientation = "horizontal",
|
|
5666
5810
|
variant = "fullWidth",
|
|
@@ -5674,7 +5818,7 @@ var Divider = ({
|
|
|
5674
5818
|
sx
|
|
5675
5819
|
}) => {
|
|
5676
5820
|
const sxClass = useSx(sx);
|
|
5677
|
-
const hasChildren =
|
|
5821
|
+
const hasChildren = React82.Children.count(children) > 0;
|
|
5678
5822
|
const variantClass = variant === "inset" ? "rf-divider--inset" : variant === "middle" ? "rf-divider--middle" : "";
|
|
5679
5823
|
const classes = [
|
|
5680
5824
|
"rf-divider",
|
|
@@ -5690,7 +5834,7 @@ var Divider = ({
|
|
|
5690
5834
|
].filter(Boolean).join(" ");
|
|
5691
5835
|
const Tag = component || (hasChildren ? "div" : "hr");
|
|
5692
5836
|
if (!hasChildren) {
|
|
5693
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5694
5838
|
Tag,
|
|
5695
5839
|
{
|
|
5696
5840
|
className: classes,
|
|
@@ -5699,7 +5843,7 @@ var Divider = ({
|
|
|
5699
5843
|
}
|
|
5700
5844
|
);
|
|
5701
5845
|
}
|
|
5702
|
-
return /* @__PURE__ */
|
|
5846
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5703
5847
|
Tag,
|
|
5704
5848
|
{
|
|
5705
5849
|
className: classes,
|
|
@@ -5707,13 +5851,13 @@ var Divider = ({
|
|
|
5707
5851
|
role: "separator",
|
|
5708
5852
|
"aria-orientation": orientation
|
|
5709
5853
|
},
|
|
5710
|
-
/* @__PURE__ */
|
|
5854
|
+
/* @__PURE__ */ React82.createElement("span", { className: "rf-divider__text" }, children)
|
|
5711
5855
|
);
|
|
5712
5856
|
};
|
|
5713
5857
|
Divider.displayName = "Divider";
|
|
5714
5858
|
|
|
5715
5859
|
// lib/List/List.tsx
|
|
5716
|
-
import
|
|
5860
|
+
import React83 from "react";
|
|
5717
5861
|
var List = ({
|
|
5718
5862
|
dense = false,
|
|
5719
5863
|
disablePadding = false,
|
|
@@ -5731,7 +5875,7 @@ var List = ({
|
|
|
5731
5875
|
sxClass,
|
|
5732
5876
|
className
|
|
5733
5877
|
].filter(Boolean).join(" ");
|
|
5734
|
-
return /* @__PURE__ */
|
|
5878
|
+
return /* @__PURE__ */ React83.createElement("ul", { className: classes, style }, subheader, children);
|
|
5735
5879
|
};
|
|
5736
5880
|
List.displayName = "List";
|
|
5737
5881
|
var ListItem = ({
|
|
@@ -5755,7 +5899,7 @@ var ListItem = ({
|
|
|
5755
5899
|
sxClass,
|
|
5756
5900
|
className
|
|
5757
5901
|
].filter(Boolean).join(" ");
|
|
5758
|
-
return /* @__PURE__ */
|
|
5902
|
+
return /* @__PURE__ */ React83.createElement("li", { className: classes, style }, /* @__PURE__ */ React83.createElement("div", { className: "rf-list-item__content" }, children), secondaryAction && /* @__PURE__ */ React83.createElement("div", { className: "rf-list-item__secondary-action" }, secondaryAction));
|
|
5759
5903
|
};
|
|
5760
5904
|
ListItem.displayName = "ListItem";
|
|
5761
5905
|
var ListItemText = ({
|
|
@@ -5772,12 +5916,12 @@ var ListItemText = ({
|
|
|
5772
5916
|
inset ? "rf-list-item-text--inset" : "",
|
|
5773
5917
|
sxClass
|
|
5774
5918
|
].filter(Boolean).join(" ");
|
|
5775
|
-
return /* @__PURE__ */
|
|
5919
|
+
return /* @__PURE__ */ React83.createElement("div", { className: classes }, /* @__PURE__ */ React83.createElement("p", { className: "rf-list-item-text__primary", ...primaryTypographyProps }, primary), secondary && /* @__PURE__ */ React83.createElement("p", { className: "rf-list-item-text__secondary", ...secondaryTypographyProps }, secondary));
|
|
5776
5920
|
};
|
|
5777
5921
|
ListItemText.displayName = "ListItemText";
|
|
5778
5922
|
var ListItemIcon = ({ children, sx }) => {
|
|
5779
5923
|
const sxClass = useSx(sx);
|
|
5780
|
-
return /* @__PURE__ */
|
|
5924
|
+
return /* @__PURE__ */ React83.createElement("div", { className: ["rf-list-item-icon", sxClass].filter(Boolean).join(" "), "aria-hidden": "true" }, children);
|
|
5781
5925
|
};
|
|
5782
5926
|
ListItemIcon.displayName = "ListItemIcon";
|
|
5783
5927
|
var ListItemButton = ({
|
|
@@ -5809,7 +5953,7 @@ var ListItemButton = ({
|
|
|
5809
5953
|
"aria-disabled": disabled || void 0
|
|
5810
5954
|
};
|
|
5811
5955
|
if (href) {
|
|
5812
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ React83.createElement(
|
|
5813
5957
|
"a",
|
|
5814
5958
|
{
|
|
5815
5959
|
href,
|
|
@@ -5820,7 +5964,7 @@ var ListItemButton = ({
|
|
|
5820
5964
|
children
|
|
5821
5965
|
);
|
|
5822
5966
|
}
|
|
5823
|
-
return /* @__PURE__ */
|
|
5967
|
+
return /* @__PURE__ */ React83.createElement(
|
|
5824
5968
|
"button",
|
|
5825
5969
|
{
|
|
5826
5970
|
type: "button",
|
|
@@ -5849,12 +5993,12 @@ var ListSubheader = ({
|
|
|
5849
5993
|
color !== "default" ? `rf-list-subheader--color-${color}` : "",
|
|
5850
5994
|
sxClass
|
|
5851
5995
|
].filter(Boolean).join(" ");
|
|
5852
|
-
return /* @__PURE__ */
|
|
5996
|
+
return /* @__PURE__ */ React83.createElement("li", { className: classes, role: "presentation", "aria-label": typeof children === "string" ? children : void 0 }, children);
|
|
5853
5997
|
};
|
|
5854
5998
|
ListSubheader.displayName = "ListSubheader";
|
|
5855
5999
|
|
|
5856
6000
|
// lib/Typography/Typography.tsx
|
|
5857
|
-
import
|
|
6001
|
+
import React84 from "react";
|
|
5858
6002
|
var VARIANT_ELEMENT_MAP = {
|
|
5859
6003
|
h1: "h1",
|
|
5860
6004
|
h2: "h2",
|
|
@@ -5928,12 +6072,12 @@ var Typography = ({
|
|
|
5928
6072
|
...weightStyle,
|
|
5929
6073
|
...style
|
|
5930
6074
|
};
|
|
5931
|
-
return /* @__PURE__ */
|
|
6075
|
+
return /* @__PURE__ */ React84.createElement(Tag, { className: classes, style: Object.keys(inlineStyle).length > 0 ? inlineStyle : void 0 }, children);
|
|
5932
6076
|
};
|
|
5933
6077
|
Typography.displayName = "Typography";
|
|
5934
6078
|
|
|
5935
6079
|
// lib/Skeleton/Skeleton.tsx
|
|
5936
|
-
import
|
|
6080
|
+
import React85 from "react";
|
|
5937
6081
|
var Skeleton = ({
|
|
5938
6082
|
variant = "text",
|
|
5939
6083
|
width,
|
|
@@ -5969,7 +6113,7 @@ var Skeleton = ({
|
|
|
5969
6113
|
if (variant === "rounded" && !height) {
|
|
5970
6114
|
inlineStyle.height = 140;
|
|
5971
6115
|
}
|
|
5972
|
-
return /* @__PURE__ */
|
|
6116
|
+
return /* @__PURE__ */ React85.createElement(
|
|
5973
6117
|
"span",
|
|
5974
6118
|
{
|
|
5975
6119
|
className: classes,
|
|
@@ -5982,7 +6126,7 @@ var Skeleton = ({
|
|
|
5982
6126
|
Skeleton.displayName = "Skeleton";
|
|
5983
6127
|
|
|
5984
6128
|
// lib/Tooltip/Tooltip.tsx
|
|
5985
|
-
import
|
|
6129
|
+
import React86, {
|
|
5986
6130
|
useCallback as useCallback5,
|
|
5987
6131
|
useEffect as useEffect11,
|
|
5988
6132
|
useRef as useRef15,
|
|
@@ -6173,7 +6317,7 @@ var Tooltip = ({
|
|
|
6173
6317
|
sxClass,
|
|
6174
6318
|
className
|
|
6175
6319
|
].filter(Boolean).join(" ");
|
|
6176
|
-
const tooltipElement = /* @__PURE__ */
|
|
6320
|
+
const tooltipElement = /* @__PURE__ */ React86.createElement(
|
|
6177
6321
|
"div",
|
|
6178
6322
|
{
|
|
6179
6323
|
ref: tooltipRef,
|
|
@@ -6187,7 +6331,7 @@ var Tooltip = ({
|
|
|
6187
6331
|
"aria-hidden": !isOpen
|
|
6188
6332
|
},
|
|
6189
6333
|
title,
|
|
6190
|
-
arrow && /* @__PURE__ */
|
|
6334
|
+
arrow && /* @__PURE__ */ React86.createElement(
|
|
6191
6335
|
"span",
|
|
6192
6336
|
{
|
|
6193
6337
|
className: "rf-tooltip__arrow",
|
|
@@ -6198,7 +6342,7 @@ var Tooltip = ({
|
|
|
6198
6342
|
}
|
|
6199
6343
|
)
|
|
6200
6344
|
);
|
|
6201
|
-
return /* @__PURE__ */
|
|
6345
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement(
|
|
6202
6346
|
"span",
|
|
6203
6347
|
{
|
|
6204
6348
|
ref: anchorRef,
|
|
@@ -6206,14 +6350,14 @@ var Tooltip = ({
|
|
|
6206
6350
|
"aria-describedby": isOpen ? "rf-tooltip" : void 0,
|
|
6207
6351
|
...childProps
|
|
6208
6352
|
},
|
|
6209
|
-
|
|
6353
|
+
React86.cloneElement(children)
|
|
6210
6354
|
), ReactDOM.createPortal(tooltipElement, document.body));
|
|
6211
6355
|
};
|
|
6212
6356
|
Tooltip.displayName = "Tooltip";
|
|
6213
6357
|
|
|
6214
6358
|
// lib/Box/Box.tsx
|
|
6215
|
-
import * as
|
|
6216
|
-
var Box =
|
|
6359
|
+
import * as React87 from "react";
|
|
6360
|
+
var Box = React87.forwardRef(
|
|
6217
6361
|
({
|
|
6218
6362
|
component = "div",
|
|
6219
6363
|
children,
|
|
@@ -6226,6 +6370,23 @@ var Box = React86.forwardRef(
|
|
|
6226
6370
|
margin,
|
|
6227
6371
|
width,
|
|
6228
6372
|
height,
|
|
6373
|
+
minWidth,
|
|
6374
|
+
maxWidth,
|
|
6375
|
+
minHeight,
|
|
6376
|
+
maxHeight,
|
|
6377
|
+
flex,
|
|
6378
|
+
flexWrap,
|
|
6379
|
+
flexGrow,
|
|
6380
|
+
flexShrink,
|
|
6381
|
+
overflow,
|
|
6382
|
+
position,
|
|
6383
|
+
top,
|
|
6384
|
+
right,
|
|
6385
|
+
bottom,
|
|
6386
|
+
left,
|
|
6387
|
+
borderRadius,
|
|
6388
|
+
bgcolor,
|
|
6389
|
+
color,
|
|
6229
6390
|
className,
|
|
6230
6391
|
style,
|
|
6231
6392
|
sx,
|
|
@@ -6242,18 +6403,35 @@ var Box = React86.forwardRef(
|
|
|
6242
6403
|
...margin !== void 0 ? { margin: typeof margin === "number" ? `${margin}px` : margin } : {},
|
|
6243
6404
|
...width !== void 0 ? { width: typeof width === "number" ? `${width}px` : width } : {},
|
|
6244
6405
|
...height !== void 0 ? { height: typeof height === "number" ? `${height}px` : height } : {},
|
|
6406
|
+
...minWidth !== void 0 ? { minWidth: typeof minWidth === "number" ? `${minWidth}px` : minWidth } : {},
|
|
6407
|
+
...maxWidth !== void 0 ? { maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth } : {},
|
|
6408
|
+
...minHeight !== void 0 ? { minHeight: typeof minHeight === "number" ? `${minHeight}px` : minHeight } : {},
|
|
6409
|
+
...maxHeight !== void 0 ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight } : {},
|
|
6410
|
+
...flex !== void 0 ? { flex } : {},
|
|
6411
|
+
...flexWrap !== void 0 ? { flexWrap } : {},
|
|
6412
|
+
...flexGrow !== void 0 ? { flexGrow } : {},
|
|
6413
|
+
...flexShrink !== void 0 ? { flexShrink } : {},
|
|
6414
|
+
...overflow !== void 0 ? { overflow } : {},
|
|
6415
|
+
...position !== void 0 ? { position } : {},
|
|
6416
|
+
...top !== void 0 ? { top: typeof top === "number" ? `${top}px` : top } : {},
|
|
6417
|
+
...right !== void 0 ? { right: typeof right === "number" ? `${right}px` : right } : {},
|
|
6418
|
+
...bottom !== void 0 ? { bottom: typeof bottom === "number" ? `${bottom}px` : bottom } : {},
|
|
6419
|
+
...left !== void 0 ? { left: typeof left === "number" ? `${left}px` : left } : {},
|
|
6420
|
+
...borderRadius !== void 0 ? { borderRadius: typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius } : {},
|
|
6421
|
+
...bgcolor !== void 0 ? { backgroundColor: bgcolor } : {},
|
|
6422
|
+
...color !== void 0 ? { color } : {},
|
|
6245
6423
|
...style
|
|
6246
6424
|
};
|
|
6247
6425
|
const classes = ["rf-box", sxClass, className].filter(Boolean).join(" ");
|
|
6248
6426
|
const Tag = component;
|
|
6249
|
-
return /* @__PURE__ */
|
|
6427
|
+
return /* @__PURE__ */ React87.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, children);
|
|
6250
6428
|
}
|
|
6251
6429
|
);
|
|
6252
6430
|
Box.displayName = "Box";
|
|
6253
6431
|
|
|
6254
6432
|
// lib/Stack/Stack.tsx
|
|
6255
|
-
import * as
|
|
6256
|
-
var Stack =
|
|
6433
|
+
import * as React88 from "react";
|
|
6434
|
+
var Stack = React88.forwardRef(
|
|
6257
6435
|
({
|
|
6258
6436
|
direction = "column",
|
|
6259
6437
|
spacing,
|
|
@@ -6262,6 +6440,8 @@ var Stack = React87.forwardRef(
|
|
|
6262
6440
|
divider,
|
|
6263
6441
|
flexWrap,
|
|
6264
6442
|
useFlexGap = true,
|
|
6443
|
+
flex,
|
|
6444
|
+
overflow,
|
|
6265
6445
|
component = "div",
|
|
6266
6446
|
children,
|
|
6267
6447
|
className,
|
|
@@ -6277,19 +6457,21 @@ var Stack = React87.forwardRef(
|
|
|
6277
6457
|
...justifyContent !== void 0 ? { justifyContent } : {},
|
|
6278
6458
|
...flexWrap !== void 0 ? { flexWrap } : {},
|
|
6279
6459
|
...gapValue !== void 0 && useFlexGap ? { gap: gapValue } : {},
|
|
6460
|
+
...flex !== void 0 ? { flex } : {},
|
|
6461
|
+
...overflow !== void 0 ? { overflow } : {},
|
|
6280
6462
|
...style
|
|
6281
6463
|
};
|
|
6282
6464
|
const classes = ["rf-stack", sxClass, className].filter(Boolean).join(" ");
|
|
6283
6465
|
let content;
|
|
6284
6466
|
if (divider) {
|
|
6285
|
-
const childArray =
|
|
6467
|
+
const childArray = React88.Children.toArray(children).filter(
|
|
6286
6468
|
(child) => child !== null && child !== void 0
|
|
6287
6469
|
);
|
|
6288
6470
|
content = childArray.reduce((acc, child, idx) => {
|
|
6289
6471
|
acc.push(child);
|
|
6290
6472
|
if (idx < childArray.length - 1) {
|
|
6291
6473
|
acc.push(
|
|
6292
|
-
/* @__PURE__ */
|
|
6474
|
+
/* @__PURE__ */ React88.createElement("div", { key: `divider-${idx}`, className: "rf-stack-divider" }, divider)
|
|
6293
6475
|
);
|
|
6294
6476
|
}
|
|
6295
6477
|
return acc;
|
|
@@ -6298,13 +6480,13 @@ var Stack = React87.forwardRef(
|
|
|
6298
6480
|
content = children;
|
|
6299
6481
|
}
|
|
6300
6482
|
const Tag = component;
|
|
6301
|
-
return /* @__PURE__ */
|
|
6483
|
+
return /* @__PURE__ */ React88.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, content);
|
|
6302
6484
|
}
|
|
6303
6485
|
);
|
|
6304
6486
|
Stack.displayName = "Stack";
|
|
6305
6487
|
|
|
6306
6488
|
// lib/Grid/Grid.tsx
|
|
6307
|
-
import * as
|
|
6489
|
+
import * as React89 from "react";
|
|
6308
6490
|
function getBreakpointClass(bp, val) {
|
|
6309
6491
|
if (val === void 0) return "";
|
|
6310
6492
|
if (val === true) return `rf-grid-${bp}-12`;
|
|
@@ -6317,7 +6499,7 @@ function getSpacingGap(spacing) {
|
|
|
6317
6499
|
const base = spacing.xs ?? spacing.sm ?? spacing.md ?? 0;
|
|
6318
6500
|
return `${base * 8}px`;
|
|
6319
6501
|
}
|
|
6320
|
-
var Grid =
|
|
6502
|
+
var Grid = React89.forwardRef(
|
|
6321
6503
|
({
|
|
6322
6504
|
container = false,
|
|
6323
6505
|
item = false,
|
|
@@ -6367,14 +6549,14 @@ var Grid = React88.forwardRef(
|
|
|
6367
6549
|
className
|
|
6368
6550
|
].filter(Boolean).join(" ");
|
|
6369
6551
|
const Tag = component;
|
|
6370
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ React89.createElement(Tag, { ref, className: classes, style: inlineStyle, ...rest }, children);
|
|
6371
6553
|
}
|
|
6372
6554
|
);
|
|
6373
6555
|
Grid.displayName = "Grid";
|
|
6374
6556
|
|
|
6375
6557
|
// lib/Paper/Paper.tsx
|
|
6376
|
-
import * as
|
|
6377
|
-
var Paper =
|
|
6558
|
+
import * as React90 from "react";
|
|
6559
|
+
var Paper = React90.forwardRef(
|
|
6378
6560
|
({
|
|
6379
6561
|
elevation = 1,
|
|
6380
6562
|
square = false,
|
|
@@ -6396,14 +6578,14 @@ var Paper = React89.forwardRef(
|
|
|
6396
6578
|
className
|
|
6397
6579
|
].filter(Boolean).join(" ");
|
|
6398
6580
|
const Tag = component;
|
|
6399
|
-
return /* @__PURE__ */
|
|
6581
|
+
return /* @__PURE__ */ React90.createElement(Tag, { ref, className: classes, style, ...rest }, children);
|
|
6400
6582
|
}
|
|
6401
6583
|
);
|
|
6402
6584
|
Paper.displayName = "Paper";
|
|
6403
6585
|
|
|
6404
6586
|
// lib/Card/Card.tsx
|
|
6405
|
-
import * as
|
|
6406
|
-
var Card =
|
|
6587
|
+
import * as React91 from "react";
|
|
6588
|
+
var Card = React91.forwardRef(
|
|
6407
6589
|
({
|
|
6408
6590
|
elevation = 1,
|
|
6409
6591
|
variant = "elevation",
|
|
@@ -6422,33 +6604,33 @@ var Card = React90.forwardRef(
|
|
|
6422
6604
|
sxClass,
|
|
6423
6605
|
className
|
|
6424
6606
|
].filter(Boolean).join(" ");
|
|
6425
|
-
return /* @__PURE__ */
|
|
6607
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
6426
6608
|
}
|
|
6427
6609
|
);
|
|
6428
6610
|
Card.displayName = "Card";
|
|
6429
|
-
var CardContent =
|
|
6611
|
+
var CardContent = React91.forwardRef(
|
|
6430
6612
|
({ children, className, style, sx, ...rest }, ref) => {
|
|
6431
6613
|
const sxClass = useSx(sx);
|
|
6432
6614
|
const classes = ["rf-card-content", sxClass, className].filter(Boolean).join(" ");
|
|
6433
|
-
return /* @__PURE__ */
|
|
6615
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
6434
6616
|
}
|
|
6435
6617
|
);
|
|
6436
6618
|
CardContent.displayName = "CardContent";
|
|
6437
|
-
var CardHeader =
|
|
6619
|
+
var CardHeader = React91.forwardRef(
|
|
6438
6620
|
({ title, subheader, avatar, action, className, style, sx, ...rest }, ref) => {
|
|
6439
6621
|
const sxClass = useSx(sx);
|
|
6440
6622
|
const classes = ["rf-card-header", sxClass, className].filter(Boolean).join(" ");
|
|
6441
|
-
return /* @__PURE__ */
|
|
6623
|
+
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));
|
|
6442
6624
|
}
|
|
6443
6625
|
);
|
|
6444
6626
|
CardHeader.displayName = "CardHeader";
|
|
6445
|
-
var CardMedia =
|
|
6627
|
+
var CardMedia = React91.forwardRef(
|
|
6446
6628
|
({ component = "div", image, src, height, alt, className, style, sx, ...rest }, ref) => {
|
|
6447
6629
|
const sxClass = useSx(sx);
|
|
6448
6630
|
const classes = ["rf-card-media", sxClass, className].filter(Boolean).join(" ");
|
|
6449
6631
|
const computedHeight = height !== void 0 ? typeof height === "number" ? `${height}px` : height : "200px";
|
|
6450
6632
|
if (component === "img") {
|
|
6451
|
-
return /* @__PURE__ */
|
|
6633
|
+
return /* @__PURE__ */ React91.createElement(
|
|
6452
6634
|
"img",
|
|
6453
6635
|
{
|
|
6454
6636
|
ref,
|
|
@@ -6461,7 +6643,7 @@ var CardMedia = React90.forwardRef(
|
|
|
6461
6643
|
);
|
|
6462
6644
|
}
|
|
6463
6645
|
if (component === "video") {
|
|
6464
|
-
return /* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ React91.createElement(
|
|
6465
6647
|
"video",
|
|
6466
6648
|
{
|
|
6467
6649
|
ref,
|
|
@@ -6477,7 +6659,7 @@ var CardMedia = React90.forwardRef(
|
|
|
6477
6659
|
...image ? { backgroundImage: `url(${image})` } : {},
|
|
6478
6660
|
...style
|
|
6479
6661
|
};
|
|
6480
|
-
return /* @__PURE__ */
|
|
6662
|
+
return /* @__PURE__ */ React91.createElement(
|
|
6481
6663
|
"div",
|
|
6482
6664
|
{
|
|
6483
6665
|
ref,
|
|
@@ -6489,7 +6671,7 @@ var CardMedia = React90.forwardRef(
|
|
|
6489
6671
|
}
|
|
6490
6672
|
);
|
|
6491
6673
|
CardMedia.displayName = "CardMedia";
|
|
6492
|
-
var CardActions =
|
|
6674
|
+
var CardActions = React91.forwardRef(
|
|
6493
6675
|
({ disableSpacing = false, children, className, style, sx, ...rest }, ref) => {
|
|
6494
6676
|
const sxClass = useSx(sx);
|
|
6495
6677
|
const classes = [
|
|
@@ -6498,13 +6680,13 @@ var CardActions = React90.forwardRef(
|
|
|
6498
6680
|
sxClass,
|
|
6499
6681
|
className
|
|
6500
6682
|
].filter(Boolean).join(" ");
|
|
6501
|
-
return /* @__PURE__ */
|
|
6683
|
+
return /* @__PURE__ */ React91.createElement("div", { ref, className: classes, style, ...rest }, children);
|
|
6502
6684
|
}
|
|
6503
6685
|
);
|
|
6504
6686
|
CardActions.displayName = "CardActions";
|
|
6505
6687
|
|
|
6506
6688
|
// lib/Accordion/Accordion.tsx
|
|
6507
|
-
import * as
|
|
6689
|
+
import * as React92 from "react";
|
|
6508
6690
|
import { useState as useState15, useContext as useContext4, createContext as createContext4 } from "react";
|
|
6509
6691
|
var AccordionContext = createContext4({
|
|
6510
6692
|
expanded: false,
|
|
@@ -6512,7 +6694,7 @@ var AccordionContext = createContext4({
|
|
|
6512
6694
|
toggle: () => {
|
|
6513
6695
|
}
|
|
6514
6696
|
});
|
|
6515
|
-
var Accordion =
|
|
6697
|
+
var Accordion = React92.forwardRef(
|
|
6516
6698
|
({
|
|
6517
6699
|
expanded: expandedProp,
|
|
6518
6700
|
defaultExpanded = false,
|
|
@@ -6547,11 +6729,11 @@ var Accordion = React91.forwardRef(
|
|
|
6547
6729
|
sxClass,
|
|
6548
6730
|
className
|
|
6549
6731
|
].filter(Boolean).join(" ");
|
|
6550
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React92.createElement(AccordionContext.Provider, { value: { expanded, disabled, toggle } }, /* @__PURE__ */ React92.createElement("div", { ref, className: classes, style, ...rest }, children));
|
|
6551
6733
|
}
|
|
6552
6734
|
);
|
|
6553
6735
|
Accordion.displayName = "Accordion";
|
|
6554
|
-
var ChevronIcon = () => /* @__PURE__ */
|
|
6736
|
+
var ChevronIcon = () => /* @__PURE__ */ React92.createElement(
|
|
6555
6737
|
"svg",
|
|
6556
6738
|
{
|
|
6557
6739
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6565,9 +6747,9 @@ var ChevronIcon = () => /* @__PURE__ */ React91.createElement(
|
|
|
6565
6747
|
strokeLinejoin: "round",
|
|
6566
6748
|
"aria-hidden": "true"
|
|
6567
6749
|
},
|
|
6568
|
-
/* @__PURE__ */
|
|
6750
|
+
/* @__PURE__ */ React92.createElement("polyline", { points: "6 9 12 15 18 9" })
|
|
6569
6751
|
);
|
|
6570
|
-
var AccordionSummary =
|
|
6752
|
+
var AccordionSummary = React92.forwardRef(
|
|
6571
6753
|
({ expandIcon, children, sx, className, style, ...rest }, ref) => {
|
|
6572
6754
|
const sxClass = useSx(sx);
|
|
6573
6755
|
const { expanded, toggle, disabled } = useContext4(AccordionContext);
|
|
@@ -6581,7 +6763,7 @@ var AccordionSummary = React91.forwardRef(
|
|
|
6581
6763
|
"rf-accordion-summary-icon",
|
|
6582
6764
|
expanded ? "rf-accordion-icon-expanded" : ""
|
|
6583
6765
|
].filter(Boolean).join(" ");
|
|
6584
|
-
return /* @__PURE__ */
|
|
6766
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6585
6767
|
"button",
|
|
6586
6768
|
{
|
|
6587
6769
|
ref,
|
|
@@ -6593,13 +6775,13 @@ var AccordionSummary = React91.forwardRef(
|
|
|
6593
6775
|
"aria-expanded": expanded,
|
|
6594
6776
|
...rest
|
|
6595
6777
|
},
|
|
6596
|
-
/* @__PURE__ */
|
|
6597
|
-
/* @__PURE__ */
|
|
6778
|
+
/* @__PURE__ */ React92.createElement("span", { className: "rf-accordion-summary-content" }, children),
|
|
6779
|
+
/* @__PURE__ */ React92.createElement("span", { className: iconClasses }, expandIcon !== void 0 ? expandIcon : /* @__PURE__ */ React92.createElement(ChevronIcon, null))
|
|
6598
6780
|
);
|
|
6599
6781
|
}
|
|
6600
6782
|
);
|
|
6601
6783
|
AccordionSummary.displayName = "AccordionSummary";
|
|
6602
|
-
var AccordionDetails =
|
|
6784
|
+
var AccordionDetails = React92.forwardRef(
|
|
6603
6785
|
({ children, sx, className, style, ...rest }, ref) => {
|
|
6604
6786
|
const sxClass = useSx(sx);
|
|
6605
6787
|
const { expanded } = useContext4(AccordionContext);
|
|
@@ -6612,13 +6794,13 @@ var AccordionDetails = React91.forwardRef(
|
|
|
6612
6794
|
sxClass,
|
|
6613
6795
|
className
|
|
6614
6796
|
].filter(Boolean).join(" ");
|
|
6615
|
-
return /* @__PURE__ */
|
|
6797
|
+
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)));
|
|
6616
6798
|
}
|
|
6617
6799
|
);
|
|
6618
6800
|
AccordionDetails.displayName = "AccordionDetails";
|
|
6619
6801
|
|
|
6620
6802
|
// lib/Tabs/Tabs.tsx
|
|
6621
|
-
import
|
|
6803
|
+
import React93, {
|
|
6622
6804
|
useEffect as useEffect12,
|
|
6623
6805
|
useLayoutEffect,
|
|
6624
6806
|
useRef as useRef16,
|
|
@@ -6653,7 +6835,7 @@ var Tab = ({
|
|
|
6653
6835
|
_onClick(value);
|
|
6654
6836
|
}
|
|
6655
6837
|
};
|
|
6656
|
-
return /* @__PURE__ */
|
|
6838
|
+
return /* @__PURE__ */ React93.createElement(
|
|
6657
6839
|
"button",
|
|
6658
6840
|
{
|
|
6659
6841
|
ref: _tabRef,
|
|
@@ -6665,9 +6847,9 @@ var Tab = ({
|
|
|
6665
6847
|
"aria-disabled": disabled,
|
|
6666
6848
|
type: "button"
|
|
6667
6849
|
},
|
|
6668
|
-
icon && (iconPosition === "top" || iconPosition === "start") && /* @__PURE__ */
|
|
6850
|
+
icon && (iconPosition === "top" || iconPosition === "start") && /* @__PURE__ */ React93.createElement("span", { className: "rf-tab__icon" }, icon),
|
|
6669
6851
|
label,
|
|
6670
|
-
icon && (iconPosition === "bottom" || iconPosition === "end") && /* @__PURE__ */
|
|
6852
|
+
icon && (iconPosition === "bottom" || iconPosition === "end") && /* @__PURE__ */ React93.createElement("span", { className: "rf-tab__icon" }, icon)
|
|
6671
6853
|
);
|
|
6672
6854
|
};
|
|
6673
6855
|
Tab.displayName = "Tab";
|
|
@@ -6754,7 +6936,7 @@ var Tabs = ({
|
|
|
6754
6936
|
}
|
|
6755
6937
|
});
|
|
6756
6938
|
});
|
|
6757
|
-
return /* @__PURE__ */
|
|
6939
|
+
return /* @__PURE__ */ React93.createElement("div", { className: rootClasses, style, role: "tablist" }, /* @__PURE__ */ React93.createElement(
|
|
6758
6940
|
"div",
|
|
6759
6941
|
{
|
|
6760
6942
|
ref: tabsListRef,
|
|
@@ -6762,7 +6944,7 @@ var Tabs = ({
|
|
|
6762
6944
|
style: centered ? { justifyContent: "center" } : void 0
|
|
6763
6945
|
},
|
|
6764
6946
|
enrichedChildren,
|
|
6765
|
-
/* @__PURE__ */
|
|
6947
|
+
/* @__PURE__ */ React93.createElement(
|
|
6766
6948
|
"span",
|
|
6767
6949
|
{
|
|
6768
6950
|
className: "rf-tabs__indicator",
|
|
@@ -6773,9 +6955,33 @@ var Tabs = ({
|
|
|
6773
6955
|
));
|
|
6774
6956
|
};
|
|
6775
6957
|
Tabs.displayName = "Tabs";
|
|
6958
|
+
var TabPanel = ({
|
|
6959
|
+
value,
|
|
6960
|
+
activeValue,
|
|
6961
|
+
children,
|
|
6962
|
+
keepMounted = false,
|
|
6963
|
+
className = "",
|
|
6964
|
+
style,
|
|
6965
|
+
sx
|
|
6966
|
+
}) => {
|
|
6967
|
+
const sxClass = useSx(sx);
|
|
6968
|
+
const isActive = value === activeValue;
|
|
6969
|
+
if (!isActive && !keepMounted) return null;
|
|
6970
|
+
return /* @__PURE__ */ React93.createElement(
|
|
6971
|
+
"div",
|
|
6972
|
+
{
|
|
6973
|
+
role: "tabpanel",
|
|
6974
|
+
hidden: !isActive,
|
|
6975
|
+
className: ["rf-tab-panel", sxClass, className].filter(Boolean).join(" "),
|
|
6976
|
+
style
|
|
6977
|
+
},
|
|
6978
|
+
isActive && children
|
|
6979
|
+
);
|
|
6980
|
+
};
|
|
6981
|
+
TabPanel.displayName = "TabPanel";
|
|
6776
6982
|
|
|
6777
6983
|
// lib/Breadcrumbs/Breadcrumbs.tsx
|
|
6778
|
-
import
|
|
6984
|
+
import React94, {
|
|
6779
6985
|
Children as Children3,
|
|
6780
6986
|
useState as useState17
|
|
6781
6987
|
} from "react";
|
|
@@ -6801,7 +7007,7 @@ var Breadcrumbs = ({
|
|
|
6801
7007
|
const after = childArray.slice(totalItems - itemsAfterCollapse);
|
|
6802
7008
|
itemsToRender = [
|
|
6803
7009
|
...before,
|
|
6804
|
-
/* @__PURE__ */
|
|
7010
|
+
/* @__PURE__ */ React94.createElement(
|
|
6805
7011
|
"button",
|
|
6806
7012
|
{
|
|
6807
7013
|
key: "collapse-btn",
|
|
@@ -6818,15 +7024,15 @@ var Breadcrumbs = ({
|
|
|
6818
7024
|
itemsToRender = childArray;
|
|
6819
7025
|
}
|
|
6820
7026
|
const classes = ["rf-breadcrumbs", sxClass, className].filter(Boolean).join(" ");
|
|
6821
|
-
return /* @__PURE__ */
|
|
7027
|
+
return /* @__PURE__ */ React94.createElement("nav", { "aria-label": ariaLabel }, /* @__PURE__ */ React94.createElement("ol", { className: classes, style }, itemsToRender.map((item, index) => {
|
|
6822
7028
|
const isLast = index === itemsToRender.length - 1;
|
|
6823
|
-
return /* @__PURE__ */
|
|
7029
|
+
return /* @__PURE__ */ React94.createElement(React94.Fragment, { key: index }, /* @__PURE__ */ React94.createElement(
|
|
6824
7030
|
"li",
|
|
6825
7031
|
{
|
|
6826
7032
|
className: `rf-breadcrumbs__item${isLast ? " rf-breadcrumbs__current" : ""}`
|
|
6827
7033
|
},
|
|
6828
7034
|
item
|
|
6829
|
-
), !isLast && /* @__PURE__ */
|
|
7035
|
+
), !isLast && /* @__PURE__ */ React94.createElement(
|
|
6830
7036
|
"li",
|
|
6831
7037
|
{
|
|
6832
7038
|
className: "rf-breadcrumbs__separator",
|
|
@@ -6839,7 +7045,7 @@ var Breadcrumbs = ({
|
|
|
6839
7045
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
6840
7046
|
|
|
6841
7047
|
// lib/Stepper/Stepper.tsx
|
|
6842
|
-
import
|
|
7048
|
+
import React95, {
|
|
6843
7049
|
Children as Children4,
|
|
6844
7050
|
cloneElement as cloneElement2,
|
|
6845
7051
|
isValidElement as isValidElement2
|
|
@@ -6856,7 +7062,7 @@ var DefaultStepIcon = ({
|
|
|
6856
7062
|
completed ? "rf-step-icon--completed" : "",
|
|
6857
7063
|
error ? "rf-step-icon--error" : ""
|
|
6858
7064
|
].filter(Boolean).join(" ");
|
|
6859
|
-
return /* @__PURE__ */
|
|
7065
|
+
return /* @__PURE__ */ React95.createElement("div", { className: classes }, completed ? "\u2713" : error ? "!" : icon);
|
|
6860
7066
|
};
|
|
6861
7067
|
var StepLabel = ({
|
|
6862
7068
|
icon,
|
|
@@ -6878,7 +7084,7 @@ var StepLabel = ({
|
|
|
6878
7084
|
_completed ? "rf-step-label__title--completed" : "",
|
|
6879
7085
|
error ? "rf-step-label__title--error" : ""
|
|
6880
7086
|
].filter(Boolean).join(" ");
|
|
6881
|
-
return /* @__PURE__ */
|
|
7087
|
+
return /* @__PURE__ */ React95.createElement("div", { className: `rf-step-label${sxClass ? ` ${sxClass}` : ""}` }, /* @__PURE__ */ React95.createElement("div", { className: "rf-step-label__icon-container" }, icon ? icon : /* @__PURE__ */ React95.createElement(
|
|
6882
7088
|
IconComp,
|
|
6883
7089
|
{
|
|
6884
7090
|
active: _active,
|
|
@@ -6886,7 +7092,7 @@ var StepLabel = ({
|
|
|
6886
7092
|
error,
|
|
6887
7093
|
icon: _stepIndex + 1
|
|
6888
7094
|
}
|
|
6889
|
-
)), /* @__PURE__ */
|
|
7095
|
+
)), /* @__PURE__ */ React95.createElement("div", { className: "rf-step-label__text" }, /* @__PURE__ */ React95.createElement("span", { className: titleClasses }, children), optional && /* @__PURE__ */ React95.createElement("span", { className: "rf-step-label__optional" }, optional)));
|
|
6890
7096
|
};
|
|
6891
7097
|
StepLabel.displayName = "StepLabel";
|
|
6892
7098
|
var StepContent = ({
|
|
@@ -6895,7 +7101,7 @@ var StepContent = ({
|
|
|
6895
7101
|
_isLast = false
|
|
6896
7102
|
}) => {
|
|
6897
7103
|
const sxClass = useSx(sx);
|
|
6898
|
-
return /* @__PURE__ */
|
|
7104
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6899
7105
|
"div",
|
|
6900
7106
|
{
|
|
6901
7107
|
className: [
|
|
@@ -6915,7 +7121,7 @@ var StepButton = ({
|
|
|
6915
7121
|
_disabled = false
|
|
6916
7122
|
}) => {
|
|
6917
7123
|
const sxClass = useSx(sx);
|
|
6918
|
-
return /* @__PURE__ */
|
|
7124
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6919
7125
|
"button",
|
|
6920
7126
|
{
|
|
6921
7127
|
className: `rf-step-button${sxClass ? ` ${sxClass}` : ""}`,
|
|
@@ -6963,7 +7169,7 @@ var Step = ({
|
|
|
6963
7169
|
}
|
|
6964
7170
|
return child;
|
|
6965
7171
|
});
|
|
6966
|
-
return /* @__PURE__ */
|
|
7172
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6967
7173
|
"div",
|
|
6968
7174
|
{
|
|
6969
7175
|
className: `rf-step${sxClass ? ` ${sxClass}` : ""}`,
|
|
@@ -6978,7 +7184,7 @@ Step.displayName = "Step";
|
|
|
6978
7184
|
var DefaultConnector = ({
|
|
6979
7185
|
completed,
|
|
6980
7186
|
active
|
|
6981
|
-
}) => /* @__PURE__ */
|
|
7187
|
+
}) => /* @__PURE__ */ React95.createElement(
|
|
6982
7188
|
"div",
|
|
6983
7189
|
{
|
|
6984
7190
|
className: [
|
|
@@ -6987,7 +7193,7 @@ var DefaultConnector = ({
|
|
|
6987
7193
|
active ? "rf-step-connector--active" : ""
|
|
6988
7194
|
].filter(Boolean).join(" ")
|
|
6989
7195
|
},
|
|
6990
|
-
/* @__PURE__ */
|
|
7196
|
+
/* @__PURE__ */ React95.createElement("span", { className: "rf-step-connector__line" })
|
|
6991
7197
|
);
|
|
6992
7198
|
var Stepper = ({
|
|
6993
7199
|
activeStep = 0,
|
|
@@ -7010,7 +7216,7 @@ var Stepper = ({
|
|
|
7010
7216
|
sxClass,
|
|
7011
7217
|
className
|
|
7012
7218
|
].filter(Boolean).join(" ");
|
|
7013
|
-
return /* @__PURE__ */
|
|
7219
|
+
return /* @__PURE__ */ React95.createElement("div", { className: classes, style }, childArray.map((child, index) => {
|
|
7014
7220
|
const isActive = index === activeStep;
|
|
7015
7221
|
const isCompleted = nonLinear ? child.props.completed ?? false : index < activeStep;
|
|
7016
7222
|
const isLast = index === totalSteps - 1;
|
|
@@ -7023,7 +7229,7 @@ var Stepper = ({
|
|
|
7023
7229
|
last: isLast
|
|
7024
7230
|
}
|
|
7025
7231
|
);
|
|
7026
|
-
const connectorEl = index > 0 ? connector ? connector : /* @__PURE__ */
|
|
7232
|
+
const connectorEl = index > 0 ? connector ? connector : /* @__PURE__ */ React95.createElement(
|
|
7027
7233
|
DefaultConnector,
|
|
7028
7234
|
{
|
|
7029
7235
|
key: `connector-${index}`,
|
|
@@ -7032,9 +7238,9 @@ var Stepper = ({
|
|
|
7032
7238
|
}
|
|
7033
7239
|
) : null;
|
|
7034
7240
|
if (orientation === "horizontal") {
|
|
7035
|
-
return /* @__PURE__ */
|
|
7241
|
+
return /* @__PURE__ */ React95.createElement(React95.Fragment, { key: index }, connectorEl, enrichedStep);
|
|
7036
7242
|
}
|
|
7037
|
-
return /* @__PURE__ */
|
|
7243
|
+
return /* @__PURE__ */ React95.createElement(React95.Fragment, { key: index }, /* @__PURE__ */ React95.createElement("div", { className: "rf-step__header" }, enrichedStep), !isLast && /* @__PURE__ */ React95.createElement(
|
|
7038
7244
|
DefaultConnector,
|
|
7039
7245
|
{
|
|
7040
7246
|
completed: index < activeStep,
|
|
@@ -7046,13 +7252,13 @@ var Stepper = ({
|
|
|
7046
7252
|
Stepper.displayName = "Stepper";
|
|
7047
7253
|
|
|
7048
7254
|
// lib/Menu/Menu.tsx
|
|
7049
|
-
import
|
|
7255
|
+
import React96, {
|
|
7050
7256
|
useEffect as useEffect13,
|
|
7051
7257
|
useRef as useRef17,
|
|
7052
7258
|
useState as useState18
|
|
7053
7259
|
} from "react";
|
|
7054
7260
|
import ReactDOM2 from "react-dom";
|
|
7055
|
-
var MenuDivider = () => /* @__PURE__ */
|
|
7261
|
+
var MenuDivider = () => /* @__PURE__ */ React96.createElement("hr", { className: "rf-menu-divider", "aria-hidden": "true" });
|
|
7056
7262
|
MenuDivider.displayName = "MenuDivider";
|
|
7057
7263
|
var MenuItem = ({
|
|
7058
7264
|
onClick,
|
|
@@ -7073,7 +7279,7 @@ var MenuItem = ({
|
|
|
7073
7279
|
divider ? "rf-menu-item--divider" : "",
|
|
7074
7280
|
sxClass
|
|
7075
7281
|
].filter(Boolean).join(" ");
|
|
7076
|
-
return /* @__PURE__ */
|
|
7282
|
+
return /* @__PURE__ */ React96.createElement(
|
|
7077
7283
|
"li",
|
|
7078
7284
|
{
|
|
7079
7285
|
className: classes,
|
|
@@ -7088,7 +7294,7 @@ var MenuItem = ({
|
|
|
7088
7294
|
}
|
|
7089
7295
|
}
|
|
7090
7296
|
},
|
|
7091
|
-
icon && /* @__PURE__ */
|
|
7297
|
+
icon && /* @__PURE__ */ React96.createElement("span", { className: "rf-menu-item__icon" }, icon),
|
|
7092
7298
|
children
|
|
7093
7299
|
);
|
|
7094
7300
|
};
|
|
@@ -7100,17 +7306,17 @@ var MenuList = ({
|
|
|
7100
7306
|
sx
|
|
7101
7307
|
}) => {
|
|
7102
7308
|
const sxClass = useSx(sx);
|
|
7103
|
-
return /* @__PURE__ */
|
|
7309
|
+
return /* @__PURE__ */ React96.createElement(
|
|
7104
7310
|
"ul",
|
|
7105
7311
|
{
|
|
7106
7312
|
className: `rf-menu-list${sxClass ? ` ${sxClass}` : ""}`,
|
|
7107
7313
|
role: "menu"
|
|
7108
7314
|
},
|
|
7109
|
-
subheader && /* @__PURE__ */
|
|
7110
|
-
|
|
7111
|
-
if (!
|
|
7315
|
+
subheader && /* @__PURE__ */ React96.createElement("li", { className: "rf-menu-list__subheader", role: "presentation" }, subheader),
|
|
7316
|
+
React96.Children.map(children, (child) => {
|
|
7317
|
+
if (!React96.isValidElement(child)) return child;
|
|
7112
7318
|
if (dense) {
|
|
7113
|
-
return
|
|
7319
|
+
return React96.cloneElement(child, {
|
|
7114
7320
|
dense: true
|
|
7115
7321
|
});
|
|
7116
7322
|
}
|
|
@@ -7187,14 +7393,14 @@ var Menu = ({
|
|
|
7187
7393
|
}, [open, onClose]);
|
|
7188
7394
|
if (!mounted) return null;
|
|
7189
7395
|
const classes = ["rf-menu-paper", sxClass, className].filter(Boolean).join(" ");
|
|
7190
|
-
const portal = /* @__PURE__ */
|
|
7396
|
+
const portal = /* @__PURE__ */ React96.createElement("div", { className: "rf-menu-portal", style: { display: open ? void 0 : "none" } }, /* @__PURE__ */ React96.createElement(
|
|
7191
7397
|
"div",
|
|
7192
7398
|
{
|
|
7193
7399
|
className: "rf-menu-backdrop",
|
|
7194
7400
|
onClick: onClose,
|
|
7195
7401
|
"aria-hidden": "true"
|
|
7196
7402
|
}
|
|
7197
|
-
), /* @__PURE__ */
|
|
7403
|
+
), /* @__PURE__ */ React96.createElement(
|
|
7198
7404
|
"div",
|
|
7199
7405
|
{
|
|
7200
7406
|
ref: paperRef,
|
|
@@ -7209,7 +7415,7 @@ var Menu = ({
|
|
|
7209
7415
|
Menu.displayName = "Menu";
|
|
7210
7416
|
|
|
7211
7417
|
// lib/Drawer/Drawer.tsx
|
|
7212
|
-
import
|
|
7418
|
+
import React97, {
|
|
7213
7419
|
useEffect as useEffect14,
|
|
7214
7420
|
useState as useState19
|
|
7215
7421
|
} from "react";
|
|
@@ -7277,7 +7483,7 @@ var Drawer = ({
|
|
|
7277
7483
|
className
|
|
7278
7484
|
].filter(Boolean).join(" ");
|
|
7279
7485
|
if (variant === "permanent") {
|
|
7280
|
-
return /* @__PURE__ */
|
|
7486
|
+
return /* @__PURE__ */ React97.createElement("div", { className: rootClasses, style }, /* @__PURE__ */ React97.createElement(
|
|
7281
7487
|
"div",
|
|
7282
7488
|
{
|
|
7283
7489
|
className: paperClasses,
|
|
@@ -7287,7 +7493,7 @@ var Drawer = ({
|
|
|
7287
7493
|
));
|
|
7288
7494
|
}
|
|
7289
7495
|
if (variant === "persistent") {
|
|
7290
|
-
return /* @__PURE__ */
|
|
7496
|
+
return /* @__PURE__ */ React97.createElement("div", { className: rootClasses, style }, /* @__PURE__ */ React97.createElement(
|
|
7291
7497
|
"div",
|
|
7292
7498
|
{
|
|
7293
7499
|
className: paperClasses,
|
|
@@ -7296,14 +7502,14 @@ var Drawer = ({
|
|
|
7296
7502
|
children
|
|
7297
7503
|
));
|
|
7298
7504
|
}
|
|
7299
|
-
const drawerContent = /* @__PURE__ */
|
|
7505
|
+
const drawerContent = /* @__PURE__ */ React97.createElement(React97.Fragment, null, /* @__PURE__ */ React97.createElement(
|
|
7300
7506
|
"div",
|
|
7301
7507
|
{
|
|
7302
7508
|
className: `rf-drawer-backdrop${!open ? " rf-drawer-backdrop--hidden" : ""}`,
|
|
7303
7509
|
onClick: onClose,
|
|
7304
7510
|
"aria-hidden": "true"
|
|
7305
7511
|
}
|
|
7306
|
-
), /* @__PURE__ */
|
|
7512
|
+
), /* @__PURE__ */ React97.createElement(
|
|
7307
7513
|
"div",
|
|
7308
7514
|
{
|
|
7309
7515
|
className: paperClasses,
|
|
@@ -7314,14 +7520,14 @@ var Drawer = ({
|
|
|
7314
7520
|
children
|
|
7315
7521
|
));
|
|
7316
7522
|
return ReactDOM3.createPortal(
|
|
7317
|
-
/* @__PURE__ */
|
|
7523
|
+
/* @__PURE__ */ React97.createElement("div", { className: rootClasses, style }, drawerContent),
|
|
7318
7524
|
document.body
|
|
7319
7525
|
);
|
|
7320
7526
|
};
|
|
7321
7527
|
Drawer.displayName = "Drawer";
|
|
7322
7528
|
|
|
7323
7529
|
// lib/Snackbar/Snackbar.tsx
|
|
7324
|
-
import
|
|
7530
|
+
import React98, {
|
|
7325
7531
|
useCallback as useCallback6,
|
|
7326
7532
|
useEffect as useEffect15,
|
|
7327
7533
|
useRef as useRef18,
|
|
@@ -7407,7 +7613,7 @@ var Snackbar = ({
|
|
|
7407
7613
|
].filter(Boolean).join(" ");
|
|
7408
7614
|
const rootClasses = ["rf-snackbar-root", anchorClass].filter(Boolean).join(" ");
|
|
7409
7615
|
const icon = severity !== "default" ? SEVERITY_ICONS[severity] : null;
|
|
7410
|
-
const snackbarEl = /* @__PURE__ */
|
|
7616
|
+
const snackbarEl = /* @__PURE__ */ React98.createElement("div", { className: rootClasses }, /* @__PURE__ */ React98.createElement(
|
|
7411
7617
|
"div",
|
|
7412
7618
|
{
|
|
7413
7619
|
className: snackbarClasses,
|
|
@@ -7418,10 +7624,10 @@ var Snackbar = ({
|
|
|
7418
7624
|
onMouseEnter: handleMouseEnter,
|
|
7419
7625
|
onMouseLeave: handleMouseLeave
|
|
7420
7626
|
},
|
|
7421
|
-
icon && severity !== "default" && /* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7423
|
-
action && /* @__PURE__ */
|
|
7424
|
-
!action && onClose && /* @__PURE__ */
|
|
7627
|
+
icon && severity !== "default" && /* @__PURE__ */ React98.createElement("span", { className: "rf-snackbar__icon", "aria-hidden": "true" }, icon),
|
|
7628
|
+
/* @__PURE__ */ React98.createElement("span", { className: "rf-snackbar__message" }, message),
|
|
7629
|
+
action && /* @__PURE__ */ React98.createElement("span", { className: "rf-snackbar__action" }, action),
|
|
7630
|
+
!action && onClose && /* @__PURE__ */ React98.createElement(
|
|
7425
7631
|
"button",
|
|
7426
7632
|
{
|
|
7427
7633
|
className: "rf-snackbar__close-btn",
|
|
@@ -7437,7 +7643,7 @@ var Snackbar = ({
|
|
|
7437
7643
|
Snackbar.displayName = "Snackbar";
|
|
7438
7644
|
|
|
7439
7645
|
// lib/Link/Link.tsx
|
|
7440
|
-
import
|
|
7646
|
+
import React99 from "react";
|
|
7441
7647
|
var KNOWN_COLORS = ["primary", "secondary", "textPrimary", "textSecondary", "inherit"];
|
|
7442
7648
|
var Link = ({
|
|
7443
7649
|
href,
|
|
@@ -7468,7 +7674,7 @@ var Link = ({
|
|
|
7468
7674
|
};
|
|
7469
7675
|
const Tag = component || "a";
|
|
7470
7676
|
const computedRel = rel ?? (target === "_blank" ? "noopener noreferrer" : void 0);
|
|
7471
|
-
return /* @__PURE__ */
|
|
7677
|
+
return /* @__PURE__ */ React99.createElement(
|
|
7472
7678
|
Tag,
|
|
7473
7679
|
{
|
|
7474
7680
|
href,
|
|
@@ -7485,7 +7691,7 @@ var Link = ({
|
|
|
7485
7691
|
Link.displayName = "Link";
|
|
7486
7692
|
|
|
7487
7693
|
// lib/Popper/Popper.tsx
|
|
7488
|
-
import
|
|
7694
|
+
import React100, {
|
|
7489
7695
|
useEffect as useEffect16,
|
|
7490
7696
|
useLayoutEffect as useLayoutEffect2,
|
|
7491
7697
|
useRef as useRef19,
|
|
@@ -7621,7 +7827,7 @@ var Popper = ({
|
|
|
7621
7827
|
const content = typeof children === "function" ? children(
|
|
7622
7828
|
{ placement, TransitionProps: transitionProps }
|
|
7623
7829
|
) : children;
|
|
7624
|
-
const popper = /* @__PURE__ */
|
|
7830
|
+
const popper = /* @__PURE__ */ React100.createElement(
|
|
7625
7831
|
"div",
|
|
7626
7832
|
{
|
|
7627
7833
|
ref: popperRef,
|
|
@@ -7632,14 +7838,14 @@ var Popper = ({
|
|
|
7632
7838
|
content
|
|
7633
7839
|
);
|
|
7634
7840
|
if (disablePortal) {
|
|
7635
|
-
return /* @__PURE__ */
|
|
7841
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, popper);
|
|
7636
7842
|
}
|
|
7637
7843
|
return ReactDOM5.createPortal(popper, document.body);
|
|
7638
7844
|
};
|
|
7639
7845
|
Popper.displayName = "Popper";
|
|
7640
7846
|
|
|
7641
7847
|
// lib/Popover/Popover.tsx
|
|
7642
|
-
import
|
|
7848
|
+
import React101, {
|
|
7643
7849
|
useEffect as useEffect17,
|
|
7644
7850
|
useLayoutEffect as useLayoutEffect3,
|
|
7645
7851
|
useRef as useRef20,
|
|
@@ -7723,14 +7929,14 @@ var Popover = ({
|
|
|
7723
7929
|
paperSxClass
|
|
7724
7930
|
].filter(Boolean).join(" ");
|
|
7725
7931
|
const rootClasses = ["rf-popover-root", sxClass, className].filter(Boolean).join(" ");
|
|
7726
|
-
const content = /* @__PURE__ */
|
|
7932
|
+
const content = /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(
|
|
7727
7933
|
"div",
|
|
7728
7934
|
{
|
|
7729
7935
|
className: "rf-popover-backdrop",
|
|
7730
7936
|
onClick: onClose,
|
|
7731
7937
|
"aria-hidden": "true"
|
|
7732
7938
|
}
|
|
7733
|
-
), /* @__PURE__ */
|
|
7939
|
+
), /* @__PURE__ */ React101.createElement(
|
|
7734
7940
|
"div",
|
|
7735
7941
|
{
|
|
7736
7942
|
ref: paperRef,
|
|
@@ -7746,17 +7952,17 @@ var Popover = ({
|
|
|
7746
7952
|
children
|
|
7747
7953
|
));
|
|
7748
7954
|
if (disablePortal) {
|
|
7749
|
-
return /* @__PURE__ */
|
|
7955
|
+
return /* @__PURE__ */ React101.createElement("div", { className: `${rootClasses} rf-popover-inline`, style }, content);
|
|
7750
7956
|
}
|
|
7751
7957
|
return ReactDOM6.createPortal(
|
|
7752
|
-
/* @__PURE__ */
|
|
7958
|
+
/* @__PURE__ */ React101.createElement("div", { className: rootClasses, style }, content),
|
|
7753
7959
|
document.body
|
|
7754
7960
|
);
|
|
7755
7961
|
};
|
|
7756
7962
|
Popover.displayName = "Popover";
|
|
7757
7963
|
|
|
7758
7964
|
// lib/Transitions/Transitions.tsx
|
|
7759
|
-
import
|
|
7965
|
+
import React102, {
|
|
7760
7966
|
cloneElement as cloneElement3,
|
|
7761
7967
|
useEffect as useEffect18,
|
|
7762
7968
|
useRef as useRef21,
|
|
@@ -7934,7 +8140,7 @@ var Collapse = ({
|
|
|
7934
8140
|
const exitMs = getTimeout(timeout, "exit");
|
|
7935
8141
|
const dur = state === "entering" || state === "entered" ? enterMs : exitMs;
|
|
7936
8142
|
const containerStyle = orientation === "vertical" ? { height: size === "auto" ? "auto" : typeof size === "number" ? `${size}px` : size } : { width: size === "auto" ? "auto" : typeof size === "number" ? `${size}px` : size };
|
|
7937
|
-
return /* @__PURE__ */
|
|
8143
|
+
return /* @__PURE__ */ React102.createElement(
|
|
7938
8144
|
"div",
|
|
7939
8145
|
{
|
|
7940
8146
|
className: [
|
|
@@ -7947,7 +8153,7 @@ var Collapse = ({
|
|
|
7947
8153
|
...containerStyle
|
|
7948
8154
|
}
|
|
7949
8155
|
},
|
|
7950
|
-
/* @__PURE__ */
|
|
8156
|
+
/* @__PURE__ */ React102.createElement(
|
|
7951
8157
|
"div",
|
|
7952
8158
|
{
|
|
7953
8159
|
ref: innerRef,
|
|
@@ -7986,6 +8192,116 @@ var Zoom = ({
|
|
|
7986
8192
|
});
|
|
7987
8193
|
};
|
|
7988
8194
|
Zoom.displayName = "Zoom";
|
|
8195
|
+
|
|
8196
|
+
// lib/ImageField/ImageField.tsx
|
|
8197
|
+
import React103, { useRef as useRef22, useState as useState24, useCallback as useCallback7 } from "react";
|
|
8198
|
+
function getSizeStyle2(size) {
|
|
8199
|
+
if (size === "small") return { className: "rf-image-field--small" };
|
|
8200
|
+
if (size === "large") return { className: "rf-image-field--large" };
|
|
8201
|
+
if (typeof size === "number") {
|
|
8202
|
+
return {
|
|
8203
|
+
className: "",
|
|
8204
|
+
style: { width: size, height: size }
|
|
8205
|
+
};
|
|
8206
|
+
}
|
|
8207
|
+
return { className: "rf-image-field--medium" };
|
|
8208
|
+
}
|
|
8209
|
+
var ImageField = React103.forwardRef(
|
|
8210
|
+
({
|
|
8211
|
+
src,
|
|
8212
|
+
alt = "",
|
|
8213
|
+
variant = "circular",
|
|
8214
|
+
size = "medium",
|
|
8215
|
+
accept = "image/*",
|
|
8216
|
+
onChange,
|
|
8217
|
+
overlayText = "Upload",
|
|
8218
|
+
disabled = false,
|
|
8219
|
+
className = "",
|
|
8220
|
+
style,
|
|
8221
|
+
sx
|
|
8222
|
+
}, ref) => {
|
|
8223
|
+
const sxClass = useSx(sx);
|
|
8224
|
+
const inputRef = useRef22(null);
|
|
8225
|
+
const [preview, setPreview] = useState24(null);
|
|
8226
|
+
const { className: sizeClass, style: sizeStyle } = getSizeStyle2(size);
|
|
8227
|
+
const displaySrc = preview || src;
|
|
8228
|
+
const handleClick = useCallback7(() => {
|
|
8229
|
+
if (!disabled) {
|
|
8230
|
+
inputRef.current?.click();
|
|
8231
|
+
}
|
|
8232
|
+
}, [disabled]);
|
|
8233
|
+
const handleKeyDown = useCallback7(
|
|
8234
|
+
(e) => {
|
|
8235
|
+
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
8236
|
+
e.preventDefault();
|
|
8237
|
+
inputRef.current?.click();
|
|
8238
|
+
}
|
|
8239
|
+
},
|
|
8240
|
+
[disabled]
|
|
8241
|
+
);
|
|
8242
|
+
const handleFileChange = useCallback7(
|
|
8243
|
+
(e) => {
|
|
8244
|
+
const file = e.target.files?.[0];
|
|
8245
|
+
if (!file) return;
|
|
8246
|
+
const objectUrl = URL.createObjectURL(file);
|
|
8247
|
+
setPreview(objectUrl);
|
|
8248
|
+
onChange?.(file);
|
|
8249
|
+
e.target.value = "";
|
|
8250
|
+
},
|
|
8251
|
+
[onChange]
|
|
8252
|
+
);
|
|
8253
|
+
const classes = [
|
|
8254
|
+
"rf-image-field",
|
|
8255
|
+
`rf-image-field--${variant}`,
|
|
8256
|
+
sizeClass,
|
|
8257
|
+
disabled ? "rf-image-field--disabled" : "",
|
|
8258
|
+
sxClass,
|
|
8259
|
+
className
|
|
8260
|
+
].filter(Boolean).join(" ");
|
|
8261
|
+
const iconSize = typeof size === "number" ? Math.max(size * 0.25, 16) : size === "small" ? 16 : size === "large" ? 28 : 22;
|
|
8262
|
+
return /* @__PURE__ */ React103.createElement(
|
|
8263
|
+
"div",
|
|
8264
|
+
{
|
|
8265
|
+
ref,
|
|
8266
|
+
className: classes,
|
|
8267
|
+
style: { ...sizeStyle, ...style },
|
|
8268
|
+
role: "button",
|
|
8269
|
+
tabIndex: disabled ? -1 : 0,
|
|
8270
|
+
"aria-label": alt || overlayText,
|
|
8271
|
+
onClick: handleClick,
|
|
8272
|
+
onKeyDown: handleKeyDown
|
|
8273
|
+
},
|
|
8274
|
+
displaySrc ? /* @__PURE__ */ React103.createElement(
|
|
8275
|
+
"img",
|
|
8276
|
+
{
|
|
8277
|
+
src: displaySrc,
|
|
8278
|
+
alt,
|
|
8279
|
+
className: "rf-image-field__img"
|
|
8280
|
+
}
|
|
8281
|
+
) : /* @__PURE__ */ React103.createElement("div", { className: "rf-image-field__placeholder" }, /* @__PURE__ */ React103.createElement(
|
|
8282
|
+
cameraIcon_default,
|
|
8283
|
+
{
|
|
8284
|
+
width: iconSize,
|
|
8285
|
+
height: iconSize,
|
|
8286
|
+
color: "var(--text-secondary)"
|
|
8287
|
+
}
|
|
8288
|
+
)),
|
|
8289
|
+
/* @__PURE__ */ React103.createElement("div", { className: "rf-image-field__overlay" }, /* @__PURE__ */ React103.createElement(cameraIcon_default, { width: iconSize, height: iconSize, color: "#ffffff" }), overlayText && /* @__PURE__ */ React103.createElement("span", { className: "rf-image-field__overlay-text" }, overlayText)),
|
|
8290
|
+
/* @__PURE__ */ React103.createElement(
|
|
8291
|
+
"input",
|
|
8292
|
+
{
|
|
8293
|
+
ref: inputRef,
|
|
8294
|
+
type: "file",
|
|
8295
|
+
accept,
|
|
8296
|
+
className: "rf-image-field__input",
|
|
8297
|
+
onChange: handleFileChange,
|
|
8298
|
+
disabled
|
|
8299
|
+
}
|
|
8300
|
+
)
|
|
8301
|
+
);
|
|
8302
|
+
}
|
|
8303
|
+
);
|
|
8304
|
+
ImageField.displayName = "ImageField";
|
|
7989
8305
|
export {
|
|
7990
8306
|
APP_THEMES,
|
|
7991
8307
|
Accordion,
|
|
@@ -8002,6 +8318,7 @@ export {
|
|
|
8002
8318
|
BaseDialog_default as BaseDialog,
|
|
8003
8319
|
Box,
|
|
8004
8320
|
Breadcrumbs,
|
|
8321
|
+
cameraIcon_default as CameraIcon,
|
|
8005
8322
|
cancelButton_default as CancelButton,
|
|
8006
8323
|
Card,
|
|
8007
8324
|
CardActions,
|
|
@@ -8036,6 +8353,7 @@ export {
|
|
|
8036
8353
|
Grow,
|
|
8037
8354
|
helpOutlinedIcon_default as HelpOutlinedIcon,
|
|
8038
8355
|
hierarchyIcon_default as HierarchyIcon,
|
|
8356
|
+
ImageField,
|
|
8039
8357
|
inactiveGroupIcon_default as InactiveGroupIcon,
|
|
8040
8358
|
industryIcon_default as IndustryIcon,
|
|
8041
8359
|
invoiceIcon_default as InvoiceIcon,
|
|
@@ -8099,6 +8417,7 @@ export {
|
|
|
8099
8417
|
suspendUserIcon_default as SuspendUserIcon,
|
|
8100
8418
|
Switch,
|
|
8101
8419
|
Tab,
|
|
8420
|
+
TabPanel,
|
|
8102
8421
|
Tabs,
|
|
8103
8422
|
technicalSkillsIcon_default as TechnicalSkillsIcon,
|
|
8104
8423
|
TextField,
|