@carbon/utilities 0.14.0 → 0.15.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.
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *
4
- * Copyright IBM Corp. 2025
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
- */
package/index.scss ADDED
@@ -0,0 +1,9 @@
1
+ // Code generated by @carbon/react. DO NOT EDIT.
2
+ //
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
+
9
+ @forward './scss/carousel/index';
@@ -1,8 +1 @@
1
- "use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var u=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!a.call(t,o)&&o!==s&&r(t,o,{get:()=>e[o],enumerable:!(n=i(e,o))||n.enumerable});return t};var d=t=>u(r({},"__esModule",{value:!0}),t);var m={};module.exports=d(m);/**
2
- * @license
3
- *
4
- * Copyright IBM Corp. 2025
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
- */
1
+ "use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var u=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of l(e))!a.call(t,o)&&o!==s&&r(t,o,{get:()=>e[o],enumerable:!(n=i(e,o))||n.enumerable});return t};var d=t=>u(r({},"__esModule",{value:!0}),t);var m={};module.exports=d(m);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/utilities",
3
3
  "description": "Utilities and helpers to drive consistency across software products using the Carbon Design System",
4
- "version": "0.14.0",
4
+ "version": "0.15.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -16,7 +16,9 @@
16
16
  "es",
17
17
  "lib",
18
18
  "types",
19
- "telemetry.yml"
19
+ "telemetry.yml",
20
+ "scss",
21
+ "index.scss"
20
22
  ],
21
23
  "keywords": [
22
24
  "ibm",
@@ -47,5 +49,5 @@
47
49
  "@ibm/telemetry-js": "^1.6.1",
48
50
  "@internationalized/number": "^3.6.1"
49
51
  },
50
- "gitHead": "57fdbc7bfad9349b5c4359c7d621e709cd4daa25"
52
+ "gitHead": "cbde6bd5df4774c2780411b3faa02ec3a0bb7585"
51
53
  }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
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
+ @use '@carbon/styles/scss/motion' as *;
8
+ @use '@carbon/styles/scss/utilities' as *;
9
+
10
+ $prefix: 'carousel' !default;
11
+ $animateTime: $duration-moderate-02 !default;
12
+
13
+ /// Shared keyframes (needed in both)
14
+ @mixin keyframes {
15
+ @keyframes out-to-active {
16
+ from {
17
+ transform: translateX(0);
18
+ }
19
+
20
+ to {
21
+ transform: translateX(-100%);
22
+ }
23
+ }
24
+
25
+ @keyframes active-to-out {
26
+ from {
27
+ transform: translateX(-100%);
28
+ }
29
+
30
+ to {
31
+ transform: translateX(0);
32
+ }
33
+ }
34
+ }
35
+
36
+ /// Shared view styles for both host and class selectors
37
+ @mixin viewBase($name, $z, $transform: null, $animation: null) {
38
+ @at-root {
39
+ :host(.#{$name}),
40
+ .#{$name} {
41
+ z-index: $z;
42
+ overflow: hidden auto;
43
+ block-size: 100%;
44
+ inline-size: 100%;
45
+
46
+ @if $transform {
47
+ inset-inline-start: 100%;
48
+ transform: $transform;
49
+
50
+ @media (prefers-reduced-motion: no-preference) {
51
+ transition: transform $animateTime $standard-easing;
52
+ }
53
+ }
54
+
55
+ @if $animation {
56
+ @media (prefers-reduced-motion: no-preference) {
57
+ animation: #{$animation} $animateTime $standard-easing forwards;
58
+ }
59
+ }
60
+
61
+ @media (prefers-reduced-motion: reduce) {
62
+ animation: none;
63
+ transition: none;
64
+ }
65
+ }
66
+ :host(.#{$name}:focus),
67
+ .#{$name}:focus {
68
+ @include focus-outline('outline');
69
+ }
70
+ }
71
+ }
72
+
73
+ /// Wrapper styles
74
+ @mixin wrapperStyles {
75
+ .#{$prefix}__view-stack .#{$prefix}__itemsWrapper {
76
+ position: relative;
77
+ overflow: hidden;
78
+ block-size: 100%;
79
+ inline-size: 100%;
80
+ min-inline-size: 20vh;
81
+ }
82
+ }
83
+
84
+ /// Main styles for view states
85
+ @mixin viewStyles {
86
+ @include keyframes;
87
+ @include viewBase('#{$prefix}__view', 80, translateX(0));
88
+ @include viewBase('#{$prefix}__view-active', 100, translateX(-100%));
89
+ @include viewBase('#{$prefix}__view-in-stack', 90, translateX(-200%));
90
+ @include viewBase('#{$prefix}__view-recycle-in', 100, null, out-to-active);
91
+ @include viewBase('#{$prefix}__view-recycle-out', 90, null, active-to-out);
92
+ }
93
+
94
+ /// Optional: Universal (Lit + React)
95
+ @mixin carousel {
96
+ @include wrapperStyles;
97
+ @include viewStyles;
98
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
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
+ @forward 'carousel';
9
+ @use 'carousel';
10
+
11
+ @include carousel.carousel;
@@ -1,6 +1,4 @@
1
1
  /**
2
- * @license
3
- *
4
2
  * Copyright IBM Corp. 2025
5
3
  *
6
4
  * This source code is licensed under the Apache-2.0 license found in the