@carbon-labs/react-animated-header 0.14.0 → 0.16.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.
Files changed (42) hide show
  1. package/es/__stories__/AnimatedHeader.stories.d.ts +882 -44
  2. package/es/__stories__/data/index.d.ts +112 -3
  3. package/es/assets/static/illustration_data_fabric_dark_05.svg.js +1 -1
  4. package/es/assets/static/illustration_data_fabric_light_04.svg.js +1 -1
  5. package/es/assets/static/illustration_watson_x_data_dark_03.svg.js +1 -1
  6. package/es/assets/static/illustration_watson_x_data_light_03.svg.js +1 -1
  7. package/es/components/AnimatedHeader/AnimatedHeader.d.ts +12 -31
  8. package/es/components/AnimatedHeader/AnimatedHeader.js +68 -101
  9. package/es/components/TasksController/TasksController.d.ts +30 -0
  10. package/es/components/TasksController/TasksController.js +73 -0
  11. package/es/components/Tiles/AIPromptTile/AIPromptTile.d.ts +6 -3
  12. package/es/components/Tiles/AIPromptTile/AIPromptTile.js +12 -6
  13. package/es/components/Tiles/BaseTile/BaseTile.d.ts +9 -5
  14. package/es/components/Tiles/BaseTile/BaseTile.js +5 -25
  15. package/es/components/Tiles/GlassTile/GlassTile.d.ts +9 -5
  16. package/es/components/Tiles/GlassTile/GlassTile.js +15 -4
  17. package/es/components/WorkspaceSelector/WorkspaceSelector.d.ts +27 -0
  18. package/es/components/WorkspaceSelector/WorkspaceSelector.js +57 -0
  19. package/es/index.d.ts +2 -0
  20. package/lib/__stories__/AnimatedHeader.stories.d.ts +882 -44
  21. package/lib/__stories__/data/index.d.ts +112 -3
  22. package/lib/assets/static/illustration_data_fabric_dark_05.svg.js +1 -1
  23. package/lib/assets/static/illustration_data_fabric_light_04.svg.js +1 -1
  24. package/lib/assets/static/illustration_watson_x_data_dark_03.svg.js +1 -1
  25. package/lib/assets/static/illustration_watson_x_data_light_03.svg.js +1 -1
  26. package/lib/components/AnimatedHeader/AnimatedHeader.d.ts +12 -31
  27. package/lib/components/AnimatedHeader/AnimatedHeader.js +67 -100
  28. package/lib/components/TasksController/TasksController.d.ts +30 -0
  29. package/lib/components/TasksController/TasksController.js +77 -0
  30. package/lib/components/Tiles/AIPromptTile/AIPromptTile.d.ts +6 -3
  31. package/lib/components/Tiles/AIPromptTile/AIPromptTile.js +11 -5
  32. package/lib/components/Tiles/BaseTile/BaseTile.d.ts +9 -5
  33. package/lib/components/Tiles/BaseTile/BaseTile.js +5 -25
  34. package/lib/components/Tiles/GlassTile/GlassTile.d.ts +9 -5
  35. package/lib/components/Tiles/GlassTile/GlassTile.js +14 -3
  36. package/lib/components/WorkspaceSelector/WorkspaceSelector.d.ts +27 -0
  37. package/lib/components/WorkspaceSelector/WorkspaceSelector.js +61 -0
  38. package/lib/index.d.ts +2 -0
  39. package/package.json +2 -2
  40. package/scss/AnimatedHeader/animated-header.scss +37 -6
  41. package/scss/Tiles/AIPromptTile/ai-prompt-tile.scss +22 -0
  42. package/scss/Tiles/GlassTile/glass-tile.scss +22 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/react-animated-header",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@carbon-labs/utilities": "canary"
47
47
  },
48
- "gitHead": "7143d1ffcfee709fceee312ed790da0303703cb8"
48
+ "gitHead": "b2adf21b63ab6a230373abe160cde8fc36251197"
49
49
  }
@@ -49,11 +49,11 @@ body {
49
49
  overflow: visible;
50
50
  background: $background;
51
51
  inline-size: 100%;
52
- max-block-size: 90vh;
52
+ max-block-size: 200vh;
53
53
  outline: 1px solid transparent;
54
54
  padding-block: 0 $spacing-10;
55
55
  transition: padding 500ms motion.motion(standard, expressive),
56
- max-height 500ms motion.motion(standard, expressive), color 200ms linear,
56
+ max-block-size 500ms motion.motion(standard, expressive), color 200ms linear,
57
57
  background-color 200ms linear,
58
58
  outline 500ms motion.motion(standard, expressive);
59
59
  writing-mode: horizontal-tb;
@@ -226,6 +226,32 @@ body {
226
226
  max-inline-size: fit-content;
227
227
  }
228
228
 
229
+ .#{$prefix}__task-controller-skeleton {
230
+ background: $layer-01;
231
+ block-size: $spacing-08;
232
+ inline-size: auto;
233
+ max-inline-size: 18rem;
234
+
235
+ opacity: 0.7;
236
+ }
237
+
238
+ .#{$prefix}__task-controller-skeleton::before {
239
+ background: $layer-02;
240
+ }
241
+
242
+ .#{$prefix}__workspace-selector-skeleton {
243
+ background: $layer-01;
244
+ block-size: $spacing-07;
245
+ inline-size: auto;
246
+ max-inline-size: 18rem;
247
+
248
+ opacity: 0.7;
249
+ }
250
+
251
+ .#{$prefix}__workspace-selector-skeleton::before {
252
+ background: $layer-02;
253
+ }
254
+
229
255
  .#{$prefix}__header-dropdown--container {
230
256
  inline-size: auto;
231
257
  max-inline-size: 18rem;
@@ -284,6 +310,13 @@ body {
284
310
  animation-fill-mode: both;
285
311
  }
286
312
 
313
+ /* support for Safari */
314
+ @supports (font: -apple-system-body) and (-webkit-appearance: none) {
315
+ .#{$prefix}__tile {
316
+ animation: none;
317
+ }
318
+ }
319
+
287
320
  .#{$prefix}__tile:nth-child(1) {
288
321
  animation-delay: 383.333ms;
289
322
  }
@@ -482,10 +515,8 @@ body {
482
515
  inline-size: calc(100% - 16px);
483
516
  }
484
517
 
485
- .#{$prefix}__tiles-container:has(> :first-child)
486
- > ##{$prefix}__ai-prompt-tile
487
- ~ .#{$prefix}__glass-tile {
488
- inline-size: calc(50% - 16px);
518
+ .#{$prefix}__tiles-container > ##{$prefix}__ai-prompt-tile {
519
+ flex-grow: 0.5;
489
520
  }
490
521
  }
491
522
 
@@ -23,6 +23,16 @@ $prefix: 'clabs--animated-header__ai-prompt-tile' !default;
23
23
  text-decoration: none;
24
24
  }
25
25
 
26
+ .#{$prefix}--disabled {
27
+ outline: 0;
28
+
29
+ * {
30
+ color: $text-disabled;
31
+ fill: $text-disabled;
32
+ pointer-events: none;
33
+ }
34
+ }
35
+
26
36
  .#{$prefix}:hover,
27
37
  .#{$prefix}:active,
28
38
  .#{$prefix}:focus {
@@ -192,6 +202,18 @@ $prefix: 'clabs--animated-header__ai-prompt-tile' !default;
192
202
  z-index: 4;
193
203
  }
194
204
 
205
+ .#{$prefix}--loading-skeleton {
206
+ background: $layer-01;
207
+ block-size: 100%;
208
+ inline-size: 100%;
209
+
210
+ opacity: 0.7;
211
+ }
212
+
213
+ .#{$prefix}--loading-skeleton::before {
214
+ background: $layer-02;
215
+ }
216
+
195
217
  @keyframes animate-border {
196
218
  0% {
197
219
  background-position: 100% 0%;
@@ -23,6 +23,16 @@ $prefix: 'clabs--animated-header__glass-tile' !default;
23
23
  text-decoration: none;
24
24
  }
25
25
 
26
+ .#{$prefix}[aria-disabled='true'] {
27
+ outline: none;
28
+
29
+ * {
30
+ color: $text-disabled;
31
+ fill: $text-disabled;
32
+ pointer-events: none;
33
+ }
34
+ }
35
+
26
36
  .#{$prefix}:hover,
27
37
  .#{$prefix}:active,
28
38
  .#{$prefix}:focus {
@@ -133,3 +143,15 @@ $prefix: 'clabs--animated-header__glass-tile' !default;
133
143
  .#{$prefix}--custom-content {
134
144
  z-index: 2;
135
145
  }
146
+
147
+ .#{$prefix}--loading-skeleton {
148
+ background: $layer-01;
149
+ block-size: 100%;
150
+ inline-size: 100%;
151
+
152
+ opacity: 0.7;
153
+ }
154
+
155
+ .#{$prefix}--loading-skeleton::before {
156
+ background: $layer-02;
157
+ }