@carbon/styles 1.51.0-rc.0 → 1.51.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "1.51.0-rc.0",
4
+ "version": "1.51.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "@carbon/grid": "^11.21.0",
44
44
  "@carbon/layout": "^11.20.0",
45
45
  "@carbon/motion": "^11.16.0",
46
- "@carbon/themes": "^11.32.0-rc.0",
46
+ "@carbon/themes": "^11.32.0",
47
47
  "@carbon/type": "^11.25.0",
48
48
  "@ibm/plex": "6.0.0-next.6"
49
49
  },
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "c70f968d388bbf968269066402a741327b00ac1c"
68
+ "gitHead": "957667fa7f197b544f6cb336814daa7074daaaee"
69
69
  }
@@ -162,6 +162,8 @@ describe('@carbon/styles/scss/theme', () => {
162
162
  "ai-border-start",
163
163
  "ai-border-end",
164
164
  "ai-drop-shadow",
165
+ "ai-skeleton-background",
166
+ "ai-skeleton-element-background",
165
167
  "ai-overlay",
166
168
  "slug-callout-caret-center",
167
169
  "slug-callout-caret-bottom",
@@ -0,0 +1,66 @@
1
+ //
2
+ // Copyright IBM Corp. 2016, 2024
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
+ @use '../../config' as *;
9
+ @use '../../theme';
10
+ @use '../../utilities/convert';
11
+
12
+ @keyframes ai-skeleton-animation {
13
+ 0% {
14
+ transform: translateX(-100%);
15
+ }
16
+
17
+ 100% {
18
+ transform: translateX(100%);
19
+ }
20
+ }
21
+
22
+ /// AI Skeleton styles
23
+ /// @access public
24
+ /// @group skeleton
25
+ @mixin ai-skeleton-styles {
26
+ .#{$prefix}--skeleton__text--ai,
27
+ .#{$prefix}--skeleton__placeholder--ai,
28
+ .#{$prefix}--skeleton__icon--ai {
29
+ overflow: hidden;
30
+ background: theme.$ai-skeleton-background;
31
+ }
32
+
33
+ .#{$prefix}--skeleton__text--ai::before,
34
+ .#{$prefix}--skeleton__placeholder--ai::before,
35
+ .#{$prefix}--skeleton__icon--ai::before {
36
+ animation: 1250ms ease-in-out ai-skeleton-animation infinite;
37
+ background: linear-gradient(
38
+ to right,
39
+ rgba(theme.get('ai-skeleton-element-background'), 0) 0%,
40
+ rgba(theme.get('ai-skeleton-element-background'), 0.5) 50%,
41
+ rgba(theme.get('ai-skeleton-element-background'), 0) 100%
42
+ );
43
+ }
44
+
45
+ .#{$prefix}--skeleton__placeholder--ai::before,
46
+ .#{$prefix}--skeleton__icon--ai::before {
47
+ inline-size: 200%;
48
+ }
49
+
50
+ // //skeleton placeholder
51
+ .#{$prefix}--skeleton__placeholder--ai {
52
+ border-radius: convert.to-rem(8px);
53
+ }
54
+
55
+ //skeleton text
56
+ .#{$prefix}--skeleton__text--ai {
57
+ border-radius: convert.to-rem(16px);
58
+ }
59
+
60
+ //skeleton icon
61
+ .#{$prefix}--skeleton__icon--ai {
62
+ border-radius: convert.to-rem(2px);
63
+ }
64
+ }
65
+
66
+ // rgba($ai-skeleton-element-background, 1)
@@ -6,6 +6,9 @@
6
6
  //
7
7
 
8
8
  @forward 'skeleton-styles';
9
+ @forward 'ai-skeleton-styles';
9
10
  @use 'skeleton-styles';
11
+ @use 'ai-skeleton-styles';
10
12
 
11
13
  @include skeleton-styles.skeleton-styles;
14
+ @include ai-skeleton-styles.ai-skeleton-styles;