@octoguide/mui-ui-toolkit 0.3.0 → 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 +160 -18
- package/dist/index.d.ts +160 -18
- package/dist/index.js +768 -173
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +737 -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,
|
|
@@ -214,6 +228,16 @@ var defaultTheme = {
|
|
|
214
228
|
linkColor: "rgba(255, 255, 255, 0.7)",
|
|
215
229
|
linkHoverColor: "#ffffff"
|
|
216
230
|
},
|
|
231
|
+
icon: {
|
|
232
|
+
xs: "12px",
|
|
233
|
+
sm: "16px",
|
|
234
|
+
md: "20px",
|
|
235
|
+
lg: "24px",
|
|
236
|
+
xl: "28px",
|
|
237
|
+
xxl: "32px",
|
|
238
|
+
xxxl: "36px",
|
|
239
|
+
display: "56px"
|
|
240
|
+
},
|
|
217
241
|
button: {
|
|
218
242
|
// Sizes & paddings (identical across themes)
|
|
219
243
|
paddingX: "12px",
|
|
@@ -1180,11 +1204,125 @@ function ToolkitThemeProvider({
|
|
|
1180
1204
|
] });
|
|
1181
1205
|
}
|
|
1182
1206
|
|
|
1183
|
-
// 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"));
|
|
1184
1214
|
var import_material2 = require("@mui/material");
|
|
1185
1215
|
var import_styles2 = require("@mui/material/styles");
|
|
1186
1216
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1187
|
-
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 }) => ({
|
|
1188
1326
|
// Gap between icon and label — not surfaced by MUI's styleOverrides
|
|
1189
1327
|
"& .MuiButton-startIcon": {
|
|
1190
1328
|
marginRight: theme.tokens.components.button.iconGap
|
|
@@ -1196,14 +1334,14 @@ var StyledButton = (0, import_styles2.styled)(import_material2.Button)(({ theme
|
|
|
1196
1334
|
function Button({ loading, disabled, children, ...props }) {
|
|
1197
1335
|
const baseLabel = props["aria-label"] ?? (typeof children === "string" ? children : void 0);
|
|
1198
1336
|
const ariaLabel = loading && baseLabel ? `${baseLabel}, loading` : props["aria-label"];
|
|
1199
|
-
return /* @__PURE__ */ (0,
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1200
1338
|
StyledButton,
|
|
1201
1339
|
{
|
|
1202
1340
|
...props,
|
|
1203
1341
|
disabled: disabled || loading,
|
|
1204
1342
|
"aria-busy": loading || void 0,
|
|
1205
1343
|
"aria-label": ariaLabel,
|
|
1206
|
-
startIcon: loading ? /* @__PURE__ */ (0,
|
|
1344
|
+
startIcon: loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_material3.CircularProgress, { size: 16, color: "inherit" }) : props.startIcon,
|
|
1207
1345
|
children
|
|
1208
1346
|
}
|
|
1209
1347
|
);
|
|
@@ -1211,10 +1349,10 @@ function Button({ loading, disabled, children, ...props }) {
|
|
|
1211
1349
|
Button.displayName = "ToolkitButton";
|
|
1212
1350
|
|
|
1213
1351
|
// src/components/Chip/Chip.tsx
|
|
1214
|
-
var
|
|
1215
|
-
var
|
|
1352
|
+
var import_material4 = require("@mui/material");
|
|
1353
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1216
1354
|
function CircleXIcon(props) {
|
|
1217
|
-
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)(
|
|
1218
1356
|
"path",
|
|
1219
1357
|
{
|
|
1220
1358
|
fill: "currentColor",
|
|
@@ -1225,22 +1363,22 @@ function CircleXIcon(props) {
|
|
|
1225
1363
|
) });
|
|
1226
1364
|
}
|
|
1227
1365
|
function Chip({ deleteIcon, onDelete, ...props }) {
|
|
1228
|
-
return /* @__PURE__ */ (0,
|
|
1229
|
-
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1367
|
+
import_material4.Chip,
|
|
1230
1368
|
{
|
|
1231
1369
|
...props,
|
|
1232
1370
|
onDelete,
|
|
1233
|
-
deleteIcon: onDelete ? deleteIcon ?? /* @__PURE__ */ (0,
|
|
1371
|
+
deleteIcon: onDelete ? deleteIcon ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CircleXIcon, {}) : void 0
|
|
1234
1372
|
}
|
|
1235
1373
|
);
|
|
1236
1374
|
}
|
|
1237
1375
|
Chip.displayName = "ToolkitChip";
|
|
1238
1376
|
|
|
1239
1377
|
// src/components/Card/Card.tsx
|
|
1240
|
-
var
|
|
1241
|
-
var
|
|
1242
|
-
var
|
|
1243
|
-
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, {
|
|
1244
1382
|
shouldForwardProp: (prop) => prop !== "compact"
|
|
1245
1383
|
})(({ theme, compact }) => ({
|
|
1246
1384
|
padding: compact ? theme.tokens.components.card.paddingCompact : theme.tokens.components.card.padding,
|
|
@@ -1255,74 +1393,20 @@ var StyledCard = (0, import_styles3.styled)(import_material4.Card, {
|
|
|
1255
1393
|
}
|
|
1256
1394
|
}));
|
|
1257
1395
|
function Card({ compact, children, ...props }) {
|
|
1258
|
-
return /* @__PURE__ */ (0,
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledCard, { compact, ...props, children });
|
|
1259
1397
|
}
|
|
1260
|
-
var CardContent =
|
|
1261
|
-
var CardHeader =
|
|
1262
|
-
var CardActions =
|
|
1398
|
+
var CardContent = import_material5.CardContent;
|
|
1399
|
+
var CardHeader = import_material5.CardHeader;
|
|
1400
|
+
var CardActions = import_material5.CardActions;
|
|
1263
1401
|
Card.displayName = "ToolkitCard";
|
|
1264
1402
|
|
|
1265
|
-
// src/components/TextField/TextField.tsx
|
|
1266
|
-
var import_react = __toESM(require("react"));
|
|
1267
|
-
var import_material5 = require("@mui/material");
|
|
1268
|
-
var import_styles4 = require("@mui/material/styles");
|
|
1269
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1270
|
-
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" }) });
|
|
1271
|
-
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" }) });
|
|
1272
|
-
var StyledTextField = (0, import_styles4.styled)(import_material5.TextField)(({ theme }) => ({
|
|
1273
|
-
// Transition on the entire field when focus changes
|
|
1274
|
-
"& .MuiOutlinedInput-root": {
|
|
1275
|
-
transition: `box-shadow ${theme.tokens.transitions.durationFast} ${theme.tokens.transitions.easingDefault}`,
|
|
1276
|
-
"&.Mui-focused": {
|
|
1277
|
-
boxShadow: theme.tokens.shadows.xs
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
}));
|
|
1281
|
-
var TextField = import_react.default.forwardRef(
|
|
1282
|
-
function TextField2({ error, FormHelperTextProps, inputProps, label, showPasswordToggle, type, slotProps, ...props }, ref) {
|
|
1283
|
-
const [showPassword, setShowPassword] = (0, import_react.useState)(false);
|
|
1284
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1285
|
-
if (!label && !props["aria-label"] && !props["aria-labelledby"] && !inputProps?.["aria-label"] && !inputProps?.["aria-labelledby"]) {
|
|
1286
|
-
console.warn("[ToolkitTextField] Missing accessible label. Provide `label`, `aria-label`, or `aria-labelledby`.");
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
const resolvedType = showPasswordToggle && type === "password" ? showPassword ? "text" : "password" : type;
|
|
1290
|
-
const toggleAdornment = showPasswordToggle && type === "password" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material5.InputAdornment, { position: "end", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1291
|
-
import_material5.IconButton,
|
|
1292
|
-
{
|
|
1293
|
-
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
1294
|
-
onClick: () => setShowPassword((prev) => !prev),
|
|
1295
|
-
edge: "end",
|
|
1296
|
-
children: showPassword ? VisibilityOffIcon : VisibilityIcon
|
|
1297
|
-
}
|
|
1298
|
-
) }) : null;
|
|
1299
|
-
const mergedSlotProps = toggleAdornment ? { ...slotProps, input: { endAdornment: toggleAdornment, ...slotProps?.input } } : slotProps;
|
|
1300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1301
|
-
StyledTextField,
|
|
1302
|
-
{
|
|
1303
|
-
fullWidth: true,
|
|
1304
|
-
variant: "outlined",
|
|
1305
|
-
label,
|
|
1306
|
-
error,
|
|
1307
|
-
type: resolvedType,
|
|
1308
|
-
inputRef: ref,
|
|
1309
|
-
inputProps,
|
|
1310
|
-
slotProps: mergedSlotProps,
|
|
1311
|
-
FormHelperTextProps: error ? { role: "alert", ...FormHelperTextProps } : FormHelperTextProps,
|
|
1312
|
-
...props
|
|
1313
|
-
}
|
|
1314
|
-
);
|
|
1315
|
-
}
|
|
1316
|
-
);
|
|
1317
|
-
TextField.displayName = "ToolkitTextField";
|
|
1318
|
-
|
|
1319
1403
|
// src/components/Alert/Alert.tsx
|
|
1320
1404
|
var import_material6 = require("@mui/material");
|
|
1321
|
-
var
|
|
1322
|
-
var InfoIcon = /* @__PURE__ */ (0,
|
|
1323
|
-
var SuccessIcon = /* @__PURE__ */ (0,
|
|
1324
|
-
var WarningIcon = /* @__PURE__ */ (0,
|
|
1325
|
-
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" }) });
|
|
1326
1410
|
var defaultIconMapping = {
|
|
1327
1411
|
info: InfoIcon,
|
|
1328
1412
|
success: SuccessIcon,
|
|
@@ -1330,10 +1414,10 @@ var defaultIconMapping = {
|
|
|
1330
1414
|
error: ErrorIcon
|
|
1331
1415
|
};
|
|
1332
1416
|
function Alert({ iconMapping, ...props }) {
|
|
1333
|
-
return /* @__PURE__ */ (0,
|
|
1417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Alert, { iconMapping: { ...defaultIconMapping, ...iconMapping }, ...props });
|
|
1334
1418
|
}
|
|
1335
1419
|
function AlertTitle(props) {
|
|
1336
|
-
return /* @__PURE__ */ (0,
|
|
1420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.AlertTitle, { ...props });
|
|
1337
1421
|
}
|
|
1338
1422
|
Alert.displayName = "ToolkitAlert";
|
|
1339
1423
|
AlertTitle.displayName = "ToolkitAlertTitle";
|
|
@@ -1342,7 +1426,7 @@ AlertTitle.displayName = "ToolkitAlertTitle";
|
|
|
1342
1426
|
var import_material7 = require("@mui/material");
|
|
1343
1427
|
var import_styles5 = require("@mui/material/styles");
|
|
1344
1428
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
|
|
1345
|
-
var
|
|
1429
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1346
1430
|
var StandaloneAccordion = (0, import_styles5.styled)(import_material7.Accordion)(({ theme }) => ({
|
|
1347
1431
|
borderRadius: `${theme.tokens.components.accordion.standaloneRadius} !important`,
|
|
1348
1432
|
backgroundColor: theme.tokens.components.accordion.standaloneBackground,
|
|
@@ -1360,13 +1444,13 @@ var StandaloneAccordion = (0, import_styles5.styled)(import_material7.Accordion)
|
|
|
1360
1444
|
}
|
|
1361
1445
|
}));
|
|
1362
1446
|
function Accordion(props) {
|
|
1363
|
-
return /* @__PURE__ */ (0,
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.Accordion, { ...props });
|
|
1364
1448
|
}
|
|
1365
1449
|
function AccordionSummary({ expandIcon, ...props }) {
|
|
1366
|
-
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 });
|
|
1367
1451
|
}
|
|
1368
1452
|
function AccordionDetails(props) {
|
|
1369
|
-
return /* @__PURE__ */ (0,
|
|
1453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material7.AccordionDetails, { ...props });
|
|
1370
1454
|
}
|
|
1371
1455
|
Accordion.displayName = "ToolkitAccordion";
|
|
1372
1456
|
AccordionSummary.displayName = "ToolkitAccordionSummary";
|
|
@@ -1377,7 +1461,7 @@ StandaloneAccordion.displayName = "ToolkitStandaloneAccordion";
|
|
|
1377
1461
|
var import_Avatar = __toESM(require("@mui/material/Avatar"));
|
|
1378
1462
|
var import_styles6 = require("@mui/material/styles");
|
|
1379
1463
|
var import_AvatarGroup = __toESM(require("@mui/material/AvatarGroup"));
|
|
1380
|
-
var
|
|
1464
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1381
1465
|
function getDimension(avatar, size) {
|
|
1382
1466
|
const map = {
|
|
1383
1467
|
xs: avatar.sizeXs,
|
|
@@ -1399,23 +1483,23 @@ var StyledAvatar = (0, import_styles6.styled)(import_Avatar.default, {
|
|
|
1399
1483
|
};
|
|
1400
1484
|
});
|
|
1401
1485
|
function Avatar({ size = "md", ...props }) {
|
|
1402
|
-
return /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StyledAvatar, { size, ...props });
|
|
1403
1487
|
}
|
|
1404
1488
|
|
|
1405
1489
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
1406
1490
|
var import_material8 = require("@mui/material");
|
|
1407
|
-
var
|
|
1491
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1408
1492
|
function ToggleButton(props) {
|
|
1409
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material8.ToggleButton, { ...props });
|
|
1410
1494
|
}
|
|
1411
1495
|
ToggleButton.displayName = "ToolkitToggleButton";
|
|
1412
1496
|
function ToggleButtonGroup(props) {
|
|
1413
|
-
return /* @__PURE__ */ (0,
|
|
1497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_material8.ToggleButtonGroup, { ...props });
|
|
1414
1498
|
}
|
|
1415
1499
|
ToggleButtonGroup.displayName = "ToolkitToggleButtonGroup";
|
|
1416
1500
|
|
|
1417
1501
|
// src/components/DatePicker/DatePicker.tsx
|
|
1418
|
-
var
|
|
1502
|
+
var import_react3 = require("react");
|
|
1419
1503
|
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
1420
1504
|
var import_LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
1421
1505
|
var import_DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
@@ -1439,75 +1523,75 @@ var import_DialogContent = __toESM(require("@mui/material/DialogContent"));
|
|
|
1439
1523
|
var import_DialogActions = __toESM(require("@mui/material/DialogActions"));
|
|
1440
1524
|
var import_Button2 = __toESM(require("@mui/material/Button"));
|
|
1441
1525
|
var import_Box = __toESM(require("@mui/material/Box"));
|
|
1442
|
-
var
|
|
1526
|
+
var import_TextField3 = __toESM(require("@mui/material/TextField"));
|
|
1443
1527
|
var import_styles7 = require("@mui/material/styles");
|
|
1444
|
-
var
|
|
1528
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1445
1529
|
function DateLocalizationProvider({ children }) {
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_LocalizationProvider.LocalizationProvider, { dateAdapter: import_AdapterDayjs.AdapterDayjs, children });
|
|
1447
1531
|
}
|
|
1448
1532
|
DateLocalizationProvider.displayName = "ToolkitDateLocalizationProvider";
|
|
1449
1533
|
function DatePicker(props) {
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DatePicker.DatePicker, { ...props });
|
|
1451
1535
|
}
|
|
1452
1536
|
DatePicker.displayName = "ToolkitDatePicker";
|
|
1453
1537
|
function DesktopDatePicker(props) {
|
|
1454
|
-
return /* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopDatePicker.DesktopDatePicker, { ...props });
|
|
1455
1539
|
}
|
|
1456
1540
|
DesktopDatePicker.displayName = "ToolkitDesktopDatePicker";
|
|
1457
1541
|
function MobileDatePicker(props) {
|
|
1458
|
-
return /* @__PURE__ */ (0,
|
|
1542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileDatePicker.MobileDatePicker, { ...props });
|
|
1459
1543
|
}
|
|
1460
1544
|
MobileDatePicker.displayName = "ToolkitMobileDatePicker";
|
|
1461
1545
|
function DateField(props) {
|
|
1462
|
-
return /* @__PURE__ */ (0,
|
|
1546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateField.DateField, { ...props });
|
|
1463
1547
|
}
|
|
1464
1548
|
DateField.displayName = "ToolkitDateField";
|
|
1465
1549
|
function StaticDatePicker(props) {
|
|
1466
|
-
return /* @__PURE__ */ (0,
|
|
1550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticDatePicker.StaticDatePicker, { ...props });
|
|
1467
1551
|
}
|
|
1468
1552
|
StaticDatePicker.displayName = "ToolkitStaticDatePicker";
|
|
1469
1553
|
function TimePicker(props) {
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_TimePicker.TimePicker, { ...props });
|
|
1471
1555
|
}
|
|
1472
1556
|
TimePicker.displayName = "ToolkitTimePicker";
|
|
1473
1557
|
function DesktopTimePicker(props) {
|
|
1474
|
-
return /* @__PURE__ */ (0,
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopTimePicker.DesktopTimePicker, { ...props });
|
|
1475
1559
|
}
|
|
1476
1560
|
DesktopTimePicker.displayName = "ToolkitDesktopTimePicker";
|
|
1477
1561
|
function MobileTimePicker(props) {
|
|
1478
|
-
return /* @__PURE__ */ (0,
|
|
1562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileTimePicker.MobileTimePicker, { ...props });
|
|
1479
1563
|
}
|
|
1480
1564
|
MobileTimePicker.displayName = "ToolkitMobileTimePicker";
|
|
1481
1565
|
function TimeField(props) {
|
|
1482
|
-
return /* @__PURE__ */ (0,
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_TimeField.TimeField, { ...props });
|
|
1483
1567
|
}
|
|
1484
1568
|
TimeField.displayName = "ToolkitTimeField";
|
|
1485
1569
|
function StaticTimePicker(props) {
|
|
1486
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticTimePicker.StaticTimePicker, { ...props });
|
|
1487
1571
|
}
|
|
1488
1572
|
StaticTimePicker.displayName = "ToolkitStaticTimePicker";
|
|
1489
1573
|
function DateTimePicker(props) {
|
|
1490
|
-
return /* @__PURE__ */ (0,
|
|
1574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateTimePicker.DateTimePicker, { ...props });
|
|
1491
1575
|
}
|
|
1492
1576
|
DateTimePicker.displayName = "ToolkitDateTimePicker";
|
|
1493
1577
|
function DesktopDateTimePicker(props) {
|
|
1494
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DesktopDateTimePicker.DesktopDateTimePicker, { ...props });
|
|
1495
1579
|
}
|
|
1496
1580
|
DesktopDateTimePicker.displayName = "ToolkitDesktopDateTimePicker";
|
|
1497
1581
|
function MobileDateTimePicker(props) {
|
|
1498
|
-
return /* @__PURE__ */ (0,
|
|
1582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_MobileDateTimePicker.MobileDateTimePicker, { ...props });
|
|
1499
1583
|
}
|
|
1500
1584
|
MobileDateTimePicker.displayName = "ToolkitMobileDateTimePicker";
|
|
1501
1585
|
function DateTimeField(props) {
|
|
1502
|
-
return /* @__PURE__ */ (0,
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateTimeField.DateTimeField, { ...props });
|
|
1503
1587
|
}
|
|
1504
1588
|
DateTimeField.displayName = "ToolkitDateTimeField";
|
|
1505
1589
|
function StaticDateTimePicker(props) {
|
|
1506
|
-
return /* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_StaticDateTimePicker.StaticDateTimePicker, { ...props });
|
|
1507
1591
|
}
|
|
1508
1592
|
StaticDateTimePicker.displayName = "ToolkitStaticDateTimePicker";
|
|
1509
1593
|
function DateCalendar(props) {
|
|
1510
|
-
return /* @__PURE__ */ (0,
|
|
1594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_DateCalendar.DateCalendar, { ...props });
|
|
1511
1595
|
}
|
|
1512
1596
|
DateCalendar.displayName = "ToolkitDateCalendar";
|
|
1513
1597
|
var RangeRow = (0, import_styles7.styled)(import_Box.default)(({ theme }) => ({
|
|
@@ -1522,8 +1606,8 @@ function DateRangePickerInput({
|
|
|
1522
1606
|
endLabel = "End date",
|
|
1523
1607
|
buttonLabel = "Click me!"
|
|
1524
1608
|
}) {
|
|
1525
|
-
const [open, setOpen] = (0,
|
|
1526
|
-
const [draft, setDraft] = (0,
|
|
1609
|
+
const [open, setOpen] = (0, import_react3.useState)(false);
|
|
1610
|
+
const [draft, setDraft] = (0, import_react3.useState)(value);
|
|
1527
1611
|
const handleOpen = () => {
|
|
1528
1612
|
setDraft(value);
|
|
1529
1613
|
setOpen(true);
|
|
@@ -1533,11 +1617,11 @@ function DateRangePickerInput({
|
|
|
1533
1617
|
onChange(draft);
|
|
1534
1618
|
setOpen(false);
|
|
1535
1619
|
};
|
|
1536
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1540
|
-
/* @__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)(
|
|
1541
1625
|
import_DatePicker.DatePicker,
|
|
1542
1626
|
{
|
|
1543
1627
|
label: startLabel,
|
|
@@ -1546,7 +1630,7 @@ function DateRangePickerInput({
|
|
|
1546
1630
|
slotProps: { textField: { fullWidth: true } }
|
|
1547
1631
|
}
|
|
1548
1632
|
),
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1550
1634
|
import_DatePicker.DatePicker,
|
|
1551
1635
|
{
|
|
1552
1636
|
label: endLabel,
|
|
@@ -1556,9 +1640,9 @@ function DateRangePickerInput({
|
|
|
1556
1640
|
}
|
|
1557
1641
|
)
|
|
1558
1642
|
] }) }),
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1561
|
-
/* @__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" })
|
|
1562
1646
|
] })
|
|
1563
1647
|
] })
|
|
1564
1648
|
] });
|
|
@@ -1569,9 +1653,9 @@ function DateRangePickerCalendar({
|
|
|
1569
1653
|
onChange,
|
|
1570
1654
|
buttonLabel = "Click me!"
|
|
1571
1655
|
}) {
|
|
1572
|
-
const [open, setOpen] = (0,
|
|
1573
|
-
const [draft, setDraft] = (0,
|
|
1574
|
-
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");
|
|
1575
1659
|
const handleOpen = () => {
|
|
1576
1660
|
setDraft(value);
|
|
1577
1661
|
setSelecting("start");
|
|
@@ -1590,12 +1674,12 @@ function DateRangePickerCalendar({
|
|
|
1590
1674
|
setDraft((prev) => ({ ...prev, end: date }));
|
|
1591
1675
|
}
|
|
1592
1676
|
};
|
|
1593
|
-
return /* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1597
|
-
/* @__PURE__ */ (0,
|
|
1598
|
-
|
|
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,
|
|
1599
1683
|
{
|
|
1600
1684
|
size: "small",
|
|
1601
1685
|
label: "Selecting",
|
|
@@ -1604,7 +1688,7 @@ function DateRangePickerCalendar({
|
|
|
1604
1688
|
fullWidth: true
|
|
1605
1689
|
}
|
|
1606
1690
|
) }),
|
|
1607
|
-
/* @__PURE__ */ (0,
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1608
1692
|
import_DateCalendar.DateCalendar,
|
|
1609
1693
|
{
|
|
1610
1694
|
value: selecting === "start" ? draft.start : draft.end,
|
|
@@ -1612,9 +1696,9 @@ function DateRangePickerCalendar({
|
|
|
1612
1696
|
}
|
|
1613
1697
|
)
|
|
1614
1698
|
] }),
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1617
|
-
/* @__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" })
|
|
1618
1702
|
] })
|
|
1619
1703
|
] })
|
|
1620
1704
|
] });
|
|
@@ -1623,9 +1707,9 @@ DateRangePickerCalendar.displayName = "ToolkitDateRangePickerCalendar";
|
|
|
1623
1707
|
|
|
1624
1708
|
// src/foundation/Grid/Grid.tsx
|
|
1625
1709
|
var import_material9 = require("@mui/material");
|
|
1626
|
-
var
|
|
1710
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1627
1711
|
function Grid({ container, spacing, ...props }) {
|
|
1628
|
-
return /* @__PURE__ */ (0,
|
|
1712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1629
1713
|
import_material9.Grid2,
|
|
1630
1714
|
{
|
|
1631
1715
|
container,
|
|
@@ -1636,111 +1720,609 @@ function Grid({ container, spacing, ...props }) {
|
|
|
1636
1720
|
}
|
|
1637
1721
|
Grid.displayName = "ToolkitGrid";
|
|
1638
1722
|
|
|
1639
|
-
// 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
|
|
1640
2177
|
var import_material10 = require("@mui/material");
|
|
1641
|
-
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");
|
|
1642
2223
|
function H1({ color = "text.primary", children, ...props }) {
|
|
1643
|
-
return /* @__PURE__ */ (0,
|
|
2224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material11.Typography, { variant: "h1", color, ...props, children });
|
|
1644
2225
|
}
|
|
1645
2226
|
H1.displayName = "ToolkitH1";
|
|
1646
2227
|
|
|
1647
2228
|
// src/foundation/H2/H2.tsx
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
2229
|
+
var import_material12 = require("@mui/material");
|
|
2230
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1650
2231
|
function H2({ color = "text.primary", children, ...props }) {
|
|
1651
|
-
return /* @__PURE__ */ (0,
|
|
2232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material12.Typography, { variant: "h2", color, ...props, children });
|
|
1652
2233
|
}
|
|
1653
2234
|
H2.displayName = "ToolkitH2";
|
|
1654
2235
|
|
|
1655
2236
|
// src/foundation/H3/H3.tsx
|
|
1656
|
-
var
|
|
1657
|
-
var
|
|
2237
|
+
var import_material13 = require("@mui/material");
|
|
2238
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1658
2239
|
function H3({ color = "text.primary", children, ...props }) {
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material13.Typography, { variant: "h3", color, ...props, children });
|
|
1660
2241
|
}
|
|
1661
2242
|
H3.displayName = "ToolkitH3";
|
|
1662
2243
|
|
|
1663
2244
|
// src/foundation/H4/H4.tsx
|
|
1664
|
-
var
|
|
1665
|
-
var
|
|
2245
|
+
var import_material14 = require("@mui/material");
|
|
2246
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1666
2247
|
function H4({ color = "text.primary", children, ...props }) {
|
|
1667
|
-
return /* @__PURE__ */ (0,
|
|
2248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material14.Typography, { variant: "h4", color, ...props, children });
|
|
1668
2249
|
}
|
|
1669
2250
|
H4.displayName = "ToolkitH4";
|
|
1670
2251
|
|
|
1671
2252
|
// src/foundation/H5/H5.tsx
|
|
1672
|
-
var
|
|
1673
|
-
var
|
|
2253
|
+
var import_material15 = require("@mui/material");
|
|
2254
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1674
2255
|
function H5({ color = "text.primary", children, ...props }) {
|
|
1675
|
-
return /* @__PURE__ */ (0,
|
|
2256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_material15.Typography, { variant: "h5", color, ...props, children });
|
|
1676
2257
|
}
|
|
1677
2258
|
H5.displayName = "ToolkitH5";
|
|
1678
2259
|
|
|
1679
2260
|
// src/foundation/H6/H6.tsx
|
|
1680
|
-
var
|
|
1681
|
-
var
|
|
2261
|
+
var import_material16 = require("@mui/material");
|
|
2262
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1682
2263
|
function H6({ color = "text.primary", children, ...props }) {
|
|
1683
|
-
return /* @__PURE__ */ (0,
|
|
2264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material16.Typography, { variant: "h6", color, ...props, children });
|
|
1684
2265
|
}
|
|
1685
2266
|
H6.displayName = "ToolkitH6";
|
|
1686
2267
|
|
|
1687
2268
|
// src/foundation/Subtitle1/Subtitle1.tsx
|
|
1688
|
-
var
|
|
1689
|
-
var
|
|
2269
|
+
var import_material17 = require("@mui/material");
|
|
2270
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1690
2271
|
function Subtitle1({ color = "text.primary", children, ...props }) {
|
|
1691
|
-
return /* @__PURE__ */ (0,
|
|
2272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_material17.Typography, { variant: "subtitle1", color, ...props, children });
|
|
1692
2273
|
}
|
|
1693
2274
|
Subtitle1.displayName = "ToolkitSubtitle1";
|
|
1694
2275
|
|
|
1695
2276
|
// src/foundation/Subtitle2/Subtitle2.tsx
|
|
1696
|
-
var
|
|
1697
|
-
var
|
|
2277
|
+
var import_material18 = require("@mui/material");
|
|
2278
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1698
2279
|
function Subtitle2({ color = "text.primary", children, ...props }) {
|
|
1699
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_material18.Typography, { variant: "subtitle2", color, ...props, children });
|
|
1700
2281
|
}
|
|
1701
2282
|
Subtitle2.displayName = "ToolkitSubtitle2";
|
|
1702
2283
|
|
|
1703
2284
|
// src/foundation/Body1/Body1.tsx
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
2285
|
+
var import_material19 = require("@mui/material");
|
|
2286
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1706
2287
|
function Body1({ color = "text.primary", children, ...props }) {
|
|
1707
|
-
return /* @__PURE__ */ (0,
|
|
2288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_material19.Typography, { variant: "body1", color, ...props, children });
|
|
1708
2289
|
}
|
|
1709
2290
|
Body1.displayName = "ToolkitBody1";
|
|
1710
2291
|
|
|
1711
2292
|
// src/foundation/Body2/Body2.tsx
|
|
1712
|
-
var
|
|
1713
|
-
var
|
|
2293
|
+
var import_material20 = require("@mui/material");
|
|
2294
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1714
2295
|
function Body2({ color = "text.primary", children, ...props }) {
|
|
1715
|
-
return /* @__PURE__ */ (0,
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material20.Typography, { variant: "body2", color, ...props, children });
|
|
1716
2297
|
}
|
|
1717
2298
|
Body2.displayName = "ToolkitBody2";
|
|
1718
2299
|
|
|
1719
2300
|
// src/foundation/Caption/Caption.tsx
|
|
1720
|
-
var
|
|
1721
|
-
var
|
|
2301
|
+
var import_material21 = require("@mui/material");
|
|
2302
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1722
2303
|
function Caption({ color = "text.primary", children, ...props }) {
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
2304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_material21.Typography, { variant: "caption", color, ...props, children });
|
|
1724
2305
|
}
|
|
1725
2306
|
Caption.displayName = "ToolkitCaption";
|
|
1726
2307
|
|
|
1727
2308
|
// src/foundation/Overline/Overline.tsx
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
2309
|
+
var import_material22 = require("@mui/material");
|
|
2310
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1730
2311
|
function Overline({ color = "text.primary", children, ...props }) {
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
2312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_material22.Typography, { variant: "overline", color, ...props, children });
|
|
1732
2313
|
}
|
|
1733
2314
|
Overline.displayName = "ToolkitOverline";
|
|
1734
2315
|
|
|
1735
2316
|
// src/foundation/TypographyButton/TypographyButton.tsx
|
|
1736
|
-
var
|
|
1737
|
-
var
|
|
2317
|
+
var import_material23 = require("@mui/material");
|
|
2318
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1738
2319
|
function TypographyButton({ color = "text.primary", children, ...props }) {
|
|
1739
|
-
return /* @__PURE__ */ (0,
|
|
2320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_material23.Typography, { variant: "button", color, ...props, children });
|
|
1740
2321
|
}
|
|
1741
2322
|
TypographyButton.displayName = "ToolkitTypographyButton";
|
|
1742
2323
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1743
2324
|
0 && (module.exports = {
|
|
2325
|
+
ABNInput,
|
|
1744
2326
|
Accordion,
|
|
1745
2327
|
AccordionDetails,
|
|
1746
2328
|
AccordionSummary,
|
|
@@ -1775,6 +2357,8 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
1775
2357
|
H4,
|
|
1776
2358
|
H5,
|
|
1777
2359
|
H6,
|
|
2360
|
+
InternalLinkItem,
|
|
2361
|
+
Link,
|
|
1778
2362
|
MobileDatePicker,
|
|
1779
2363
|
MobileDateTimePicker,
|
|
1780
2364
|
MobileTimePicker,
|
|
@@ -1785,13 +2369,24 @@ TypographyButton.displayName = "ToolkitTypographyButton";
|
|
|
1785
2369
|
StaticTimePicker,
|
|
1786
2370
|
Subtitle1,
|
|
1787
2371
|
Subtitle2,
|
|
2372
|
+
Table,
|
|
2373
|
+
TableBody,
|
|
2374
|
+
TableCell,
|
|
2375
|
+
TableContainer,
|
|
2376
|
+
TableHead,
|
|
2377
|
+
TableHeadCell,
|
|
2378
|
+
TablePagination,
|
|
2379
|
+
TableRow,
|
|
2380
|
+
TableSortLabel,
|
|
1788
2381
|
TextField,
|
|
1789
2382
|
TimeField,
|
|
1790
2383
|
TimePicker,
|
|
2384
|
+
Toggle,
|
|
1791
2385
|
ToggleButton,
|
|
1792
2386
|
ToggleButtonGroup,
|
|
1793
2387
|
ToolkitThemeProvider,
|
|
1794
2388
|
TypographyButton,
|
|
2389
|
+
Variant,
|
|
1795
2390
|
createMuiTheme,
|
|
1796
2391
|
getThemeTokens,
|
|
1797
2392
|
resolveThemeName,
|