@maggioli-design-system/mds-modal 4.1.0 → 4.2.0

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.
Files changed (50) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mds-modal.cjs.entry.js +22 -24
  3. package/dist/cjs/mds-modal.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -1
  5. package/dist/collection/common/aria.js +4 -2
  6. package/dist/collection/common/keyboard-manager.js +1 -1
  7. package/dist/collection/components/mds-modal/mds-modal.css +91 -95
  8. package/dist/collection/components/mds-modal/mds-modal.js +25 -26
  9. package/dist/components/mds-modal.js +22 -24
  10. package/dist/documentation.d.ts +148 -0
  11. package/dist/documentation.json +137 -0
  12. package/dist/esm/loader.js +1 -1
  13. package/dist/esm/mds-modal.entry.js +22 -24
  14. package/dist/esm/mds-modal.js +1 -1
  15. package/dist/esm-es5/mds-modal.entry.js +1 -1
  16. package/dist/mds-modal/mds-modal.esm.js +1 -1
  17. package/dist/mds-modal/mds-modal.js +1 -1
  18. package/dist/mds-modal/p-8363eae7.system.entry.js +1 -0
  19. package/dist/mds-modal/p-a7878434.entry.js +1 -0
  20. package/{www/build/p-f856db3e.system.js → dist/mds-modal/p-e2fdb863.system.js} +1 -1
  21. package/dist/stats.json +24 -22
  22. package/dist/types/components.d.ts +1 -1
  23. package/dist/types/interface/input-value.d.ts +1 -1
  24. package/documentation.json +144 -0
  25. package/package.json +10 -4
  26. package/readme.md +4 -4
  27. package/src/common/aria.ts +2 -2
  28. package/src/common/keyboard-manager.ts +1 -1
  29. package/src/components/mds-modal/css/components.css +49 -0
  30. package/src/components/mds-modal/css/mds-modal-animate-bottom.css +12 -12
  31. package/src/components/mds-modal/css/mds-modal-animate-center.css +12 -12
  32. package/src/components/mds-modal/css/mds-modal-animate-left.css +16 -16
  33. package/src/components/mds-modal/css/mds-modal-animate-right.css +16 -16
  34. package/src/components/mds-modal/css/mds-modal-animate-top.css +12 -12
  35. package/src/components/mds-modal/mds-modal.css +12 -66
  36. package/src/components/mds-modal/mds-modal.tsx +15 -21
  37. package/src/components/mds-modal/readme.md +4 -4
  38. package/src/components/mds-modal/test/mds-modal.e2e.ts +1 -1
  39. package/src/components.d.ts +1 -1
  40. package/src/fixtures/icons.json +1 -0
  41. package/src/interface/input-value.ts +1 -1
  42. package/www/build/mds-modal.esm.js +1 -1
  43. package/www/build/mds-modal.js +1 -1
  44. package/www/build/p-8363eae7.system.entry.js +1 -0
  45. package/www/build/p-a7878434.entry.js +1 -0
  46. package/{dist/mds-modal/p-f856db3e.system.js → www/build/p-e2fdb863.system.js} +1 -1
  47. package/dist/mds-modal/p-1e2f03d3.system.entry.js +0 -1
  48. package/dist/mds-modal/p-536e9f30.entry.js +0 -1
  49. package/www/build/p-1e2f03d3.system.entry.js +0 -1
  50. package/www/build/p-536e9f30.entry.js +0 -1
@@ -0,0 +1,144 @@
1
+ {
2
+ "timestamp": "2023-04-14T09:57:39",
3
+ "compiler": {
4
+ "name": "@stencil/core",
5
+ "version": "2.22.3",
6
+ "typescriptVersion": "4.9.4"
7
+ },
8
+ "components": [
9
+ {
10
+ "filePath": "./src/components/mds-modal/mds-modal.tsx",
11
+ "encapsulation": "shadow",
12
+ "tag": "mds-modal",
13
+ "readme": "# mds-modal\n\n\n",
14
+ "docs": "",
15
+ "docsTags": [],
16
+ "usage": {},
17
+ "props": [
18
+ {
19
+ "name": "opened",
20
+ "type": "boolean",
21
+ "mutable": true,
22
+ "attr": "opened",
23
+ "reflectToAttr": true,
24
+ "docs": "Specifies if the modal is opened or not",
25
+ "docsTags": [],
26
+ "default": "false",
27
+ "values": [
28
+ {
29
+ "type": "boolean"
30
+ }
31
+ ],
32
+ "optional": false,
33
+ "required": false
34
+ },
35
+ {
36
+ "name": "position",
37
+ "type": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\" | undefined",
38
+ "mutable": true,
39
+ "attr": "position",
40
+ "reflectToAttr": true,
41
+ "docs": "Specifies the animation position of the modal window",
42
+ "docsTags": [],
43
+ "default": "'center'",
44
+ "values": [
45
+ {
46
+ "value": "bottom",
47
+ "type": "string"
48
+ },
49
+ {
50
+ "value": "center",
51
+ "type": "string"
52
+ },
53
+ {
54
+ "value": "left",
55
+ "type": "string"
56
+ },
57
+ {
58
+ "value": "right",
59
+ "type": "string"
60
+ },
61
+ {
62
+ "value": "top",
63
+ "type": "string"
64
+ },
65
+ {
66
+ "type": "undefined"
67
+ }
68
+ ],
69
+ "optional": true,
70
+ "required": false
71
+ }
72
+ ],
73
+ "methods": [],
74
+ "events": [
75
+ {
76
+ "event": "mdsModalClose",
77
+ "detail": "void",
78
+ "bubbles": true,
79
+ "cancelable": true,
80
+ "composed": true,
81
+ "docs": "Emits when a modal is closed",
82
+ "docsTags": []
83
+ }
84
+ ],
85
+ "listeners": [
86
+ {
87
+ "event": "mdsModalClose",
88
+ "target": "document",
89
+ "capture": false,
90
+ "passive": false
91
+ },
92
+ {
93
+ "event": "mdsBannerClose",
94
+ "target": "document",
95
+ "capture": false,
96
+ "passive": false
97
+ }
98
+ ],
99
+ "styles": [
100
+ {
101
+ "name": "--mds-modal-overlay-color",
102
+ "annotation": "prop",
103
+ "docs": "Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`."
104
+ },
105
+ {
106
+ "name": "--mds-modal-overlay-opacity",
107
+ "annotation": "prop",
108
+ "docs": "Set 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`."
109
+ },
110
+ {
111
+ "name": "--mds-modal-window-background",
112
+ "annotation": "prop",
113
+ "docs": "Set the background color of the window"
114
+ },
115
+ {
116
+ "name": "--mds-modal-window-overflow",
117
+ "annotation": "prop",
118
+ "docs": "Set the overflow of the window"
119
+ },
120
+ {
121
+ "name": "--mds-modal-window-shadow",
122
+ "annotation": "prop",
123
+ "docs": "Set the box shadow of the window"
124
+ },
125
+ {
126
+ "name": "--mds-modal-z-index",
127
+ "annotation": "prop",
128
+ "docs": "Set the z-index of the window when the component is opened"
129
+ }
130
+ ],
131
+ "slots": [],
132
+ "parts": [],
133
+ "dependents": [
134
+ "mds-header"
135
+ ],
136
+ "dependencies": [],
137
+ "dependencyGraph": {
138
+ "mds-header": [
139
+ "mds-modal"
140
+ ]
141
+ }
142
+ }
143
+ ]
144
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maggioli-design-system/mds-modal",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "mds-modal 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 JavaScirpt framework you are using.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -12,6 +12,7 @@
12
12
  "unpkg": "dist/mds-modal/mds-modal.esm.js",
13
13
  "files": [
14
14
  "dist/",
15
+ "documentation.json",
15
16
  "loader/",
16
17
  "readme.md",
17
18
  "src/",
@@ -23,8 +24,8 @@
23
24
  "test": "stencil test --spec --e2e"
24
25
  },
25
26
  "dependencies": {
26
- "@maggioli-design-system/styles": "^11.2.1",
27
- "@stencil/core": "^2.22.2",
27
+ "@maggioli-design-system/styles": "^11.4.0",
28
+ "@stencil/core": "^2.22.3",
28
29
  "clsx": "^1.2.1"
29
30
  },
30
31
  "license": "MIT",
@@ -39,10 +40,15 @@
39
40
  "email": "andrea.pruccoli@maggioli.it",
40
41
  "role": "Software Engineer"
41
42
  },
43
+ {
44
+ "name": "Nicola Tamburini",
45
+ "email": "nicola.tamburini@maggioli.it",
46
+ "role": "Software Engineer"
47
+ },
42
48
  {
43
49
  "name": "Vittorio Vittori",
44
50
  "email": "vittorio.vittori@maggioli.it",
45
- "role": "UX UI Designer"
51
+ "role": "Product Designer"
46
52
  }
47
53
  ]
48
54
  }
package/readme.md CHANGED
@@ -7,10 +7,10 @@
7
7
 
8
8
  ## Properties
9
9
 
10
- | Property | Attribute | Description | Type | Default |
11
- | ---------- | ---------- | ---------------------------------------------------- | ---------------------------------------------------- | ----------- |
12
- | `opened` | `opened` | Specifies if the modal is opened or not | `boolean` | `undefined` |
13
- | `position` | `position` | Specifies the animation position of the modal window | `"bottom" \| "center" \| "left" \| "right" \| "top"` | `null` |
10
+ | Property | Attribute | Description | Type | Default |
11
+ | ---------- | ---------- | ---------------------------------------------------- | ----------------------------------------------------------------- | ---------- |
12
+ | `opened` | `opened` | Specifies if the modal is opened or not | `boolean` | `false` |
13
+ | `position` | `position` | Specifies the animation position of the modal window | `"bottom" \| "center" \| "left" \| "right" \| "top" \| undefined` | `'center'` |
14
14
 
15
15
 
16
16
  ## Events
@@ -7,12 +7,12 @@ const hash = (s: string): string => {
7
7
  }
8
8
 
9
9
  const unslugName = (name: string): string => {
10
- return name.split('/').slice(-1).pop().replace(/-/g, ' ')
10
+ return name.split('/')?.slice(-1).pop()?.replace(/-/g, ' ') ?? name
11
11
  }
12
12
 
13
13
  const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: string): string => {
14
14
  if (element.hasAttribute(attribute)) {
15
- return element.getAttribute(attribute)
15
+ return element.getAttribute(attribute) ?? ''
16
16
  }
17
17
  element.setAttribute(attribute, value)
18
18
  return value
@@ -38,7 +38,7 @@ export class KeyboardManager {
38
38
  }
39
39
 
40
40
  detachEscapeBehavior = (): void => {
41
- this.escapeCallback = null
41
+ this.escapeCallback = () => {return}
42
42
  if (typeof window !== undefined) {
43
43
  window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this))
44
44
  }
@@ -0,0 +1,49 @@
1
+ @tailwind components;
2
+ @tailwind utilities;
3
+
4
+ @layer components {
5
+ .animate {
6
+ @apply
7
+ duration-500
8
+ ease-in-out-expo
9
+ opacity-0
10
+ transition-cosmetic;
11
+ }
12
+
13
+ .animate-bottom-intro,
14
+ .animate-center-intro,
15
+ .animate-top-intro {
16
+ transform: rotateX(-22deg) scale(0.5) translateY(40%);
17
+ }
18
+
19
+ .animate-bottom-opened,
20
+ .animate-center-opened,
21
+ .animate-top-opened {
22
+ @apply opacity-100;
23
+
24
+ transform: rotateX(0) scale(1) translateY(0);
25
+ }
26
+
27
+ .animate-bottom-outro,
28
+ .animate-center-outro,
29
+ .animate-top-outro {
30
+ transform: rotateX(-22deg) scale(0.5) translateY(-40%);
31
+ }
32
+
33
+ .animate-right-intro,
34
+ .animate-right-outro {
35
+ transform: translateX(calc(100% + 50px));
36
+ }
37
+
38
+ .animate-right-opened,
39
+ .animate-left-opened {
40
+ @apply opacity-100;
41
+
42
+ transform: translateX(0);
43
+ }
44
+
45
+ .animate-left-intro,
46
+ .animate-left-outro {
47
+ transform: translateX(calc(-100% - 50px));
48
+ }
49
+ }
@@ -1,28 +1,28 @@
1
- :host ( .animate-bottom ) {
1
+ :host( .to-bottom ) {
2
2
  @apply
3
3
  justify-center
4
4
  mobile:p-4
5
5
  p-8;
6
6
  }
7
7
 
8
- :host ( .animate-bottom ) .window,
9
- :host ( .animate-bottom ) > ::slotted ( [slot=window] ) {
10
- @apply animate-bottom;
8
+ :host( .to-bottom ) .window,
9
+ :host( .to-bottom ) > ::slotted( [slot="window"] ) {
10
+ @apply animate;
11
11
  }
12
12
 
13
- :host ( .animate-bottom-intro ) .window,
14
- :host ( .animate-bottom-intro ) > ::slotted ( [slot=window] ) {
13
+ :host( .to-bottom-intro ) .window,
14
+ :host( .to-bottom-intro ) > ::slotted( [slot="window"] ) {
15
15
  @apply animate-bottom-intro;
16
16
  }
17
17
 
18
- :host ( .animate-bottom-opened.animate-bottom-outro ) .window,
19
- :host ( .animate-bottom-opened.animate-bottom-outro ) > ::slotted ( [slot=window] ),
20
- :host ( .animate-bottom-opened ) .window,
21
- :host ( .animate-bottom-opened ) > ::slotted ( [slot=window] ) {
18
+ :host( .to-bottom-opened.to-bottom-outro ) .window,
19
+ :host( .to-bottom-opened.to-bottom-outro ) > ::slotted( [slot="window"] ),
20
+ :host( .to-bottom-opened ) .window,
21
+ :host( .to-bottom-opened ) > ::slotted( [slot="window"] ) {
22
22
  @apply animate-bottom-opened;
23
23
  }
24
24
 
25
- :host ( .animate-bottom-outro ) .window,
26
- :host ( .animate-bottom-outro ) > ::slotted ( [slot=window] ) {
25
+ :host( .to-bottom-outro ) .window,
26
+ :host( .to-bottom-outro ) > ::slotted( [slot="window"] ) {
27
27
  @apply animate-bottom-outro;
28
28
  }
@@ -1,28 +1,28 @@
1
- :host ( .animate-center ) {
1
+ :host( .to-center ) {
2
2
  @apply
3
3
  justify-center
4
4
  mobile:p-4
5
5
  p-8;
6
6
  }
7
7
 
8
- :host ( .animate-center ) .window,
9
- :host ( .animate-center ) > ::slotted ( [slot=window] ) {
10
- @apply animate-center;
8
+ :host( .to-center ) .window,
9
+ :host( .to-center ) > ::slotted( [slot="window"] ) {
10
+ @apply animate;
11
11
  }
12
12
 
13
- :host ( .animate-center-intro ) .window,
14
- :host ( .animate-center-intro ) > ::slotted ( [slot=window] ) {
13
+ :host( .to-center-intro ) .window,
14
+ :host( .to-center-intro ) > ::slotted( [slot="window"] ) {
15
15
  @apply animate-center-intro;
16
16
  }
17
17
 
18
- :host ( .animate-center-opened.animate-center-outro ) .window,
19
- :host ( .animate-center-opened.animate-center-outro ) > ::slotted ( [slot=window] ),
20
- :host ( .animate-center-opened ) .window,
21
- :host ( .animate-center-opened ) > ::slotted ( [slot=window] ) {
18
+ :host( .to-center-opened.to-center-outro ) .window,
19
+ :host( .to-center-opened.to-center-outro ) > ::slotted( [slot="window"] ),
20
+ :host( .to-center-opened ) .window,
21
+ :host( .to-center-opened ) > ::slotted( [slot="window"] ) {
22
22
  @apply animate-center-opened;
23
23
  }
24
24
 
25
- :host ( .animate-center-outro ) .window,
26
- :host ( .animate-center-outro ) > ::slotted ( [slot=window] ) {
25
+ :host( .to-center-outro ) .window,
26
+ :host( .to-center-outro ) > ::slotted( [slot="window"] ) {
27
27
  @apply animate-center-outro;
28
28
  }
@@ -1,41 +1,41 @@
1
- :host ( .animate-left ) {
1
+ :host( .to-left ) {
2
2
  @apply justify-start;
3
3
  }
4
4
 
5
- :host ( .animate-left ) .window,
6
- :host ( .animate-left ) > ::slotted ( [slot=window] ) {
7
- @apply animate-left;
5
+ :host( .to-left ) .window,
6
+ :host( .to-left ) > ::slotted( [slot="window"] ) {
7
+ @apply animate;
8
8
  }
9
9
 
10
- :host ( .animate-left-intro ) .window,
11
- :host ( .animate-left-intro ) > ::slotted ( [slot=window] ) {
10
+ :host( .to-left-intro ) .window,
11
+ :host( .to-left-intro ) > ::slotted( [slot="window"] ) {
12
12
  @apply animate-left-intro;
13
13
  }
14
14
 
15
- :host ( .animate-left-opened.animate-left-outro ) .window,
16
- :host ( .animate-left-opened.animate-left-outro ) > ::slotted ( [slot=window] ),
17
- :host ( .animate-left-opened ) .window,
18
- :host ( .animate-left-opened ) > ::slotted ( [slot=window] ) {
15
+ :host( .to-left-opened.to-left-outro ) .window,
16
+ :host( .to-left-opened.to-left-outro ) > ::slotted( [slot="window"] ),
17
+ :host( .to-left-opened ) .window,
18
+ :host( .to-left-opened ) > ::slotted( [slot="window"] ) {
19
19
  @apply animate-left-opened;
20
20
  }
21
21
 
22
- :host ( .animate-left-opened ) .close,
23
- :host ( .animate-left-opened.animate-left-outro ) .close {
22
+ :host( .to-left-opened ) .close,
23
+ :host( .to-left-opened.to-left-outro ) .close {
24
24
  @apply opacity-100;
25
25
 
26
26
  transform: translate(-24px, 24px) rotate(0);
27
27
  }
28
28
 
29
- :host ( .animate-left-outro ) .window,
30
- :host ( .animate-left-outro ) > ::slotted ( [slot=window] ) {
29
+ :host( .to-left-outro ) .window,
30
+ :host( .to-left-outro ) > ::slotted( [slot="window"] ) {
31
31
  @apply animate-left-outro;
32
32
  }
33
33
 
34
- :host ( .animate-left-outro ) .close {
34
+ :host( .to-left-outro ) .close {
35
35
  transform: translate(24px, 24px) rotate(-90deg);
36
36
  }
37
37
 
38
- :host ( .animate-left ) .close {
38
+ :host( .to-left ) .close {
39
39
  @apply right-0;
40
40
 
41
41
  transform: translate(36px, 24px) rotate(90deg);
@@ -1,41 +1,41 @@
1
- :host ( .animate-right ) {
1
+ :host( .to-right ) {
2
2
  @apply justify-end;
3
3
  }
4
4
 
5
- :host ( .animate-right ) .window,
6
- :host ( .animate-right ) > ::slotted ( [slot=window] ) {
7
- @apply animate-right;
5
+ :host( .to-right ) .window,
6
+ :host( .to-right ) > ::slotted([slot="window"]) {
7
+ @apply animate;
8
8
  }
9
9
 
10
- :host ( .animate-right-intro ) .window,
11
- :host ( .animate-right-intro ) > ::slotted ( [slot=window] ) {
10
+ :host( .to-right-intro ) .window,
11
+ :host( .to-right-intro ) > ::slotted( [slot="window"] ) {
12
12
  @apply animate-right-intro;
13
13
  }
14
14
 
15
- :host ( .animate-right-opened.animate-right-outro ) .window,
16
- :host ( .animate-right-opened.animate-right-outro ) > ::slotted ( [slot=window] ),
17
- :host ( .animate-right-opened ) .window,
18
- :host ( .animate-right-opened ) > ::slotted ( [slot=window] ) {
15
+ :host( .to-right-opened.to-right-outro ) .window,
16
+ :host( .to-right-opened.to-right-outro ) > ::slotted( [slot="window"] ),
17
+ :host( .to-right-opened ) .window,
18
+ :host( .to-right-opened ) > ::slotted( [slot="window"] ) {
19
19
  @apply animate-right-opened;
20
20
  }
21
21
 
22
- :host ( .animate-right-opened ) .close,
23
- :host ( .animate-right-opened.animate-right-outro ) .close {
22
+ :host( .to-right-opened ) .close,
23
+ :host( .to-right-opened.to-right-outro ) .close {
24
24
  @apply opacity-100;
25
25
 
26
26
  transform: translate(24px, 24px) rotate(0);
27
27
  }
28
28
 
29
- :host ( .animate-right-outro ) .window,
30
- :host ( .animate-right-outro ) > ::slotted ( [slot=window] ) {
29
+ :host( .to-right-outro ) .window,
30
+ :host( .to-right-outro ) > ::slotted( [slot="window"] ) {
31
31
  @apply animate-right-outro;
32
32
  }
33
33
 
34
- :host ( .animate-right-outro ) .close {
34
+ :host( .to-right-outro ) .close {
35
35
  transform: translate(-24px, 24px) rotate(90deg);
36
36
  }
37
37
 
38
- :host ( .animate-right ) .close {
38
+ :host( .to-right ) .close {
39
39
  @apply left-0;
40
40
 
41
41
  transform: translate(-36px, 24px) rotate(-90deg);
@@ -1,28 +1,28 @@
1
- :host ( .animate-top ) {
1
+ :host( .to-top ) {
2
2
  @apply
3
3
  justify-center
4
4
  mobile:p-4
5
5
  p-8;
6
6
  }
7
7
 
8
- :host ( .animate-top ) .window,
9
- :host ( .animate-top ) > ::slotted ( [slot=window] ) {
10
- @apply animate-top;
8
+ :host( .to-top ) .window,
9
+ :host( .to-top ) > ::slotted( [slot="window"] ) {
10
+ @apply animate;
11
11
  }
12
12
 
13
- :host ( .animate-top-intro ) .window,
14
- :host ( .animate-top-intro ) > ::slotted ( [slot=window] ) {
13
+ :host( .to-top-intro ) .window,
14
+ :host( .to-top-intro ) > ::slotted( [slot="window"] ) {
15
15
  @apply animate-top-intro;
16
16
  }
17
17
 
18
- :host ( .animate-top-opened.animate-top-outro ) .window,
19
- :host ( .animate-top-opened.animate-top-outro ) > ::slotted ( [slot=window] ),
20
- :host ( .animate-top-opened ) .window,
21
- :host ( .animate-top-opened ) > ::slotted ( [slot=window] ) {
18
+ :host( .to-top-opened.to-top-outro ) .window,
19
+ :host( .to-top-opened.to-top-outro ) > ::slotted( [slot="window"] ),
20
+ :host( .to-top-opened ) .window,
21
+ :host( .to-top-opened ) > ::slotted( [slot="window"] ) {
22
22
  @apply animate-top-opened;
23
23
  }
24
24
 
25
- :host ( .animate-top-outro ) .window,
26
- :host ( .animate-top-outro ) > ::slotted ( [slot=window] ) {
25
+ :host( .to-top-outro ) .window,
26
+ :host( .to-top-outro ) > ::slotted( [slot="window"] ) {
27
27
  @apply animate-top-outro;
28
28
  }
@@ -1,4 +1,7 @@
1
+ /* stylelint-disable */
1
2
  @import '../../tailwind/components.css';
3
+ @import './css/components.css';
4
+
2
5
  @tailwind components;
3
6
  @tailwind utilities;
4
7
 
@@ -11,64 +14,6 @@
11
14
  * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened
12
15
  */
13
16
 
14
- @layer components {
15
- .animate-bottom,
16
- .animate-center,
17
- .animate-top {
18
- @apply
19
- duration-500
20
- ease-in-out-expo
21
- opacity-0
22
- transition-cosmetic;
23
- }
24
-
25
- .animate-bottom-intro,
26
- .animate-center-intro,
27
- .animate-top-intro {
28
- transform: rotateX(-22deg) scale(0.5) translateY(40%);
29
- }
30
-
31
- .animate-bottom-opened,
32
- .animate-center-opened,
33
- .animate-top-opened {
34
- @apply opacity-100;
35
-
36
- transform: rotateX(0) scale(1) translateY(0);
37
- }
38
-
39
- .animate-bottom-outro,
40
- .animate-center-outro,
41
- .animate-top-outro {
42
- transform: rotateX(-22deg) scale(0.5) translateY(-40%);
43
- }
44
-
45
- .animate-left,
46
- .animate-right {
47
- @apply
48
- duration-500
49
- opacity-0
50
- ease-in-out-expo
51
- transition-cosmetic;
52
- }
53
-
54
- .animate-right-intro,
55
- .animate-right-outro {
56
- transform: translateX(calc(100% + 50px));
57
- }
58
-
59
- .animate-right-opened,
60
- .animate-left-opened {
61
- @apply opacity-100;
62
-
63
- transform: translateX(0);
64
- }
65
-
66
- .animate-left-intro,
67
- .animate-left-outro {
68
- transform: translateX(calc(-100% - 50px));
69
- }
70
- }
71
-
72
17
  :host {
73
18
 
74
19
  --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);
@@ -90,26 +35,26 @@
90
35
 
91
36
  background-color: rgba(var(--mds-modal-overlay-color) / 0);
92
37
  perspective: 600px;
93
- z-index: var(--z-index, 1000);
38
+ z-index: var(--mds-modal-z-index, 1000);
94
39
  }
95
40
 
96
- :host ( [position=top] ) {
41
+ :host( [position=top] ) {
97
42
  @apply
98
43
  items-start
99
44
  justify-center;
100
45
  }
101
46
 
102
- :host ( [position=bottom] ) {
47
+ :host( [position=bottom] ) {
103
48
  @apply
104
49
  items-end
105
50
  justify-center;
106
51
  }
107
52
 
108
- :host ( .animate-bottom-opened ),
109
- :host ( .animate-center-opened ),
110
- :host ( .animate-left-opened ),
111
- :host ( .animate-right-opened ),
112
- :host ( .animate-top-opened ) {
53
+ :host( .to-bottom-opened ),
54
+ :host( .to-center-opened ),
55
+ :host( .to-left-opened ),
56
+ :host( .to-right-opened ),
57
+ :host( .to-top-opened ) {
113
58
  @apply
114
59
  duration-500
115
60
  pointer-events-auto;
@@ -166,3 +111,4 @@
166
111
  @import './css/mds-modal-animate-left.css';
167
112
  @import './css/mds-modal-animate-right.css';
168
113
  @import './css/mds-modal-animate-top.css';
114
+