@carbon/motion 10.13.0-rc.0 → 10.15.0

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/README.md CHANGED
@@ -69,12 +69,6 @@ import { easings, motion } from '@carbon/motion';
69
69
  motion('standard', 'productive'); // Returns a string `cubic-bezier()` function
70
70
  ```
71
71
 
72
- ## 📖 API Documentation
73
-
74
- If you're looking for `@carbon/motion` API documentation, check out:
75
-
76
- - [Sass](./docs/sass.md)
77
-
78
72
  ## 🙌 Contributing
79
73
 
80
74
  We're always looking for contributors to help us fix bugs, build new features,
package/es/index.js CHANGED
@@ -4,6 +4,13 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ var fast01 = '70ms';
8
+ var fast02 = '110ms';
9
+ var moderate01 = '150ms';
10
+ var moderate02 = '240ms';
11
+ var slow01 = '400ms';
12
+ var slow02 = '700ms';
13
+ var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02'];
7
14
  var easings = {
8
15
  standard: {
9
16
  productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
@@ -32,4 +39,4 @@ function motion(name, mode) {
32
39
  return easing[mode];
33
40
  }
34
41
 
35
- export { easings, motion };
42
+ export { easings, fast01, fast02, moderate01, moderate02, motion, slow01, slow02, unstable_tokens };
package/lib/index.js CHANGED
@@ -8,6 +8,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
8
8
  * This source code is licensed under the Apache-2.0 license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
+ var fast01 = '70ms';
12
+ var fast02 = '110ms';
13
+ var moderate01 = '150ms';
14
+ var moderate02 = '240ms';
15
+ var slow01 = '400ms';
16
+ var slow02 = '700ms';
17
+ var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02'];
11
18
  var easings = {
12
19
  standard: {
13
20
  productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
@@ -37,4 +44,11 @@ function motion(name, mode) {
37
44
  }
38
45
 
39
46
  exports.easings = easings;
47
+ exports.fast01 = fast01;
48
+ exports.fast02 = fast02;
49
+ exports.moderate01 = moderate01;
50
+ exports.moderate02 = moderate02;
40
51
  exports.motion = motion;
52
+ exports.slow01 = slow01;
53
+ exports.slow02 = slow02;
54
+ exports.unstable_tokens = unstable_tokens;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/motion",
3
3
  "description": "Motion helpers for digital and software products using the Carbon Design System",
4
- "version": "10.13.0-rc.0",
4
+ "version": "10.15.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -25,11 +25,11 @@
25
25
  "access": "public"
26
26
  },
27
27
  "scripts": {
28
- "build": "yarn clean && carbon-cli bundle src/index.js --name CarbonMotion && carbon-cli sassdoc \"scss/*.scss\"",
28
+ "build": "yarn clean && carbon-cli bundle src/index.js --name CarbonMotion",
29
29
  "clean": "rimraf es lib umd"
30
30
  },
31
31
  "devDependencies": {
32
- "@carbon/cli": "^10.19.0-rc.0",
32
+ "@carbon/cli": "^10.21.0",
33
33
  "rimraf": "^3.0.0"
34
34
  },
35
35
  "eyeglass": {
@@ -38,5 +38,5 @@
38
38
  "sassDir": "scss",
39
39
  "needs": "^1.3.0"
40
40
  },
41
- "gitHead": "f20d953bfdd69fd024f2b202fd7e62f3139d431c"
41
+ "gitHead": "9d5ddba624d9cc7afe54717fd430228349c043e3"
42
42
  }
package/scss/motion.scss CHANGED
@@ -5,6 +5,30 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ /// @access public
9
+ /// @group @carbon/motion
10
+ $fast-01: 70ms !default;
11
+
12
+ /// @access public
13
+ /// @group @carbon/motion
14
+ $fast-02: 110ms !default;
15
+
16
+ /// @access public
17
+ /// @group @carbon/motion
18
+ $moderate-01: 150ms !default;
19
+
20
+ /// @access public
21
+ /// @group @carbon/motion
22
+ $moderate-02: 240ms !default;
23
+
24
+ /// @access public
25
+ /// @group @carbon/motion
26
+ $slow-01: 400ms !default;
27
+
28
+ /// @access public
29
+ /// @group @carbon/motion
30
+ $slow-02: 700ms !default;
31
+
8
32
  /// Common component easings
9
33
  /// @type Map
10
34
  /// @access public
package/src/index.js CHANGED
@@ -5,6 +5,22 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ export const fast01 = '70ms';
9
+ export const fast02 = '110ms';
10
+ export const moderate01 = '150ms';
11
+ export const moderate02 = '240ms';
12
+ export const slow01 = '400ms';
13
+ export const slow02 = '700ms';
14
+
15
+ export const unstable_tokens = [
16
+ 'fast01',
17
+ 'fast02',
18
+ 'moderate01',
19
+ 'moderate02',
20
+ 'slow01',
21
+ 'slow02',
22
+ ];
23
+
8
24
  export const easings = {
9
25
  standard: {
10
26
  productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
package/umd/index.js CHANGED
@@ -10,6 +10,13 @@
10
10
  * This source code is licensed under the Apache-2.0 license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
+ var fast01 = '70ms';
14
+ var fast02 = '110ms';
15
+ var moderate01 = '150ms';
16
+ var moderate02 = '240ms';
17
+ var slow01 = '400ms';
18
+ var slow02 = '700ms';
19
+ var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02'];
13
20
  var easings = {
14
21
  standard: {
15
22
  productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
@@ -39,7 +46,14 @@
39
46
  }
40
47
 
41
48
  exports.easings = easings;
49
+ exports.fast01 = fast01;
50
+ exports.fast02 = fast02;
51
+ exports.moderate01 = moderate01;
52
+ exports.moderate02 = moderate02;
42
53
  exports.motion = motion;
54
+ exports.slow01 = slow01;
55
+ exports.slow02 = slow02;
56
+ exports.unstable_tokens = unstable_tokens;
43
57
 
44
58
  Object.defineProperty(exports, '__esModule', { value: true });
45
59
 
package/docs/sass.md DELETED
@@ -1,110 +0,0 @@
1
- # Sass API
2
-
3
- | Mark | Description |
4
- | ---- | ---------------------------------------------------------- |
5
- | ✅ | Public functions, mixins, placeholders, and variables |
6
- | ❌ | Private items - not supported outside package's build |
7
- | ⚠️ | Deprecated items - may not be available in future releases |
8
-
9
- <!-- toc -->
10
-
11
- - [@carbon/motion](#carbonmotion)
12
- - [✅carbon--easings [variable]](#carbon--easings-variable)
13
- - [✅carbon--motion [function]](#carbon--motion-function)
14
- - [✅carbon--motion [mixin]](#carbon--motion-mixin)
15
-
16
- <!-- tocstop -->
17
-
18
- ## @carbon/motion
19
-
20
- ### ✅carbon--easings [variable]
21
-
22
- Common component easings
23
-
24
- <details>
25
- <summary>Source code</summary>
26
-
27
- ```scss
28
- $carbon--easings: (
29
- standard: (
30
- productive: cubic-bezier(0.2, 0, 0.38, 0.9),
31
- expressive: cubic-bezier(0.4, 0.14, 0.3, 1),
32
- ),
33
- entrance: (
34
- productive: cubic-bezier(0, 0, 0.38, 0.9),
35
- expressive: cubic-bezier(0, 0, 0.3, 1),
36
- ),
37
- exit: (
38
- productive: cubic-bezier(0.2, 0, 1, 0.9),
39
- expressive: cubic-bezier(0.4, 0.14, 1, 1),
40
- ),
41
- );
42
- ```
43
-
44
- </details>
45
-
46
- - **Group**: [@carbon/motion](#carbonmotion)
47
- - **Type**: `Map`
48
-
49
- ### ✅carbon--motion [function]
50
-
51
- Get the transition-timing-function for a given easing and motion mode
52
-
53
- <details>
54
- <summary>Source code</summary>
55
-
56
- ```scss
57
- @function carbon--motion($name, $mode: productive, $easings: $carbon--easings) {
58
- @if map-has-key($easings, $name) {
59
- $easing: map-get($easings, $name);
60
- @if map-has-key($easing, $mode) {
61
- @return map-get($easing, $mode);
62
- } @else {
63
- @error 'Unable to find a mode for the easing #{$easing} called: #{$mode}.';
64
- }
65
- } @else {
66
- @error 'Unable to find an easing named #{$name} in our supported easings.';
67
- }
68
- }
69
- ```
70
-
71
- </details>
72
-
73
- - **Parameters**:
74
-
75
- | Name | Description | Type | Default value |
76
- | ---------- | ---------------------------------------- | -------- | ------------------ |
77
- | `$name` | Can be `standard`, `entrance`, or `exit` | `String` | — |
78
- | `$mode` | Can be `productive` or `expressive` | `String` | `productive` |
79
- | `$easings` | Easings map | `Map` | `$carbon--easings` |
80
-
81
- - **Group**: [@carbon/motion](#carbonmotion)
82
- - **Returns**: `Function` CSS `cubic-bezier()` function
83
- - **Used by**:
84
- - [carbon--motion [mixin]](#carbon--motion-mixin)
85
-
86
- ### ✅carbon--motion [mixin]
87
-
88
- Set the transition-timing-function for a given easing and motion mode
89
-
90
- <details>
91
- <summary>Source code</summary>
92
-
93
- ```scss
94
- @mixin carbon--motion($name, $mode) {
95
- transition-timing-function: carbon--motion($name, $mode);
96
- }
97
- ```
98
-
99
- </details>
100
-
101
- - **Parameters**:
102
-
103
- | Name | Description | Type | Default value |
104
- | ------- | ------------------------------------- | -------- | ------------- |
105
- | `$name` | The name of the easing curve to apply | `String` | — |
106
- | `$mode` | The mode for the easing curve to use | `String` | — |
107
-
108
- - **Group**: [@carbon/motion](#carbonmotion)
109
- - **Requires**:
110
- - [carbon--motion [function]](#carbon--motion-function)