@dgui/react-web-shared 1.7.0-next.1 → 1.7.0-next.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/dist/Generics/WebBaseCarousel/WebBaseCarousel.js +7 -2
- package/dist/Generics/WebBaseCarousel/WebBaseCarousel.js.map +1 -1
- package/dist/Generics/WebBaseCarousel/WebBaseHorse.d.ts +3 -4
- package/dist/Generics/WebBaseCarousel/WebBaseHorse.js +10 -4
- package/dist/Generics/WebBaseCarousel/WebBaseHorse.js.map +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,12 @@ const styles = {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
const modules = [];
|
|
20
|
-
const WebBaseCarousel = ({ children, onSelectTab, swipe, tabIndex = 0 }) => {
|
|
20
|
+
const WebBaseCarousel = ({ children, onSelectTab, style: givenStyle, swipe, tabIndex = 0 }) => {
|
|
21
|
+
const style = (0, react_1.useMemo)(() => {
|
|
22
|
+
return Object.assign(Object.assign({}, styles.slideContainer), givenStyle);
|
|
23
|
+
}, [
|
|
24
|
+
givenStyle
|
|
25
|
+
]);
|
|
21
26
|
const handleSlideChange = (0, react_1.useCallback)((swiper) => {
|
|
22
27
|
if (onSelectTab) {
|
|
23
28
|
onSelectTab(swiper.activeIndex);
|
|
@@ -36,7 +41,7 @@ const WebBaseCarousel = ({ children, onSelectTab, swipe, tabIndex = 0 }) => {
|
|
|
36
41
|
}, [
|
|
37
42
|
tabIndex
|
|
38
43
|
]);
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(react_2.Swiper, { allowTouchMove: swipe !== null && swipe !== void 0 ? swipe : true, initialSlide: tabIndex, modules: modules, onSlideChange: handleSlideChange, onSwiper: handleSwiper, slidesPerView: SLIDES_PER_VIEW, spaceBetween: SPACE_BETWEEN, style:
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Swiper, { allowTouchMove: swipe !== null && swipe !== void 0 ? swipe : true, initialSlide: tabIndex, modules: modules, onSlideChange: handleSlideChange, onSwiper: handleSwiper, slidesPerView: SLIDES_PER_VIEW, spaceBetween: SPACE_BETWEEN, style: style, children: children }));
|
|
40
45
|
};
|
|
41
46
|
WebBaseCarousel.displayName = 'WebBaseCarousel';
|
|
42
47
|
exports.default = WebBaseCarousel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebBaseCarousel.js","sourceRoot":"","sources":["../../../src/Generics/WebBaseCarousel/WebBaseCarousel.tsx"],"names":[],"mappings":";;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"WebBaseCarousel.js","sourceRoot":"","sources":["../../../src/Generics/WebBaseCarousel/WebBaseCarousel.tsx"],"names":[],"mappings":";;;;;;;AAGA,iCAOe;AACf,wCAEsB;AAMtB,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,MAAM,GAAG;IACd,cAAc,EAAE;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACb;CACD,CAAC;AAEF,MAAM,OAAO,GAAmB,EAAE,CAAC;AAEnC,MAAM,eAAe,GAA4C,CAAC,EACjE,QAAQ,EACR,WAAW,EACX,KAAK,EAAE,UAAU,EACjB,KAAK,EACL,QAAQ,GAAG,CAAC,EACZ,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE;QACJ,uCACI,MAAM,CAAC,cAAc,GACrB,UAAU,EACZ;IACH,CAAC,EACD;QACC,UAAU;KACV,CACD,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAA,mBAAW,EACpC,CACC,MAAmB,EAClB,EAAE;QACH,IAAI,WAAW,EAAE,CAAC;YACjB,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACjC,CAAC;IACF,CAAC,EAED;QACC,WAAW;KACX,CACD,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,cAAM,EAAqB,IAAI,CAAC,CAAC;IAExD,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC/B,CACC,MAAmB,EAClB,EAAE;QACH,cAAc,CAAC,OAAO,GAAG,MAAM,CAAC;IACjC,CAAC,EACD,EAAE,CACF,CAAC;IAEF,IAAA,iBAAS,EACR,GAAG,EAAE;QACJ,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;YAC5B,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC,EACD;QACC,QAAQ;KACR,CACD,CAAC;IAEF,OAAO,CACN,uBAAC,cAAM,IACN,cAAc,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,EAC7B,YAAY,EAAE,QAAQ,EACtB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,iBAAiB,EAChC,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,eAAe,EAC9B,YAAY,EAAE,aAAa,EAC3B,KAAK,EAAE,KAAsB,YAE5B,QAAQ,GACD,CACT,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,kBAAe,eAAe,CAAC;AAI/B,+CAEwB;AADvB,6HAAA,OAAO,OAAgB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type HorseProps } from '@dgui/react-shared';
|
|
2
|
+
import { type FunctionComponent } from 'react';
|
|
2
3
|
declare const WebBaseHorse: FunctionComponent<WebBaseHorseProps>;
|
|
3
4
|
export default WebBaseHorse;
|
|
4
|
-
export type WebBaseHorseProps =
|
|
5
|
-
readonly swipe?: boolean;
|
|
6
|
-
}>;
|
|
5
|
+
export type WebBaseHorseProps = HorseProps;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_2 = require("swiper/react");
|
|
5
6
|
const styles = {
|
|
6
7
|
horse: {
|
|
7
8
|
display: 'flex',
|
|
@@ -9,11 +10,16 @@ const styles = {
|
|
|
9
10
|
width: '100%'
|
|
10
11
|
}
|
|
11
12
|
};
|
|
12
|
-
const WebBaseHorse = ({ children, swipe }) => {
|
|
13
|
+
const WebBaseHorse = ({ children, style: givenStyle, swipe }) => {
|
|
14
|
+
const style = (0, react_1.useMemo)(() => {
|
|
15
|
+
return Object.assign(Object.assign({}, styles.horse), givenStyle);
|
|
16
|
+
}, [
|
|
17
|
+
givenStyle
|
|
18
|
+
]);
|
|
13
19
|
const slide = swipe !== null && swipe !== void 0 ? swipe : true;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { className: slide ?
|
|
15
21
|
undefined :
|
|
16
|
-
'swiper-no-swiping', style:
|
|
22
|
+
'swiper-no-swiping', style: style, children: children }));
|
|
17
23
|
};
|
|
18
24
|
WebBaseHorse.displayName = 'WebBaseHorse';
|
|
19
25
|
exports.default = WebBaseHorse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebBaseHorse.js","sourceRoot":"","sources":["../../../src/Generics/WebBaseCarousel/WebBaseHorse.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"WebBaseHorse.js","sourceRoot":"","sources":["../../../src/Generics/WebBaseCarousel/WebBaseHorse.tsx"],"names":[],"mappings":";;;AAGA,iCAIe;AACf,wCAEsB;AAEtB,MAAM,MAAM,GAAG;IACd,KAAK,EAAE;QACN,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACb;CACD,CAAC;AAEF,MAAM,YAAY,GAAyC,CAAC,EAC3D,QAAQ,EACR,KAAK,EAAE,UAAU,EACjB,KAAK,EACL,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE;QACJ,uCACI,MAAM,CAAC,KAAK,GACZ,UAAU,EACZ;IACH,CAAC,EACD;QACC,UAAU;KACV,CACD,CAAC;IAEF,MAAM,KAAK,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC;IAE5B,OAAO,CACN,uBAAC,mBAAW,IACX,SAAS,EACR,KAAK,CAAC,CAAC;YACN,SAAS,CAAC,CAAC;YACX,mBAAmB,EAErB,KAAK,EAAE,KAAsB,YAE5B,QAAQ,GACI,CACd,CAAC;AACH,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,kBAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dgui/react-web-shared",
|
|
3
3
|
"title": "Digested React GUI Shared Web Components",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "1.7.0-next.
|
|
5
|
+
"version": "1.7.0-next.3",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "Shared Web Components for a boilerplate React GUI",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"swiper": "^11.1.14"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@dgui/react-shared": "1.7.0-next.
|
|
68
|
+
"@dgui/react-shared": "1.7.0-next.3",
|
|
69
69
|
"lodash.debounce": "^4.0.8"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"react-dom",
|
|
82
82
|
"typescript"
|
|
83
83
|
],
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "0069cf82614f9de8788c85f30254827298d9c6c9"
|
|
85
85
|
}
|