@m4l/components 9.1.76 → 9.1.78
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/@types/types.d.ts +11 -2
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.js +1 -1
- package/components/HelperError/HelperError.d.ts +1 -1
- package/components/HelperError/HelperError.js +16 -21
- package/components/HelperError/HelperError.styles.js +25 -15
- package/components/HelperError/constant.d.ts +0 -1
- package/components/HelperError/constant.js +0 -2
- package/components/HelperError/slots/HelperErrorSlots.js +2 -1
- package/components/HelperError/types.d.ts +6 -10
- package/components/Label/Label.js +1 -1
- package/components/Label/Label.styles.js +62 -19
- package/components/Label/types.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.d.ts +53 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.js +54 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.styles.d.ts +2 -0
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.styles.js +11 -0
- package/components/formatters/UncertaintyFormatter/constants.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/constants.js +4 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterEnum.d.ts +3 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterEnum.js +7 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/slots/UncertaintyFormatterSlots.js +12 -0
- package/components/formatters/UncertaintyFormatter/tests/UncertaintyFormatter.test.d.ts +1 -0
- package/components/formatters/UncertaintyFormatter/types.d.ts +45 -1
- package/components/formatters/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/RHFCheckBox.styles.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/RHFCheckBox.styles.js +31 -0
- package/components/hook-form/RHFCheckbox/RHFCheckbox.d.ts +2 -2
- package/components/hook-form/RHFCheckbox/RHFCheckbox.js +57 -67
- package/components/hook-form/RHFCheckbox/constants.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/constants.js +7 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxEnum.d.ts +6 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxEnum.js +10 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +4 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +28 -0
- package/components/hook-form/RHFCheckbox/slots/index.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/types.d.ts +33 -5
- package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/MapSourcesTool/index.js +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +2 -2
- package/components/mui_extended/CheckBox/CheckBox.js +4 -3
- package/components/mui_extended/CheckBox/CheckBox.styles.js +64 -15
- package/components/mui_extended/CheckBox/types.d.ts +31 -6
- package/index.js +1 -1
- package/package.json +1 -1
- package/components/HelperError/HelperError.stories.d.ts +0 -13
- package/components/formatters/UncertaintyFormatter/index.d.ts +0 -9
- package/components/formatters/UncertaintyFormatter/index.js +0 -29
- package/components/hook-form/RHFCheckbox/classes/index.d.ts +0 -12
- package/components/hook-form/RHFCheckbox/classes/index.js +0 -44
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +0 -12
- package/components/hook-form/RHFCheckbox/styles.d.ts +0 -6
- package/components/hook-form/RHFCheckbox/styles.js +0 -24
- package/components/hook-form/RHFCheckbox/test/constants.d.ts +0 -4
- package/components/hook-form/RHFCheckbox/test/constants.js +0 -4
- package/components/hook-form/RHFCheckbox/test/utils.d.ts +0 -2
- package/components/hook-form/RHFCheckbox/test/utils.js +0 -7
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { HelperError } from './HelperError';
|
|
2
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: Meta<typeof HelperError>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof HelperError>;
|
|
6
|
-
/** Base HelperError component */
|
|
7
|
-
export declare const ErrorBase: Story;
|
|
8
|
-
/** Small HelperError component */
|
|
9
|
-
export declare const small: Story;
|
|
10
|
-
/** Medium HelperError component */
|
|
11
|
-
export declare const medium: Story;
|
|
12
|
-
/** Skeleton HelperError component */
|
|
13
|
-
export declare const Skeleton: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UncertaintyFormatterProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* TODO: Documentar
|
|
4
|
-
*/
|
|
5
|
-
export declare function getUncertaintyFormat(obProps: any, fieldValue: string, fieldSymbol: string, fieldUnit: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* TODO: Documentar
|
|
8
|
-
*/
|
|
9
|
-
export declare function UncertaintyFormatter(props: UncertaintyFormatterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getPropertyByString } from "@m4l/core";
|
|
3
|
-
import { W as WrapperComponent } from "../../WrapperComponent/index.js";
|
|
4
|
-
function getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit) {
|
|
5
|
-
let result = "";
|
|
6
|
-
const ranges = getPropertyByString(obProps, fieldValue);
|
|
7
|
-
const symbol = getPropertyByString(obProps, fieldSymbol);
|
|
8
|
-
const unit = getPropertyByString(obProps, fieldUnit);
|
|
9
|
-
if (ranges === void 0 || ranges === null || !Array.isArray(ranges) || typeof symbol !== "string" || typeof unit !== "string") {
|
|
10
|
-
return "[]";
|
|
11
|
-
}
|
|
12
|
-
ranges.map((obj, idx) => {
|
|
13
|
-
const cmc_min_closed = obj.cmc_min_closed !== true ? "<" : "≤";
|
|
14
|
-
const cmc_max_closed = obj.cmc_max_closed !== true ? "<" : "≤";
|
|
15
|
-
result = result.concat(
|
|
16
|
-
`${idx > 0 ? " " : ""}`,
|
|
17
|
-
obj.cmc_min !== obj.cmc_max ? `[${obj.cmc_min}${unit} ${cmc_min_closed} ${symbol} ${cmc_max_closed} ${obj.cmc_max}${unit} ± ${obj.cmc_uncertainty}]` : `[${obj.cmc_min}${unit} ± ${obj.cmc_uncertainty}]`
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
function UncertaintyFormatter(props) {
|
|
23
|
-
const { obProps, fieldValue, fieldSymbol, fieldUnit, Component = WrapperComponent } = props;
|
|
24
|
-
return /* @__PURE__ */ jsx(Component, { children: getUncertaintyFormat(obProps, fieldValue, fieldSymbol, fieldUnit) });
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
UncertaintyFormatter as U,
|
|
28
|
-
getUncertaintyFormat as g
|
|
29
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RHFCheckboxClassesType } from './types';
|
|
2
|
-
import { OwnerState } from '../types';
|
|
3
|
-
export declare const RHFCheckboxClasses: RHFCheckboxClassesType;
|
|
4
|
-
export declare function getRHFCheckboxUtilityClass(slot: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Documentar
|
|
7
|
-
*/
|
|
8
|
-
export declare const useUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
skeleton: string;
|
|
10
|
-
root: string;
|
|
11
|
-
checkTypography: string;
|
|
12
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
generateUtilityClasses("M4LRHFCheckbox", [
|
|
4
|
-
/* elements */
|
|
5
|
-
"root",
|
|
6
|
-
"checkTypography",
|
|
7
|
-
"skeleton",
|
|
8
|
-
/* states or variants of elements */
|
|
9
|
-
"small",
|
|
10
|
-
"medium",
|
|
11
|
-
"stateDisabled",
|
|
12
|
-
"stateError",
|
|
13
|
-
"isFocus",
|
|
14
|
-
"isTabSelected"
|
|
15
|
-
]);
|
|
16
|
-
function getRHFCheckboxUtilityClass(slot) {
|
|
17
|
-
return generateUtilityClass("M4LRHFCheckbox", slot);
|
|
18
|
-
}
|
|
19
|
-
const useUtilityClasses = (ownerState) => {
|
|
20
|
-
const slots = {
|
|
21
|
-
root: [
|
|
22
|
-
"root",
|
|
23
|
-
ownerState.isFocus && "isFocus",
|
|
24
|
-
ownerState.isTabSelected && "isTabSelected",
|
|
25
|
-
ownerState.sizeCheck === "small" && "small",
|
|
26
|
-
ownerState.sizeCheck === "medium" && "medium",
|
|
27
|
-
ownerState.disabled && "stateDisabled",
|
|
28
|
-
ownerState.error && "stateError"
|
|
29
|
-
],
|
|
30
|
-
skeleton: ["skeleton"],
|
|
31
|
-
checkTypography: [
|
|
32
|
-
"checkTypography",
|
|
33
|
-
ownerState.sizeCheck === "small" ? "small" : "medium",
|
|
34
|
-
ownerState.disabled && "stateDisabled"
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
|
|
38
|
-
return {
|
|
39
|
-
...composedClasses
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
useUtilityClasses as u
|
|
44
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface RHFCheckboxClassesType {
|
|
2
|
-
root: string;
|
|
3
|
-
checkTypography: string;
|
|
4
|
-
skeleton: string;
|
|
5
|
-
small: string;
|
|
6
|
-
medium: string;
|
|
7
|
-
stateDisabled: string;
|
|
8
|
-
stateError: string;
|
|
9
|
-
isFocus: string;
|
|
10
|
-
isTabSelected: string;
|
|
11
|
-
}
|
|
12
|
-
export type RHFCheckboxClassesKey = keyof RHFCheckboxClassesType;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const RHFCheckboxRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
-
export declare const WrapperSKTRHFCheckbox: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const SKTCheckSkeleton: import('@emotion/styled').StyledComponent<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
5
|
-
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
6
|
-
export declare const ContainerCheckTypography: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { Skeleton } from "@mui/material";
|
|
3
|
-
const RHFCheckboxRoot = styled("div")(({ theme }) => ({
|
|
4
|
-
...theme.components?.M4LRHFCheckbox?.styleOverrides || {}
|
|
5
|
-
}));
|
|
6
|
-
styled("div")(() => ({
|
|
7
|
-
display: "flex",
|
|
8
|
-
justifyContent: "center",
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
padding: "8px"
|
|
11
|
-
}));
|
|
12
|
-
styled(Skeleton)(() => ({
|
|
13
|
-
width: "20px",
|
|
14
|
-
height: "20px",
|
|
15
|
-
borderRadius: "4px"
|
|
16
|
-
}));
|
|
17
|
-
const ContainerCheckTypography = styled("div")(() => ({
|
|
18
|
-
display: "flex",
|
|
19
|
-
alignItems: "center"
|
|
20
|
-
}));
|
|
21
|
-
export {
|
|
22
|
-
ContainerCheckTypography as C,
|
|
23
|
-
RHFCheckboxRoot as R
|
|
24
|
-
};
|