@@ -19,8 +19,10 @@ z-index of the component is 200. So be careful. Don't make z-index of the header
19
19
| [ height] ( #height ) | ` string ` ` number ` | ` 'auto' ` |
20
20
| [ max-width] ( #max-width ) | ` string ` ` number ` | ` 'none' ` |
21
21
| [ model-value] ( #model-value ) | ` boolean ` | ` false ` |
22
+ | [ overlay-background] ( #overlay-background ) | ` boolean ` ` string ` | ` true ` |
22
23
| [ persistent] ( #persistent ) | ` boolean ` | ` false ` |
23
24
| [ scrollable] ( #scrollable ) | ` boolean ` | ` false ` |
25
+ | [ transition] ( #transition ) | ` string ` | ` g-dialog-transition ` |
24
26
| [ width] ( #width ) | ` string ` ` number ` | ` 'auto' ` |
25
27
26
28
@@ -32,6 +34,12 @@ z-index of the component is 200. So be careful. Don't make z-index of the header
32
34
- ** Details:** <br />
33
35
Sets background to the dialog content
34
36
37
+ - ` true ` - remains [ default] ( #content-bg ) backround,
38
+ - ` false ` - removes background
39
+ - ` String ` - sets some backround to the current dialog content
40
+
41
+ You can set default value for all dialogs by CSS var [ --g-dialog-content-bg] ( #content-bg )
42
+
35
43
---
36
44
37
45
### ` border-radius `
@@ -42,6 +50,12 @@ z-index of the component is 200. So be careful. Don't make z-index of the header
42
50
- ** Details:** <br />
43
51
Sets border-radius to the dialog content
44
52
53
+ - ` true ` - remains [ default] ( #content-border-radius ) border-radius,
54
+ - ` false ` - removes border-radius
55
+ - ` String ` - sets some border-radius to the current dialog content
56
+
57
+ You can set default value for all dialogs by CSS var [ --g-dialog-content-border-radius] ( #content-border-radius )
58
+
45
59
---
46
60
47
61
### ` content-class `
@@ -93,6 +107,21 @@ v-model props to activate and deactivate the dialog
93
107
94
108
---
95
109
110
+ ### ` overlay-background `
111
+ - ** Type:** ` Boolean | String `
112
+
113
+ - ** Default:** ` true `
114
+
115
+ - ** Details:** <br />
116
+ Sets dialog overlay background.
117
+ - ` true ` - remains [ default] ( #overlay-bg ) backround,
118
+ - ` false ` - removes background
119
+ - ` String ` - sets some backround to the current dialog overlay
120
+
121
+ You can set default value for all dialogs by CSS var [ --g-dialog-overlay-bg] ( #overlay-bg )
122
+
123
+ ---
124
+
96
125
### ` persistent `
97
126
- ** Type:** ` Boolean `
98
127
@@ -110,6 +139,44 @@ Makes clicking outside of the element will not deactivate the dialog
110
139
111
140
<!-- - **Details:** <br/> -->
112
141
142
+ ---
143
+ ### ` transition `
144
+ - ** Type:** ` String `
145
+
146
+ - ** Default:** ` 'g-dialog-transition' `
147
+
148
+ - ** Details:** <br />
149
+ Sets the component custom transition name (leaving and entering the dialog). Here is example:
150
+
151
+ ``` scss
152
+ // transition="custom-rotate-transition"
153
+ .custom-rotate-transition {
154
+ & -enter-active ,
155
+ & -leave-active {
156
+ transition-timing-function : linear ;
157
+ transition-duration : 0.1s ; // not higher than 200ms
158
+ }
159
+
160
+ & -enter-from {
161
+ transform : translate (0 , 30px ) rotate (12deg );
162
+ opacity : 0 ;
163
+ }
164
+
165
+ & -leave-to {
166
+ transform : translate (0 , 30px ) rotate (4deg );
167
+ opacity : 0 ;
168
+ }
169
+ }
170
+ ```
171
+
172
+ ::: warning
173
+ On leaving don't set ` transition-duration ` higher than ` 150ms ` -` 200ms ` if you are using
174
+ plugin method [ addDialog] ( /docs/guide/plugin-usage#adddialog-data ) .
175
+
176
+ [ removeDialog] ( /docs/guide/plugin-usage#removedialog-index ) disables a dialog and deletes it after 150ms
177
+ completely, so the custom transition may be truncated
178
+ :::
179
+
113
180
---
114
181
### ` width `
115
182
- ** Type:** ` String | Number `
@@ -125,7 +192,7 @@ Sets width for the dialog
125
192
126
193
| Name | Description |
127
194
| :---| :---|
128
- | default | The default Vue slot
195
+ | default | The default Vue slot |
129
196
130
197
131
198
## Events
@@ -177,4 +244,37 @@ Or use CSS variables to do it globally. Put the vars into your global css file o
177
244
```css
178
245
--g-dialog-border-radius: 0;
179
246
```
247
+ ---
248
+
249
+ ### content-shadow
250
+ - ** Name:** `--g-dialog-content-shadow`
251
+
252
+ - ** Default:** <br/>
253
+ `0 11px 15px -7px rgb(0 0 0 / 20%),` <br/>
254
+ `0 24px 38px 3px rgb(0 0 0 / 14%),` <br/>
255
+ `0 9px 46px 8px rgb(0 0 0 / 12%)` <br/>
256
+
257
+ - ** Details :** <br/>
258
+ Sets default `box-shadow ` for the dialog content
259
+
260
+ - ** Usage:**
261
+
262
+ ```css
263
+ --g-dialog-content-shadow: 0 11px 15px -7px rgb(0 0 0 / 20%);
264
+ ```
265
+ ---
266
+
267
+ ### overlay-bg
268
+ - ** Name:** ` --g-dialog-overlay-bg `
269
+
270
+ - ** Default:** ` rgba(33, 33, 33, 0.46) `
271
+
272
+ - ** Details:** <br />
273
+ Sets default ` background ` for the dialog overlay
274
+
275
+ - ** Usage:**
276
+
277
+ ``` css
278
+ --g-dialog-overlay-bg: rgba(143, 108, 249, 0.4 );
279
+ ```
180
280
---
0 commit comments