@semcore/carousel 17.2.3-prerelease.9 → 18.0.0-prerelease.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/CHANGELOG.md +6 -0
- package/lib/cjs/Carousel.js +21 -21
- package/lib/cjs/style/carousel.shadow.css +46 -20
- package/lib/es6/Carousel.js +21 -21
- package/lib/es6/style/carousel.shadow.css +46 -20
- package/lib/esm/Carousel.mjs +22 -22
- package/lib/esm/style/carousel.shadow.css +46 -20
- package/package.json +8 -8
- package/src/style/carousel.shadow.css +46 -20
package/CHANGELOG.md
CHANGED
package/lib/cjs/Carousel.js
CHANGED
|
@@ -21,29 +21,29 @@ var _modal = _interopRequireDefault(require("@semcore/modal"));
|
|
|
21
21
|
var _react = _interopRequireDefault(require("react"));
|
|
22
22
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
23
23
|
/*!__reshadow-styles__:"./style/carousel.shadow.css"*/
|
|
24
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
24
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCarousel_1h73e_gg_{overflow:hidden;outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SContentBox_1h73e_gg_,.___SIndicator_1h73e_gg_,.___SModalBox_1h73e_gg_{position:relative;overflow:hidden;border-radius:var(--intergalactic-carousel-item-rounded,14px)}.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}.___SImageBoxContainer_1h73e_gg_{position:relative;border-radius:var(--intergalactic-carousel-item-preview-rounded,14px)}.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}@supports (color:oklab(0% 0 0%)){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-invert-outline,oklch(1 0 0/.7))}}.___SImageBoxContainer_1h73e_gg_ .___SItem_1h73e_gg_:focus-visible{outline:none}.___SModalContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SItem_1h73e_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_1h73e);border-radius:var(--intergalactic-carousel-item-rounded,14px);overflow:hidden;outline:none}.___SItem_1h73e_gg_>img{display:block}.___SItem_1h73e_gg_.__zoomIn_1h73e_gg_{cursor:zoom-in}.___SItem_1h73e_gg_.__zoomOut_1h73e_gg_{cursor:zoom-out}.___SIndicators_1h73e_gg_{display:flex;justify-content:center;margin:var(--intergalactic-spacing-content-gap-xxlarge,16px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px);outline:none;position:relative;border-radius:var(--intergalactic-rounded-extra-small,2px)}.___SIndicator_1h73e_gg_{margin:0 calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*.5);cursor:pointer;display:block;flex-shrink:0;width:12px;height:12px;background-color:var(--intergalactic-control-carousel-indicator,oklch(.23 .01 140));border-radius:var(--intergalactic-carousel-indicator-rounded,8px);opacity:.25;-o-object-fit:cover;object-fit:cover;transition:width calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),opacity calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),background-color calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09))}@media (hover:hover){.___SIndicator_1h73e_gg_:hover{opacity:.5}}.___SIndicator_1h73e_gg_.__active_1h73e_gg_{width:24px;background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SIndicator_1h73e_gg_[aria-roledescription=slide]{width:100px;height:100px}.___SIndicator_1h73e_gg_[aria-roledescription=slide].__active_1h73e_gg_{width:100px}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-invert,oklch(1 0 0));opacity:.5}@media (hover:hover){.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_:hover{opacity:.75}}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_.__active_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SNext_1h73e_gg_,.___SPrev_1h73e_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral,oklch(.092 .024 152.2/.526))}.___SNext_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SNext_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child){margin-left:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px);margin-right:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px)}.___SPrev_1h73e_gg_{margin-right:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_{margin-left:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_.__disabled_1h73e_gg_,.___SPrev_1h73e_gg_.__disabled_1h73e_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_1h73e_gg_,.___SIndicator_1h73e_gg_{transition:none}}", /*__inner_css_end__*/"1h73e_gg_"),
|
|
25
25
|
/*__reshadow_css_end__*/
|
|
26
26
|
{
|
|
27
|
-
"__SCarousel": "
|
|
28
|
-
"__SContainer": "
|
|
29
|
-
"--duration": "--
|
|
30
|
-
"__SContentBox": "
|
|
31
|
-
"__SModalBox": "
|
|
32
|
-
"__SIndicator": "
|
|
33
|
-
"__SItem": "
|
|
34
|
-
"__SModalContainer": "
|
|
35
|
-
"_zoomIn": "
|
|
36
|
-
"_zoomOut": "
|
|
37
|
-
"__SIndicators": "
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"__SPrevButton": "
|
|
46
|
-
"__SNextButton": "
|
|
27
|
+
"__SCarousel": "___SCarousel_1h73e_gg_",
|
|
28
|
+
"__SContainer": "___SContainer_1h73e_gg_",
|
|
29
|
+
"--duration": "--duration_1h73e",
|
|
30
|
+
"__SContentBox": "___SContentBox_1h73e_gg_",
|
|
31
|
+
"__SModalBox": "___SModalBox_1h73e_gg_",
|
|
32
|
+
"__SIndicator": "___SIndicator_1h73e_gg_",
|
|
33
|
+
"__SItem": "___SItem_1h73e_gg_",
|
|
34
|
+
"__SModalContainer": "___SModalContainer_1h73e_gg_",
|
|
35
|
+
"_zoomIn": "__zoomIn_1h73e_gg_",
|
|
36
|
+
"_zoomOut": "__zoomOut_1h73e_gg_",
|
|
37
|
+
"__SIndicators": "___SIndicators_1h73e_gg_",
|
|
38
|
+
"__SPrev": "___SPrev_1h73e_gg_",
|
|
39
|
+
"__SNext": "___SNext_1h73e_gg_",
|
|
40
|
+
"_disabled": "__disabled_1h73e_gg_",
|
|
41
|
+
"__SImageBoxContainer": "___SImageBoxContainer_1h73e_gg_",
|
|
42
|
+
"--transform": "--transform_1h73e",
|
|
43
|
+
"_active": "__active_1h73e_gg_",
|
|
44
|
+
"_inverted": "__inverted_1h73e_gg_",
|
|
45
|
+
"__SPrevButton": "___SPrevButton_1h73e_gg_",
|
|
46
|
+
"__SNextButton": "___SNextButton_1h73e_gg_"
|
|
47
47
|
});
|
|
48
48
|
const MAP_TRANSFORM = {
|
|
49
49
|
ArrowLeft: 'left',
|
|
@@ -15,7 +15,7 @@ SModalBox,
|
|
|
15
15
|
SIndicator {
|
|
16
16
|
position: relative;
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
border-radius: var(--intergalactic-
|
|
18
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
SContentBox:has(SItem:focus-visible)::after {
|
|
@@ -29,7 +29,7 @@ SContentBox:has(SItem:focus-visible)::after {
|
|
|
29
29
|
|
|
30
30
|
SImageBoxContainer {
|
|
31
31
|
position: relative;
|
|
32
|
-
border-radius: var(--intergalactic-
|
|
32
|
+
border-radius: var(--intergalactic-carousel-item-preview-rounded, 14px);
|
|
33
33
|
|
|
34
34
|
&:has(SItem:focus-visible)::after {
|
|
35
35
|
border-radius: inherit;
|
|
@@ -56,7 +56,7 @@ SItem {
|
|
|
56
56
|
max-width: 100%;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
transform: var(--transform);
|
|
59
|
-
border-radius: var(--intergalactic-
|
|
59
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
outline: none;
|
|
62
62
|
|
|
@@ -76,38 +76,60 @@ SItem[zoomOut] {
|
|
|
76
76
|
SIndicators {
|
|
77
77
|
display: flex;
|
|
78
78
|
justify-content: center;
|
|
79
|
-
margin: var(--intergalactic-spacing-
|
|
79
|
+
margin: var(--intergalactic-spacing-content-gap-xxlarge, 16px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px);
|
|
80
80
|
outline: none;
|
|
81
81
|
position: relative;
|
|
82
|
+
border-radius: var(--intergalactic-rounded-extra-small, 2px);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
SIndicator {
|
|
85
|
-
margin: 0 calc(0.5 * var(--intergalactic-spacing-
|
|
86
|
+
margin: 0 calc(0.5 * var(--intergalactic-spacing-content-gap-xlarge, 12px));
|
|
86
87
|
cursor: pointer;
|
|
87
88
|
display: block;
|
|
89
|
+
flex-shrink: 0;
|
|
88
90
|
width: 12px;
|
|
89
91
|
height: 12px;
|
|
90
|
-
background-color: var(--intergalactic-
|
|
91
|
-
|
|
92
|
+
background-color: var(--intergalactic-control-carousel-indicator, oklch(0.23 0.01 140));
|
|
93
|
+
border-radius: var(--intergalactic-carousel-indicator-rounded, 8px);
|
|
94
|
+
opacity: 0.25;
|
|
92
95
|
object-fit: cover;
|
|
93
|
-
transition:
|
|
96
|
+
transition:
|
|
97
|
+
width calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
98
|
+
opacity calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
99
|
+
background-color calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09));
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[active] {
|
|
106
|
+
width: 24px;
|
|
107
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
SIndicator[aria-roledescription="slide"] {
|
|
97
113
|
width: 100px;
|
|
98
114
|
height: 100px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
SIndicator:hover {
|
|
102
|
-
opacity: calc(2 * var(--intergalactic-disabled-opacity, 0.4));
|
|
103
|
-
}
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
&[active] {
|
|
117
|
+
width: 100px;
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
SIndicator[inverted] {
|
|
110
|
-
background-color: var(--intergalactic-
|
|
122
|
+
background-color: var(--intergalactic-control-carousel-indicator-invert, oklch(1 0 0));
|
|
123
|
+
opacity: 0.5;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
opacity: 0.75;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[active] {
|
|
130
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
|
|
113
135
|
SPrev,
|
|
@@ -120,17 +142,17 @@ SNext {
|
|
|
120
142
|
|
|
121
143
|
SPrevButton span:has(> svg:only-child),
|
|
122
144
|
SNextButton span:has(> svg:only-child) {
|
|
123
|
-
margin-left: calc(2 * var(--intergalactic-spacing-
|
|
124
|
-
margin-right: calc(2 * var(--intergalactic-spacing-
|
|
145
|
+
margin-left: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
146
|
+
margin-right: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
SPrev {
|
|
129
|
-
margin-right: var(--intergalactic-spacing-
|
|
151
|
+
margin-right: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
SNext {
|
|
133
|
-
margin-left: var(--intergalactic-spacing-
|
|
155
|
+
margin-left: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
134
156
|
}
|
|
135
157
|
|
|
136
158
|
SPrev[disabled],
|
|
@@ -144,4 +166,8 @@ SNext[disabled] {
|
|
|
144
166
|
SContainer {
|
|
145
167
|
transition: none;
|
|
146
168
|
}
|
|
169
|
+
|
|
170
|
+
SIndicator {
|
|
171
|
+
transition: none;
|
|
172
|
+
}
|
|
147
173
|
}
|
package/lib/es6/Carousel.js
CHANGED
|
@@ -24,29 +24,29 @@ import ChevronRight from '@semcore/icon/ChevronRight/l';
|
|
|
24
24
|
import Modal from '@semcore/modal';
|
|
25
25
|
import React from 'react';
|
|
26
26
|
/*!__reshadow-styles__:"./style/carousel.shadow.css"*/
|
|
27
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCarousel_1h73e_gg_{overflow:hidden;outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SContentBox_1h73e_gg_,.___SIndicator_1h73e_gg_,.___SModalBox_1h73e_gg_{position:relative;overflow:hidden;border-radius:var(--intergalactic-carousel-item-rounded,14px)}.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}.___SImageBoxContainer_1h73e_gg_{position:relative;border-radius:var(--intergalactic-carousel-item-preview-rounded,14px)}.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:\"\";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}@supports (color:oklab(0% 0 0%)){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-invert-outline,oklch(1 0 0/.7))}}.___SImageBoxContainer_1h73e_gg_ .___SItem_1h73e_gg_:focus-visible{outline:none}.___SModalContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SItem_1h73e_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_1h73e);border-radius:var(--intergalactic-carousel-item-rounded,14px);overflow:hidden;outline:none}.___SItem_1h73e_gg_>img{display:block}.___SItem_1h73e_gg_.__zoomIn_1h73e_gg_{cursor:zoom-in}.___SItem_1h73e_gg_.__zoomOut_1h73e_gg_{cursor:zoom-out}.___SIndicators_1h73e_gg_{display:flex;justify-content:center;margin:var(--intergalactic-spacing-content-gap-xxlarge,16px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px);outline:none;position:relative;border-radius:var(--intergalactic-rounded-extra-small,2px)}.___SIndicator_1h73e_gg_{margin:0 calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*.5);cursor:pointer;display:block;flex-shrink:0;width:12px;height:12px;background-color:var(--intergalactic-control-carousel-indicator,oklch(.23 .01 140));border-radius:var(--intergalactic-carousel-indicator-rounded,8px);opacity:.25;-o-object-fit:cover;object-fit:cover;transition:width calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),opacity calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),background-color calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09))}@media (hover:hover){.___SIndicator_1h73e_gg_:hover{opacity:.5}}.___SIndicator_1h73e_gg_.__active_1h73e_gg_{width:24px;background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SIndicator_1h73e_gg_[aria-roledescription=slide]{width:100px;height:100px}.___SIndicator_1h73e_gg_[aria-roledescription=slide].__active_1h73e_gg_{width:100px}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-invert,oklch(1 0 0));opacity:.5}@media (hover:hover){.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_:hover{opacity:.75}}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_.__active_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SNext_1h73e_gg_,.___SPrev_1h73e_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral,oklch(.092 .024 152.2/.526))}.___SNext_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SNext_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child){margin-left:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px);margin-right:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px)}.___SPrev_1h73e_gg_{margin-right:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_{margin-left:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_.__disabled_1h73e_gg_,.___SPrev_1h73e_gg_.__disabled_1h73e_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_1h73e_gg_,.___SIndicator_1h73e_gg_{transition:none}}", /*__inner_css_end__*/"1h73e_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SCarousel": "
|
|
31
|
-
"__SContainer": "
|
|
32
|
-
"--duration": "--
|
|
33
|
-
"__SContentBox": "
|
|
34
|
-
"__SModalBox": "
|
|
35
|
-
"__SIndicator": "
|
|
36
|
-
"__SItem": "
|
|
37
|
-
"__SModalContainer": "
|
|
38
|
-
"_zoomIn": "
|
|
39
|
-
"_zoomOut": "
|
|
40
|
-
"__SIndicators": "
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"__SPrevButton": "
|
|
49
|
-
"__SNextButton": "
|
|
30
|
+
"__SCarousel": "___SCarousel_1h73e_gg_",
|
|
31
|
+
"__SContainer": "___SContainer_1h73e_gg_",
|
|
32
|
+
"--duration": "--duration_1h73e",
|
|
33
|
+
"__SContentBox": "___SContentBox_1h73e_gg_",
|
|
34
|
+
"__SModalBox": "___SModalBox_1h73e_gg_",
|
|
35
|
+
"__SIndicator": "___SIndicator_1h73e_gg_",
|
|
36
|
+
"__SItem": "___SItem_1h73e_gg_",
|
|
37
|
+
"__SModalContainer": "___SModalContainer_1h73e_gg_",
|
|
38
|
+
"_zoomIn": "__zoomIn_1h73e_gg_",
|
|
39
|
+
"_zoomOut": "__zoomOut_1h73e_gg_",
|
|
40
|
+
"__SIndicators": "___SIndicators_1h73e_gg_",
|
|
41
|
+
"__SPrev": "___SPrev_1h73e_gg_",
|
|
42
|
+
"__SNext": "___SNext_1h73e_gg_",
|
|
43
|
+
"_disabled": "__disabled_1h73e_gg_",
|
|
44
|
+
"__SImageBoxContainer": "___SImageBoxContainer_1h73e_gg_",
|
|
45
|
+
"--transform": "--transform_1h73e",
|
|
46
|
+
"_active": "__active_1h73e_gg_",
|
|
47
|
+
"_inverted": "__inverted_1h73e_gg_",
|
|
48
|
+
"__SPrevButton": "___SPrevButton_1h73e_gg_",
|
|
49
|
+
"__SNextButton": "___SNextButton_1h73e_gg_"
|
|
50
50
|
});
|
|
51
51
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
52
52
|
const MAP_TRANSFORM = {
|
|
@@ -15,7 +15,7 @@ SModalBox,
|
|
|
15
15
|
SIndicator {
|
|
16
16
|
position: relative;
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
border-radius: var(--intergalactic-
|
|
18
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
SContentBox:has(SItem:focus-visible)::after {
|
|
@@ -29,7 +29,7 @@ SContentBox:has(SItem:focus-visible)::after {
|
|
|
29
29
|
|
|
30
30
|
SImageBoxContainer {
|
|
31
31
|
position: relative;
|
|
32
|
-
border-radius: var(--intergalactic-
|
|
32
|
+
border-radius: var(--intergalactic-carousel-item-preview-rounded, 14px);
|
|
33
33
|
|
|
34
34
|
&:has(SItem:focus-visible)::after {
|
|
35
35
|
border-radius: inherit;
|
|
@@ -56,7 +56,7 @@ SItem {
|
|
|
56
56
|
max-width: 100%;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
transform: var(--transform);
|
|
59
|
-
border-radius: var(--intergalactic-
|
|
59
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
outline: none;
|
|
62
62
|
|
|
@@ -76,38 +76,60 @@ SItem[zoomOut] {
|
|
|
76
76
|
SIndicators {
|
|
77
77
|
display: flex;
|
|
78
78
|
justify-content: center;
|
|
79
|
-
margin: var(--intergalactic-spacing-
|
|
79
|
+
margin: var(--intergalactic-spacing-content-gap-xxlarge, 16px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px);
|
|
80
80
|
outline: none;
|
|
81
81
|
position: relative;
|
|
82
|
+
border-radius: var(--intergalactic-rounded-extra-small, 2px);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
SIndicator {
|
|
85
|
-
margin: 0 calc(0.5 * var(--intergalactic-spacing-
|
|
86
|
+
margin: 0 calc(0.5 * var(--intergalactic-spacing-content-gap-xlarge, 12px));
|
|
86
87
|
cursor: pointer;
|
|
87
88
|
display: block;
|
|
89
|
+
flex-shrink: 0;
|
|
88
90
|
width: 12px;
|
|
89
91
|
height: 12px;
|
|
90
|
-
background-color: var(--intergalactic-
|
|
91
|
-
|
|
92
|
+
background-color: var(--intergalactic-control-carousel-indicator, oklch(0.23 0.01 140));
|
|
93
|
+
border-radius: var(--intergalactic-carousel-indicator-rounded, 8px);
|
|
94
|
+
opacity: 0.25;
|
|
92
95
|
object-fit: cover;
|
|
93
|
-
transition:
|
|
96
|
+
transition:
|
|
97
|
+
width calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
98
|
+
opacity calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
99
|
+
background-color calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09));
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[active] {
|
|
106
|
+
width: 24px;
|
|
107
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
SIndicator[aria-roledescription="slide"] {
|
|
97
113
|
width: 100px;
|
|
98
114
|
height: 100px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
SIndicator:hover {
|
|
102
|
-
opacity: calc(2 * var(--intergalactic-disabled-opacity, 0.4));
|
|
103
|
-
}
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
&[active] {
|
|
117
|
+
width: 100px;
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
SIndicator[inverted] {
|
|
110
|
-
background-color: var(--intergalactic-
|
|
122
|
+
background-color: var(--intergalactic-control-carousel-indicator-invert, oklch(1 0 0));
|
|
123
|
+
opacity: 0.5;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
opacity: 0.75;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[active] {
|
|
130
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
|
|
113
135
|
SPrev,
|
|
@@ -120,17 +142,17 @@ SNext {
|
|
|
120
142
|
|
|
121
143
|
SPrevButton span:has(> svg:only-child),
|
|
122
144
|
SNextButton span:has(> svg:only-child) {
|
|
123
|
-
margin-left: calc(2 * var(--intergalactic-spacing-
|
|
124
|
-
margin-right: calc(2 * var(--intergalactic-spacing-
|
|
145
|
+
margin-left: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
146
|
+
margin-right: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
SPrev {
|
|
129
|
-
margin-right: var(--intergalactic-spacing-
|
|
151
|
+
margin-right: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
SNext {
|
|
133
|
-
margin-left: var(--intergalactic-spacing-
|
|
155
|
+
margin-left: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
134
156
|
}
|
|
135
157
|
|
|
136
158
|
SPrev[disabled],
|
|
@@ -144,4 +166,8 @@ SNext[disabled] {
|
|
|
144
166
|
SContainer {
|
|
145
167
|
transition: none;
|
|
146
168
|
}
|
|
169
|
+
|
|
170
|
+
SIndicator {
|
|
171
|
+
transition: none;
|
|
172
|
+
}
|
|
147
173
|
}
|
package/lib/esm/Carousel.mjs
CHANGED
|
@@ -18,31 +18,31 @@ const style = (
|
|
|
18
18
|
/*__reshadow_css_start__*/
|
|
19
19
|
(sstyled.insert(
|
|
20
20
|
/*__inner_css_start__*/
|
|
21
|
-
'.
|
|
21
|
+
'.___SCarousel_1h73e_gg_{overflow:hidden;outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SContentBox_1h73e_gg_,.___SIndicator_1h73e_gg_,.___SModalBox_1h73e_gg_{position:relative;overflow:hidden;border-radius:var(--intergalactic-carousel-item-rounded,14px)}.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:"";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SContentBox_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}.___SImageBoxContainer_1h73e_gg_{position:relative;border-radius:var(--intergalactic-carousel-item-preview-rounded,14px)}.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{border-radius:inherit;z-index:2;position:absolute;top:0;right:0;bottom:0;left:0;content:"";outline-color:var(--intergalactic-keyboard-focus-outline,#0020dd78);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}@media (color-gamut:p3){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.424 .269 264.2/.469))}}@supports (color:oklab(0% 0 0%)){.___SImageBoxContainer_1h73e_gg_:has(.___SItem_1h73e_gg_:focus-visible):after{outline-color:var(--intergalactic-keyboard-focus-invert-outline,oklch(1 0 0/.7))}}.___SImageBoxContainer_1h73e_gg_ .___SItem_1h73e_gg_:focus-visible{outline:none}.___SModalContainer_1h73e_gg_{display:flex;transition:transform var(--duration_1h73e) ease-in-out}.___SItem_1h73e_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_1h73e);border-radius:var(--intergalactic-carousel-item-rounded,14px);overflow:hidden;outline:none}.___SItem_1h73e_gg_>img{display:block}.___SItem_1h73e_gg_.__zoomIn_1h73e_gg_{cursor:zoom-in}.___SItem_1h73e_gg_.__zoomOut_1h73e_gg_{cursor:zoom-out}.___SIndicators_1h73e_gg_{display:flex;justify-content:center;margin:var(--intergalactic-spacing-content-gap-xxlarge,16px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px) var(--intergalactic-spacing-content-gap-small,4px);outline:none;position:relative;border-radius:var(--intergalactic-rounded-extra-small,2px)}.___SIndicator_1h73e_gg_{margin:0 calc(var(--intergalactic-spacing-content-gap-xlarge, 12px)*.5);cursor:pointer;display:block;flex-shrink:0;width:12px;height:12px;background-color:var(--intergalactic-control-carousel-indicator,oklch(.23 .01 140));border-radius:var(--intergalactic-carousel-indicator-rounded,8px);opacity:.25;-o-object-fit:cover;object-fit:cover;transition:width calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),opacity calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09)),background-color calc(var(--intergalactic-duration-control, 200)*1ms) var(--intergalactic-easings-medium,cubic-bezier(.5,0,0,1.09))}@media (hover:hover){.___SIndicator_1h73e_gg_:hover{opacity:.5}}.___SIndicator_1h73e_gg_.__active_1h73e_gg_{width:24px;background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SIndicator_1h73e_gg_[aria-roledescription=slide]{width:100px;height:100px}.___SIndicator_1h73e_gg_[aria-roledescription=slide].__active_1h73e_gg_{width:100px}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-invert,oklch(1 0 0));opacity:.5}@media (hover:hover){.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_:hover{opacity:.75}}.___SIndicator_1h73e_gg_.__inverted_1h73e_gg_.__active_1h73e_gg_{background-color:var(--intergalactic-control-carousel-indicator-active,oklch(.23 .01 140));opacity:1}.___SNext_1h73e_gg_,.___SPrev_1h73e_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral,oklch(.092 .024 152.2/.526))}.___SNext_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SNext_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SNextButton_1h73e_gg_ span:has(>svg:only-child),.___SPrev_1h73e_gg_ .___SPrevButton_1h73e_gg_ span:has(>svg:only-child){margin-left:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px);margin-right:calc(var(--intergalactic-spacing-content-gap-small, 4px)*2 - 1px)}.___SPrev_1h73e_gg_{margin-right:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_{margin-left:var(--intergalactic-spacing-content-gap-large,8px)}.___SNext_1h73e_gg_.__disabled_1h73e_gg_,.___SPrev_1h73e_gg_.__disabled_1h73e_gg_{opacity:var(--intergalactic-disabled-opacity,.4);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_1h73e_gg_,.___SIndicator_1h73e_gg_{transition:none}}',
|
|
22
22
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
23
|
+
"1h73e_gg_"
|
|
24
24
|
), /*__reshadow_css_end__*/
|
|
25
25
|
{
|
|
26
|
-
"__SCarousel": "
|
|
27
|
-
"__SContainer": "
|
|
28
|
-
"--duration": "--
|
|
29
|
-
"__SContentBox": "
|
|
30
|
-
"__SModalBox": "
|
|
31
|
-
"__SIndicator": "
|
|
32
|
-
"__SItem": "
|
|
33
|
-
"__SModalContainer": "
|
|
34
|
-
"_zoomIn": "
|
|
35
|
-
"_zoomOut": "
|
|
36
|
-
"__SIndicators": "
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"__SPrevButton": "
|
|
45
|
-
"__SNextButton": "
|
|
26
|
+
"__SCarousel": "___SCarousel_1h73e_gg_",
|
|
27
|
+
"__SContainer": "___SContainer_1h73e_gg_",
|
|
28
|
+
"--duration": "--duration_1h73e",
|
|
29
|
+
"__SContentBox": "___SContentBox_1h73e_gg_",
|
|
30
|
+
"__SModalBox": "___SModalBox_1h73e_gg_",
|
|
31
|
+
"__SIndicator": "___SIndicator_1h73e_gg_",
|
|
32
|
+
"__SItem": "___SItem_1h73e_gg_",
|
|
33
|
+
"__SModalContainer": "___SModalContainer_1h73e_gg_",
|
|
34
|
+
"_zoomIn": "__zoomIn_1h73e_gg_",
|
|
35
|
+
"_zoomOut": "__zoomOut_1h73e_gg_",
|
|
36
|
+
"__SIndicators": "___SIndicators_1h73e_gg_",
|
|
37
|
+
"__SPrev": "___SPrev_1h73e_gg_",
|
|
38
|
+
"__SNext": "___SNext_1h73e_gg_",
|
|
39
|
+
"_disabled": "__disabled_1h73e_gg_",
|
|
40
|
+
"__SImageBoxContainer": "___SImageBoxContainer_1h73e_gg_",
|
|
41
|
+
"--transform": "--transform_1h73e",
|
|
42
|
+
"_active": "__active_1h73e_gg_",
|
|
43
|
+
"_inverted": "__inverted_1h73e_gg_",
|
|
44
|
+
"__SPrevButton": "___SPrevButton_1h73e_gg_",
|
|
45
|
+
"__SNextButton": "___SNextButton_1h73e_gg_"
|
|
46
46
|
})
|
|
47
47
|
);
|
|
48
48
|
const MAP_TRANSFORM = {
|
|
@@ -15,7 +15,7 @@ SModalBox,
|
|
|
15
15
|
SIndicator {
|
|
16
16
|
position: relative;
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
border-radius: var(--intergalactic-
|
|
18
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
SContentBox:has(SItem:focus-visible)::after {
|
|
@@ -29,7 +29,7 @@ SContentBox:has(SItem:focus-visible)::after {
|
|
|
29
29
|
|
|
30
30
|
SImageBoxContainer {
|
|
31
31
|
position: relative;
|
|
32
|
-
border-radius: var(--intergalactic-
|
|
32
|
+
border-radius: var(--intergalactic-carousel-item-preview-rounded, 14px);
|
|
33
33
|
|
|
34
34
|
&:has(SItem:focus-visible)::after {
|
|
35
35
|
border-radius: inherit;
|
|
@@ -56,7 +56,7 @@ SItem {
|
|
|
56
56
|
max-width: 100%;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
transform: var(--transform);
|
|
59
|
-
border-radius: var(--intergalactic-
|
|
59
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
outline: none;
|
|
62
62
|
|
|
@@ -76,38 +76,60 @@ SItem[zoomOut] {
|
|
|
76
76
|
SIndicators {
|
|
77
77
|
display: flex;
|
|
78
78
|
justify-content: center;
|
|
79
|
-
margin: var(--intergalactic-spacing-
|
|
79
|
+
margin: var(--intergalactic-spacing-content-gap-xxlarge, 16px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px);
|
|
80
80
|
outline: none;
|
|
81
81
|
position: relative;
|
|
82
|
+
border-radius: var(--intergalactic-rounded-extra-small, 2px);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
SIndicator {
|
|
85
|
-
margin: 0 calc(0.5 * var(--intergalactic-spacing-
|
|
86
|
+
margin: 0 calc(0.5 * var(--intergalactic-spacing-content-gap-xlarge, 12px));
|
|
86
87
|
cursor: pointer;
|
|
87
88
|
display: block;
|
|
89
|
+
flex-shrink: 0;
|
|
88
90
|
width: 12px;
|
|
89
91
|
height: 12px;
|
|
90
|
-
background-color: var(--intergalactic-
|
|
91
|
-
|
|
92
|
+
background-color: var(--intergalactic-control-carousel-indicator, oklch(0.23 0.01 140));
|
|
93
|
+
border-radius: var(--intergalactic-carousel-indicator-rounded, 8px);
|
|
94
|
+
opacity: 0.25;
|
|
92
95
|
object-fit: cover;
|
|
93
|
-
transition:
|
|
96
|
+
transition:
|
|
97
|
+
width calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
98
|
+
opacity calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
99
|
+
background-color calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09));
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[active] {
|
|
106
|
+
width: 24px;
|
|
107
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
SIndicator[aria-roledescription="slide"] {
|
|
97
113
|
width: 100px;
|
|
98
114
|
height: 100px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
SIndicator:hover {
|
|
102
|
-
opacity: calc(2 * var(--intergalactic-disabled-opacity, 0.4));
|
|
103
|
-
}
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
&[active] {
|
|
117
|
+
width: 100px;
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
SIndicator[inverted] {
|
|
110
|
-
background-color: var(--intergalactic-
|
|
122
|
+
background-color: var(--intergalactic-control-carousel-indicator-invert, oklch(1 0 0));
|
|
123
|
+
opacity: 0.5;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
opacity: 0.75;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[active] {
|
|
130
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
|
|
113
135
|
SPrev,
|
|
@@ -120,17 +142,17 @@ SNext {
|
|
|
120
142
|
|
|
121
143
|
SPrevButton span:has(> svg:only-child),
|
|
122
144
|
SNextButton span:has(> svg:only-child) {
|
|
123
|
-
margin-left: calc(2 * var(--intergalactic-spacing-
|
|
124
|
-
margin-right: calc(2 * var(--intergalactic-spacing-
|
|
145
|
+
margin-left: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
146
|
+
margin-right: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
SPrev {
|
|
129
|
-
margin-right: var(--intergalactic-spacing-
|
|
151
|
+
margin-right: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
SNext {
|
|
133
|
-
margin-left: var(--intergalactic-spacing-
|
|
155
|
+
margin-left: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
134
156
|
}
|
|
135
157
|
|
|
136
158
|
SPrev[disabled],
|
|
@@ -144,4 +166,8 @@ SNext[disabled] {
|
|
|
144
166
|
SContainer {
|
|
145
167
|
transition: none;
|
|
146
168
|
}
|
|
169
|
+
|
|
170
|
+
SIndicator {
|
|
171
|
+
transition: none;
|
|
172
|
+
}
|
|
147
173
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/carousel",
|
|
3
3
|
"description": "Semrush Carousel Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.0.0-prerelease.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "^
|
|
18
|
-
"@semcore/modal": "^
|
|
17
|
+
"@semcore/button": "^18.0.0-prerelease.0",
|
|
18
|
+
"@semcore/modal": "^18.0.0-prerelease.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@semcore/base-components": "^
|
|
22
|
-
"@semcore/icon": "^
|
|
21
|
+
"@semcore/base-components": "^18.0.0-prerelease.0",
|
|
22
|
+
"@semcore/icon": "^18.0.0-prerelease.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"directory": "semcore/carousel"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@semcore/core": "
|
|
30
|
+
"@semcore/core": "18.0.0-prerelease.0",
|
|
31
31
|
"@semcore/testing-utils": "1.0.0",
|
|
32
|
-
"@semcore/base-components": "
|
|
33
|
-
"@semcore/icon": "
|
|
32
|
+
"@semcore/base-components": "18.0.0-prerelease.0",
|
|
33
|
+
"@semcore/icon": "18.0.0-prerelease.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|
|
@@ -15,7 +15,7 @@ SModalBox,
|
|
|
15
15
|
SIndicator {
|
|
16
16
|
position: relative;
|
|
17
17
|
overflow: hidden;
|
|
18
|
-
border-radius: var(--intergalactic-
|
|
18
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
SContentBox:has(SItem:focus-visible)::after {
|
|
@@ -29,7 +29,7 @@ SContentBox:has(SItem:focus-visible)::after {
|
|
|
29
29
|
|
|
30
30
|
SImageBoxContainer {
|
|
31
31
|
position: relative;
|
|
32
|
-
border-radius: var(--intergalactic-
|
|
32
|
+
border-radius: var(--intergalactic-carousel-item-preview-rounded, 14px);
|
|
33
33
|
|
|
34
34
|
&:has(SItem:focus-visible)::after {
|
|
35
35
|
border-radius: inherit;
|
|
@@ -56,7 +56,7 @@ SItem {
|
|
|
56
56
|
max-width: 100%;
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
transform: var(--transform);
|
|
59
|
-
border-radius: var(--intergalactic-
|
|
59
|
+
border-radius: var(--intergalactic-carousel-item-rounded, 14px);
|
|
60
60
|
overflow: hidden;
|
|
61
61
|
outline: none;
|
|
62
62
|
|
|
@@ -76,38 +76,60 @@ SItem[zoomOut] {
|
|
|
76
76
|
SIndicators {
|
|
77
77
|
display: flex;
|
|
78
78
|
justify-content: center;
|
|
79
|
-
margin: var(--intergalactic-spacing-
|
|
79
|
+
margin: var(--intergalactic-spacing-content-gap-xxlarge, 16px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px) var(--intergalactic-spacing-content-gap-small, 4px);
|
|
80
80
|
outline: none;
|
|
81
81
|
position: relative;
|
|
82
|
+
border-radius: var(--intergalactic-rounded-extra-small, 2px);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
SIndicator {
|
|
85
|
-
margin: 0 calc(0.5 * var(--intergalactic-spacing-
|
|
86
|
+
margin: 0 calc(0.5 * var(--intergalactic-spacing-content-gap-xlarge, 12px));
|
|
86
87
|
cursor: pointer;
|
|
87
88
|
display: block;
|
|
89
|
+
flex-shrink: 0;
|
|
88
90
|
width: 12px;
|
|
89
91
|
height: 12px;
|
|
90
|
-
background-color: var(--intergalactic-
|
|
91
|
-
|
|
92
|
+
background-color: var(--intergalactic-control-carousel-indicator, oklch(0.23 0.01 140));
|
|
93
|
+
border-radius: var(--intergalactic-carousel-indicator-rounded, 8px);
|
|
94
|
+
opacity: 0.25;
|
|
92
95
|
object-fit: cover;
|
|
93
|
-
transition:
|
|
96
|
+
transition:
|
|
97
|
+
width calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
98
|
+
opacity calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09)),
|
|
99
|
+
background-color calc(var(--intergalactic-duration-control, 200) * 1ms) var(--intergalactic-easings-medium, cubic-bezier(0.5, 0, 0, 1.09));
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[active] {
|
|
106
|
+
width: 24px;
|
|
107
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
108
|
+
opacity: 1;
|
|
109
|
+
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
SIndicator[aria-roledescription="slide"] {
|
|
97
113
|
width: 100px;
|
|
98
114
|
height: 100px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
SIndicator:hover {
|
|
102
|
-
opacity: calc(2 * var(--intergalactic-disabled-opacity, 0.4));
|
|
103
|
-
}
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
&[active] {
|
|
117
|
+
width: 100px;
|
|
118
|
+
}
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
SIndicator[inverted] {
|
|
110
|
-
background-color: var(--intergalactic-
|
|
122
|
+
background-color: var(--intergalactic-control-carousel-indicator-invert, oklch(1 0 0));
|
|
123
|
+
opacity: 0.5;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
opacity: 0.75;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[active] {
|
|
130
|
+
background-color: var(--intergalactic-control-carousel-indicator-active, oklch(0.23 0.01 140));
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
|
|
113
135
|
SPrev,
|
|
@@ -120,17 +142,17 @@ SNext {
|
|
|
120
142
|
|
|
121
143
|
SPrevButton span:has(> svg:only-child),
|
|
122
144
|
SNextButton span:has(> svg:only-child) {
|
|
123
|
-
margin-left: calc(2 * var(--intergalactic-spacing-
|
|
124
|
-
margin-right: calc(2 * var(--intergalactic-spacing-
|
|
145
|
+
margin-left: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
146
|
+
margin-right: calc(2 * var(--intergalactic-spacing-content-gap-small, 4px) - 1px);
|
|
125
147
|
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
SPrev {
|
|
129
|
-
margin-right: var(--intergalactic-spacing-
|
|
151
|
+
margin-right: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
130
152
|
}
|
|
131
153
|
|
|
132
154
|
SNext {
|
|
133
|
-
margin-left: var(--intergalactic-spacing-
|
|
155
|
+
margin-left: var(--intergalactic-spacing-content-gap-large, 8px);
|
|
134
156
|
}
|
|
135
157
|
|
|
136
158
|
SPrev[disabled],
|
|
@@ -144,4 +166,8 @@ SNext[disabled] {
|
|
|
144
166
|
SContainer {
|
|
145
167
|
transition: none;
|
|
146
168
|
}
|
|
169
|
+
|
|
170
|
+
SIndicator {
|
|
171
|
+
transition: none;
|
|
172
|
+
}
|
|
147
173
|
}
|