@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.
@@ -0,0 +1 @@
1
+ @forward './overlay-with-slider-fade';
@@ -0,0 +1,7 @@
1
+ @use '~@mezzanine-ui/system/palette';
2
+ @use '~@mezzanine-ui/system/z-index';
3
+ @use './overlay-with-slide-fade' as *;
4
+
5
+ .#{$prefix} {
6
+ overflow: hidden;
7
+ }
@@ -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';
@@ -0,0 +1,4 @@
1
+ export declare const overlayWithSlideFadePrefix = "mzn-overlay-with-slide-fade";
2
+ export declare const overlayWithSlideFadeClasses: {
3
+ readonly host: "mzn-overlay-with-slide-fade";
4
+ };
@@ -0,0 +1,6 @@
1
+ const overlayWithSlideFadePrefix = 'mzn-overlay-with-slide-fade';
2
+ const overlayWithSlideFadeClasses = {
3
+ host: overlayWithSlideFadePrefix,
4
+ };
5
+
6
+ export { overlayWithSlideFadeClasses, overlayWithSlideFadePrefix };
@@ -15,8 +15,6 @@ $positions: top, right, bottom, left;
15
15
  }
16
16
 
17
17
  &__overlay {
18
- display: relative;
19
- overflow: hidden;
20
18
  z-index: z-index.get(drawer);
21
19
  }
22
20
 
@@ -25,4 +25,8 @@ $spin-keyframes-name: #{$prefix}-spin !default;
25
25
  &--spin {
26
26
  animation: #{$spin-keyframes-name} 500ms infinite linear;
27
27
  }
28
+
29
+ &--size {
30
+ font-size: var(--#{$prefix}-size);
31
+ }
28
32
  }
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
- if (!color) {
13
- return {};
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
- let colorValue;
16
- if (color === 'inherit') {
17
- colorValue = color;
34
+ /** size mapping */
35
+ if (typeof size !== 'undefined') {
36
+ result = {
37
+ ...result,
38
+ [`--${iconPrefix}-size`]: `${size}px`,
39
+ };
18
40
  }
19
- else {
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/core",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Core for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {