6.3.0 • Published 6 months ago

@maggioli-design-system/mds-modal v6.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

mds-modal

This is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.

Properties

PropertyAttributeDescriptionTypeDefault
animatinganimatingSpecifies if the component is animating itself or not"intro" \| "none" \| "outro" \| undefined'none'
animationanimationSpecifies if the component is animating itself or not"3d" \| "custom" \| "slide" \| undefined'slide'
openedopenedSpecifies if the modal is opened or notboolean \| undefinedfalse
overflowoverflowSpecifies if the component prevents the body from scrolling when modal window is opened"auto" \| "manual"'auto'
positionpositionSpecifies the animation position of the modal window"bottom" \| "bottom-left" \| "bottom-right" \| "center" \| "left" \| "right" \| "top" \| "top-left" \| "top-right" \| undefined'center'

Events

EventDescriptionType
mdsModalCloseEmits when a modal is closedCustomEvent<void>
mdsModalHideEmits when a modal is totally invisible, can be useful to detach the component when it's hidden and gain memoryCustomEvent<void>

Methods

close() => Promise<void>

Returns

Type: Promise<void>

Slots

SlotDescription
"bottom"Contents that will be placed on bottom of the window. Add text string, HTML elements or components to this slot.
"default"Contents that will be placed in the center of the window. Add text string, HTML elements or components to this slot.
"top"Contents that will be placed on top of the window. Add text string, HTML elements or components to this slot.
"window"Use directly a window component if you need it. Add text string, HTML elements or components to this slot.

Shadow Parts

PartDescription
"action-close"Selects the close button of the modal.
"window"Selects the default window element of the modal when used.

CSS Custom Properties

NameDescription
--mds-modal-custom-closed-transformSets the transform position of the custom window when it's outside the viewport, to it's default position
--mds-modal-custom-window-distanceSet the distance between the slotted modal window and the screen bounds
--mds-modal-overlay-colorSet the overlay color of the background when the component is opened, this property can be inherited from globals.css in styles^8.0.0.
--mds-modal-overlay-opacitySet the overlay color opacity of the background when the component is opened, this property can be inherited from globals.css in styles^8.0.0.
--mds-modal-transition-durationSets the transition-duration of the modal elements
--mds-modal-transition-timing-funcitonSets the transition-timing-funciton of the modal elements
--mds-modal-window-backgroundSet the background color of the window
--mds-modal-window-distanceSet the distance between the modal window and the screen bounds
--mds-modal-window-max-widthIf the viewport is greather than mobile, max-width will be considered with this value;
--mds-modal-window-min-widthIf the viewport is greather than mobile, min-width will be considered with this value;
--mds-modal-window-overflowSet the overflow of the window
--mds-modal-window-radiusSet the border radius of the window
--mds-modal-window-shadowSet the box shadow of the window
--mds-modal-z-indexSet the z-index of the window when the component is opened

Dependencies

Used by

Depends on

Graph

graph TD;
  mds-modal --> mds-button
  mds-button --> mds-spinner
  mds-button --> mds-icon
  mds-button --> mds-text
  mds-header --> mds-modal
  style mds-modal fill:#f9f,stroke:#333,stroke-width:4px

Built with love @ Gruppo Maggioli from R&D Department

5.5.1

9 months ago

5.5.0

9 months ago

5.3.0

10 months ago

5.1.0

12 months ago

6.1.0

8 months ago

6.3.0

6 months ago

5.4.0

9 months ago

5.2.1

12 months ago

5.0.0

1 year ago

6.0.0

8 months ago

6.2.1

7 months ago

6.2.0

8 months ago

5.5.3

9 months ago

5.5.2

9 months ago

4.11.4

1 year ago

4.11.5

1 year ago

4.11.2

1 year ago

4.11.3

1 year ago

4.11.1

1 year ago

4.11.0

1 year ago

4.10.5

2 years ago

4.10.4

2 years ago

4.10.3

2 years ago

4.10.2

2 years ago

4.10.1

2 years ago

4.10.0

2 years ago

4.9.0

2 years ago

4.8.0

2 years ago

4.7.3

2 years ago

4.7.2

2 years ago

4.7.1

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.7.0

2 years ago

4.6.0

2 years ago

4.4.2

2 years ago

4.3.0

2 years ago

3.6.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

4.2.0

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.1

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago