@octoguide/mui-ui-toolkit 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +141 -18
- package/dist/index.d.ts +141 -18
- package/dist/index.js +758 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +727 -147
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
ABNInput: () => ABNInput,
|
|
33
34
|
Accordion: () => Accordion,
|
|
34
35
|
AccordionDetails: () => AccordionDetails,
|
|
35
36
|
AccordionSummary: () => AccordionSummary,
|
|
@@ -64,6 +65,8 @@ __export(index_exports, {
|
|
|
64
65
|
H4: () => H4,
|
|
65
66
|
H5: () => H5,
|
|
66
67
|
H6: () => H6,
|
|
68
|
+
InternalLinkItem: () => InternalLinkItem,
|
|
69
|
+
Link: () => Link,
|
|
67
70
|
MobileDatePicker: () => MobileDatePicker,
|
|
68
71
|
MobileDateTimePicker: () => MobileDateTimePicker,
|
|
69
72
|
MobileTimePicker: () => MobileTimePicker,
|
|
@@ -74,13 +77,24 @@ __export(index_exports, {
|
|
|
74
77
|
StaticTimePicker: () => StaticTimePicker,
|
|
75
78
|
Subtitle1: () => Subtitle1,
|
|
76
79
|
Subtitle2: () => Subtitle2,
|
|
80
|
+
Table: () => Table,
|
|
81
|
+
TableBody: () => TableBody,
|
|
82
|
+
TableCell: () => TableCell,
|
|
83
|
+
TableContainer: () => TableContainer,
|
|
84
|
+
TableHead: () => TableHead,
|
|
85
|
+
TableHeadCell: () => TableHeadCell,
|
|
86
|
+
TablePagination: () => TablePagination,
|
|
87
|
+
TableRow: () => TableRow,
|
|
88
|
+
TableSortLabel: () => TableSortLabel,
|
|
77
89
|
TextField: () => TextField,
|
|
78
90
|
TimeField: () => TimeField,
|
|
79
91
|
TimePicker: () => TimePicker,
|
|
92
|
+
Toggle: () => Toggle,
|
|
80
93
|
ToggleButton: () => ToggleButton,
|
|
81
94
|
ToggleButtonGroup: () => ToggleButtonGroup,
|
|
82
95
|
ToolkitThemeProvider: () => ToolkitThemeProvider,
|
|
83
96
|
TypographyButton: () => TypographyButton,
|
|
97
|
+
Variant: () => Variant,
|
|
84
98
|
createMuiTheme: () => createMuiTheme,
|
|
85
99
|
getThemeTokens: () => getThemeTokens,
|
|
86
100
|
resolveThemeName: () => resolveThemeName,
|
|
@@ -1190,11 +1204,125 @@ function ToolkitThemeProvider({
|
|
|
1190
1204
|
] });
|
|
1191
1205
|
}
|
|
1192
1206
|
|
|
1193
|
-
// src/components/
|
|
1207
|
+
// src/components/ABNInput/ABNInput.tsx
|
|
1208
|
+
var import_react2 = __toESM(require("react"));
|
|
1209
|
+
var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
|
|
1210
|
+
var import_InputAdornment = __toESM(require("@mui/material/InputAdornment"));
|
|
1211
|
+
|
|
1212
|
+
// src/components/TextField/TextField.tsx
|
|
1213
|
+
var import_react = __toESM(require("react"));
|
|
1194
1214
|
var import_material2 = require("@mui/material");
|
|
1195
1215
|
var import_styles2 = require("@mui/material/styles");
|
|
1196
1216
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1197
|
-
var
|
|
1217
|
+
var VisibilityIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "currentColor", d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }) });
|
|
1218
|
+
var VisibilityOffIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "currentColor", d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75C21.27 5.61 17 2.5 12 2.5c-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 5.13 11.35 5 12 5M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27M7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01" }) });
|
|
1219
|
+
var StyledTextField = (0, import_styles2.styled)(import_material2.TextField)(({ theme }) => ({
|
|
1220
|
+
// Transition on the entire field when focus changes
|
|
1221
|
+
"& .MuiOutlinedInput-root": {
|
|
1222
|
+
transition: `box-shadow ${theme.tokens.transitions.durationFast} ${theme.tokens.transitions.easingDefault}`,
|
|
1223
|
+
"&.Mui-focused": {
|
|
1224
|
+
boxShadow: theme.tokens.shadows.xs
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}));
|
|
1228
|
+
var TextField = import_react.default.forwardRef(
|
|
1229
|
+
function TextField2({ error, FormHelperTextProps, inputProps, label, showPasswordToggle, type, slotProps, ...props }, ref) {
|
|
1230
|
+
const [showPassword, setShowPassword] = (0, import_react.useState)(false);
|
|
1231
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1232
|
+
if (!label && !props["aria-label"] && !props["aria-labelledby"] && !inputProps?.["aria-label"] && !inputProps?.["aria-labelledby"]) {
|
|
1233
|
+
console.warn("[ToolkitTextField] Missing accessible label. Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
const resolvedType = showPasswordToggle && type === "password" ? showPassword ? "text" : "password" : type;
|
|
1237
|
+
const toggleAdornment = showPasswordToggle && type === "password" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1238
|
+
import_material2.IconButton,
|
|
1239
|
+
{
|
|
1240
|
+
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
1241
|
+
onClick: () => setShowPassword((prev) => !prev),
|
|
1242
|
+
edge: "end",
|
|
1243
|
+
children: showPassword ? VisibilityOffIcon : VisibilityIcon
|
|
1244
|
+
}
|
|
1245
|
+
) }) : null;
|
|
1246
|
+
const mergedSlotProps = toggleAdornment ? { ...slotProps, input: { endAdornment: toggleAdornment, ...slotProps?.input } } : slotProps;
|
|
1247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1248
|
+
StyledTextField,
|
|
1249
|
+
{
|
|
1250
|
+
fullWidth: true,
|
|
1251
|
+
variant: "outlined",
|
|
1252
|
+
label,
|
|
1253
|
+
error,
|
|
1254
|
+
type: resolvedType,
|
|
1255
|
+
inputRef: ref,
|
|
1256
|
+
inputProps,
|
|
1257
|
+
slotProps: mergedSlotProps,
|
|
1258
|
+
FormHelperTextProps: error ? { role: "alert", ...FormHelperTextProps } : FormHelperTextProps,
|
|
1259
|
+
...props
|
|
1260
|
+
}
|
|
1261
|
+
);
|
|
1262
|
+
}
|
|
1263
|
+
);
|
|
1264
|
+
TextField.displayName = "ToolkitTextField";
|
|
1265
|
+
|
|
1266
|
+
// src/utils/getCleanProps.ts
|
|
1267
|
+
function getCleanProps(props) {
|
|
1268
|
+
const { style: _style, role: _role, ...cleanProps } = props;
|
|
1269
|
+
return cleanProps;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// src/utils/formatABN.ts
|
|
1273
|
+
function formatABN(value) {
|
|
1274
|
+
const digits = value.replace(/\D/g, "").slice(0, 11);
|
|
1275
|
+
if (digits.length <= 2) return digits;
|
|
1276
|
+
if (digits.length <= 5) return `${digits.slice(0, 2)} ${digits.slice(2)}`;
|
|
1277
|
+
if (digits.length <= 8) return `${digits.slice(0, 2)} ${digits.slice(2, 5)} ${digits.slice(5)}`;
|
|
1278
|
+
return `${digits.slice(0, 2)} ${digits.slice(2, 5)} ${digits.slice(5, 8)} ${digits.slice(8)}`;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
// src/components/ABNInput/ABNInput.tsx
|
|
1282
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1283
|
+
var ABNInput = import_react2.default.forwardRef(
|
|
1284
|
+
function ABNInput2({ value = "", onChange, isInvalid, readOnly, isLoading, slotProps, error, ...restProps }, ref) {
|
|
1285
|
+
const formatted = formatABN(String(value));
|
|
1286
|
+
const handleChange = (event) => {
|
|
1287
|
+
const newFormatted = formatABN(event.target.value);
|
|
1288
|
+
onChange?.(event, {
|
|
1289
|
+
value: newFormatted,
|
|
1290
|
+
unformattedValue: newFormatted.replace(/\s/g, "")
|
|
1291
|
+
});
|
|
1292
|
+
};
|
|
1293
|
+
const endAdornment = isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_InputAdornment.default, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_CircularProgress.default, { size: 20 }) }) : void 0;
|
|
1294
|
+
const mergedSlotProps = {
|
|
1295
|
+
...slotProps,
|
|
1296
|
+
htmlInput: {
|
|
1297
|
+
maxLength: 14,
|
|
1298
|
+
inputMode: "numeric",
|
|
1299
|
+
readOnly,
|
|
1300
|
+
...slotProps?.htmlInput
|
|
1301
|
+
},
|
|
1302
|
+
...endAdornment && {
|
|
1303
|
+
input: { endAdornment, ...slotProps?.input }
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1307
|
+
TextField,
|
|
1308
|
+
{
|
|
1309
|
+
...getCleanProps(restProps),
|
|
1310
|
+
ref,
|
|
1311
|
+
value: formatted,
|
|
1312
|
+
onChange: handleChange,
|
|
1313
|
+
error: isInvalid || !!error,
|
|
1314
|
+
slotProps: mergedSlotProps
|
|
1315
|
+
}
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
);
|
|
1319
|
+
ABNInput.displayName = "ToolkitABNInput";
|
|
1320
|
+
|
|
1321
|
+
// src/components/Button/Button.tsx
|
|
1322
|
+
var import_material3 = require("@mui/material");
|
|
1323
|
+
var import_styles3 = require("@mui/material/styles");
|
|
1324
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1325
|
+
var StyledButton = (0, import_styles3.styled)(import_material3.Button)(({ theme }) => ({
|
|
1198
1326
|
// Gap between icon and label — not surfaced by MUI's styleOverrides
|
|
1199
1327
|
"& .MuiButton-startIcon": {
|
|
1200
1328
|
marginRight: theme.tokens.components.button.iconGap
|
|
@@ -1206,14 +1334,14 @@ var StyledButton = (0, import_styles2.styled)(import_material2.Button)(({ theme
|
|
|
1206
1334
|
function Button({ loading, disabled, children, ...props }) {
|
|
1207
1335
|
const baseLabel = props["aria-label"] ?? (typeof children === "string" ? children : void 0);
|
|
1208
1336
|
const ariaLabel = loading && baseLabel ? `${baseLabel}, loading` : props["aria-label"];
|
|
1209
|
-
return /* @__PURE__ */ (0,
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1210
1338
|
StyledButton,
|
|
1211
1339
|
{
|
|
1212
1340
|
...props,
|
|
1213
1341
|
disabled: disabled || loading,
|
|
1214
1342
|
"aria-busy": loading || void 0,
|
|
1215
1343
|
"aria-label": ariaLabel,
|
|
1216
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
1344
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material3.CircularProgress, { size: 16, color: "inherit" }) : props.startIcon,
|
|
1217
1345
|
children
|
|
1218
1346
|
}
|
|
1219
1347
|
);
|
|
@@ -1221,10 +1349,10 @@ function Button({ loading, disabled, children, ...props }) {
|
|
|
1221
1349
|
Button.displayName = "ToolkitButton";
|
|
1222
1350
|
|
|
1223
1351
|
// src/components/Chip/Chip.tsx
|
|
1224
|
-
var
|
|
1225
|
-
var
|
|
1352
|
+
var import_material4 = require("@mui/material");
|
|
1353
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1226
1354
|
function CircleXIcon(props) {
|
|
1227
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.SvgIcon, { ...props, viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1228
1356
|
"path",
|
|
1229
1357
|
{
|
|
1230
1358
|
fill: "currentColor",
|
|
@@ -1235,22 +1363,22 @@ function CircleXIcon(props) {
|
|
|
1235
1363
|
) });
|
|
1236
1364
|
}
|
|
1237
1365
|
function Chip({ deleteIcon, onDelete, ...props }) {
|
|
1238
|
-
return /* @__PURE__ */ (0,
|
|
1239
|
-
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1367
|
+
import_material4.Chip,
|
|
1240
1368
|
{
|
|
1241
1369
|
...props,
|
|
1242
1370
|
onDelete,
|
|
1243
|
-
deleteIcon: onDelete ? deleteIcon ?? /* @__PURE__ */ (0,
|
|
1371
|
+
deleteIcon: onDelete ? deleteIcon ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CircleXIcon, {}) : void 0
|
|
1244
1372
|
}
|
|
1245
1373
|
);
|
|
1246
1374
|
}
|
|
1247
1375
|
Chip.displayName = "ToolkitChip";
|
|
1248
1376
|
|
|
1249
1377
|
// src/components/Card/Card.tsx
|
|
1250
|
-
var
|
|
1251
|
-
var
|
|
1252
|
-
var
|
|
1253
|
-
var StyledCard = (0,
|
|
1378
|
+
var import_material5 = require("@mui/material");
|
|
1379
|
+
var import_styles4 = require("@mui/material/styles");
|
|
1380
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1381
|
+
var StyledCard = (0, import_styles4.styled)(import_material5.Card, {
|
|
1254
1382
|
shouldForwardProp: (prop) => prop !== "compact"
|
|
1255
1383
|
})(({ theme, compact }) => ({
|
|
1256
1384
|
padding: compact ? theme.tokens.components.card.paddingCompact : theme.tokens.components.card.padding,
|
|
@@ -1265,74 +1393,20 @@ var StyledCard = (0, import_styles3.styled)(import_material4.Card, {
|
|
|
1265
1393
|
}
|
|
1266
1394
|
}));
|
|
1267
1395
|
function Card({ compact, children, ...props }) {
|
|
1268
|
-
return /* @__PURE__ */ (0,
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledCard, { compact, ...props, children });
|
|
1269
1397
|
}
|
|
1270
|
-
var CardContent =
|
|
1271
|
-
var CardHeader =
|
|
1272
|
-
var CardActions =
|
|
1398
|
+
var CardContent = import_material5.CardContent;
|
|
1399
|
+
var CardHeader = import_material5.CardHeader;
|
|
1400
|
+
var CardActions = import_material5.CardActions;
|
|
1273
1401
|
Card.displayName = "ToolkitCard";
|
|
1274
1402
|
|
|
1275
|
-
// src/components/TextField/TextField.tsx
|
|
1276
|
-
var import_react = __toESM(require("react"));
|
|
1277
|
-
var import_material5 = require("@mui/material");
|
|
1278
|
-
var import_styles4 = require("@mui/material/styles");
|
|
1279
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1280
|
-
var VisibilityIcon = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { fill: "currentColor", d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }) });
|
|
1281
|
-
var VisibilityOffIcon = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { fill: "currentColor", d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75C21.27 5.61 17 2.5 12 2.5c-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 5.13 11.35 5 12 5M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27M7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01" }) });
|
|
1282
|
-
var StyledTextField = (0, import_styles4.styled)(import_material5.TextField)(({ theme }) => ({
|
|
1283
|
-
// Transition on the entire field when focus changes
|
|
1284
|
-
"& .MuiOutlinedInput-root": {
|
|
1285
|
-
transition: `box-shadow ${theme.tokens.transitions.durationFast} ${theme.tokens.transitions.easingDefault}`,
|
|
1286
|
-
"&.Mui-focused": {
|
|
1287
|
-
boxShadow: theme.tokens.shadows.xs
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
}));
|
|
1291
|
-
var TextField = import_react.default.forwardRef(
|
|
1292
|
-
function TextField2({ error, FormHelperTextProps, inputProps, label, showPasswordToggle, type, slotProps, ...props }, ref) {
|
|
1293
|
-
const [showPassword, setShowPassword] = (0, import_react.useState)(false);
|
|
1294
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1295
|
-
if (!label && !props["aria-label"] && !props["aria-labelledby"] && !inputProps?.["aria-label"] && !inputProps?.["aria-labelledby"]) {
|
|
1296
|
-
console.warn("[ToolkitTextField] Missing accessible label. Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
const resolvedType = showPasswordToggle && type === "password" ? showPassword ? "text" : "password" : type;
|
|
1300
|
-
const toggleAdornment = showPasswordToggle && type === "password" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1301
|
-
import_material5.IconButton,
|
|
1302
|
-
{
|
|
1303
|
-
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
1304
|
-
onClick: () => setShowPassword((prev) => !prev),
|
|
1305
|
-
edge: "end",
|
|
1306
|
-
children: showPassword ? VisibilityOffIcon : VisibilityIcon
|
|
1307
|
-
}
|
|
1308
|
-
) }) : null;
|
|
1309
|
-
const mergedSlotProps = toggleAdornment ? { ...slotProps, input: { endAdornment: toggleAdornment, ...slotProps?.input } } : slotProps;
|
|
1310
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1311
|
-
StyledTextField,
|
|
1312
|
-
{
|
|
1313
|
-
fullWidth: true,
|
|
1314
|
-
variant: "outlined",
|
|
1315
|
-
label,
|
|
1316
|
-
error,
|
|
1317
|
-
type: resolvedType,
|
|
1318
|
-
inputRef: ref,
|
|
1319
|
-
inputProps,
|
|
1320
|
-
slotProps: mergedSlotProps,
|
|
1321
|
-
FormHelperTextProps: error ? { role: "alert", ...FormHelperTextProps } : FormHelperTextProps,
|
|
1322
|
-
...props
|
|
1323
|
-
}
|
|
1324
|
-
);
|
|
1325
|
-
}
|
|
1326
|
-
);
|
|
1327
|
-
TextField.displayName = "ToolkitTextField";
|
|
1328
|
-
|
|
1329
1403
|
// src/components/Alert/Alert.tsx
|
|
1330
1404
|
var import_material6 = require("@mui/material");
|
|
1331
|
-
var
|
|
1332
|
-
var InfoIcon = /* @__PURE__ */ (0,
|
|
1333
|
-
var SuccessIcon = /* @__PURE__ */ (0,
|
|
1334
|
-
var WarningIcon = /* @__PURE__ */ (0,
|
|
1335
|
-
var ErrorIcon = /* @__PURE__ */ (0,
|
|
1405
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1406
|
+
var InfoIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-10 5.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2", clipRule: "evenodd" }) });
|
|
1407
|
+
var SuccessIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2s10 4.477 10 10m-5.97-3.03a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l1.47 1.47l2.235-2.235L14.97 8.97a.75.75 0 0 1 1.06 0", clipRule: "evenodd" }) });
|
|
1408
|
+
var WarningIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M5.312 10.762C8.23 5.587 9.689 3 12 3c2.31 0 3.77 2.587 6.688 7.762l.364.644c2.425 4.3 3.638 6.45 2.542 8.022S17.786 21 12.364 21h-.728c-5.422 0-8.134 0-9.23-1.572s.117-3.722 2.542-8.022zM12 7.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V8a.75.75 0 0 1 .75-.75M12 17a1 1 0 1 0 0-2a1 1 0 0 0 0 2", clipRule: "evenodd" }) });
|
|
1409
|
+
var ErrorIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.SvgIcon, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.843 3.802C9.872 2.601 10.886 2 12 2c1.114 0 2.128.6 4.157 1.802l.686.406c2.029 1.202 3.043 1.803 3.6 2.792c.557.99.557 2.19.557 4.594v.812c0 2.403 0 3.605-.557 4.594c-.557.99-1.571 1.59-3.6 2.791l-.686.407C14.128 21.399 13.114 22 12 22c-1.114 0-2.128-.6-4.157-1.802l-.686-.407c-2.029-1.2-3.043-1.802-3.6-2.791C3 16.01 3 14.81 3 12.406v-.812C3 9.19 3 7.989 3.557 7c.557-.99 1.571-1.59 3.6-2.792zM13 16a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-1-9.75a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0V7a.75.75 0 0 1 .75-.75", clipRule: "evenodd" }) });
|
|
1336
1410
|
var defaultIconMapping = {
|
|
1337
1411
|
info: InfoIcon,
|
|
1338
1412
|
success: SuccessIcon,
|
|
@@ -1340,10 +1414,10 @@ var defaultIconMapping = {
|
|
|
1340
1414
|
error: ErrorIcon
|
|
1341
1415
|
};
|
|
1342
1416
|
function Alert({ iconMapping, ...props }) {
|
|
1343
|
-
return /* @__PURE__ */ (0,
|
|
1417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Alert, { iconMapping: { ...defaultIconMapping, ...iconMapping }, ...props });
|
|
1344
1418
|
}
|
|
1345
1419
|
function AlertTitle(props) {
|
|
1346
|
-
return /* @__PURE__ */ (0,
|
|
1420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.AlertTitle, { ...props });
|
|
1347
1421
|
}
|
|
1348
1422
|
Alert.displayName = "ToolkitAlert";
|
|
1349
1423
|
AlertTitle.displayName = "ToolkitAlertTitle";
|
|
@@ -1352,7 +1426,7 @@ AlertTitle.displayName = "ToolkitAlertTitle";
|
|
|
1352
1426
|
var import_material7 = require("@mui/material");
|
|
1353
1427
|
var import_styles5 = require("@mui/material/styles");
|
|
1354
1428
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
1355
|
-
var
|
|
1429
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1356
1430
|
var StandaloneAccordion = (0, import_styles5.styled)(import_material7.Accordion)(({ theme }) => ({
|
|
1357
1431
|
borderRadius: `${theme.tokens.components.accordion.standaloneRadius} !important`,
|
|
1358
1432
|
backgroundColor: theme.tokens.components.accordion.standaloneBackground,
|
|
@@ -1370,13 +1444,13 @@ var StandaloneAccordion = (0, import_styles5.styled)(import_material7.Accordion)
|
|
|
1370
1444
|
}
|
|
1371
1445
|
}));
|
|
1372
1446
|
function Accordion(props) {
|
|
1373
|
-
return /* @__PURE__ */ (0,
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Accordion, { ...props });
|
|
1374
1448
|
}
|
|
1375
1449
|
function AccordionSummary({ expandIcon, ...props }) {
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.AccordionSummary, { expandIcon: expandIcon ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ExpandMore.default, {}), ...props });
|
|
1377
1451
|
}
|
|
1378
1452
|
function AccordionDetails(props) {
|
|
1379
|
-
return /* @__PURE__ */ (0,
|
|
1453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.AccordionDetails, { ...props });
|
|
1380
1454
|
}
|
|
1381
1455
|
Accordion.displayName = "ToolkitAccordion";
|
|
1382
1456
|
AccordionSummary.displayName = "ToolkitAccordionSummary";
|
|
@@ -1387,7 +1461,7 @@ StandaloneAccordion.displayName = "ToolkitStandaloneAccordion";
|
|
|
1387
1461
|
var import_Avatar = __toESM(require("@mui/material/Avatar"));
|
|
1388
1462
|
var import_styles6 = require("@mui/material/styles");
|
|
1389
1463
|
var import_AvatarGroup = __toESM(require("@mui/material/AvatarGroup"));
|
|
1390
|
-
var
|
|
1464
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1391
1465
|
function getDimension(avatar, size) {
|
|
1392
1466
|
const map = {
|
|
1393
1467
|
xs: avatar.sizeXs,
|
|
@@ -1409,23 +1483,23 @@ var StyledAvatar = (0, import_styles6.styled)(import_Avatar.default, {
|
|
|
1409
1483
|
};
|
|
1410
1484
|
});
|
|
1411
1485
|
function Avatar({ size = "md", ...props }) {
|
|
1412
|
-
return /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StyledAvatar, { size, ...props });
|
|
1413
1487
|
}
|
|
1414
1488
|
|
|
1415
1489
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
1416
1490
|
var import_material8 = require("@mui/material");
|
|
1417
|
-
var
|
|
1491
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1418
1492
|
function ToggleButton(props) {
|
|
1419
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material8.ToggleButton, { ...props });
|
|
1420
1494
|
}
|
|
1421
1495
|
ToggleButton.displayName = "ToolkitToggleButton";
|
|
1422
1496
|
function ToggleButtonGroup(props) {
|
|
1423
|
-
return /* @__PURE__ */ (0,
|
|
1497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material8.ToggleButtonGroup, { ...props });
|
|
1424
1498
|
}
|
|
1425
1499
|
ToggleButtonGroup.displayName = "ToolkitToggleButtonGroup";
|
|
1426
1500
|
|
|
1427
1501
|
// src/components/DatePicker/DatePicker.tsx
|
|
1428
|
-
var
|
|
1502
|
+
var import_react3 = require("react");
|
|
1429
1503
|
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
1430
1504
|
var import_LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
1431
1505
|
var import_DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
@@ -1449,75 +1523,75 @@ var import_DialogContent = __toESM(require("@mui/material/DialogContent"));
|
|
|
1449
1523
|
var import_DialogActions = __toESM(require("@mui/material/DialogActions"));
|
|
1450
1524
|
var import_Button2 = __toESM(require("@mui/material/Button"));
|
|
1451
1525
|
var import_Box = __toESM(require("@mui/material/Box"));
|
|
1452
|
-
var
|
|
1526
|
+
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
1453
1527
|
var import_styles7 = require("@mui/material/styles");
|
|
1454
|
-
var
|
|
1528
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1455
1529
|
function DateLocalizationProvider({ children }) {
|
|
1456
|
-
return /* @__PURE__ */ (0,
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_LocalizationProvider.LocalizationProvider, { dateAdapter: import_AdapterDayjs.AdapterDayjs, children });
|
|
1457
1531
|
}
|
|
1458
1532
|
DateLocalizationProvider.displayName = "ToolkitDateLocalizationProvider";
|
|
1459
1533
|
function DatePicker(props) {
|
|
1460
|
-
return /* @__PURE__ */ (0,
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DatePicker.DatePicker, { ...props });
|
|
1461
1535
|
}
|
|
1462
1536
|
DatePicker.displayName = "ToolkitDatePicker";
|
|
1463
1537
|
function DesktopDatePicker(props) {
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopDatePicker.DesktopDatePicker, { ...props });
|
|
1465
1539
|
}
|
|
1466
1540
|
DesktopDatePicker.displayName = "ToolkitDesktopDatePicker";
|
|
1467
1541
|
function MobileDatePicker(props) {
|
|
1468
|
-
return /* @__PURE__ */ (0,
|
|
1542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileDatePicker.MobileDatePicker, { ...props });
|
|
1469
1543
|
}
|
|
1470
1544
|
MobileDatePicker.displayName = "ToolkitMobileDatePicker";
|
|
1471
1545
|
function DateField(props) {
|
|
1472
|
-
return /* @__PURE__ */ (0,
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateField.DateField, { ...props });
|
|
1473
1547
|
}
|
|
1474
1548
|
DateField.displayName = "ToolkitDateField";
|
|
1475
1549
|
function StaticDatePicker(props) {
|
|
1476
|
-
return /* @__PURE__ */ (0,
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticDatePicker.StaticDatePicker, { ...props });
|
|
1477
1551
|
}
|
|
1478
1552
|
StaticDatePicker.displayName = "ToolkitStaticDatePicker";
|
|
1479
1553
|
function TimePicker(props) {
|
|
1480
|
-
return /* @__PURE__ */ (0,
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_TimePicker.TimePicker, { ...props });
|
|
1481
1555
|
}
|
|
1482
1556
|
TimePicker.displayName = "ToolkitTimePicker";
|
|
1483
1557
|
function DesktopTimePicker(props) {
|
|
1484
|
-
return /* @__PURE__ */ (0,
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopTimePicker.DesktopTimePicker, { ...props });
|
|
1485
1559
|
}
|
|
1486
1560
|
DesktopTimePicker.displayName = "ToolkitDesktopTimePicker";
|
|
1487
1561
|
function MobileTimePicker(props) {
|
|
1488
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileTimePicker.MobileTimePicker, { ...props });
|
|
1489
1563
|
}
|
|
1490
1564
|
MobileTimePicker.displayName = "ToolkitMobileTimePicker";
|
|
1491
1565
|
function TimeField(props) {
|
|
1492
|
-
return /* @__PURE__ */ (0,
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_TimeField.TimeField, { ...props });
|
|
1493
1567
|
}
|
|
1494
1568
|
TimeField.displayName = "ToolkitTimeField";
|
|
1495
1569
|
function StaticTimePicker(props) {
|
|
1496
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticTimePicker.StaticTimePicker, { ...props });
|
|
1497
1571
|
}
|
|
1498
1572
|
StaticTimePicker.displayName = "ToolkitStaticTimePicker";
|
|
1499
1573
|
function DateTimePicker(props) {
|
|
1500
|
-
return /* @__PURE__ */ (0,
|
|
1574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateTimePicker.DateTimePicker, { ...props });
|
|
1501
1575
|
}
|
|
1502
1576
|
DateTimePicker.displayName = "ToolkitDateTimePicker";
|
|
1503
1577
|
function DesktopDateTimePicker(props) {
|
|
1504
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopDateTimePicker.DesktopDateTimePicker, { ...props });
|
|
1505
1579
|
}
|
|
1506
1580
|
DesktopDateTimePicker.displayName = "ToolkitDesktopDateTimePicker";
|
|
1507
1581
|
function MobileDateTimePicker(props) {
|
|
1508
|
-
return /* @__PURE__ */ (0,
|
|
1582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileDateTimePicker.MobileDateTimePicker, { ...props });
|
|
1509
1583
|
}
|
|
1510
1584
|
MobileDateTimePicker.displayName = "ToolkitMobileDateTimePicker";
|
|
1511
1585
|
function DateTimeField(props) {
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateTimeField.DateTimeField, { ...props });
|
|
1513
1587
|
}
|
|
1514
1588
|
DateTimeField.displayName = "ToolkitDateTimeField";
|
|
1515
1589
|
function StaticDateTimePicker(props) {
|
|
1516
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticDateTimePicker.StaticDateTimePicker, { ...props });
|
|
1517
1591
|
}
|
|
1518
1592
|
StaticDateTimePicker.displayName = "ToolkitStaticDateTimePicker";
|
|
1519
1593
|
function DateCalendar(props) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateCalendar.DateCalendar, { ...props });
|
|
1521
1595
|
}
|
|
1522
1596
|
DateCalendar.displayName = "ToolkitDateCalendar";
|
|
1523
1597
|
var RangeRow = (0, import_styles7.styled)(import_Box.default)(({ theme }) => ({
|
|
@@ -1532,8 +1606,8 @@ function DateRangePickerInput({
|
|
|
1532
1606
|
endLabel = "End date",
|
|
1533
1607
|
buttonLabel = "Click me!"
|
|
1534
1608
|
}) {
|
|
1535
|
-
const [open, setOpen] = (0,
|
|
1536
|
-
const [draft, setDraft] = (0,
|
|
1609
|
+
const [open, setOpen] = (0, import_react3.useState)(false);
|
|
1610
|
+
const [draft, setDraft] = (0, import_react3.useState)(value);
|
|
1537
1611
|
const handleOpen = () => {
|
|
1538
1612
|
setDraft(value);
|
|
1539
1613
|
setOpen(true);
|
|
@@ -1543,11 +1617,11 @@ function DateRangePickerInput({
|
|
|
1543
1617
|
onChange(draft);
|
|
1544
1618
|
setOpen(false);
|
|
1545
1619
|
};
|
|
1546
|
-
return /* @__PURE__ */ (0,
|
|
1547
|
-
/* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { variant: "contained", color: "inherit", disableElevation: true, onClick: handleOpen, children: buttonLabel }),
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_Dialog.default, { open, onClose: handleCancel, maxWidth: "sm", fullWidth: true, children: [
|
|
1623
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DialogContent.default, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(RangeRow, { children: [
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1551
1625
|
import_DatePicker.DatePicker,
|
|
1552
1626
|
{
|
|
1553
1627
|
label: startLabel,
|
|
@@ -1556,7 +1630,7 @@ function DateRangePickerInput({
|
|
|
1556
1630
|
slotProps: { textField: { fullWidth: true } }
|
|
1557
1631
|
}
|
|
1558
1632
|
),
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1560
1634
|
import_DatePicker.DatePicker,
|
|
1561
1635
|
{
|
|
1562
1636
|
label: endLabel,
|
|
@@ -1566,9 +1640,9 @@ function DateRangePickerInput({
|
|
|
1566
1640
|
}
|
|
1567
1641
|
)
|
|
1568
1642
|
] }) }),
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
1570
|
-
/* @__PURE__ */ (0,
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_DialogActions.default, { children: [
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { onClick: handleCancel, color: "inherit", children: "Cancel" }),
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { onClick: handleOk, color: "inherit", children: "OK" })
|
|
1572
1646
|
] })
|
|
1573
1647
|
] })
|
|
1574
1648
|
] });
|
|
@@ -1579,9 +1653,9 @@ function DateRangePickerCalendar({
|
|
|
1579
1653
|
onChange,
|
|
1580
1654
|
buttonLabel = "Click me!"
|
|
1581
1655
|
}) {
|
|
1582
|
-
const [open, setOpen] = (0,
|
|
1583
|
-
const [draft, setDraft] = (0,
|
|
1584
|
-
const [selecting, setSelecting] = (0,
|
|
1656
|
+
const [open, setOpen] = (0, import_react3.useState)(false);
|
|
1657
|
+
const [draft, setDraft] = (0, import_react3.useState)(value);
|
|
1658
|
+
const [selecting, setSelecting] = (0, import_react3.useState)("start");
|
|
1585
1659
|
const handleOpen = () => {
|
|
1586
1660
|
setDraft(value);
|
|
1587
1661
|
setSelecting("start");
|
|
@@ -1600,12 +1674,12 @@ function DateRangePickerCalendar({
|
|
|
1600
1674
|
setDraft((prev) => ({ ...prev, end: date }));
|
|
1601
1675
|
}
|
|
1602
1676
|
};
|
|
1603
|
-
return /* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1605
|
-
/* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1607
|
-
/* @__PURE__ */ (0,
|
|
1608
|
-
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1678
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { variant: "contained", color: "inherit", disableElevation: true, onClick: handleOpen, children: buttonLabel }),
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_Dialog.default, { open, onClose: handleCancel, children: [
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_DialogContent.default, { sx: { p: 1 }, children: [
|
|
1681
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Box.default, { sx: { mb: 1, px: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1682
|
+
import_TextField3.default,
|
|
1609
1683
|
{
|
|
1610
1684
|
size: "small",
|
|
1611
1685
|
label: "Selecting",
|
|
@@ -1614,7 +1688,7 @@ function DateRangePickerCalendar({
|
|
|
1614
1688
|
fullWidth: true
|
|
1615
1689
|
}
|
|
1616
1690
|
) }),
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1618
1692
|
import_DateCalendar.DateCalendar,
|
|
1619
1693
|
{
|
|
1620
1694
|
value: selecting === "start" ? draft.start : draft.end,
|
|
@@ -1622,9 +1696,9 @@ function DateRangePickerCalendar({
|
|
|
1622
1696
|
}
|
|
1623
1697
|
)
|
|
1624
1698
|
] }),
|
|
1625
|
-
/* @__PURE__ */ (0,
|
|
1626
|
-
/* @__PURE__ */ (0,
|
|
1627
|
-
/* @__PURE__ */ (0,
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_DialogActions.default, { children: [
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { onClick: handleCancel, color: "inherit", children: "Cancel" }),
|
|
1701
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Button2.default, { onClick: handleOk, color: "inherit", children: "OK" })
|
|
1628
1702
|
] })
|
|
1629
1703
|
] })
|
|
1630
1704
|
] });
|
|
@@ -1633,9 +1707,9 @@ DateRangePickerCalendar.displayName = "ToolkitDateRangePickerCalendar";
|
|
|
1633
1707
|
|
|
1634
1708
|
// src/foundation/Grid/Grid.tsx
|
|
1635
1709
|
var import_material9 = require("@mui/material");
|
|
1636
|
-
var
|
|
1710
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1637
1711
|
function Grid({ container, spacing, ...props }) {
|
|
1638
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1639
1713
|
import_material9.Grid2,
|
|
1640
1714
|
{
|
|
1641
1715
|
container,
|
|
@@ -1646,111 +1720,609 @@ function Grid({ container, spacing, ...props }) {
|
|
|
1646
1720
|
}
|
|
1647
1721
|
Grid.displayName = "ToolkitGrid";
|
|
1648
1722
|
|
|
1649
|
-
// src/
|
|
1723
|
+
// src/components/InternalLinkItem/InternalLinkItem.tsx
|
|
1724
|
+
var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"));
|
|
1725
|
+
|
|
1726
|
+
// src/components/InternalLinkItem/InternalLinkItem.styles.tsx
|
|
1727
|
+
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
1728
|
+
var import_styles8 = require("@mui/material/styles");
|
|
1729
|
+
var StyledWrapper = (0, import_styles8.styled)("div")(({ theme }) => ({
|
|
1730
|
+
"& > a, & > div": {
|
|
1731
|
+
textDecoration: "none",
|
|
1732
|
+
color: theme.tokens.colors.textPrimary,
|
|
1733
|
+
"&:hover": {
|
|
1734
|
+
color: theme.tokens.colors.textPrimary
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}));
|
|
1738
|
+
var StyledListItemContainer = (0, import_styles8.styled)(import_Box2.default)(({ theme }) => ({
|
|
1739
|
+
width: "100%",
|
|
1740
|
+
minHeight: "66px",
|
|
1741
|
+
borderTop: `1px solid ${theme.tokens.colors.divider}`,
|
|
1742
|
+
borderBottom: `1px solid ${theme.tokens.colors.divider}`,
|
|
1743
|
+
display: "flex",
|
|
1744
|
+
alignItems: "center",
|
|
1745
|
+
textDecoration: "none",
|
|
1746
|
+
color: "inherit",
|
|
1747
|
+
transition: [
|
|
1748
|
+
`border-color ${theme.tokens.transitions.durationBase} ease-in`,
|
|
1749
|
+
`box-shadow ${theme.tokens.transitions.durationBase} ease-in`,
|
|
1750
|
+
`background-color ${theme.tokens.transitions.durationBase} ease-in`,
|
|
1751
|
+
`color ${theme.tokens.transitions.durationBase} ease-in`,
|
|
1752
|
+
`fill ${theme.tokens.transitions.durationBase} ease-in`
|
|
1753
|
+
].join(", "),
|
|
1754
|
+
"& .iconColor svg": {
|
|
1755
|
+
color: theme.tokens.colors.primary,
|
|
1756
|
+
fill: theme.tokens.colors.primary,
|
|
1757
|
+
transition: `all ${theme.tokens.transitions.durationBase} ease`
|
|
1758
|
+
},
|
|
1759
|
+
"&:hover": {
|
|
1760
|
+
backgroundColor: theme.tokens.colors.backgroundSubtle,
|
|
1761
|
+
borderTop: `1px solid ${theme.tokens.colors.textPrimary}`,
|
|
1762
|
+
borderBottom: `1px solid ${theme.tokens.colors.textPrimary}`,
|
|
1763
|
+
cursor: "pointer",
|
|
1764
|
+
"& .itemLabel": {
|
|
1765
|
+
textDecoration: "underline"
|
|
1766
|
+
},
|
|
1767
|
+
"& .iconColor svg": {
|
|
1768
|
+
color: theme.tokens.colors.textPrimary,
|
|
1769
|
+
fill: theme.tokens.colors.textPrimary,
|
|
1770
|
+
transform: "translateX(4px)"
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
"&:focus, &:active": {
|
|
1774
|
+
boxShadow: `inset 0 0 0 3px ${theme.tokens.colors.border}`,
|
|
1775
|
+
borderTop: "1px solid transparent",
|
|
1776
|
+
borderBottom: "1px solid transparent",
|
|
1777
|
+
outlineColor: "transparent",
|
|
1778
|
+
outlineStyle: "solid"
|
|
1779
|
+
}
|
|
1780
|
+
}));
|
|
1781
|
+
var StyledLeftIconWrapper = (0, import_styles8.styled)("span")({
|
|
1782
|
+
display: "flex",
|
|
1783
|
+
paddingLeft: "4px"
|
|
1784
|
+
});
|
|
1785
|
+
var StyledRightIconWrapper = (0, import_styles8.styled)("span")({
|
|
1786
|
+
display: "flex",
|
|
1787
|
+
paddingRight: "4px"
|
|
1788
|
+
});
|
|
1789
|
+
var StyledLabelContainer = (0, import_styles8.styled)("div")({
|
|
1790
|
+
flex: 1,
|
|
1791
|
+
padding: "12px 8px"
|
|
1792
|
+
});
|
|
1793
|
+
var StyledLabel = (0, import_styles8.styled)("p")(({ theme }) => ({
|
|
1794
|
+
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1795
|
+
fontSize: theme.tokens.typography.fontSizeLg,
|
|
1796
|
+
lineHeight: "20px",
|
|
1797
|
+
fontWeight: theme.tokens.typography.fontWeightSemiBold,
|
|
1798
|
+
margin: 0,
|
|
1799
|
+
textDecoration: "none"
|
|
1800
|
+
}));
|
|
1801
|
+
var StyledCaption = (0, import_styles8.styled)("p")(({ theme }) => ({
|
|
1802
|
+
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1803
|
+
color: theme.tokens.colors.textSecondary,
|
|
1804
|
+
fontSize: theme.tokens.typography.fontSizeLg,
|
|
1805
|
+
lineHeight: "20px",
|
|
1806
|
+
fontWeight: theme.tokens.typography.fontWeightRegular,
|
|
1807
|
+
margin: 0,
|
|
1808
|
+
textDecoration: "none"
|
|
1809
|
+
}));
|
|
1810
|
+
|
|
1811
|
+
// src/components/InternalLinkItem/InternalLinkItem.tsx
|
|
1812
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1813
|
+
function InternalLinkItem({
|
|
1814
|
+
link,
|
|
1815
|
+
icon,
|
|
1816
|
+
label,
|
|
1817
|
+
caption,
|
|
1818
|
+
component,
|
|
1819
|
+
...restProps
|
|
1820
|
+
}) {
|
|
1821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledWrapper, { "data-component-id": "internalLinkItem", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1822
|
+
StyledListItemContainer,
|
|
1823
|
+
{
|
|
1824
|
+
component: component ?? "a",
|
|
1825
|
+
href: link,
|
|
1826
|
+
...getCleanProps(restProps),
|
|
1827
|
+
children: [
|
|
1828
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledLeftIconWrapper, { "data-testid": "icon_container", children: icon }),
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(StyledLabelContainer, { children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledLabel, { className: "itemLabel", children: label }),
|
|
1831
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledCaption, { children: caption })
|
|
1832
|
+
] }),
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledRightIconWrapper, { className: "iconColor", "data-testid": "icon_action_container", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ChevronRight.default, { fontSize: "small" }) })
|
|
1834
|
+
]
|
|
1835
|
+
}
|
|
1836
|
+
) });
|
|
1837
|
+
}
|
|
1838
|
+
InternalLinkItem.displayName = "ToolkitInternalLinkItem";
|
|
1839
|
+
|
|
1840
|
+
// src/components/Link/Link.tsx
|
|
1841
|
+
var import_react4 = __toESM(require("react"));
|
|
1842
|
+
var import_OpenInNew = __toESM(require("@mui/icons-material/OpenInNew"));
|
|
1843
|
+
var import_SvgIcon = __toESM(require("@mui/material/SvgIcon"));
|
|
1844
|
+
|
|
1845
|
+
// src/components/Link/Link.styles.tsx
|
|
1846
|
+
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
1847
|
+
var import_styles9 = require("@mui/material/styles");
|
|
1848
|
+
var StyledScreenReaderOnly = (0, import_styles9.styled)("span")({
|
|
1849
|
+
position: "absolute",
|
|
1850
|
+
width: "1px",
|
|
1851
|
+
height: "1px",
|
|
1852
|
+
padding: 0,
|
|
1853
|
+
margin: "-1px",
|
|
1854
|
+
overflow: "hidden",
|
|
1855
|
+
clip: "rect(0, 0, 0, 0)",
|
|
1856
|
+
whiteSpace: "nowrap",
|
|
1857
|
+
border: 0
|
|
1858
|
+
});
|
|
1859
|
+
var StyledIconSpan = (0, import_styles9.styled)("span", {
|
|
1860
|
+
shouldForwardProp: (prop) => prop !== "iconright"
|
|
1861
|
+
})(({ iconright }) => ({
|
|
1862
|
+
display: "inline-flex",
|
|
1863
|
+
alignItems: "center",
|
|
1864
|
+
paddingLeft: iconright ? "4px" : void 0,
|
|
1865
|
+
paddingRight: iconright ? void 0 : "4px"
|
|
1866
|
+
}));
|
|
1867
|
+
var StyledAnchor = (0, import_styles9.styled)(import_Box3.default, {
|
|
1868
|
+
shouldForwardProp: (prop) => !["tint", "isOnDarkBg", "standalonelink", "iconright"].includes(prop)
|
|
1869
|
+
})(({ theme, tint = "primary", isOnDarkBg, standalonelink, iconright }) => {
|
|
1870
|
+
const resolvedTint = isOnDarkBg ? "white" : tint;
|
|
1871
|
+
const baseColors = {
|
|
1872
|
+
primary: theme.tokens.colors.primary,
|
|
1873
|
+
black: theme.tokens.colors.textPrimary,
|
|
1874
|
+
error: theme.tokens.colors.error,
|
|
1875
|
+
white: theme.palette.common.white
|
|
1876
|
+
};
|
|
1877
|
+
const hoverColors = {
|
|
1878
|
+
primary: theme.tokens.colors.textPrimary,
|
|
1879
|
+
black: theme.tokens.colors.primary,
|
|
1880
|
+
error: theme.tokens.colors.textPrimary,
|
|
1881
|
+
white: theme.tokens.colors.border
|
|
1882
|
+
};
|
|
1883
|
+
const baseColor = baseColors[resolvedTint];
|
|
1884
|
+
const hoverColor = hoverColors[resolvedTint];
|
|
1885
|
+
return {
|
|
1886
|
+
display: "inline-flex",
|
|
1887
|
+
alignItems: "center",
|
|
1888
|
+
flexDirection: iconright ? "row-reverse" : void 0,
|
|
1889
|
+
verticalAlign: "bottom",
|
|
1890
|
+
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
1891
|
+
textDecoration: "underline",
|
|
1892
|
+
borderRadius: theme.tokens.borderRadius.md,
|
|
1893
|
+
cursor: "pointer",
|
|
1894
|
+
transition: `all ${theme.tokens.transitions.durationBase} ease`,
|
|
1895
|
+
color: baseColor,
|
|
1896
|
+
"& svg": {
|
|
1897
|
+
color: baseColor,
|
|
1898
|
+
transition: `all ${theme.tokens.transitions.durationBase} ease`
|
|
1899
|
+
},
|
|
1900
|
+
"&:hover": {
|
|
1901
|
+
textDecoration: "none",
|
|
1902
|
+
color: hoverColor,
|
|
1903
|
+
"& svg": { color: hoverColor }
|
|
1904
|
+
},
|
|
1905
|
+
"&:focus-visible": {
|
|
1906
|
+
textDecoration: "underline",
|
|
1907
|
+
color: baseColor,
|
|
1908
|
+
outline: "none",
|
|
1909
|
+
boxShadow: `0 0 0 3px ${(0, import_styles9.alpha)(baseColor, 0.35)}`,
|
|
1910
|
+
"& svg": { color: baseColor }
|
|
1911
|
+
},
|
|
1912
|
+
"&:active": {
|
|
1913
|
+
color: hoverColor,
|
|
1914
|
+
boxShadow: `0 0 0 3px ${(0, import_styles9.alpha)(isOnDarkBg ? baseColor : hoverColor, 0.65)}`,
|
|
1915
|
+
textDecoration: "none",
|
|
1916
|
+
"& svg": { color: hoverColor }
|
|
1917
|
+
},
|
|
1918
|
+
...standalonelink && {
|
|
1919
|
+
paddingTop: "0.75rem",
|
|
1920
|
+
paddingBottom: "0.75rem"
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
});
|
|
1924
|
+
|
|
1925
|
+
// src/components/Link/Link.tsx
|
|
1926
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1927
|
+
var Variant = {
|
|
1928
|
+
standard: "standard",
|
|
1929
|
+
external: "external",
|
|
1930
|
+
file: "file"
|
|
1931
|
+
};
|
|
1932
|
+
function DocumentIcon() {
|
|
1933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_SvgIcon.default, { viewBox: "0 0 384 512", fontSize: "inherit", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1934
|
+
"path",
|
|
1935
|
+
{
|
|
1936
|
+
fillRule: "evenodd",
|
|
1937
|
+
d: "M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"
|
|
1938
|
+
}
|
|
1939
|
+
) });
|
|
1940
|
+
}
|
|
1941
|
+
function getIcon(variant, icon) {
|
|
1942
|
+
switch (variant) {
|
|
1943
|
+
case Variant.external:
|
|
1944
|
+
return import_OpenInNew.default;
|
|
1945
|
+
case Variant.file:
|
|
1946
|
+
return DocumentIcon;
|
|
1947
|
+
default:
|
|
1948
|
+
return icon;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
var Link = import_react4.default.forwardRef(function Link2({
|
|
1952
|
+
children,
|
|
1953
|
+
variant = "standard",
|
|
1954
|
+
icon,
|
|
1955
|
+
color = "primary",
|
|
1956
|
+
target: targetProp,
|
|
1957
|
+
iconToRight,
|
|
1958
|
+
href,
|
|
1959
|
+
component,
|
|
1960
|
+
standalone,
|
|
1961
|
+
isOnDarkBg,
|
|
1962
|
+
...restProps
|
|
1963
|
+
}, ref) {
|
|
1964
|
+
const Icon = getIcon(variant, icon);
|
|
1965
|
+
const target = variant !== Variant.standard ? "_blank" : targetProp;
|
|
1966
|
+
const iconright = variant === Variant.external ? true : !!iconToRight;
|
|
1967
|
+
const urlProp = component ? { to: href } : { href };
|
|
1968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1969
|
+
StyledAnchor,
|
|
1970
|
+
{
|
|
1971
|
+
component: component ?? "a",
|
|
1972
|
+
...getCleanProps(restProps),
|
|
1973
|
+
...urlProp,
|
|
1974
|
+
"data-component-id": "Link",
|
|
1975
|
+
tint: color,
|
|
1976
|
+
isOnDarkBg,
|
|
1977
|
+
target,
|
|
1978
|
+
iconright,
|
|
1979
|
+
standalonelink: !!standalone,
|
|
1980
|
+
ref,
|
|
1981
|
+
children: [
|
|
1982
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledIconSpan, { iconright, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { fontSize: "inherit" }) }),
|
|
1983
|
+
children,
|
|
1984
|
+
variant === Variant.external && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledScreenReaderOnly, { children: ", opens in a new tab" })
|
|
1985
|
+
]
|
|
1986
|
+
}
|
|
1987
|
+
);
|
|
1988
|
+
});
|
|
1989
|
+
Link.displayName = "ToolkitLink";
|
|
1990
|
+
|
|
1991
|
+
// src/components/Toggle/Toggle.tsx
|
|
1992
|
+
var import_FormHelperText = __toESM(require("@mui/material/FormHelperText"));
|
|
1993
|
+
|
|
1994
|
+
// src/components/Toggle/Toggle.styles.tsx
|
|
1995
|
+
var import_styles10 = require("@mui/material/styles");
|
|
1996
|
+
var StyledFieldset = (0, import_styles10.styled)("fieldset")(({ theme }) => ({
|
|
1997
|
+
border: "none",
|
|
1998
|
+
margin: 0,
|
|
1999
|
+
padding: 0,
|
|
2000
|
+
minWidth: 0
|
|
2001
|
+
}));
|
|
2002
|
+
var StyledLegend = (0, import_styles10.styled)("legend")(({ theme }) => ({
|
|
2003
|
+
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
2004
|
+
fontSize: theme.tokens.typography.fontSizeLg,
|
|
2005
|
+
fontWeight: theme.tokens.typography.fontWeightRegular,
|
|
2006
|
+
color: theme.tokens.colors.textPrimary,
|
|
2007
|
+
marginBottom: theme.spacing(1),
|
|
2008
|
+
padding: 0
|
|
2009
|
+
}));
|
|
2010
|
+
var StyledToggleWrapper = (0, import_styles10.styled)("div")(({ theme }) => ({
|
|
2011
|
+
display: "flex",
|
|
2012
|
+
flexDirection: "row",
|
|
2013
|
+
width: theme.spacing(15),
|
|
2014
|
+
height: theme.spacing(6),
|
|
2015
|
+
backgroundColor: theme.palette.common.white,
|
|
2016
|
+
border: `1px solid ${theme.tokens.colors.border}`,
|
|
2017
|
+
borderRadius: theme.tokens.borderRadius.md
|
|
2018
|
+
}));
|
|
2019
|
+
var StyledSwitch = (0, import_styles10.styled)("label", {
|
|
2020
|
+
shouldForwardProp: (prop) => prop !== "selected" && prop !== "controlType"
|
|
2021
|
+
})(({ theme, selected, controlType }) => ({
|
|
2022
|
+
position: "relative",
|
|
2023
|
+
display: "inline-flex",
|
|
2024
|
+
alignItems: "center",
|
|
2025
|
+
justifyContent: "center",
|
|
2026
|
+
width: "54px",
|
|
2027
|
+
fontSize: theme.tokens.typography.fontSizeMd,
|
|
2028
|
+
fontFamily: theme.tokens.typography.fontFamilyBase,
|
|
2029
|
+
fontWeight: theme.tokens.typography.fontWeightBold,
|
|
2030
|
+
color: theme.tokens.colors.textPrimary,
|
|
2031
|
+
borderRadius: theme.tokens.borderRadius.md,
|
|
2032
|
+
userSelect: "none",
|
|
2033
|
+
cursor: "pointer",
|
|
2034
|
+
transition: `all ${theme.tokens.transitions.durationBase} ease`,
|
|
2035
|
+
"&::before": {
|
|
2036
|
+
position: "absolute",
|
|
2037
|
+
top: 0,
|
|
2038
|
+
left: 0,
|
|
2039
|
+
display: "block",
|
|
2040
|
+
content: '""',
|
|
2041
|
+
border: "1px solid transparent",
|
|
2042
|
+
width: "100%",
|
|
2043
|
+
height: "100%",
|
|
2044
|
+
borderRadius: theme.tokens.borderRadius.md,
|
|
2045
|
+
visibility: "hidden"
|
|
2046
|
+
},
|
|
2047
|
+
"&:active": {
|
|
2048
|
+
color: theme.palette.common.white
|
|
2049
|
+
},
|
|
2050
|
+
"& input": {
|
|
2051
|
+
position: "absolute",
|
|
2052
|
+
width: "1px",
|
|
2053
|
+
height: "1px",
|
|
2054
|
+
padding: 0,
|
|
2055
|
+
margin: "-1px",
|
|
2056
|
+
overflow: "hidden",
|
|
2057
|
+
clip: "rect(0, 0, 0, 0)",
|
|
2058
|
+
whiteSpace: "nowrap",
|
|
2059
|
+
border: 0
|
|
2060
|
+
},
|
|
2061
|
+
...!selected && {
|
|
2062
|
+
"&:hover": {
|
|
2063
|
+
textDecoration: "underline",
|
|
2064
|
+
backgroundColor: theme.tokens.colors.border,
|
|
2065
|
+
"&:active": {
|
|
2066
|
+
textDecoration: "none"
|
|
2067
|
+
},
|
|
2068
|
+
"&::before": {
|
|
2069
|
+
visibility: "visible"
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
},
|
|
2073
|
+
...selected && {
|
|
2074
|
+
color: theme.palette.common.white,
|
|
2075
|
+
"&::before": {
|
|
2076
|
+
visibility: "visible",
|
|
2077
|
+
borderWidth: "3px"
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
...controlType === "off" && {
|
|
2081
|
+
margin: theme.spacing(0.5),
|
|
2082
|
+
"&:focus-within": {
|
|
2083
|
+
boxShadow: `inset 0 0 0 3px ${theme.tokens.colors.border}`
|
|
2084
|
+
},
|
|
2085
|
+
"&:active": {
|
|
2086
|
+
backgroundColor: theme.tokens.colors.backgroundSubtle,
|
|
2087
|
+
boxShadow: `inset 3px 3px 0 0 ${theme.tokens.colors.border}, inset -3px -3px 0 0 ${theme.tokens.colors.border}`
|
|
2088
|
+
},
|
|
2089
|
+
...selected && {
|
|
2090
|
+
backgroundColor: theme.tokens.colors.textPrimary
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
...controlType === "on" && {
|
|
2094
|
+
margin: `${theme.spacing(0.5)} ${theme.spacing(0.5)} ${theme.spacing(0.5)} 0`,
|
|
2095
|
+
"&:focus-within": {
|
|
2096
|
+
boxShadow: `inset 0 0 0 3px ${theme.tokens.colors.primary}`
|
|
2097
|
+
},
|
|
2098
|
+
"&:active": {
|
|
2099
|
+
backgroundColor: theme.tokens.colors.primary,
|
|
2100
|
+
boxShadow: `inset 3px 3px 0 0 ${theme.tokens.colors.primary}, inset -3px -3px 0 0 ${theme.tokens.colors.primary}`
|
|
2101
|
+
},
|
|
2102
|
+
...selected && {
|
|
2103
|
+
backgroundColor: theme.tokens.colors.primary
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
}));
|
|
2107
|
+
|
|
2108
|
+
// src/components/Toggle/Toggle.tsx
|
|
2109
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2110
|
+
function Toggle({
|
|
2111
|
+
name,
|
|
2112
|
+
checked = false,
|
|
2113
|
+
label,
|
|
2114
|
+
description,
|
|
2115
|
+
error,
|
|
2116
|
+
onChange,
|
|
2117
|
+
onBlur,
|
|
2118
|
+
...restProps
|
|
2119
|
+
}) {
|
|
2120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(StyledFieldset, { "data-component-id": "toggle", ...getCleanProps(restProps), children: [
|
|
2121
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledLegend, { children: label }),
|
|
2122
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_FormHelperText.default, { children: description }),
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(StyledToggleWrapper, { children: [
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2125
|
+
StyledSwitch,
|
|
2126
|
+
{
|
|
2127
|
+
htmlFor: `${name}off`,
|
|
2128
|
+
selected: !checked,
|
|
2129
|
+
controlType: "off",
|
|
2130
|
+
children: [
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2132
|
+
"input",
|
|
2133
|
+
{
|
|
2134
|
+
checked: !checked,
|
|
2135
|
+
id: `${name}off`,
|
|
2136
|
+
name,
|
|
2137
|
+
onChange: () => onChange?.(false),
|
|
2138
|
+
onBlur,
|
|
2139
|
+
type: "radio",
|
|
2140
|
+
readOnly: !onChange
|
|
2141
|
+
}
|
|
2142
|
+
),
|
|
2143
|
+
"Off"
|
|
2144
|
+
]
|
|
2145
|
+
}
|
|
2146
|
+
),
|
|
2147
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2148
|
+
StyledSwitch,
|
|
2149
|
+
{
|
|
2150
|
+
htmlFor: `${name}on`,
|
|
2151
|
+
selected: checked,
|
|
2152
|
+
controlType: "on",
|
|
2153
|
+
children: [
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2155
|
+
"input",
|
|
2156
|
+
{
|
|
2157
|
+
checked,
|
|
2158
|
+
id: `${name}on`,
|
|
2159
|
+
name,
|
|
2160
|
+
onChange: () => onChange?.(true),
|
|
2161
|
+
onBlur,
|
|
2162
|
+
type: "radio",
|
|
2163
|
+
readOnly: !onChange
|
|
2164
|
+
}
|
|
2165
|
+
),
|
|
2166
|
+
"On"
|
|
2167
|
+
]
|
|
2168
|
+
}
|
|
2169
|
+
)
|
|
2170
|
+
] }),
|
|
2171
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_FormHelperText.default, { error: true, children: error })
|
|
2172
|
+
] });
|
|
2173
|
+
}
|
|
2174
|
+
Toggle.displayName = "ToolkitToggle";
|
|
2175
|
+
|
|
2176
|
+
// src/components/Table/Table.tsx
|
|
1650
2177
|
var import_material10 = require("@mui/material");
|
|
1651
|
-
var
|
|
2178
|
+
var import_styles11 = require("@mui/material/styles");
|
|
2179
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2180
|
+
var StyledTableContainer = (0, import_styles11.styled)(import_material10.TableContainer)(() => ({
|
|
2181
|
+
overflowX: "auto"
|
|
2182
|
+
}));
|
|
2183
|
+
var StyledHeadCell = (0, import_styles11.styled)(import_material10.TableCell)(({ theme }) => ({
|
|
2184
|
+
fontWeight: theme.tokens.components.table.headerFontWeight,
|
|
2185
|
+
backgroundColor: theme.tokens.components.table.headerBackground,
|
|
2186
|
+
borderBottomWidth: theme.tokens.components.table.borderWidth,
|
|
2187
|
+
borderBottomColor: theme.tokens.components.table.borderColor
|
|
2188
|
+
}));
|
|
2189
|
+
function Table(props) {
|
|
2190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.Table, { ...props });
|
|
2191
|
+
}
|
|
2192
|
+
function TableHead(props) {
|
|
2193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.TableHead, { ...props });
|
|
2194
|
+
}
|
|
2195
|
+
function TableBody(props) {
|
|
2196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.TableBody, { ...props });
|
|
2197
|
+
}
|
|
2198
|
+
function TableRow(props) {
|
|
2199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.TableRow, { ...props });
|
|
2200
|
+
}
|
|
2201
|
+
function TableCell(props) {
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_material10.TableCell, { ...props });
|
|
2203
|
+
}
|
|
2204
|
+
function TableHeadCell(props) {
|
|
2205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StyledHeadCell, { component: "th", scope: "col", ...props });
|
|
2206
|
+
}
|
|
2207
|
+
function TableContainer(props) {
|
|
2208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StyledTableContainer, { ...props });
|
|
2209
|
+
}
|
|
2210
|
+
var TablePagination = import_material10.TablePagination;
|
|
2211
|
+
var TableSortLabel = import_material10.TableSortLabel;
|
|
2212
|
+
Table.displayName = "ToolkitTable";
|
|
2213
|
+
TableHead.displayName = "ToolkitTableHead";
|
|
2214
|
+
TableBody.displayName = "ToolkitTableBody";
|
|
2215
|
+
TableRow.displayName = "ToolkitTableRow";
|
|
2216
|
+
TableCell.displayName = "ToolkitTableCell";
|
|
2217
|
+
TableHeadCell.displayName = "ToolkitTableHeadCell";
|
|
2218
|
+
TableContainer.displayName = "ToolkitTableContainer";
|
|
2219
|
+
|
|
2220
|
+
// src/foundation/H1/H1.tsx
|
|
2221
|
+
var import_material11 = require("@mui/material");
|
|
2222
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1652
2223
|
function H1({ color = "text.primary", children, ...props }) {
|
|
1653
|
-
return /* @__PURE__ */ (0,
|
|
2224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material11.Typography, { variant: "h1", color, ...props, children });
|
|
1654
2225
|
}
|
|
1655
2226
|
H1.displayName = "ToolkitH1";
|
|
1656
2227
|
|
|
1657
2228
|
// src/foundation/H2/H2.tsx
|
|
1658
|
-
var
|
|
1659
|
-
var
|
|
2229
|
+
var import_material12 = require("@mui/material");
|
|
2230
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1660
2231
|
function H2({ color = "text.primary", children, ...props }) {
|
|
1661
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material12.Typography, { variant: "h2", color, ...props, children });
|
|
1662
2233
|
}
|
|
1663
2234
|
H2.displayName = "ToolkitH2";
|
|
1664
2235
|
|
|
1665
2236
|
// src/foundation/H3/H3.tsx
|
|
1666
|
-
var
|
|
1667
|
-
var
|
|
2237
|
+
var import_material13 = require("@mui/material");
|
|
2238
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1668
2239
|
function H3({ color = "text.primary", children, ...props }) {
|
|
1669
|
-
return /* @__PURE__ */ (0,
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material13.Typography, { variant: "h3", color, ...props, children });
|
|
1670
2241
|
}
|
|
1671
2242
|
H3.displayName = "ToolkitH3";
|
|
1672
2243
|
|
|
1673
2244
|
// src/foundation/H4/H4.tsx
|
|
1674
|
-
var
|
|
1675
|
-
var
|
|
2245
|
+
var import_material14 = require("@mui/material");
|
|
2246
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1676
2247
|
function H4({ color = "text.primary", children, ...props }) {
|
|
1677
|
-
return /* @__PURE__ */ (0,
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material14.Typography, { variant: "h4", color, ...props, children });
|
|
1678
2249
|
}
|
|
1679
2250
|
H4.displayName = "ToolkitH4";
|
|
1680
2251
|
|
|
1681
2252
|
// src/foundation/H5/H5.tsx
|
|
1682
|
-
var
|
|
1683
|
-
var
|
|
2253
|
+
var import_material15 = require("@mui/material");
|
|
2254
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1684
2255
|
function H5({ color = "text.primary", children, ...props }) {
|
|
1685
|
-
return /* @__PURE__ */ (0,
|
|
2256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material15.Typography, { variant: "h5", color, ...props, children });
|
|
1686
2257
|
}
|
|
1687
2258
|
H5.displayName = "ToolkitH5";
|
|
1688
2259
|
|
|
1689
2260
|
// src/foundation/H6/H6.tsx
|
|
1690
|
-
var
|
|
1691
|
-
var
|
|
2261
|
+
var import_material16 = require("@mui/material");
|
|
2262
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1692
2263
|
function H6({ color = "text.primary", children, ...props }) {
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
2264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material16.Typography, { variant: "h6", color, ...props, children });
|
|
1694
2265
|
}
|
|
1695
2266
|
H6.displayName = "ToolkitH6";
|
|
1696
2267
|
|
|
1697
2268
|
// src/foundation/Subtitle1/Subtitle1.tsx
|
|
1698
|
-
var
|
|
1699
|
-
var
|
|
2269
|
+
var import_material17 = require("@mui/material");
|
|
2270
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1700
2271
|
function Subtitle1({ color = "text.primary", children, ...props }) {
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
2272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_material17.Typography, { variant: "subtitle1", color, ...props, children });
|
|
1702
2273
|
}
|
|
1703
2274
|
Subtitle1.displayName = "ToolkitSubtitle1";
|
|
1704
2275
|
|
|
1705
2276
|
// src/foundation/Subtitle2/Subtitle2.tsx
|
|
1706
|
-
var
|
|
1707
|
-
var
|
|
2277
|
+
var import_material18 = require("@mui/material");
|
|
2278
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1708
2279
|
function Subtitle2({ color = "text.primary", children, ...props }) {
|
|
1709
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_material18.Typography, { variant: "subtitle2", color, ...props, children });
|
|
1710
2281
|
}
|
|
1711
2282
|
Subtitle2.displayName = "ToolkitSubtitle2";
|
|
1712
2283
|
|
|
1713
2284
|
// src/foundation/Body1/Body1.tsx
|
|
1714
|
-
var
|
|
1715
|
-
var
|
|
2285
|
+
var import_material19 = require("@mui/material");
|
|
2286
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1716
2287
|
function Body1({ color = "text.primary", children, ...props }) {
|
|
1717
|
-
return /* @__PURE__ */ (0,
|
|
2288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material19.Typography, { variant: "body1", color, ...props, children });
|
|
1718
2289
|
}
|
|
1719
2290
|
Body1.displayName = "ToolkitBody1";
|
|
1720
2291
|
|
|
1721
2292
|
// src/foundation/Body2/Body2.tsx
|
|
1722
|
-
var
|
|
1723
|
-
var
|
|
2293
|
+
var import_material20 = require("@mui/material");
|
|
2294
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1724
2295
|
function Body2({ color = "text.primary", children, ...props }) {
|
|
1725
|
-
return /* @__PURE__ */ (0,
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material20.Typography, { variant: "body2", color, ...props, children });
|
|
1726
2297
|
}
|
|
1727
2298
|
Body2.displayName = "ToolkitBody2";
|
|
1728
2299
|
|
|
1729
2300
|
// src/foundation/Caption/Caption.tsx
|
|
1730
|
-
var
|
|
1731
|
-
var
|
|
2301
|
+
var import_material21 = require("@mui/material");
|
|
2302
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1732
2303
|
function Caption({ color = "text.primary", children, ...props }) {
|
|
1733
|
-
return /* @__PURE__ */ (0,
|
|
2304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material21.Typography, { variant: "caption", color, ...props, children });
|
|
1734
2305
|
}
|
|
1735
2306
|
Caption.displayName = "ToolkitCaption";
|
|
1736
2307
|
|
|
1737
2308
|
// src/foundation/Overline/Overline.tsx
|
|
1738
|
-
var
|
|
1739
|
-
var
|
|
2309
|
+
var import_material22 = require("@mui/material");
|
|
2310
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1740
2311
|
function Overline({ color = "text.primary", children, ...props }) {
|
|
1741
|
-
return /* @__PURE__ */ (0,
|
|
2312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material22.Typography, { variant: "overline", color, ...props, children });
|
|
1742
2313
|
}
|
|
1743
2314
|
Overline.displayName = "ToolkitOverline";
|
|
1744
2315
|
|
|
1745
2316
|
// src/foundation/TypographyButton/TypographyButton.tsx
|
|
1746
|
-
var
|
|
1747
|
-
var
|
|
2317
|
+
var import_material23 = require("@mui/material");
|
|
2318
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1748
2319
|
function TypographyButton({ color = "text.primary", children, ...props }) {
|
|
1749
|
-
return /* @__PURE__ */ (0,
|
|
2320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material23.Typography, { variant: "button", color, ...props, children });
|
|
1750
2321
|
}
|
|
1751
2322
|
TypographyButton.displayName = "ToolkitTypographyButton";
|
|
1752
2323
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1753
2324
|
0 && (module.exports = {
|
|
2325
|
+
ABNInput,
|
|
1754
2326
|
Accordion,
|
|
1755
2327
|
AccordionDetails,
|
|
1756
2328
|
AccordionSummary,
|
|
@@ -1785,6 +2357,8 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
1785
2357
|
H4,
|
|
1786
2358
|
H5,
|
|
1787
2359
|
H6,
|
|
2360
|
+
InternalLinkItem,
|
|
2361
|
+
Link,
|
|
1788
2362
|
MobileDatePicker,
|
|
1789
2363
|
MobileDateTimePicker,
|
|
1790
2364
|
MobileTimePicker,
|
|
@@ -1795,13 +2369,24 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
1795
2369
|
StaticTimePicker,
|
|
1796
2370
|
Subtitle1,
|
|
1797
2371
|
Subtitle2,
|
|
2372
|
+
Table,
|
|
2373
|
+
TableBody,
|
|
2374
|
+
TableCell,
|
|
2375
|
+
TableContainer,
|
|
2376
|
+
TableHead,
|
|
2377
|
+
TableHeadCell,
|
|
2378
|
+
TablePagination,
|
|
2379
|
+
TableRow,
|
|
2380
|
+
TableSortLabel,
|
|
1798
2381
|
TextField,
|
|
1799
2382
|
TimeField,
|
|
1800
2383
|
TimePicker,
|
|
2384
|
+
Toggle,
|
|
1801
2385
|
ToggleButton,
|
|
1802
2386
|
ToggleButtonGroup,
|
|
1803
2387
|
ToolkitThemeProvider,
|
|
1804
2388
|
TypographyButton,
|
|
2389
|
+
Variant,
|
|
1805
2390
|
createMuiTheme,
|
|
1806
2391
|
getThemeTokens,
|
|
1807
2392
|
resolveThemeName,
|