@fox-dls/carousels 0.0.1 → 1.0.3
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/.babelrc +12 -0
- package/.eslintrc.json +35 -0
- package/.ultra.cache.json +1 -0
- package/CHANGELOG.md +18 -0
- package/{index.d.ts → dist/index.d.ts} +1 -3
- package/dist/index.js +516 -0
- package/dist/index.js.map +1 -0
- package/{lib → dist/lib}/card/index.d.ts +0 -0
- package/dist/lib/card/styles/index.d.ts +2 -0
- package/{lib → dist/lib}/free/index.d.ts +0 -0
- package/dist/lib/free/styles/index.d.ts +2 -0
- package/{lib → dist/lib}/pagination/index.d.ts +0 -0
- package/dist/lib/pagination/styles/index.d.ts +7 -0
- package/dist/lib/pills/index.d.ts +2 -0
- package/dist/lib/pills/styles/index.d.ts +7 -0
- package/{lib → dist/lib}/styles/index.d.ts +1 -1
- package/package.json +112 -9
- package/src/index.ts +7 -0
- package/src/lib/card/index.tsx +123 -0
- package/src/lib/card/styles/index.tsx +5 -0
- package/src/lib/free/index.tsx +141 -0
- package/src/lib/free/styles/index.tsx +80 -0
- package/src/lib/pagination/index.tsx +134 -0
- package/src/lib/pagination/styles/index.tsx +80 -0
- package/src/lib/pills/index.tsx +208 -0
- package/src/lib/pills/styles/index.tsx +58 -0
- package/src/lib/styles/index.tsx +168 -0
- package/tsconfig.build.json +21 -0
- package/tsconfig.json +22 -0
- package/carousels.esm.js +0 -2135
- package/carousels.umd.js +0 -591
- package/lib/buttons/index.d.ts +0 -2
- package/lib/buttons/styles/index.d.ts +0 -8
- package/lib/card/styles/index.d.ts +0 -3
- package/lib/free/styles/index.d.ts +0 -3
- package/lib/pagination/styles/index.d.ts +0 -8
package/.babelrc
ADDED
package/.eslintrc.json
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
{
|
2
|
+
"root": true,
|
3
|
+
"ignorePatterns": ["dist", "build"],
|
4
|
+
"extends": [
|
5
|
+
"../../.eslintrc.base.js",
|
6
|
+
"plugin:react/recommended",
|
7
|
+
"plugin:react-hooks/recommended",
|
8
|
+
"plugin:jsx-a11y/recommended"
|
9
|
+
],
|
10
|
+
// By loading testing-library as a plugin, we can only enable it
|
11
|
+
// on test files via overrides.
|
12
|
+
"plugins": ["testing-library", "storybook"],
|
13
|
+
"env": {
|
14
|
+
"browser": true,
|
15
|
+
"es6": true,
|
16
|
+
"node": true
|
17
|
+
},
|
18
|
+
"rules": {
|
19
|
+
"react/prop-types": "off",
|
20
|
+
"react/react-in-jsx-scope": "off",
|
21
|
+
"jsx-a11y/anchor-is-valid": "off"
|
22
|
+
},
|
23
|
+
"overrides": [
|
24
|
+
{
|
25
|
+
// For performance run jest/recommended on test files, not regular code
|
26
|
+
"files": ["**/__tests__/**/*.{ts,tsx}"],
|
27
|
+
"extends": ["plugin:testing-library/react"]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
// For performance run storybook/recommended on test files, not regular code
|
31
|
+
"files": ["**/*.stories.{ts,tsx,mdx}"],
|
32
|
+
"extends": ["plugin:storybook/recommended"]
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"files":{"dist":"1638860171762.2283","node_modules":"1638860140606.5718",".babelrc":"f03d0ca709d39fade7fd0a5ff24f9384b515b5b6",".eslintrc.json":"6a0edde9387ee5887d1e599f7a99f09362754acd","CHANGELOG.md":"938ca134a8f27f19d16eafbc8064d38ea166b934","README.md":"87a167329bff7478ccaa650e3d382475d8115cb1","package.json":"8512485560e1085b1d0365303d0dfa2ffc86681a.1638859664655.7837","src/index.ts":"1666f11be8aaf18be8a632f73ad0e73d407aae26","src/lib/card/index.tsx":"52c971cf55cfeb66bdb2f5be883f9a3a2fb62a37","src/lib/card/styles/index.tsx":"0e2c3284b69f0e5c3eabfcbaac81864ff10e5969","src/lib/free/index.tsx":"31d5d59052261c935edb986a1817ee7f273bbbd4","src/lib/free/styles/index.tsx":"5265cb7c9d6bf16b5b09c82bbac9d6aa8d32d798","src/lib/pagination/index.tsx":"561112dbc7d2eeb6e18037ca090a81a6dbe7ac07","src/lib/pagination/styles/index.tsx":"457b030d259318e0431b4d585406078e7ee4faab","src/lib/pills/index.tsx":"c472c9de1791a116bd7e5c1dbe650c3256f6128a","src/lib/pills/styles/index.tsx":"5b249d5b210dd9e81edff8a3412d4b7b9e2ad9a2","src/lib/styles/index.tsx":"276419cd5a78d7b7e027c6f2dc459ea3e81bb85d","tsconfig.build.json":"269572b997c81ac83266026b6b5a2c8699709823","tsconfig.json":"af31a7a31827eeec44ed853b8c3000c67f639047.1638859187936.8682"},"deps":{"@fox-dls/layout":1638860167770.2722}}
|
package/CHANGELOG.md
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,516 @@
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
2
|
+
import React, { useRef, useState } from 'react';
|
3
|
+
import styled, { css } from 'styled-components';
|
4
|
+
import SwiperCore, { Navigation, Pagination } from 'swiper';
|
5
|
+
import { Swiper, SwiperSlide } from 'swiper/react';
|
6
|
+
import ButtonUnstyled from '@mui/core/ButtonUnstyled';
|
7
|
+
import { Container } from '@fox-dls/layout';
|
8
|
+
|
9
|
+
function _extends() {
|
10
|
+
_extends = Object.assign || function (target) {
|
11
|
+
for (var i = 1; i < arguments.length; i++) {
|
12
|
+
var source = arguments[i];
|
13
|
+
|
14
|
+
for (var key in source) {
|
15
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
16
|
+
target[key] = source[key];
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
return target;
|
22
|
+
};
|
23
|
+
|
24
|
+
return _extends.apply(this, arguments);
|
25
|
+
}
|
26
|
+
|
27
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
28
|
+
if (source == null) return {};
|
29
|
+
var target = {};
|
30
|
+
var sourceKeys = Object.keys(source);
|
31
|
+
var key, i;
|
32
|
+
|
33
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
34
|
+
key = sourceKeys[i];
|
35
|
+
if (excluded.indexOf(key) >= 0) continue;
|
36
|
+
target[key] = source[key];
|
37
|
+
}
|
38
|
+
|
39
|
+
return target;
|
40
|
+
}
|
41
|
+
|
42
|
+
function _taggedTemplateLiteralLoose(strings, raw) {
|
43
|
+
if (!raw) {
|
44
|
+
raw = strings.slice(0);
|
45
|
+
}
|
46
|
+
|
47
|
+
strings.raw = raw;
|
48
|
+
return strings;
|
49
|
+
}
|
50
|
+
|
51
|
+
var CarouselSwiper$3 = /*#__PURE__*/styled(Swiper).withConfig({
|
52
|
+
displayName: "styles__CarouselSwiper",
|
53
|
+
componentId: "sc-1sue7gh-1"
|
54
|
+
})(["margin:0px !important;.swiper-wrapper{.swiper-slide{scroll-snap-align:start !important;width:auto !important;}}"]);
|
55
|
+
var CarouselPillContainer = /*#__PURE__*/styled.div.withConfig({
|
56
|
+
displayName: "styles__CarouselPillContainer",
|
57
|
+
componentId: "sc-1sue7gh-2"
|
58
|
+
})(["display:inline-block !important;padding-right:8px !important;padding-top:4px !important;padding-bottom:4px !important;"]);
|
59
|
+
var CarouselPill$1 = /*#__PURE__*/styled(ButtonUnstyled).withConfig({
|
60
|
+
displayName: "styles__CarouselPill",
|
61
|
+
componentId: "sc-1sue7gh-3"
|
62
|
+
})(["-webkit-box-pack:center !important;-webkit-box-align:center !important;appearance:none !important;display:inline-flex !important;border-radius:50% !important;border:1px solid rgb(221,221,221) !important;outline:none !important;margin:0px !important;padding:0px !important;color:rgb(34,34,34) !important;cursor:pointer !important;touch-action:manipulation !important;position:relative !important;background:transparent !important;transition:-ms-transform 0.25s ease 0s,-webkit-transform 0.25s ease 0s,transform 0.25s ease 0s !important;align-items:center !important;justify-content:center !important;width:36px !important;height:36px !important;::before{content:'' !important;display:block !important;position:absolute !important;top:50% !important;left:50% !important;transform:translate(-50%,-50%) !important;width:36px !important;height:36px !important;border-radius:50% !important;border:1px solid rgb(221,221,221) !important;}"]);
|
63
|
+
|
64
|
+
var _templateObject, _templateObject2;
|
65
|
+
|
66
|
+
var _excluded$3 = ["children", "navigation", "title", "controls", "arrows"];
|
67
|
+
SwiperCore.use([Navigation]);
|
68
|
+
var PillsCarousel = function PillsCarousel(_ref) {
|
69
|
+
var children = _ref.children,
|
70
|
+
arrows = _ref.arrows,
|
71
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
72
|
+
|
73
|
+
var prevRef = useRef(null);
|
74
|
+
var nextRef = useRef(null);
|
75
|
+
|
76
|
+
var _useState = useState({
|
77
|
+
progress: 0,
|
78
|
+
isBeginning: true,
|
79
|
+
isEnd: false
|
80
|
+
}),
|
81
|
+
swiperSlides = _useState[0],
|
82
|
+
setSwiperSlides = _useState[1];
|
83
|
+
|
84
|
+
var _useState2 = useState(null),
|
85
|
+
swiper = _useState2[0],
|
86
|
+
setSwiper = _useState2[1];
|
87
|
+
|
88
|
+
return jsxs("div", {
|
89
|
+
css: "\n display: flex !important;\n position: relative !important;\n min-width: 0px !important;\n ",
|
90
|
+
children: [jsx("div", {
|
91
|
+
css: "\n position: absolute !important;\n left: 0px !important;\n z-index: 3 !important;\n width: 65px !important;\n background: linear-gradient(\n to right,\n rgb(255, 255, 255) 56.77%,\n rgba(255, 255, 255, 0) 94.47%\n ) !important;\n " + (swiperSlides.isBeginning && css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n display: none !important;\n visibility: hidden !important;\n "])))) + "\n ",
|
92
|
+
children: arrows && jsx(CarouselPillContainer, {
|
93
|
+
children: jsx(CarouselPill$1, {
|
94
|
+
left: +true,
|
95
|
+
ref: prevRef,
|
96
|
+
"aria-label": "Previous",
|
97
|
+
type: "button",
|
98
|
+
onClick: function onClick() {
|
99
|
+
return swiper.slidePrev();
|
100
|
+
},
|
101
|
+
children: jsx("span", {
|
102
|
+
css: "\n position: relative !important;\n ",
|
103
|
+
children: jsx("svg", {
|
104
|
+
viewBox: "0 0 32 32",
|
105
|
+
xmlns: "http://www.w3.org/2000/svg",
|
106
|
+
"aria-hidden": "true",
|
107
|
+
role: "presentation",
|
108
|
+
focusable: "false",
|
109
|
+
css: "\n display: block;\n fill: none;\n height: 12px;\n width: 12px;\n stroke: currentcolor;\n stroke-width: 5.33333;\n overflow: visible;\n ",
|
110
|
+
children: jsx("g", {
|
111
|
+
fill: "none",
|
112
|
+
children: jsx("path", {
|
113
|
+
d: "m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932"
|
114
|
+
}, void 0)
|
115
|
+
}, void 0)
|
116
|
+
}, void 0)
|
117
|
+
}, void 0)
|
118
|
+
}, void 0)
|
119
|
+
}, void 0)
|
120
|
+
}, void 0), jsx(CarouselSwiper$3, _extends({}, props, {
|
121
|
+
cssMode: false,
|
122
|
+
slidesPerView: "auto",
|
123
|
+
onInit: function onInit(swiper) {
|
124
|
+
setSwiper(swiper); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
125
|
+
// @ts-ignore
|
126
|
+
// eslint-disable-next-line no-param-reassign
|
127
|
+
|
128
|
+
swiper.params.navigation.prevEl = prevRef.current; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
129
|
+
// @ts-ignore
|
130
|
+
// eslint-disable-next-line no-param-reassign
|
131
|
+
|
132
|
+
swiper.params.navigation.nextEl = nextRef.current;
|
133
|
+
swiper.navigation.init();
|
134
|
+
swiper.navigation.update();
|
135
|
+
setSwiperSlides({
|
136
|
+
progress: swiper.progress,
|
137
|
+
isBeginning: swiper.isBeginning,
|
138
|
+
isEnd: swiper.isEnd
|
139
|
+
}); // console.log("Swiper", swiper);
|
140
|
+
},
|
141
|
+
onSlideChange: function onSlideChange(swiper) {
|
142
|
+
// console.log("Swiper Change", swiper);
|
143
|
+
setSwiperSlides({
|
144
|
+
progress: swiper.progress,
|
145
|
+
isBeginning: swiper.isBeginning,
|
146
|
+
isEnd: swiper.isEnd
|
147
|
+
});
|
148
|
+
},
|
149
|
+
children: React.Children.map(children, function (child) {
|
150
|
+
return jsx(SwiperSlide, {
|
151
|
+
children: jsx("div", {
|
152
|
+
css: "\n display: inline-block !important;\n white-space: nowrap !important;\n padding-right: 8px !important;\n padding-top: 4px !important;\n padding-bottom: 4px !important;\n ",
|
153
|
+
children: child
|
154
|
+
}, void 0)
|
155
|
+
}, void 0);
|
156
|
+
})
|
157
|
+
}), void 0), jsx("div", {
|
158
|
+
css: "\n -webkit-box-pack: end !important;\n position: absolute !important;\n right: 0px !important;\n z-index: 3 !important;\n width: 75px !important;\n display: flex !important;\n justify-content: flex-end !important;\n background: linear-gradient(\n to left,\n rgb(255, 255, 255) 56.77%,\n rgba(255, 255, 255, 0) 94.47%\n ) !important;\n " + (swiperSlides.isEnd && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n display: none !important;\n visibility: hidden !important;\n "])))) + "\n ",
|
159
|
+
children: arrows && jsx(CarouselPillContainer, {
|
160
|
+
children: jsx(CarouselPill$1, {
|
161
|
+
right: +true,
|
162
|
+
"aria-label": "Next",
|
163
|
+
type: "button",
|
164
|
+
ref: nextRef,
|
165
|
+
onClick: function onClick() {
|
166
|
+
return swiper.slideNext();
|
167
|
+
},
|
168
|
+
children: jsx("span", {
|
169
|
+
css: "\n position: relative !important;\n ",
|
170
|
+
children: jsx("svg", {
|
171
|
+
viewBox: "0 0 32 32",
|
172
|
+
xmlns: "http://www.w3.org/2000/svg",
|
173
|
+
"aria-hidden": "true",
|
174
|
+
role: "presentation",
|
175
|
+
focusable: "false",
|
176
|
+
css: "\n display: block;\n fill: none;\n height: 12px;\n width: 12px;\n stroke: currentcolor;\n stroke-width: 5.33333;\n overflow: visible;\n ",
|
177
|
+
children: jsx("g", {
|
178
|
+
fill: "none",
|
179
|
+
children: jsx("path", {
|
180
|
+
d: "m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932"
|
181
|
+
}, void 0)
|
182
|
+
}, void 0)
|
183
|
+
}, void 0)
|
184
|
+
}, void 0)
|
185
|
+
}, void 0)
|
186
|
+
}, void 0)
|
187
|
+
}, void 0)]
|
188
|
+
}, void 0);
|
189
|
+
};
|
190
|
+
|
191
|
+
var CarouselContainer = /*#__PURE__*/styled.div.withConfig({
|
192
|
+
displayName: "styles__CarouselContainer",
|
193
|
+
componentId: "sc-dwepxh-0"
|
194
|
+
})(["position:relative !important;z-index:0 !important;"]);
|
195
|
+
var CarouselNavbar = /*#__PURE__*/styled.div.withConfig({
|
196
|
+
displayName: "styles__CarouselNavbar",
|
197
|
+
componentId: "sc-dwepxh-1"
|
198
|
+
})(["-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;-webkit-box-align:center !important;-ms-flex-align:center !important;color:#222222 !important;display:-webkit-box !important;display:-moz-box !important;display:-ms-flexbox !important;display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:space-between !important;justify-content:space-between !important;margin-bottom:16px !important;"]);
|
199
|
+
var NavbarTitleContainer = /*#__PURE__*/styled.div.withConfig({
|
200
|
+
displayName: "styles__NavbarTitleContainer",
|
201
|
+
componentId: "sc-dwepxh-2"
|
202
|
+
})(["margin-right:24px !important;width:auto !important;"]);
|
203
|
+
var NavbarControlsContainer = /*#__PURE__*/styled.div.withConfig({
|
204
|
+
displayName: "styles__NavbarControlsContainer",
|
205
|
+
componentId: "sc-dwepxh-4"
|
206
|
+
})(["display:flex !important;align-items:center !important;margin-left:auto !important;"]);
|
207
|
+
var NavbarControlsQuick = /*#__PURE__*/styled.a.withConfig({
|
208
|
+
displayName: "styles__NavbarControlsQuick",
|
209
|
+
componentId: "sc-dwepxh-5"
|
210
|
+
})(["@media (max-width:744px){display:none !important;}font-size:inherit !important;font-family:inherit !important;font-style:inherit !important;font-variant:inherit !important;line-height:inherit !important;color:#222222 !important;text-decoration:underline !important;border-radius:4px !important;font-weight:600 !important;outline:none !important;"]);
|
211
|
+
var NavbarControlsSpace = /*#__PURE__*/styled.span.withConfig({
|
212
|
+
displayName: "styles__NavbarControlsSpace",
|
213
|
+
componentId: "sc-dwepxh-6"
|
214
|
+
})(["display:inline-block !important;height:32px !important;width:1px !important;margin-right:16px !important;padding:0px !important;border:none !important;"]);
|
215
|
+
var ArrowsContainer = /*#__PURE__*/styled.div.withConfig({
|
216
|
+
displayName: "styles__ArrowsContainer",
|
217
|
+
componentId: "sc-dwepxh-7"
|
218
|
+
})(["-webkit-box-align:center !important;color:rgb(34,34,34) !important;display:flex !important;align-items:center !important;margin-left:auto !important;"]);
|
219
|
+
var ArrowsFlex = /*#__PURE__*/styled.div.withConfig({
|
220
|
+
displayName: "styles__ArrowsFlex",
|
221
|
+
componentId: "sc-dwepxh-8"
|
222
|
+
})(["display:-webkit-box !important;display:-moz-box !important;display:-ms-flexbox !important;display:-webkit-flex !important;display:flex !important;"]);
|
223
|
+
var ArrowsButton = /*#__PURE__*/styled(ButtonUnstyled).withConfig({
|
224
|
+
displayName: "styles__ArrowsButton",
|
225
|
+
componentId: "sc-dwepxh-9"
|
226
|
+
})(["-webkit-box-pack:center !important;-webkit-box-align:center !important;appearance:none !important;display:inline-flex !important;border-radius:50% !important;border:none !important;outline:none !important;margin:0px !important;padding:0px !important;color:rgb(34,34,34) !important;cursor:pointer !important;touch-action:manipulation !important;position:relative !important;background:transparent !important;transition:-ms-transform 0.25s ease 0s,-webkit-transform 0.25s ease 0s,transform 0.25s ease 0s !important;align-items:center !important;justify-content:center !important;width:32px !important;height:32px !important;:focus{box-shadow:none !important;}::before{content:'' !important;display:block !important;position:absolute !important;top:50% !important;left:50% !important;transform:translate(-50%,-50%) !important;width:32px !important;height:32px !important;border-radius:50% !important;background:rgb(255,255,255) !important;border:1px solid rgb(221,221,221) !important;}:disabled{opacity:0.5 !important;cursor:not-allowed !important;color:rgb(221,221,221) !important;transform:scale(1) !important;}:hover:not([disabled]){color:rgb(0,0,0) !important;transform:scale(1.04) !important;}"]);
|
227
|
+
var ArrowsDivider = /*#__PURE__*/styled.span.withConfig({
|
228
|
+
displayName: "styles__ArrowsDivider",
|
229
|
+
componentId: "sc-dwepxh-10"
|
230
|
+
})(["margin-left:8px !important;"]);
|
231
|
+
var ArrowsIconClip = /*#__PURE__*/styled.span.withConfig({
|
232
|
+
displayName: "styles__ArrowsIconClip",
|
233
|
+
componentId: "sc-dwepxh-11"
|
234
|
+
})(["border:0px !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(100%) !important;clip-path:inset(100%) !important;height:1px !important;overflow:hidden !important;padding:0px !important;position:absolute !important;white-space:nowrap !important;width:1px !important;"]);
|
235
|
+
var ArrowsSvg = /*#__PURE__*/styled.svg.withConfig({
|
236
|
+
displayName: "styles__ArrowsSvg",
|
237
|
+
componentId: "sc-dwepxh-12"
|
238
|
+
})(["display:block;fill:none;height:12px;width:12px;stroke:currentcolor;stroke-width:4;overflow:visible;"]);
|
239
|
+
|
240
|
+
var CarouselSwiper$2 = /*#__PURE__*/styled(Swiper).withConfig({
|
241
|
+
displayName: "styles__CarouselSwiper",
|
242
|
+
componentId: "sc-1ja5jv1-0"
|
243
|
+
})([""]);
|
244
|
+
|
245
|
+
var _excluded$2 = ["children", "navigation", "title", "controls", "onShowMore"];
|
246
|
+
SwiperCore.use([Navigation]);
|
247
|
+
var CardCarousel = function CardCarousel(_ref) {
|
248
|
+
var children = _ref.children,
|
249
|
+
navigation = _ref.navigation,
|
250
|
+
title = _ref.title,
|
251
|
+
controls = _ref.controls,
|
252
|
+
onShowMore = _ref.onShowMore,
|
253
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
254
|
+
|
255
|
+
var prevRef = useRef(null);
|
256
|
+
var nextRef = useRef(null);
|
257
|
+
return jsxs(CarouselContainer, {
|
258
|
+
children: [navigation && jsxs(CarouselNavbar, {
|
259
|
+
children: [title && jsx(NavbarTitleContainer, {
|
260
|
+
children: title
|
261
|
+
}, void 0), controls && jsxs(NavbarControlsContainer, {
|
262
|
+
children: [onShowMore && jsx(NavbarControlsQuick, {
|
263
|
+
onClick: onShowMore,
|
264
|
+
children: "Show More"
|
265
|
+
}, void 0), jsx(NavbarControlsSpace, {}, void 0), jsx(ArrowsContainer, {
|
266
|
+
"aria-hidden": "false",
|
267
|
+
children: jsxs(ArrowsFlex, {
|
268
|
+
children: [jsx(ArrowsButton, {
|
269
|
+
ref: prevRef,
|
270
|
+
"aria-label": "Previous",
|
271
|
+
type: "button",
|
272
|
+
children: jsxs("span", {
|
273
|
+
css: "\n position: relative;\n ",
|
274
|
+
children: [jsx(ArrowsIconClip, {}, void 0), jsx(ArrowsSvg, {
|
275
|
+
viewBox: "0 0 32 32",
|
276
|
+
xmlns: "http://www.w3.org/2000/svg",
|
277
|
+
"aria-hidden": "true",
|
278
|
+
role: "presentation",
|
279
|
+
focusable: "false",
|
280
|
+
children: jsx("g", {
|
281
|
+
fill: "none",
|
282
|
+
children: jsx("path", {
|
283
|
+
d: "m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932"
|
284
|
+
}, void 0)
|
285
|
+
}, void 0)
|
286
|
+
}, void 0)]
|
287
|
+
}, void 0)
|
288
|
+
}, void 0), jsx(ArrowsDivider, {}, void 0), jsx(ArrowsButton, {
|
289
|
+
"aria-label": "Next",
|
290
|
+
type: "button",
|
291
|
+
ref: nextRef,
|
292
|
+
children: jsxs("span", {
|
293
|
+
css: "\n position: relative;\n ",
|
294
|
+
children: [jsx(ArrowsIconClip, {}, void 0), jsx(ArrowsSvg, {
|
295
|
+
viewBox: "0 0 32 32",
|
296
|
+
xmlns: "http://www.w3.org/2000/svg",
|
297
|
+
"aria-hidden": "true",
|
298
|
+
role: "presentation",
|
299
|
+
focusable: "false",
|
300
|
+
children: jsx("g", {
|
301
|
+
fill: "none",
|
302
|
+
children: jsx("path", {
|
303
|
+
d: "m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932"
|
304
|
+
}, void 0)
|
305
|
+
}, void 0)
|
306
|
+
}, void 0)]
|
307
|
+
}, void 0)
|
308
|
+
}, void 0)]
|
309
|
+
}, void 0)
|
310
|
+
}, void 0)]
|
311
|
+
}, void 0)]
|
312
|
+
}, void 0), jsx(CarouselSwiper$2, _extends({}, props, {
|
313
|
+
onInit: function onInit(swiper) {
|
314
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
315
|
+
// @ts-ignore
|
316
|
+
// eslint-disable-next-line no-param-reassign
|
317
|
+
swiper.params.navigation.prevEl = prevRef.current; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
318
|
+
// @ts-ignore
|
319
|
+
// eslint-disable-next-line no-param-reassign
|
320
|
+
|
321
|
+
swiper.params.navigation.nextEl = nextRef.current;
|
322
|
+
swiper.navigation.init();
|
323
|
+
swiper.navigation.update(); // console.log("Swiper", swiper);
|
324
|
+
},
|
325
|
+
children: React.Children.map(children, function (child) {
|
326
|
+
return jsx(SwiperSlide, {
|
327
|
+
children: child
|
328
|
+
}, void 0);
|
329
|
+
})
|
330
|
+
}), void 0)]
|
331
|
+
}, void 0);
|
332
|
+
};
|
333
|
+
|
334
|
+
var CarouselSwiper$1 = /*#__PURE__*/styled(Swiper).withConfig({
|
335
|
+
displayName: "styles__CarouselSwiper",
|
336
|
+
componentId: "sc-y1spms-0"
|
337
|
+
})([".swiper-wrapper{box-sizing:inherit !important;@media (min-width:744px){scroll-padding:40px !important;}@media (min-width:1128px){--scroll-padding:max(80px,calc((100vw - 1600px) / 2)) !important;scroll-padding:var(--scroll-padding) !important;}scroll-snap-type:x mandatory !important;overflow-x:auto !important;display:flex !important;scroll-padding:24px !important;.swiper-slide{@media (min-width:744px){min-width:476px !important;max-width:588px !important;flex:1 0 calc((100% - 80px) * 0.75) !important;}@media (min-width:1128px){flex:1 0 calc(50% - 88px) !important;}margin-left:16px !important;flex:1 0 calc(100% - 84px) !important;scroll-snap-align:start !important;scroll-snap-stop:always !important;}.swiper-slide:first-of-type{@media (min-width:744px){padding-left:40px !important;min-width:calc(516px) !important;max-width:calc(628px) !important;flex:1 0 calc((100% - 80px) * 0.75 + 40px) !important;}@media (min-width:1128px){max-width:calc(588px + max(80px,(100vw - 1600px) / 2)) !important;flex:1 0 calc(50% - 8px) !important;padding-left:max(80px,(100vw - 1600px) / 2) !important;}@media (min-width:2080px){max-width:calc(588px + max(80px,(100vw - 1930px) / 2)) !important;flex:1 0 calc(50% - 8px) !important;padding-left:max(80px,(100vw - 1930px) / 2) !important;}flex:1 0 calc(100% - 84px) !important;scroll-snap-align:start !important;scroll-snap-stop:always !important;margin-left:0px !important;padding-left:24px !important;}.swiper-slide:last-of-type{@media (min-width:744px){padding-right:40px !important;min-width:calc(516px) !important;max-width:calc(628px) !important;flex:1 0 calc((100% - 80px) * 0.75 + 40px) !important;}@media (min-width:1128px){max-width:calc(588px + max(80px,(100vw - 1600px) / 2)) !important;flex:1 0 calc(50% - 8px) !important;padding-right:max(80px,(100vw - 1600px) / 2) !important;}@media (min-width:2080px){max-width:calc(588px + max(80px,(100vw - 1930px) / 2)) !important;flex:1 0 calc(50% - 8px) !important;padding-right:max(80px,(100vw - 1930px) / 2) !important;}margin-left:16px !important;flex:1 0 calc(100% - 84px) !important;scroll-snap-align:start !important;scroll-snap-stop:always !important;padding-right:24px !important;}}"]);
|
338
|
+
|
339
|
+
var _excluded$1 = ["children", "navigation", "title", "controls", "quickLink", "onShowMore"];
|
340
|
+
SwiperCore.use([Navigation]);
|
341
|
+
var FreeCarousel = function FreeCarousel(_ref) {
|
342
|
+
var children = _ref.children,
|
343
|
+
navigation = _ref.navigation,
|
344
|
+
title = _ref.title,
|
345
|
+
controls = _ref.controls,
|
346
|
+
onShowMore = _ref.onShowMore,
|
347
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
348
|
+
|
349
|
+
var prevRef = useRef(null);
|
350
|
+
var nextRef = useRef(null);
|
351
|
+
return jsxs(CarouselContainer, {
|
352
|
+
children: [jsx("div", {
|
353
|
+
css: "\n @media (max-width: 744px) {\n display: none !important;\n }\n ",
|
354
|
+
children: jsx(Container, {
|
355
|
+
children: navigation && jsxs(CarouselNavbar, {
|
356
|
+
children: [title && jsx(NavbarTitleContainer, {
|
357
|
+
children: title
|
358
|
+
}, void 0), controls && jsxs(NavbarControlsContainer, {
|
359
|
+
children: [onShowMore && jsx(NavbarControlsQuick, {
|
360
|
+
onClick: onShowMore,
|
361
|
+
children: "Show More"
|
362
|
+
}, void 0), jsx(NavbarControlsSpace, {}, void 0), jsx(ArrowsContainer, {
|
363
|
+
"aria-hidden": "false",
|
364
|
+
children: jsxs(ArrowsFlex, {
|
365
|
+
children: [jsx(ArrowsButton, {
|
366
|
+
ref: prevRef,
|
367
|
+
"aria-label": "Previous",
|
368
|
+
type: "button",
|
369
|
+
children: jsxs("span", {
|
370
|
+
css: "\n position: relative;\n ",
|
371
|
+
children: [jsx(ArrowsIconClip, {}, void 0), jsx(ArrowsSvg, {
|
372
|
+
viewBox: "0 0 32 32",
|
373
|
+
xmlns: "http://www.w3.org/2000/svg",
|
374
|
+
"aria-hidden": "true",
|
375
|
+
role: "presentation",
|
376
|
+
focusable: "false",
|
377
|
+
children: jsx("g", {
|
378
|
+
fill: "none",
|
379
|
+
children: jsx("path", {
|
380
|
+
d: "m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932"
|
381
|
+
}, void 0)
|
382
|
+
}, void 0)
|
383
|
+
}, void 0)]
|
384
|
+
}, void 0)
|
385
|
+
}, void 0), jsx(ArrowsDivider, {}, void 0), jsx(ArrowsButton, {
|
386
|
+
"aria-label": "Next",
|
387
|
+
type: "button",
|
388
|
+
ref: nextRef,
|
389
|
+
children: jsxs("span", {
|
390
|
+
css: "\n position: relative;\n ",
|
391
|
+
children: [jsx(ArrowsIconClip, {}, void 0), jsx(ArrowsSvg, {
|
392
|
+
viewBox: "0 0 32 32",
|
393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
394
|
+
"aria-hidden": "true",
|
395
|
+
role: "presentation",
|
396
|
+
focusable: "false",
|
397
|
+
children: jsx("g", {
|
398
|
+
fill: "none",
|
399
|
+
children: jsx("path", {
|
400
|
+
d: "m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932"
|
401
|
+
}, void 0)
|
402
|
+
}, void 0)
|
403
|
+
}, void 0)]
|
404
|
+
}, void 0)
|
405
|
+
}, void 0)]
|
406
|
+
}, void 0)
|
407
|
+
}, void 0)]
|
408
|
+
}, void 0)]
|
409
|
+
}, void 0)
|
410
|
+
}, void 0)
|
411
|
+
}, void 0), jsx(CarouselSwiper$1, _extends({}, props, {
|
412
|
+
cssMode: true,
|
413
|
+
onInit: function onInit(swiper) {
|
414
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
415
|
+
// @ts-ignore
|
416
|
+
// eslint-disable-next-line no-param-reassign
|
417
|
+
swiper.params.navigation.prevEl = prevRef.current; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
418
|
+
// @ts-ignore
|
419
|
+
// eslint-disable-next-line no-param-reassign
|
420
|
+
|
421
|
+
swiper.params.navigation.nextEl = nextRef.current;
|
422
|
+
swiper.navigation.init();
|
423
|
+
swiper.navigation.update(); // console.log("Swiper", swiper);
|
424
|
+
},
|
425
|
+
children: React.Children.map(children, function (child) {
|
426
|
+
return jsx(SwiperSlide, {
|
427
|
+
children: child
|
428
|
+
}, void 0);
|
429
|
+
})
|
430
|
+
}), void 0)]
|
431
|
+
}, void 0);
|
432
|
+
};
|
433
|
+
|
434
|
+
var CarouselSwiper = /*#__PURE__*/styled(Swiper).withConfig({
|
435
|
+
displayName: "styles__CarouselSwiper",
|
436
|
+
componentId: "sc-jtjv4e-1"
|
437
|
+
})(["height:100%;.swiper-pagination{.swiper-pagination-bullet-active{background-color:#fff;}.swiper-pagination-bullet-active-next{background-color:#ffffff;}.swiper-pagination-bullet{background-color:#ffffff;}}"]);
|
438
|
+
var CarouselPill = /*#__PURE__*/styled(ButtonUnstyled).withConfig({
|
439
|
+
displayName: "styles__CarouselPill",
|
440
|
+
componentId: "sc-jtjv4e-2"
|
441
|
+
})([":hover{border-color:rgba(0,0,0,0.08) !important;background-color:#ffffff !important;color:#000000 !important;box-shadow:0px 0px 0px 1px transparent,0px 0px 0px 4px transparent,0px 6px 16px rgb(0 0 0 / 12%) !important;-webkit-transform:scale(1.04) !important;-ms-transform:scale(1.04) !important;transform:scale(1.04) !important;}-webkit-box-pack:center !important;-ms-flex-pack:center !important;-webkit-box-align:center !important;-ms-flex-align:center !important;-webkit-appearance:none !important;-moz-appearance:none !important;appearance:none !important;display:-webkit-inline-box !important;display:-moz-inline-box !important;display:-ms-inline-flexbox !important;display:-webkit-inline-flex !important;display:inline-flex !important;border-radius:50% !important;border:0px !important;outline:none !important;margin:0px !important;padding:0px !important;color:#222222 !important;background-color:rgba(255,255,255,0.9) !important;cursor:pointer !important;-ms-touch-action:manipulation !important;touch-action:manipulation !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:center !important;justify-content:center !important;border-style:solid !important;border-width:1px !important;background-clip:padding-box !important;border-color:rgba(0,0,0,0.08) !important;box-shadow:0px 0px 0px 1px transparent,0px 0px 0px 4px transparent,0px 2px 4px rgb(0 0 0 / 18%) !important;-webkit-transition:-webkit-transform 0.25s ease,transform 0.25s ease !important;-moz-transition:transform 0.25s ease !important;transition:-ms-transform 0.25s ease,-webkit-transform 0.25s ease,transform 0.25s ease !important;width:32px !important;height:32px !important;"]);
|
442
|
+
var CarouselPillSvg = /*#__PURE__*/styled.svg.withConfig({
|
443
|
+
displayName: "styles__CarouselPillSvg",
|
444
|
+
componentId: "sc-jtjv4e-3"
|
445
|
+
})(["height:10px;width:10px;display:block;fill:currentcolor;"]);
|
446
|
+
|
447
|
+
var _excluded = ["children", "navigation", "title", "controls"];
|
448
|
+
SwiperCore.use([Navigation, Pagination]);
|
449
|
+
var PaginationCarousel = function PaginationCarousel(_ref) {
|
450
|
+
var children = _ref.children,
|
451
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
452
|
+
|
453
|
+
var prevRef = useRef(null);
|
454
|
+
var nextRef = useRef(null);
|
455
|
+
return jsxs(Fragment, {
|
456
|
+
children: [jsx("div", {
|
457
|
+
css: "\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n position: absolute !important;\n top: 50% !important;\n pointer-events: auto !important;\n transform: translateY(-50%) !important;\n left: 8px !important;\n animation-duration: 0.3s !important;\n animation-name: fadein !important;\n z-index: 180 !important;\n opacity: 0 !important;\n :hover {\n opacity: 1 !important;\n }\n ",
|
458
|
+
children: jsx(CarouselPill, {
|
459
|
+
ref: prevRef,
|
460
|
+
children: jsx("span", {
|
461
|
+
css: "\n position: relative !important;\n ",
|
462
|
+
children: jsx(CarouselPillSvg, {
|
463
|
+
viewBox: "0 0 16 16",
|
464
|
+
role: "presentation",
|
465
|
+
"aria-hidden": "true",
|
466
|
+
focusable: "false",
|
467
|
+
children: jsx("path", {
|
468
|
+
d: "m10.8 16c-.4 0-.7-.1-.9-.4l-6.8-6.7c-.5-.5-.5-1.3 0-1.8l6.8-6.7c.5-.5 1.2-.5 1.7 0s .5 1.2 0 1.7l-5.8 5.9 5.8 5.9c.5.5.5 1.2 0 1.7-.2.3-.5.4-.8.4"
|
469
|
+
}, void 0)
|
470
|
+
}, void 0)
|
471
|
+
}, void 0)
|
472
|
+
}, void 0)
|
473
|
+
}, void 0), jsx("div", {
|
474
|
+
css: "\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n position: absolute !important;\n top: 50% !important;\n pointer-events: auto !important;\n transform: translateY(-50%) !important;\n right: 8px !important;\n animation-duration: 0.3s !important;\n animation-name: fadein !important;\n z-index: 180 !important;\n opacity: 0 !important;\n :hover {\n opacity: 1 !important;\n }\n ",
|
475
|
+
children: jsx(CarouselPill, {
|
476
|
+
ref: nextRef,
|
477
|
+
children: jsx("span", {
|
478
|
+
css: "\n position: relative !important;\n ",
|
479
|
+
children: jsx(CarouselPillSvg, {
|
480
|
+
viewBox: "0 0 16 16",
|
481
|
+
role: "presentation",
|
482
|
+
"aria-hidden": "true",
|
483
|
+
focusable: "false",
|
484
|
+
children: jsx("path", {
|
485
|
+
d: "m5.3 16c .3 0 .6-.1.8-.4l6.8-6.7c.5-.5.5-1.3 0-1.8l-6.8-6.7c-.5-.5-1.2-.5-1.7 0s-.5 1.2 0 1.7l5.8 5.9-5.8 5.9c-.5.5-.5 1.2 0 1.7.2.3.5.4.9.4"
|
486
|
+
}, void 0)
|
487
|
+
}, void 0)
|
488
|
+
}, void 0)
|
489
|
+
}, void 0)
|
490
|
+
}, void 0), jsx(CarouselSwiper, _extends({}, props, {
|
491
|
+
pagination: {
|
492
|
+
dynamicBullets: true
|
493
|
+
},
|
494
|
+
onInit: function onInit(swiper) {
|
495
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
496
|
+
// @ts-ignore
|
497
|
+
// eslint-disable-next-line no-param-reassign
|
498
|
+
swiper.params.navigation.prevEl = prevRef.current; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
499
|
+
// @ts-ignore
|
500
|
+
// eslint-disable-next-line no-param-reassign
|
501
|
+
|
502
|
+
swiper.params.navigation.nextEl = nextRef.current;
|
503
|
+
swiper.navigation.init();
|
504
|
+
swiper.navigation.update(); // console.log("Swiper", swiper);
|
505
|
+
},
|
506
|
+
children: React.Children.map(children, function (child) {
|
507
|
+
return React.cloneElement(jsx(SwiperSlide, {
|
508
|
+
children: child
|
509
|
+
}, void 0), _extends({}, props));
|
510
|
+
})
|
511
|
+
}), void 0)]
|
512
|
+
}, void 0);
|
513
|
+
};
|
514
|
+
|
515
|
+
export { CardCarousel, FreeCarousel, PaginationCarousel, PillsCarousel };
|
516
|
+
//# sourceMappingURL=index.js.map
|