@m4l/components 9.1.6 → 9.1.8
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 +108 -7
- package/components/Label/Label.js +5 -5
- package/components/Label/Label.styles.js +4 -0
- package/components/Label/stories/PaletteColor/{DefaultinternalManagement → VariantsLabel}/LabelDefaultInternal.stories.d.ts +4 -6
- package/components/Label/stories/PaletteColor/{DefaultinternalManagement → VariantsLabel}/LabelDefaultPredeterminado.stories.d.ts +1 -1
- package/components/Label/types.d.ts +9 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +22 -0
- package/components/mui_extended/CheckBox/CheckBox.js +40 -18
- package/components/mui_extended/CheckBox/CheckBox.styles.d.ts +2 -0
- package/components/mui_extended/CheckBox/CheckBox.styles.js +80 -0
- package/components/mui_extended/CheckBox/constants.d.ts +1 -0
- package/components/mui_extended/CheckBox/constants.js +4 -0
- package/components/mui_extended/CheckBox/slots/CheckBoxEnum.d.ts +6 -0
- package/components/mui_extended/CheckBox/slots/CheckBoxEnum.js +10 -0
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +14 -0
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.js +28 -0
- package/components/mui_extended/CheckBox/slots/index.d.ts +2 -0
- package/components/mui_extended/CheckBox/slots/index.js +1 -0
- package/components/mui_extended/CheckBox/types.d.ts +42 -1
- package/components/mui_extended/Tooltip/Tooltip.js +3 -5
- package/components/mui_extended/Tooltip/Tooltip.styles.js +9 -53
- package/components/mui_extended/Tooltip/slots/TooltipSlots.js +1 -2
- package/components/mui_extended/Tooltip/types.d.ts +9 -0
- package/package.json +1 -1
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Default/states/CheckBoxDisabled.stories.d.ts +22 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Default/states/CheckBoxSkeleton.stories.d.ts +10 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxActive.stories.d.ts +16 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxEnabled.stories.d.ts +16 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxFocusVisible.stories.d.ts +16 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxHover.stories.d.ts +16 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxActive.stories.d.ts +18 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxEnabled.stories.d.ts +17 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxFocusVisible.stories.d.ts +17 -0
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxHover.stories.d.ts +17 -0
- package/storybook/components/extended/mui/Tooltip/Tooltip.stories.d.ts +29 -0
- package/components/Label/stories/PaletteColor/DefaultinternalManagement/commonProps/LabelDefaultInternalVariants.stories.d.ts +0 -14
- package/components/Label/stories/PaletteColor/DefaultinternalManagement/commonProps/LabelDefaultVariants.stories.d.ts +0 -14
- package/components/mui_extended/CheckBox/classes/constants.d.ts +0 -1
- package/components/mui_extended/CheckBox/classes/constants.js +0 -4
- package/components/mui_extended/CheckBox/classes/index.d.ts +0 -11
- package/components/mui_extended/CheckBox/classes/index.js +0 -33
- package/components/mui_extended/CheckBox/classes/types.d.ts +0 -10
- package/components/mui_extended/CheckBox/styles.d.ts +0 -1
- package/components/mui_extended/CheckBox/styles.js +0 -7
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/index.d.ts +0 -5
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/index.js +0 -9
- package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +0 -4
- package/components/mui_extended/Tooltip/Tooltip.stories.d.ts +0 -25
package/@types/types.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ import type {
|
|
|
52
52
|
} from '../components/mui_extended/MenuItem/types';
|
|
53
53
|
|
|
54
54
|
import { SelectOwnerState, SelectSlotsType } from '../components/mui_extended/Select/types';
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
|
+
import { C } from 'vitest/dist/chunks/environment.CzISCQ7o';
|
|
57
|
+
|
|
58
|
+
import { CheckBoxOwnerState, CheckBoxSlotsType } from '../components/mui_extended/CheckBox/types';
|
|
55
59
|
import { RHFInputNumberSpinnerOwnerState, RHFInputNumberSpinnerSlotsType } from '../components/hook-form/RHFInputNumberSpinner/types';
|
|
56
60
|
import { TabOwnerState, TabSlotsType } from '../components/mui_extended/Tab/types';
|
|
57
61
|
|
|
@@ -83,6 +87,7 @@ declare module '@mui/material/styles' {
|
|
|
83
87
|
M4LSkeleton: SkeletonSlotsType;
|
|
84
88
|
M4LSelect: SelectSlotsType;
|
|
85
89
|
M4LTypography: TypographySlotsType;
|
|
90
|
+
M4LCheckBox: CheckBoxSlotsType;
|
|
86
91
|
M4LRHFInputNumberSpinner: RHFInputNumberSpinnerSlotsType;
|
|
87
92
|
M4LTab: TabSlotsType;
|
|
88
93
|
M4LButton: ButtonSlotsType;
|
|
@@ -112,6 +117,7 @@ declare module '@mui/material/styles' {
|
|
|
112
117
|
M4LSkeleton: Partial<SkeletonOwnerState>;
|
|
113
118
|
M4LSelect: Partial<SelectOwnerState>;
|
|
114
119
|
M4LTypography: Partial<TypographyOwnerState>;
|
|
120
|
+
M4LCheckBox: Partial<CheckBoxOwnerState>;
|
|
115
121
|
M4LRHFInputNumberSpinner:Partial<RHFInputNumberSpinnerOwnerState>
|
|
116
122
|
M4LTab: Partial<TabOwnerState>;
|
|
117
123
|
M4LButton: Partial<ButtonOwnerState>;
|
|
@@ -241,10 +247,105 @@ declare module '@mui/material/styles' {
|
|
|
241
247
|
styleOverrides?: ComponentsOverrides<Theme>['M4LActionIntro'];
|
|
242
248
|
variants?: ComponentsVariants['M4LActionIntro'];
|
|
243
249
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
M4LDynamicSort?: {
|
|
251
|
+
defaultProps?: ComponentsPropsList['M4LDynamicSort'];
|
|
252
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LDynamicSort'];
|
|
253
|
+
variants?: ComponentsVariants['M4LDynamicSort'];
|
|
254
|
+
};
|
|
255
|
+
M4LMenuActions?: {
|
|
256
|
+
defaultProps?: ComponentsPropsList['M4LMenuActions'];
|
|
257
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LMenuActions'];
|
|
258
|
+
variants?: ComponentsVariants['M4LMenuActions'];
|
|
259
|
+
};
|
|
260
|
+
M4LInputNumberSpinner?: {
|
|
261
|
+
defaultProps?: ComponentsPropsList['M4LInputNumberSpinner'];
|
|
262
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LInputNumberSpinner'];
|
|
263
|
+
variants?: ComponentsVariants['M4LInputNumberSpinner'];
|
|
264
|
+
};
|
|
265
|
+
M4LPopupsViewer?: {
|
|
266
|
+
defaultProps?: ComponentsPropsList['M4LPopupsViewer'];
|
|
267
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LPopupsViewer'];
|
|
268
|
+
variants?: ComponentsVariants['M4LPopupsViewer'];
|
|
269
|
+
};
|
|
270
|
+
M4LDragResizeWindow?: {
|
|
271
|
+
defaultProps?: ComponentsPropsList['M4LDragResizeWindow'];
|
|
272
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LDragResizeWindow'];
|
|
273
|
+
variants?: ComponentsVariants['M4LDragResizeWindow'];
|
|
274
|
+
};
|
|
275
|
+
M4LToastContainer?: {
|
|
276
|
+
defaultProps?: ComponentsPropsList['M4LToastContainer'];
|
|
277
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LToastContainer'];
|
|
278
|
+
variants?: ComponentsVariants['M4LToastContainer'];
|
|
279
|
+
};
|
|
280
|
+
M4LHelperError?: {
|
|
281
|
+
defaultProps?: ComponentsPropsList['M4LHelperError'];
|
|
282
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LHelperError'];
|
|
283
|
+
variants?: ComponentsVariants['M4LHelperError'];
|
|
284
|
+
};
|
|
285
|
+
M4LLabel?: {
|
|
286
|
+
defaultProps?: ComponentsPropsList['M4LLabel'];
|
|
287
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LLabel'];
|
|
288
|
+
variants?: ComponentsVariants['M4LLabel'];
|
|
289
|
+
};
|
|
290
|
+
M4LIcon?: {
|
|
291
|
+
defaultProps?: ComponentsPropsList['M4LIcon'];
|
|
292
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LIcon'];
|
|
293
|
+
variants?: ComponentsVariants['M4LIcon'];
|
|
294
|
+
};
|
|
295
|
+
M4LTooltip?: {
|
|
296
|
+
defaultProps?: ComponentsPropsList['M4LTooltip'];
|
|
297
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LTooltip'];
|
|
298
|
+
variants?: ComponentsVariants['M4LTooltip'];
|
|
299
|
+
};
|
|
300
|
+
M4LTextField?: {
|
|
301
|
+
defaultProps?: ComponentsPropsList['M4LTextField'];
|
|
302
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LTextField'];
|
|
303
|
+
variants?: ComponentsVariants['M4LTextField'];
|
|
304
|
+
};
|
|
305
|
+
M4LIconButton?: {
|
|
306
|
+
defaultProps?: ComponentsPropsList['M4LIconButton'];
|
|
307
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LIconButton'];
|
|
308
|
+
variants?: ComponentsVariants['M4LIconButton'];
|
|
309
|
+
};
|
|
310
|
+
M4LBadge?: {
|
|
311
|
+
defaultProps?: ComponentsPropsList['M4LBadge'];
|
|
312
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LBadge'];
|
|
313
|
+
variants?: ComponentsVariants['M4LBadge'];
|
|
314
|
+
};
|
|
315
|
+
M4LControlIncrement?: {
|
|
316
|
+
defaultProps?: ComponentsPropsList['M4LControlIncrement'];
|
|
317
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LControlIncrement'];
|
|
318
|
+
variants?: ComponentsVariants['M4LControlIncrement'];
|
|
319
|
+
M4LMenuItem?: {
|
|
320
|
+
defaultProps?: ComponentsPropsList['M4LMenuItem'];
|
|
321
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LMenuItem'];
|
|
322
|
+
variants?: ComponentsVariants['M4LMenuItem'];
|
|
323
|
+
};
|
|
324
|
+
M4LSkeleton?: {
|
|
325
|
+
defaultProps?: ComponentsPropsList['M4LSkeleton'];
|
|
326
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LSkeleton'];
|
|
327
|
+
variants?: ComponentsVariants['M4LSkeleton'];
|
|
328
|
+
};
|
|
329
|
+
M4LSelect: {
|
|
330
|
+
defaultProps?: ComponentsPropsList['M4LSelect'];
|
|
331
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LSelect'];
|
|
332
|
+
variants?: ComponentsVariants['M4LSelect'];
|
|
333
|
+
};
|
|
334
|
+
M4LTypography?: {
|
|
335
|
+
defaultProps?: ComponentsPropsList['M4LTypography'];
|
|
336
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LTypography'];
|
|
337
|
+
variants?: ComponentsVariants['M4LTypography'];
|
|
338
|
+
};
|
|
339
|
+
M4LCheckBox?: {
|
|
340
|
+
defaultProps?: ComponentsPropsList['M4LCheckBox'];
|
|
341
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LCheckBox'];
|
|
342
|
+
variants?: ComponentsVariants['M4LCheckBox'];
|
|
343
|
+
};
|
|
344
|
+
M4LActionCancel?: {
|
|
345
|
+
defaultProps?: ComponentsPropsList['M4LActionCancel'];
|
|
346
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LActionCancel'];
|
|
347
|
+
variants?: ComponentsVariants['M4LActionCancel'];
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
@@ -2,15 +2,15 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { L as LabelRootStyled, T as TypographyStyled, a as TypographyMandatoryMessageStyled, I as IconHelperMessageStyled, S as SkeletonStyled } from "./slots/LabelSlots.js";
|
|
4
4
|
const Label = (props) => {
|
|
5
|
-
const { helperMessage, label, mandatory, mandatoryMessage, htmlFor, id, error, size = "medium" } = props;
|
|
5
|
+
const { helperMessage, label, mandatory, mandatoryMessage, htmlFor, id, error, size = "medium", disabled } = props;
|
|
6
6
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
7
7
|
const isSkeleton = useModuleSkeleton();
|
|
8
|
-
return /* @__PURE__ */ jsx(LabelRootStyled, { ownerState: {}, htmlFor, id, label: "", variantLabel: "standard", children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9
|
-
/* @__PURE__ */ jsx(TypographyStyled, { ownerState: { size }, variant: "body", className: "", children: label }),
|
|
8
|
+
return /* @__PURE__ */ jsx(LabelRootStyled, { ownerState: { disabled }, htmlFor, id, label: "", variantLabel: "standard", children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(TypographyStyled, { ownerState: { size, disabled }, variant: "body", className: "", children: label }),
|
|
10
10
|
mandatory && /* @__PURE__ */ jsx(
|
|
11
11
|
TypographyMandatoryMessageStyled,
|
|
12
12
|
{
|
|
13
|
-
ownerState: { size },
|
|
13
|
+
ownerState: { size, disabled },
|
|
14
14
|
variant: "body",
|
|
15
15
|
className: mandatoryMessage ? "mandatoryMessage" : "mandatoryAsterisk",
|
|
16
16
|
children: mandatoryMessage ? mandatoryMessage : "*"
|
|
@@ -20,7 +20,7 @@ const Label = (props) => {
|
|
|
20
20
|
IconHelperMessageStyled,
|
|
21
21
|
{
|
|
22
22
|
tooltipContent: helperMessage,
|
|
23
|
-
ownerState: {},
|
|
23
|
+
ownerState: { disabled },
|
|
24
24
|
placement: "right",
|
|
25
25
|
className: error ? "helper-icon-error" : "helper-icon",
|
|
26
26
|
src: `${host_static_assets}/${environment_assets}/frontend/components/LabelMessage/assets/icons/infoSmall.svg`
|
|
@@ -13,6 +13,10 @@ const labelStyles = {
|
|
|
13
13
|
flexWrap: "wrap",
|
|
14
14
|
width: "100%",
|
|
15
15
|
gap: theme.size.baseSpacings.sp1,
|
|
16
|
+
...ownerState.disabled && {
|
|
17
|
+
color: theme.vars.palette?.text.disabled,
|
|
18
|
+
pointerEvents: "none"
|
|
19
|
+
},
|
|
16
20
|
flexDirection: "row",
|
|
17
21
|
[`& .${ownerState.label}`]: {
|
|
18
22
|
...ownerState.size === "small" && {
|
|
@@ -10,11 +10,9 @@ import { Label } from '../../../Label';
|
|
|
10
10
|
declare const meta: Meta<typeof Label>;
|
|
11
11
|
export default meta;
|
|
12
12
|
type Story = StoryObj<typeof Label>;
|
|
13
|
-
/**
|
|
14
|
-
export declare const
|
|
13
|
+
/** Label component mode Skeleton With props `helperMessage` */
|
|
14
|
+
export declare const MandatoryAndHelpMessage: Story;
|
|
15
15
|
/** Label component With props `mandatory=true` in mode Skeleton */
|
|
16
16
|
export declare const Mandatory: Story;
|
|
17
|
-
/**
|
|
18
|
-
export declare const
|
|
19
|
-
/** Label component in mode Skeleton */
|
|
20
|
-
export declare const Skeleton: Story;
|
|
17
|
+
/** Base Label component mode Skeleton */
|
|
18
|
+
export declare const BaseSkeleton: Story;
|
|
@@ -11,7 +11,7 @@ declare const meta: Meta<typeof Label>;
|
|
|
11
11
|
export default meta;
|
|
12
12
|
type Story = StoryObj<typeof Label>;
|
|
13
13
|
/** Label component Props Comunes */
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const MandatoryAndHelpmessage: Story;
|
|
15
15
|
/** Label component With props `mandatory=true` */
|
|
16
16
|
export declare const Mandatory: Story;
|
|
17
17
|
/** Label component With props `helperMessage` */
|
|
@@ -19,10 +19,18 @@ export interface LabelProps {
|
|
|
19
19
|
id?: string;
|
|
20
20
|
/** Define el tamaño de la etiqueta. Puede ser 'small' o 'medium'. Por defecto es 'medium'. */
|
|
21
21
|
size?: 'small' | 'medium';
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Los elementos secundarios que se renderizarán dentro del componente.
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Clase CSS personalizada que se aplicará al componente.
|
|
28
|
+
*/
|
|
23
29
|
className?: string;
|
|
24
30
|
/** Indica si hay un error en el campo asociado a la etiqueta. */
|
|
25
31
|
error?: boolean;
|
|
32
|
+
/** Indica si el componente está deshabilitado. */
|
|
33
|
+
disabled?: boolean;
|
|
26
34
|
}
|
|
27
35
|
export type OwnerState = Pick<LabelProps, 'size' | 'variantLabel'>;
|
|
28
36
|
export interface LabelOwnerState extends LabelProps, OwnerState {
|
|
@@ -1,2 +1,24 @@
|
|
|
1
1
|
import { CheckboxProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente CheckBox
|
|
4
|
+
*
|
|
5
|
+
* Este componente representa un checkbox personalizado que puede ser utilizado en formularios y otros lugares donde se necesite una opción de selección.
|
|
6
|
+
* @param {CheckboxProps} props - Las propiedades del componente.
|
|
7
|
+
* @param {React.Ref<HTMLDivElement>} ref - La referencia al elemento raíz del componente.
|
|
8
|
+
* @returns {JSX.Element} El componente CheckBox renderizado.
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <CheckBox
|
|
12
|
+
* size="medium"
|
|
13
|
+
* disabled={false}
|
|
14
|
+
* color="primary"
|
|
15
|
+
* label="Acepto los términos y condiciones"
|
|
16
|
+
* mandatory={true}
|
|
17
|
+
* mandatoryMessage="Este campo es obligatorio"
|
|
18
|
+
* helperMessage="Más información"
|
|
19
|
+
* htmlFor="checkbox-id"
|
|
20
|
+
* error={false}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
2
24
|
export declare const CheckBox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,45 +1,67 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import { Checkbox } from "@mui/material";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
5
|
-
import { u as useUtilityClasses } from "./classes/index.js";
|
|
6
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
7
|
-
import { S as SkeletonCheckBox } from "./subcomponents/Skeleton/index.js";
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
2
|
import { forwardRef } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
4
|
+
import { useTheme } from "@mui/material";
|
|
5
|
+
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
6
|
+
import { C as CheckBoxRootStyled, M as MUICheckboxStyled, L as LabelCheckBoxStyled, S as SkeletonStyled } from "./slots/CheckBoxSlots.js";
|
|
11
7
|
const CheckBox = forwardRef((props, ref) => {
|
|
12
8
|
const {
|
|
13
9
|
className,
|
|
14
10
|
size = "small",
|
|
15
11
|
disabled,
|
|
12
|
+
color = "primary",
|
|
16
13
|
label,
|
|
17
14
|
mandatory,
|
|
18
15
|
mandatoryMessage,
|
|
19
16
|
helperMessage,
|
|
20
17
|
htmlFor,
|
|
18
|
+
error,
|
|
21
19
|
...others
|
|
22
20
|
} = props;
|
|
23
|
-
const
|
|
21
|
+
const { currentSize } = useComponentSize(size);
|
|
22
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
24
23
|
const isSkeleton = useModuleSkeleton();
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
const paletteColor = getPropertyByString(
|
|
26
|
+
theme.palette,
|
|
27
|
+
disabled ? "default" : error ? "error" : color,
|
|
28
|
+
theme.palette.default
|
|
29
|
+
);
|
|
25
30
|
const ownerState = {
|
|
26
|
-
|
|
27
|
-
disabled
|
|
31
|
+
CheckBoxPaletteColor: paletteColor,
|
|
32
|
+
CheckBoxDisabled: disabled,
|
|
33
|
+
CheckBoxColor: color,
|
|
34
|
+
CheckBoxError: error,
|
|
35
|
+
CheckBoxSizes: adjustedSize
|
|
28
36
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
return /* @__PURE__ */ jsx(CheckBoxRootStyled, { ref, ownerState: { ...ownerState }, children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
MUICheckboxStyled,
|
|
40
|
+
{
|
|
41
|
+
ownerState: { ownerState },
|
|
42
|
+
disableRipple: true,
|
|
43
|
+
id: htmlFor,
|
|
44
|
+
tabIndex: 0,
|
|
45
|
+
...others
|
|
46
|
+
}
|
|
47
|
+
),
|
|
32
48
|
label && /* @__PURE__ */ jsx(
|
|
33
|
-
|
|
49
|
+
LabelCheckBoxStyled,
|
|
34
50
|
{
|
|
51
|
+
ownerState: { ...ownerState },
|
|
35
52
|
label,
|
|
53
|
+
className: "MuiTypography-checkbox",
|
|
36
54
|
mandatory,
|
|
37
55
|
mandatoryMessage,
|
|
38
56
|
helperMessage,
|
|
39
|
-
htmlFor
|
|
57
|
+
htmlFor,
|
|
58
|
+
disabled
|
|
40
59
|
}
|
|
41
60
|
)
|
|
42
|
-
] })
|
|
61
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "rounded", width: "24px", height: "24px" }),
|
|
63
|
+
label && /* @__PURE__ */ jsx(SkeletonStyled, { ownerState: {}, variant: "text", width: "100px", height: "24px" })
|
|
64
|
+
] }) });
|
|
43
65
|
});
|
|
44
66
|
export {
|
|
45
67
|
CheckBox as C
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const checkBoxStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilos generales para el checkbox
|
|
4
|
+
*/
|
|
5
|
+
root: ({ theme, ownerState }) => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
outline: "none",
|
|
9
|
+
paddingRight: theme.vars.size.baseSpacings.sp1,
|
|
10
|
+
overflow: "visible",
|
|
11
|
+
boxSizing: "border-box",
|
|
12
|
+
gap: theme.vars.size.baseSpacings.sp1,
|
|
13
|
+
//Estilos para el checkbox
|
|
14
|
+
"& .MuiCheckbox-root": {
|
|
15
|
+
color: ownerState.CheckBoxPaletteColor?.main || theme.vars.palette?.text.primary,
|
|
16
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
17
|
+
"&:active": {
|
|
18
|
+
color: ownerState.CheckBoxPaletteColor?.active,
|
|
19
|
+
backgroundColor: ownerState.CheckBoxPaletteColor?.activeOpacity
|
|
20
|
+
},
|
|
21
|
+
"&.Mui-checked": {
|
|
22
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
23
|
+
color: ownerState.CheckBoxPaletteColor?.main,
|
|
24
|
+
"&:active": {
|
|
25
|
+
color: ownerState.CheckBoxPaletteColor?.active,
|
|
26
|
+
backgroundColor: ownerState.CheckBoxPaletteColor?.activeOpacity
|
|
27
|
+
},
|
|
28
|
+
"&:hover": {
|
|
29
|
+
color: ownerState.CheckBoxPaletteColor?.hover,
|
|
30
|
+
backgroundColor: ownerState.CheckBoxPaletteColor?.hoverOpacity
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// Historia Disabled para CheckBox
|
|
34
|
+
...ownerState.CheckBoxDisabled && {
|
|
35
|
+
color: theme.vars.palette?.text.disabled,
|
|
36
|
+
pointerEvents: ownerState.CheckBoxDisabled ? "none" : "auto",
|
|
37
|
+
"&:hover": {
|
|
38
|
+
pointerEvents: ownerState.CheckBoxDisabled ? "none" : "auto"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
//Estilos para el label del CheckBox Disabled
|
|
43
|
+
"& .MuiTypography-root": {
|
|
44
|
+
...ownerState.CheckBoxDisabled && {
|
|
45
|
+
color: `${theme.vars.palette?.text.disabled} !important`
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
//Clase de estilo para cuando esta en estado hover pero no esta seleccionado el CheckBox
|
|
49
|
+
"& .MuiCheckbox-root:not(.Mui-checked):hover": {
|
|
50
|
+
backgroundColor: theme.palette.action.selected
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
/**
|
|
54
|
+
* Componente MuiCheckBox, FocusVisible para cuando esta seleccionado el CheckBox
|
|
55
|
+
*/
|
|
56
|
+
muiCheckBox: ({ theme }) => ({
|
|
57
|
+
overflow: "visible",
|
|
58
|
+
"&.Mui-focusVisible, &:focus-visible": {
|
|
59
|
+
"&::before": {
|
|
60
|
+
content: '""',
|
|
61
|
+
position: "absolute",
|
|
62
|
+
inset: "0px",
|
|
63
|
+
border: theme.vars.size.borderStroke.container,
|
|
64
|
+
color: theme.vars.palette.primary.main,
|
|
65
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
66
|
+
boxSizing: "border-box"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"&.MuiButtonBase-root": {}
|
|
70
|
+
}),
|
|
71
|
+
/**
|
|
72
|
+
* Estilos para el label del CheckBox
|
|
73
|
+
*/
|
|
74
|
+
skeletonStyled: ({ theme }) => ({
|
|
75
|
+
borderRadius: theme.vars.size.borderRadius.r1
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
checkBoxStyles as c
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CHECK_BOX_KEY_COMPONENT = "M4LCheckBox";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var CheckBoxSlots = /* @__PURE__ */ ((CheckBoxSlots2) => {
|
|
2
|
+
CheckBoxSlots2["root"] = "root";
|
|
3
|
+
CheckBoxSlots2["muiCheckBox"] = "muiCheckBox";
|
|
4
|
+
CheckBoxSlots2["labelCheckBox"] = "labelCheckBox";
|
|
5
|
+
CheckBoxSlots2["skeletonStyled"] = "skeletonStyled";
|
|
6
|
+
return CheckBoxSlots2;
|
|
7
|
+
})(CheckBoxSlots || {});
|
|
8
|
+
export {
|
|
9
|
+
CheckBoxSlots as C
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const CheckBoxRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const MUICheckboxStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').CheckboxProps, keyof import('@mui/material').CheckboxProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
|
|
5
|
+
ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
|
|
6
|
+
}, {}, {}>;
|
|
7
|
+
export declare const LabelCheckBoxStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Label').LabelProps, keyof import('../../../Label').LabelProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
|
|
8
|
+
ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export declare const SkeletonStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
11
|
+
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;
|
|
12
|
+
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "variant" | "width" | "height" | "translate" | "animation" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown> & {
|
|
13
|
+
ownerState: Partial<import('../types').CheckBoxOwnerState> & Record<string, unknown>;
|
|
14
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { Checkbox, Skeleton } from "@mui/material";
|
|
3
|
+
import { C as CheckBoxSlots } from "./CheckBoxEnum.js";
|
|
4
|
+
import { C as CHECK_BOX_KEY_COMPONENT } from "../constants.js";
|
|
5
|
+
import { c as checkBoxStyles } from "../CheckBox.styles.js";
|
|
6
|
+
import { L as Label } from "../../../Label/Label.js";
|
|
7
|
+
const CheckBoxRootStyled = styled("div", {
|
|
8
|
+
name: CHECK_BOX_KEY_COMPONENT,
|
|
9
|
+
slot: CheckBoxSlots.root
|
|
10
|
+
})(checkBoxStyles?.root);
|
|
11
|
+
const MUICheckboxStyled = styled(Checkbox, {
|
|
12
|
+
name: CHECK_BOX_KEY_COMPONENT,
|
|
13
|
+
slot: CheckBoxSlots.muiCheckBox
|
|
14
|
+
})(checkBoxStyles?.muiCheckBox);
|
|
15
|
+
const LabelCheckBoxStyled = styled(Label, {
|
|
16
|
+
name: CHECK_BOX_KEY_COMPONENT,
|
|
17
|
+
slot: CheckBoxSlots.labelCheckBox
|
|
18
|
+
})(checkBoxStyles?.labelCheckBox);
|
|
19
|
+
const SkeletonStyled = styled(Skeleton, {
|
|
20
|
+
name: CHECK_BOX_KEY_COMPONENT,
|
|
21
|
+
slot: CheckBoxSlots.skeletonStyled
|
|
22
|
+
})(checkBoxStyles?.skeletonStyled);
|
|
23
|
+
export {
|
|
24
|
+
CheckBoxRootStyled as C,
|
|
25
|
+
LabelCheckBoxStyled as L,
|
|
26
|
+
MUICheckboxStyled as M,
|
|
27
|
+
SkeletonStyled as S
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,6 +1,47 @@
|
|
|
1
|
-
import { CheckboxProps as MUICheckboxProps } from '@mui/material';
|
|
1
|
+
import { CheckboxProps as MUICheckboxProps, PaletteColor, Theme } from '@mui/material';
|
|
2
2
|
import { LabelProps } from '../../Label/types';
|
|
3
|
+
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
4
|
+
import { CheckBoxSlots } from './slots';
|
|
5
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
|
+
import { CHECK_BOX_KEY_COMPONENT } from './constants';
|
|
3
7
|
export type OwnerState = Pick<CheckboxProps, 'size' | 'disabled'>;
|
|
8
|
+
/**
|
|
9
|
+
* Variants for the CheckBox component.
|
|
10
|
+
*/
|
|
11
|
+
export type CheckBoxVariants = 'standard';
|
|
4
12
|
export interface CheckboxProps extends MUICheckboxProps, Omit<LabelProps, 'label' | 'size'> {
|
|
5
13
|
label?: string;
|
|
14
|
+
color?: Extract<ComponentPalletColor, 'primary'>;
|
|
6
15
|
}
|
|
16
|
+
export interface CheckBoxOwnerState {
|
|
17
|
+
/**
|
|
18
|
+
* Indica si el CheckBox está deshabilitado.
|
|
19
|
+
*/
|
|
20
|
+
CheckBoxDisabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Color de la paleta de CheckBox.
|
|
23
|
+
*/
|
|
24
|
+
CheckBoxPaletteColor: PaletteColor;
|
|
25
|
+
/**
|
|
26
|
+
* Variante de CheckBox.
|
|
27
|
+
*/
|
|
28
|
+
CheckBoxVariant?: CheckBoxVariants;
|
|
29
|
+
/**
|
|
30
|
+
* Color de la paleta del componente del CheckBox.
|
|
31
|
+
*/
|
|
32
|
+
CheckBoxComponentPaletteColor?: ComponentPalletColor;
|
|
33
|
+
/**
|
|
34
|
+
* Tamaño de CheckBox.
|
|
35
|
+
*/
|
|
36
|
+
CheckBoxSizes: Extract<Sizes, 'small' | 'medium'>;
|
|
37
|
+
/**
|
|
38
|
+
* Indica si CheckBox es error.
|
|
39
|
+
*/
|
|
40
|
+
CheckBoxError?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Color del campo de CheckBox.
|
|
43
|
+
*/
|
|
44
|
+
CheckBoxColor?: Extract<ComponentPalletColor, 'primary'>;
|
|
45
|
+
}
|
|
46
|
+
export type CheckBoxSlotsType = keyof typeof CheckBoxSlots;
|
|
47
|
+
export type CheckBoxStyles = Partial<OverridesStyleRules<CheckBoxSlotsType, typeof CHECK_BOX_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { R as RootStyled,
|
|
2
|
+
import { R as RootStyled, T as ToolipStyled } from "./slots/TooltipSlots.js";
|
|
3
3
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
4
4
|
const Tooltip = (props) => {
|
|
5
5
|
const { size, children, ...others } = props;
|
|
@@ -8,13 +8,11 @@ const Tooltip = (props) => {
|
|
|
8
8
|
RootStyled,
|
|
9
9
|
{
|
|
10
10
|
ownerState: { size: currentSize },
|
|
11
|
-
size: currentSize,
|
|
12
|
-
components: {},
|
|
13
11
|
...others,
|
|
14
|
-
slots: {
|
|
12
|
+
slots: { tooltip: ToolipStyled },
|
|
15
13
|
slotProps: {
|
|
16
14
|
// @ts-ignore ownerState ignorado porque sobre escribe en tipos del styled
|
|
17
|
-
popper: { ownerState: { size: currentSize } }
|
|
15
|
+
//popper: { ownerState: { size: currentSize } },
|
|
18
16
|
},
|
|
19
17
|
children
|
|
20
18
|
}
|
|
@@ -1,61 +1,17 @@
|
|
|
1
1
|
const tooltipStyles = {
|
|
2
|
-
root: {},
|
|
3
|
-
popper: {
|
|
4
|
-
padding: "8px 12px"
|
|
5
|
-
},
|
|
2
|
+
root: ({}) => ({}),
|
|
6
3
|
/**
|
|
7
|
-
*
|
|
4
|
+
* Estilos del componente Tooltip
|
|
8
5
|
*/
|
|
9
|
-
tooltip: ({ theme
|
|
10
|
-
display: "flex",
|
|
11
|
-
alignItems: "center",
|
|
6
|
+
tooltip: ({ theme }) => ({
|
|
12
7
|
background: theme.vars.palette.background.default,
|
|
13
|
-
|
|
8
|
+
padding: theme.vars.size.baseSpacings.sp2,
|
|
9
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
14
10
|
boxShadow: theme.vars.customShadows.z3,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
minHeight: "32px",
|
|
20
|
-
height: "32px",
|
|
21
|
-
padding: "8px 12px",
|
|
22
|
-
...ownerState.size === "large" && {
|
|
23
|
-
...theme.generalSettings.isMobile ? {
|
|
24
|
-
minHeight: "36px !important",
|
|
25
|
-
height: "36px !important",
|
|
26
|
-
fontSize: "16px !important",
|
|
27
|
-
lineHeight: "28px !important"
|
|
28
|
-
} : {
|
|
29
|
-
minHeight: "28px !important",
|
|
30
|
-
height: "28px !important",
|
|
31
|
-
fontSize: "14px !important",
|
|
32
|
-
lineHeight: "24px !important"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
...ownerState.size === "medium" && {
|
|
36
|
-
...theme.generalSettings.isMobile ? {
|
|
37
|
-
minHeight: "32px !important",
|
|
38
|
-
height: "32px !important",
|
|
39
|
-
fontSize: "14px !important",
|
|
40
|
-
lineHeight: "17px !important"
|
|
41
|
-
} : {
|
|
42
|
-
minHeight: "24px !important",
|
|
43
|
-
height: "24px !important",
|
|
44
|
-
fontSize: "11px !important",
|
|
45
|
-
lineHeight: "13px !important"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
...ownerState.size === "small" && {
|
|
49
|
-
...theme.generalSettings.isMobile ? {
|
|
50
|
-
minHeight: "28px !important",
|
|
51
|
-
height: "28px !important",
|
|
52
|
-
fontSize: "13px !important",
|
|
53
|
-
lineHeight: "16px !important"
|
|
54
|
-
} : {
|
|
55
|
-
minHeight: "20px !important",
|
|
56
|
-
height: "20px !important",
|
|
57
|
-
fontSize: "10px !important",
|
|
58
|
-
lineHeight: "12px !important"
|
|
11
|
+
".MuiTooltip-arrow": {
|
|
12
|
+
"&::before": {
|
|
13
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
14
|
+
borderRadius: theme.vars.size.borderRadius["r0-5"]
|
|
59
15
|
}
|
|
60
16
|
}
|
|
61
17
|
})
|
|
@@ -7,7 +7,7 @@ const RootStyled = styled(Tooltip, {
|
|
|
7
7
|
name: TOOLTIP_KEY_COMPONENT,
|
|
8
8
|
slot: TooltipSlots.root
|
|
9
9
|
})(tooltipStyles?.root);
|
|
10
|
-
|
|
10
|
+
styled(Popper, {
|
|
11
11
|
name: TOOLTIP_KEY_COMPONENT,
|
|
12
12
|
slot: TooltipSlots.popper
|
|
13
13
|
})(tooltipStyles?.popper);
|
|
@@ -16,7 +16,6 @@ const ToolipStyled = styled("div", {
|
|
|
16
16
|
slot: TooltipSlots.tooltip
|
|
17
17
|
})(tooltipStyles?.tooltip);
|
|
18
18
|
export {
|
|
19
|
-
PopperStyled as P,
|
|
20
19
|
RootStyled as R,
|
|
21
20
|
ToolipStyled as T
|
|
22
21
|
};
|
|
@@ -3,12 +3,21 @@ import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
|
3
3
|
import { TooltipSlots } from './slots';
|
|
4
4
|
import { TOOLTIP_KEY_COMPONENT } from './constants';
|
|
5
5
|
import { Sizes } from '@m4l/styles';
|
|
6
|
+
import { ArrowType } from '../Popover/types';
|
|
6
7
|
export interface TooltipProps extends Omit<MUITooltipProps, 'sx'> {
|
|
7
8
|
sx?: SxProps<Theme> | Partial<OverridesStyleRules<string, ComponentNameToClassKey, Theme>>;
|
|
8
9
|
/**
|
|
9
10
|
* Tamaño del componente, puede ser uno de los valores definidos en 'small' , 'medium' , 'large'.
|
|
10
11
|
*/
|
|
11
12
|
size?: Sizes;
|
|
13
|
+
/**
|
|
14
|
+
* Tipo de flecha que se mostrará en el tooltip.
|
|
15
|
+
*/
|
|
16
|
+
arrowType?: ArrowType;
|
|
17
|
+
/**
|
|
18
|
+
* Define la posición general del tooltip en relación con el elemento de referencia.
|
|
19
|
+
*/
|
|
20
|
+
placement?: MUITooltipProps['placement'];
|
|
12
21
|
}
|
|
13
22
|
export type TooltipSlotsType = keyof typeof TooltipSlots;
|
|
14
23
|
export type TooltipOwnerState = TooltipProps;
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado `disabled` del checkbox se utiliza para indicar que el checkbox no está disponible para la interacción del usuario. Cuando un checkbox está en estado `disabled`:
|
|
5
|
+
*
|
|
6
|
+
* - No puede ser seleccionado ni deseleccionado por el usuario.
|
|
7
|
+
* - No responde a eventos de clic ni de teclado.
|
|
8
|
+
* - Se muestra con un estilo visual diferente (generalmente más tenue) para indicar que está deshabilitado.
|
|
9
|
+
*
|
|
10
|
+
* Este estado es útil en situaciones donde una opción no debe estar disponible para el usuario hasta que se cumplan ciertas condiciones o para evitar cambios en opciones que no deben ser modificadas.
|
|
11
|
+
*/
|
|
12
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
15
|
+
/** CheckBox StateDisabled whit inlineText and Checked */
|
|
16
|
+
export declare const DisabledCheckBox: Story;
|
|
17
|
+
/** CheckBox State Disabled whit inlineText no checked */
|
|
18
|
+
export declare const DisabledInlineText: Story;
|
|
19
|
+
/** CheckBox State Disabled only Checked */
|
|
20
|
+
export declare const DisabledChecked: Story;
|
|
21
|
+
/** CheckBox State Disabled no checked */
|
|
22
|
+
export declare const DisabledNotChecked: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* CheckBox es un componente React que renderiza un campo de selección de tipo checkbox, el cual puede ser utilizado en formularios o en cualquier lugar donde se necesite una selección múltiple.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
9
|
+
/** Base CheckBox component in mode Skeleton */
|
|
10
|
+
export declare const SkeletonCheckBox: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado "active" en un checkbox con variante de error se refiere a la apariencia y comportamiento del checkbox cuando está seleccionado, indicando que hay un error asociado.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
9
|
+
/** CheckBox State Active whit inlineText and Checked */
|
|
10
|
+
export declare const ActiveCheckBox: Story;
|
|
11
|
+
/** CheckBox State Active whit inlineText no checked */
|
|
12
|
+
export declare const ActiveInlineText: Story;
|
|
13
|
+
/** CheckBox State Active only Checked */
|
|
14
|
+
export declare const ActiveChecked: Story;
|
|
15
|
+
/** CheckBox State Active no checked */
|
|
16
|
+
export declare const ActiveNotChecked: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* Un checkbox en estado "enabled" con variante de error significa que el checkbox está activo y disponible para ser interactuado por el usuario, pero está resaltado para indicar que hay un error asociado.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
9
|
+
/** CheckBox State Enabled whit inlineText and Checked */
|
|
10
|
+
export declare const EnabledCheckBox: Story;
|
|
11
|
+
/** CheckBox State Enabled whit inlineText no checked */
|
|
12
|
+
export declare const EnabledInlineText: Story;
|
|
13
|
+
/** CheckBox State Enabled only Checked */
|
|
14
|
+
export declare const EnabledChecked: Story;
|
|
15
|
+
/** CheckBox State Enabled no checked */
|
|
16
|
+
export declare const EnabledNotChecked: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado "focusVisible" en un checkbox con variante de error se refiere a la apariencia y comportamiento del checkbox cuando ha recibido el foco de entrada y está visible para el usuario, indicando que hay un error asociado.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
9
|
+
/** CheckBox State FocusVisible whit inlineText and Checked */
|
|
10
|
+
export declare const FocusVisibleCheckBox: Story;
|
|
11
|
+
/** CheckBox State FocusVisible whit inlineText no checked */
|
|
12
|
+
export declare const FocusVisibleInlineText: Story;
|
|
13
|
+
/** CheckBox State FocusVisible only Checked */
|
|
14
|
+
export declare const FocusVisibleChecked: Story;
|
|
15
|
+
/** CheckBox State FocusVisible no checked */
|
|
16
|
+
export declare const FocusVisibleNotChecked: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado "hover" en un checkbox con variante de error se refiere a la apariencia y comportamiento del checkbox cuando el usuario coloca el cursor sobre él, indicando que hay un error asociado
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
9
|
+
/** CheckBox State Hover whit inlineText and Checked */
|
|
10
|
+
export declare const HoverCheckBox: Story;
|
|
11
|
+
/** CheckBox State Hover whit inlineText no checked */
|
|
12
|
+
export declare const HoverInlineText: Story;
|
|
13
|
+
/** CheckBox State Hover only Checked */
|
|
14
|
+
export declare const HoverChecked: Story;
|
|
15
|
+
/** CheckBox State Hover no checked */
|
|
16
|
+
export declare const HoverNotChecked: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El componente CheckBox es versátil y se puede utilizar en diversas situaciones donde se necesite una selección múltiple.
|
|
5
|
+
* Las variantes del componente permiten personalizar su apariencia y comportamiento, incluyendo la visualización de mensajes de ayuda y la indicación de obligatoriedad.
|
|
6
|
+
* La variante primaria en estado activo es especialmente útil para resaltar los checkboxes seleccionados, mejorando la experiencia del usuario en formularios y listas.
|
|
7
|
+
*/
|
|
8
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
11
|
+
/** CheckBox State Active whit inlineText and Checked */
|
|
12
|
+
export declare const ActiveCheckBox: Story;
|
|
13
|
+
/** CheckBox State Active whit inlineText no checked */
|
|
14
|
+
export declare const ActiveInlineText: Story;
|
|
15
|
+
/** CheckBox State Active only Checked */
|
|
16
|
+
export declare const ActiveCheked: Story;
|
|
17
|
+
/** CheckBox State Active no checked */
|
|
18
|
+
export declare const ActiveNotChecked: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* Un checkbox en estado "enabled" con variante primaria es un elemento interactivo que sigue el estilo principal de la aplicación.
|
|
5
|
+
* Está disponible para ser seleccionado o deseleccionado por el usuario y utiliza el color primario del tema para indicar su estado activo.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
10
|
+
/** CheckBox State Enabled whit inlineText and Checked */
|
|
11
|
+
export declare const EnabledCheckBox: Story;
|
|
12
|
+
/** CheckBox State Enabled whit inlineText no checked */
|
|
13
|
+
export declare const EnabledInlineText: Story;
|
|
14
|
+
/** CheckBox State Enabled only Checked */
|
|
15
|
+
export declare const EnabledChecked: Story;
|
|
16
|
+
/** CheckBox State Enabled no checked */
|
|
17
|
+
export declare const EnabledNotChecked: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado "focusVisible" en un checkbox con variante primaria se refiere a la apariencia y comportamiento del checkbox cuando ha recibido el foco de entrada y está visible para el usuario.
|
|
5
|
+
* Este estado es importante para la accesibilidad, ya que ayuda a los usuarios a identificar visualmente cuál elemento de la interfaz está actualmente enfocado, especialmente cuando navegan usando el teclado.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
10
|
+
/** CheckBox State FocusVisible whit inlineText and Checked */
|
|
11
|
+
export declare const FocusVisibleCheckBox: Story;
|
|
12
|
+
/** CheckBox State FocusVisible whit inlineText no checked */
|
|
13
|
+
export declare const FocusVisibleInlineText: Story;
|
|
14
|
+
/** CheckBox State FocusVisible only Checked */
|
|
15
|
+
export declare const FocusVisibleChecked: Story;
|
|
16
|
+
/** CheckBox State FocusVisible no checked */
|
|
17
|
+
export declare const FocusVisibleNotChecked: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CheckBox } from '../../../../../../../../src/components/mui_extended/CheckBox';
|
|
3
|
+
/**
|
|
4
|
+
* El estado "hover" en un checkbox con variante primaria se refiere a la apariencia y comportamiento del checkbox cuando el usuario coloca el cursor sobre él.
|
|
5
|
+
* Este estado proporciona una retroalimentación visual inmediata, indicando que el elemento es interactivo y puede ser seleccionado o deseleccionado.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof CheckBox>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
10
|
+
/** CheckBox State Hover whit inlineText and Checked */
|
|
11
|
+
export declare const HoverCheckBox: Story;
|
|
12
|
+
/** CheckBox State Hover whit inlineText no checked */
|
|
13
|
+
export declare const HoverInlineText: Story;
|
|
14
|
+
/** CheckBox State Hover only Checked */
|
|
15
|
+
export declare const HoverChecked: Story;
|
|
16
|
+
/** CheckBox State Hover no checked */
|
|
17
|
+
export declare const HoverNotChecked: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tooltip } from '../../../../../src/components/mui_extended/Tooltip';
|
|
3
|
+
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
+
/** Bottom Center Predeterminado 👑 */
|
|
7
|
+
export declare const BottomCenter: Story;
|
|
8
|
+
/** Bottom Left */
|
|
9
|
+
export declare const BottomtLeft: Story;
|
|
10
|
+
/** Bottom Right */
|
|
11
|
+
export declare const BottomRight: Story;
|
|
12
|
+
/** Top Center */
|
|
13
|
+
export declare const TopCenter: Story;
|
|
14
|
+
/** Top Start */
|
|
15
|
+
export declare const TopStart: Story;
|
|
16
|
+
/** Top End */
|
|
17
|
+
export declare const TopEnd: Story;
|
|
18
|
+
/** Top End */
|
|
19
|
+
export declare const LeftStart: Story;
|
|
20
|
+
/** Left End */
|
|
21
|
+
export declare const LeftEnd: Story;
|
|
22
|
+
/** Left Center */
|
|
23
|
+
export declare const LeftCenter: Story;
|
|
24
|
+
/** Right Center */
|
|
25
|
+
export declare const RightCenter: Story;
|
|
26
|
+
/** Right Start */
|
|
27
|
+
export declare const RightStart: Story;
|
|
28
|
+
/** Right End */
|
|
29
|
+
export declare const RightEnd: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Label } from '../../../../Label';
|
|
3
|
-
/**
|
|
4
|
-
* Label es un componente React que renderiza una etiqueta de texto, la cual puede ser utilizada en formularios o en cualquier
|
|
5
|
-
* lugar donde se necesite una descripción textual.
|
|
6
|
-
* Soporta la visualización de un indicador de campo obligatorio, mensaje de ayuda a través
|
|
7
|
-
* de un tooltip, y puede adaptar su tamaño. El componente también puede mostrar un estado de esqueleto, indicando
|
|
8
|
-
* que el contenido está cargando.
|
|
9
|
-
*/
|
|
10
|
-
declare const meta: Meta<typeof Label>;
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof Label>;
|
|
13
|
-
/** Base Label component */
|
|
14
|
-
export declare const Default: Story;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Label } from '../../../../Label';
|
|
3
|
-
/**
|
|
4
|
-
* Label es un componente React que renderiza una etiqueta de texto, la cual puede ser utilizada en formularios o en cualquier
|
|
5
|
-
* lugar donde se necesite una descripción textual.
|
|
6
|
-
* Soporta la visualización de un indicador de campo obligatorio, mensaje de ayuda a través
|
|
7
|
-
* de un tooltip, y puede adaptar su tamaño. El componente también puede mostrar un estado de esqueleto, indicando
|
|
8
|
-
* que el contenido está cargando.
|
|
9
|
-
*/
|
|
10
|
-
declare const meta: Meta<typeof Label>;
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof Label>;
|
|
13
|
-
/** Base Label component */
|
|
14
|
-
export declare const WithObligationAndHelp: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CheckboxClassesType } from './types';
|
|
2
|
-
import { OwnerState } from '../types';
|
|
3
|
-
export declare const checkboxClasses: CheckboxClassesType;
|
|
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
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { C as COMPONENT_CLASS_NAME } from "./constants.js";
|
|
4
|
-
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root",
|
|
7
|
-
"skeleton",
|
|
8
|
-
/* states or variants of elements */
|
|
9
|
-
"small",
|
|
10
|
-
"medium",
|
|
11
|
-
"stateDisabled"
|
|
12
|
-
]);
|
|
13
|
-
function getRHFCheckboxUtilityClass(slot) {
|
|
14
|
-
return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
|
|
15
|
-
}
|
|
16
|
-
const useUtilityClasses = (ownerState) => {
|
|
17
|
-
const slots = {
|
|
18
|
-
root: [
|
|
19
|
-
"root",
|
|
20
|
-
ownerState.size === "small" && "small",
|
|
21
|
-
ownerState.size === "medium" && "medium",
|
|
22
|
-
ownerState.disabled && "stateDisabled"
|
|
23
|
-
],
|
|
24
|
-
skeleton: ["skeleton"]
|
|
25
|
-
};
|
|
26
|
-
const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
|
|
27
|
-
return {
|
|
28
|
-
...composedClasses
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
useUtilityClasses as u
|
|
33
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useUtilityClasses } from '.';
|
|
2
|
-
export interface CheckboxClassesType {
|
|
3
|
-
root: string;
|
|
4
|
-
skeleton: string;
|
|
5
|
-
small: string;
|
|
6
|
-
medium: string;
|
|
7
|
-
stateDisabled: string;
|
|
8
|
-
}
|
|
9
|
-
export type CheckBoxClassesKey = keyof CheckboxClassesType;
|
|
10
|
-
export type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CheckBoxRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Skeleton } from "@mui/material";
|
|
3
|
-
const SkeletonCheckBox = (props) => {
|
|
4
|
-
const { classes } = props;
|
|
5
|
-
return /* @__PURE__ */ jsx("div", { className: classes.skeleton, children: /* @__PURE__ */ jsx(Skeleton, { variant: "rounded", width: "18px", height: "18px" }) });
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
SkeletonCheckBox as S
|
|
9
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Tooltip } from '.';
|
|
3
|
-
declare const meta: Meta<typeof Tooltip>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Tooltip>;
|
|
6
|
-
/**
|
|
7
|
-
* Base Tooltip component
|
|
8
|
-
*/
|
|
9
|
-
export declare const Base: Story;
|
|
10
|
-
/**
|
|
11
|
-
* Tooltip in large size
|
|
12
|
-
*/
|
|
13
|
-
export declare const TooltipSizeLarge: Story;
|
|
14
|
-
/**
|
|
15
|
-
* Tooltip in medium size
|
|
16
|
-
*/
|
|
17
|
-
export declare const TooltipSizeMedium: Story;
|
|
18
|
-
/**
|
|
19
|
-
* Tooltip in small size
|
|
20
|
-
*/
|
|
21
|
-
export declare const TooltipSizeSmall: Story;
|
|
22
|
-
/**
|
|
23
|
-
* Tooltip in focus mode
|
|
24
|
-
*/
|
|
25
|
-
export declare const TooltipWithTab: Story;
|