@maggioli-design-system/mds-modal 5.2.1 → 5.3.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.
- package/dist/cjs/{index-7b5471f5.js → index-6f236cfa.js} +164 -69
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +13 -4
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/floating-controller.js +180 -0
- package/dist/collection/common/slot.js +10 -4
- package/dist/collection/components/mds-modal/mds-modal.js +18 -3
- package/dist/collection/dictionary/tree.js +13 -0
- package/dist/collection/type/tree.js +1 -0
- package/dist/components/mds-modal.js +12 -3
- package/dist/documentation.d.ts +8 -0
- package/dist/documentation.json +11 -5
- package/dist/esm/{index-1c34ac95.js → index-f8d2dee4.js} +164 -69
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +13 -4
- package/dist/esm/mds-modal.js +3 -3
- package/dist/esm-es5/index-f8d2dee4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/{www/build/p-08a99956.entry.js → dist/mds-modal/p-413a00c5.entry.js} +1 -1
- package/dist/mds-modal/{p-0d78ea55.system.entry.js → p-96958acc.system.entry.js} +1 -1
- package/dist/mds-modal/p-bc1fa4e4.system.js +2 -0
- package/dist/mds-modal/p-c6899cb0.system.js +1 -0
- package/dist/mds-modal/p-ee90f86a.js +2 -0
- package/dist/stats.json +60 -38
- package/dist/types/common/floating-controller.d.ts +46 -0
- package/dist/types/common/slot.d.ts +2 -1
- package/dist/types/dictionary/tree.d.ts +4 -0
- package/dist/types/type/tree.d.ts +3 -0
- package/documentation.json +36 -10
- package/package.json +4 -4
- package/src/common/floating-controller.ts +263 -0
- package/src/common/slot.ts +12 -3
- package/src/dictionary/tree.ts +21 -0
- package/src/fixtures/icons.json +20 -0
- package/src/fixtures/iconsauce.json +6 -0
- package/src/type/tree.ts +12 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/{dist/mds-modal/p-08a99956.entry.js → www/build/p-413a00c5.entry.js} +1 -1
- package/www/build/{p-0d78ea55.system.entry.js → p-96958acc.system.entry.js} +1 -1
- package/www/build/p-bc1fa4e4.system.js +2 -0
- package/www/build/p-c6899cb0.system.js +1 -0
- package/www/build/p-ee90f86a.js +2 -0
- package/dist/esm-es5/index-1c34ac95.js +0 -1
- package/dist/mds-modal/p-0ed6e0c8.js +0 -2
- package/dist/mds-modal/p-423dac35.system.js +0 -2
- package/dist/mds-modal/p-67c6f337.system.js +0 -1
- package/www/build/p-0ed6e0c8.js +0 -2
- package/www/build/p-423dac35.system.js +0 -2
- package/www/build/p-67c6f337.system.js +0 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import {
|
|
2
|
+
arrow,
|
|
3
|
+
autoPlacement,
|
|
4
|
+
autoUpdate,
|
|
5
|
+
computePosition,
|
|
6
|
+
flip,
|
|
7
|
+
Middleware,
|
|
8
|
+
MiddlewareData,
|
|
9
|
+
offset,
|
|
10
|
+
shift,
|
|
11
|
+
} from '@floating-ui/dom'
|
|
12
|
+
import { FloatingUIPlacement, FloatingUIStrategy } from '@type/floating-ui'
|
|
13
|
+
import { cssDurationToMilliseconds } from './unit'
|
|
14
|
+
import { setAttributeIfEmpty } from './aria'
|
|
15
|
+
import { HTMLStencilElement } from '@stencil/core/internal'
|
|
16
|
+
|
|
17
|
+
export interface FloatingElement extends PositionOptions {
|
|
18
|
+
host: HTMLFloatingElement,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface HTMLFloatingElement extends HTMLStencilElement, PositionOptions {
|
|
22
|
+
visible: boolean,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface PositionOptions {
|
|
26
|
+
arrow: boolean;
|
|
27
|
+
arrowPadding: number;
|
|
28
|
+
autoPlacement: boolean;
|
|
29
|
+
flip: boolean;
|
|
30
|
+
offset: number;
|
|
31
|
+
placement: FloatingUIPlacement;
|
|
32
|
+
shift: boolean;
|
|
33
|
+
shiftPadding: number;
|
|
34
|
+
strategy: FloatingUIStrategy;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class FloatingController {
|
|
38
|
+
private _caller: HTMLElement
|
|
39
|
+
private readonly _host: HTMLFloatingElement
|
|
40
|
+
arrowEl: HTMLElement | undefined
|
|
41
|
+
|
|
42
|
+
private cleanupAutoUpdate: () => void
|
|
43
|
+
|
|
44
|
+
constructor (host: HTMLFloatingElement, arrowEl?: HTMLElement) {
|
|
45
|
+
this._host = host
|
|
46
|
+
this.arrowEl = arrowEl
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
updateCaller (target: string): HTMLElement {
|
|
50
|
+
// search caller in document or rootNode of host (if target is in shadowDOM)
|
|
51
|
+
const caller = (this._host.parentElement?.shadowRoot?.querySelector(target) as HTMLElement) ??
|
|
52
|
+
((this._host.getRootNode() as HTMLElement).querySelector(target) as HTMLElement)
|
|
53
|
+
|
|
54
|
+
if (!caller) {
|
|
55
|
+
throw Error(`Target not found: ${target}`)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
this._caller = caller
|
|
59
|
+
|
|
60
|
+
setAttributeIfEmpty(this._caller, 'aria-haspopup', 'true')
|
|
61
|
+
setAttributeIfEmpty(this._caller, 'aria-controls', target)
|
|
62
|
+
setAttributeIfEmpty(this._host, 'role', 'menu')
|
|
63
|
+
setAttributeIfEmpty(this._host, 'aria-labelledby', target)
|
|
64
|
+
return caller
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private readonly arrowInset = (
|
|
68
|
+
middleware: MiddlewareData,
|
|
69
|
+
arrowPosition: string,
|
|
70
|
+
): { bottom?: string; left?: string; right?: string; top?: string } => {
|
|
71
|
+
const { arrow } = middleware
|
|
72
|
+
const inset = { bottom: '', left: '', right: '', top: '' }
|
|
73
|
+
|
|
74
|
+
if (arrow === undefined) {
|
|
75
|
+
return {}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
switch (arrowPosition) {
|
|
79
|
+
case 'bottom':
|
|
80
|
+
inset.left = arrow.x !== null ? `${arrow.x}px` : ''
|
|
81
|
+
inset.top = '100%'
|
|
82
|
+
break
|
|
83
|
+
case 'left':
|
|
84
|
+
inset.right = '100%'
|
|
85
|
+
inset.top = arrow.y !== null ? `${arrow.y}px` : ''
|
|
86
|
+
break
|
|
87
|
+
case 'right':
|
|
88
|
+
inset.left = '100%'
|
|
89
|
+
inset.top = arrow.y !== null ? `${arrow.y}px` : ''
|
|
90
|
+
break
|
|
91
|
+
case 'top':
|
|
92
|
+
inset.left = arrow.x !== null ? `${arrow.x}px` : ''
|
|
93
|
+
inset.top = ''
|
|
94
|
+
break
|
|
95
|
+
default:
|
|
96
|
+
break
|
|
97
|
+
}
|
|
98
|
+
return inset
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
private readonly arrowTransform = (
|
|
102
|
+
arrowPosition: string,
|
|
103
|
+
): { transform: string } => {
|
|
104
|
+
let transformProps = this._host.arrow && this._host.visible ? 'scale(1)' : 'scale(0)'
|
|
105
|
+
switch (arrowPosition) {
|
|
106
|
+
case 'bottom':
|
|
107
|
+
transformProps = `rotate(180deg) ${transformProps} translate(0, -100%)`
|
|
108
|
+
break
|
|
109
|
+
case 'left':
|
|
110
|
+
transformProps = `rotate(-90deg) ${transformProps} translate(50%, -50%)`
|
|
111
|
+
break
|
|
112
|
+
case 'right':
|
|
113
|
+
transformProps = `rotate(90deg) ${transformProps} translate(-50%, -50%)`
|
|
114
|
+
break
|
|
115
|
+
case 'top':
|
|
116
|
+
transformProps = `rotate(0deg) ${transformProps} translate(0, 0)`
|
|
117
|
+
break
|
|
118
|
+
default:
|
|
119
|
+
break
|
|
120
|
+
}
|
|
121
|
+
return { transform: transformProps }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private readonly arrowTransformOrigin = (
|
|
125
|
+
arrowPosition: string,
|
|
126
|
+
): { transformOrigin: string } => {
|
|
127
|
+
switch (arrowPosition) {
|
|
128
|
+
case 'bottom':
|
|
129
|
+
return { transformOrigin: 'center top' }
|
|
130
|
+
case 'left':
|
|
131
|
+
return { transformOrigin: 'right center' }
|
|
132
|
+
case 'right':
|
|
133
|
+
return { transformOrigin: 'left center' }
|
|
134
|
+
case 'top':
|
|
135
|
+
return { transformOrigin: 'center bottom' }
|
|
136
|
+
default:
|
|
137
|
+
return { transformOrigin: 'center top' }
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private readonly calculatePosition = (): void => {
|
|
142
|
+
if (!this._caller) return
|
|
143
|
+
|
|
144
|
+
const middleware: Middleware[] = new Array<Middleware>()
|
|
145
|
+
const config: { padding?: number } = {}
|
|
146
|
+
|
|
147
|
+
if (this._host.shiftPadding) {
|
|
148
|
+
config.padding = this._host.shiftPadding
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (this._host.autoPlacement) {
|
|
152
|
+
middleware.push(autoPlacement())
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (this._host.offset) {
|
|
156
|
+
middleware.push(offset(this._host.offset))
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (!this._host.autoPlacement && this._host.flip) {
|
|
160
|
+
middleware.push(flip(config))
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (this._host.shift) {
|
|
164
|
+
middleware.push(shift(config))
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (this.arrowEl && this._host.arrow) {
|
|
168
|
+
middleware.push(
|
|
169
|
+
arrow({
|
|
170
|
+
element: this.arrowEl,
|
|
171
|
+
padding: this._host.arrowPadding,
|
|
172
|
+
}),
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
computePosition(this._caller, this._host, {
|
|
177
|
+
middleware,
|
|
178
|
+
placement: this._host.placement,
|
|
179
|
+
strategy: this._host.strategy,
|
|
180
|
+
}).then(({ x, y, placement, middlewareData }) => {
|
|
181
|
+
Object.assign(this._host.style, {
|
|
182
|
+
left: `${x}px`,
|
|
183
|
+
top: `${y}px`,
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
const arrowStyle = {}
|
|
187
|
+
const arrowPosition = {
|
|
188
|
+
top: 'bottom',
|
|
189
|
+
right: 'left',
|
|
190
|
+
bottom: 'top',
|
|
191
|
+
left: 'right',
|
|
192
|
+
}[placement.split('-')[0]]
|
|
193
|
+
|
|
194
|
+
if (arrowPosition && this.arrowEl) {
|
|
195
|
+
Object.assign(arrowStyle, this.arrowTransform(arrowPosition))
|
|
196
|
+
Object.assign(
|
|
197
|
+
arrowStyle,
|
|
198
|
+
this.arrowInset(middlewareData, arrowPosition),
|
|
199
|
+
)
|
|
200
|
+
Object.assign(arrowStyle, this.arrowTransformOrigin(arrowPosition))
|
|
201
|
+
Object.assign(this.arrowEl.style, arrowStyle)
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
updatePosition (): void {
|
|
207
|
+
if (this.cleanupAutoUpdate) this.cleanupAutoUpdate()
|
|
208
|
+
this.cleanupAutoUpdate = autoUpdate(this._caller, this._host, this.calculatePosition)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
dismiss (): void {
|
|
212
|
+
this.cleanupAutoUpdate()
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export class Backdrop {
|
|
217
|
+
private readonly defaultBackdropId = 'mds-backdrop'
|
|
218
|
+
private readonly backdropBackgroundVisible = 'rgba(var(--magma-backdrop-color, 0 0 0) / var(--magma-backdrop-opacity, 0.1))'
|
|
219
|
+
private readonly backdropBackgroundHidden = 'rgba(var(--magma-backdrop-color, 0 0 0) / 0)'
|
|
220
|
+
|
|
221
|
+
private readonly backdropId
|
|
222
|
+
private readonly cssBackdropZIndex
|
|
223
|
+
private readonly cssBackdropDuration
|
|
224
|
+
|
|
225
|
+
private backdropEl: HTMLElement
|
|
226
|
+
private backdropTimer: NodeJS.Timeout
|
|
227
|
+
|
|
228
|
+
constructor (backdropId?: string) {
|
|
229
|
+
this.backdropId = backdropId ?? this.defaultBackdropId
|
|
230
|
+
this.cssBackdropZIndex = `var(--${this.backdropId}-z-index)`
|
|
231
|
+
this.cssBackdropDuration = `var(--${this.backdropId}-duration)`
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
attachBackdrop (): void {
|
|
235
|
+
if (!this.backdropEl) {
|
|
236
|
+
this.backdropEl = document.createElement('div')
|
|
237
|
+
this.backdropEl.className = this.backdropId
|
|
238
|
+
this.backdropEl.style.inset = '0'
|
|
239
|
+
this.backdropEl.style.pointerEvents = 'none'
|
|
240
|
+
this.backdropEl.style.position = 'fixed'
|
|
241
|
+
this.backdropEl.style.transition = `background-color ${this.cssBackdropDuration} ease-out`
|
|
242
|
+
this.backdropEl.style.zIndex = this.cssBackdropZIndex
|
|
243
|
+
}
|
|
244
|
+
this.backdropEl.style.backgroundColor = this.backdropBackgroundHidden
|
|
245
|
+
document.body.appendChild(this.backdropEl)
|
|
246
|
+
|
|
247
|
+
clearTimeout(this.backdropTimer)
|
|
248
|
+
this.backdropTimer = setTimeout(() => {
|
|
249
|
+
this.backdropEl.style.backgroundColor = this.backdropBackgroundVisible
|
|
250
|
+
}, 1)
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
detachBackdrop (): void {
|
|
254
|
+
if (!this.backdropEl) {
|
|
255
|
+
return
|
|
256
|
+
}
|
|
257
|
+
this.backdropEl.style.backgroundColor = 'transparent'
|
|
258
|
+
clearTimeout(this.backdropTimer)
|
|
259
|
+
this.backdropTimer = setTimeout(() => {
|
|
260
|
+
this.backdropEl.remove()
|
|
261
|
+
}, cssDurationToMilliseconds(this.cssBackdropDuration))
|
|
262
|
+
}
|
|
263
|
+
}
|
package/src/common/slot.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
const hasSlottedElements = (el: HTMLElement, name?: string): boolean => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])'
|
|
3
|
+
|
|
4
|
+
const slot: HTMLSlotElement = el.shadowRoot?.querySelector(query) as HTMLSlotElement
|
|
5
|
+
if (slot) {
|
|
6
|
+
return slot.assignedElements({ flatten: true }).length > 0
|
|
5
7
|
}
|
|
8
|
+
return false
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const hasSlottedNodes = (el: HTMLElement, name?: string): boolean => {
|
|
12
|
+
const query = name ? `slot[name="${name}"]` : 'slot:not([name])'
|
|
13
|
+
|
|
6
14
|
const slot: HTMLSlotElement = el.shadowRoot?.querySelector(query) as HTMLSlotElement
|
|
7
15
|
if (slot) {
|
|
8
16
|
return slot.assignedNodes().length > 0
|
|
@@ -12,4 +20,5 @@ const hasSlottedElements = (el: HTMLElement, name?: string): boolean => {
|
|
|
12
20
|
|
|
13
21
|
export {
|
|
14
22
|
hasSlottedElements,
|
|
23
|
+
hasSlottedNodes,
|
|
15
24
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const treeActionsDictionary = [
|
|
2
|
+
'auto',
|
|
3
|
+
'visible',
|
|
4
|
+
]
|
|
5
|
+
|
|
6
|
+
const treeAppearanceDictionary = [
|
|
7
|
+
'depth',
|
|
8
|
+
'none',
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
const treeIconDictionary = [
|
|
12
|
+
'folder',
|
|
13
|
+
'chevron',
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
treeActionsDictionary,
|
|
18
|
+
treeAppearanceDictionary,
|
|
19
|
+
treeIconDictionary,
|
|
20
|
+
}
|
|
21
|
+
|
package/src/fixtures/icons.json
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"mdi/dots-vertical",
|
|
8
8
|
"mdi/email",
|
|
9
9
|
"mdi/file-document-remove-outline",
|
|
10
|
+
"mdi/file-download-outline",
|
|
11
|
+
"mdi/file-upload-outline",
|
|
12
|
+
"mdi/folder-open",
|
|
13
|
+
"mdi/handshake",
|
|
10
14
|
"mdi/harddisk",
|
|
11
15
|
"mdi/license",
|
|
12
16
|
"mdi/map-marker",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"mgg/ai-status-processing",
|
|
45
49
|
"mgg/ai-status-suspended",
|
|
46
50
|
"mgg/alerts-pagopa",
|
|
51
|
+
"mgg/anagrafe-nazionale",
|
|
47
52
|
"mgg/anpr",
|
|
48
53
|
"mgg/ansc",
|
|
49
54
|
"mgg/area-edificabile",
|
|
@@ -68,6 +73,7 @@
|
|
|
68
73
|
"mgg/cancelled-sheet",
|
|
69
74
|
"mgg/car-license",
|
|
70
75
|
"mgg/card-stamping",
|
|
76
|
+
"mgg/cash-register-settings",
|
|
71
77
|
"mgg/check-small",
|
|
72
78
|
"mgg/checklist",
|
|
73
79
|
"mgg/checklist-settings",
|
|
@@ -164,7 +170,9 @@
|
|
|
164
170
|
"mgg/home-hammer",
|
|
165
171
|
"mgg/home-link",
|
|
166
172
|
"mgg/home-number",
|
|
173
|
+
"mgg/inad",
|
|
167
174
|
"mgg/inagibile",
|
|
175
|
+
"mgg/inps",
|
|
168
176
|
"mgg/input-calendar-costs",
|
|
169
177
|
"mgg/input-calendar-period",
|
|
170
178
|
"mgg/input-calendar-time",
|
|
@@ -237,7 +245,9 @@
|
|
|
237
245
|
"mgg/places-park",
|
|
238
246
|
"mgg/places-park-alt",
|
|
239
247
|
"mgg/places-store-access-denied",
|
|
248
|
+
"mgg/pos",
|
|
240
249
|
"mgg/property-owner",
|
|
250
|
+
"mgg/registro-imprese",
|
|
241
251
|
"mgg/relevance",
|
|
242
252
|
"mgg/reporting-abuse",
|
|
243
253
|
"mgg/residency-permit",
|
|
@@ -332,21 +342,27 @@
|
|
|
332
342
|
"mi/baseline/check-box",
|
|
333
343
|
"mi/baseline/check-box-outline-blank",
|
|
334
344
|
"mi/baseline/check-circle",
|
|
345
|
+
"mi/baseline/chevron-right",
|
|
335
346
|
"mi/baseline/close",
|
|
336
347
|
"mi/baseline/contrast",
|
|
337
348
|
"mi/baseline/css",
|
|
338
349
|
"mi/baseline/dark-mode",
|
|
339
350
|
"mi/baseline/delete",
|
|
340
351
|
"mi/baseline/description",
|
|
352
|
+
"mi/baseline/desk",
|
|
341
353
|
"mi/baseline/directions-run",
|
|
342
354
|
"mi/baseline/directions-walk",
|
|
343
355
|
"mi/baseline/done",
|
|
344
356
|
"mi/baseline/downhill-skiing",
|
|
357
|
+
"mi/baseline/draw",
|
|
345
358
|
"mi/baseline/eco",
|
|
346
359
|
"mi/baseline/email",
|
|
347
360
|
"mi/baseline/error",
|
|
348
361
|
"mi/baseline/explore",
|
|
362
|
+
"mi/baseline/favorite",
|
|
363
|
+
"mi/baseline/favorite-border",
|
|
349
364
|
"mi/baseline/file-download-done",
|
|
365
|
+
"mi/baseline/folder",
|
|
350
366
|
"mi/baseline/folder-zip",
|
|
351
367
|
"mi/baseline/horizontal-rule",
|
|
352
368
|
"mi/baseline/indeterminate-check-box",
|
|
@@ -356,9 +372,12 @@
|
|
|
356
372
|
"mi/baseline/keyboard-arrow-up",
|
|
357
373
|
"mi/baseline/light-mode",
|
|
358
374
|
"mi/baseline/local-activity",
|
|
375
|
+
"mi/baseline/location-city",
|
|
359
376
|
"mi/baseline/lock-open",
|
|
360
377
|
"mi/baseline/login",
|
|
361
378
|
"mi/baseline/logout",
|
|
379
|
+
"mi/baseline/meeting-room",
|
|
380
|
+
"mi/baseline/more-vert",
|
|
362
381
|
"mi/baseline/navigate-next",
|
|
363
382
|
"mi/baseline/panorama",
|
|
364
383
|
"mi/baseline/person",
|
|
@@ -376,6 +395,7 @@
|
|
|
376
395
|
"mi/baseline/terminal",
|
|
377
396
|
"mi/baseline/timer",
|
|
378
397
|
"mi/baseline/tv",
|
|
398
|
+
"mi/baseline/unfold-less",
|
|
379
399
|
"mi/baseline/unfold-more",
|
|
380
400
|
"mi/baseline/videocam",
|
|
381
401
|
"mi/baseline/visibility",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"mgg/ai-status-processing",
|
|
32
32
|
"mgg/ai-status-suspended",
|
|
33
33
|
"mgg/alerts-pagopa",
|
|
34
|
+
"mgg/anagrafe-nazionale",
|
|
34
35
|
"mgg/anpr",
|
|
35
36
|
"mgg/ansc",
|
|
36
37
|
"mgg/area-edificabile",
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
"mgg/cancelled-sheet",
|
|
56
57
|
"mgg/car-license",
|
|
57
58
|
"mgg/card-stamping",
|
|
59
|
+
"mgg/cash-register-settings",
|
|
58
60
|
"mgg/check-small",
|
|
59
61
|
"mgg/checklist-settings",
|
|
60
62
|
"mgg/checklist",
|
|
@@ -151,7 +153,9 @@
|
|
|
151
153
|
"mgg/home-hammer",
|
|
152
154
|
"mgg/home-link",
|
|
153
155
|
"mgg/home-number",
|
|
156
|
+
"mgg/inad",
|
|
154
157
|
"mgg/inagibile",
|
|
158
|
+
"mgg/inps",
|
|
155
159
|
"mgg/input-calendar-costs",
|
|
156
160
|
"mgg/input-calendar-period",
|
|
157
161
|
"mgg/input-calendar-time",
|
|
@@ -224,7 +228,9 @@
|
|
|
224
228
|
"mgg/places-park-alt",
|
|
225
229
|
"mgg/places-park",
|
|
226
230
|
"mgg/places-store-access-denied",
|
|
231
|
+
"mgg/pos",
|
|
227
232
|
"mgg/property-owner",
|
|
233
|
+
"mgg/registro-imprese",
|
|
228
234
|
"mgg/relevance",
|
|
229
235
|
"mgg/reporting-abuse",
|
|
230
236
|
"mgg/residency-permit",
|
package/src/type/tree.ts
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-ee90f86a.js";export{s as setNonce}from"./p-ee90f86a.js";import{g as n}from"./p-e1255160.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((async e=>(await n(),o([["p-413a00c5",[[1,"mds-modal",{opened:[1540],position:[1537],animating:[1537]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{opened:["handleOpenProp"]}]]]],e))));
|
package/www/build/mds-modal.js
CHANGED
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-c6899cb0.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,c as t,h as o,H as e,g as i}from"./p-0ed6e0c8.js";function s(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=s(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function a(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=s(n))&&(e&&(e+=" "),e+=t);return e}const r=(n,t=1e3)=>n.includes("ms")?Number(n.replace("ms","")):n.includes("s")?1e3*Number(n.replace("s","")):t,d=class{constructor(o){n(this,o),this.closeEvent=t(this,"mdsModalClose",7),this.hideEvent=t(this,"mdsModalHide",7),this.window=!1,this.top=!1,this.bottom=!1,this.updateCSSCustomProps=()=>{var n;if("undefined"==typeof window)return;const t=window.getComputedStyle(this.host);this.cssTransitionDuration=null!==(n=t.getPropertyValue("--mds-modal-transition-duration"))&&void 0!==n?n:"500"},this.stopIntroAnimationWindow=()=>{this.animating="none",this.host.setAttribute("animating","none"),clearTimeout(this.animationDelayTimeout)},this.stopOutroAnimationWindow=()=>{this.animating="none",this.host.setAttribute("animating","none"),this.hideEvent.emit(),clearTimeout(this.animationDelayTimeout)},this.animateOpenWindow=()=>{this.animating="intro",clearTimeout(this.animationDelayTimeout),this.animationDelayTimeout=setTimeout(this.stopIntroAnimationWindow.bind(this),r(this.cssTransitionDuration))},this.animateCloseWindow=()=>{this.animating="outro",clearTimeout(this.animationDelayTimeout),this.animationDelayTimeout=setTimeout(this.stopOutroAnimationWindow.bind(this),r(this.cssTransitionDuration))},this.closeModal=n=>{var t;"mds-modal"===(null===(t=n.target)||void 0===t?void 0:t.localName)&&(this.opened=n.target!==n.currentTarget,this.opened||this.closeEvent.emit())},this.opened=!1,this.position="center",this.animating="none"}componentWillLoad(){var n;this.bottom=null!==this.host.querySelector('[slot="bottom"]'),this.top=null!==this.host.querySelector('[slot="top"]'),this.window=null!==this.host.querySelector('[slot="window"]'),this.window&&(null===(n=this.host.querySelector('[slot="window"]'))||void 0===n||n.setAttribute("role","dialog"))}componentWillRender(){this.animating=this.opened?"intro":"outro"}componentDidLoad(){this.updateCSSCustomProps()}handleOpenProp(n){n?this.animateOpenWindow():this.animateCloseWindow()}onModalCloseListener(){this.opened=!1}onBannerCloseListener(){this.opened=!1}render(){return o(e,{key:"1d00f0a817af0b0a82eae1c790cc7e312165a46e","aria-modal":a(this.opened?"true":"false"),onClick:n=>{this.closeModal(n)}},this.window?o("slot",{name:"window"}):o("div",{class:a("window",(this.top||this.bottom)&&`window-${this.top?"-top":""}${this.bottom?"-bottom":""}`),part:"window"},this.top&&o("slot",{name:"top"}),o("slot",null),this.bottom&&o("slot",{name:"bottom"})),!this.window&&o("mds-button",{key:"1f62de32ab98e24733a13fe9553ba9a12d9fcf31",class:"action-close",icon:"mi/baseline/close",variant:"light",tone:"quiet",size:"xl",onClick:n=>{this.closeModal(n)}}))}get host(){return i(this)}static get watchers(){return{opened:["handleOpenProp"]}}};d.style='@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: 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`.\n * @prop --mds-modal-overlay-opacity: 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`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position="top"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position="bottom"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened="false"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened="false"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot="window"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened="false"]) ) .window,\n:host([opened]:not([opened="false"]) ) > ::slotted( [slot="window"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position="bottom-left"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="bottom-left"][opened="false"]) .window,\n:host([position="bottom-left"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom-right"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="bottom-right"][opened="false"]) .window,\n:host([position="bottom-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position="bottom"][opened="false"]) .window,\n:host([position="bottom"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="center"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="center"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position="center"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="center"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position="center"][opened="false"]) .window,\n:host([position="center"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position="left"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="left"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position="left"][opened="false"]) .window,\n:host([position="left"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position="left"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position="left"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="right"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="right"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position="right"][opened="false"]) .window,\n:host([position="right"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position="right"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position="right"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="top-left"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="top-left"][opened="false"]) .window,\n:host([position="top-left"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position="top-right"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="top-right"][opened="false"]) .window,\n:host([position="top-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="top"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position="top"][opened="false"]) .window,\n:host([position="top"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n\n';export{d as mds_modal}
|
|
1
|
+
import{r as n,c as t,h as o,H as e,g as i}from"./p-ee90f86a.js";function s(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=s(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function a(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=s(n))&&(e&&(e+=" "),e+=t);return e}const r=(n,t=1e3)=>n.includes("ms")?Number(n.replace("ms","")):n.includes("s")?1e3*Number(n.replace("s","")):t,d=class{constructor(o){n(this,o),this.closeEvent=t(this,"mdsModalClose",7),this.hideEvent=t(this,"mdsModalHide",7),this.window=!1,this.top=!1,this.bottom=!1,this.opened=!1,this.position="center",this.animating="none",this.updateCSSCustomProps=()=>{var n;if("undefined"==typeof window)return;const t=window.getComputedStyle(this.host);this.cssTransitionDuration=null!==(n=t.getPropertyValue("--mds-modal-transition-duration"))&&void 0!==n?n:"500"},this.stopIntroAnimationWindow=()=>{this.animating="none",this.host.setAttribute("animating","none"),clearTimeout(this.animationDelayTimeout)},this.stopOutroAnimationWindow=()=>{this.animating="none",this.host.setAttribute("animating","none"),this.hideEvent.emit(),clearTimeout(this.animationDelayTimeout)},this.animateOpenWindow=()=>{this.animating="intro",clearTimeout(this.animationDelayTimeout),this.animationDelayTimeout=setTimeout(this.stopIntroAnimationWindow.bind(this),r(this.cssTransitionDuration))},this.animateCloseWindow=()=>{this.animating="outro",clearTimeout(this.animationDelayTimeout),this.animationDelayTimeout=setTimeout(this.stopOutroAnimationWindow.bind(this),r(this.cssTransitionDuration))},this.closeModal=n=>{var t;"mds-modal"===(null===(t=n.target)||void 0===t?void 0:t.localName)&&(this.opened=n.target!==n.currentTarget,this.opened||this.closeEvent.emit())}}componentWillLoad(){var n;this.bottom=null!==this.host.querySelector('[slot="bottom"]'),this.top=null!==this.host.querySelector('[slot="top"]'),this.window=null!==this.host.querySelector('[slot="window"]'),this.window&&(null===(n=this.host.querySelector('[slot="window"]'))||void 0===n||n.setAttribute("role","dialog"))}componentWillRender(){this.animating=this.opened?"intro":"outro"}componentDidLoad(){this.updateCSSCustomProps()}handleOpenProp(n){n?this.animateOpenWindow():this.animateCloseWindow()}onModalCloseListener(){this.opened=!1}onBannerCloseListener(){this.opened=!1}render(){return o(e,{key:"1d00f0a817af0b0a82eae1c790cc7e312165a46e","aria-modal":a(this.opened?"true":"false"),onClick:n=>{this.closeModal(n)}},this.window?o("slot",{name:"window"}):o("div",{class:a("window",(this.top||this.bottom)&&`window-${this.top?"-top":""}${this.bottom?"-bottom":""}`),part:"window"},this.top&&o("slot",{name:"top"}),o("slot",null),this.bottom&&o("slot",{name:"bottom"})),!this.window&&o("mds-button",{key:"1f62de32ab98e24733a13fe9553ba9a12d9fcf31",class:"action-close",icon:"mi/baseline/close",variant:"light",tone:"quiet",size:"xl",onClick:n=>{this.closeModal(n)}}))}get host(){return i(this)}static get watchers(){return{opened:["handleOpenProp"]}}};d.style='@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: 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`.\n * @prop --mds-modal-overlay-opacity: 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`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position="top"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position="bottom"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened="false"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened="false"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot="window"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened="false"]) ) .window,\n:host([opened]:not([opened="false"]) ) > ::slotted( [slot="window"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position="bottom-left"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="bottom-left"][opened="false"]) .window,\n:host([position="bottom-left"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom-right"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="bottom-right"][opened="false"]) .window,\n:host([position="bottom-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position="bottom"][opened="false"]) .window,\n:host([position="bottom"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="center"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="center"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position="center"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="center"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position="center"][opened="false"]) .window,\n:host([position="center"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position="left"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="left"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position="left"][opened="false"]) .window,\n:host([position="left"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position="left"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position="left"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="right"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="right"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position="right"][opened="false"]) .window,\n:host([position="right"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position="right"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position="right"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="top-left"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="top-left"][opened="false"]) .window,\n:host([position="top-left"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position="top-right"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="top-right"][opened="false"]) .window,\n:host([position="top-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="top"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position="top"][opened="false"]) .window,\n:host([position="top"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n\n';export{d as mds_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-423dac35.system.js"],(function(n){"use strict";var t,o,e,i,a;return{setters:[function(n){t=n.r;o=n.c;e=n.h;i=n.H;a=n.g}],execute:function(){function s(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=s(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function r(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=s(n))&&(e&&(e+=" "),e+=t);return e}var d=function(n,t){if(t===void 0){t=1e3}if(n.includes("ms")){return Number(n.replace("ms",""))}if(n.includes("s")){return Number(n.replace("s",""))*1e3}return t};var l='@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: 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`.\n * @prop --mds-modal-overlay-opacity: 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`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position="top"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position="bottom"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened="false"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened="false"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot="window"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened="false"]) ) .window,\n:host([opened]:not([opened="false"]) ) > ::slotted( [slot="window"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position="bottom-left"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="bottom-left"][opened="false"]) .window,\n:host([position="bottom-left"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom-right"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="bottom-right"][opened="false"]) .window,\n:host([position="bottom-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position="bottom"][opened="false"]) .window,\n:host([position="bottom"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="center"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="center"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position="center"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="center"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position="center"][opened="false"]) .window,\n:host([position="center"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position="left"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="left"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position="left"][opened="false"]) .window,\n:host([position="left"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position="left"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position="left"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="right"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="right"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position="right"][opened="false"]) .window,\n:host([position="right"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position="right"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position="right"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="top-left"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="top-left"][opened="false"]) .window,\n:host([position="top-left"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position="top-right"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="top-right"][opened="false"]) .window,\n:host([position="top-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="top"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position="top"][opened="false"]) .window,\n:host([position="top"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n\n';var m=l;var p=n("mds_modal",function(){function n(n){var e=this;t(this,n);this.closeEvent=o(this,"mdsModalClose",7);this.hideEvent=o(this,"mdsModalHide",7);this.window=false;this.top=false;this.bottom=false;this.updateCSSCustomProps=function(){var n;if(typeof window==="undefined")return;var t=window.getComputedStyle(e.host);e.cssTransitionDuration=(n=t.getPropertyValue("--mds-modal-transition-duration"))!==null&&n!==void 0?n:"500"};this.stopIntroAnimationWindow=function(){e.animating="none";e.host.setAttribute("animating","none");clearTimeout(e.animationDelayTimeout)};this.stopOutroAnimationWindow=function(){e.animating="none";e.host.setAttribute("animating","none");e.hideEvent.emit();clearTimeout(e.animationDelayTimeout)};this.animateOpenWindow=function(){e.animating="intro";clearTimeout(e.animationDelayTimeout);e.animationDelayTimeout=setTimeout(e.stopIntroAnimationWindow.bind(e),d(e.cssTransitionDuration))};this.animateCloseWindow=function(){e.animating="outro";clearTimeout(e.animationDelayTimeout);e.animationDelayTimeout=setTimeout(e.stopOutroAnimationWindow.bind(e),d(e.cssTransitionDuration))};this.closeModal=function(n){var t;if(((t=n.target)===null||t===void 0?void 0:t.localName)!=="mds-modal"){return}e.opened=n.target!==n.currentTarget;if(!e.opened){e.closeEvent.emit()}};this.opened=false;this.position="center";this.animating="none"}n.prototype.componentWillLoad=function(){var n;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;if(this.window){(n=this.host.querySelector('[slot="window"]'))===null||n===void 0?void 0:n.setAttribute("role","dialog")}};n.prototype.componentWillRender=function(){this.animating=this.opened?"intro":"outro"};n.prototype.componentDidLoad=function(){this.updateCSSCustomProps()};n.prototype.handleOpenProp=function(n){if(n){this.animateOpenWindow();return}this.animateCloseWindow()};n.prototype.onModalCloseListener=function(){this.opened=false};n.prototype.onBannerCloseListener=function(){this.opened=false};n.prototype.render=function(){var n=this;return e(i,{key:"1d00f0a817af0b0a82eae1c790cc7e312165a46e","aria-modal":r(this.opened?"true":"false"),onClick:function(t){n.closeModal(t)}},this.window?e("slot",{name:"window"}):e("div",{class:r("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),part:"window"},this.top&&e("slot",{name:"top"}),e("slot",null),this.bottom&&e("slot",{name:"bottom"})),!this.window&&e("mds-button",{key:"1f62de32ab98e24733a13fe9553ba9a12d9fcf31",class:"action-close",icon:"mi/baseline/close",variant:"light",tone:"quiet",size:"xl",onClick:function(t){n.closeModal(t)}}))};Object.defineProperty(n.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{opened:["handleOpenProp"]}},enumerable:false,configurable:true});return n}());p.style=m}}}));
|
|
1
|
+
System.register(["./p-bc1fa4e4.system.js"],(function(n){"use strict";var t,o,e,i,a;return{setters:[function(n){t=n.r;o=n.c;e=n.h;i=n.H;a=n.g}],execute:function(){function s(n){var t,o,e="";if("string"==typeof n||"number"==typeof n)e+=n;else if("object"==typeof n)if(Array.isArray(n)){var i=n.length;for(t=0;t<i;t++)n[t]&&(o=s(n[t]))&&(e&&(e+=" "),e+=o)}else for(o in n)n[o]&&(e&&(e+=" "),e+=o);return e}function r(){for(var n,t,o=0,e="",i=arguments.length;o<i;o++)(n=arguments[o])&&(t=s(n))&&(e&&(e+=" "),e+=t);return e}var d=function(n,t){if(t===void 0){t=1e3}if(n.includes("ms")){return Number(n.replace("ms",""))}if(n.includes("s")){return Number(n.replace("s",""))*1e3}return t};var l='@-webkit-keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n @keyframes focus-bounce {\n 0%, 75%, 100% {\n outline-offset: var(--magma-outline-focus-offset, 6px);\n }\n\n 50% {\n outline-offset: var(--magma-outline-blur-offset, 2px);\n }\n}\n /* included for focus effect */\n@tailwind components;\n@tailwind utilities;\n\n/**\n * @prop --mds-modal-close-icon-color: Set the color of the close icon button to the top left.\n * @prop --mds-modal-overlay-color: 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`.\n * @prop --mds-modal-overlay-opacity: 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`.\n * @prop --mds-modal-window-background: Set the background color of the window\n * @prop --mds-modal-window-overflow: Set the overflow of the window\n * @prop --mds-modal-window-radius: Set the border radius of the window\n * @prop --mds-modal-window-distance: Set the distance between the modal window and the screen bounds\n * @prop --mds-modal-window-shadow: Set the box shadow of the window\n * @prop --mds-modal-z-index: Set the z-index of the window when the component is opened\n */\n\n:host {\n\n --mds-modal-overlay-color: var(--magma-overlay-color, 0 0 0);\n --mds-modal-overlay-opacity: var(--magma-overlay-opacity, 0.5);\n --mds-modal-transition-duration: 500ms;\n --mds-modal-transition-intro-ease: cubic-bezier(0.19, 1, 0.22, 1);\n --mds-modal-transition-outro-ease: cubic-bezier(0.86, 0, 0.07, 1);\n --mds-modal-window-background: rgb(var(--tone-neutral));\n --mds-modal-window-overflow: auto;\n --mds-modal-window-radius: 0;\n --mds-modal-window-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --mds-modal-window-distance: 0;\n --mds-modal-z-index: var(--magma-modal-z-index);\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n\n -ms-flex-align: center;\n\n align-items: center;\n background-color: rgba(var(--mds-modal-overlay-color) / 0);\n display: -ms-flexbox;\n display: flex;\n fill: rgb(var(--tone-neutral));\n inset: 0;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-perspective: 600px;\n perspective: 600px;\n pointer-events: none;\n position: fixed;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: background-color;\n transition-property: background-color;\n z-index: var(--mds-modal-z-index, 1000);\n}\n\n:host( [position="top"] ) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host( [position="bottom"] ) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n.action-close {\n border-radius: 100px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, -webkit-transform;\n transition-property: bottom, opacity, top, transform;\n transition-property: bottom, opacity, top, transform, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(1, 0, 0, 1);\n transition-timing-function: cubic-bezier(1, 0, 0, 1);\n}\n\n:host([opened]:not([opened="false"])) .action-close {\n opacity: 1;\n pointer-events: auto;\n}\n\n.action-close::part(icon) {\n height: 2.25rem;\n width: 2.25rem;\n}\n\n.window {\n gap: 0rem;\n\n background-color: var(--mds-modal-window-background);\n border-radius: var(--mds-modal-window-radius);\n -webkit-box-shadow: var(--mds-modal-window-shadow);\n box-shadow: var(--mds-modal-window-shadow);\n display: grid;\n grid-template-rows: 1fr;\n margin: var(--mds-modal-window-distance);\n overflow: var(--mds-modal-window-overflow);\n}\n\n.window--top {\n grid-template-rows: auto 1fr;\n}\n\n.window--bottom {\n grid-template-rows: 1fr auto;\n}\n\n.window--top-bottom {\n grid-template-rows: auto 1fr auto;\n}\n\n:host .window {\n -webkit-transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n transition-delay: 0s, calc(var(--mds-modal-transition-duration) / 2);\n}\n\n\n:host([opened]:not([opened="false"]) ) {\n background-color: rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));\n pointer-events: auto;\n}\n\n:host .window,\n:host > ::slotted( [slot="window"] ) {\n opacity: 0;\n -webkit-transition-duration: var(--mds-modal-transition-duration);\n transition-duration: var(--mds-modal-transition-duration);\n -webkit-transition-property: opacity, -webkit-transform;\n transition-property: opacity, -webkit-transform;\n transition-property: transform, opacity;\n transition-property: transform, opacity, -webkit-transform;\n -webkit-transition-timing-function: var(--mds-modal-transition-outro-ease);\n transition-timing-function: var(--mds-modal-transition-outro-ease);\n}\n\n:host([opened]:not([opened="false"]) ) .window,\n:host([opened]:not([opened="false"]) ) > ::slotted( [slot="window"] ) {\n opacity: 1;\n -webkit-transform: rotate(0) scale(1) translateY(0);\n transform: rotate(0) scale(1) translateY(0);\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-timing-function: var(--mds-modal-transition-intro-ease);\n transition-timing-function: var(--mds-modal-transition-intro-ease);\n}\n\n:host([position="bottom-left"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="bottom-left"][opened="false"]) .window,\n:host([position="bottom-left"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom-right"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="bottom-right"][opened="false"]) .window,\n:host([position="bottom-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="bottom"]) {\n -ms-flex-align: end;\n align-items: flex-end;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="bottom"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="bottom"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n transform: rotateX(22deg) rotateY(0) scale(0.5) translate(0, 80%);\n}\n\n:host([position="bottom"][opened="false"]) .window,\n:host([position="bottom"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="center"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="center"]) .window {\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n}\n\n:host([position="center"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="center"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n transform: rotateX(0) rotateY(22deg) scale(0.5) translate(0, 40%);\n}\n\n:host([position="center"][opened="false"]) .window,\n:host([position="center"]:not([opened])) .window {\n -webkit-transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n transform: rotateX(0) rotateY(0) scale(0.5) translate(0, 0);\n}\n\n:host([position="left"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="left"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n transform: rotateX(0) rotateY(22deg) rotateZ(0) scale(0.5) translate(-100%, 0%);\n}\n\n:host([position="left"][opened="false"]) .window,\n:host([position="left"]:not([opened])) .window {\n -webkit-transform: translate(-100%, 0%);\n transform: translate(-100%, 0%);\n}\n\n:host([position="left"]) .action-close {\n right: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(-120%) rotate(-45deg);\n transform: translateX(-120%) rotate(-45deg);\n}\n\n:host([position="left"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="right"]) {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="right"]) .window {\n height: 100%;\n max-height: calc(100dvh - calc(var(--mds-modal-window-distance) * 2));\n max-width: calc(100vw - 80px);\n}\n\n:host([position="right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n transform: rotateX(0) rotateY(-22deg) rotateZ(0) scale(0.5) translate(100%, 0%);\n}\n\n:host([position="right"][opened="false"]) .window,\n:host([position="right"]:not([opened])) .window {\n -webkit-transform: translate(100%, 0%);\n transform: translate(100%, 0%);\n}\n\n:host([position="right"]) .action-close {\n left: 0.75rem;\n top: 0.75rem;\n -webkit-transform: translateX(120%) rotate(45deg);\n transform: translateX(120%) rotate(45deg);\n}\n\n:host([position="right"][opened]:not([opened="false"])) .action-close {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([position="top-left"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-left"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-left"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n transform: rotateX(22deg) rotateY(22deg) scale(0.5) translate(-80%, 80%);\n}\n\n:host([position="top-left"][opened="false"]) .window,\n:host([position="top-left"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n:host([position="top-right"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: end;\n justify-content: flex-end;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top-right"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top-right"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n transform: rotateX(-22deg) rotateY(-22deg) scale(0.5) translate(80%, 80%);\n}\n\n:host([position="top-right"][opened="false"]) .window,\n:host([position="top-right"]:not([opened])) .window {\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n\n:host([position="top"]) {\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\n:host([position="bottom"]) .window {\n height: auto;\n width: 100vw;\n}\n\n:host([position="top"][opened="false"]) > ::slotted( [slot="window"] ),\n:host([position="top"]:not([opened])) > ::slotted( [slot="window"] ) {\n -webkit-transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n transform: rotateX(-22deg) rotateY(0) scale(0.5) translate(0, -80%);\n}\n\n:host([position="top"][opened="false"]) .window,\n:host([position="top"]:not([opened])) .window {\n -webkit-transform: translate(0, -100%);\n transform: translate(0, -100%);\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host,\n .action-close,\n .window {\n -webkit-transition-duration: 0s !important;\n transition-duration: 0s !important;\n }\n\n :host {\n\n --mds-modal-transition-duration: 0s;\n }\n }\n}\n\n@tailwind utilities;\n\n@container style(--magma-pref-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n}\n\n@container style(--magma-pref-contrast: system) {\n\n @media (prefers-contrast: more) {\n :host {\n\n --mds-modal-window-shadow: 0 0 0 2px rgb(var(--tone-neutral-01) / 0.6), 0 25px 50px -12px rgb(0 0 0 / 0.25);\n }\n }\n}\n\n@container style(--magma-pref-theme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n}\n\n@container style(--magma-pref-theme: system) {\n\n @media (prefers-color-scheme: dark) {\n :host {\n\n --mds-modal-window-background: rgb(var(--tone-neutral-09));\n --mds-modal-window-shadow: 0 0 0 1px rgb(var(--tone-neutral-01) / 0.3), 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n }\n }\n}\n\n\n';var m=l;var p=n("mds_modal",function(){function n(n){var e=this;t(this,n);this.closeEvent=o(this,"mdsModalClose",7);this.hideEvent=o(this,"mdsModalHide",7);this.window=false;this.top=false;this.bottom=false;this.opened=false;this.position="center";this.animating="none";this.updateCSSCustomProps=function(){var n;if(typeof window==="undefined")return;var t=window.getComputedStyle(e.host);e.cssTransitionDuration=(n=t.getPropertyValue("--mds-modal-transition-duration"))!==null&&n!==void 0?n:"500"};this.stopIntroAnimationWindow=function(){e.animating="none";e.host.setAttribute("animating","none");clearTimeout(e.animationDelayTimeout)};this.stopOutroAnimationWindow=function(){e.animating="none";e.host.setAttribute("animating","none");e.hideEvent.emit();clearTimeout(e.animationDelayTimeout)};this.animateOpenWindow=function(){e.animating="intro";clearTimeout(e.animationDelayTimeout);e.animationDelayTimeout=setTimeout(e.stopIntroAnimationWindow.bind(e),d(e.cssTransitionDuration))};this.animateCloseWindow=function(){e.animating="outro";clearTimeout(e.animationDelayTimeout);e.animationDelayTimeout=setTimeout(e.stopOutroAnimationWindow.bind(e),d(e.cssTransitionDuration))};this.closeModal=function(n){var t;if(((t=n.target)===null||t===void 0?void 0:t.localName)!=="mds-modal"){return}e.opened=n.target!==n.currentTarget;if(!e.opened){e.closeEvent.emit()}}}n.prototype.componentWillLoad=function(){var n;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;if(this.window){(n=this.host.querySelector('[slot="window"]'))===null||n===void 0?void 0:n.setAttribute("role","dialog")}};n.prototype.componentWillRender=function(){this.animating=this.opened?"intro":"outro"};n.prototype.componentDidLoad=function(){this.updateCSSCustomProps()};n.prototype.handleOpenProp=function(n){if(n){this.animateOpenWindow();return}this.animateCloseWindow()};n.prototype.onModalCloseListener=function(){this.opened=false};n.prototype.onBannerCloseListener=function(){this.opened=false};n.prototype.render=function(){var n=this;return e(i,{key:"1d00f0a817af0b0a82eae1c790cc7e312165a46e","aria-modal":r(this.opened?"true":"false"),onClick:function(t){n.closeModal(t)}},this.window?e("slot",{name:"window"}):e("div",{class:r("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),part:"window"},this.top&&e("slot",{name:"top"}),e("slot",null),this.bottom&&e("slot",{name:"bottom"})),!this.window&&e("mds-button",{key:"1f62de32ab98e24733a13fe9553ba9a12d9fcf31",class:"action-close",icon:"mi/baseline/close",variant:"light",tone:"quiet",size:"xl",onClick:function(t){n.closeModal(t)}}))};Object.defineProperty(n.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{opened:["handleOpenProp"]}},enumerable:false,configurable:true});return n}());p.style=m}}}));
|