winduum 2.0.0-next.2 → 2.0.0-next.4
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/package.json +1 -1
- package/src/base/defaults.css +1 -1
- package/src/components/check/default.css +2 -2
- package/src/components/dialog/content.css +1 -1
- package/src/components/dialog/default.css +6 -2
- package/src/components/dialog/index.d.ts +2 -2
- package/src/components/dialog/index.js +12 -12
- package/src/components/drawer/default.css +1 -1
- package/src/components/group/default.css +1 -1
- package/src/components/image/default.css +1 -1
- package/src/components/popover/content.css +1 -1
- package/src/components/range/default.css +4 -4
- package/src/components/text/default.css +2 -2
package/package.json
CHANGED
package/src/base/defaults.css
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
flex-shrink: 0;
|
|
45
45
|
|
|
46
46
|
&::before {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
inline-size: var(--x-check-icon-size);
|
|
48
|
+
block-size: var(--x-check-icon-size);
|
|
49
49
|
color: var(--x-check-icon-color);
|
|
50
50
|
mask: var(--x-check-icon);
|
|
51
51
|
transition: inherit;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
position: fixed;
|
|
13
13
|
inset: 0;
|
|
14
|
-
overflow:
|
|
14
|
+
overflow: auto;
|
|
15
15
|
overscroll-behavior: contain;
|
|
16
16
|
-webkit-overflow-scrolling: touch;
|
|
17
17
|
|
|
@@ -19,7 +19,11 @@
|
|
|
19
19
|
display: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
&:not(
|
|
22
|
+
&:not([data-open]) {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[data-closed] {
|
|
23
27
|
background-color: transparent;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -4,9 +4,10 @@ import { animationsFinished } from '../../common.js'
|
|
|
4
4
|
* @type {import("./").DefaultOptions}
|
|
5
5
|
*/
|
|
6
6
|
export const defaultOptions = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
closedAttribute: 'data-closed',
|
|
8
|
+
openAttribute: 'data-open',
|
|
9
9
|
scrollbarWidthProperty: '--default-scrollbar-width',
|
|
10
|
+
closable: true,
|
|
10
11
|
remove: false
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -18,7 +19,6 @@ export const defaultOptions = {
|
|
|
18
19
|
*/
|
|
19
20
|
export const showDialog = async (element, options = {}) => {
|
|
20
21
|
options = {
|
|
21
|
-
closable: true,
|
|
22
22
|
...defaultOptions,
|
|
23
23
|
...options
|
|
24
24
|
}
|
|
@@ -40,14 +40,15 @@ export const showDialog = async (element, options = {}) => {
|
|
|
40
40
|
element._dialogHasEvents = true
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
? element.showModal()
|
|
45
|
-
: element.setAttribute('open', '')
|
|
43
|
+
element.setAttribute(options.closedAttribute, '')
|
|
46
44
|
|
|
45
|
+
element.showModal()
|
|
47
46
|
element.scroll(0, 0)
|
|
48
|
-
|
|
47
|
+
|
|
48
|
+
element.removeAttribute(options.closedAttribute)
|
|
49
49
|
await animationsFinished(element.lastElementChild)
|
|
50
|
-
element.
|
|
50
|
+
element.setAttribute(options.openAttribute, '')
|
|
51
|
+
|
|
51
52
|
element.dispatchEvent(new CustomEvent('x-dialog:show'))
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -63,13 +64,12 @@ export const closeDialog = async (element, options = {}) => {
|
|
|
63
64
|
...options
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
element.
|
|
67
|
+
element.removeAttribute(options.openAttribute)
|
|
68
|
+
element.setAttribute(options.closedAttribute, '')
|
|
67
69
|
|
|
68
70
|
await animationsFinished(element.lastElementChild)
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
? element.close()
|
|
72
|
-
: element.removeAttribute('open')
|
|
72
|
+
element.close()
|
|
73
73
|
|
|
74
74
|
element.dispatchEvent(new CustomEvent('x-dialog:close'))
|
|
75
75
|
options.remove && element.remove()
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&::-webkit-slider-thumb {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
inline-size: var(--x-range-thumb-size);
|
|
42
|
+
block-size: var(--x-range-thumb-size);
|
|
43
43
|
background-color: var(--x-range-thumb-background-color);
|
|
44
44
|
border-radius: var(--radius-full);
|
|
45
45
|
border: var(--x-range-thumb-border-width) solid var(--x-range-thumb-border-color);
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
&::-moz-range-thumb {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
inline-size: var(--x-range-thumb-size);
|
|
67
|
+
block-size: var(--x-range-thumb-size);
|
|
68
68
|
background-color: var(--x-range-thumb-background-color);
|
|
69
69
|
border-radius: var(--radius-full);
|
|
70
70
|
border: var(--x-range-thumb-border-width) solid var(--x-range-thumb-border-color);
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
list-style-type: "";
|
|
171
171
|
|
|
172
172
|
&::before {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
inline-size: var(--x-text-list-marker-size);
|
|
174
|
+
block-size: var(--x-text-list-marker-size);
|
|
175
175
|
inset-inline-start: var(--x-text-list-marker-inset-inline-start, -0.75em);
|
|
176
176
|
inset-block-start: var(--x-text-list-marker-inset-block-start, 0.5lh);
|
|
177
177
|
border:
|