@gem-sdk/core 1.58.0-dev.15 → 1.58.0-dev.18
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/helpers/size.js
CHANGED
|
@@ -103,7 +103,7 @@ const getHeightByShapeGlobalSize = (shapeByLayout)=>{
|
|
|
103
103
|
});
|
|
104
104
|
return result;
|
|
105
105
|
};
|
|
106
|
-
const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto)=>{
|
|
106
|
+
const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto, defaultFull)=>{
|
|
107
107
|
let result = {};
|
|
108
108
|
const DEVICES = [
|
|
109
109
|
'desktop',
|
|
@@ -112,7 +112,13 @@ const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto)=>{
|
|
|
112
112
|
];
|
|
113
113
|
DEVICES.forEach((device)=>{
|
|
114
114
|
const shapeByDevice = getResonsiveValue.getResponsiveValueByScreen(shapeByLayout, device);
|
|
115
|
-
|
|
115
|
+
let width = shapeByDevice?.width;
|
|
116
|
+
if (defaultAuto) {
|
|
117
|
+
width = shapeByDevice?.width || 'auto';
|
|
118
|
+
}
|
|
119
|
+
if (defaultFull) {
|
|
120
|
+
width = shapeByDevice?.width || '100%';
|
|
121
|
+
}
|
|
116
122
|
if (width) {
|
|
117
123
|
result = {
|
|
118
124
|
...result,
|
package/dist/esm/helpers/size.js
CHANGED
|
@@ -101,7 +101,7 @@ const getHeightByShapeGlobalSize = (shapeByLayout)=>{
|
|
|
101
101
|
});
|
|
102
102
|
return result;
|
|
103
103
|
};
|
|
104
|
-
const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto)=>{
|
|
104
|
+
const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto, defaultFull)=>{
|
|
105
105
|
let result = {};
|
|
106
106
|
const DEVICES = [
|
|
107
107
|
'desktop',
|
|
@@ -110,7 +110,13 @@ const getWidthByShapeGlobalSize = (shapeByLayout, defaultAuto)=>{
|
|
|
110
110
|
];
|
|
111
111
|
DEVICES.forEach((device)=>{
|
|
112
112
|
const shapeByDevice = getResponsiveValueByScreen(shapeByLayout, device);
|
|
113
|
-
|
|
113
|
+
let width = shapeByDevice?.width;
|
|
114
|
+
if (defaultAuto) {
|
|
115
|
+
width = shapeByDevice?.width || 'auto';
|
|
116
|
+
}
|
|
117
|
+
if (defaultFull) {
|
|
118
|
+
width = shapeByDevice?.width || '100%';
|
|
119
|
+
}
|
|
114
120
|
if (width) {
|
|
115
121
|
result = {
|
|
116
122
|
...result,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -40255,7 +40255,7 @@ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>)
|
|
|
40255
40255
|
declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, defaultVal?: Partial<Record<NameDevices$1, K>> | undefined) => Record<ResponsiveKey<T>, K>;
|
|
40256
40256
|
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
|
|
40257
40257
|
declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
|
|
40258
|
-
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
40258
|
+
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
40259
40259
|
declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
|
|
40260
40260
|
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
40261
40261
|
declare const getValueByDevice: <T>(value: any, device: NameDevices$1) => T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/core",
|
|
3
|
-
"version": "1.58.0-dev.
|
|
3
|
+
"version": "1.58.0-dev.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@gem-sdk/adapter-shopify": "1.58.0-dev.13",
|
|
31
|
-
"@gem-sdk/styles": "1.58.0-dev.
|
|
31
|
+
"@gem-sdk/styles": "1.58.0-dev.17",
|
|
32
32
|
"@types/classnames": "^2.3.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|