mytek-components 1.0.9 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.es.js +1469 -225
- package/dist/main.es.js.map +1 -1
- package/dist/main.umd.js +1469 -225
- package/dist/main.umd.js.map +1 -1
- package/package.json +53 -53
package/dist/main.umd.js
CHANGED
|
@@ -5741,7 +5741,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
5741
5741
|
return generateUtilityClass("MuiSvgIcon", slot);
|
|
5742
5742
|
}
|
|
5743
5743
|
generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
5744
|
-
const useUtilityClasses$
|
|
5744
|
+
const useUtilityClasses$C = (ownerState) => {
|
|
5745
5745
|
const {
|
|
5746
5746
|
color: color2,
|
|
5747
5747
|
fontSize,
|
|
@@ -5886,7 +5886,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
5886
5886
|
if (!inheritViewBox) {
|
|
5887
5887
|
more.viewBox = viewBox;
|
|
5888
5888
|
}
|
|
5889
|
-
const classes = useUtilityClasses$
|
|
5889
|
+
const classes = useUtilityClasses$C(ownerState);
|
|
5890
5890
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SvgIconRoot, {
|
|
5891
5891
|
as: component,
|
|
5892
5892
|
className: clsx(classes.root, className),
|
|
@@ -7314,7 +7314,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
7314
7314
|
return generateUtilityClass("MuiPaper", slot);
|
|
7315
7315
|
}
|
|
7316
7316
|
generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
|
|
7317
|
-
const useUtilityClasses$
|
|
7317
|
+
const useUtilityClasses$B = (ownerState) => {
|
|
7318
7318
|
const {
|
|
7319
7319
|
square,
|
|
7320
7320
|
elevation,
|
|
@@ -7387,7 +7387,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
7387
7387
|
square,
|
|
7388
7388
|
variant
|
|
7389
7389
|
};
|
|
7390
|
-
const classes = useUtilityClasses$
|
|
7390
|
+
const classes = useUtilityClasses$B(ownerState);
|
|
7391
7391
|
if (process.env.NODE_ENV !== "production") {
|
|
7392
7392
|
if (theme.shadows[elevation] === void 0) {
|
|
7393
7393
|
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join("\n"));
|
|
@@ -8073,7 +8073,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8073
8073
|
return generateUtilityClass("MuiButtonBase", slot);
|
|
8074
8074
|
}
|
|
8075
8075
|
const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
|
|
8076
|
-
const useUtilityClasses$
|
|
8076
|
+
const useUtilityClasses$A = (ownerState) => {
|
|
8077
8077
|
const {
|
|
8078
8078
|
disabled,
|
|
8079
8079
|
focusVisible,
|
|
@@ -8289,7 +8289,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8289
8289
|
tabIndex,
|
|
8290
8290
|
focusVisible
|
|
8291
8291
|
};
|
|
8292
|
-
const classes = useUtilityClasses$
|
|
8292
|
+
const classes = useUtilityClasses$A(ownerState);
|
|
8293
8293
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonBaseRoot, {
|
|
8294
8294
|
as: ComponentProp,
|
|
8295
8295
|
className: clsx(classes.root, className),
|
|
@@ -8541,7 +8541,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8541
8541
|
const dashAnimation = typeof circularDashKeyframe !== "string" ? react.css`
|
|
8542
8542
|
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
8543
8543
|
` : null;
|
|
8544
|
-
const useUtilityClasses$
|
|
8544
|
+
const useUtilityClasses$z = (ownerState) => {
|
|
8545
8545
|
const {
|
|
8546
8546
|
classes,
|
|
8547
8547
|
variant,
|
|
@@ -8663,7 +8663,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8663
8663
|
value,
|
|
8664
8664
|
variant
|
|
8665
8665
|
};
|
|
8666
|
-
const classes = useUtilityClasses$
|
|
8666
|
+
const classes = useUtilityClasses$z(ownerState);
|
|
8667
8667
|
const circleStyle = {};
|
|
8668
8668
|
const rootStyle = {};
|
|
8669
8669
|
const rootProps = {};
|
|
@@ -8772,7 +8772,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8772
8772
|
return generateUtilityClass("MuiIconButton", slot);
|
|
8773
8773
|
}
|
|
8774
8774
|
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]);
|
|
8775
|
-
const useUtilityClasses$
|
|
8775
|
+
const useUtilityClasses$y = (ownerState) => {
|
|
8776
8776
|
const {
|
|
8777
8777
|
classes,
|
|
8778
8778
|
disabled,
|
|
@@ -8957,7 +8957,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
8957
8957
|
loadingIndicator,
|
|
8958
8958
|
size
|
|
8959
8959
|
};
|
|
8960
|
-
const classes = useUtilityClasses$
|
|
8960
|
+
const classes = useUtilityClasses$y(ownerState);
|
|
8961
8961
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
8962
8962
|
id: loading ? loadingId : idProp,
|
|
8963
8963
|
className: clsx(classes.root, className),
|
|
@@ -9081,7 +9081,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
9081
9081
|
textDisabled: true
|
|
9082
9082
|
};
|
|
9083
9083
|
const extendSxProp = internal_createExtendSxProp();
|
|
9084
|
-
const useUtilityClasses$
|
|
9084
|
+
const useUtilityClasses$x = (ownerState) => {
|
|
9085
9085
|
const {
|
|
9086
9086
|
align,
|
|
9087
9087
|
gutterBottom,
|
|
@@ -9224,7 +9224,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
9224
9224
|
variantMapping
|
|
9225
9225
|
};
|
|
9226
9226
|
const Component = component || (paragraph ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
9227
|
-
const classes = useUtilityClasses$
|
|
9227
|
+
const classes = useUtilityClasses$x(ownerState);
|
|
9228
9228
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, {
|
|
9229
9229
|
as: Component,
|
|
9230
9230
|
ref,
|
|
@@ -10975,7 +10975,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
10975
10975
|
} = props;
|
|
10976
10976
|
return [styles2.input, ownerState.size === "small" && styles2.inputSizeSmall, ownerState.multiline && styles2.inputMultiline, ownerState.type === "search" && styles2.inputTypeSearch, ownerState.startAdornment && styles2.inputAdornedStart, ownerState.endAdornment && styles2.inputAdornedEnd, ownerState.hiddenLabel && styles2.inputHiddenLabel];
|
|
10977
10977
|
};
|
|
10978
|
-
const useUtilityClasses$
|
|
10978
|
+
const useUtilityClasses$w = (ownerState) => {
|
|
10979
10979
|
const {
|
|
10980
10980
|
classes,
|
|
10981
10981
|
color: color2,
|
|
@@ -11379,7 +11379,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
11379
11379
|
startAdornment,
|
|
11380
11380
|
type
|
|
11381
11381
|
};
|
|
11382
|
-
const classes = useUtilityClasses$
|
|
11382
|
+
const classes = useUtilityClasses$w(ownerState);
|
|
11383
11383
|
const Root = slots.root || components.Root || InputBaseRoot;
|
|
11384
11384
|
const rootProps = slotProps.root || componentsProps.root || {};
|
|
11385
11385
|
const Input2 = slots.input || components.Input || InputBaseInput;
|
|
@@ -11692,7 +11692,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
11692
11692
|
...inputBaseClasses,
|
|
11693
11693
|
...generateUtilityClasses("MuiFilledInput", ["root", "underline", "input", "adornedStart", "adornedEnd", "sizeSmall", "multiline", "hiddenLabel"])
|
|
11694
11694
|
};
|
|
11695
|
-
const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11695
|
+
const ArrowDropDownIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
11696
11696
|
d: "M7 10l5 5 5-5z"
|
|
11697
11697
|
}), "ArrowDropDown");
|
|
11698
11698
|
function isClassComponent(elementType) {
|
|
@@ -11915,7 +11915,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
11915
11915
|
return generateUtilityClass("MuiBackdrop", slot);
|
|
11916
11916
|
}
|
|
11917
11917
|
generateUtilityClasses("MuiBackdrop", ["root", "invisible"]);
|
|
11918
|
-
const useUtilityClasses$
|
|
11918
|
+
const useUtilityClasses$v = (ownerState) => {
|
|
11919
11919
|
const {
|
|
11920
11920
|
classes,
|
|
11921
11921
|
invisible
|
|
@@ -11978,7 +11978,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
11978
11978
|
component,
|
|
11979
11979
|
invisible
|
|
11980
11980
|
};
|
|
11981
|
-
const classes = useUtilityClasses$
|
|
11981
|
+
const classes = useUtilityClasses$v(ownerState);
|
|
11982
11982
|
const backwardCompatibleSlots = {
|
|
11983
11983
|
transition: TransitionComponentProp,
|
|
11984
11984
|
root: components.Root,
|
|
@@ -12146,7 +12146,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
12146
12146
|
if (process.env.NODE_ENV !== "production") {
|
|
12147
12147
|
ButtonGroupButtonContext.displayName = "ButtonGroupButtonContext";
|
|
12148
12148
|
}
|
|
12149
|
-
const useUtilityClasses$
|
|
12149
|
+
const useUtilityClasses$u = (ownerState) => {
|
|
12150
12150
|
const {
|
|
12151
12151
|
color: color2,
|
|
12152
12152
|
disableElevation,
|
|
@@ -12646,7 +12646,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
12646
12646
|
type,
|
|
12647
12647
|
variant
|
|
12648
12648
|
};
|
|
12649
|
-
const classes = useUtilityClasses$
|
|
12649
|
+
const classes = useUtilityClasses$u(ownerState);
|
|
12650
12650
|
const startIcon = (startIconProp || loading && loadingPosition === "start") && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonStartIcon, {
|
|
12651
12651
|
className: classes.startIcon,
|
|
12652
12652
|
ownerState,
|
|
@@ -12813,7 +12813,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
12813
12813
|
return generateUtilityClass("PrivateSwitchBase", slot);
|
|
12814
12814
|
}
|
|
12815
12815
|
generateUtilityClasses("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
12816
|
-
const useUtilityClasses$
|
|
12816
|
+
const useUtilityClasses$t = (ownerState) => {
|
|
12817
12817
|
const {
|
|
12818
12818
|
classes,
|
|
12819
12819
|
checked,
|
|
@@ -12950,7 +12950,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
12950
12950
|
disableFocusRipple,
|
|
12951
12951
|
edge
|
|
12952
12952
|
};
|
|
12953
|
-
const classes = useUtilityClasses$
|
|
12953
|
+
const classes = useUtilityClasses$t(ownerState);
|
|
12954
12954
|
const externalForwardedProps = {
|
|
12955
12955
|
slots,
|
|
12956
12956
|
slotProps: {
|
|
@@ -13159,7 +13159,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
13159
13159
|
return generateUtilityClass("MuiCheckbox", slot);
|
|
13160
13160
|
}
|
|
13161
13161
|
const checkboxClasses = generateUtilityClasses("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]);
|
|
13162
|
-
const useUtilityClasses$
|
|
13162
|
+
const useUtilityClasses$s = (ownerState) => {
|
|
13163
13163
|
const {
|
|
13164
13164
|
classes,
|
|
13165
13165
|
indeterminate,
|
|
@@ -13268,7 +13268,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
13268
13268
|
indeterminate,
|
|
13269
13269
|
size
|
|
13270
13270
|
};
|
|
13271
|
-
const classes = useUtilityClasses$
|
|
13271
|
+
const classes = useUtilityClasses$s(ownerState);
|
|
13272
13272
|
const externalInputProps = slotProps.input ?? inputProps;
|
|
13273
13273
|
const [RootSlot, rootSlotProps] = useSlot("root", {
|
|
13274
13274
|
ref,
|
|
@@ -14040,7 +14040,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14040
14040
|
return generateUtilityClass("MuiModal", slot);
|
|
14041
14041
|
}
|
|
14042
14042
|
generateUtilityClasses("MuiModal", ["root", "hidden", "backdrop"]);
|
|
14043
|
-
const useUtilityClasses$
|
|
14043
|
+
const useUtilityClasses$r = (ownerState) => {
|
|
14044
14044
|
const {
|
|
14045
14045
|
open,
|
|
14046
14046
|
exited,
|
|
@@ -14147,7 +14147,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14147
14147
|
...propsWithDefaults,
|
|
14148
14148
|
exited
|
|
14149
14149
|
};
|
|
14150
|
-
const classes = useUtilityClasses$
|
|
14150
|
+
const classes = useUtilityClasses$r(ownerState);
|
|
14151
14151
|
const childProps = {};
|
|
14152
14152
|
if (children.props.tabIndex === void 0) {
|
|
14153
14153
|
childProps.tabIndex = "-1";
|
|
@@ -14399,7 +14399,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14399
14399
|
return generateUtilityClass("MuiDivider", slot);
|
|
14400
14400
|
}
|
|
14401
14401
|
const dividerClasses = generateUtilityClasses("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
14402
|
-
const useUtilityClasses$
|
|
14402
|
+
const useUtilityClasses$q = (ownerState) => {
|
|
14403
14403
|
const {
|
|
14404
14404
|
absolute,
|
|
14405
14405
|
children,
|
|
@@ -14613,7 +14613,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14613
14613
|
textAlign,
|
|
14614
14614
|
variant
|
|
14615
14615
|
};
|
|
14616
|
-
const classes = useUtilityClasses$
|
|
14616
|
+
const classes = useUtilityClasses$q(ownerState);
|
|
14617
14617
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(DividerRoot, {
|
|
14618
14618
|
as: component,
|
|
14619
14619
|
className: clsx(classes.root, className),
|
|
@@ -14695,7 +14695,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14695
14695
|
*/
|
|
14696
14696
|
variant: PropTypes.oneOfType([PropTypes.oneOf(["fullWidth", "inset", "middle"]), PropTypes.string])
|
|
14697
14697
|
} : void 0;
|
|
14698
|
-
const useUtilityClasses$
|
|
14698
|
+
const useUtilityClasses$p = (ownerState) => {
|
|
14699
14699
|
const {
|
|
14700
14700
|
classes,
|
|
14701
14701
|
disableUnderline,
|
|
@@ -14977,7 +14977,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
14977
14977
|
multiline,
|
|
14978
14978
|
type
|
|
14979
14979
|
};
|
|
14980
|
-
const classes = useUtilityClasses$
|
|
14980
|
+
const classes = useUtilityClasses$p(props);
|
|
14981
14981
|
const filledInputComponentsProps = {
|
|
14982
14982
|
root: {
|
|
14983
14983
|
ownerState
|
|
@@ -15201,7 +15201,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15201
15201
|
return generateUtilityClass("MuiFormControl", slot);
|
|
15202
15202
|
}
|
|
15203
15203
|
generateUtilityClasses("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
|
|
15204
|
-
const useUtilityClasses$
|
|
15204
|
+
const useUtilityClasses$o = (ownerState) => {
|
|
15205
15205
|
const {
|
|
15206
15206
|
classes,
|
|
15207
15207
|
margin: margin2,
|
|
@@ -15291,7 +15291,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15291
15291
|
size,
|
|
15292
15292
|
variant
|
|
15293
15293
|
};
|
|
15294
|
-
const classes = useUtilityClasses$
|
|
15294
|
+
const classes = useUtilityClasses$o(ownerState);
|
|
15295
15295
|
const [adornedStart, setAdornedStart] = React__namespace.useState(() => {
|
|
15296
15296
|
let initialAdornedStart = false;
|
|
15297
15297
|
if (children) {
|
|
@@ -15466,7 +15466,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15466
15466
|
return generateUtilityClass("MuiFormControlLabel", slot);
|
|
15467
15467
|
}
|
|
15468
15468
|
const formControlLabelClasses = generateUtilityClasses("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]);
|
|
15469
|
-
const useUtilityClasses$
|
|
15469
|
+
const useUtilityClasses$n = (ownerState) => {
|
|
15470
15470
|
const {
|
|
15471
15471
|
classes,
|
|
15472
15472
|
disabled,
|
|
@@ -15601,7 +15601,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15601
15601
|
required,
|
|
15602
15602
|
error: fcs.error
|
|
15603
15603
|
};
|
|
15604
|
-
const classes = useUtilityClasses$
|
|
15604
|
+
const classes = useUtilityClasses$n(ownerState);
|
|
15605
15605
|
const externalForwardedProps = {
|
|
15606
15606
|
slots,
|
|
15607
15607
|
slotProps: {
|
|
@@ -15731,7 +15731,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15731
15731
|
}
|
|
15732
15732
|
const formHelperTextClasses = generateUtilityClasses("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
|
|
15733
15733
|
var _span$2;
|
|
15734
|
-
const useUtilityClasses$
|
|
15734
|
+
const useUtilityClasses$m = (ownerState) => {
|
|
15735
15735
|
const {
|
|
15736
15736
|
classes,
|
|
15737
15737
|
contained,
|
|
@@ -15826,7 +15826,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15826
15826
|
required: fcs.required
|
|
15827
15827
|
};
|
|
15828
15828
|
delete ownerState.ownerState;
|
|
15829
|
-
const classes = useUtilityClasses$
|
|
15829
|
+
const classes = useUtilityClasses$m(ownerState);
|
|
15830
15830
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperTextRoot, {
|
|
15831
15831
|
as: component,
|
|
15832
15832
|
className: clsx(classes.root, className),
|
|
@@ -15905,7 +15905,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
15905
15905
|
return generateUtilityClass("MuiFormLabel", slot);
|
|
15906
15906
|
}
|
|
15907
15907
|
const formLabelClasses = generateUtilityClasses("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]);
|
|
15908
|
-
const useUtilityClasses$
|
|
15908
|
+
const useUtilityClasses$l = (ownerState) => {
|
|
15909
15909
|
const {
|
|
15910
15910
|
classes,
|
|
15911
15911
|
color: color2,
|
|
@@ -16002,7 +16002,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16002
16002
|
focused: fcs.focused,
|
|
16003
16003
|
required: fcs.required
|
|
16004
16004
|
};
|
|
16005
|
-
const classes = useUtilityClasses$
|
|
16005
|
+
const classes = useUtilityClasses$l(ownerState);
|
|
16006
16006
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabelRoot, {
|
|
16007
16007
|
as: component,
|
|
16008
16008
|
ownerState,
|
|
@@ -16304,7 +16304,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16304
16304
|
if (Grow) {
|
|
16305
16305
|
Grow.muiSupportAuto = true;
|
|
16306
16306
|
}
|
|
16307
|
-
const useUtilityClasses$
|
|
16307
|
+
const useUtilityClasses$k = (ownerState) => {
|
|
16308
16308
|
const {
|
|
16309
16309
|
classes,
|
|
16310
16310
|
disableUnderline
|
|
@@ -16437,7 +16437,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16437
16437
|
type = "text",
|
|
16438
16438
|
...other
|
|
16439
16439
|
} = props;
|
|
16440
|
-
const classes = useUtilityClasses$
|
|
16440
|
+
const classes = useUtilityClasses$k(props);
|
|
16441
16441
|
const ownerState = {
|
|
16442
16442
|
disableUnderline
|
|
16443
16443
|
};
|
|
@@ -16654,7 +16654,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16654
16654
|
return generateUtilityClass("MuiInputLabel", slot);
|
|
16655
16655
|
}
|
|
16656
16656
|
generateUtilityClasses("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
|
|
16657
|
-
const useUtilityClasses$
|
|
16657
|
+
const useUtilityClasses$j = (ownerState) => {
|
|
16658
16658
|
const {
|
|
16659
16659
|
classes,
|
|
16660
16660
|
formControl,
|
|
@@ -16843,7 +16843,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16843
16843
|
required: fcs.required,
|
|
16844
16844
|
focused: fcs.focused
|
|
16845
16845
|
};
|
|
16846
|
-
const classes = useUtilityClasses$
|
|
16846
|
+
const classes = useUtilityClasses$j(ownerState);
|
|
16847
16847
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabelRoot, {
|
|
16848
16848
|
"data-shrink": shrink,
|
|
16849
16849
|
ref,
|
|
@@ -16928,7 +16928,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16928
16928
|
return generateUtilityClass("MuiList", slot);
|
|
16929
16929
|
}
|
|
16930
16930
|
generateUtilityClasses("MuiList", ["root", "padding", "dense", "subheader"]);
|
|
16931
|
-
const useUtilityClasses$
|
|
16931
|
+
const useUtilityClasses$i = (ownerState) => {
|
|
16932
16932
|
const {
|
|
16933
16933
|
classes,
|
|
16934
16934
|
disablePadding,
|
|
@@ -16994,7 +16994,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
16994
16994
|
dense,
|
|
16995
16995
|
disablePadding
|
|
16996
16996
|
};
|
|
16997
|
-
const classes = useUtilityClasses$
|
|
16997
|
+
const classes = useUtilityClasses$i(ownerState);
|
|
16998
16998
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
|
|
16999
16999
|
value: context2,
|
|
17000
17000
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListRoot, {
|
|
@@ -17327,7 +17327,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
17327
17327
|
function resolveAnchorEl(anchorEl) {
|
|
17328
17328
|
return typeof anchorEl === "function" ? anchorEl() : anchorEl;
|
|
17329
17329
|
}
|
|
17330
|
-
const useUtilityClasses$
|
|
17330
|
+
const useUtilityClasses$h = (ownerState) => {
|
|
17331
17331
|
const {
|
|
17332
17332
|
classes
|
|
17333
17333
|
} = ownerState;
|
|
@@ -17405,7 +17405,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
17405
17405
|
transitionDuration: transitionDurationProp,
|
|
17406
17406
|
TransitionProps
|
|
17407
17407
|
};
|
|
17408
|
-
const classes = useUtilityClasses$
|
|
17408
|
+
const classes = useUtilityClasses$h(ownerState);
|
|
17409
17409
|
const getAnchorOffset = React__namespace.useCallback(() => {
|
|
17410
17410
|
if (anchorReference === "anchorPosition") {
|
|
17411
17411
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -17844,7 +17844,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
17844
17844
|
vertical: "top",
|
|
17845
17845
|
horizontal: "left"
|
|
17846
17846
|
};
|
|
17847
|
-
const useUtilityClasses$
|
|
17847
|
+
const useUtilityClasses$g = (ownerState) => {
|
|
17848
17848
|
const {
|
|
17849
17849
|
classes
|
|
17850
17850
|
} = ownerState;
|
|
@@ -17915,7 +17915,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
17915
17915
|
TransitionProps,
|
|
17916
17916
|
variant
|
|
17917
17917
|
};
|
|
17918
|
-
const classes = useUtilityClasses$
|
|
17918
|
+
const classes = useUtilityClasses$g(ownerState);
|
|
17919
17919
|
const autoFocusItem = autoFocus && !disableAutoFocusItem && open;
|
|
17920
17920
|
const menuListActionsRef = React__namespace.useRef(null);
|
|
17921
17921
|
const handleEntering = (element, isAppearing) => {
|
|
@@ -18158,7 +18158,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18158
18158
|
} = props;
|
|
18159
18159
|
return [styles2.root, ownerState.dense && styles2.dense, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters];
|
|
18160
18160
|
};
|
|
18161
|
-
const useUtilityClasses$
|
|
18161
|
+
const useUtilityClasses$f = (ownerState) => {
|
|
18162
18162
|
const {
|
|
18163
18163
|
disabled,
|
|
18164
18164
|
dense,
|
|
@@ -18318,7 +18318,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18318
18318
|
divider,
|
|
18319
18319
|
disableGutters
|
|
18320
18320
|
};
|
|
18321
|
-
const classes = useUtilityClasses$
|
|
18321
|
+
const classes = useUtilityClasses$f(props);
|
|
18322
18322
|
const handleRef = useForkRef(menuItemRef, ref);
|
|
18323
18323
|
let tabIndex;
|
|
18324
18324
|
if (!props.disabled) {
|
|
@@ -18418,7 +18418,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18418
18418
|
return generateUtilityClass("MuiNativeSelect", slot);
|
|
18419
18419
|
}
|
|
18420
18420
|
const nativeSelectClasses = generateUtilityClasses("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
|
|
18421
|
-
const useUtilityClasses$
|
|
18421
|
+
const useUtilityClasses$e = (ownerState) => {
|
|
18422
18422
|
const {
|
|
18423
18423
|
classes,
|
|
18424
18424
|
variant,
|
|
@@ -18573,7 +18573,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18573
18573
|
variant,
|
|
18574
18574
|
error
|
|
18575
18575
|
};
|
|
18576
|
-
const classes = useUtilityClasses$
|
|
18576
|
+
const classes = useUtilityClasses$e(ownerState);
|
|
18577
18577
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(React__namespace.Fragment, {
|
|
18578
18578
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(NativeSelectSelect, {
|
|
18579
18579
|
ownerState,
|
|
@@ -18787,7 +18787,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18787
18787
|
*/
|
|
18788
18788
|
style: PropTypes.object
|
|
18789
18789
|
} : void 0;
|
|
18790
|
-
const useUtilityClasses$
|
|
18790
|
+
const useUtilityClasses$d = (ownerState) => {
|
|
18791
18791
|
const {
|
|
18792
18792
|
classes
|
|
18793
18793
|
} = ownerState;
|
|
@@ -18965,7 +18965,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
18965
18965
|
type = "text",
|
|
18966
18966
|
...other
|
|
18967
18967
|
} = props;
|
|
18968
|
-
const classes = useUtilityClasses$
|
|
18968
|
+
const classes = useUtilityClasses$d(props);
|
|
18969
18969
|
const muiFormControl = useFormControl();
|
|
18970
18970
|
const fcs = formControlState({
|
|
18971
18971
|
props,
|
|
@@ -19286,7 +19286,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
19286
19286
|
return generateUtilityClass("MuiRadio", slot);
|
|
19287
19287
|
}
|
|
19288
19288
|
const radioClasses = generateUtilityClasses("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]);
|
|
19289
|
-
const useUtilityClasses$
|
|
19289
|
+
const useUtilityClasses$c = (ownerState) => {
|
|
19290
19290
|
const {
|
|
19291
19291
|
classes,
|
|
19292
19292
|
color: color2,
|
|
@@ -19410,7 +19410,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
19410
19410
|
color: color2,
|
|
19411
19411
|
size
|
|
19412
19412
|
};
|
|
19413
|
-
const classes = useUtilityClasses$
|
|
19413
|
+
const classes = useUtilityClasses$c(ownerState);
|
|
19414
19414
|
const radioGroup = useRadioGroup();
|
|
19415
19415
|
let checked = checkedProp;
|
|
19416
19416
|
const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
|
|
@@ -19643,7 +19643,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
19643
19643
|
function isEmpty(display) {
|
|
19644
19644
|
return display == null || typeof display === "string" && !display.trim();
|
|
19645
19645
|
}
|
|
19646
|
-
const useUtilityClasses$
|
|
19646
|
+
const useUtilityClasses$b = (ownerState) => {
|
|
19647
19647
|
const {
|
|
19648
19648
|
classes,
|
|
19649
19649
|
variant,
|
|
@@ -19963,7 +19963,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
19963
19963
|
open,
|
|
19964
19964
|
error
|
|
19965
19965
|
};
|
|
19966
|
-
const classes = useUtilityClasses$
|
|
19966
|
+
const classes = useUtilityClasses$b(ownerState);
|
|
19967
19967
|
const paperProps = {
|
|
19968
19968
|
...MenuProps.PaperProps,
|
|
19969
19969
|
...(_a = MenuProps.slotProps) == null ? void 0 : _a.paper
|
|
@@ -20202,7 +20202,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20202
20202
|
*/
|
|
20203
20203
|
variant: PropTypes.oneOf(["standard", "outlined", "filled"])
|
|
20204
20204
|
} : void 0;
|
|
20205
|
-
const useUtilityClasses$
|
|
20205
|
+
const useUtilityClasses$a = (ownerState) => {
|
|
20206
20206
|
const {
|
|
20207
20207
|
classes
|
|
20208
20208
|
} = ownerState;
|
|
@@ -20235,7 +20235,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20235
20235
|
className,
|
|
20236
20236
|
defaultOpen = false,
|
|
20237
20237
|
displayEmpty = false,
|
|
20238
|
-
IconComponent = ArrowDropDownIcon,
|
|
20238
|
+
IconComponent = ArrowDropDownIcon$1,
|
|
20239
20239
|
id,
|
|
20240
20240
|
input,
|
|
20241
20241
|
inputProps,
|
|
@@ -20265,7 +20265,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20265
20265
|
variant,
|
|
20266
20266
|
classes: classesProp
|
|
20267
20267
|
};
|
|
20268
|
-
const classes = useUtilityClasses$
|
|
20268
|
+
const classes = useUtilityClasses$a(ownerState);
|
|
20269
20269
|
const {
|
|
20270
20270
|
root,
|
|
20271
20271
|
...restOfClasses
|
|
@@ -20482,7 +20482,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20482
20482
|
return generateUtilityClass("MuiTab", slot);
|
|
20483
20483
|
}
|
|
20484
20484
|
const tabClasses = generateUtilityClasses("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper", "icon"]);
|
|
20485
|
-
const useUtilityClasses$
|
|
20485
|
+
const useUtilityClasses$9 = (ownerState) => {
|
|
20486
20486
|
const {
|
|
20487
20487
|
classes,
|
|
20488
20488
|
textColor,
|
|
@@ -20690,7 +20690,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20690
20690
|
textColor,
|
|
20691
20691
|
wrapped
|
|
20692
20692
|
};
|
|
20693
|
-
const classes = useUtilityClasses$
|
|
20693
|
+
const classes = useUtilityClasses$9(ownerState);
|
|
20694
20694
|
const icon = iconProp && label && /* @__PURE__ */ React__namespace.isValidElement(iconProp) ? /* @__PURE__ */ React__namespace.cloneElement(iconProp, {
|
|
20695
20695
|
className: clsx(classes.icon, iconProp.props.className)
|
|
20696
20696
|
}) : iconProp;
|
|
@@ -20805,174 +20805,897 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
20805
20805
|
*/
|
|
20806
20806
|
wrapped: PropTypes.bool
|
|
20807
20807
|
} : void 0;
|
|
20808
|
-
const
|
|
20809
|
-
|
|
20810
|
-
|
|
20811
|
-
const KeyboardArrowRight = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
20812
|
-
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
20813
|
-
}), "KeyboardArrowRight");
|
|
20814
|
-
function easeInOutSin(time) {
|
|
20815
|
-
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
|
20816
|
-
}
|
|
20817
|
-
function animate(property, element, to, options2 = {}, cb = () => {
|
|
20818
|
-
}) {
|
|
20819
|
-
const {
|
|
20820
|
-
ease = easeInOutSin,
|
|
20821
|
-
duration: duration2 = 300
|
|
20822
|
-
// standard
|
|
20823
|
-
} = options2;
|
|
20824
|
-
let start2 = null;
|
|
20825
|
-
const from = element[property];
|
|
20826
|
-
let cancelled = false;
|
|
20827
|
-
const cancel = () => {
|
|
20828
|
-
cancelled = true;
|
|
20829
|
-
};
|
|
20830
|
-
const step = (timestamp) => {
|
|
20831
|
-
if (cancelled) {
|
|
20832
|
-
cb(new Error("Animation cancelled"));
|
|
20833
|
-
return;
|
|
20834
|
-
}
|
|
20835
|
-
if (start2 === null) {
|
|
20836
|
-
start2 = timestamp;
|
|
20837
|
-
}
|
|
20838
|
-
const time = Math.min(1, (timestamp - start2) / duration2);
|
|
20839
|
-
element[property] = ease(time) * (to - from) + from;
|
|
20840
|
-
if (time >= 1) {
|
|
20841
|
-
requestAnimationFrame(() => {
|
|
20842
|
-
cb(null);
|
|
20843
|
-
});
|
|
20844
|
-
return;
|
|
20845
|
-
}
|
|
20846
|
-
requestAnimationFrame(step);
|
|
20847
|
-
};
|
|
20848
|
-
if (from === to) {
|
|
20849
|
-
cb(new Error("Element already at target position"));
|
|
20850
|
-
return cancel;
|
|
20851
|
-
}
|
|
20852
|
-
requestAnimationFrame(step);
|
|
20853
|
-
return cancel;
|
|
20854
|
-
}
|
|
20855
|
-
const styles = {
|
|
20856
|
-
width: 99,
|
|
20857
|
-
height: 99,
|
|
20858
|
-
position: "absolute",
|
|
20859
|
-
top: -9999,
|
|
20860
|
-
overflow: "scroll"
|
|
20861
|
-
};
|
|
20862
|
-
function ScrollbarSize(props) {
|
|
20863
|
-
const {
|
|
20864
|
-
onChange,
|
|
20865
|
-
...other
|
|
20866
|
-
} = props;
|
|
20867
|
-
const scrollbarHeight = React__namespace.useRef();
|
|
20868
|
-
const nodeRef = React__namespace.useRef(null);
|
|
20869
|
-
const setMeasurements = () => {
|
|
20870
|
-
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
|
20871
|
-
};
|
|
20872
|
-
useEnhancedEffect(() => {
|
|
20873
|
-
const handleResize = debounce$1(() => {
|
|
20874
|
-
const prevHeight = scrollbarHeight.current;
|
|
20875
|
-
setMeasurements();
|
|
20876
|
-
if (prevHeight !== scrollbarHeight.current) {
|
|
20877
|
-
onChange(scrollbarHeight.current);
|
|
20878
|
-
}
|
|
20879
|
-
});
|
|
20880
|
-
const containerWindow = ownerWindow$1(nodeRef.current);
|
|
20881
|
-
containerWindow.addEventListener("resize", handleResize);
|
|
20882
|
-
return () => {
|
|
20883
|
-
handleResize.clear();
|
|
20884
|
-
containerWindow.removeEventListener("resize", handleResize);
|
|
20885
|
-
};
|
|
20886
|
-
}, [onChange]);
|
|
20887
|
-
React__namespace.useEffect(() => {
|
|
20888
|
-
setMeasurements();
|
|
20889
|
-
onChange(scrollbarHeight.current);
|
|
20890
|
-
}, [onChange]);
|
|
20891
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
20892
|
-
style: styles,
|
|
20893
|
-
...other,
|
|
20894
|
-
ref: nodeRef
|
|
20895
|
-
});
|
|
20808
|
+
const TableContext = /* @__PURE__ */ React__namespace.createContext();
|
|
20809
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20810
|
+
TableContext.displayName = "TableContext";
|
|
20896
20811
|
}
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
} : void 0;
|
|
20900
|
-
function getTabScrollButtonUtilityClass(slot) {
|
|
20901
|
-
return generateUtilityClass("MuiTabScrollButton", slot);
|
|
20812
|
+
function getTableUtilityClass(slot) {
|
|
20813
|
+
return generateUtilityClass("MuiTable", slot);
|
|
20902
20814
|
}
|
|
20903
|
-
|
|
20904
|
-
const useUtilityClasses$
|
|
20815
|
+
generateUtilityClasses("MuiTable", ["root", "stickyHeader"]);
|
|
20816
|
+
const useUtilityClasses$8 = (ownerState) => {
|
|
20905
20817
|
const {
|
|
20906
20818
|
classes,
|
|
20907
|
-
|
|
20908
|
-
disabled
|
|
20819
|
+
stickyHeader
|
|
20909
20820
|
} = ownerState;
|
|
20910
20821
|
const slots = {
|
|
20911
|
-
root: ["root",
|
|
20822
|
+
root: ["root", stickyHeader && "stickyHeader"]
|
|
20912
20823
|
};
|
|
20913
|
-
return composeClasses(slots,
|
|
20824
|
+
return composeClasses(slots, getTableUtilityClass, classes);
|
|
20914
20825
|
};
|
|
20915
|
-
const
|
|
20916
|
-
name: "
|
|
20826
|
+
const TableRoot = styled("table", {
|
|
20827
|
+
name: "MuiTable",
|
|
20917
20828
|
slot: "Root",
|
|
20918
20829
|
overridesResolver: (props, styles2) => {
|
|
20919
20830
|
const {
|
|
20920
20831
|
ownerState
|
|
20921
20832
|
} = props;
|
|
20922
|
-
return [styles2.root, ownerState.
|
|
20833
|
+
return [styles2.root, ownerState.stickyHeader && styles2.stickyHeader];
|
|
20923
20834
|
}
|
|
20924
|
-
})({
|
|
20925
|
-
|
|
20926
|
-
|
|
20927
|
-
|
|
20928
|
-
|
|
20929
|
-
|
|
20835
|
+
})(memoTheme(({
|
|
20836
|
+
theme
|
|
20837
|
+
}) => ({
|
|
20838
|
+
display: "table",
|
|
20839
|
+
width: "100%",
|
|
20840
|
+
borderCollapse: "collapse",
|
|
20841
|
+
borderSpacing: 0,
|
|
20842
|
+
"& caption": {
|
|
20843
|
+
...theme.typography.body2,
|
|
20844
|
+
padding: theme.spacing(2),
|
|
20845
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
20846
|
+
textAlign: "left",
|
|
20847
|
+
captionSide: "bottom"
|
|
20930
20848
|
},
|
|
20931
20849
|
variants: [{
|
|
20932
|
-
props: {
|
|
20933
|
-
|
|
20934
|
-
},
|
|
20850
|
+
props: ({
|
|
20851
|
+
ownerState
|
|
20852
|
+
}) => ownerState.stickyHeader,
|
|
20935
20853
|
style: {
|
|
20936
|
-
|
|
20937
|
-
height: 40,
|
|
20938
|
-
"& svg": {
|
|
20939
|
-
transform: "var(--TabScrollButton-svgRotate)"
|
|
20940
|
-
}
|
|
20854
|
+
borderCollapse: "separate"
|
|
20941
20855
|
}
|
|
20942
20856
|
}]
|
|
20943
|
-
});
|
|
20944
|
-
const
|
|
20857
|
+
})));
|
|
20858
|
+
const defaultComponent$3 = "table";
|
|
20859
|
+
const Table = /* @__PURE__ */ React__namespace.forwardRef(function Table2(inProps, ref) {
|
|
20945
20860
|
const props = useDefaultProps({
|
|
20946
20861
|
props: inProps,
|
|
20947
|
-
name: "
|
|
20862
|
+
name: "MuiTable"
|
|
20948
20863
|
});
|
|
20949
20864
|
const {
|
|
20950
20865
|
className,
|
|
20951
|
-
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20955
|
-
disabled,
|
|
20866
|
+
component = defaultComponent$3,
|
|
20867
|
+
padding: padding2 = "normal",
|
|
20868
|
+
size = "medium",
|
|
20869
|
+
stickyHeader = false,
|
|
20956
20870
|
...other
|
|
20957
20871
|
} = props;
|
|
20958
|
-
const isRtl = useRtl();
|
|
20959
20872
|
const ownerState = {
|
|
20960
|
-
|
|
20961
|
-
|
|
20873
|
+
...props,
|
|
20874
|
+
component,
|
|
20875
|
+
padding: padding2,
|
|
20876
|
+
size,
|
|
20877
|
+
stickyHeader
|
|
20962
20878
|
};
|
|
20963
|
-
const classes = useUtilityClasses$
|
|
20964
|
-
const
|
|
20965
|
-
|
|
20966
|
-
|
|
20967
|
-
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20971
|
-
|
|
20972
|
-
|
|
20879
|
+
const classes = useUtilityClasses$8(ownerState);
|
|
20880
|
+
const table = React__namespace.useMemo(() => ({
|
|
20881
|
+
padding: padding2,
|
|
20882
|
+
size,
|
|
20883
|
+
stickyHeader
|
|
20884
|
+
}), [padding2, size, stickyHeader]);
|
|
20885
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableContext.Provider, {
|
|
20886
|
+
value: table,
|
|
20887
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableRoot, {
|
|
20888
|
+
as: component,
|
|
20889
|
+
role: component === defaultComponent$3 ? null : "table",
|
|
20890
|
+
ref,
|
|
20891
|
+
className: clsx(classes.root, className),
|
|
20892
|
+
ownerState,
|
|
20893
|
+
...other
|
|
20894
|
+
})
|
|
20973
20895
|
});
|
|
20974
|
-
|
|
20975
|
-
|
|
20896
|
+
});
|
|
20897
|
+
process.env.NODE_ENV !== "production" ? Table.propTypes = {
|
|
20898
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
20899
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
20900
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
20901
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
20902
|
+
/**
|
|
20903
|
+
* The content of the table, normally `TableHead` and `TableBody`.
|
|
20904
|
+
*/
|
|
20905
|
+
children: PropTypes.node,
|
|
20906
|
+
/**
|
|
20907
|
+
* Override or extend the styles applied to the component.
|
|
20908
|
+
*/
|
|
20909
|
+
classes: PropTypes.object,
|
|
20910
|
+
/**
|
|
20911
|
+
* @ignore
|
|
20912
|
+
*/
|
|
20913
|
+
className: PropTypes.string,
|
|
20914
|
+
/**
|
|
20915
|
+
* The component used for the root node.
|
|
20916
|
+
* Either a string to use a HTML element or a component.
|
|
20917
|
+
*/
|
|
20918
|
+
component: PropTypes.elementType,
|
|
20919
|
+
/**
|
|
20920
|
+
* Allows TableCells to inherit padding of the Table.
|
|
20921
|
+
* @default 'normal'
|
|
20922
|
+
*/
|
|
20923
|
+
padding: PropTypes.oneOf(["checkbox", "none", "normal"]),
|
|
20924
|
+
/**
|
|
20925
|
+
* Allows TableCells to inherit size of the Table.
|
|
20926
|
+
* @default 'medium'
|
|
20927
|
+
*/
|
|
20928
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["medium", "small"]), PropTypes.string]),
|
|
20929
|
+
/**
|
|
20930
|
+
* Set the header sticky.
|
|
20931
|
+
* @default false
|
|
20932
|
+
*/
|
|
20933
|
+
stickyHeader: PropTypes.bool,
|
|
20934
|
+
/**
|
|
20935
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
20936
|
+
*/
|
|
20937
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
20938
|
+
} : void 0;
|
|
20939
|
+
const Tablelvl2Context = /* @__PURE__ */ React__namespace.createContext();
|
|
20940
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20941
|
+
Tablelvl2Context.displayName = "Tablelvl2Context";
|
|
20942
|
+
}
|
|
20943
|
+
function getTableBodyUtilityClass(slot) {
|
|
20944
|
+
return generateUtilityClass("MuiTableBody", slot);
|
|
20945
|
+
}
|
|
20946
|
+
generateUtilityClasses("MuiTableBody", ["root"]);
|
|
20947
|
+
const useUtilityClasses$7 = (ownerState) => {
|
|
20948
|
+
const {
|
|
20949
|
+
classes
|
|
20950
|
+
} = ownerState;
|
|
20951
|
+
const slots = {
|
|
20952
|
+
root: ["root"]
|
|
20953
|
+
};
|
|
20954
|
+
return composeClasses(slots, getTableBodyUtilityClass, classes);
|
|
20955
|
+
};
|
|
20956
|
+
const TableBodyRoot = styled("tbody", {
|
|
20957
|
+
name: "MuiTableBody",
|
|
20958
|
+
slot: "Root"
|
|
20959
|
+
})({
|
|
20960
|
+
display: "table-row-group"
|
|
20961
|
+
});
|
|
20962
|
+
const tablelvl2$1 = {
|
|
20963
|
+
variant: "body"
|
|
20964
|
+
};
|
|
20965
|
+
const defaultComponent$2 = "tbody";
|
|
20966
|
+
const TableBody = /* @__PURE__ */ React__namespace.forwardRef(function TableBody2(inProps, ref) {
|
|
20967
|
+
const props = useDefaultProps({
|
|
20968
|
+
props: inProps,
|
|
20969
|
+
name: "MuiTableBody"
|
|
20970
|
+
});
|
|
20971
|
+
const {
|
|
20972
|
+
className,
|
|
20973
|
+
component = defaultComponent$2,
|
|
20974
|
+
...other
|
|
20975
|
+
} = props;
|
|
20976
|
+
const ownerState = {
|
|
20977
|
+
...props,
|
|
20978
|
+
component
|
|
20979
|
+
};
|
|
20980
|
+
const classes = useUtilityClasses$7(ownerState);
|
|
20981
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tablelvl2Context.Provider, {
|
|
20982
|
+
value: tablelvl2$1,
|
|
20983
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableBodyRoot, {
|
|
20984
|
+
className: clsx(classes.root, className),
|
|
20985
|
+
as: component,
|
|
20986
|
+
ref,
|
|
20987
|
+
role: component === defaultComponent$2 ? null : "rowgroup",
|
|
20988
|
+
ownerState,
|
|
20989
|
+
...other
|
|
20990
|
+
})
|
|
20991
|
+
});
|
|
20992
|
+
});
|
|
20993
|
+
process.env.NODE_ENV !== "production" ? TableBody.propTypes = {
|
|
20994
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
20995
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
20996
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
20997
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
20998
|
+
/**
|
|
20999
|
+
* The content of the component, normally `TableRow`.
|
|
21000
|
+
*/
|
|
21001
|
+
children: PropTypes.node,
|
|
21002
|
+
/**
|
|
21003
|
+
* Override or extend the styles applied to the component.
|
|
21004
|
+
*/
|
|
21005
|
+
classes: PropTypes.object,
|
|
21006
|
+
/**
|
|
21007
|
+
* @ignore
|
|
21008
|
+
*/
|
|
21009
|
+
className: PropTypes.string,
|
|
21010
|
+
/**
|
|
21011
|
+
* The component used for the root node.
|
|
21012
|
+
* Either a string to use a HTML element or a component.
|
|
21013
|
+
*/
|
|
21014
|
+
component: PropTypes.elementType,
|
|
21015
|
+
/**
|
|
21016
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21017
|
+
*/
|
|
21018
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21019
|
+
} : void 0;
|
|
21020
|
+
function getTableCellUtilityClass(slot) {
|
|
21021
|
+
return generateUtilityClass("MuiTableCell", slot);
|
|
21022
|
+
}
|
|
21023
|
+
const tableCellClasses = generateUtilityClasses("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]);
|
|
21024
|
+
const useUtilityClasses$6 = (ownerState) => {
|
|
21025
|
+
const {
|
|
21026
|
+
classes,
|
|
21027
|
+
variant,
|
|
21028
|
+
align,
|
|
21029
|
+
padding: padding2,
|
|
21030
|
+
size,
|
|
21031
|
+
stickyHeader
|
|
21032
|
+
} = ownerState;
|
|
21033
|
+
const slots = {
|
|
21034
|
+
root: ["root", variant, stickyHeader && "stickyHeader", align !== "inherit" && `align${capitalize(align)}`, padding2 !== "normal" && `padding${capitalize(padding2)}`, `size${capitalize(size)}`]
|
|
21035
|
+
};
|
|
21036
|
+
return composeClasses(slots, getTableCellUtilityClass, classes);
|
|
21037
|
+
};
|
|
21038
|
+
const TableCellRoot = styled("td", {
|
|
21039
|
+
name: "MuiTableCell",
|
|
21040
|
+
slot: "Root",
|
|
21041
|
+
overridesResolver: (props, styles2) => {
|
|
21042
|
+
const {
|
|
21043
|
+
ownerState
|
|
21044
|
+
} = props;
|
|
21045
|
+
return [styles2.root, styles2[ownerState.variant], styles2[`size${capitalize(ownerState.size)}`], ownerState.padding !== "normal" && styles2[`padding${capitalize(ownerState.padding)}`], ownerState.align !== "inherit" && styles2[`align${capitalize(ownerState.align)}`], ownerState.stickyHeader && styles2.stickyHeader];
|
|
21046
|
+
}
|
|
21047
|
+
})(memoTheme(({
|
|
21048
|
+
theme
|
|
21049
|
+
}) => ({
|
|
21050
|
+
...theme.typography.body2,
|
|
21051
|
+
display: "table-cell",
|
|
21052
|
+
verticalAlign: "inherit",
|
|
21053
|
+
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
21054
|
+
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
21055
|
+
borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
|
|
21056
|
+
${theme.palette.mode === "light" ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)}`,
|
|
21057
|
+
textAlign: "left",
|
|
21058
|
+
padding: 16,
|
|
21059
|
+
variants: [{
|
|
21060
|
+
props: {
|
|
21061
|
+
variant: "head"
|
|
21062
|
+
},
|
|
21063
|
+
style: {
|
|
21064
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
21065
|
+
lineHeight: theme.typography.pxToRem(24),
|
|
21066
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
21067
|
+
}
|
|
21068
|
+
}, {
|
|
21069
|
+
props: {
|
|
21070
|
+
variant: "body"
|
|
21071
|
+
},
|
|
21072
|
+
style: {
|
|
21073
|
+
color: (theme.vars || theme).palette.text.primary
|
|
21074
|
+
}
|
|
21075
|
+
}, {
|
|
21076
|
+
props: {
|
|
21077
|
+
variant: "footer"
|
|
21078
|
+
},
|
|
21079
|
+
style: {
|
|
21080
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
21081
|
+
lineHeight: theme.typography.pxToRem(21),
|
|
21082
|
+
fontSize: theme.typography.pxToRem(12)
|
|
21083
|
+
}
|
|
21084
|
+
}, {
|
|
21085
|
+
props: {
|
|
21086
|
+
size: "small"
|
|
21087
|
+
},
|
|
21088
|
+
style: {
|
|
21089
|
+
padding: "6px 16px",
|
|
21090
|
+
[`&.${tableCellClasses.paddingCheckbox}`]: {
|
|
21091
|
+
width: 24,
|
|
21092
|
+
// prevent the checkbox column from growing
|
|
21093
|
+
padding: "0 12px 0 16px",
|
|
21094
|
+
"& > *": {
|
|
21095
|
+
padding: 0
|
|
21096
|
+
}
|
|
21097
|
+
}
|
|
21098
|
+
}
|
|
21099
|
+
}, {
|
|
21100
|
+
props: {
|
|
21101
|
+
padding: "checkbox"
|
|
21102
|
+
},
|
|
21103
|
+
style: {
|
|
21104
|
+
width: 48,
|
|
21105
|
+
// prevent the checkbox column from growing
|
|
21106
|
+
padding: "0 0 0 4px"
|
|
21107
|
+
}
|
|
21108
|
+
}, {
|
|
21109
|
+
props: {
|
|
21110
|
+
padding: "none"
|
|
21111
|
+
},
|
|
21112
|
+
style: {
|
|
21113
|
+
padding: 0
|
|
21114
|
+
}
|
|
21115
|
+
}, {
|
|
21116
|
+
props: {
|
|
21117
|
+
align: "left"
|
|
21118
|
+
},
|
|
21119
|
+
style: {
|
|
21120
|
+
textAlign: "left"
|
|
21121
|
+
}
|
|
21122
|
+
}, {
|
|
21123
|
+
props: {
|
|
21124
|
+
align: "center"
|
|
21125
|
+
},
|
|
21126
|
+
style: {
|
|
21127
|
+
textAlign: "center"
|
|
21128
|
+
}
|
|
21129
|
+
}, {
|
|
21130
|
+
props: {
|
|
21131
|
+
align: "right"
|
|
21132
|
+
},
|
|
21133
|
+
style: {
|
|
21134
|
+
textAlign: "right",
|
|
21135
|
+
flexDirection: "row-reverse"
|
|
21136
|
+
}
|
|
21137
|
+
}, {
|
|
21138
|
+
props: {
|
|
21139
|
+
align: "justify"
|
|
21140
|
+
},
|
|
21141
|
+
style: {
|
|
21142
|
+
textAlign: "justify"
|
|
21143
|
+
}
|
|
21144
|
+
}, {
|
|
21145
|
+
props: ({
|
|
21146
|
+
ownerState
|
|
21147
|
+
}) => ownerState.stickyHeader,
|
|
21148
|
+
style: {
|
|
21149
|
+
position: "sticky",
|
|
21150
|
+
top: 0,
|
|
21151
|
+
zIndex: 2,
|
|
21152
|
+
backgroundColor: (theme.vars || theme).palette.background.default
|
|
21153
|
+
}
|
|
21154
|
+
}]
|
|
21155
|
+
})));
|
|
21156
|
+
const TableCell = /* @__PURE__ */ React__namespace.forwardRef(function TableCell2(inProps, ref) {
|
|
21157
|
+
const props = useDefaultProps({
|
|
21158
|
+
props: inProps,
|
|
21159
|
+
name: "MuiTableCell"
|
|
21160
|
+
});
|
|
21161
|
+
const {
|
|
21162
|
+
align = "inherit",
|
|
21163
|
+
className,
|
|
21164
|
+
component: componentProp,
|
|
21165
|
+
padding: paddingProp,
|
|
21166
|
+
scope: scopeProp,
|
|
21167
|
+
size: sizeProp,
|
|
21168
|
+
sortDirection,
|
|
21169
|
+
variant: variantProp,
|
|
21170
|
+
...other
|
|
21171
|
+
} = props;
|
|
21172
|
+
const table = React__namespace.useContext(TableContext);
|
|
21173
|
+
const tablelvl22 = React__namespace.useContext(Tablelvl2Context);
|
|
21174
|
+
const isHeadCell = tablelvl22 && tablelvl22.variant === "head";
|
|
21175
|
+
let component;
|
|
21176
|
+
if (componentProp) {
|
|
21177
|
+
component = componentProp;
|
|
21178
|
+
} else {
|
|
21179
|
+
component = isHeadCell ? "th" : "td";
|
|
21180
|
+
}
|
|
21181
|
+
let scope = scopeProp;
|
|
21182
|
+
if (component === "td") {
|
|
21183
|
+
scope = void 0;
|
|
21184
|
+
} else if (!scope && isHeadCell) {
|
|
21185
|
+
scope = "col";
|
|
21186
|
+
}
|
|
21187
|
+
const variant = variantProp || tablelvl22 && tablelvl22.variant;
|
|
21188
|
+
const ownerState = {
|
|
21189
|
+
...props,
|
|
21190
|
+
align,
|
|
21191
|
+
component,
|
|
21192
|
+
padding: paddingProp || (table && table.padding ? table.padding : "normal"),
|
|
21193
|
+
size: sizeProp || (table && table.size ? table.size : "medium"),
|
|
21194
|
+
sortDirection,
|
|
21195
|
+
stickyHeader: variant === "head" && table && table.stickyHeader,
|
|
21196
|
+
variant
|
|
21197
|
+
};
|
|
21198
|
+
const classes = useUtilityClasses$6(ownerState);
|
|
21199
|
+
let ariaSort = null;
|
|
21200
|
+
if (sortDirection) {
|
|
21201
|
+
ariaSort = sortDirection === "asc" ? "ascending" : "descending";
|
|
21202
|
+
}
|
|
21203
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableCellRoot, {
|
|
21204
|
+
as: component,
|
|
21205
|
+
ref,
|
|
21206
|
+
className: clsx(classes.root, className),
|
|
21207
|
+
"aria-sort": ariaSort,
|
|
21208
|
+
scope,
|
|
21209
|
+
ownerState,
|
|
21210
|
+
...other
|
|
21211
|
+
});
|
|
21212
|
+
});
|
|
21213
|
+
process.env.NODE_ENV !== "production" ? TableCell.propTypes = {
|
|
21214
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21215
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21216
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21217
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21218
|
+
/**
|
|
21219
|
+
* Set the text-align on the table cell content.
|
|
21220
|
+
*
|
|
21221
|
+
* Monetary or generally number fields **should be right aligned** as that allows
|
|
21222
|
+
* you to add them up quickly in your head without having to worry about decimals.
|
|
21223
|
+
* @default 'inherit'
|
|
21224
|
+
*/
|
|
21225
|
+
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
21226
|
+
/**
|
|
21227
|
+
* The content of the component.
|
|
21228
|
+
*/
|
|
21229
|
+
children: PropTypes.node,
|
|
21230
|
+
/**
|
|
21231
|
+
* Override or extend the styles applied to the component.
|
|
21232
|
+
*/
|
|
21233
|
+
classes: PropTypes.object,
|
|
21234
|
+
/**
|
|
21235
|
+
* @ignore
|
|
21236
|
+
*/
|
|
21237
|
+
className: PropTypes.string,
|
|
21238
|
+
/**
|
|
21239
|
+
* The component used for the root node.
|
|
21240
|
+
* Either a string to use a HTML element or a component.
|
|
21241
|
+
*/
|
|
21242
|
+
component: PropTypes.elementType,
|
|
21243
|
+
/**
|
|
21244
|
+
* Sets the padding applied to the cell.
|
|
21245
|
+
* The prop defaults to the value (`'default'`) inherited from the parent Table component.
|
|
21246
|
+
*/
|
|
21247
|
+
padding: PropTypes.oneOf(["checkbox", "none", "normal"]),
|
|
21248
|
+
/**
|
|
21249
|
+
* Set scope attribute.
|
|
21250
|
+
*/
|
|
21251
|
+
scope: PropTypes.string,
|
|
21252
|
+
/**
|
|
21253
|
+
* Specify the size of the cell.
|
|
21254
|
+
* The prop defaults to the value (`'medium'`) inherited from the parent Table component.
|
|
21255
|
+
*/
|
|
21256
|
+
size: PropTypes.oneOfType([PropTypes.oneOf(["medium", "small"]), PropTypes.string]),
|
|
21257
|
+
/**
|
|
21258
|
+
* Set aria-sort direction.
|
|
21259
|
+
*/
|
|
21260
|
+
sortDirection: PropTypes.oneOf(["asc", "desc", false]),
|
|
21261
|
+
/**
|
|
21262
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21263
|
+
*/
|
|
21264
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
21265
|
+
/**
|
|
21266
|
+
* Specify the cell type.
|
|
21267
|
+
* The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.
|
|
21268
|
+
*/
|
|
21269
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["body", "footer", "head"]), PropTypes.string])
|
|
21270
|
+
} : void 0;
|
|
21271
|
+
function getTableContainerUtilityClass(slot) {
|
|
21272
|
+
return generateUtilityClass("MuiTableContainer", slot);
|
|
21273
|
+
}
|
|
21274
|
+
generateUtilityClasses("MuiTableContainer", ["root"]);
|
|
21275
|
+
const useUtilityClasses$5 = (ownerState) => {
|
|
21276
|
+
const {
|
|
21277
|
+
classes
|
|
21278
|
+
} = ownerState;
|
|
21279
|
+
const slots = {
|
|
21280
|
+
root: ["root"]
|
|
21281
|
+
};
|
|
21282
|
+
return composeClasses(slots, getTableContainerUtilityClass, classes);
|
|
21283
|
+
};
|
|
21284
|
+
const TableContainerRoot = styled("div", {
|
|
21285
|
+
name: "MuiTableContainer",
|
|
21286
|
+
slot: "Root"
|
|
21287
|
+
})({
|
|
21288
|
+
width: "100%",
|
|
21289
|
+
overflowX: "auto"
|
|
21290
|
+
});
|
|
21291
|
+
const TableContainer = /* @__PURE__ */ React__namespace.forwardRef(function TableContainer2(inProps, ref) {
|
|
21292
|
+
const props = useDefaultProps({
|
|
21293
|
+
props: inProps,
|
|
21294
|
+
name: "MuiTableContainer"
|
|
21295
|
+
});
|
|
21296
|
+
const {
|
|
21297
|
+
className,
|
|
21298
|
+
component = "div",
|
|
21299
|
+
...other
|
|
21300
|
+
} = props;
|
|
21301
|
+
const ownerState = {
|
|
21302
|
+
...props,
|
|
21303
|
+
component
|
|
21304
|
+
};
|
|
21305
|
+
const classes = useUtilityClasses$5(ownerState);
|
|
21306
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableContainerRoot, {
|
|
21307
|
+
ref,
|
|
21308
|
+
as: component,
|
|
21309
|
+
className: clsx(classes.root, className),
|
|
21310
|
+
ownerState,
|
|
21311
|
+
...other
|
|
21312
|
+
});
|
|
21313
|
+
});
|
|
21314
|
+
process.env.NODE_ENV !== "production" ? TableContainer.propTypes = {
|
|
21315
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21316
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21317
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21318
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21319
|
+
/**
|
|
21320
|
+
* The content of the component, normally `Table`.
|
|
21321
|
+
*/
|
|
21322
|
+
children: PropTypes.node,
|
|
21323
|
+
/**
|
|
21324
|
+
* Override or extend the styles applied to the component.
|
|
21325
|
+
*/
|
|
21326
|
+
classes: PropTypes.object,
|
|
21327
|
+
/**
|
|
21328
|
+
* @ignore
|
|
21329
|
+
*/
|
|
21330
|
+
className: PropTypes.string,
|
|
21331
|
+
/**
|
|
21332
|
+
* The component used for the root node.
|
|
21333
|
+
* Either a string to use a HTML element or a component.
|
|
21334
|
+
*/
|
|
21335
|
+
component: PropTypes.elementType,
|
|
21336
|
+
/**
|
|
21337
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21338
|
+
*/
|
|
21339
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21340
|
+
} : void 0;
|
|
21341
|
+
function getTableHeadUtilityClass(slot) {
|
|
21342
|
+
return generateUtilityClass("MuiTableHead", slot);
|
|
21343
|
+
}
|
|
21344
|
+
generateUtilityClasses("MuiTableHead", ["root"]);
|
|
21345
|
+
const useUtilityClasses$4 = (ownerState) => {
|
|
21346
|
+
const {
|
|
21347
|
+
classes
|
|
21348
|
+
} = ownerState;
|
|
21349
|
+
const slots = {
|
|
21350
|
+
root: ["root"]
|
|
21351
|
+
};
|
|
21352
|
+
return composeClasses(slots, getTableHeadUtilityClass, classes);
|
|
21353
|
+
};
|
|
21354
|
+
const TableHeadRoot = styled("thead", {
|
|
21355
|
+
name: "MuiTableHead",
|
|
21356
|
+
slot: "Root"
|
|
21357
|
+
})({
|
|
21358
|
+
display: "table-header-group"
|
|
21359
|
+
});
|
|
21360
|
+
const tablelvl2 = {
|
|
21361
|
+
variant: "head"
|
|
21362
|
+
};
|
|
21363
|
+
const defaultComponent$1 = "thead";
|
|
21364
|
+
const TableHead = /* @__PURE__ */ React__namespace.forwardRef(function TableHead2(inProps, ref) {
|
|
21365
|
+
const props = useDefaultProps({
|
|
21366
|
+
props: inProps,
|
|
21367
|
+
name: "MuiTableHead"
|
|
21368
|
+
});
|
|
21369
|
+
const {
|
|
21370
|
+
className,
|
|
21371
|
+
component = defaultComponent$1,
|
|
21372
|
+
...other
|
|
21373
|
+
} = props;
|
|
21374
|
+
const ownerState = {
|
|
21375
|
+
...props,
|
|
21376
|
+
component
|
|
21377
|
+
};
|
|
21378
|
+
const classes = useUtilityClasses$4(ownerState);
|
|
21379
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tablelvl2Context.Provider, {
|
|
21380
|
+
value: tablelvl2,
|
|
21381
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableHeadRoot, {
|
|
21382
|
+
as: component,
|
|
21383
|
+
className: clsx(classes.root, className),
|
|
21384
|
+
ref,
|
|
21385
|
+
role: component === defaultComponent$1 ? null : "rowgroup",
|
|
21386
|
+
ownerState,
|
|
21387
|
+
...other
|
|
21388
|
+
})
|
|
21389
|
+
});
|
|
21390
|
+
});
|
|
21391
|
+
process.env.NODE_ENV !== "production" ? TableHead.propTypes = {
|
|
21392
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21393
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21394
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21395
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21396
|
+
/**
|
|
21397
|
+
* The content of the component, normally `TableRow`.
|
|
21398
|
+
*/
|
|
21399
|
+
children: PropTypes.node,
|
|
21400
|
+
/**
|
|
21401
|
+
* Override or extend the styles applied to the component.
|
|
21402
|
+
*/
|
|
21403
|
+
classes: PropTypes.object,
|
|
21404
|
+
/**
|
|
21405
|
+
* @ignore
|
|
21406
|
+
*/
|
|
21407
|
+
className: PropTypes.string,
|
|
21408
|
+
/**
|
|
21409
|
+
* The component used for the root node.
|
|
21410
|
+
* Either a string to use a HTML element or a component.
|
|
21411
|
+
*/
|
|
21412
|
+
component: PropTypes.elementType,
|
|
21413
|
+
/**
|
|
21414
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21415
|
+
*/
|
|
21416
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21417
|
+
} : void 0;
|
|
21418
|
+
const KeyboardArrowLeft = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
21419
|
+
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
21420
|
+
}), "KeyboardArrowLeft");
|
|
21421
|
+
const KeyboardArrowRight = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
21422
|
+
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
21423
|
+
}), "KeyboardArrowRight");
|
|
21424
|
+
function getTableRowUtilityClass(slot) {
|
|
21425
|
+
return generateUtilityClass("MuiTableRow", slot);
|
|
21426
|
+
}
|
|
21427
|
+
const tableRowClasses = generateUtilityClasses("MuiTableRow", ["root", "selected", "hover", "head", "footer"]);
|
|
21428
|
+
const useUtilityClasses$3 = (ownerState) => {
|
|
21429
|
+
const {
|
|
21430
|
+
classes,
|
|
21431
|
+
selected,
|
|
21432
|
+
hover,
|
|
21433
|
+
head,
|
|
21434
|
+
footer
|
|
21435
|
+
} = ownerState;
|
|
21436
|
+
const slots = {
|
|
21437
|
+
root: ["root", selected && "selected", hover && "hover", head && "head", footer && "footer"]
|
|
21438
|
+
};
|
|
21439
|
+
return composeClasses(slots, getTableRowUtilityClass, classes);
|
|
21440
|
+
};
|
|
21441
|
+
const TableRowRoot = styled("tr", {
|
|
21442
|
+
name: "MuiTableRow",
|
|
21443
|
+
slot: "Root",
|
|
21444
|
+
overridesResolver: (props, styles2) => {
|
|
21445
|
+
const {
|
|
21446
|
+
ownerState
|
|
21447
|
+
} = props;
|
|
21448
|
+
return [styles2.root, ownerState.head && styles2.head, ownerState.footer && styles2.footer];
|
|
21449
|
+
}
|
|
21450
|
+
})(memoTheme(({
|
|
21451
|
+
theme
|
|
21452
|
+
}) => ({
|
|
21453
|
+
color: "inherit",
|
|
21454
|
+
display: "table-row",
|
|
21455
|
+
verticalAlign: "middle",
|
|
21456
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
21457
|
+
outline: 0,
|
|
21458
|
+
[`&.${tableRowClasses.hover}:hover`]: {
|
|
21459
|
+
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
21460
|
+
},
|
|
21461
|
+
[`&.${tableRowClasses.selected}`]: {
|
|
21462
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
|
21463
|
+
"&:hover": {
|
|
21464
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
21465
|
+
}
|
|
21466
|
+
}
|
|
21467
|
+
})));
|
|
21468
|
+
const defaultComponent = "tr";
|
|
21469
|
+
const TableRow = /* @__PURE__ */ React__namespace.forwardRef(function TableRow2(inProps, ref) {
|
|
21470
|
+
const props = useDefaultProps({
|
|
21471
|
+
props: inProps,
|
|
21472
|
+
name: "MuiTableRow"
|
|
21473
|
+
});
|
|
21474
|
+
const {
|
|
21475
|
+
className,
|
|
21476
|
+
component = defaultComponent,
|
|
21477
|
+
hover = false,
|
|
21478
|
+
selected = false,
|
|
21479
|
+
...other
|
|
21480
|
+
} = props;
|
|
21481
|
+
const tablelvl22 = React__namespace.useContext(Tablelvl2Context);
|
|
21482
|
+
const ownerState = {
|
|
21483
|
+
...props,
|
|
21484
|
+
component,
|
|
21485
|
+
hover,
|
|
21486
|
+
selected,
|
|
21487
|
+
head: tablelvl22 && tablelvl22.variant === "head",
|
|
21488
|
+
footer: tablelvl22 && tablelvl22.variant === "footer"
|
|
21489
|
+
};
|
|
21490
|
+
const classes = useUtilityClasses$3(ownerState);
|
|
21491
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableRowRoot, {
|
|
21492
|
+
as: component,
|
|
21493
|
+
ref,
|
|
21494
|
+
className: clsx(classes.root, className),
|
|
21495
|
+
role: component === defaultComponent ? null : "row",
|
|
21496
|
+
ownerState,
|
|
21497
|
+
...other
|
|
21498
|
+
});
|
|
21499
|
+
});
|
|
21500
|
+
process.env.NODE_ENV !== "production" ? TableRow.propTypes = {
|
|
21501
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
21502
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
21503
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
21504
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
21505
|
+
/**
|
|
21506
|
+
* Should be valid `<tr>` children such as `TableCell`.
|
|
21507
|
+
*/
|
|
21508
|
+
children: PropTypes.node,
|
|
21509
|
+
/**
|
|
21510
|
+
* Override or extend the styles applied to the component.
|
|
21511
|
+
*/
|
|
21512
|
+
classes: PropTypes.object,
|
|
21513
|
+
/**
|
|
21514
|
+
* @ignore
|
|
21515
|
+
*/
|
|
21516
|
+
className: PropTypes.string,
|
|
21517
|
+
/**
|
|
21518
|
+
* The component used for the root node.
|
|
21519
|
+
* Either a string to use a HTML element or a component.
|
|
21520
|
+
*/
|
|
21521
|
+
component: PropTypes.elementType,
|
|
21522
|
+
/**
|
|
21523
|
+
* If `true`, the table row will shade on hover.
|
|
21524
|
+
* @default false
|
|
21525
|
+
*/
|
|
21526
|
+
hover: PropTypes.bool,
|
|
21527
|
+
/**
|
|
21528
|
+
* If `true`, the table row will have the selected shading.
|
|
21529
|
+
* @default false
|
|
21530
|
+
*/
|
|
21531
|
+
selected: PropTypes.bool,
|
|
21532
|
+
/**
|
|
21533
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
21534
|
+
*/
|
|
21535
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
21536
|
+
} : void 0;
|
|
21537
|
+
function easeInOutSin(time) {
|
|
21538
|
+
return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;
|
|
21539
|
+
}
|
|
21540
|
+
function animate(property, element, to, options2 = {}, cb = () => {
|
|
21541
|
+
}) {
|
|
21542
|
+
const {
|
|
21543
|
+
ease = easeInOutSin,
|
|
21544
|
+
duration: duration2 = 300
|
|
21545
|
+
// standard
|
|
21546
|
+
} = options2;
|
|
21547
|
+
let start2 = null;
|
|
21548
|
+
const from = element[property];
|
|
21549
|
+
let cancelled = false;
|
|
21550
|
+
const cancel = () => {
|
|
21551
|
+
cancelled = true;
|
|
21552
|
+
};
|
|
21553
|
+
const step = (timestamp) => {
|
|
21554
|
+
if (cancelled) {
|
|
21555
|
+
cb(new Error("Animation cancelled"));
|
|
21556
|
+
return;
|
|
21557
|
+
}
|
|
21558
|
+
if (start2 === null) {
|
|
21559
|
+
start2 = timestamp;
|
|
21560
|
+
}
|
|
21561
|
+
const time = Math.min(1, (timestamp - start2) / duration2);
|
|
21562
|
+
element[property] = ease(time) * (to - from) + from;
|
|
21563
|
+
if (time >= 1) {
|
|
21564
|
+
requestAnimationFrame(() => {
|
|
21565
|
+
cb(null);
|
|
21566
|
+
});
|
|
21567
|
+
return;
|
|
21568
|
+
}
|
|
21569
|
+
requestAnimationFrame(step);
|
|
21570
|
+
};
|
|
21571
|
+
if (from === to) {
|
|
21572
|
+
cb(new Error("Element already at target position"));
|
|
21573
|
+
return cancel;
|
|
21574
|
+
}
|
|
21575
|
+
requestAnimationFrame(step);
|
|
21576
|
+
return cancel;
|
|
21577
|
+
}
|
|
21578
|
+
const styles = {
|
|
21579
|
+
width: 99,
|
|
21580
|
+
height: 99,
|
|
21581
|
+
position: "absolute",
|
|
21582
|
+
top: -9999,
|
|
21583
|
+
overflow: "scroll"
|
|
21584
|
+
};
|
|
21585
|
+
function ScrollbarSize(props) {
|
|
21586
|
+
const {
|
|
21587
|
+
onChange,
|
|
21588
|
+
...other
|
|
21589
|
+
} = props;
|
|
21590
|
+
const scrollbarHeight = React__namespace.useRef();
|
|
21591
|
+
const nodeRef = React__namespace.useRef(null);
|
|
21592
|
+
const setMeasurements = () => {
|
|
21593
|
+
scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
|
|
21594
|
+
};
|
|
21595
|
+
useEnhancedEffect(() => {
|
|
21596
|
+
const handleResize = debounce$1(() => {
|
|
21597
|
+
const prevHeight = scrollbarHeight.current;
|
|
21598
|
+
setMeasurements();
|
|
21599
|
+
if (prevHeight !== scrollbarHeight.current) {
|
|
21600
|
+
onChange(scrollbarHeight.current);
|
|
21601
|
+
}
|
|
21602
|
+
});
|
|
21603
|
+
const containerWindow = ownerWindow$1(nodeRef.current);
|
|
21604
|
+
containerWindow.addEventListener("resize", handleResize);
|
|
21605
|
+
return () => {
|
|
21606
|
+
handleResize.clear();
|
|
21607
|
+
containerWindow.removeEventListener("resize", handleResize);
|
|
21608
|
+
};
|
|
21609
|
+
}, [onChange]);
|
|
21610
|
+
React__namespace.useEffect(() => {
|
|
21611
|
+
setMeasurements();
|
|
21612
|
+
onChange(scrollbarHeight.current);
|
|
21613
|
+
}, [onChange]);
|
|
21614
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
21615
|
+
style: styles,
|
|
21616
|
+
...other,
|
|
21617
|
+
ref: nodeRef
|
|
21618
|
+
});
|
|
21619
|
+
}
|
|
21620
|
+
process.env.NODE_ENV !== "production" ? ScrollbarSize.propTypes = {
|
|
21621
|
+
onChange: PropTypes.func.isRequired
|
|
21622
|
+
} : void 0;
|
|
21623
|
+
function getTabScrollButtonUtilityClass(slot) {
|
|
21624
|
+
return generateUtilityClass("MuiTabScrollButton", slot);
|
|
21625
|
+
}
|
|
21626
|
+
const tabScrollButtonClasses = generateUtilityClasses("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]);
|
|
21627
|
+
const useUtilityClasses$2 = (ownerState) => {
|
|
21628
|
+
const {
|
|
21629
|
+
classes,
|
|
21630
|
+
orientation,
|
|
21631
|
+
disabled
|
|
21632
|
+
} = ownerState;
|
|
21633
|
+
const slots = {
|
|
21634
|
+
root: ["root", orientation, disabled && "disabled"]
|
|
21635
|
+
};
|
|
21636
|
+
return composeClasses(slots, getTabScrollButtonUtilityClass, classes);
|
|
21637
|
+
};
|
|
21638
|
+
const TabScrollButtonRoot = styled(ButtonBase, {
|
|
21639
|
+
name: "MuiTabScrollButton",
|
|
21640
|
+
slot: "Root",
|
|
21641
|
+
overridesResolver: (props, styles2) => {
|
|
21642
|
+
const {
|
|
21643
|
+
ownerState
|
|
21644
|
+
} = props;
|
|
21645
|
+
return [styles2.root, ownerState.orientation && styles2[ownerState.orientation]];
|
|
21646
|
+
}
|
|
21647
|
+
})({
|
|
21648
|
+
width: 40,
|
|
21649
|
+
flexShrink: 0,
|
|
21650
|
+
opacity: 0.8,
|
|
21651
|
+
[`&.${tabScrollButtonClasses.disabled}`]: {
|
|
21652
|
+
opacity: 0
|
|
21653
|
+
},
|
|
21654
|
+
variants: [{
|
|
21655
|
+
props: {
|
|
21656
|
+
orientation: "vertical"
|
|
21657
|
+
},
|
|
21658
|
+
style: {
|
|
21659
|
+
width: "100%",
|
|
21660
|
+
height: 40,
|
|
21661
|
+
"& svg": {
|
|
21662
|
+
transform: "var(--TabScrollButton-svgRotate)"
|
|
21663
|
+
}
|
|
21664
|
+
}
|
|
21665
|
+
}]
|
|
21666
|
+
});
|
|
21667
|
+
const TabScrollButton = /* @__PURE__ */ React__namespace.forwardRef(function TabScrollButton2(inProps, ref) {
|
|
21668
|
+
const props = useDefaultProps({
|
|
21669
|
+
props: inProps,
|
|
21670
|
+
name: "MuiTabScrollButton"
|
|
21671
|
+
});
|
|
21672
|
+
const {
|
|
21673
|
+
className,
|
|
21674
|
+
slots = {},
|
|
21675
|
+
slotProps = {},
|
|
21676
|
+
direction,
|
|
21677
|
+
orientation,
|
|
21678
|
+
disabled,
|
|
21679
|
+
...other
|
|
21680
|
+
} = props;
|
|
21681
|
+
const isRtl = useRtl();
|
|
21682
|
+
const ownerState = {
|
|
21683
|
+
isRtl,
|
|
21684
|
+
...props
|
|
21685
|
+
};
|
|
21686
|
+
const classes = useUtilityClasses$2(ownerState);
|
|
21687
|
+
const StartButtonIcon = slots.StartScrollButtonIcon ?? KeyboardArrowLeft;
|
|
21688
|
+
const EndButtonIcon = slots.EndScrollButtonIcon ?? KeyboardArrowRight;
|
|
21689
|
+
const startButtonIconProps = useSlotProps({
|
|
21690
|
+
elementType: StartButtonIcon,
|
|
21691
|
+
externalSlotProps: slotProps.startScrollButtonIcon,
|
|
21692
|
+
additionalProps: {
|
|
21693
|
+
fontSize: "small"
|
|
21694
|
+
},
|
|
21695
|
+
ownerState
|
|
21696
|
+
});
|
|
21697
|
+
const endButtonIconProps = useSlotProps({
|
|
21698
|
+
elementType: EndButtonIcon,
|
|
20976
21699
|
externalSlotProps: slotProps.endScrollButtonIcon,
|
|
20977
21700
|
additionalProps: {
|
|
20978
21701
|
fontSize: "small"
|
|
@@ -22463,7 +23186,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
22463
23186
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22464
23187
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
22465
23188
|
}, []);
|
|
22466
|
-
const
|
|
23189
|
+
const normalizeOptions2 = (opts) => opts.map((opt) => {
|
|
22467
23190
|
if (typeof opt === "string") return { label: opt, value: opt };
|
|
22468
23191
|
return {
|
|
22469
23192
|
label: opt[optionLabelKey],
|
|
@@ -22473,29 +23196,47 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
22473
23196
|
const handleInputChange = (e) => {
|
|
22474
23197
|
const val = e.target.value;
|
|
22475
23198
|
setInputValue(val);
|
|
22476
|
-
|
|
22477
|
-
|
|
22478
|
-
|
|
22479
|
-
|
|
22480
|
-
|
|
22481
|
-
|
|
22482
|
-
|
|
22483
|
-
|
|
22484
|
-
|
|
22485
|
-
|
|
22486
|
-
);
|
|
22487
|
-
setFilteredOptions(filtered);
|
|
22488
|
-
setShowDropdown(true);
|
|
22489
|
-
setHighlightIndex(-1);
|
|
22490
|
-
}
|
|
23199
|
+
const normalized = normalizeOptions2(options2);
|
|
23200
|
+
const filtered = normalized.filter(
|
|
23201
|
+
(opt) => {
|
|
23202
|
+
var _a;
|
|
23203
|
+
return (_a = opt.label) == null ? void 0 : _a.toLowerCase().includes(val.toLowerCase());
|
|
23204
|
+
}
|
|
23205
|
+
);
|
|
23206
|
+
setFilteredOptions(filtered);
|
|
23207
|
+
setShowDropdown(true);
|
|
23208
|
+
setHighlightIndex(-1);
|
|
22491
23209
|
};
|
|
22492
23210
|
const handleSelect = (val, label2) => {
|
|
22493
23211
|
setInputValue(label2);
|
|
22494
|
-
|
|
23212
|
+
onChange(name, val);
|
|
23213
|
+
setShowDropdown(false);
|
|
23214
|
+
setHighlightIndex(-1);
|
|
23215
|
+
};
|
|
23216
|
+
const handleBlur = () => {
|
|
23217
|
+
const val = inputValue.trim();
|
|
23218
|
+
const normalized = normalizeOptions2(options2);
|
|
23219
|
+
const matchedOption = normalized.find(
|
|
23220
|
+
(opt) => opt.label.toLowerCase() === val.toLowerCase()
|
|
23221
|
+
);
|
|
23222
|
+
if (matchedOption) {
|
|
23223
|
+
setInputValue(matchedOption.label);
|
|
23224
|
+
onChange(name, matchedOption.value);
|
|
23225
|
+
} else if (mode === "both") {
|
|
22495
23226
|
onChange(name, val);
|
|
23227
|
+
} else if (mode === "type") {
|
|
23228
|
+
onChange(name, val);
|
|
23229
|
+
} else {
|
|
23230
|
+
const selected = normalized.find(
|
|
23231
|
+
(opt) => opt.value === value
|
|
23232
|
+
);
|
|
23233
|
+
if (selected) {
|
|
23234
|
+
setInputValue(selected.label);
|
|
23235
|
+
} else {
|
|
23236
|
+
setInputValue("");
|
|
23237
|
+
}
|
|
22496
23238
|
}
|
|
22497
23239
|
setShowDropdown(false);
|
|
22498
|
-
setHighlightIndex(-1);
|
|
22499
23240
|
};
|
|
22500
23241
|
const handleKeyDown = (e) => {
|
|
22501
23242
|
if (!showDropdown || filteredOptions.length === 0) return;
|
|
@@ -22522,7 +23263,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
22522
23263
|
const toggleDropdown = () => {
|
|
22523
23264
|
if (disabled) return;
|
|
22524
23265
|
if (!showDropdown && mode !== "type") {
|
|
22525
|
-
setFilteredOptions(
|
|
23266
|
+
setFilteredOptions(normalizeOptions2(options2));
|
|
22526
23267
|
}
|
|
22527
23268
|
setShowDropdown((prev) => {
|
|
22528
23269
|
var _a;
|
|
@@ -22547,15 +23288,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
22547
23288
|
name,
|
|
22548
23289
|
value: inputValue,
|
|
22549
23290
|
onChange: handleInputChange,
|
|
23291
|
+
onBlur: handleBlur,
|
|
22550
23292
|
onFocus: () => {
|
|
22551
23293
|
if (mode !== "type") {
|
|
22552
|
-
setFilteredOptions(
|
|
23294
|
+
setFilteredOptions(normalizeOptions2(options2));
|
|
22553
23295
|
setShowDropdown(true);
|
|
22554
23296
|
}
|
|
22555
23297
|
},
|
|
22556
23298
|
onClick: () => {
|
|
22557
23299
|
if (mode !== "type") {
|
|
22558
|
-
setFilteredOptions(
|
|
23300
|
+
setFilteredOptions(normalizeOptions2(options2));
|
|
22559
23301
|
setShowDropdown(true);
|
|
22560
23302
|
}
|
|
22561
23303
|
},
|
|
@@ -28535,6 +29277,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
28535
29277
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
28536
29278
|
const [amountInWords, setAmountInWords] = React.useState("");
|
|
28537
29279
|
const [enable, setEnable] = React.useState(true);
|
|
29280
|
+
React.useEffect(() => {
|
|
29281
|
+
if (value) {
|
|
29282
|
+
validate(value);
|
|
29283
|
+
}
|
|
29284
|
+
}, [value]);
|
|
28538
29285
|
console.log(enable);
|
|
28539
29286
|
const validate = (val) => {
|
|
28540
29287
|
const raw = category === "amount" ? removeCommas(val) : val;
|
|
@@ -28572,7 +29319,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
28572
29319
|
break;
|
|
28573
29320
|
}
|
|
28574
29321
|
case "mobile":
|
|
28575
|
-
if (val.length
|
|
29322
|
+
if (val.length < 12) return setError("Invalid mobile number");
|
|
28576
29323
|
if (val.length == 10) setEnable(true);
|
|
28577
29324
|
break;
|
|
28578
29325
|
case "aadhaar":
|
|
@@ -28758,7 +29505,6 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
28758
29505
|
const handleChange = (e) => {
|
|
28759
29506
|
let val;
|
|
28760
29507
|
if (category == "mobile") {
|
|
28761
|
-
alert(val.length);
|
|
28762
29508
|
console.log(e);
|
|
28763
29509
|
val = e;
|
|
28764
29510
|
validate(val);
|
|
@@ -30384,13 +31130,511 @@ To suppress this warning, you need to explicitly provide the \`palette.${key}Cha
|
|
|
30384
31130
|
))
|
|
30385
31131
|
}
|
|
30386
31132
|
) }),
|
|
30387
|
-
tabs.map((tab, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(CustomTabPanel, { value, index, className: "focus:outline-none !pl-0 !pb-0
|
|
31133
|
+
tabs.map((tab, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(CustomTabPanel, { value, index, className: "focus:outline-none !pr-0 !pt-0 !pl-0 !pb-0 sm:!pr-2 ", children: tab.content }, index))
|
|
30388
31134
|
] });
|
|
30389
31135
|
}
|
|
31136
|
+
const ArrowDropDownIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
|
|
31137
|
+
d: "m7 10 5 5 5-5z"
|
|
31138
|
+
}), "ArrowDropDown");
|
|
31139
|
+
const normalizeOptions = (options2, labelKey, valueKey) => {
|
|
31140
|
+
return options2.map((opt) => ({
|
|
31141
|
+
label: opt[labelKey],
|
|
31142
|
+
value: opt[valueKey],
|
|
31143
|
+
raw: opt
|
|
31144
|
+
}));
|
|
31145
|
+
};
|
|
31146
|
+
const PowerDropdown = ({
|
|
31147
|
+
label,
|
|
31148
|
+
options: options2 = [],
|
|
31149
|
+
value,
|
|
31150
|
+
onChange,
|
|
31151
|
+
optionLabelKey = "name",
|
|
31152
|
+
optionValueKey = "id",
|
|
31153
|
+
mode = "both",
|
|
31154
|
+
// select | type | both
|
|
31155
|
+
displayFormat = "list",
|
|
31156
|
+
// list | table
|
|
31157
|
+
placeholder = "Search or select...",
|
|
31158
|
+
allowNewValue = false,
|
|
31159
|
+
// tableHeaders = [],
|
|
31160
|
+
columnWidths = [],
|
|
31161
|
+
height: height2 = "40px",
|
|
31162
|
+
error,
|
|
31163
|
+
disabled,
|
|
31164
|
+
saveOptionTitle
|
|
31165
|
+
}) => {
|
|
31166
|
+
console.log("options", options2);
|
|
31167
|
+
console.log("columnWidths", columnWidths);
|
|
31168
|
+
const [inputVal, setInputVal] = React.useState("");
|
|
31169
|
+
console.log("inputVal", inputVal);
|
|
31170
|
+
const [dropdownOpen, setDropdownOpen] = React.useState(false);
|
|
31171
|
+
const [focusedIndex, setFocusedIndex] = React.useState(-1);
|
|
31172
|
+
const [suggestion, setSuggestion] = React.useState("");
|
|
31173
|
+
const [isInputFocused, setIsInputFocused] = React.useState(false);
|
|
31174
|
+
const [lastSelectedItem, setLastSelectedItem] = React.useState(null);
|
|
31175
|
+
const [localOptions, setLocalOptions] = React.useState(
|
|
31176
|
+
() => normalizeOptions(options2, optionLabelKey, optionValueKey)
|
|
31177
|
+
);
|
|
31178
|
+
const [showAddModal, setShowAddModal] = React.useState(false);
|
|
31179
|
+
const empDataFromDB = Object.keys(options2[0]).reduce((acc, curr) => {
|
|
31180
|
+
return { ...acc, [curr]: "" };
|
|
31181
|
+
}, {});
|
|
31182
|
+
const [newEmployee, setNewEmployee] = React.useState(empDataFromDB);
|
|
31183
|
+
console.log(newEmployee, "newEmployee");
|
|
31184
|
+
console.log("opt", empDataFromDB);
|
|
31185
|
+
const handleAddNewClick = (e) => {
|
|
31186
|
+
e.stopPropagation();
|
|
31187
|
+
console.log("from add Emp", inputVal);
|
|
31188
|
+
console.log("from add Emp labelKey", optionLabelKey, newEmployee);
|
|
31189
|
+
console.log(newEmployee, "newEmployee before");
|
|
31190
|
+
const restructuredEmp = Object.keys(newEmployee).reduce((acc, curr) => {
|
|
31191
|
+
const val = curr === optionLabelKey ? inputVal : "";
|
|
31192
|
+
return { ...acc, [curr]: val };
|
|
31193
|
+
});
|
|
31194
|
+
setNewEmployee(restructuredEmp);
|
|
31195
|
+
setShowAddModal(true);
|
|
31196
|
+
};
|
|
31197
|
+
const handleAddEmployeeSubmit = () => {
|
|
31198
|
+
const newOption = {
|
|
31199
|
+
label: newEmployee.name,
|
|
31200
|
+
value: newEmployee.id,
|
|
31201
|
+
raw: { ...newEmployee }
|
|
31202
|
+
};
|
|
31203
|
+
console.log([...localOptions, newOption]);
|
|
31204
|
+
setLocalOptions([...localOptions, newOption]);
|
|
31205
|
+
setDropdownOpen(false);
|
|
31206
|
+
setShowAddModal(false);
|
|
31207
|
+
};
|
|
31208
|
+
React.useRef(null);
|
|
31209
|
+
const dropdownRef = React.useRef(null);
|
|
31210
|
+
const normalizedOptions = React.useMemo(
|
|
31211
|
+
() => normalizeOptions(options2, optionLabelKey, optionValueKey),
|
|
31212
|
+
[options2, optionLabelKey, optionValueKey]
|
|
31213
|
+
);
|
|
31214
|
+
const filteredOptions = React.useMemo(() => {
|
|
31215
|
+
return localOptions == null ? void 0 : localOptions.filter(
|
|
31216
|
+
(option) => {
|
|
31217
|
+
var _a;
|
|
31218
|
+
return (_a = option.label) == null ? void 0 : _a.toLowerCase().includes(inputVal.toLowerCase());
|
|
31219
|
+
}
|
|
31220
|
+
);
|
|
31221
|
+
}, [inputVal, localOptions]);
|
|
31222
|
+
const handleSelect = (option) => {
|
|
31223
|
+
setInputVal(option.label);
|
|
31224
|
+
console.log("option.raw selected", option.raw);
|
|
31225
|
+
onChange(option.raw);
|
|
31226
|
+
setDropdownOpen(false);
|
|
31227
|
+
};
|
|
31228
|
+
const handleBlur = (event) => {
|
|
31229
|
+
event.preventDefault();
|
|
31230
|
+
const htmlElement = document.getElementById("display_name");
|
|
31231
|
+
if (htmlElement) {
|
|
31232
|
+
htmlElement.innerHTML = "";
|
|
31233
|
+
}
|
|
31234
|
+
setTimeout(() => {
|
|
31235
|
+
if (!event.relatedTarget || !event.relatedTarget.closest(".table-container")) {
|
|
31236
|
+
setDropdownOpen(false);
|
|
31237
|
+
setFocusedIndex(-1);
|
|
31238
|
+
setIsInputFocused(false);
|
|
31239
|
+
if (mode !== "select" && allowNewValue && inputVal.trim()) {
|
|
31240
|
+
normalizedOptions.find(
|
|
31241
|
+
(opt) => opt.label.toLowerCase() === inputVal.toLowerCase()
|
|
31242
|
+
);
|
|
31243
|
+
}
|
|
31244
|
+
if (htmlElement) {
|
|
31245
|
+
htmlElement.innerHTML = "";
|
|
31246
|
+
}
|
|
31247
|
+
}
|
|
31248
|
+
}, 100);
|
|
31249
|
+
};
|
|
31250
|
+
const handleKeyDown = (e) => {
|
|
31251
|
+
if (!dropdownOpen && ["ArrowDown", "Enter"].includes(e.key)) {
|
|
31252
|
+
setDropdownOpen(true);
|
|
31253
|
+
return;
|
|
31254
|
+
}
|
|
31255
|
+
if (e.key === "ArrowDown") {
|
|
31256
|
+
setFocusedIndex((prev) => (prev + 1) % filteredOptions.length);
|
|
31257
|
+
} else if (e.key === "ArrowUp") {
|
|
31258
|
+
setFocusedIndex(
|
|
31259
|
+
(prev) => (prev - 1 + filteredOptions.length) % filteredOptions.length
|
|
31260
|
+
);
|
|
31261
|
+
} else if (e.key === "Enter" && focusedIndex >= 0) {
|
|
31262
|
+
handleSelect(filteredOptions[focusedIndex]);
|
|
31263
|
+
} else if (e.key === "Tab" && suggestion) {
|
|
31264
|
+
e.preventDefault();
|
|
31265
|
+
setInputVal(suggestion);
|
|
31266
|
+
const matched = normalizedOptions.find(
|
|
31267
|
+
(opt) => opt.label.toLowerCase() === suggestion.toLowerCase()
|
|
31268
|
+
);
|
|
31269
|
+
if (matched) {
|
|
31270
|
+
handleSelect(matched);
|
|
31271
|
+
}
|
|
31272
|
+
}
|
|
31273
|
+
};
|
|
31274
|
+
const getFontSizeFromWidth = (width2) => {
|
|
31275
|
+
const numericWidth = parseFloat(width2);
|
|
31276
|
+
if (numericWidth >= 40) return "1rem";
|
|
31277
|
+
if (numericWidth >= 25) return "0.9rem";
|
|
31278
|
+
if (numericWidth >= 15) return "0.8rem";
|
|
31279
|
+
return "0.75rem";
|
|
31280
|
+
};
|
|
31281
|
+
const generateColumns = () => {
|
|
31282
|
+
if (options2 && options2.length > 0) {
|
|
31283
|
+
const firstItem = options2[0];
|
|
31284
|
+
console.log("firstItem in columns", firstItem);
|
|
31285
|
+
const keys = Object.keys(firstItem).slice(1);
|
|
31286
|
+
console.log("keys in columns", keys);
|
|
31287
|
+
const defaultWidth = `${100 / 3}%`;
|
|
31288
|
+
console.log("columnWidths in generateColumns", columnWidths.length > 0);
|
|
31289
|
+
return keys.slice(0, columnWidths.length > 0 ? columnWidths.length : 3).map((key, index) => {
|
|
31290
|
+
const width2 = columnWidths.length > 0 ? `${columnWidths[index]}%` : defaultWidth;
|
|
31291
|
+
console.log("columnWidths.length", columnWidths.length);
|
|
31292
|
+
console.log("columns width", width2);
|
|
31293
|
+
return {
|
|
31294
|
+
key,
|
|
31295
|
+
label: key.charAt(0).toUpperCase() + key.slice(1).replace(/_/g, " "),
|
|
31296
|
+
width: width2,
|
|
31297
|
+
fontSize: getFontSizeFromWidth(width2)
|
|
31298
|
+
};
|
|
31299
|
+
});
|
|
31300
|
+
}
|
|
31301
|
+
return [];
|
|
31302
|
+
};
|
|
31303
|
+
console.log("generateColumns()", generateColumns());
|
|
31304
|
+
const columns = React.useMemo(() => generateColumns(), [options2, columnWidths]);
|
|
31305
|
+
console.log("columns", columns);
|
|
31306
|
+
React.useEffect(() => {
|
|
31307
|
+
setInputVal((value == null ? void 0 : value[optionLabelKey]) || "");
|
|
31308
|
+
}, [value, optionLabelKey]);
|
|
31309
|
+
React.useEffect(() => {
|
|
31310
|
+
if (!suggestion) {
|
|
31311
|
+
setFocusedIndex(-1);
|
|
31312
|
+
return;
|
|
31313
|
+
}
|
|
31314
|
+
const matchIndex = filteredOptions.findIndex(
|
|
31315
|
+
(opt) => opt.label.toLowerCase() === suggestion.toLowerCase()
|
|
31316
|
+
);
|
|
31317
|
+
setFocusedIndex(matchIndex);
|
|
31318
|
+
}, [suggestion, filteredOptions]);
|
|
31319
|
+
React.useEffect(() => {
|
|
31320
|
+
setLocalOptions(normalizeOptions(options2, optionLabelKey, optionValueKey));
|
|
31321
|
+
}, [options2, optionLabelKey, optionValueKey]);
|
|
31322
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31323
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `
|
|
31324
|
+
.custom-scrollbar::-webkit-scrollbar {
|
|
31325
|
+
width: 8px;
|
|
31326
|
+
}
|
|
31327
|
+
|
|
31328
|
+
.custom-scrollbar::-webkit-scrollbar-track {
|
|
31329
|
+
background: #f1f1f1;
|
|
31330
|
+
}
|
|
31331
|
+
|
|
31332
|
+
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
31333
|
+
background: #888;
|
|
31334
|
+
border-radius: 4px;
|
|
31335
|
+
}
|
|
31336
|
+
|
|
31337
|
+
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
31338
|
+
background: #555;
|
|
31339
|
+
}
|
|
31340
|
+
` }),
|
|
31341
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%" }, children: [
|
|
31342
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31343
|
+
Typography,
|
|
31344
|
+
{
|
|
31345
|
+
className: "heading",
|
|
31346
|
+
style: {
|
|
31347
|
+
marginBottom: "0.5rem",
|
|
31348
|
+
textAlign: "left",
|
|
31349
|
+
fontWeight: "500",
|
|
31350
|
+
fontSize: "14px",
|
|
31351
|
+
lineHeight: "20px",
|
|
31352
|
+
color: "#212529",
|
|
31353
|
+
textTransform: "capitalize"
|
|
31354
|
+
},
|
|
31355
|
+
children: label
|
|
31356
|
+
}
|
|
31357
|
+
),
|
|
31358
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31359
|
+
"div",
|
|
31360
|
+
{
|
|
31361
|
+
style: {
|
|
31362
|
+
display: "flex",
|
|
31363
|
+
alignItems: "center",
|
|
31364
|
+
border: `1px solid ${error ? "red" : "#ccc"}`,
|
|
31365
|
+
borderRadius: "4px",
|
|
31366
|
+
height: height2,
|
|
31367
|
+
backgroundColor: disabled ? "#f5f5f5" : "white",
|
|
31368
|
+
boxShadow: isInputFocused ? "0 0 5px 2px skyblue" : "none",
|
|
31369
|
+
transition: "box-shadow 0.2s ease-in-out"
|
|
31370
|
+
},
|
|
31371
|
+
children: [
|
|
31372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { position: "relative", width: "100%" }, children: [
|
|
31373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31374
|
+
"input",
|
|
31375
|
+
{
|
|
31376
|
+
value: suggestion && inputVal && suggestion.toLowerCase().startsWith(inputVal.toLowerCase()) ? suggestion : "",
|
|
31377
|
+
disabled: true,
|
|
31378
|
+
"aria-hidden": true,
|
|
31379
|
+
style: {
|
|
31380
|
+
position: "absolute",
|
|
31381
|
+
top: "8px",
|
|
31382
|
+
left: "7px",
|
|
31383
|
+
width: "100%",
|
|
31384
|
+
border: "none",
|
|
31385
|
+
outline: "none",
|
|
31386
|
+
color: "#ccc",
|
|
31387
|
+
backgroundColor: "transparent",
|
|
31388
|
+
fontSize: "16px",
|
|
31389
|
+
fontFamily: "inherit",
|
|
31390
|
+
pointerEvents: "none",
|
|
31391
|
+
zIndex: 0,
|
|
31392
|
+
boxSizing: "border-box"
|
|
31393
|
+
}
|
|
31394
|
+
}
|
|
31395
|
+
),
|
|
31396
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31397
|
+
"input",
|
|
31398
|
+
{
|
|
31399
|
+
value: inputVal.charAt(0).toUpperCase() + inputVal.slice(1),
|
|
31400
|
+
onChange: (e) => {
|
|
31401
|
+
const newVal = e.target.value;
|
|
31402
|
+
setInputVal(newVal);
|
|
31403
|
+
setDropdownOpen(true);
|
|
31404
|
+
setFocusedIndex(-1);
|
|
31405
|
+
const match = filteredOptions.find(
|
|
31406
|
+
(opt) => opt.label.toLowerCase().startsWith(newVal.toLowerCase())
|
|
31407
|
+
);
|
|
31408
|
+
setSuggestion((match == null ? void 0 : match.label) || "");
|
|
31409
|
+
},
|
|
31410
|
+
onKeyDown: handleKeyDown,
|
|
31411
|
+
style: {
|
|
31412
|
+
border: "none",
|
|
31413
|
+
borderRadius: "4px",
|
|
31414
|
+
outline: "none",
|
|
31415
|
+
width: "100%",
|
|
31416
|
+
background: "transparent",
|
|
31417
|
+
color: "black",
|
|
31418
|
+
caretColor: "black",
|
|
31419
|
+
position: "relative",
|
|
31420
|
+
zIndex: "1",
|
|
31421
|
+
fontSize: "16px",
|
|
31422
|
+
fontFamily: "inherit",
|
|
31423
|
+
padding: "8px",
|
|
31424
|
+
paddingRight: "10%",
|
|
31425
|
+
boxSizing: "border-box"
|
|
31426
|
+
},
|
|
31427
|
+
onFocus: (e) => {
|
|
31428
|
+
setIsInputFocused(true);
|
|
31429
|
+
!disabled && setDropdownOpen(true);
|
|
31430
|
+
},
|
|
31431
|
+
onBlur: handleBlur
|
|
31432
|
+
}
|
|
31433
|
+
)
|
|
31434
|
+
] }),
|
|
31435
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31436
|
+
ArrowDropDownIcon,
|
|
31437
|
+
{
|
|
31438
|
+
onClick: () => !disabled && setDropdownOpen((prev) => !prev),
|
|
31439
|
+
style: {
|
|
31440
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
31441
|
+
color: "gray"
|
|
31442
|
+
}
|
|
31443
|
+
}
|
|
31444
|
+
)
|
|
31445
|
+
]
|
|
31446
|
+
}
|
|
31447
|
+
),
|
|
31448
|
+
dropdownOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31449
|
+
"div",
|
|
31450
|
+
{
|
|
31451
|
+
ref: dropdownRef,
|
|
31452
|
+
style: {
|
|
31453
|
+
position: "absolute",
|
|
31454
|
+
zIndex: 10,
|
|
31455
|
+
width: "100%",
|
|
31456
|
+
backgroundColor: "white",
|
|
31457
|
+
border: "1px solid #ccc",
|
|
31458
|
+
maxHeight: 200,
|
|
31459
|
+
overflowY: "auto",
|
|
31460
|
+
marginTop: 4
|
|
31461
|
+
},
|
|
31462
|
+
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
31463
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { p: 1, variant: "body2", children: "No results found" }),
|
|
31464
|
+
allowNewValue ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31465
|
+
Button,
|
|
31466
|
+
{
|
|
31467
|
+
onMouseDown: handleAddNewClick,
|
|
31468
|
+
style: { marginTop: 8 },
|
|
31469
|
+
type: "button",
|
|
31470
|
+
children: saveOptionTitle
|
|
31471
|
+
}
|
|
31472
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {})
|
|
31473
|
+
] }) : displayFormat === "table" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31474
|
+
TableContainer,
|
|
31475
|
+
{
|
|
31476
|
+
component: Paper,
|
|
31477
|
+
className: "table-container overflow-x-hidden w-ful mt-0 h-full max-h-[60vh] overflow-y-auto shadow-2xl",
|
|
31478
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31479
|
+
Table,
|
|
31480
|
+
{
|
|
31481
|
+
stickyHeader: true,
|
|
31482
|
+
size: "small",
|
|
31483
|
+
sx: {
|
|
31484
|
+
tableLayout: "fixed",
|
|
31485
|
+
width: "100%",
|
|
31486
|
+
overflowX: "hidden",
|
|
31487
|
+
border: "1px solid #aaa",
|
|
31488
|
+
borderCollapse: "collapse"
|
|
31489
|
+
},
|
|
31490
|
+
children: [
|
|
31491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { children: columns.map((column, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31492
|
+
TableCell,
|
|
31493
|
+
{
|
|
31494
|
+
sx: {
|
|
31495
|
+
width: column.width,
|
|
31496
|
+
padding: "8px",
|
|
31497
|
+
fontSize: column.fontSize || "0.9rem",
|
|
31498
|
+
boxSizing: "border-box",
|
|
31499
|
+
overflow: "hidden",
|
|
31500
|
+
whiteSpace: "nowrap",
|
|
31501
|
+
textOverflow: "ellipsis",
|
|
31502
|
+
// Inline styles from .table-head-cell
|
|
31503
|
+
backgroundColor: "#1976d2",
|
|
31504
|
+
color: "white",
|
|
31505
|
+
fontWeight: "bold",
|
|
31506
|
+
position: "sticky",
|
|
31507
|
+
top: 0,
|
|
31508
|
+
zIndex: 1,
|
|
31509
|
+
border: "1px solid #aaa"
|
|
31510
|
+
},
|
|
31511
|
+
children: column.label
|
|
31512
|
+
},
|
|
31513
|
+
index
|
|
31514
|
+
)) }) }),
|
|
31515
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableBody, { children: filteredOptions.map((opt, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31516
|
+
TableRow,
|
|
31517
|
+
{
|
|
31518
|
+
onMouseDown: () => handleSelect(opt),
|
|
31519
|
+
hover: true,
|
|
31520
|
+
sx: {
|
|
31521
|
+
cursor: "pointer",
|
|
31522
|
+
height: 48,
|
|
31523
|
+
scrollBehavior: "smooth",
|
|
31524
|
+
backgroundColor: focusedIndex === idx ? "#fff54f" : idx % 2 === 0 ? "#f5f5f5" : "white",
|
|
31525
|
+
"&:hover": {
|
|
31526
|
+
backgroundColor: "#e3f2fd"
|
|
31527
|
+
}
|
|
31528
|
+
},
|
|
31529
|
+
children: columns.map((column, cellIndex) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31530
|
+
TableCell,
|
|
31531
|
+
{
|
|
31532
|
+
sx: {
|
|
31533
|
+
width: column.width,
|
|
31534
|
+
padding: "6px",
|
|
31535
|
+
fontSize: column.fontSize || "0.9rem",
|
|
31536
|
+
boxSizing: "border-box",
|
|
31537
|
+
overflow: "hidden",
|
|
31538
|
+
whiteSpace: "nowrap",
|
|
31539
|
+
textOverflow: "ellipsis",
|
|
31540
|
+
border: "1px solid #aaa"
|
|
31541
|
+
},
|
|
31542
|
+
children: [
|
|
31543
|
+
opt.raw[column.key],
|
|
31544
|
+
console.log(opt, "opt in tablecell")
|
|
31545
|
+
]
|
|
31546
|
+
},
|
|
31547
|
+
cellIndex
|
|
31548
|
+
))
|
|
31549
|
+
},
|
|
31550
|
+
idx
|
|
31551
|
+
)) })
|
|
31552
|
+
]
|
|
31553
|
+
}
|
|
31554
|
+
)
|
|
31555
|
+
}
|
|
31556
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: filteredOptions.map((opt, idx) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31557
|
+
"li",
|
|
31558
|
+
{
|
|
31559
|
+
onMouseDown: () => handleSelect(opt),
|
|
31560
|
+
style: {
|
|
31561
|
+
padding: 8,
|
|
31562
|
+
backgroundColor: focusedIndex === idx ? "#eee" : "white",
|
|
31563
|
+
cursor: "pointer"
|
|
31564
|
+
},
|
|
31565
|
+
children: opt.label
|
|
31566
|
+
},
|
|
31567
|
+
idx
|
|
31568
|
+
)) })
|
|
31569
|
+
}
|
|
31570
|
+
),
|
|
31571
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { color: "error", children: error })
|
|
31572
|
+
] }),
|
|
31573
|
+
showAddModal && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31574
|
+
"div",
|
|
31575
|
+
{
|
|
31576
|
+
style: {
|
|
31577
|
+
position: "fixed",
|
|
31578
|
+
top: 0,
|
|
31579
|
+
left: 0,
|
|
31580
|
+
width: "100%",
|
|
31581
|
+
height: "100%",
|
|
31582
|
+
background: "rgba(0,0,0,0.2)",
|
|
31583
|
+
display: "flex",
|
|
31584
|
+
alignItems: "center",
|
|
31585
|
+
justifyContent: "center",
|
|
31586
|
+
zIndex: 9999
|
|
31587
|
+
},
|
|
31588
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
31589
|
+
"div",
|
|
31590
|
+
{
|
|
31591
|
+
style: {
|
|
31592
|
+
background: "#fff",
|
|
31593
|
+
padding: "2rem",
|
|
31594
|
+
borderRadius: "8px",
|
|
31595
|
+
width: "300px"
|
|
31596
|
+
},
|
|
31597
|
+
children: [
|
|
31598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { children: "Add New Employee" }),
|
|
31599
|
+
Object.keys(options2[0]).map((key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31600
|
+
CustomInput,
|
|
31601
|
+
{
|
|
31602
|
+
label: key,
|
|
31603
|
+
name: key,
|
|
31604
|
+
value: newEmployee[key],
|
|
31605
|
+
onChange: (name, value2) => setNewEmployee((prev) => ({ ...prev, [key]: value2 })),
|
|
31606
|
+
disabled: key === "_id",
|
|
31607
|
+
width: "100%",
|
|
31608
|
+
placeholder: key,
|
|
31609
|
+
type: "text",
|
|
31610
|
+
category: "text",
|
|
31611
|
+
isRequired: true
|
|
31612
|
+
}
|
|
31613
|
+
)),
|
|
31614
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { marginTop: 16, textAlign: "right" }, children: [
|
|
31615
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: () => setShowAddModal(false), children: "Cancel" }),
|
|
31616
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
31617
|
+
"button",
|
|
31618
|
+
{
|
|
31619
|
+
onClick: handleAddEmployeeSubmit,
|
|
31620
|
+
disabled: !newEmployee.name,
|
|
31621
|
+
style: { marginLeft: 8 },
|
|
31622
|
+
children: "Save"
|
|
31623
|
+
}
|
|
31624
|
+
)
|
|
31625
|
+
] })
|
|
31626
|
+
]
|
|
31627
|
+
}
|
|
31628
|
+
)
|
|
31629
|
+
}
|
|
31630
|
+
)
|
|
31631
|
+
] });
|
|
31632
|
+
};
|
|
30390
31633
|
exports2.MytekComboDropdown = ComboDropdown;
|
|
30391
31634
|
exports2.MytekInputField = CustomInput;
|
|
30392
31635
|
exports2.MytekLoader = Loader;
|
|
30393
31636
|
exports2.MytekMessageBox = Mt_MessageBox;
|
|
31637
|
+
exports2.MytekPowerCombo = PowerDropdown;
|
|
30394
31638
|
exports2.MytekRadioButton = RadioButton;
|
|
30395
31639
|
exports2.MytekTab = DynamicTabs;
|
|
30396
31640
|
exports2.MytekTable = MasterTable;
|