@m4l/components 9.1.23 → 9.1.25
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/.storybook/constants.d.ts +19 -0
- package/.storybook/decorators/WithContexts/index.d.ts +1 -0
- package/.storybook/decorators/WithContexts/types.d.ts +7 -0
- package/.storybook/decorators/WithForm/index.d.ts +1 -0
- package/.storybook/decorators/WithFormAutoValidation/index.d.ts +1 -0
- package/.storybook/decorators/WithMapProvider/constants.d.ts +2 -0
- package/.storybook/decorators/WithMapProvider/index.d.ts +1 -0
- package/.storybook/decorators/WithPopupsProvider/index.d.ts +1 -0
- package/.storybook/decorators/WithScaleIcons/index.d.ts +1 -0
- package/.storybook/decorators/WithWindowsContainer/index.d.ts +1 -0
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/index.d.ts +1 -0
- package/.storybook/decorators/WithWindowsContainer/subcomponents/WindowsContainer/types.d.ts +4 -0
- package/.storybook/decorators/WithWrapper/index.d.ts +1 -0
- package/.storybook/decorators/WithWrapper/types.d.ts +11 -0
- package/.storybook/main.d.ts +3 -0
- package/.storybook/storybook.vite.d.ts +2 -0
- package/.storybook/utils/getGlobalsFromSearchParams.d.ts +7 -0
- package/.storybook/utils/getStylesColorsByMode.d.ts +624 -0
- package/@types/types.d.ts +8 -0
- package/components/CommonActions/classes/index.d.ts +1 -1
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
- package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/ControlIncrement/slots/ControltrolIncrementSlots.d.ts +1 -1
- package/components/DataGrid/classes/index.d.ts +1 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/Label/slots/LabelSlots.d.ts +1 -1
- package/components/ModalDialog/slots/ModalDialogSlots.d.ts +3 -3
- package/components/Period/classes/index.d.ts +1 -1
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +1 -1
- package/components/WindowConfirm/slots/WindowConfirmSlots.d.ts +3 -3
- package/components/extended/React-Resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/React-Resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/classes/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +1 -1
- package/components/hook-form/RHFDateTime/classes/index.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/index.d.ts +1 -1
- package/components/maps/components/Map/classes/index.d.ts +1 -1
- package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
- package/components/mui_extended/Autocomplete/slots /AutocompleteSlots.d.ts +2 -2
- package/components/mui_extended/Avatar/classes/index.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/Button.d.ts +2 -2
- package/components/mui_extended/Button/Button.js +1 -2
- package/components/mui_extended/Button/classes/index.d.ts +1 -1
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
- package/components/mui_extended/Pager/classes/index.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
- package/components/mui_extended/Tabs/styles.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +2 -2
- package/components/mui_extended/ToggleButton/ToggleButton.js +17 -7
- package/components/mui_extended/ToggleButton/ToggleButton.styles.d.ts +2 -0
- package/components/mui_extended/ToggleButton/ToggleButton.styles.js +31 -0
- package/components/mui_extended/ToggleButton/constants.d.ts +1 -0
- package/components/mui_extended/ToggleButton/constants.js +4 -0
- package/components/mui_extended/ToggleButton/index.d.ts +4 -0
- package/components/mui_extended/ToggleButton/slots/ToggleButtonEnum.d.ts +3 -0
- package/components/mui_extended/ToggleButton/slots/ToggleButtonEnum.js +7 -0
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +3 -0
- package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.js +12 -0
- package/components/mui_extended/ToggleButton/slots/index.d.ts +2 -0
- package/components/mui_extended/ToggleButton/slots/index.js +1 -0
- package/components/mui_extended/ToggleButton/tests/ToggleButon.test.d.ts +1 -0
- package/components/mui_extended/ToggleButton/types.d.ts +36 -0
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/index.js +10 -2
- package/package.json +9 -4
- package/test/mocks.d.ts +2 -11
- package/utils/index.d.ts +1 -1
- package/components/mui_extended/Button/classes/constants.js +0 -4
- package/components/mui_extended/Button/classes/index.js +0 -25
- package/storybook/components/Chip/Chip.stories.d.ts +0 -25
- package/storybook/components/DragResizeWindow/stories/DragResizeWindow.stories.d.ts +0 -7
- package/storybook/components/DragResizeWindow/stories/constants.d.ts +0 -3
- package/storybook/components/DragResizeWindow/stories/subcomponents/ContentExample.d.ts +0 -8
- package/storybook/components/DragResizeWindow/stories/subcomponents/WithExtendedContainer.d.ts +0 -9
- package/storybook/components/DragResizeWindow/stories/types.d.ts +0 -3
- package/storybook/components/Icon/Icon.stories.d.ts +0 -21
- package/storybook/components/ModalDialog/ModalDialog.stories.d.ts +0 -7
- package/storybook/components/ModalDialog/subcomponent/WithExtendedContainer.d.ts +0 -37
- package/storybook/components/SideBar/SideBar.stories.d.ts +0 -24
- package/storybook/components/SideBar/data/menuData.d.ts +0 -2
- package/storybook/components/SideBar/subcomponents/SibarDecorator.d.ts +0 -3
- package/storybook/components/WindowBase/windowBase.stories.d.ts +0 -9
- package/storybook/components/WindowConfirm/windowConfirm.stories.d.ts +0 -8
- package/storybook/components/appBar/AppBar.stories.d.ts +0 -11
- package/storybook/components/commonActions/components/ActionCancel/ActionCancel.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionIntro/ActionIntro.stories.d.ts +0 -22
- package/storybook/components/commonActions/components/ActionsContainer/ActionsContainer.stories.d.ts +0 -13
- package/storybook/components/extended/mui/Accordion/Accordion.stories.d.ts +0 -25
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +0 -20
- package/storybook/components/extended/mui/Badge/Badge.stories.d.ts +0 -33
- package/storybook/components/extended/mui/Button/Button.stories.d.ts +0 -26
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Default/states/CheckBoxDisabled.stories.d.ts +0 -22
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Default/states/CheckBoxSkeleton.stories.d.ts +0 -10
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxActive.stories.d.ts +0 -16
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxEnabled.stories.d.ts +0 -16
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxFocusVisible.stories.d.ts +0 -16
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Error/states/CheckBoxHover.stories.d.ts +0 -16
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxActive.stories.d.ts +0 -18
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxEnabled.stories.d.ts +0 -17
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxFocusVisible.stories.d.ts +0 -17
- package/storybook/components/extended/mui/CheckBox/PaletteColor/Primary/states/CheckBoxHover.stories.d.ts +0 -17
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.default.stories.d.ts +0 -14
- package/storybook/components/extended/mui/CircularProgress/CircularProgress.sizes.stories.d.ts +0 -18
- package/storybook/components/extended/mui/Dialog/Dialog.stories.d.ts +0 -7
- package/storybook/components/extended/mui/Dialog/subcomponents/ContentExample.d.ts +0 -12
- package/storybook/components/extended/mui/Dialog/subcomponents/WithExtendedContainer.d.ts +0 -38
- package/storybook/components/extended/mui/IconButton/DefaultIconButton/IconButton.containedDefault.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/DefaultIconButton/IconButton.textDefault.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/DefaultIconButton/iconButton.outlinedDefault.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/DisableIconButton/IconButton.containedDisable.stories.d.ts +0 -7
- package/storybook/components/extended/mui/IconButton/DisableIconButton/IconButton.textDisable.stories.d.ts +0 -13
- package/storybook/components/extended/mui/IconButton/DisableIconButton/iconButton.outlinedDisable.stories.d.ts +0 -13
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +0 -40
- package/storybook/components/extended/mui/IconButton/PrimaryIconButton/IconButton.containedPrimary.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/PrimaryIconButton/IconButton.textPrimary.stories.d.ts +0 -17
- package/storybook/components/extended/mui/IconButton/PrimaryIconButton/iconButton.outlinedPrimary.stories.d.ts +0 -17
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/ErrorIconButton/IconButton.containedError.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/ErrorIconButton/IconButton.textError.stories.d.ts +0 -17
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/ErrorIconButton/iconButton.outlinedError.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/InfoIconButton/IconButton.containedInfo.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/InfoIconButton/IconButton.textInfo.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/InfoIconButton/iconButton.outlinedInfo.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/SuccesIconButton/IconButton.containedSuccess.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/SuccesIconButton/IconButton.textSucces.stories.d.ts +0 -17
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/SuccesIconButton/iconButton.outlinedSucces.stories.d.ts +0 -17
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/WarningIconButton/IconButton.containedWarning.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/WarningIconButton/IconButton.textWarning.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SemanticIconButton/WarningIconButton/iconButton.outlinedWarning.stories.d.ts +0 -11
- package/storybook/components/extended/mui/IconButton/SizesIconButton/IconButtonSizeMedium.stories.d.ts +0 -8
- package/storybook/components/extended/mui/LoadingButton/LoadingButton.stories.d.ts +0 -42
- package/storybook/components/extended/mui/MenuActions/MenuActions.default.stories.d.ts +0 -29
- package/storybook/components/extended/mui/MenuActions/MenuActions.othersProps.stories.d.ts +0 -13
- package/storybook/components/extended/mui/MenuItems/MenuItem.stories.d.ts +0 -45
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Circular/skeleton.defaultCircular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rectangular/skeleton.defaultRectangular.stories.d.ts +0 -14
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rounded/skeleton.defaultRounded.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Text/skeleton.defaultText.stories.d.ts +0 -15
- package/storybook/components/extended/mui/Tab/stories/Tab.disable.stories.d.ts +0 -36
- package/storybook/components/extended/mui/Tab/stories/Tab.enable.stories.d.ts +0 -36
- package/storybook/components/extended/mui/Tab/stories/Tab.sizes.stories.d.ts +0 -28
- package/storybook/components/extended/mui/Tab/stories/Tab.skeleton.stories.d.ts +0 -32
- package/storybook/components/extended/mui/Tooltip/Tooltip.stories.d.ts +0 -29
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/body/Estados/typography.body.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/bodyDens/Estados/typography.bodyDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h1/Estados/typography.h1.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h2/Estados/typography.h2.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h3/Estados/typography.h3.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h5/Estados/typography.h5.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraph/Estados/typography.paragraph.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraphDens/Estados/typography.paragraphDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitle/Estados/typography.subtitle.estados.stories.d.ts +0 -23
- package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitleDens/Estados/typography.subtitleDens.estados.stories.d.ts +0 -23
- package/storybook/components/extended/react-resizable/ResizableBox/resizableBox.stories.d.ts +0 -13
- package/storybook/components/formatters/BooleanFormatter/BooleanFormatter.stories.d.ts +0 -41
- package/storybook/components/paperForm/PaperForm.stories.d.ts +0 -18
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import clsx from "clsx";
|
|
3
2
|
import { w as withToggle } from "../../../hocs/withToggle/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { g as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
4
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { T as TOGGLE_BUTTON_KEY_COMPONENT } from "./constants.js";
|
|
7
|
+
import { T as ToggleButtonRootStyled } from "./slots/ToggleButtonSlots.js";
|
|
8
|
+
import { T as ToggleButtonSlots } from "./slots/ToggleButtonEnum.js";
|
|
9
|
+
const ToggleAbleButton = ({ onToggle, isToggled, children, dataTestId, ...props }) => {
|
|
10
|
+
const ownerState = {
|
|
11
|
+
isToggled
|
|
12
|
+
};
|
|
7
13
|
return /* @__PURE__ */ jsx(
|
|
8
|
-
|
|
14
|
+
ToggleButtonRootStyled,
|
|
9
15
|
{
|
|
10
|
-
|
|
16
|
+
className: clsx(getComponentSlotRoot(TOGGLE_BUTTON_KEY_COMPONENT)),
|
|
17
|
+
...getPropDataTestId(TOGGLE_BUTTON_KEY_COMPONENT, ToggleButtonSlots.toggleButtonRoot, dataTestId),
|
|
18
|
+
role: "toggle-button",
|
|
11
19
|
...props,
|
|
12
|
-
|
|
20
|
+
ownerState,
|
|
21
|
+
onClick: onToggle,
|
|
22
|
+
children
|
|
13
23
|
}
|
|
14
24
|
);
|
|
15
25
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const toggleButtonStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Generates styles for the Toggle Button based on its state.
|
|
4
|
+
* @param theme - Material-UI theme object.
|
|
5
|
+
* @param ownerState - The owner state of the Toggle Button.
|
|
6
|
+
* @author cesar - automatic
|
|
7
|
+
* @createdAt 2024-12-12 10:02:53 - automatic
|
|
8
|
+
* @updatedAt 2024-12-16 16:05:00 - automatic
|
|
9
|
+
* @updatedUser cesar - automatic
|
|
10
|
+
*/
|
|
11
|
+
toggleButtonRoot: ({ theme, ownerState }) => {
|
|
12
|
+
const innerShadow = ownerState?.variant === "contained" ? theme.vars.customShadows.innerShadowContainer : ownerState?.variant === "outlined" ? theme.vars.customShadows.innerShadowOutlinedText : theme.vars.customShadows.innerShadowText;
|
|
13
|
+
return {
|
|
14
|
+
...ownerState?.isToggled && {
|
|
15
|
+
boxShadow: innerShadow,
|
|
16
|
+
"&:hover": {
|
|
17
|
+
boxShadow: innerShadow
|
|
18
|
+
},
|
|
19
|
+
"&:active": {
|
|
20
|
+
boxShadow: innerShadow
|
|
21
|
+
},
|
|
22
|
+
"&:focus-visible": {
|
|
23
|
+
boxShadow: innerShadow
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
toggleButtonStyles as t
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TOGGLE_BUTTON_KEY_COMPONENT = "M4LToggleButton";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ToggleButtonRootStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../Button').ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "size" | "name" | "children" | "value" | "label" | "className" | "style" | "classes" | "onChange" | "sx" | "variant" | "color" | "content" | "translate" | "disabled" | "form" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "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" | "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" | "component" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "skeletonWidth" | "href" | "type" | "startIcon" | "endIcon" | "disableFocusRipple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "disableElevation" | "fullWidth" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').ToggleButtonOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('..').ToggleButtonOwnerState> & Record<string, unknown>;
|
|
3
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { T as TOGGLE_BUTTON_KEY_COMPONENT } from "../constants.js";
|
|
3
|
+
import { T as ToggleButtonSlots } from "./ToggleButtonEnum.js";
|
|
4
|
+
import { t as toggleButtonStyles } from "../ToggleButton.styles.js";
|
|
5
|
+
import { B as Button } from "../../Button/Button.js";
|
|
6
|
+
const ToggleButtonRootStyled = styled(Button, {
|
|
7
|
+
name: TOGGLE_BUTTON_KEY_COMPONENT,
|
|
8
|
+
slot: ToggleButtonSlots.toggleButtonRoot
|
|
9
|
+
})(toggleButtonStyles?.toggleButtonRoot);
|
|
10
|
+
export {
|
|
11
|
+
ToggleButtonRootStyled as T
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
1
2
|
import { ToggleableProps } from '../../../hocs/withToggle/types';
|
|
2
3
|
import { ButtonProps } from '../Button';
|
|
4
|
+
import { TOGGLE_BUTTON_KEY_COMPONENT } from './constants';
|
|
5
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
|
+
import { ToggleButtonSlots } from './slots';
|
|
7
|
+
/**
|
|
8
|
+
* ToggleButtonSlotsType
|
|
9
|
+
* Represents the available slot types for the ToggleButton component.
|
|
10
|
+
*/
|
|
11
|
+
export type ToggleButtonSlotsType = keyof typeof ToggleButtonSlots;
|
|
12
|
+
/**
|
|
13
|
+
* ToggleButtonProps
|
|
14
|
+
* The properties accepted by the ToggleButton component.
|
|
15
|
+
* Extends the original ButtonProps and adds toggle-specific functionality.
|
|
16
|
+
* [dataTestId] - A unique identifier for testing purposes.
|
|
17
|
+
*/
|
|
3
18
|
export interface ToggleButtonProps extends Omit<ButtonProps, 'onClick'>, ToggleableProps {
|
|
19
|
+
/**
|
|
20
|
+
* A unique identifier for testing purposes.
|
|
21
|
+
*/
|
|
22
|
+
dataTestId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The variant of the ToggleButton, either 'outlined' or 'text'.
|
|
25
|
+
*/
|
|
26
|
+
variant?: 'outlined' | 'text' | 'contained';
|
|
4
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* ToggleButtonOwnerState
|
|
30
|
+
* Represents the internal state of the ToggleButton component.
|
|
31
|
+
* [isToggled] - Indicates whether the button is toggled on or off.
|
|
32
|
+
*/
|
|
33
|
+
export interface ToggleButtonOwnerState extends Record<string, unknown> {
|
|
34
|
+
isToggled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* ToggleButtonStyles
|
|
38
|
+
* Represents the style rules for the ToggleButton component, allowing for customization.
|
|
39
|
+
*/
|
|
40
|
+
export type ToggleButtonStyles = Partial<OverridesStyleRules<ToggleButtonSlotsType, typeof TOGGLE_BUTTON_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const StyledMUITypography: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
5
5
|
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;
|
|
6
|
-
}, "children" | "
|
|
6
|
+
}, "children" | "className" | "style" | "classes" | "sx" | "variant" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, "children" | "ref" | "className" | "style" | "classes" | "onChange" | "sx" | "variant" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "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" | "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" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TypographyOwnerState> & Record<string, unknown> & {
|
|
7
7
|
ownerState: Partial<import('../types').TypographyOwnerState> & Record<string, unknown>;
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
/**
|
package/index.js
CHANGED
|
@@ -172,8 +172,12 @@ import { T as T8 } from "./components/mui_extended/Tabs/Tabs.js";
|
|
|
172
172
|
import { T as T9 } from "./components/mui_extended/TabContent/TabContent.js";
|
|
173
173
|
import { a as a12, T as T10 } from "./components/mui_extended/TabContext/index.js";
|
|
174
174
|
import { T as T11 } from "./components/mui_extended/Typography/Typography.js";
|
|
175
|
+
import { t } from "./components/mui_extended/ToggleButton/ToggleButton.styles.js";
|
|
175
176
|
import { T as T12 } from "./components/mui_extended/ToggleButton/ToggleButton.js";
|
|
176
|
-
import { T as T13 } from "./components/mui_extended/
|
|
177
|
+
import { T as T13 } from "./components/mui_extended/ToggleButton/constants.js";
|
|
178
|
+
import { T as T14 } from "./components/mui_extended/ToggleButton/slots/ToggleButtonEnum.js";
|
|
179
|
+
import { T as T15 } from "./components/mui_extended/ToggleButton/slots/ToggleButtonSlots.js";
|
|
180
|
+
import { T as T16 } from "./components/mui_extended/ToggleIconButton/ToggleIconButton.js";
|
|
177
181
|
import { a as a13, D as D6, M as M13 } from "./components/areas/contexts/DynamicMFParmsContext/index.js";
|
|
178
182
|
import { F, R as R17, u as u9 } from "./components/hook-form/RHFormContext/index.js";
|
|
179
183
|
import { g as g27 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
@@ -330,6 +334,7 @@ export {
|
|
|
330
334
|
S8 as Stack,
|
|
331
335
|
S2 as SubtitleContainerStyled,
|
|
332
336
|
d5 as SubtitleWindowStyled,
|
|
337
|
+
T13 as TOGGLE_BUTTON_KEY_COMPONENT,
|
|
333
338
|
T6 as Tab,
|
|
334
339
|
T9 as TabContent,
|
|
335
340
|
a12 as TabContext,
|
|
@@ -340,7 +345,9 @@ export {
|
|
|
340
345
|
T3 as ToastContainer,
|
|
341
346
|
T4 as ToastMessage,
|
|
342
347
|
T12 as ToggleButton,
|
|
343
|
-
|
|
348
|
+
T15 as ToggleButtonRootStyled,
|
|
349
|
+
T14 as ToggleButtonSlots,
|
|
350
|
+
T16 as ToggleIconButton,
|
|
344
351
|
T7 as Tooltip,
|
|
345
352
|
T5 as TopBar,
|
|
346
353
|
T11 as Typography,
|
|
@@ -402,6 +409,7 @@ export {
|
|
|
402
409
|
i3 as isFeatureCollection,
|
|
403
410
|
i4 as isFeatureCollectionDraft,
|
|
404
411
|
i5 as isGeometry,
|
|
412
|
+
t as toggleButtonStyles,
|
|
405
413
|
u10 as useAppearanceComponentStore,
|
|
406
414
|
u16 as useComponentSize,
|
|
407
415
|
u9 as useCustomForm,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.25",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"lint-staged": {
|
|
6
6
|
"*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@m4l/core": "^2.0.12",
|
|
56
56
|
"@m4l/graphics": "^7.0.2",
|
|
57
|
-
"@m4l/styles": "^7.1.
|
|
57
|
+
"@m4l/styles": "^7.1.15",
|
|
58
58
|
"@mui/lab": "5.0.0-alpha.173",
|
|
59
59
|
"@mui/material": "5.16.7",
|
|
60
60
|
"@mui/x-date-pickers": "6.20.2"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"*"
|
|
82
82
|
],
|
|
83
83
|
"source": "./index.js",
|
|
84
|
-
"main": "./index.js",
|
|
84
|
+
"main": "./dist/index.js",
|
|
85
85
|
"module": "./index.js",
|
|
86
86
|
"type": "module",
|
|
87
87
|
"types": "./index.d.ts",
|
|
@@ -93,5 +93,10 @@
|
|
|
93
93
|
"node": ">=12.0.0"
|
|
94
94
|
},
|
|
95
95
|
"packageManager": "yarn@4.5.0",
|
|
96
|
-
"private": false
|
|
96
|
+
"private": false,
|
|
97
|
+
"exports": {
|
|
98
|
+
".": {
|
|
99
|
+
"import": "./index.js"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
97
102
|
}
|
package/test/mocks.d.ts
CHANGED
|
@@ -15,22 +15,13 @@ export declare const mock_useEnvironment: {
|
|
|
15
15
|
domain_token: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const mockedGraphics: {
|
|
18
|
-
useFormatter: import('vitest').MockInstance<() => graphics.Formatters>;
|
|
18
|
+
useFormatter: import('vitest').MockInstance<() => import('@m4l/graphics').Formatters>;
|
|
19
19
|
};
|
|
20
20
|
export declare function restoreGraphicsMocked(): void;
|
|
21
|
-
export declare const mockedCore: {
|
|
22
|
-
useNetwork: import('vitest').MockInstance<() => import('@m4l/core/src/contexts/NetworkContext/types').NetworkType>;
|
|
23
|
-
useHostTools: import('vitest').MockInstance<() => core.HostToolsType>;
|
|
24
|
-
useFlagsPresent: import('vitest').MockInstance<(compareFlags: Array<import('@m4l/core/src/contexts/FlagsContext/types').Flag>) => boolean>;
|
|
25
|
-
useModuleDictionary: import('vitest').MockInstance<() => import('@m4l/core/src/contexts/ModuleDictionaryContext/types').ModuleDictionaryContextProps>;
|
|
26
|
-
useEnvironment: import('vitest').MockInstance<() => import('@m4l/core/src/contexts/EnvironmentContext/types').EnvironmentContextType>;
|
|
27
|
-
useModuleSkeleton: import('vitest').MockInstance<() => boolean>;
|
|
28
|
-
};
|
|
29
21
|
/**
|
|
30
22
|
* TODO: Documentar
|
|
31
23
|
*/
|
|
32
|
-
export declare function restoreCoreMocked(): void;
|
|
33
24
|
export declare const coreImplementation: typeof core;
|
|
34
25
|
export declare const graphicsImplementation: {
|
|
35
|
-
useFormatter: import('vitest').MockInstance<() => graphics.Formatters>;
|
|
26
|
+
useFormatter: import('vitest').MockInstance<() => import('@m4l/graphics').Formatters>;
|
|
36
27
|
};
|
package/utils/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const getPaletteColor: (palette: Palette, s: string) => any;
|
|
|
9
9
|
/**
|
|
10
10
|
* TODO: Documentar
|
|
11
11
|
*/
|
|
12
|
-
export declare const getVariantColor: (variant: VariantColor | undefined) => "
|
|
12
|
+
export declare const getVariantColor: (variant: VariantColor | undefined) => "primary" | "info" | "warning" | "error";
|
|
13
13
|
/**
|
|
14
14
|
* TODO: Documentar
|
|
15
15
|
*/
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses } from "@mui/material";
|
|
2
|
-
import "@mui/base";
|
|
3
|
-
import { c as componentName } from "./constants.js";
|
|
4
|
-
const buttonClasses = generateUtilityClasses(componentName, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root",
|
|
7
|
-
"skeleton",
|
|
8
|
-
/* states or variants of elements */
|
|
9
|
-
"sizeSmall",
|
|
10
|
-
"sizeMedium",
|
|
11
|
-
"variantOutlined",
|
|
12
|
-
"variantContained",
|
|
13
|
-
"variantText",
|
|
14
|
-
"isDisabled",
|
|
15
|
-
"colorError",
|
|
16
|
-
"colorSuccess",
|
|
17
|
-
"colorWarning",
|
|
18
|
-
/* * @author SebastianM - automatic
|
|
19
|
-
*Toggle */
|
|
20
|
-
"togglePressed",
|
|
21
|
-
"toggleNotPressed"
|
|
22
|
-
]);
|
|
23
|
-
export {
|
|
24
|
-
buttonClasses as b
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import { Chip } from '../../../src/components/Chip';
|
|
3
|
-
declare const meta: Meta<typeof Chip>;
|
|
4
|
-
type Story = StoryObj<typeof Chip>;
|
|
5
|
-
/**
|
|
6
|
-
* Base story for `Chip` in default mode.
|
|
7
|
-
*/
|
|
8
|
-
export declare const Default: Story;
|
|
9
|
-
/**
|
|
10
|
-
* Base story for `Chip` with a start icon.
|
|
11
|
-
*/
|
|
12
|
-
export declare const WithStartIcon: Story;
|
|
13
|
-
/**
|
|
14
|
-
* Base story for `Chip` with an end icon.
|
|
15
|
-
*/
|
|
16
|
-
export declare const WithEndIcon: Story;
|
|
17
|
-
/**
|
|
18
|
-
* Base story for `Chip` with a start and end icon.
|
|
19
|
-
*/
|
|
20
|
-
export declare const WithStartAndEndIcon: Story;
|
|
21
|
-
/**
|
|
22
|
-
* Base story for `Chip` in skeleton mode.
|
|
23
|
-
*/
|
|
24
|
-
export declare const Skeleton: Story;
|
|
25
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { DragResizeWindow } from '../../../../src/components/DragResizeWindow/DragResizeWindow';
|
|
3
|
-
declare const meta: Meta<typeof DragResizeWindow>;
|
|
4
|
-
type Story = StoryObj<typeof DragResizeWindow>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const Hidden: Story;
|
|
7
|
-
export default meta;
|
package/storybook/components/DragResizeWindow/stories/subcomponents/WithExtendedContainer.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StoryContext, StoryFn } from '@storybook/react';
|
|
2
|
-
/**
|
|
3
|
-
* TODO: Documentar
|
|
4
|
-
* @author cesar - automatic
|
|
5
|
-
* @createdAt 2024-11-08 15:55:16 - automatic
|
|
6
|
-
* @updatedAt 2024-11-08 15:55:16 - automatic
|
|
7
|
-
* @updatedUser cesar - automatic
|
|
8
|
-
*/
|
|
9
|
-
export declare const WithExtendedContainer: (MyStory: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import { Icon } from '../../../src/components/Icon';
|
|
3
|
-
declare const meta: Meta<typeof Icon>;
|
|
4
|
-
type Story = StoryObj<typeof Icon>;
|
|
5
|
-
/**
|
|
6
|
-
* Icon component by default with tooltip content 'Tooltip'
|
|
7
|
-
*/
|
|
8
|
-
export declare const Default: Story;
|
|
9
|
-
/**
|
|
10
|
-
* Icon component with color primary.main
|
|
11
|
-
*/
|
|
12
|
-
export declare const iconColor: Story;
|
|
13
|
-
/**
|
|
14
|
-
* Icon component with size small
|
|
15
|
-
*/
|
|
16
|
-
export declare const small: Story;
|
|
17
|
-
/**
|
|
18
|
-
* Icon component with size medium
|
|
19
|
-
*/
|
|
20
|
-
export declare const medium: Story;
|
|
21
|
-
export default meta;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ModalDialog } from '../../../src/components/ModalDialog';
|
|
3
|
-
declare const meta: Meta<typeof ModalDialog>;
|
|
4
|
-
type Story = StoryObj<typeof ModalDialog>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const FullScreen: Story;
|
|
7
|
-
export default meta;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { StoryFn, StoryContext } from '@storybook/react';
|
|
2
|
-
/**
|
|
3
|
-
* WithExtendedContainer Decorator
|
|
4
|
-
*
|
|
5
|
-
* This decorator wraps a Storybook story to integrate with the `useModal` hook
|
|
6
|
-
* for managing modal dialog states and props dynamically.
|
|
7
|
-
*
|
|
8
|
-
* ### Features:
|
|
9
|
-
* - Provides an "Open Modal" button to trigger the modal dialog.
|
|
10
|
-
* - Dynamically manages the `open` and `onClose` properties using `useModal`.
|
|
11
|
-
* - Supplies additional modal props like `fullScreen` and dimensions.
|
|
12
|
-
*
|
|
13
|
-
* ### Example Usage:
|
|
14
|
-
* ```tsx
|
|
15
|
-
* export const meta = {
|
|
16
|
-
* title: 'Components/ModalDialog',
|
|
17
|
-
* component: ModalDialog,
|
|
18
|
-
* decorators: [WithModalContext],
|
|
19
|
-
* };
|
|
20
|
-
*
|
|
21
|
-
* export const Default = {
|
|
22
|
-
* args: {
|
|
23
|
-
* fullScreen: false,
|
|
24
|
-
* initialWidth: 600,
|
|
25
|
-
* initialHeight: 400,
|
|
26
|
-
* },
|
|
27
|
-
* };
|
|
28
|
-
* ```
|
|
29
|
-
* @param Story - The story function being decorated.
|
|
30
|
-
* @param context - Story context containing args and metadata.
|
|
31
|
-
* @returns JSX.Element - The decorated story with modal integration.
|
|
32
|
-
* @author cesar - automatic
|
|
33
|
-
* @createdAt 2024-11-26 12:39:40 - automatic
|
|
34
|
-
* @updatedAt 2024-12-10 08:14:13 - automatic
|
|
35
|
-
* @updatedUser Bruce Escobar - automatic
|
|
36
|
-
*/
|
|
37
|
-
export declare const WithExtendedContainer: (_: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import { SideBar } from '../../../src/components/SideBar';
|
|
3
|
-
declare const meta: Meta<typeof SideBar>;
|
|
4
|
-
type Story = StoryObj<typeof SideBar>;
|
|
5
|
-
/**
|
|
6
|
-
* Componente SideBar por defecto sin ningún item seleccionado
|
|
7
|
-
* @createdAt 2024-11-16 14:25:07 - automatic
|
|
8
|
-
*/
|
|
9
|
-
export declare const Default: Story;
|
|
10
|
-
/**
|
|
11
|
-
* Componente SideBar con items en el menu, con un item seleccionado y 5 anidaciones incluyendo la sección padre de los menu items
|
|
12
|
-
* @createdAt 2024-11-16 14:25:07 - automatic
|
|
13
|
-
*/
|
|
14
|
-
export declare const SidebarWithItemSelected: Story;
|
|
15
|
-
export declare const SidebarWithoutData: Story;
|
|
16
|
-
/**
|
|
17
|
-
* SideBar con componentes en skeleton
|
|
18
|
-
* @author Andrés Quintero - automatic
|
|
19
|
-
* @createdAt 2024-11-16 14:25:07 - automatic
|
|
20
|
-
* @updatedAt 2024-11-16 14:25:58 - automatic
|
|
21
|
-
* @updatedUser Andrés Quintero - automatic
|
|
22
|
-
*/
|
|
23
|
-
export declare const SidebarWithSkeleton: Story;
|
|
24
|
-
export default meta;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { WindowBase } from '../../../src/components/WindowBase';
|
|
3
|
-
declare const meta: Meta<typeof WindowBase>;
|
|
4
|
-
type Story = StoryObj<typeof WindowBase>;
|
|
5
|
-
export declare const Default: Story;
|
|
6
|
-
export declare const SelectedState: Story;
|
|
7
|
-
export declare const WithIcon: Story;
|
|
8
|
-
export declare const WithCloseButton: Story;
|
|
9
|
-
export default meta;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { WindowConfirm } from '../../../src/components/WindowConfirm/WindowConfirm';
|
|
3
|
-
declare const meta: Meta<typeof WindowConfirm>;
|
|
4
|
-
type Story = StoryObj<typeof WindowConfirm>;
|
|
5
|
-
export declare const WarningVariant: Story;
|
|
6
|
-
export declare const ErrorVariant: Story;
|
|
7
|
-
export declare const InfoVariant: Story;
|
|
8
|
-
export default meta;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
-
import { SideBar } from '../../../src/components/SideBar';
|
|
3
|
-
import { AppBar } from '../../../src/components/AppBar';
|
|
4
|
-
declare const meta: Meta<typeof AppBar>;
|
|
5
|
-
type Story = StoryObj<typeof SideBar>;
|
|
6
|
-
/**
|
|
7
|
-
* Componente SideBar por defecto sin ningún item seleccionado
|
|
8
|
-
* @createdAt 2024-11-16 14:25:07 - automatic
|
|
9
|
-
*/
|
|
10
|
-
export declare const Default: Story;
|
|
11
|
-
export default meta;
|