@carbon/motion 11.41.0 → 11.43.0-rc.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/es/index.js CHANGED
@@ -1,47 +1,56 @@
1
+ //#region src/index.js
1
2
  /**
2
- * Copyright IBM Corp. 2018, 2023
3
- *
4
- * This source code is licensed under the Apache-2.0 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- var fast01 = '70ms';
9
- var fast02 = '110ms';
10
- var moderate01 = '150ms';
11
- var moderate02 = '240ms';
12
- var slow01 = '400ms';
13
- var slow02 = '700ms';
14
- // V11 Tokens
15
- var durationFast01 = fast01;
16
- var durationFast02 = fast02;
17
- var durationModerate01 = moderate01;
18
- var durationModerate02 = moderate02;
19
- var durationSlow01 = slow01;
20
- var durationSlow02 = slow02;
21
- var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02', 'durationFast01', 'durationFast02', 'durationModerate01', 'durationModerate02', 'durationSlow01', 'durationSlow02'];
22
- var easings = {
23
- standard: {
24
- productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
25
- expressive: 'cubic-bezier(0.4, 0.14, 0.3, 1)'
26
- },
27
- entrance: {
28
- productive: 'cubic-bezier(0, 0, 0.38, 0.9)',
29
- expressive: 'cubic-bezier(0, 0, 0.3, 1)'
30
- },
31
- exit: {
32
- productive: 'cubic-bezier(0.2, 0, 1, 0.9)',
33
- expressive: 'cubic-bezier(0.4, 0.14, 1, 1)'
34
- }
3
+ * Copyright IBM Corp. 2018, 2023
4
+ *
5
+ * This source code is licensed under the Apache-2.0 license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ const fast01 = "70ms";
9
+ const fast02 = "110ms";
10
+ const moderate01 = "150ms";
11
+ const moderate02 = "240ms";
12
+ const slow01 = "400ms";
13
+ const slow02 = "700ms";
14
+ const durationFast01 = fast01;
15
+ const durationFast02 = fast02;
16
+ const durationModerate01 = moderate01;
17
+ const durationModerate02 = moderate02;
18
+ const durationSlow01 = slow01;
19
+ const durationSlow02 = slow02;
20
+ const unstable_tokens = [
21
+ "fast01",
22
+ "fast02",
23
+ "moderate01",
24
+ "moderate02",
25
+ "slow01",
26
+ "slow02",
27
+ "durationFast01",
28
+ "durationFast02",
29
+ "durationModerate01",
30
+ "durationModerate02",
31
+ "durationSlow01",
32
+ "durationSlow02"
33
+ ];
34
+ const easings = {
35
+ standard: {
36
+ productive: "cubic-bezier(0.2, 0, 0.38, 0.9)",
37
+ expressive: "cubic-bezier(0.4, 0.14, 0.3, 1)"
38
+ },
39
+ entrance: {
40
+ productive: "cubic-bezier(0, 0, 0.38, 0.9)",
41
+ expressive: "cubic-bezier(0, 0, 0.3, 1)"
42
+ },
43
+ exit: {
44
+ productive: "cubic-bezier(0.2, 0, 1, 0.9)",
45
+ expressive: "cubic-bezier(0.4, 0.14, 1, 1)"
46
+ }
35
47
  };
36
48
  function motion(name, mode) {
37
- if (!easings[name]) {
38
- throw new Error("Unable to find easing `".concat(name, "` in our supported easings. Expected ") + "One of: ".concat(Object.keys(easings).join(', ')));
39
- }
40
- var easing = easings[name];
41
- if (!easing[mode]) {
42
- throw new Error("Unable to find a mode for the easing `".concat(name, "` called: `").concat(mode, "`"));
43
- }
44
- return easing[mode];
49
+ if (!easings[name]) throw new Error(`Unable to find easing \`${name}\` in our supported easings. Expected One of: ${Object.keys(easings).join(", ")}`);
50
+ const easing = easings[name];
51
+ if (!easing[mode]) throw new Error(`Unable to find a mode for the easing \`${name}\` called: \`${mode}\``);
52
+ return easing[mode];
45
53
  }
46
54
 
47
- export { durationFast01, durationFast02, durationModerate01, durationModerate02, durationSlow01, durationSlow02, easings, fast01, fast02, moderate01, moderate02, motion, slow01, slow02, unstable_tokens };
55
+ //#endregion
56
+ export { durationFast01, durationFast02, durationModerate01, durationModerate02, durationSlow01, durationSlow02, easings, fast01, fast02, moderate01, moderate02, motion, slow01, slow02, unstable_tokens };
package/lib/index.js CHANGED
@@ -1,51 +1,60 @@
1
- 'use strict';
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
+ //#region src/index.js
3
4
  /**
4
- * Copyright IBM Corp. 2018, 2023
5
- *
6
- * This source code is licensed under the Apache-2.0 license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
-
10
- var fast01 = '70ms';
11
- var fast02 = '110ms';
12
- var moderate01 = '150ms';
13
- var moderate02 = '240ms';
14
- var slow01 = '400ms';
15
- var slow02 = '700ms';
16
- // V11 Tokens
17
- var durationFast01 = fast01;
18
- var durationFast02 = fast02;
19
- var durationModerate01 = moderate01;
20
- var durationModerate02 = moderate02;
21
- var durationSlow01 = slow01;
22
- var durationSlow02 = slow02;
23
- var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02', 'durationFast01', 'durationFast02', 'durationModerate01', 'durationModerate02', 'durationSlow01', 'durationSlow02'];
24
- var easings = {
25
- standard: {
26
- productive: 'cubic-bezier(0.2, 0, 0.38, 0.9)',
27
- expressive: 'cubic-bezier(0.4, 0.14, 0.3, 1)'
28
- },
29
- entrance: {
30
- productive: 'cubic-bezier(0, 0, 0.38, 0.9)',
31
- expressive: 'cubic-bezier(0, 0, 0.3, 1)'
32
- },
33
- exit: {
34
- productive: 'cubic-bezier(0.2, 0, 1, 0.9)',
35
- expressive: 'cubic-bezier(0.4, 0.14, 1, 1)'
36
- }
5
+ * Copyright IBM Corp. 2018, 2023
6
+ *
7
+ * This source code is licensed under the Apache-2.0 license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ const fast01 = "70ms";
11
+ const fast02 = "110ms";
12
+ const moderate01 = "150ms";
13
+ const moderate02 = "240ms";
14
+ const slow01 = "400ms";
15
+ const slow02 = "700ms";
16
+ const durationFast01 = fast01;
17
+ const durationFast02 = fast02;
18
+ const durationModerate01 = moderate01;
19
+ const durationModerate02 = moderate02;
20
+ const durationSlow01 = slow01;
21
+ const durationSlow02 = slow02;
22
+ const unstable_tokens = [
23
+ "fast01",
24
+ "fast02",
25
+ "moderate01",
26
+ "moderate02",
27
+ "slow01",
28
+ "slow02",
29
+ "durationFast01",
30
+ "durationFast02",
31
+ "durationModerate01",
32
+ "durationModerate02",
33
+ "durationSlow01",
34
+ "durationSlow02"
35
+ ];
36
+ const easings = {
37
+ standard: {
38
+ productive: "cubic-bezier(0.2, 0, 0.38, 0.9)",
39
+ expressive: "cubic-bezier(0.4, 0.14, 0.3, 1)"
40
+ },
41
+ entrance: {
42
+ productive: "cubic-bezier(0, 0, 0.38, 0.9)",
43
+ expressive: "cubic-bezier(0, 0, 0.3, 1)"
44
+ },
45
+ exit: {
46
+ productive: "cubic-bezier(0.2, 0, 1, 0.9)",
47
+ expressive: "cubic-bezier(0.4, 0.14, 1, 1)"
48
+ }
37
49
  };
38
50
  function motion(name, mode) {
39
- if (!easings[name]) {
40
- throw new Error("Unable to find easing `".concat(name, "` in our supported easings. Expected ") + "One of: ".concat(Object.keys(easings).join(', ')));
41
- }
42
- var easing = easings[name];
43
- if (!easing[mode]) {
44
- throw new Error("Unable to find a mode for the easing `".concat(name, "` called: `").concat(mode, "`"));
45
- }
46
- return easing[mode];
51
+ if (!easings[name]) throw new Error(`Unable to find easing \`${name}\` in our supported easings. Expected One of: ${Object.keys(easings).join(", ")}`);
52
+ const easing = easings[name];
53
+ if (!easing[mode]) throw new Error(`Unable to find a mode for the easing \`${name}\` called: \`${mode}\``);
54
+ return easing[mode];
47
55
  }
48
56
 
57
+ //#endregion
49
58
  exports.durationFast01 = durationFast01;
50
59
  exports.durationFast02 = durationFast02;
51
60
  exports.durationModerate01 = durationModerate01;
@@ -60,4 +69,4 @@ exports.moderate02 = moderate02;
60
69
  exports.motion = motion;
61
70
  exports.slow01 = slow01;
62
71
  exports.slow02 = slow02;
63
- exports.unstable_tokens = unstable_tokens;
72
+ 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": "11.41.0",
4
+ "version": "11.43.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -31,11 +31,11 @@
31
31
  "postinstall": "ibmtelemetry --config=telemetry.yml"
32
32
  },
33
33
  "devDependencies": {
34
- "@carbon/cli": "^11.40.0",
34
+ "@carbon/cli": "^11.42.0-rc.0",
35
35
  "rimraf": "^6.0.1"
36
36
  },
37
37
  "dependencies": {
38
38
  "@ibm/telemetry-js": "^1.5.0"
39
39
  },
40
- "gitHead": "6dde90f9edfb378e1585f1954c92484a37f22f02"
40
+ "gitHead": "d901529b78f5b70b49309ad45604fa5ec99a2e69"
41
41
  }
package/umd/index.js CHANGED
@@ -1,69 +1,78 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
1
+ (function(global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CarbonMotion = {}));
5
- })(this, (function (exports) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CarbonMotion = {})));
5
+ })(this, function(exports) {
6
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6
7
 
7
- /**
8
- * Copyright IBM Corp. 2018, 2023
9
- *
10
- * This source code is licensed under the Apache-2.0 license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
8
+ //#region src/index.js
9
+ /**
10
+ * Copyright IBM Corp. 2018, 2023
11
+ *
12
+ * This source code is licensed under the Apache-2.0 license found in the
13
+ * LICENSE file in the root directory of this source tree.
14
+ */
15
+ const fast01 = "70ms";
16
+ const fast02 = "110ms";
17
+ const moderate01 = "150ms";
18
+ const moderate02 = "240ms";
19
+ const slow01 = "400ms";
20
+ const slow02 = "700ms";
21
+ const durationFast01 = fast01;
22
+ const durationFast02 = fast02;
23
+ const durationModerate01 = moderate01;
24
+ const durationModerate02 = moderate02;
25
+ const durationSlow01 = slow01;
26
+ const durationSlow02 = slow02;
27
+ const unstable_tokens = [
28
+ "fast01",
29
+ "fast02",
30
+ "moderate01",
31
+ "moderate02",
32
+ "slow01",
33
+ "slow02",
34
+ "durationFast01",
35
+ "durationFast02",
36
+ "durationModerate01",
37
+ "durationModerate02",
38
+ "durationSlow01",
39
+ "durationSlow02"
40
+ ];
41
+ const easings = {
42
+ standard: {
43
+ productive: "cubic-bezier(0.2, 0, 0.38, 0.9)",
44
+ expressive: "cubic-bezier(0.4, 0.14, 0.3, 1)"
45
+ },
46
+ entrance: {
47
+ productive: "cubic-bezier(0, 0, 0.38, 0.9)",
48
+ expressive: "cubic-bezier(0, 0, 0.3, 1)"
49
+ },
50
+ exit: {
51
+ productive: "cubic-bezier(0.2, 0, 1, 0.9)",
52
+ expressive: "cubic-bezier(0.4, 0.14, 1, 1)"
53
+ }
54
+ };
55
+ function motion(name, mode) {
56
+ if (!easings[name]) throw new Error(`Unable to find easing \`${name}\` in our supported easings. Expected One of: ${Object.keys(easings).join(", ")}`);
57
+ const easing = easings[name];
58
+ if (!easing[mode]) throw new Error(`Unable to find a mode for the easing \`${name}\` called: \`${mode}\``);
59
+ return easing[mode];
60
+ }
13
61
 
14
- var fast01 = '70ms';
15
- var fast02 = '110ms';
16
- var moderate01 = '150ms';
17
- var moderate02 = '240ms';
18
- var slow01 = '400ms';
19
- var slow02 = '700ms';
20
- // V11 Tokens
21
- var durationFast01 = fast01;
22
- var durationFast02 = fast02;
23
- var durationModerate01 = moderate01;
24
- var durationModerate02 = moderate02;
25
- var durationSlow01 = slow01;
26
- var durationSlow02 = slow02;
27
- var unstable_tokens = ['fast01', 'fast02', 'moderate01', 'moderate02', 'slow01', 'slow02', 'durationFast01', 'durationFast02', 'durationModerate01', 'durationModerate02', 'durationSlow01', 'durationSlow02'];
28
- var 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
- function motion(name, mode) {
43
- if (!easings[name]) {
44
- throw new Error("Unable to find easing `".concat(name, "` in our supported easings. Expected ") + "One of: ".concat(Object.keys(easings).join(', ')));
45
- }
46
- var easing = easings[name];
47
- if (!easing[mode]) {
48
- throw new Error("Unable to find a mode for the easing `".concat(name, "` called: `").concat(mode, "`"));
49
- }
50
- return easing[mode];
51
- }
52
-
53
- exports.durationFast01 = durationFast01;
54
- exports.durationFast02 = durationFast02;
55
- exports.durationModerate01 = durationModerate01;
56
- exports.durationModerate02 = durationModerate02;
57
- exports.durationSlow01 = durationSlow01;
58
- exports.durationSlow02 = durationSlow02;
59
- exports.easings = easings;
60
- exports.fast01 = fast01;
61
- exports.fast02 = fast02;
62
- exports.moderate01 = moderate01;
63
- exports.moderate02 = moderate02;
64
- exports.motion = motion;
65
- exports.slow01 = slow01;
66
- exports.slow02 = slow02;
67
- exports.unstable_tokens = unstable_tokens;
68
-
69
- }));
62
+ //#endregion
63
+ exports.durationFast01 = durationFast01;
64
+ exports.durationFast02 = durationFast02;
65
+ exports.durationModerate01 = durationModerate01;
66
+ exports.durationModerate02 = durationModerate02;
67
+ exports.durationSlow01 = durationSlow01;
68
+ exports.durationSlow02 = durationSlow02;
69
+ exports.easings = easings;
70
+ exports.fast01 = fast01;
71
+ exports.fast02 = fast02;
72
+ exports.moderate01 = moderate01;
73
+ exports.moderate02 = moderate02;
74
+ exports.motion = motion;
75
+ exports.slow01 = slow01;
76
+ exports.slow02 = slow02;
77
+ exports.unstable_tokens = unstable_tokens;
78
+ });