@gem-sdk/core 2.0.0-dev.168 → 2.0.0-dev.170
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/shadow.js +20 -0
- package/dist/cjs/index.js +1 -0
- package/dist/esm/helpers/shadow.js +20 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/index.d.ts +1523 -1
- package/package.json +1 -1
|
@@ -79,6 +79,25 @@ const getResponsiveStyleShadowWithoutState = (value, styleAppliedFor, isEnableSh
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
+
const composeShadow = (shadowInput)=>{
|
|
83
|
+
return {
|
|
84
|
+
...getStyleShadowState(shadowInput?.desktop, 'box-shadow', {
|
|
85
|
+
normal: shadowInput?.desktop?.normal?.type !== 'none',
|
|
86
|
+
focus: shadowInput?.desktop?.focus?.type !== 'none',
|
|
87
|
+
hover: shadowInput?.desktop?.hover?.type !== 'none'
|
|
88
|
+
}),
|
|
89
|
+
...getStyleShadowState(shadowInput?.tablet, 'box-shadow', {
|
|
90
|
+
normal: shadowInput?.tablet?.normal?.type !== 'none',
|
|
91
|
+
focus: shadowInput?.tablet?.focus?.type !== 'none',
|
|
92
|
+
hover: shadowInput?.tablet?.hover?.type !== 'none'
|
|
93
|
+
}, 'tablet'),
|
|
94
|
+
...getStyleShadowState(shadowInput?.mobile, 'box-shadow', {
|
|
95
|
+
normal: shadowInput?.mobile?.normal?.type !== 'none',
|
|
96
|
+
focus: shadowInput?.mobile?.focus?.type !== 'none',
|
|
97
|
+
hover: shadowInput?.mobile?.hover?.type !== 'none'
|
|
98
|
+
}, 'mobile')
|
|
99
|
+
};
|
|
100
|
+
};
|
|
82
101
|
const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
|
|
83
102
|
if (!hasBoxShadow) return undefined;
|
|
84
103
|
if (!boxShadowValue) return undefined;
|
|
@@ -87,6 +106,7 @@ const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
|
|
|
87
106
|
return `box-shadow: ${Math.cos(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${boxShadowValue?.blur} ${boxShadowValue?.spread + ' '}${colors.getSingleColorVariable(boxShadowValue?.color)}${sub};`;
|
|
88
107
|
};
|
|
89
108
|
|
|
109
|
+
exports.composeShadow = composeShadow;
|
|
90
110
|
exports.composeShadowCss = composeShadowCss;
|
|
91
111
|
exports.getResponsiveStyleShadow = getResponsiveStyleShadow;
|
|
92
112
|
exports.getResponsiveStyleShadowWithoutState = getResponsiveStyleShadowWithoutState;
|
package/dist/cjs/index.js
CHANGED
|
@@ -284,6 +284,7 @@ exports.props = render.props;
|
|
|
284
284
|
exports.removeUndefinedValuesFromObject = render.removeUndefinedValuesFromObject;
|
|
285
285
|
exports.styles = render.styles;
|
|
286
286
|
exports.template = render.template;
|
|
287
|
+
exports.composeShadow = shadow.composeShadow;
|
|
287
288
|
exports.composeShadowCss = shadow.composeShadowCss;
|
|
288
289
|
exports.getResponsiveStyleShadow = shadow.getResponsiveStyleShadow;
|
|
289
290
|
exports.getResponsiveStyleShadowWithoutState = shadow.getResponsiveStyleShadowWithoutState;
|
|
@@ -77,6 +77,25 @@ const getResponsiveStyleShadowWithoutState = (value, styleAppliedFor, isEnableSh
|
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
+
const composeShadow = (shadowInput)=>{
|
|
81
|
+
return {
|
|
82
|
+
...getStyleShadowState(shadowInput?.desktop, 'box-shadow', {
|
|
83
|
+
normal: shadowInput?.desktop?.normal?.type !== 'none',
|
|
84
|
+
focus: shadowInput?.desktop?.focus?.type !== 'none',
|
|
85
|
+
hover: shadowInput?.desktop?.hover?.type !== 'none'
|
|
86
|
+
}),
|
|
87
|
+
...getStyleShadowState(shadowInput?.tablet, 'box-shadow', {
|
|
88
|
+
normal: shadowInput?.tablet?.normal?.type !== 'none',
|
|
89
|
+
focus: shadowInput?.tablet?.focus?.type !== 'none',
|
|
90
|
+
hover: shadowInput?.tablet?.hover?.type !== 'none'
|
|
91
|
+
}, 'tablet'),
|
|
92
|
+
...getStyleShadowState(shadowInput?.mobile, 'box-shadow', {
|
|
93
|
+
normal: shadowInput?.mobile?.normal?.type !== 'none',
|
|
94
|
+
focus: shadowInput?.mobile?.focus?.type !== 'none',
|
|
95
|
+
hover: shadowInput?.mobile?.hover?.type !== 'none'
|
|
96
|
+
}, 'mobile')
|
|
97
|
+
};
|
|
98
|
+
};
|
|
80
99
|
const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
|
|
81
100
|
if (!hasBoxShadow) return undefined;
|
|
82
101
|
if (!boxShadowValue) return undefined;
|
|
@@ -85,4 +104,4 @@ const composeShadowCss = ({ hasBoxShadow, boxShadowValue, important })=>{
|
|
|
85
104
|
return `box-shadow: ${Math.cos(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${Math.sin(parseFloat(`${boxShadowValue?.angle}`) * Math.PI / 180) * parseFloat(`${distance}`)}${unitDistance} ${boxShadowValue?.blur} ${boxShadowValue?.spread + ' '}${getSingleColorVariable(boxShadowValue?.color)}${sub};`;
|
|
86
105
|
};
|
|
87
106
|
|
|
88
|
-
export { composeShadowCss, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getStyleShadow, getStyleShadowState, parseValueWithUnit };
|
|
107
|
+
export { composeShadow, composeShadowCss, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getStyleShadow, getStyleShadowState, parseValueWithUnit };
|
package/dist/esm/index.js
CHANGED
|
@@ -71,7 +71,7 @@ export { checkAvailableVariantInStock, getSelectedVariant, parseSelectedOption }
|
|
|
71
71
|
export { generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey } from './helpers/query.js';
|
|
72
72
|
export { composeCornerCss, composeRadius, composeRadiusResponsive, getCornerCSSFromGlobal, getCustomRadius, getRadiusCSSFromGlobal, getRadiusStyleActiveState } from './helpers/radius.js';
|
|
73
73
|
export { RenderIf, composeMemo, dataStringify, props, removeUndefinedValuesFromObject, styles, template } from './helpers/render.js';
|
|
74
|
-
export { composeShadowCss, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
74
|
+
export { composeShadow, composeShadowCss, getResponsiveStyleShadow, getResponsiveStyleShadowWithoutState, getStyleShadow, getStyleShadowState, parseValueWithUnit } from './helpers/shadow.js';
|
|
75
75
|
export { composeSize, composeSizeCss, genSizeClass, getAspectRatioGlobalSize, getGlobalSizeGap, getHeightByShapeGlobalSize, getPaddingGlobalSize, getPaddingStyleByDevice, getResponsiveStylePadding, getValueByDevice, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, makeGlobalSize, makeGlobalSizeIcon, makeStyleWithDefault } from './helpers/size.js';
|
|
76
76
|
export { composeFallbackTypographyStyle, composeFontFamilyTypographyV2, composeTextHoverColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, genTypoClass } from './helpers/typography.js';
|
|
77
77
|
export { useArticlesQuery, useBlogsQuery } from './hooks/articles/useArticlesQuery.js';
|