@mezzanine-ui/system 1.0.0-canary.2 → 1.0.0-canary.3
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/motion/_motion.scss +47 -11
- package/motion/duration.d.ts +1 -1
- package/motion/duration.js +6 -5
- package/motion/easing.d.ts +1 -1
- package/motion/easing.js +3 -4
- package/package.json +1 -1
- package/spacing/_semantic.scss +2 -2
- package/transition/_transition.scss +25 -9
- package/typography/SF-Mono/SFMonoMedium.woff +0 -0
- package/typography/SF-Mono/SFMonoRegular.woff +0 -0
- package/typography/SF-Mono/SFMonoSemibold.woff +0 -0
- package/typography/_semantic.scss +2 -2
- package/typography/_sf-mono.scss +4 -3
- package/z-index/_z-index.scss +1 -1
- package/typography/SF-Mono/SF-Mono-Medium.otf +0 -0
- package/typography/SF-Mono/SF-Mono-Regular.otf +0 -0
- package/typography/SF-Mono/SF-Mono-Semibold.otf +0 -0
package/motion/_motion.scss
CHANGED
|
@@ -3,21 +3,37 @@
|
|
|
3
3
|
|
|
4
4
|
$prefix: mzn-motion;
|
|
5
5
|
|
|
6
|
-
$duration-names: (
|
|
6
|
+
$duration-names: (fast, moderate, slow, loop, pause-short, pause-long);
|
|
7
7
|
$default-durations: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
fast: 150ms,
|
|
9
|
+
moderate: 250ms,
|
|
10
|
+
slow: 400ms,
|
|
11
|
+
loop: 1600ms,
|
|
12
|
+
pause-short: 3000ms,
|
|
13
|
+
pause-long: 10000ms,
|
|
13
14
|
);
|
|
14
15
|
|
|
15
|
-
$easing-names: (
|
|
16
|
+
$easing-names: (entrance, exit, standard);
|
|
16
17
|
$default-easings: (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
entrance: cubic-bezier(0.0, 0.0, 0.58, 1),
|
|
19
|
+
exit: cubic-bezier(0.42, 0.0, 1, 1),
|
|
20
|
+
standard: cubic-bezier(0.4, 0.0, 0.2, 1),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
$pattern-names: (breathe, skeleton-loading, spin);
|
|
24
|
+
$default-pattern: (
|
|
25
|
+
breathe: (
|
|
26
|
+
duration: loop,
|
|
27
|
+
easing: standard,
|
|
28
|
+
),
|
|
29
|
+
skeleton-loading: (
|
|
30
|
+
duration: loop,
|
|
31
|
+
easing: standard,
|
|
32
|
+
),
|
|
33
|
+
spin: (
|
|
34
|
+
duration: loop,
|
|
35
|
+
easing: entrance,
|
|
36
|
+
),
|
|
21
37
|
);
|
|
22
38
|
|
|
23
39
|
$default-options: (
|
|
@@ -33,6 +49,10 @@ $default-options: (
|
|
|
33
49
|
@return list.includes($easing-names, $easing-name);
|
|
34
50
|
}
|
|
35
51
|
|
|
52
|
+
@function is-pattern-name-valid($pattern-name) {
|
|
53
|
+
@return list.includes($pattern-names, $pattern-name);
|
|
54
|
+
}
|
|
55
|
+
|
|
36
56
|
@function duration($duration-name) {
|
|
37
57
|
@if not is-duration-name-valid($duration-name) {
|
|
38
58
|
@error 'Invalid duration name #{$duration-name}. Please choose one of #{$duration-names}';
|
|
@@ -62,3 +82,19 @@ $default-options: (
|
|
|
62
82
|
--#{$prefix}-easing-#{$name}: #{$value};
|
|
63
83
|
}
|
|
64
84
|
}
|
|
85
|
+
|
|
86
|
+
@mixin pattern($pattern-name, $action-name: animation) {
|
|
87
|
+
@if not is-pattern-name-valid($pattern-name) {
|
|
88
|
+
@error 'Invalid pattern name #{$pattern-name}. Please choose one of #{$pattern-names}';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
$pattern: map.get($default-pattern, $pattern-name);
|
|
92
|
+
|
|
93
|
+
@if $pattern {
|
|
94
|
+
$duration-name: map.get($pattern, duration);
|
|
95
|
+
$easing-name: map.get($pattern, easing);
|
|
96
|
+
|
|
97
|
+
#{$action-name}-duration: duration($duration-name);
|
|
98
|
+
#{$action-name}-timing-function: easing($easing-name);
|
|
99
|
+
}
|
|
100
|
+
}
|
package/motion/duration.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type MotionDurationType = '
|
|
1
|
+
export type MotionDurationType = 'fast' | 'moderate' | 'slow' | 'loop' | 'pauseShort' | 'pauseLong';
|
|
2
2
|
export declare const MOTION_DURATION: Readonly<Record<MotionDurationType, number>>;
|
package/motion/duration.js
CHANGED
package/motion/easing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type MotionEasingType = '
|
|
1
|
+
export type MotionEasingType = 'entrance' | 'exit' | 'standard';
|
|
2
2
|
export declare const MOTION_EASING: Readonly<Record<MotionEasingType, string>>;
|
package/motion/easing.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const MOTION_EASING = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
accelerated: 'cubic-bezier(0.32, 0, 0.67, 0)',
|
|
2
|
+
entrance: 'cubic-bezier(0, 0, 0.58, 1)',
|
|
3
|
+
exit: 'cubic-bezier(0.42, 0, 1, 1)',
|
|
4
|
+
standard: 'cubic-bezier(0.4, 0.0, 0.2, 1)',
|
|
6
5
|
};
|
|
7
6
|
|
|
8
7
|
export { MOTION_EASING };
|
package/package.json
CHANGED
package/spacing/_semantic.scss
CHANGED
|
@@ -354,8 +354,8 @@ $semantic-spacings: (
|
|
|
354
354
|
compact: primitive.variable(40),
|
|
355
355
|
),
|
|
356
356
|
ultra: (
|
|
357
|
-
default: primitive.variable(
|
|
358
|
-
compact: primitive.variable(
|
|
357
|
+
default: primitive.variable(64),
|
|
358
|
+
compact: primitive.variable(56),
|
|
359
359
|
),
|
|
360
360
|
),
|
|
361
361
|
vertical: (
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
+
@use 'sass:meta';
|
|
2
|
+
@use 'sass:string';
|
|
1
3
|
@use '../motion';
|
|
2
4
|
|
|
3
|
-
@function
|
|
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
11
|
|
|
7
|
-
@
|
|
8
|
-
@return $property $duration motion.easing(accelerated) $delay;
|
|
12
|
+
@return $property $duration-value motion.easing(entrance) $delay;
|
|
9
13
|
}
|
|
10
14
|
|
|
11
|
-
@function
|
|
12
|
-
|
|
15
|
+
@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
|
+
);
|
|
21
|
+
|
|
22
|
+
@return $property $duration-value motion.easing(exit) $delay;
|
|
13
23
|
}
|
|
14
24
|
|
|
15
|
-
@function standard($property, $duration:
|
|
16
|
-
|
|
25
|
+
@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
|
+
);
|
|
31
|
+
|
|
32
|
+
@return $property $duration-value motion.easing(standard) $delay;
|
|
17
33
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -133,14 +133,14 @@ $semantic-typographies: (
|
|
|
133
133
|
),
|
|
134
134
|
input: (
|
|
135
135
|
font-size: primitive.font-size-variable(14),
|
|
136
|
-
font-weight: primitive.font-weight-variable(
|
|
136
|
+
font-weight: primitive.font-weight-variable(regular),
|
|
137
137
|
line-height: primitive.line-height-variable(functional),
|
|
138
138
|
letter-spacing: primitive.letter-spacing-variable(0),
|
|
139
139
|
),
|
|
140
140
|
input-mono: (
|
|
141
141
|
font-family: primitive.font-family-variable(sfmono),
|
|
142
142
|
font-size: primitive.font-size-variable(14),
|
|
143
|
-
font-weight: primitive.font-weight-variable(
|
|
143
|
+
font-weight: primitive.font-weight-variable(regular),
|
|
144
144
|
line-height: primitive.line-height-variable(functional),
|
|
145
145
|
letter-spacing: primitive.letter-spacing-variable(0),
|
|
146
146
|
),
|
package/typography/_sf-mono.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SF Mono is a monospaced font designed by Apple.
|
|
5
5
|
* This file provides @font-face declarations to load SF Mono from file.
|
|
6
|
+
* download link: https://www.cufonfonts.com/font/sf-mono
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
/* SF Mono Regular (400) */
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
font-style: normal;
|
|
12
13
|
font-weight: 400;
|
|
13
14
|
font-display: swap;
|
|
14
|
-
src: url('~@mezzanine-ui/system/typography/SF-Mono/
|
|
15
|
+
src: url('~@mezzanine-ui/system/typography/SF-Mono/SFMonoRegular.woff') format('woff');
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
/* SF Mono Medium (500) */
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
font-style: normal;
|
|
21
22
|
font-weight: 500;
|
|
22
23
|
font-display: swap;
|
|
23
|
-
src: url('~@mezzanine-ui/system/typography/SF-Mono/
|
|
24
|
+
src: url('~@mezzanine-ui/system/typography/SF-Mono/SFMonoMedium.woff') format('woff');
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/* SF Mono Semibold (600) */
|
|
@@ -29,5 +30,5 @@
|
|
|
29
30
|
font-style: normal;
|
|
30
31
|
font-weight: 600;
|
|
31
32
|
font-display: swap;
|
|
32
|
-
src: url('~@mezzanine-ui/system/typography/SF-Mono/
|
|
33
|
+
src: url('~@mezzanine-ui/system/typography/SF-Mono/SFMonoSemibold.woff') format('woff');
|
|
33
34
|
}
|
package/z-index/_z-index.scss
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|