@searchspring/snap-preact-components 0.56.5 → 0.57.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/dist/cjs/components/Atoms/Price/Price.d.ts.map +1 -1
- package/dist/cjs/components/Atoms/Price/Price.js +5 -3
- package/dist/cjs/components/Molecules/Carousel/Carousel.d.ts.map +1 -1
- package/dist/cjs/components/Molecules/Carousel/Carousel.js +2 -1
- package/dist/esm/components/Atoms/Price/Price.d.ts.map +1 -1
- package/dist/esm/components/Atoms/Price/Price.js +5 -3
- package/dist/esm/components/Molecules/Carousel/Carousel.d.ts.map +1 -1
- package/dist/esm/components/Molecules/Carousel/Carousel.js +2 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../../../../../src/components/Atoms/Price/Price.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAc1E,wBAAgB,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../../../../../src/components/Atoms/Price/Price.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAc1E,wBAAgB,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA6DzD;AAED,MAAM,WAAW,UAAW,SAAQ,oBAAoB;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -43,12 +43,11 @@ function Price(properties) {
|
|
|
43
43
|
symbol: '$', decimalPlaces: 2, padDecimalPlaces: true, thousandsSeparator: ',', decimalSeparator: '.', symbolAfter: false, lineThrough: false }, (_a = globalTheme === null || globalTheme === void 0 ? void 0 : globalTheme.components) === null || _a === void 0 ? void 0 : _a.price), properties), (_c = (_b = properties.theme) === null || _b === void 0 ? void 0 : _b.components) === null || _c === void 0 ? void 0 : _c.price);
|
|
44
44
|
var lineThrough = props.lineThrough, value = props.value, symbol = props.symbol, decimalPlaces = props.decimalPlaces, padDecimalPlaces = props.padDecimalPlaces, thousandsSeparator = props.thousandsSeparator, decimalSeparator = props.decimalSeparator, symbolAfter = props.symbolAfter, raw = props.raw, disableStyles = props.disableStyles, className = props.className, style = props.style;
|
|
45
45
|
var formattedPrice = snap_toolbox_1.filters.currency(+value, {
|
|
46
|
-
symbol:
|
|
46
|
+
symbol: '',
|
|
47
47
|
decimalPlaces: decimalPlaces,
|
|
48
48
|
padDecimalPlaces: padDecimalPlaces,
|
|
49
49
|
thousandsSeparator: thousandsSeparator,
|
|
50
50
|
decimalSeparator: decimalSeparator,
|
|
51
|
-
symbolAfter: symbolAfter,
|
|
52
51
|
});
|
|
53
52
|
var styling = {};
|
|
54
53
|
if (!disableStyles) {
|
|
@@ -58,6 +57,9 @@ function Price(properties) {
|
|
|
58
57
|
styling.css = [style];
|
|
59
58
|
}
|
|
60
59
|
return raw ? ((0, react_1.jsx)(preact_1.Fragment, null, formattedPrice)) : ((0, react_1.jsx)(providers_1.CacheProvider, null,
|
|
61
|
-
(0, react_1.jsx)("span", __assign({}, styling, { className: (0, classnames_1.default)('ss__price', { 'ss__price--strike': lineThrough }, className) }),
|
|
60
|
+
(0, react_1.jsx)("span", __assign({}, styling, { className: (0, classnames_1.default)('ss__price', { 'ss__price--strike': lineThrough }, className) }),
|
|
61
|
+
symbol && !symbolAfter ? (0, react_1.jsx)("span", { className: 'ss__price__symbol' }, symbol) : (0, react_1.jsx)(preact_1.Fragment, null),
|
|
62
|
+
(0, react_1.jsx)("span", { className: 'ss__price__value' }, formattedPrice),
|
|
63
|
+
symbol && symbolAfter ? (0, react_1.jsx)("span", { className: 'ss__price__symbol' }, symbol) : (0, react_1.jsx)(preact_1.Fragment, null))));
|
|
62
64
|
}
|
|
63
65
|
exports.Price = Price;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAkI9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,eAAyB,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAkI9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,eAAyB,aAAa,KAAG,WAyP5D,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACpD,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,KAAK,IAAI,CAAC;IACnF,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC3E,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;CACxB"}
|
|
@@ -328,10 +328,11 @@ exports.Carousel = (0, mobx_react_1.observer)(function (properties) {
|
|
|
328
328
|
}
|
|
329
329
|
}, onClick: function (swiper, e) {
|
|
330
330
|
onClick && onClick(swiper, e);
|
|
331
|
-
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, loopAddBlankSlides: false, modules: swiperModules }, additionalProps, displaySettings, { navigation: navigation, pagination: pagination, onResize: function () {
|
|
331
|
+
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, loopAddBlankSlides: false, modules: swiperModules }, additionalProps, displaySettings, { navigation: navigation, pagination: pagination, onResize: function (swiper) {
|
|
332
332
|
if (additionalProps.onResize) {
|
|
333
333
|
additionalProps.onResize();
|
|
334
334
|
}
|
|
335
|
+
swiper.updateSlidesClasses();
|
|
335
336
|
attachClasstoLastVisibleSlide();
|
|
336
337
|
}, onTransitionEnd: function () {
|
|
337
338
|
if (additionalProps.onTransitionEnd) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../../../../../src/components/Atoms/Price/Price.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAc1E,wBAAgB,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../../../../../src/components/Atoms/Price/Price.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAc1E,wBAAgB,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA6DzD;AAED,MAAM,WAAW,UAAW,SAAQ,oBAAoB;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -33,12 +33,11 @@ export function Price(properties) {
|
|
|
33
33
|
};
|
|
34
34
|
const { lineThrough, value, symbol, decimalPlaces, padDecimalPlaces, thousandsSeparator, decimalSeparator, symbolAfter, raw, disableStyles, className, style, } = props;
|
|
35
35
|
const formattedPrice = filters.currency(+value, {
|
|
36
|
-
symbol,
|
|
36
|
+
symbol: '',
|
|
37
37
|
decimalPlaces,
|
|
38
38
|
padDecimalPlaces,
|
|
39
39
|
thousandsSeparator,
|
|
40
40
|
decimalSeparator,
|
|
41
|
-
symbolAfter,
|
|
42
41
|
});
|
|
43
42
|
const styling = {};
|
|
44
43
|
if (!disableStyles) {
|
|
@@ -48,5 +47,8 @@ export function Price(properties) {
|
|
|
48
47
|
styling.css = [style];
|
|
49
48
|
}
|
|
50
49
|
return raw ? (jsx(Fragment, null, formattedPrice)) : (jsx(CacheProvider, null,
|
|
51
|
-
jsx("span", { ...styling, className: classnames('ss__price', { 'ss__price--strike': lineThrough }, className) },
|
|
50
|
+
jsx("span", { ...styling, className: classnames('ss__price', { 'ss__price--strike': lineThrough }, className) },
|
|
51
|
+
symbol && !symbolAfter ? jsx("span", { className: 'ss__price__symbol' }, symbol) : jsx(Fragment, null),
|
|
52
|
+
jsx("span", { className: 'ss__price__value' }, formattedPrice),
|
|
53
|
+
symbol && symbolAfter ? jsx("span", { className: 'ss__price__symbol' }, symbol) : jsx(Fragment, null))));
|
|
52
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAkI9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,QAAQ,eAAyB,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/Carousel/Carousel.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB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AAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;CACxB"}
|
|
@@ -320,10 +320,11 @@ export const Carousel = observer((properties) => {
|
|
|
320
320
|
}
|
|
321
321
|
}, onClick: (swiper, e) => {
|
|
322
322
|
onClick && onClick(swiper, e);
|
|
323
|
-
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, loopAddBlankSlides: false, modules: swiperModules, ...additionalProps, ...displaySettings, navigation: navigation, pagination: pagination, onResize: () => {
|
|
323
|
+
}, direction: vertical ? 'vertical' : 'horizontal', loop: loop, threshold: 7, loopAddBlankSlides: false, modules: swiperModules, ...additionalProps, ...displaySettings, navigation: navigation, pagination: pagination, onResize: (swiper) => {
|
|
324
324
|
if (additionalProps.onResize) {
|
|
325
325
|
additionalProps.onResize();
|
|
326
326
|
}
|
|
327
|
+
swiper.updateSlidesClasses();
|
|
327
328
|
attachClasstoLastVisibleSlide();
|
|
328
329
|
}, onTransitionEnd: () => {
|
|
329
330
|
if (additionalProps.onTransitionEnd) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-preact-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "Snap Preact Component Library",
|
|
5
5
|
"author": "Searchspring",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@cypress/react": "^8.0.0",
|
|
31
31
|
"@emotion/react": "11.9.0",
|
|
32
|
-
"@searchspring/snap-toolbox": "^0.
|
|
32
|
+
"@searchspring/snap-toolbox": "^0.57.0",
|
|
33
33
|
"classnames": "^2.3.2",
|
|
34
34
|
"cypress": "^13.7.1",
|
|
35
35
|
"cypress-wait-until": "^1.7.2",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@babel/preset-env": "^7.21.4",
|
|
53
53
|
"@babel/preset-react": "^7.18.6",
|
|
54
54
|
"@babel/runtime": "^7.21.0",
|
|
55
|
-
"@searchspring/snap-client": "^0.
|
|
56
|
-
"@searchspring/snap-controller": "^0.
|
|
57
|
-
"@searchspring/snap-event-manager": "^0.
|
|
58
|
-
"@searchspring/snap-logger": "^0.
|
|
59
|
-
"@searchspring/snap-profiler": "^0.
|
|
60
|
-
"@searchspring/snap-store-mobx": "^0.
|
|
61
|
-
"@searchspring/snap-tracker": "^0.
|
|
62
|
-
"@searchspring/snap-url-manager": "^0.
|
|
55
|
+
"@searchspring/snap-client": "^0.57.0",
|
|
56
|
+
"@searchspring/snap-controller": "^0.57.0",
|
|
57
|
+
"@searchspring/snap-event-manager": "^0.57.0",
|
|
58
|
+
"@searchspring/snap-logger": "^0.57.0",
|
|
59
|
+
"@searchspring/snap-profiler": "^0.57.0",
|
|
60
|
+
"@searchspring/snap-store-mobx": "^0.57.0",
|
|
61
|
+
"@searchspring/snap-tracker": "^0.57.0",
|
|
62
|
+
"@searchspring/snap-url-manager": "^0.57.0",
|
|
63
63
|
"@storybook/addon-actions": "6.4.22",
|
|
64
64
|
"@storybook/addon-controls": "6.4.22",
|
|
65
65
|
"@storybook/addon-docs": "6.4.22",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"webpack-merge": "^5.8.0"
|
|
85
85
|
},
|
|
86
86
|
"sideEffects": false,
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "ecf2e7bef805aa78834736ab44fbe5f9f912db78"
|
|
88
88
|
}
|