@carbon/ibm-products 2.54.0-canary.54 → 2.54.0-canary.59

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.
Files changed (38) hide show
  1. package/css/index-full-carbon.css +17 -4
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +17 -4
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +17 -4
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +17 -4
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Card/Card.d.ts +3 -3
  18. package/es/components/Card/Card.js +10 -9
  19. package/es/components/Card/CardHeader.d.ts +7 -7
  20. package/es/components/Card/CardHeader.js +14 -12
  21. package/es/components/Coachmark/Coachmark.d.ts +5 -0
  22. package/es/components/Coachmark/Coachmark.js +11 -3
  23. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
  24. package/es/components/ExpressiveCard/ExpressiveCard.js +5 -5
  25. package/es/components/ProductiveCard/ProductiveCard.d.ts +3 -3
  26. package/es/components/ProductiveCard/ProductiveCard.js +4 -4
  27. package/lib/components/Card/Card.d.ts +3 -3
  28. package/lib/components/Card/Card.js +10 -9
  29. package/lib/components/Card/CardHeader.d.ts +7 -7
  30. package/lib/components/Card/CardHeader.js +14 -12
  31. package/lib/components/Coachmark/Coachmark.d.ts +5 -0
  32. package/lib/components/Coachmark/Coachmark.js +11 -3
  33. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +5 -5
  34. package/lib/components/ExpressiveCard/ExpressiveCard.js +5 -5
  35. package/lib/components/ProductiveCard/ProductiveCard.d.ts +3 -3
  36. package/lib/components/ProductiveCard/ProductiveCard.js +4 -4
  37. package/package.json +3 -3
  38. package/scss/components/Card/_card.scss +19 -5
@@ -13,10 +13,6 @@ export interface ExpressiveCardProps extends PropsWithChildren {
13
13
  * Icons that are displayed on card. Refer to design documentation for implementation guidelines. Note- href will supersede onClick
14
14
  */
15
15
  actionIcons?: ActionIcon[];
16
- /**
17
- * Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
18
- */
19
- aiLabel?: ReactNode | boolean;
20
16
  /**
21
17
  * Content that shows in the body of the card
22
18
  */
@@ -24,6 +20,10 @@ export interface ExpressiveCardProps extends PropsWithChildren {
24
20
  * Optional user provided class
25
21
  */
26
22
  className?: string;
23
+ /**
24
+ * Optional prop that allows you to pass any component.
25
+ */
26
+ decorator?: ReactNode | boolean;
27
27
  /**
28
28
  * Optional header description
29
29
  */
@@ -91,7 +91,7 @@ export interface ExpressiveCardProps extends PropsWithChildren {
91
91
  /**
92
92
  * **Experimental:** For all cases a `Slug` component can be provided.
93
93
  * Clickable tiles only accept a boolean value of true and display a hollow slug.
94
- * @deprecated please use the `aiLabel` prop
94
+ * @deprecated please use the `decorator` prop
95
95
  */
96
96
  slug?: ReactNode | boolean;
97
97
  /**
@@ -38,10 +38,6 @@ exports.ExpressiveCard.propTypes = {
38
38
  iconDescription: index.default.string,
39
39
  href: index.default.string
40
40
  })),
41
- /**
42
- * Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
43
- */
44
- aiLabel: index.default.oneOfType([index.default.node, index.default.bool]),
45
41
  /**
46
42
  * Content that shows in the body of the card
47
43
  */
@@ -50,6 +46,10 @@ exports.ExpressiveCard.propTypes = {
50
46
  * Optional user provided class
51
47
  */
52
48
  className: index.default.string,
49
+ /**
50
+ * Optional prop that allows you to pass any component.
51
+ */
52
+ decorator: index.default.oneOfType([index.default.node, index.default.bool]),
53
53
  /**
54
54
  * Optional header description
55
55
  */
@@ -120,7 +120,7 @@ exports.ExpressiveCard.propTypes = {
120
120
  /**
121
121
  * **Experimental:** For all cases a `Slug` component can be provided.
122
122
  * Clickable tiles only accept a boolean value of true and display a hollow slug.
123
- * @deprecated please use the `aiLabel` prop
123
+ * @deprecated please use the `decorator` prop
124
124
  */
125
125
  slug: index.default.oneOfType([index.default.node, index.default.bool]),
126
126
  /**
@@ -22,9 +22,9 @@ export interface ProductiveCardProps extends PropsWithChildren {
22
22
  */
23
23
  actionIcons?: ActionIcon[];
24
24
  /**
25
- * Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
25
+ * Optional prop that allows you to pass any component.
26
26
  */
27
- aiLabel?: ReactNode | boolean;
27
+ decorator?: ReactNode | boolean;
28
28
  /**
29
29
  * Determines if the action icons are on the top or bottom of the card
30
30
  */
@@ -108,7 +108,7 @@ export interface ProductiveCardProps extends PropsWithChildren {
108
108
  /**
109
109
  * **Experimental:** For all cases a `Slug` component can be provided.
110
110
  * Clickable tiles only accept a boolean value of true and display a hollow slug.
111
- * @deprecated please use the `aiLabel` prop
111
+ * @deprecated please use the `decorator` prop
112
112
  */
113
113
  slug?: ReactNode | boolean;
114
114
  /**
@@ -50,10 +50,6 @@ exports.ProductiveCard.propTypes = {
50
50
  * Determines if the action icons are on the top or bottom of the card
51
51
  */
52
52
  actionsPlacement: index.default.oneOf(['top', 'bottom']),
53
- /**
54
- * Optional prop that is intended for any scenario where something is being generated by AI to reinforce AI transparency, accountability, and explainability at the UI level.
55
- */
56
- aiLabel: index.default.oneOfType([index.default.node, index.default.bool]),
57
53
  /**
58
54
  * Content that shows in the body of the card
59
55
  */
@@ -66,6 +62,10 @@ exports.ProductiveCard.propTypes = {
66
62
  * Designates which zones of the card are clickable. Refer to design documentation for implementation guidelines
67
63
  */
68
64
  clickZone: index.default.oneOf(['one', 'two', 'three']),
65
+ /**
66
+ * Optional prop that allows you to pass any component.
67
+ */
68
+ decorator: index.default.oneOfType([index.default.node, index.default.bool]),
69
69
  /**
70
70
  * Optional header description
71
71
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibm-products",
3
3
  "description": "Carbon for IBM Products",
4
- "version": "2.54.0-canary.54+7005822ab",
4
+ "version": "2.54.0-canary.59+6e58e9d37",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -96,7 +96,7 @@
96
96
  "dependencies": {
97
97
  "@babel/runtime": "^7.23.9",
98
98
  "@carbon/feature-flags": "^0.24.0",
99
- "@carbon/ibm-products-styles": "^2.51.0",
99
+ "@carbon/ibm-products-styles": "^2.50.0-canary.59+6e58e9d37",
100
100
  "@carbon/telemetry": "^0.1.0",
101
101
  "@dnd-kit/core": "^6.0.8",
102
102
  "@dnd-kit/modifiers": "^7.0.0",
@@ -120,5 +120,5 @@
120
120
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
121
121
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
122
122
  },
123
- "gitHead": "7005822abfcc96eeeabd808b6efdc9f18509626d"
123
+ "gitHead": "6e58e9d37d335dcadb7049db786fdd833f7e36a0"
124
124
  }
@@ -5,7 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- // NOTE: Please do not remove the duplicate `slug` and `ai-label` classes. We need both until slug is fully deprecated
8
+ // NOTE: Please do not remove the duplicate `slug` and `decorator` classes. We need both until slug is fully deprecated
9
9
 
10
10
  // Standard imports.
11
11
  @use '@carbon/styles/scss/theme' as *;
@@ -144,25 +144,39 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
144
144
  position: relative;
145
145
  }
146
146
 
147
- .#{$block-class} .#{c4p-settings.$carbon-prefix}--slug {
147
+ .#{$block-class} .#{c4p-settings.$carbon-prefix}--slug,
148
+ .#{$block-class} .#{c4p-settings.$carbon-prefix}--ai-label {
148
149
  position: absolute;
149
150
  top: $spacing-05;
150
151
  right: $spacing-05;
151
152
  }
152
153
 
154
+ .#{$block-class}__header__inner-wrapper--decorator {
155
+ position: absolute;
156
+ top: $spacing-05;
157
+ right: $spacing-05;
158
+
159
+ .#{c4p-settings.$carbon-prefix}--slug,
160
+ .#{c4p-settings.$carbon-prefix}--ai-label {
161
+ position: relative;
162
+ top: unset;
163
+ right: unset;
164
+ }
165
+ }
166
+
153
167
  .#{$block-class}__header-container--has-slug,
154
- .#{$block-class}__header-container--has-ai-label {
168
+ .#{$block-class}__header-container--has-decorator {
155
169
  width: 100%;
156
170
  padding-right: $spacing-07;
157
171
  }
158
172
 
159
173
  .#{$block-class}__header-container--has-slug.#{$block-class}__header-container--has-actions,
160
- .#{$block-class}__header-container--has-ai-label.#{$block-class}__header-container--has-actions {
174
+ .#{$block-class}__header-container--has-decorator.#{$block-class}__header-container--has-actions {
161
175
  padding-right: $spacing-08;
162
176
  }
163
177
 
164
178
  .#{$block-class}__header-container--has-slug.#{$block-class}__header-container--large-tile-or-label,
165
- .#{$block-class}__header-container--has-ai-label.#{$block-class}__header-container--large-tile-or-label {
179
+ .#{$block-class}__header-container--has-decorator.#{$block-class}__header-container--large-tile-or-label {
166
180
  padding-right: $spacing-09;
167
181
  }
168
182