@gem-sdk/core 1.61.0 → 1.61.2
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
|
@@ -39696,7 +39696,7 @@ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>)
|
|
|
39696
39696
|
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>;
|
|
39697
39697
|
declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
|
|
39698
39698
|
declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
|
|
39699
|
-
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
39699
|
+
declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean, defaultFull?: boolean) => Partial<Record<NameDevices$1, string>>;
|
|
39700
39700
|
declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
|
|
39701
39701
|
declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
|
|
39702
39702
|
declare const getValueByDevice: <T>(value: any, device: NameDevices$1) => T;
|