@gem-sdk/core 2.0.0-dev.713 → 2.0.0-dev.716
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.
|
@@ -209,18 +209,14 @@ const GRADIENT_BGR_KEY = 'linear-gradient';
|
|
|
209
209
|
const getGradientBgrStyleForButton = (backgroundStyle)=>{
|
|
210
210
|
if (!backgroundStyle) return;
|
|
211
211
|
const bgrStyle = {};
|
|
212
|
-
Object.keys(backgroundStyle)
|
|
213
|
-
|
|
214
|
-
if
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
'--hvr-bg': backgroundStyle[state]
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
});
|
|
212
|
+
for (const state of Object.keys(backgroundStyle)){
|
|
213
|
+
const color = backgroundStyle[state];
|
|
214
|
+
// Skip if not a gradient
|
|
215
|
+
if (!color?.startsWith(GRADIENT_BGR_KEY)) continue;
|
|
216
|
+
// Set normal or hover gradient
|
|
217
|
+
const cssVar = state === 'normal' ? '--bgi' : '--hvr-bgi';
|
|
218
|
+
bgrStyle[cssVar] = color;
|
|
219
|
+
}
|
|
224
220
|
return bgrStyle;
|
|
225
221
|
};
|
|
226
222
|
const getGradientBgrStyleByDevice = (backgroundStyle, ignoreBackgroundImage)=>{
|
|
@@ -207,18 +207,14 @@ const GRADIENT_BGR_KEY = 'linear-gradient';
|
|
|
207
207
|
const getGradientBgrStyleForButton = (backgroundStyle)=>{
|
|
208
208
|
if (!backgroundStyle) return;
|
|
209
209
|
const bgrStyle = {};
|
|
210
|
-
Object.keys(backgroundStyle)
|
|
211
|
-
|
|
212
|
-
if
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
'--hvr-bg': backgroundStyle[state]
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
});
|
|
210
|
+
for (const state of Object.keys(backgroundStyle)){
|
|
211
|
+
const color = backgroundStyle[state];
|
|
212
|
+
// Skip if not a gradient
|
|
213
|
+
if (!color?.startsWith(GRADIENT_BGR_KEY)) continue;
|
|
214
|
+
// Set normal or hover gradient
|
|
215
|
+
const cssVar = state === 'normal' ? '--bgi' : '--hvr-bgi';
|
|
216
|
+
bgrStyle[cssVar] = color;
|
|
217
|
+
}
|
|
222
218
|
return bgrStyle;
|
|
223
219
|
};
|
|
224
220
|
const getGradientBgrStyleByDevice = (backgroundStyle, ignoreBackgroundImage)=>{
|
package/dist/types/index.d.ts
CHANGED
|
@@ -37370,7 +37370,7 @@ type Mapped<K, T> = NonNullable<T> extends ObjectDevices<infer U> ? {
|
|
|
37370
37370
|
placeholder?: string;
|
|
37371
37371
|
type: 'layout-selector';
|
|
37372
37372
|
itemPerRow?: number;
|
|
37373
|
-
popoverLabel?: string;
|
|
37373
|
+
popoverLabel?: LabelWithLang | string;
|
|
37374
37374
|
itemSpacing?: 'large' | 'small';
|
|
37375
37375
|
options?: Option<T>[];
|
|
37376
37376
|
groups?: {
|
|
@@ -37686,7 +37686,7 @@ declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) =>
|
|
|
37686
37686
|
};
|
|
37687
37687
|
} | undefined;
|
|
37688
37688
|
declare const GRADIENT_BGR_KEY = "linear-gradient";
|
|
37689
|
-
declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) =>
|
|
37689
|
+
declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => Record<string, string> | undefined;
|
|
37690
37690
|
declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devices, Background>> | undefined, ignoreBackgroundImage?: Record<Devices, boolean>) => {} | undefined;
|
|
37691
37691
|
declare const getBgByDevice: (data: {
|
|
37692
37692
|
backgroundColor: Partial<Record<Devices, string>> | undefined;
|