@mezzanine-ui/system 1.0.0-rc.0 → 1.0.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/system",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
4
4
  "description": "Design System for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -47,6 +47,7 @@ $primitive-scales: (
47
47
  140,
48
48
  160,
49
49
  240,
50
+ 280,
50
51
  320,
51
52
  360,
52
53
  400,
@@ -101,6 +102,7 @@ $default-primitives: (
101
102
  140: 140px,
102
103
  160: 160px,
103
104
  240: 240px,
105
+ 280: 280px,
104
106
  320: 320px,
105
107
  360: 360px,
106
108
  400: 400px,
@@ -53,6 +53,7 @@ $container-tones: (
53
53
  snug,
54
54
  tight,
55
55
  slim,
56
+ slender,
56
57
  narrow,
57
58
  compact,
58
59
  standard,
@@ -280,6 +281,10 @@ $semantic-spacings: (
280
281
  default: primitive.variable(240),
281
282
  compact: primitive.variable(240),
282
283
  ),
284
+ slender: (
285
+ default: primitive.variable(280),
286
+ compact: primitive.variable(280),
287
+ ),
283
288
  narrow: (
284
289
  default: primitive.variable(320),
285
290
  compact: primitive.variable(320),
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Spacing primitive scales - 間距原始級距(對應 px 值)
3
3
  */
4
- export type SpacingScale = 0 | 1 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 52 | 56 | 60 | 64 | 80 | 160 | 240 | 320 | 360 | 400 | 480 | 560 | 640 | 720 | 960 | 1140;
4
+ export type SpacingScale = 0 | 1 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 52 | 56 | 60 | 64 | 80 | 160 | 240 | 280 | 320 | 360 | 400 | 480 | 560 | 640 | 720 | 960 | 1140;
5
5
  /**
6
6
  * Spacing primitives configuration
7
7
  */
@@ -29,7 +29,7 @@ export type ElementTone = 'hairline' | 'tiny' | 'tight' | 'compact' | 'slim' | '
29
29
  /**
30
30
  * Container size tones - 容器尺寸調性
31
31
  */
32
- export type ContainerTone = 'collapsed' | 'tiny' | 'tight' | 'slim' | 'narrow' | 'compact' | 'standard' | 'balanced' | 'broad' | 'wide' | 'expanded' | 'max';
32
+ export type ContainerTone = 'collapsed' | 'tiny' | 'tight' | 'slim' | 'slender' | 'narrow' | 'compact' | 'standard' | 'balanced' | 'broad' | 'wide' | 'expanded' | 'max';
33
33
  /**
34
34
  * Gap tones - 間隙調性
35
35
  */
@@ -3,31 +3,37 @@
3
3
  @use '../motion';
4
4
 
5
5
  @function entrance($property, $duration: moderate, $delay: 0ms) {
6
- $duration-value: if(
7
- meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') != null,
8
- $duration,
9
- motion.duration($duration)
10
- );
6
+ $duration-value: null;
7
+
8
+ @if meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') {
9
+ $duration-value: $duration;
10
+ } @else {
11
+ $duration-value: motion.duration($duration);
12
+ }
11
13
 
12
14
  @return $property $duration-value motion.easing(entrance) $delay;
13
15
  }
14
16
 
15
17
  @function exit($property, $duration: moderate, $delay: 0ms) {
16
- $duration-value: if(
17
- meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') != null,
18
- $duration,
19
- motion.duration($duration)
20
- );
18
+ $duration-value: null;
19
+
20
+ @if meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') {
21
+ $duration-value: $duration;
22
+ } @else {
23
+ $duration-value: motion.duration($duration);
24
+ }
21
25
 
22
26
  @return $property $duration-value motion.easing(exit) $delay;
23
27
  }
24
28
 
25
29
  @function standard($property, $duration: moderate, $delay: 0ms) {
26
- $duration-value: if(
27
- meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') != null,
28
- $duration,
29
- motion.duration($duration)
30
- );
30
+ $duration-value: null;
31
+
32
+ @if meta.type-of($duration) == number or string.index(meta.inspect($duration), 'calc') {
33
+ $duration-value: $duration;
34
+ } @else {
35
+ $duration-value: motion.duration($duration);
36
+ }
31
37
 
32
38
  @return $property $duration-value motion.easing(standard) $delay;
33
39
  }
@@ -24,6 +24,7 @@ $semantic-types: (
24
24
  button-highlight,
25
25
  input,
26
26
  input-mono,
27
+ input-highlight,
27
28
  label-primary,
28
29
  label-primary-highlight,
29
30
  label-secondary
@@ -152,6 +153,12 @@ $semantic-typographies: (
152
153
  line-height: primitive.line-height-variable(functional),
153
154
  letter-spacing: primitive.letter-spacing-variable(0),
154
155
  ),
156
+ input-highlight: (
157
+ font-size: primitive.font-size-variable(14),
158
+ font-weight: primitive.font-weight-variable(medium),
159
+ line-height: primitive.line-height-variable(functional),
160
+ letter-spacing: primitive.letter-spacing-variable(0),
161
+ ),
155
162
  label-primary: (
156
163
  font-size: primitive.font-size-variable(14),
157
164
  font-weight: primitive.font-weight-variable(regular),
@@ -3,7 +3,7 @@ export type TypographyPrimitiveFontWeight = 'regular' | 'medium' | 'semibold';
3
3
  export type TypographyPrimitiveFontSize = 24 | 18 | 16 | 14 | 12 | 10;
4
4
  export type TypographyPrimitiveLineHeight = 'h1' | 'h2' | 'h3' | 'body' | 'caption' | 'annotation' | 'functional';
5
5
  export type TypographyPrimitiveLetterSpacing = 0;
6
- export type TypographySemanticType = 'h1' | 'h2' | 'h3' | 'body' | 'body-highlight' | 'body-mono' | 'body-mono-highlight' | 'text-link-body' | 'text-link-caption' | 'caption' | 'caption-highlight' | 'annotation' | 'annotation-highlight' | 'button' | 'button-highlight' | 'input' | 'input-mono' | 'label-primary' | 'label-primary-highlight' | 'label-secondary';
6
+ export type TypographySemanticType = 'h1' | 'h2' | 'h3' | 'body' | 'body-highlight' | 'body-mono' | 'body-mono-highlight' | 'text-link-body' | 'text-link-caption' | 'caption' | 'caption-highlight' | 'annotation' | 'annotation-highlight' | 'button' | 'button-highlight' | 'input' | 'input-mono' | 'input-highlight' | 'label-primary' | 'label-primary-highlight' | 'label-secondary';
7
7
  export type TypographySemanticProp = 'font-family' | 'font-size' | 'font-weight' | 'line-height' | 'letter-spacing';
8
8
  export declare const typographyPrimitivePrefix = "mzn-typography-primitive";
9
9
  export declare const typographySemanticPrefix = "mzn-typography";
package/utils/_list.scss CHANGED
@@ -12,11 +12,14 @@
12
12
 
13
13
  @function flat-push($list, $values...) {
14
14
  @each $value in $values {
15
- $pusher: if(
16
- meta.type-of($value) == list,
17
- meta.get-function('join', $module: list),
18
- meta.get-function('append', $module: list)
19
- );
15
+ $pusher: null;
16
+
17
+ @if meta.type-of($value) == list {
18
+ $pusher: meta.get-function('join', $module: list);
19
+ } @else {
20
+ $pusher: meta.get-function('append', $module: list);
21
+ }
22
+
20
23
  $list: meta.call($pusher, $list, $value);
21
24
  }
22
25