@mezzanine-ui/core 0.7.1 → 0.7.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/_internal/overlay-with-slide-fade/_index.scss +1 -0
- package/_internal/overlay-with-slide-fade/_overlay-with-slide-fade-styles.scss +7 -0
- package/_internal/overlay-with-slide-fade/_overlay-with-slider-fade.scss +1 -0
- package/_internal/overlay-with-slide-fade/index.d.ts +1 -0
- package/_internal/overlay-with-slide-fade/index.js +1 -0
- package/_internal/overlay-with-slide-fade/overlayWithSlideFade.d.ts +4 -0
- package/_internal/overlay-with-slide-fade/overlayWithSlideFade.js +6 -0
- package/drawer/_drawer-styles.scss +0 -2
- package/icon/_icon-styles.scss +4 -0
- package/icon/icon.d.ts +2 -0
- package/icon/icon.js +29 -18
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './overlay-with-slider-fade';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$prefix: mzn-overlay-with-slide-fade;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './overlayWithSlideFade';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { overlayWithSlideFadeClasses, overlayWithSlideFadePrefix } from './overlayWithSlideFade.js';
|
package/icon/_icon-styles.scss
CHANGED
package/icon/icon.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ import { MainColor } from '@mezzanine-ui/system/palette';
|
|
|
3
3
|
export declare type IconColor = 'inherit' | MainColor | 'disabled';
|
|
4
4
|
export interface IconCssVars {
|
|
5
5
|
color?: IconColor;
|
|
6
|
+
size?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const iconPrefix = "mzn-icon";
|
|
8
9
|
export declare const iconClasses: {
|
|
9
10
|
readonly host: "mzn-icon";
|
|
10
11
|
readonly color: "mzn-icon--color";
|
|
11
12
|
readonly spin: "mzn-icon--spin";
|
|
13
|
+
readonly size: "mzn-icon--size";
|
|
12
14
|
};
|
|
13
15
|
export declare function toIconCssVars(variables: IconCssVars): CssVarInterpolations;
|
package/icon/icon.js
CHANGED
|
@@ -6,28 +6,39 @@ const iconClasses = {
|
|
|
6
6
|
host: iconPrefix,
|
|
7
7
|
color: `${iconPrefix}--color`,
|
|
8
8
|
spin: `${iconPrefix}--spin`,
|
|
9
|
+
size: `${iconPrefix}--size`,
|
|
9
10
|
};
|
|
10
11
|
function toIconCssVars(variables) {
|
|
11
|
-
const { color } = variables;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const { color, size } = variables;
|
|
13
|
+
let result = {};
|
|
14
|
+
/** color mapping */
|
|
15
|
+
if (color) {
|
|
16
|
+
let colorValue;
|
|
17
|
+
if (color === 'inherit') {
|
|
18
|
+
colorValue = color;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
/**
|
|
22
|
+
* Use `action-disabled` color of palette as `disabled` color of icon.
|
|
23
|
+
*/
|
|
24
|
+
const colorName = color === 'disabled'
|
|
25
|
+
? 'action-disabled'
|
|
26
|
+
: color;
|
|
27
|
+
colorValue = toCssVar(`${palettePrefix}-${colorName}`);
|
|
28
|
+
}
|
|
29
|
+
result = {
|
|
30
|
+
...result,
|
|
31
|
+
[`--${iconPrefix}-color`]: colorValue,
|
|
32
|
+
};
|
|
14
33
|
}
|
|
15
|
-
|
|
16
|
-
if (
|
|
17
|
-
|
|
34
|
+
/** size mapping */
|
|
35
|
+
if (typeof size !== 'undefined') {
|
|
36
|
+
result = {
|
|
37
|
+
...result,
|
|
38
|
+
[`--${iconPrefix}-size`]: `${size}px`,
|
|
39
|
+
};
|
|
18
40
|
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Use `action-disabled` color of palette as `disabled` color of icon.
|
|
22
|
-
*/
|
|
23
|
-
const colorName = color === 'disabled'
|
|
24
|
-
? 'action-disabled'
|
|
25
|
-
: color;
|
|
26
|
-
colorValue = toCssVar(`${palettePrefix}-${colorName}`);
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
[`--${iconPrefix}-color`]: colorValue,
|
|
30
|
-
};
|
|
41
|
+
return result;
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
export { iconClasses, iconPrefix, toIconCssVars };
|