@zazz-ui/core 0.8.2 → 0.8.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/CHANGELOG.md +39 -0
- package/README.md +2 -2
- package/dist/sri.json +48 -48
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +1968 -592
- package/editor/zazz.language-data.json +26 -17
- package/editor/zazz.lint-data.json +10 -0
- package/package.json +1 -1
- package/src/base/_defaults.css +5 -0
- package/src/base/_properties-2xl.css +4 -0
- package/src/base/_properties-active.css +12 -0
- package/src/base/_properties-checked.css +12 -0
- package/src/base/_properties-current.css +12 -0
- package/src/base/_properties-disabled.css +12 -0
- package/src/base/_properties-focus-visible.css +12 -0
- package/src/base/_properties-focus-within.css +12 -0
- package/src/base/_properties-hover.css +12 -0
- package/src/base/_properties-lg.css +4 -0
- package/src/base/_properties-md.css +4 -0
- package/src/base/_properties-open.css +12 -0
- package/src/base/_properties-sm.css +4 -0
- package/src/base/_properties-starting.css +6 -0
- package/src/base/_properties-stuck.css +6 -0
- package/src/base/_properties-xl.css +4 -0
- package/src/base/_properties.css +16 -0
- package/src/base/_shadows.css +17 -17
- package/src/base/_utilities-box.css +2 -2
- package/src/base/_utilities-spacing.css +42 -0
- package/src/base/_utilities-tier-2xl.css +2 -0
- package/src/base/_utilities-tier-active.css +6 -0
- package/src/base/_utilities-tier-checked.css +6 -0
- package/src/base/_utilities-tier-current.css +6 -0
- package/src/base/_utilities-tier-disabled.css +6 -0
- package/src/base/_utilities-tier-focus-visible.css +6 -0
- package/src/base/_utilities-tier-focus-within.css +6 -0
- package/src/base/_utilities-tier-hover.css +6 -0
- package/src/base/_utilities-tier-lg.css +2 -0
- package/src/base/_utilities-tier-md.css +2 -0
- package/src/base/_utilities-tier-open.css +6 -0
- package/src/base/_utilities-tier-sm.css +2 -0
- package/src/base/_utilities-tier-starting.css +3 -0
- package/src/base/_utilities-tier-stuck.css +3 -0
- package/src/base/_utilities-tier-xl.css +2 -0
- package/src/base/_variables.css +2 -2
- package/src/base/embla.d.ts.map +1 -1
- package/src/base/embla.js +48 -5
- package/src/base/embla.ts +63 -5
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +1 -0
- package/src/base/kit-styling.ts +1 -0
- package/src/base/utilities.d.ts +5 -2
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +35 -2
- package/src/base/utilities.ts +49 -4
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +1 -0
- package/src/manifest.ts +1 -0
- package/src/primitives/badge/badge.css +69 -27
- package/src/primitives/button/button.css +67 -25
- package/src/primitives/callout/callout.css +9 -9
- package/src/primitives/carousel/carousel.css +8 -7
- package/src/primitives/popover/popover.css +2 -2
- package/src/primitives/switch/switch.css +2 -2
- package/src/primitives/utilities/space.html +18 -0
|
@@ -142,6 +142,48 @@
|
|
|
142
142
|
row-gap: calc(var(--_gap-y-len) + var(--_gap-y-num) * var(--spacing));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
:where([style*="--space-x:"], [style*="--space-x--"], [style*="--group-space-x--"]) {
|
|
146
|
+
--_space-x-resolved: var(--_space-x-starting, var(--_space-x-disabled, var(--_space-x-active, var(--_space-x-focus-visible, var(--_space-x-focus-within, var(--_space-x-hover, var(--_space-x-checked, var(--_space-x-current, var(--_space-x-open, var(--_space-x-g-disabled, var(--_space-x-g-active, var(--_space-x-g-focus-visible, var(--_space-x-g-focus-within, var(--_space-x-g-hover, var(--_space-x-g-checked, var(--_space-x-g-current, var(--_space-x-g-open, var(--_space-x-stuck, var(--_space-x-2xl, var(--_space-x-xl, var(--_space-x-lg, var(--_space-x-md, var(--_space-x-sm, var(--_space-x))))))))))))))))))))))));
|
|
147
|
+
}
|
|
148
|
+
:where([style*="--space-x:"]) {
|
|
149
|
+
--_space-x: var(--space-x);
|
|
150
|
+
--_space-x-len: var(--_space-x-resolved);
|
|
151
|
+
--_space-x-num: var(--_space-x-resolved);
|
|
152
|
+
--_space-x-a: calc(var(--_space-x-len) + var(--_space-x-num) * var(--spacing));
|
|
153
|
+
--_space-x-slot: a;
|
|
154
|
+
}
|
|
155
|
+
@container style(--_space-x-slot: a) {
|
|
156
|
+
:where([style*="--space-x:"]) {
|
|
157
|
+
--_space-x-b: calc(var(--_space-x-len) + var(--_space-x-num) * var(--spacing));
|
|
158
|
+
--_space-x-slot: b;
|
|
159
|
+
}
|
|
160
|
+
:where(:not(:last-child, dialog, [popover])) { --_space-x-a: inherit; margin-inline-end: var(--_space-x-a); }
|
|
161
|
+
}
|
|
162
|
+
@container style(--_space-x-slot: b) {
|
|
163
|
+
:where(:not(:last-child, dialog, [popover])) { --_space-x-b: inherit; margin-inline-end: var(--_space-x-b); }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:where([style*="--space-y:"], [style*="--space-y--"], [style*="--group-space-y--"]) {
|
|
167
|
+
--_space-y-resolved: var(--_space-y-starting, var(--_space-y-disabled, var(--_space-y-active, var(--_space-y-focus-visible, var(--_space-y-focus-within, var(--_space-y-hover, var(--_space-y-checked, var(--_space-y-current, var(--_space-y-open, var(--_space-y-g-disabled, var(--_space-y-g-active, var(--_space-y-g-focus-visible, var(--_space-y-g-focus-within, var(--_space-y-g-hover, var(--_space-y-g-checked, var(--_space-y-g-current, var(--_space-y-g-open, var(--_space-y-stuck, var(--_space-y-2xl, var(--_space-y-xl, var(--_space-y-lg, var(--_space-y-md, var(--_space-y-sm, var(--_space-y))))))))))))))))))))))));
|
|
168
|
+
}
|
|
169
|
+
:where([style*="--space-y:"]) {
|
|
170
|
+
--_space-y: var(--space-y);
|
|
171
|
+
--_space-y-len: var(--_space-y-resolved);
|
|
172
|
+
--_space-y-num: var(--_space-y-resolved);
|
|
173
|
+
--_space-y-a: calc(var(--_space-y-len) + var(--_space-y-num) * var(--spacing));
|
|
174
|
+
--_space-y-slot: a;
|
|
175
|
+
}
|
|
176
|
+
@container style(--_space-y-slot: a) {
|
|
177
|
+
:where([style*="--space-y:"]) {
|
|
178
|
+
--_space-y-b: calc(var(--_space-y-len) + var(--_space-y-num) * var(--spacing));
|
|
179
|
+
--_space-y-slot: b;
|
|
180
|
+
}
|
|
181
|
+
:where(:not(:last-child, dialog, [popover])) { --_space-y-a: inherit; margin-block-end: var(--_space-y-a); }
|
|
182
|
+
}
|
|
183
|
+
@container style(--_space-y-slot: b) {
|
|
184
|
+
:where(:not(:last-child, dialog, [popover])) { --_space-y-b: inherit; margin-block-end: var(--_space-y-b); }
|
|
185
|
+
}
|
|
186
|
+
|
|
145
187
|
:where([style*="--inset:"], [style*="--inset--"]) {
|
|
146
188
|
--_inset-resolved: var(--_inset-2xl, var(--_inset-xl, var(--_inset-lg, var(--_inset-md, var(--_inset-sm, var(--_inset))))));
|
|
147
189
|
}
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
--_gap-2xl: var(--gap--2xl);
|
|
45
45
|
--_gap-x-2xl: var(--gap-x--2xl);
|
|
46
46
|
--_gap-y-2xl: var(--gap-y--2xl);
|
|
47
|
+
--_space-x-2xl: var(--space-x--2xl);
|
|
48
|
+
--_space-y-2xl: var(--space-y--2xl);
|
|
47
49
|
--_inset-2xl: var(--inset--2xl);
|
|
48
50
|
--_inset-x-2xl: var(--inset-x--2xl);
|
|
49
51
|
--_inset-y-2xl: var(--inset-y--2xl);
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-active: var(--position-area--active);
|
|
9
9
|
--_template-cols-active: var(--template-cols--active);
|
|
10
10
|
--_template-rows-active: var(--template-rows--active);
|
|
11
|
+
--_space-x-active: var(--space-x--active);
|
|
12
|
+
--_space-y-active: var(--space-y--active);
|
|
11
13
|
--_text-decoration-active: var(--text-decoration--active);
|
|
12
14
|
--_text-active: var(--text--active);
|
|
13
15
|
--_bg-active: var(--bg--active);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-active: var(--transition-duration--active);
|
|
41
43
|
--_transition-delay-active: var(--transition-delay--active);
|
|
42
44
|
--_radius-active: var(--radius--active);
|
|
45
|
+
--_z-active: var(--z--active);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:active [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-active: var(--group-anchor-name--active);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-active: var(--group-position-area--active);
|
|
48
51
|
--_template-cols-g-active: var(--group-template-cols--active);
|
|
49
52
|
--_template-rows-g-active: var(--group-template-rows--active);
|
|
53
|
+
--_space-x-g-active: var(--group-space-x--active);
|
|
54
|
+
--_space-y-g-active: var(--group-space-y--active);
|
|
50
55
|
--_text-decoration-g-active: var(--group-text-decoration--active);
|
|
51
56
|
--_text-g-active: var(--group-text--active);
|
|
52
57
|
--_bg-g-active: var(--group-bg--active);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-active: var(--group-transition-duration--active);
|
|
80
85
|
--_transition-delay-g-active: var(--group-transition-delay--active);
|
|
81
86
|
--_radius-g-active: var(--group-radius--active);
|
|
87
|
+
--_z-g-active: var(--group-z--active);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-checked: var(--position-area--checked);
|
|
9
9
|
--_template-cols-checked: var(--template-cols--checked);
|
|
10
10
|
--_template-rows-checked: var(--template-rows--checked);
|
|
11
|
+
--_space-x-checked: var(--space-x--checked);
|
|
12
|
+
--_space-y-checked: var(--space-y--checked);
|
|
11
13
|
--_text-decoration-checked: var(--text-decoration--checked);
|
|
12
14
|
--_text-checked: var(--text--checked);
|
|
13
15
|
--_bg-checked: var(--bg--checked);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-checked: var(--transition-duration--checked);
|
|
41
43
|
--_transition-delay-checked: var(--transition-delay--checked);
|
|
42
44
|
--_radius-checked: var(--radius--checked);
|
|
45
|
+
--_z-checked: var(--z--checked);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:is(:checked, [aria-checked="true"]) [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-checked: var(--group-anchor-name--checked);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-checked: var(--group-position-area--checked);
|
|
48
51
|
--_template-cols-g-checked: var(--group-template-cols--checked);
|
|
49
52
|
--_template-rows-g-checked: var(--group-template-rows--checked);
|
|
53
|
+
--_space-x-g-checked: var(--group-space-x--checked);
|
|
54
|
+
--_space-y-g-checked: var(--group-space-y--checked);
|
|
50
55
|
--_text-decoration-g-checked: var(--group-text-decoration--checked);
|
|
51
56
|
--_text-g-checked: var(--group-text--checked);
|
|
52
57
|
--_bg-g-checked: var(--group-bg--checked);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-checked: var(--group-transition-duration--checked);
|
|
80
85
|
--_transition-delay-g-checked: var(--group-transition-delay--checked);
|
|
81
86
|
--_radius-g-checked: var(--group-radius--checked);
|
|
87
|
+
--_z-g-checked: var(--group-z--checked);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-current: var(--position-area--current);
|
|
9
9
|
--_template-cols-current: var(--template-cols--current);
|
|
10
10
|
--_template-rows-current: var(--template-rows--current);
|
|
11
|
+
--_space-x-current: var(--space-x--current);
|
|
12
|
+
--_space-y-current: var(--space-y--current);
|
|
11
13
|
--_text-decoration-current: var(--text-decoration--current);
|
|
12
14
|
--_text-current: var(--text--current);
|
|
13
15
|
--_bg-current: var(--bg--current);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-current: var(--transition-duration--current);
|
|
41
43
|
--_transition-delay-current: var(--transition-delay--current);
|
|
42
44
|
--_radius-current: var(--radius--current);
|
|
45
|
+
--_z-current: var(--z--current);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:is([aria-current]:not([aria-current="false"])) [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-current: var(--group-anchor-name--current);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-current: var(--group-position-area--current);
|
|
48
51
|
--_template-cols-g-current: var(--group-template-cols--current);
|
|
49
52
|
--_template-rows-g-current: var(--group-template-rows--current);
|
|
53
|
+
--_space-x-g-current: var(--group-space-x--current);
|
|
54
|
+
--_space-y-g-current: var(--group-space-y--current);
|
|
50
55
|
--_text-decoration-g-current: var(--group-text-decoration--current);
|
|
51
56
|
--_text-g-current: var(--group-text--current);
|
|
52
57
|
--_bg-g-current: var(--group-bg--current);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-current: var(--group-transition-duration--current);
|
|
80
85
|
--_transition-delay-g-current: var(--group-transition-delay--current);
|
|
81
86
|
--_radius-g-current: var(--group-radius--current);
|
|
87
|
+
--_z-g-current: var(--group-z--current);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-disabled: var(--position-area--disabled);
|
|
9
9
|
--_template-cols-disabled: var(--template-cols--disabled);
|
|
10
10
|
--_template-rows-disabled: var(--template-rows--disabled);
|
|
11
|
+
--_space-x-disabled: var(--space-x--disabled);
|
|
12
|
+
--_space-y-disabled: var(--space-y--disabled);
|
|
11
13
|
--_text-decoration-disabled: var(--text-decoration--disabled);
|
|
12
14
|
--_text-disabled: var(--text--disabled);
|
|
13
15
|
--_bg-disabled: var(--bg--disabled);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-disabled: var(--transition-duration--disabled);
|
|
41
43
|
--_transition-delay-disabled: var(--transition-delay--disabled);
|
|
42
44
|
--_radius-disabled: var(--radius--disabled);
|
|
45
|
+
--_z-disabled: var(--z--disabled);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:is(:disabled, [aria-disabled="true"]) [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-disabled: var(--group-anchor-name--disabled);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-disabled: var(--group-position-area--disabled);
|
|
48
51
|
--_template-cols-g-disabled: var(--group-template-cols--disabled);
|
|
49
52
|
--_template-rows-g-disabled: var(--group-template-rows--disabled);
|
|
53
|
+
--_space-x-g-disabled: var(--group-space-x--disabled);
|
|
54
|
+
--_space-y-g-disabled: var(--group-space-y--disabled);
|
|
50
55
|
--_text-decoration-g-disabled: var(--group-text-decoration--disabled);
|
|
51
56
|
--_text-g-disabled: var(--group-text--disabled);
|
|
52
57
|
--_bg-g-disabled: var(--group-bg--disabled);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-disabled: var(--group-transition-duration--disabled);
|
|
80
85
|
--_transition-delay-g-disabled: var(--group-transition-delay--disabled);
|
|
81
86
|
--_radius-g-disabled: var(--group-radius--disabled);
|
|
87
|
+
--_z-g-disabled: var(--group-z--disabled);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-focus-visible: var(--position-area--focus-visible);
|
|
9
9
|
--_template-cols-focus-visible: var(--template-cols--focus-visible);
|
|
10
10
|
--_template-rows-focus-visible: var(--template-rows--focus-visible);
|
|
11
|
+
--_space-x-focus-visible: var(--space-x--focus-visible);
|
|
12
|
+
--_space-y-focus-visible: var(--space-y--focus-visible);
|
|
11
13
|
--_text-decoration-focus-visible: var(--text-decoration--focus-visible);
|
|
12
14
|
--_text-focus-visible: var(--text--focus-visible);
|
|
13
15
|
--_bg-focus-visible: var(--bg--focus-visible);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-focus-visible: var(--transition-duration--focus-visible);
|
|
41
43
|
--_transition-delay-focus-visible: var(--transition-delay--focus-visible);
|
|
42
44
|
--_radius-focus-visible: var(--radius--focus-visible);
|
|
45
|
+
--_z-focus-visible: var(--z--focus-visible);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:focus-visible [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-focus-visible: var(--group-anchor-name--focus-visible);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-focus-visible: var(--group-position-area--focus-visible);
|
|
48
51
|
--_template-cols-g-focus-visible: var(--group-template-cols--focus-visible);
|
|
49
52
|
--_template-rows-g-focus-visible: var(--group-template-rows--focus-visible);
|
|
53
|
+
--_space-x-g-focus-visible: var(--group-space-x--focus-visible);
|
|
54
|
+
--_space-y-g-focus-visible: var(--group-space-y--focus-visible);
|
|
50
55
|
--_text-decoration-g-focus-visible: var(--group-text-decoration--focus-visible);
|
|
51
56
|
--_text-g-focus-visible: var(--group-text--focus-visible);
|
|
52
57
|
--_bg-g-focus-visible: var(--group-bg--focus-visible);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-focus-visible: var(--group-transition-duration--focus-visible);
|
|
80
85
|
--_transition-delay-g-focus-visible: var(--group-transition-delay--focus-visible);
|
|
81
86
|
--_radius-g-focus-visible: var(--group-radius--focus-visible);
|
|
87
|
+
--_z-g-focus-visible: var(--group-z--focus-visible);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-focus-within: var(--position-area--focus-within);
|
|
9
9
|
--_template-cols-focus-within: var(--template-cols--focus-within);
|
|
10
10
|
--_template-rows-focus-within: var(--template-rows--focus-within);
|
|
11
|
+
--_space-x-focus-within: var(--space-x--focus-within);
|
|
12
|
+
--_space-y-focus-within: var(--space-y--focus-within);
|
|
11
13
|
--_text-decoration-focus-within: var(--text-decoration--focus-within);
|
|
12
14
|
--_text-focus-within: var(--text--focus-within);
|
|
13
15
|
--_bg-focus-within: var(--bg--focus-within);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-focus-within: var(--transition-duration--focus-within);
|
|
41
43
|
--_transition-delay-focus-within: var(--transition-delay--focus-within);
|
|
42
44
|
--_radius-focus-within: var(--radius--focus-within);
|
|
45
|
+
--_z-focus-within: var(--z--focus-within);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:focus-within [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-focus-within: var(--group-anchor-name--focus-within);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-focus-within: var(--group-position-area--focus-within);
|
|
48
51
|
--_template-cols-g-focus-within: var(--group-template-cols--focus-within);
|
|
49
52
|
--_template-rows-g-focus-within: var(--group-template-rows--focus-within);
|
|
53
|
+
--_space-x-g-focus-within: var(--group-space-x--focus-within);
|
|
54
|
+
--_space-y-g-focus-within: var(--group-space-y--focus-within);
|
|
50
55
|
--_text-decoration-g-focus-within: var(--group-text-decoration--focus-within);
|
|
51
56
|
--_text-g-focus-within: var(--group-text--focus-within);
|
|
52
57
|
--_bg-g-focus-within: var(--group-bg--focus-within);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-focus-within: var(--group-transition-duration--focus-within);
|
|
80
85
|
--_transition-delay-g-focus-within: var(--group-transition-delay--focus-within);
|
|
81
86
|
--_radius-g-focus-within: var(--group-radius--focus-within);
|
|
87
|
+
--_z-g-focus-within: var(--group-z--focus-within);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--_position-area-hover: var(--position-area--hover);
|
|
10
10
|
--_template-cols-hover: var(--template-cols--hover);
|
|
11
11
|
--_template-rows-hover: var(--template-rows--hover);
|
|
12
|
+
--_space-x-hover: var(--space-x--hover);
|
|
13
|
+
--_space-y-hover: var(--space-y--hover);
|
|
12
14
|
--_text-decoration-hover: var(--text-decoration--hover);
|
|
13
15
|
--_text-hover: var(--text--hover);
|
|
14
16
|
--_bg-hover: var(--bg--hover);
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
--_transition-duration-hover: var(--transition-duration--hover);
|
|
42
44
|
--_transition-delay-hover: var(--transition-delay--hover);
|
|
43
45
|
--_radius-hover: var(--radius--hover);
|
|
46
|
+
--_z-hover: var(--z--hover);
|
|
44
47
|
}
|
|
45
48
|
:where([data-ui~="group"]:hover [style*="--group-"]) {
|
|
46
49
|
--_anchor-name-g-hover: var(--group-anchor-name--hover);
|
|
@@ -48,6 +51,8 @@
|
|
|
48
51
|
--_position-area-g-hover: var(--group-position-area--hover);
|
|
49
52
|
--_template-cols-g-hover: var(--group-template-cols--hover);
|
|
50
53
|
--_template-rows-g-hover: var(--group-template-rows--hover);
|
|
54
|
+
--_space-x-g-hover: var(--group-space-x--hover);
|
|
55
|
+
--_space-y-g-hover: var(--group-space-y--hover);
|
|
51
56
|
--_text-decoration-g-hover: var(--group-text-decoration--hover);
|
|
52
57
|
--_text-g-hover: var(--group-text--hover);
|
|
53
58
|
--_bg-g-hover: var(--group-bg--hover);
|
|
@@ -80,6 +85,7 @@
|
|
|
80
85
|
--_transition-duration-g-hover: var(--group-transition-duration--hover);
|
|
81
86
|
--_transition-delay-g-hover: var(--group-transition-delay--hover);
|
|
82
87
|
--_radius-g-hover: var(--group-radius--hover);
|
|
88
|
+
--_z-g-hover: var(--group-z--hover);
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
}
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
--_gap-lg: var(--gap--lg);
|
|
45
45
|
--_gap-x-lg: var(--gap-x--lg);
|
|
46
46
|
--_gap-y-lg: var(--gap-y--lg);
|
|
47
|
+
--_space-x-lg: var(--space-x--lg);
|
|
48
|
+
--_space-y-lg: var(--space-y--lg);
|
|
47
49
|
--_inset-lg: var(--inset--lg);
|
|
48
50
|
--_inset-x-lg: var(--inset-x--lg);
|
|
49
51
|
--_inset-y-lg: var(--inset-y--lg);
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
--_gap-md: var(--gap--md);
|
|
45
45
|
--_gap-x-md: var(--gap-x--md);
|
|
46
46
|
--_gap-y-md: var(--gap-y--md);
|
|
47
|
+
--_space-x-md: var(--space-x--md);
|
|
48
|
+
--_space-y-md: var(--space-y--md);
|
|
47
49
|
--_inset-md: var(--inset--md);
|
|
48
50
|
--_inset-x-md: var(--inset-x--md);
|
|
49
51
|
--_inset-y-md: var(--inset-y--md);
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--_position-area-open: var(--position-area--open);
|
|
9
9
|
--_template-cols-open: var(--template-cols--open);
|
|
10
10
|
--_template-rows-open: var(--template-rows--open);
|
|
11
|
+
--_space-x-open: var(--space-x--open);
|
|
12
|
+
--_space-y-open: var(--space-y--open);
|
|
11
13
|
--_text-decoration-open: var(--text-decoration--open);
|
|
12
14
|
--_text-open: var(--text--open);
|
|
13
15
|
--_bg-open: var(--bg--open);
|
|
@@ -40,6 +42,7 @@
|
|
|
40
42
|
--_transition-duration-open: var(--transition-duration--open);
|
|
41
43
|
--_transition-delay-open: var(--transition-delay--open);
|
|
42
44
|
--_radius-open: var(--radius--open);
|
|
45
|
+
--_z-open: var(--z--open);
|
|
43
46
|
}
|
|
44
47
|
:where([data-ui~="group"]:is([open], :popover-open, [aria-expanded="true"]) [style*="--group-"]) {
|
|
45
48
|
--_anchor-name-g-open: var(--group-anchor-name--open);
|
|
@@ -47,6 +50,8 @@
|
|
|
47
50
|
--_position-area-g-open: var(--group-position-area--open);
|
|
48
51
|
--_template-cols-g-open: var(--group-template-cols--open);
|
|
49
52
|
--_template-rows-g-open: var(--group-template-rows--open);
|
|
53
|
+
--_space-x-g-open: var(--group-space-x--open);
|
|
54
|
+
--_space-y-g-open: var(--group-space-y--open);
|
|
50
55
|
--_text-decoration-g-open: var(--group-text-decoration--open);
|
|
51
56
|
--_text-g-open: var(--group-text--open);
|
|
52
57
|
--_bg-g-open: var(--group-bg--open);
|
|
@@ -79,5 +84,6 @@
|
|
|
79
84
|
--_transition-duration-g-open: var(--group-transition-duration--open);
|
|
80
85
|
--_transition-delay-g-open: var(--group-transition-delay--open);
|
|
81
86
|
--_radius-g-open: var(--group-radius--open);
|
|
87
|
+
--_z-g-open: var(--group-z--open);
|
|
82
88
|
}
|
|
83
89
|
}
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
--_gap-sm: var(--gap--sm);
|
|
45
45
|
--_gap-x-sm: var(--gap-x--sm);
|
|
46
46
|
--_gap-y-sm: var(--gap-y--sm);
|
|
47
|
+
--_space-x-sm: var(--space-x--sm);
|
|
48
|
+
--_space-y-sm: var(--space-y--sm);
|
|
47
49
|
--_inset-sm: var(--inset--sm);
|
|
48
50
|
--_inset-x-sm: var(--inset-x--sm);
|
|
49
51
|
--_inset-y-sm: var(--inset-y--sm);
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--_position-area-starting: var(--position-area--starting);
|
|
10
10
|
--_template-cols-starting: var(--template-cols--starting);
|
|
11
11
|
--_template-rows-starting: var(--template-rows--starting);
|
|
12
|
+
--_space-x-starting: var(--space-x--starting);
|
|
13
|
+
--_space-y-starting: var(--space-y--starting);
|
|
12
14
|
--_text-decoration-starting: var(--text-decoration--starting);
|
|
13
15
|
--_text-starting: var(--text--starting);
|
|
14
16
|
--_bg-starting: var(--bg--starting);
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
--_transition-duration-starting: var(--transition-duration--starting);
|
|
42
44
|
--_transition-delay-starting: var(--transition-delay--starting);
|
|
43
45
|
--_radius-starting: var(--radius--starting);
|
|
46
|
+
--_z-starting: var(--z--starting);
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
}
|
|
@@ -89,6 +89,8 @@
|
|
|
89
89
|
--_position-area-stuck: var(--_stuck-on) var(--position-area--stuck);
|
|
90
90
|
--_template-cols-stuck: var(--_stuck-on) var(--template-cols--stuck);
|
|
91
91
|
--_template-rows-stuck: var(--_stuck-on) var(--template-rows--stuck);
|
|
92
|
+
--_space-x-stuck: var(--_stuck-on) var(--space-x--stuck);
|
|
93
|
+
--_space-y-stuck: var(--_stuck-on) var(--space-y--stuck);
|
|
92
94
|
--_text-decoration-stuck: var(--_stuck-on) var(--text-decoration--stuck);
|
|
93
95
|
--_text-stuck: var(--_stuck-on) var(--text--stuck);
|
|
94
96
|
--_bg-stuck: var(--_stuck-on) var(--bg--stuck);
|
|
@@ -121,5 +123,6 @@
|
|
|
121
123
|
--_transition-duration-stuck: var(--_stuck-on) var(--transition-duration--stuck);
|
|
122
124
|
--_transition-delay-stuck: var(--_stuck-on) var(--transition-delay--stuck);
|
|
123
125
|
--_radius-stuck: var(--_stuck-on) var(--radius--stuck);
|
|
126
|
+
--_z-stuck: var(--_stuck-on) var(--z--stuck);
|
|
124
127
|
}
|
|
125
128
|
}
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
--_gap-xl: var(--gap--xl);
|
|
45
45
|
--_gap-x-xl: var(--gap-x--xl);
|
|
46
46
|
--_gap-y-xl: var(--gap-y--xl);
|
|
47
|
+
--_space-x-xl: var(--space-x--xl);
|
|
48
|
+
--_space-y-xl: var(--space-y--xl);
|
|
47
49
|
--_inset-xl: var(--inset--xl);
|
|
48
50
|
--_inset-x-xl: var(--inset-x--xl);
|
|
49
51
|
--_inset-y-xl: var(--inset-y--xl);
|
package/src/base/_variables.css
CHANGED
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
|
|
163
163
|
/* shade — darkened overlays (derived from neutral-950) */
|
|
164
164
|
--color-shade-none: oklch(from var(--color-neutral-950) l c h / 0);
|
|
165
|
-
--color-shade-50: oklch(from var(--color-neutral-950) l c h / 0.
|
|
165
|
+
--color-shade-50: oklch(from var(--color-neutral-950) l c h / 0.05);
|
|
166
166
|
--color-shade-100: oklch(from var(--color-neutral-950) l c h / 0.1);
|
|
167
167
|
--color-shade-200: oklch(from var(--color-neutral-950) l c h / 0.2);
|
|
168
168
|
--color-shade-300: oklch(from var(--color-neutral-950) l c h / 0.3);
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
|
|
178
178
|
/* tint — faded overlays (derived from white) */
|
|
179
179
|
--color-tint-none: oklch(from var(--color-white) l c h / 0);
|
|
180
|
-
--color-tint-50: oklch(from var(--color-white) l c h / 0.
|
|
180
|
+
--color-tint-50: oklch(from var(--color-white) l c h / 0.05);
|
|
181
181
|
--color-tint-100: oklch(from var(--color-white) l c h / 0.1);
|
|
182
182
|
--color-tint-200: oklch(from var(--color-white) l c h / 0.2);
|
|
183
183
|
--color-tint-300: oklch(from var(--color-white) l c h / 0.3);
|
package/src/base/embla.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embla.d.ts","sourceRoot":"","sources":["embla.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embla.d.ts","sourceRoot":"","sources":["embla.ts"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,iBAAiB,EAAqC,MAAM,gBAAgB,CAAC;AAa3F;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAG5D;AA4FD;;;;;;;;;;GAUG;AACH,iBAAS,cAAc,CACrB,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,IAAI,CAWN;AAID;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,aACpB,iBAAiB,YACjB,OAAO,WACR,WAAW,KACnB,CAAC,MAAM,IAAI,CAAC,GAAG,SA4DjB,CAAC;AAIF;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,iBACX,iBAAiB,iBAChB,iBAAiB,WACvB,WAAW,SAcrB,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,iBACX,iBAAiB,iBAChB,iBAAiB,SAiBjC,CAAC;AAmJF;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAwJ/C;AAED;;;;;;;;GAQG;AACH,iBAAS,kBAAkB,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,CAW5D;AAwGD;;;;;;;;;GASG;AACH,QAAA,MAAM,SAAS;;;;;;CAMd,CAAC;AA2EF,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,oBAAoB,EAAE,CAAC"}
|
package/src/base/embla.js
CHANGED
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
* - `data-carousel-auto-scroll-*`: Auto scroll plugin options (requires `auto-scroll` in plugins)
|
|
33
33
|
* - `data-carousel-class-names-*`: Class names plugin options (requires `class-names` in plugins)
|
|
34
34
|
*
|
|
35
|
+
* Prev/Next, the dots, the thumbs, and the arrow keys count as interaction for
|
|
36
|
+
* Autoplay and Auto Scroll: they stop the plugin, or restart its delay with
|
|
37
|
+
* `data-carousel-autoplay-stop-on-interaction="false"`.
|
|
38
|
+
*
|
|
35
39
|
* @see https://www.embla-carousel.com/docs/api/options#reference
|
|
36
40
|
* @see https://www.embla-carousel.com/docs/plugins/autoplay#options
|
|
37
41
|
* @see https://www.embla-carousel.com/docs/plugins/auto-scroll#options
|
|
@@ -111,6 +115,27 @@ const PLUGIN_BY_SLUG = {
|
|
|
111
115
|
function readCarouselOptions(node, prefix) {
|
|
112
116
|
return Utils.parseDataAttributes(node, prefix);
|
|
113
117
|
}
|
|
118
|
+
// --- Manual navigation ---
|
|
119
|
+
/**
|
|
120
|
+
* @description Treats a manual step (Prev/Next, a dot, a thumb, an arrow key) as
|
|
121
|
+
* user interaction for the Autoplay and Auto Scroll plugins, which on their own
|
|
122
|
+
* only count a pointer-down on the viewport. Without it the plugin's timer keeps
|
|
123
|
+
* running, and a tick that lands just after a click moves a second slide.
|
|
124
|
+
* `stopOnInteraction` (default true) stops the plugin; `false` restarts its delay.
|
|
125
|
+
* This is the pattern Embla's own examples use for navigation buttons.
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
function onManualNavigation(emblaApi) {
|
|
129
|
+
const { autoplay, autoScroll } = emblaApi.plugins();
|
|
130
|
+
for (const plugin of [autoplay, autoScroll]) {
|
|
131
|
+
if (!plugin)
|
|
132
|
+
continue;
|
|
133
|
+
if (plugin.options.stopOnInteraction === false)
|
|
134
|
+
plugin.reset();
|
|
135
|
+
else
|
|
136
|
+
plugin.stop();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
114
139
|
// --- Active-index sync ---
|
|
115
140
|
/**
|
|
116
141
|
* @description Adds or removes one token of an element's `data-carousel-state`
|
|
@@ -201,7 +226,10 @@ const addDotBtnsAndClickHandlers = (emblaApi, dotsNode, signal) => {
|
|
|
201
226
|
const dot = templateDot.cloneNode(true);
|
|
202
227
|
dotNodes.push(dot);
|
|
203
228
|
dotsNode.appendChild(dot);
|
|
204
|
-
dot.addEventListener("click", () =>
|
|
229
|
+
dot.addEventListener("click", () => {
|
|
230
|
+
onManualNavigation(emblaApi);
|
|
231
|
+
emblaApi.scrollTo(i);
|
|
232
|
+
}, { signal });
|
|
205
233
|
}
|
|
206
234
|
};
|
|
207
235
|
/**
|
|
@@ -235,7 +263,10 @@ const addDotBtnsAndClickHandlers = (emblaApi, dotsNode, signal) => {
|
|
|
235
263
|
const addThumbClickHandlers = (emblaApiMain, emblaApiThumb, signal) => {
|
|
236
264
|
const slidesthumbs = emblaApiThumb.slideNodes();
|
|
237
265
|
slidesthumbs.forEach((slideNode, index) => {
|
|
238
|
-
slideNode.addEventListener("click", () =>
|
|
266
|
+
slideNode.addEventListener("click", () => {
|
|
267
|
+
onManualNavigation(emblaApiMain);
|
|
268
|
+
emblaApiMain.scrollTo(index);
|
|
269
|
+
}, { signal });
|
|
239
270
|
});
|
|
240
271
|
};
|
|
241
272
|
/**
|
|
@@ -434,14 +465,19 @@ function initEmblaRoot(emblaNode) {
|
|
|
434
465
|
}
|
|
435
466
|
// The options come from untyped data attributes; Embla validates at runtime.
|
|
436
467
|
const emblaApi = EmblaCarousel(emblaViewportNode, apiOptions, plugins);
|
|
437
|
-
// Drag state is a data-carousel-state token on the viewport
|
|
468
|
+
// Drag state is a data-carousel-state token on the viewport, and
|
|
469
|
+
// data-ui-dragging on the root for the page-wide grabbing cursor (a
|
|
470
|
+
// `body:has(…) *` rule would restyle the whole page on every DOM insertion).
|
|
471
|
+
const root = emblaNode.ownerDocument.documentElement;
|
|
438
472
|
emblaApi.on("pointerDown", () => {
|
|
439
473
|
if (emblaViewportNode)
|
|
440
474
|
setCarouselState(emblaViewportNode, "dragging", true);
|
|
475
|
+
root.setAttribute("data-ui-dragging", "");
|
|
441
476
|
});
|
|
442
477
|
emblaApi.on("pointerUp", () => {
|
|
443
478
|
if (emblaViewportNode)
|
|
444
479
|
setCarouselState(emblaViewportNode, "dragging", false);
|
|
480
|
+
root.removeAttribute("data-ui-dragging");
|
|
445
481
|
});
|
|
446
482
|
bindSlideStates(emblaApi);
|
|
447
483
|
emblaNode._emblaApi = emblaApi;
|
|
@@ -452,10 +488,16 @@ function initEmblaRoot(emblaNode) {
|
|
|
452
488
|
const { signal } = controller;
|
|
453
489
|
emblaNode._emblaController = controller;
|
|
454
490
|
if (emblaPrevButtonNode) {
|
|
455
|
-
emblaPrevButtonNode.addEventListener("click", () =>
|
|
491
|
+
emblaPrevButtonNode.addEventListener("click", () => {
|
|
492
|
+
onManualNavigation(emblaApi);
|
|
493
|
+
emblaApi.scrollPrev();
|
|
494
|
+
}, { signal });
|
|
456
495
|
}
|
|
457
496
|
if (emblaNextButtonNode) {
|
|
458
|
-
emblaNextButtonNode.addEventListener("click", () =>
|
|
497
|
+
emblaNextButtonNode.addEventListener("click", () => {
|
|
498
|
+
onManualNavigation(emblaApi);
|
|
499
|
+
emblaApi.scrollNext();
|
|
500
|
+
}, { signal });
|
|
459
501
|
}
|
|
460
502
|
if (emblaDotsNode) {
|
|
461
503
|
addDotBtnsAndClickHandlers(emblaApi, emblaDotsNode, signal);
|
|
@@ -584,6 +626,7 @@ const initEmblaKeyboardNav = function () {
|
|
|
584
626
|
if (!root)
|
|
585
627
|
return;
|
|
586
628
|
e.preventDefault();
|
|
629
|
+
onManualNavigation(root._emblaApi);
|
|
587
630
|
if (e.key === "ArrowLeft")
|
|
588
631
|
root._emblaApi.scrollPrev();
|
|
589
632
|
else
|
package/src/base/embla.ts
CHANGED
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
* - `data-carousel-auto-scroll-*`: Auto scroll plugin options (requires `auto-scroll` in plugins)
|
|
34
34
|
* - `data-carousel-class-names-*`: Class names plugin options (requires `class-names` in plugins)
|
|
35
35
|
*
|
|
36
|
+
* Prev/Next, the dots, the thumbs, and the arrow keys count as interaction for
|
|
37
|
+
* Autoplay and Auto Scroll: they stop the plugin, or restart its delay with
|
|
38
|
+
* `data-carousel-autoplay-stop-on-interaction="false"`.
|
|
39
|
+
*
|
|
36
40
|
* @see https://www.embla-carousel.com/docs/api/options#reference
|
|
37
41
|
* @see https://www.embla-carousel.com/docs/plugins/autoplay#options
|
|
38
42
|
* @see https://www.embla-carousel.com/docs/plugins/auto-scroll#options
|
|
@@ -135,6 +139,26 @@ function readCarouselOptions<T>(node: Element, prefix: string): T {
|
|
|
135
139
|
return Utils.parseDataAttributes(node, prefix) as T;
|
|
136
140
|
}
|
|
137
141
|
|
|
142
|
+
// --- Manual navigation ---
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @description Treats a manual step (Prev/Next, a dot, a thumb, an arrow key) as
|
|
146
|
+
* user interaction for the Autoplay and Auto Scroll plugins, which on their own
|
|
147
|
+
* only count a pointer-down on the viewport. Without it the plugin's timer keeps
|
|
148
|
+
* running, and a tick that lands just after a click moves a second slide.
|
|
149
|
+
* `stopOnInteraction` (default true) stops the plugin; `false` restarts its delay.
|
|
150
|
+
* This is the pattern Embla's own examples use for navigation buttons.
|
|
151
|
+
* @private
|
|
152
|
+
*/
|
|
153
|
+
function onManualNavigation(emblaApi: EmblaCarouselType): void {
|
|
154
|
+
const { autoplay, autoScroll } = emblaApi.plugins();
|
|
155
|
+
for (const plugin of [autoplay, autoScroll]) {
|
|
156
|
+
if (!plugin) continue;
|
|
157
|
+
if (plugin.options.stopOnInteraction === false) plugin.reset();
|
|
158
|
+
else plugin.stop();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
138
162
|
// --- Active-index sync ---
|
|
139
163
|
|
|
140
164
|
/**
|
|
@@ -241,7 +265,14 @@ const addDotBtnsAndClickHandlers = (
|
|
|
241
265
|
dotNodes.push(dot);
|
|
242
266
|
dotsNode.appendChild(dot);
|
|
243
267
|
|
|
244
|
-
dot.addEventListener(
|
|
268
|
+
dot.addEventListener(
|
|
269
|
+
"click",
|
|
270
|
+
() => {
|
|
271
|
+
onManualNavigation(emblaApi);
|
|
272
|
+
emblaApi.scrollTo(i);
|
|
273
|
+
},
|
|
274
|
+
{ signal },
|
|
275
|
+
);
|
|
245
276
|
}
|
|
246
277
|
};
|
|
247
278
|
|
|
@@ -284,7 +315,14 @@ const addThumbClickHandlers = (
|
|
|
284
315
|
const slidesthumbs = emblaApiThumb.slideNodes();
|
|
285
316
|
|
|
286
317
|
slidesthumbs.forEach((slideNode: HTMLElement, index: number) => {
|
|
287
|
-
slideNode.addEventListener(
|
|
318
|
+
slideNode.addEventListener(
|
|
319
|
+
"click",
|
|
320
|
+
() => {
|
|
321
|
+
onManualNavigation(emblaApiMain);
|
|
322
|
+
emblaApiMain.scrollTo(index);
|
|
323
|
+
},
|
|
324
|
+
{ signal },
|
|
325
|
+
);
|
|
288
326
|
});
|
|
289
327
|
};
|
|
290
328
|
|
|
@@ -536,12 +574,17 @@ function initEmblaRoot(emblaNode: Element): void {
|
|
|
536
574
|
apiOptions as EmblaOptionsType,
|
|
537
575
|
plugins,
|
|
538
576
|
);
|
|
539
|
-
// Drag state is a data-carousel-state token on the viewport
|
|
577
|
+
// Drag state is a data-carousel-state token on the viewport, and
|
|
578
|
+
// data-ui-dragging on the root for the page-wide grabbing cursor (a
|
|
579
|
+
// `body:has(…) *` rule would restyle the whole page on every DOM insertion).
|
|
580
|
+
const root = emblaNode.ownerDocument.documentElement;
|
|
540
581
|
emblaApi.on("pointerDown", () => {
|
|
541
582
|
if (emblaViewportNode) setCarouselState(emblaViewportNode, "dragging", true);
|
|
583
|
+
root.setAttribute("data-ui-dragging", "");
|
|
542
584
|
});
|
|
543
585
|
emblaApi.on("pointerUp", () => {
|
|
544
586
|
if (emblaViewportNode) setCarouselState(emblaViewportNode, "dragging", false);
|
|
587
|
+
root.removeAttribute("data-ui-dragging");
|
|
545
588
|
});
|
|
546
589
|
bindSlideStates(emblaApi);
|
|
547
590
|
|
|
@@ -555,11 +598,25 @@ function initEmblaRoot(emblaNode: Element): void {
|
|
|
555
598
|
emblaNode._emblaController = controller;
|
|
556
599
|
|
|
557
600
|
if (emblaPrevButtonNode) {
|
|
558
|
-
emblaPrevButtonNode.addEventListener(
|
|
601
|
+
emblaPrevButtonNode.addEventListener(
|
|
602
|
+
"click",
|
|
603
|
+
() => {
|
|
604
|
+
onManualNavigation(emblaApi);
|
|
605
|
+
emblaApi.scrollPrev();
|
|
606
|
+
},
|
|
607
|
+
{ signal },
|
|
608
|
+
);
|
|
559
609
|
}
|
|
560
610
|
|
|
561
611
|
if (emblaNextButtonNode) {
|
|
562
|
-
emblaNextButtonNode.addEventListener(
|
|
612
|
+
emblaNextButtonNode.addEventListener(
|
|
613
|
+
"click",
|
|
614
|
+
() => {
|
|
615
|
+
onManualNavigation(emblaApi);
|
|
616
|
+
emblaApi.scrollNext();
|
|
617
|
+
},
|
|
618
|
+
{ signal },
|
|
619
|
+
);
|
|
563
620
|
}
|
|
564
621
|
|
|
565
622
|
if (emblaDotsNode) {
|
|
@@ -726,6 +783,7 @@ const initEmblaKeyboardNav: InitEmblaKeyboardNavFn = function () {
|
|
|
726
783
|
if (!root) return;
|
|
727
784
|
|
|
728
785
|
e.preventDefault();
|
|
786
|
+
onManualNavigation(root._emblaApi);
|
|
729
787
|
if (e.key === "ArrowLeft") root._emblaApi.scrollPrev();
|
|
730
788
|
else root._emblaApi.scrollNext();
|
|
731
789
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-styling.d.ts","sourceRoot":"","sources":["kit-styling.ts"],"names":[],"mappings":"AAEA,sGAAsG;AACtG,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EA8Q1C,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAoDlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"kit-styling.d.ts","sourceRoot":"","sources":["kit-styling.ts"],"names":[],"mappings":"AAEA,sGAAsG;AACtG,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EA8Q1C,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAoDlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CA6KnE,CAAC"}
|