@gem-sdk/core 1.58.0-staging.36 → 1.58.0-staging.39
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
|
@@ -40014,7 +40014,7 @@ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>)
|
|
|
40014
40014
|
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>;
|
|
40015
40015
|
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
|
|
40016
40016
|
declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
|
|
40017
|
-
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
40017
|
+
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
40018
40018
|
declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
|
|
40019
40019
|
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
40020
40020
|
declare const getValueByDevice: <T>(value: any, device: NameDevices$1) => T;
|