@searchspring/snap-preact-components 0.44.3 → 0.45.1
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/Molecules/Slideout/Slideout.js +1 -1
- package/dist/cjs/utilities/cloneWithProps.d.ts.map +1 -1
- package/dist/cjs/utilities/cloneWithProps.js +1 -16
- package/dist/esm/components/Molecules/Slideout/Slideout.js +1 -1
- package/dist/esm/utilities/cloneWithProps.d.ts.map +1 -1
- package/dist/esm/utilities/cloneWithProps.js +2 -6
- package/package.json +11 -11
|
@@ -37,7 +37,7 @@ var CSS = {
|
|
|
37
37
|
top: slideDirection == 'top' ? (isActive ? '0' : "-100vh") : slideDirection == 'bottom' ? 'initial' : '0',
|
|
38
38
|
height: '100%',
|
|
39
39
|
zIndex: '10004',
|
|
40
|
-
width: '90%',
|
|
40
|
+
width: (width === null || width === void 0 ? void 0 : width.endsWith('%')) && parseInt(width.split('%')[0]) > 90 ? width : '90%',
|
|
41
41
|
maxWidth: width,
|
|
42
42
|
padding: '10px',
|
|
43
43
|
background: '#fff',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloneWithProps.d.ts","sourceRoot":"","sources":["../../../src/utilities/cloneWithProps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloneWithProps.d.ts","sourceRoot":"","sources":["../../../src/utilities/cloneWithProps.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,UAAW,GAAG,UAAU,GAAG,KAAG,GAYxD,CAAC"}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.cloneWithProps = void 0;
|
|
15
4
|
var preact_1 = require("preact");
|
|
16
|
-
var mobx_react_lite_1 = require("mobx-react-lite");
|
|
17
5
|
var cloneWithProps = function (input, props) {
|
|
18
6
|
if (!input) {
|
|
19
7
|
return;
|
|
@@ -26,9 +14,6 @@ var cloneWithProps = function (input, props) {
|
|
|
26
14
|
return (0, exports.cloneWithProps)(entry, props);
|
|
27
15
|
});
|
|
28
16
|
}
|
|
29
|
-
|
|
30
|
-
return (0, preact_1.cloneElement)(input, properties);
|
|
31
|
-
});
|
|
32
|
-
return (0, preact_1.h)(ObservableClone, __assign({}, props));
|
|
17
|
+
return (0, preact_1.cloneElement)(input, props);
|
|
33
18
|
};
|
|
34
19
|
exports.cloneWithProps = cloneWithProps;
|
|
@@ -18,7 +18,7 @@ const CSS = {
|
|
|
18
18
|
top: slideDirection == 'top' ? (isActive ? '0' : `-100vh`) : slideDirection == 'bottom' ? 'initial' : '0',
|
|
19
19
|
height: '100%',
|
|
20
20
|
zIndex: '10004',
|
|
21
|
-
width: '90%',
|
|
21
|
+
width: width?.endsWith('%') && parseInt(width.split('%')[0]) > 90 ? width : '90%',
|
|
22
22
|
maxWidth: width,
|
|
23
23
|
padding: '10px',
|
|
24
24
|
background: '#fff',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloneWithProps.d.ts","sourceRoot":"","sources":["../../../src/utilities/cloneWithProps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloneWithProps.d.ts","sourceRoot":"","sources":["../../../src/utilities/cloneWithProps.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,UAAW,GAAG,UAAU,GAAG,KAAG,GAYxD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { observer } from 'mobx-react-lite';
|
|
1
|
+
import { cloneElement } from 'preact';
|
|
3
2
|
export const cloneWithProps = (input, props) => {
|
|
4
3
|
if (!input) {
|
|
5
4
|
return;
|
|
@@ -12,8 +11,5 @@ export const cloneWithProps = (input, props) => {
|
|
|
12
11
|
return cloneWithProps(entry, props);
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
return cloneElement(input, properties);
|
|
17
|
-
});
|
|
18
|
-
return h(ObservableClone, { ...props });
|
|
14
|
+
return cloneElement(input, props);
|
|
19
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-preact-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.1",
|
|
4
4
|
"description": "Snap Preact Component Library",
|
|
5
5
|
"author": "Searchspring",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@emotion/react": "11.9.0",
|
|
29
|
-
"@searchspring/snap-toolbox": "^0.
|
|
29
|
+
"@searchspring/snap-toolbox": "^0.45.1",
|
|
30
30
|
"classnames": "^2.3.2",
|
|
31
31
|
"deepmerge": "4.3.1",
|
|
32
32
|
"dequal": "2.0.3",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"preact": "10.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@searchspring/snap-client": "^0.
|
|
42
|
-
"@searchspring/snap-controller": "^0.
|
|
43
|
-
"@searchspring/snap-event-manager": "^0.
|
|
44
|
-
"@searchspring/snap-logger": "^0.
|
|
45
|
-
"@searchspring/snap-profiler": "^0.
|
|
46
|
-
"@searchspring/snap-store-mobx": "^0.
|
|
47
|
-
"@searchspring/snap-tracker": "^0.
|
|
48
|
-
"@searchspring/snap-url-manager": "^0.
|
|
41
|
+
"@searchspring/snap-client": "^0.45.1",
|
|
42
|
+
"@searchspring/snap-controller": "^0.45.1",
|
|
43
|
+
"@searchspring/snap-event-manager": "^0.45.1",
|
|
44
|
+
"@searchspring/snap-logger": "^0.45.1",
|
|
45
|
+
"@searchspring/snap-profiler": "^0.45.1",
|
|
46
|
+
"@searchspring/snap-store-mobx": "^0.45.1",
|
|
47
|
+
"@searchspring/snap-tracker": "^0.45.1",
|
|
48
|
+
"@searchspring/snap-url-manager": "^0.45.1",
|
|
49
49
|
"@storybook/addon-actions": "6.4.22",
|
|
50
50
|
"@storybook/addon-controls": "6.4.22",
|
|
51
51
|
"@storybook/addon-docs": "6.4.22",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"ts-loader": "9.3.0"
|
|
68
68
|
},
|
|
69
69
|
"sideEffects": false,
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "345e457a841f882f7162d032528313f5623f388d"
|
|
71
71
|
}
|