@carbon/ibm-products 1.61.1 → 1.62.1
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +172 -70
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1768 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +3 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +172 -70
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +172 -70
- package/css/index.css.map +1 -1
- package/css/index.min.css +3 -3
- package/css/index.min.css.map +1 -1
- package/es/components/Carousel/Carousel.js +194 -119
- package/es/components/Carousel/CarouselItem.js +8 -21
- package/es/components/Coachmark/Coachmark.js +17 -5
- package/es/components/Coachmark/CoachmarkDragbar.js +12 -5
- package/es/components/Coachmark/CoachmarkHeader.js +2 -1
- package/es/components/Coachmark/CoachmarkOverlay.js +105 -9
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +26 -6
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +34 -10
- package/es/components/CoachmarkStack/CoachmarkStack.js +19 -4
- package/es/components/CoachmarkStack/CoachmarkStackHome.js +45 -11
- package/es/components/Datagrid/Datagrid/DatagridContent.js +12 -9
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +42 -25
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +23 -11
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +31 -12
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +43 -23
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +18 -18
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +93 -14
- package/es/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
- package/es/components/Datagrid/useActionsColumn.js +9 -9
- package/es/components/Datagrid/useDatagrid.js +13 -1
- package/es/components/Datagrid/useExpandedRow.js +3 -6
- package/es/components/Datagrid/useFlexResize.js +19 -9
- package/es/components/Datagrid/useFocusRowExpander.js +40 -0
- package/es/components/Datagrid/useInfiniteScroll.js +10 -9
- package/es/components/Datagrid/useNestedRowExpander.js +9 -0
- package/es/components/Datagrid/useNestedRows.js +0 -4
- package/es/components/Datagrid/useOnRowClick.js +6 -7
- package/es/components/Datagrid/useParentDimensions.js +6 -6
- package/es/components/Datagrid/useResizeTable.js +7 -7
- package/es/components/Datagrid/useRowExpander.js +9 -0
- package/es/components/Datagrid/useSelectAllToggle.js +2 -2
- package/es/components/Datagrid/useSelectRows.js +52 -30
- package/es/components/Datagrid/useSkeletonRows.js +6 -6
- package/es/components/Datagrid/useSortableColumns.js +4 -5
- package/es/components/Datagrid/useStickyColumn.js +13 -6
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
- package/es/components/Guidebanner/Guidebanner.js +9 -12
- package/es/global/js/hooks/index.js +3 -2
- package/es/global/js/hooks/usePrefix.js +11 -0
- package/es/global/js/package-settings.js +1 -4
- package/lib/components/Carousel/Carousel.js +190 -114
- package/lib/components/Carousel/CarouselItem.js +9 -25
- package/lib/components/Coachmark/Coachmark.js +16 -4
- package/lib/components/Coachmark/CoachmarkDragbar.js +12 -5
- package/lib/components/Coachmark/CoachmarkHeader.js +2 -1
- package/lib/components/Coachmark/CoachmarkOverlay.js +105 -8
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +5 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +25 -5
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +34 -10
- package/lib/components/CoachmarkStack/CoachmarkStack.js +18 -3
- package/lib/components/CoachmarkStack/CoachmarkStackHome.js +44 -10
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +12 -9
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +6 -4
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +42 -32
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +17 -4
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +25 -5
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +43 -23
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +12 -12
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +96 -15
- package/lib/components/Datagrid/Datagrid.stories/StickyActionsColumnStory.js +1 -1
- package/lib/components/Datagrid/useActionsColumn.js +9 -12
- package/lib/components/Datagrid/useDatagrid.js +13 -1
- package/lib/components/Datagrid/useExpandedRow.js +2 -5
- package/lib/components/Datagrid/useFlexResize.js +19 -9
- package/lib/components/Datagrid/useFocusRowExpander.js +46 -0
- package/lib/components/Datagrid/useInfiniteScroll.js +9 -9
- package/lib/components/Datagrid/useNestedRowExpander.js +9 -0
- package/lib/components/Datagrid/useNestedRows.js +0 -4
- package/lib/components/Datagrid/useOnRowClick.js +6 -7
- package/lib/components/Datagrid/useParentDimensions.js +5 -6
- package/lib/components/Datagrid/useResizeTable.js +6 -7
- package/lib/components/Datagrid/useRowExpander.js +9 -0
- package/lib/components/Datagrid/useSelectAllToggle.js +2 -2
- package/lib/components/Datagrid/useSelectRows.js +46 -23
- package/lib/components/Datagrid/useSkeletonRows.js +6 -6
- package/lib/components/Datagrid/useSortableColumns.js +4 -5
- package/lib/components/Datagrid/useStickyColumn.js +8 -0
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -0
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -0
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -0
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -0
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -0
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -4
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -4
- package/lib/components/Guidebanner/Guidebanner.js +9 -12
- package/lib/global/js/hooks/index.js +8 -1
- package/lib/global/js/hooks/usePrefix.js +19 -0
- package/lib/global/js/package-settings.js +1 -4
- package/package.json +2 -2
- package/scss/components/Carousel/_carousel.scss +1 -2
- package/scss/components/Checklist/_checklist.scss +13 -25
- package/scss/components/Coachmark/styles/_coachmark-dragbar.scss +1 -45
- package/scss/components/Coachmark/styles/_coachmark-header.scss +0 -33
- package/scss/components/Coachmark/styles/_coachmark-overlay.scss +113 -5
- package/scss/components/Coachmark/styles/_coachmark-tagline.scss +18 -0
- package/scss/components/CoachmarkBeacon/_coachmark-beacon.scss +19 -1
- package/scss/components/CoachmarkOverlayElement/_coachmark-overlay-element.scss +2 -0
- package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -0
- package/scss/components/CoachmarkStack/_coachmark-stack.scss +3 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +31 -5
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +21 -0
- package/scss/components/Datagrid/styles/_useNestedRows.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +9 -0
- package/scss/components/_index-released-only.scss +1 -0
- package/es/components/Carousel/utils.js +0 -98
- package/lib/components/Carousel/utils.js +0 -108
@@ -19,6 +19,8 @@
|
|
19
19
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
20
20
|
$block-class: #{$pkg-prefix}--coachmark-overlay;
|
21
21
|
$carousel-class: #{$pkg-prefix}--carousel;
|
22
|
+
$close-btn-class: #{$block-class}--close-btn;
|
23
|
+
$draghandle-btn-class: #{$block-class}__handle;
|
22
24
|
|
23
25
|
.#{$block-class} {
|
24
26
|
position: absolute;
|
@@ -33,6 +35,8 @@
|
|
33
35
|
$caret-center: $caret-height; // use "center" for left-right calculations, and "height" for top-bottom calculations
|
34
36
|
$distance-offset: $spacing-06; // see also ./utils/constants.js > distanceOffset
|
35
37
|
|
38
|
+
visibility: hidden;
|
39
|
+
|
36
40
|
&--fixed {
|
37
41
|
position: fixed;
|
38
42
|
right: $spacing-05;
|
@@ -45,8 +49,15 @@
|
|
45
49
|
}
|
46
50
|
}
|
47
51
|
|
52
|
+
&--is-dragmode {
|
53
|
+
border-radius: 0;
|
54
|
+
box-shadow: 0 0 0 $spacing-02 $inverse-02;
|
55
|
+
outline: $spacing-01 solid $inverse-01;
|
56
|
+
}
|
57
|
+
|
48
58
|
&--is-visible {
|
49
59
|
transform: translateY(0);
|
60
|
+
visibility: visible;
|
50
61
|
}
|
51
62
|
|
52
63
|
// CARET STYLING
|
@@ -202,8 +213,6 @@
|
|
202
213
|
|
203
214
|
// BODY
|
204
215
|
&__body {
|
205
|
-
padding: $spacing-01 $spacing-05 $spacing-05;
|
206
|
-
|
207
216
|
.#{$carbon-prefix}--btn--ghost {
|
208
217
|
color: $inverse-link;
|
209
218
|
|
@@ -234,13 +243,60 @@
|
|
234
243
|
}
|
235
244
|
}
|
236
245
|
|
246
|
+
// HEADER BUTTONS
|
247
|
+
&__handle {
|
248
|
+
position: relative;
|
249
|
+
flex-grow: 1;
|
250
|
+
padding: $spacing-02 0 0 $spacing-03;
|
251
|
+
border: 0;
|
252
|
+
background-color: transparent;
|
253
|
+
text-align: left;
|
254
|
+
|
255
|
+
&::before {
|
256
|
+
position: absolute;
|
257
|
+
top: $spacing-01;
|
258
|
+
left: $spacing-01;
|
259
|
+
width: calc($spacing-06 + $spacing-01);
|
260
|
+
height: calc($spacing-06 + $spacing-01);
|
261
|
+
content: '';
|
262
|
+
}
|
263
|
+
|
264
|
+
&:hover {
|
265
|
+
cursor: move;
|
266
|
+
}
|
267
|
+
|
268
|
+
&:focus {
|
269
|
+
border: none;
|
270
|
+
outline: none;
|
271
|
+
|
272
|
+
&::before {
|
273
|
+
border: 1px solid $inverse-01;
|
274
|
+
outline: 1px solid $blue-60;
|
275
|
+
}
|
276
|
+
}
|
277
|
+
}
|
278
|
+
|
279
|
+
&--close-btn {
|
280
|
+
width: $spacing-07;
|
281
|
+
height: $spacing-07;
|
282
|
+
margin-left: auto !important;
|
283
|
+
|
284
|
+
svg > path {
|
285
|
+
margin: 0;
|
286
|
+
fill: $inverse-01 !important;
|
287
|
+
}
|
288
|
+
|
289
|
+
&:hover {
|
290
|
+
background-color: $inverse-hover-ui !important;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
237
294
|
// FOOTER
|
238
295
|
&__footer {
|
239
296
|
display: flex;
|
240
297
|
align-items: center;
|
241
298
|
justify-content: flex-end;
|
242
299
|
}
|
243
|
-
/* ------------------ */
|
244
300
|
|
245
301
|
// THEME
|
246
302
|
&__light {
|
@@ -262,6 +318,10 @@
|
|
262
318
|
}
|
263
319
|
|
264
320
|
.#{$carbon-prefix}--btn--ghost {
|
321
|
+
border-color: transparent !important;
|
322
|
+
border-radius: 0;
|
323
|
+
outline: 1px solid transparent;
|
324
|
+
|
265
325
|
&:hover {
|
266
326
|
background-color: $inverse-hover-ui;
|
267
327
|
}
|
@@ -269,6 +329,33 @@
|
|
269
329
|
&:active {
|
270
330
|
background-color: $active-secondary;
|
271
331
|
}
|
332
|
+
|
333
|
+
&:focus {
|
334
|
+
box-shadow: inset 0 0 0 1px $inverse-02,
|
335
|
+
inset 0 0 0 $spacing-01 $white-0;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
}
|
339
|
+
.#{$draghandle-btn-class} {
|
340
|
+
&:focus {
|
341
|
+
&::before {
|
342
|
+
border: 1px solid $white-0;
|
343
|
+
outline: 1px solid transparent;
|
344
|
+
}
|
345
|
+
}
|
346
|
+
}
|
347
|
+
.#{$close-btn-class} {
|
348
|
+
border-color: transparent !important;
|
349
|
+
border-radius: 0;
|
350
|
+
outline: 1px solid transparent;
|
351
|
+
|
352
|
+
&:active {
|
353
|
+
background-color: $active-secondary;
|
354
|
+
}
|
355
|
+
|
356
|
+
&:focus {
|
357
|
+
box-shadow: inset 0 0 0 1px $inverse-02,
|
358
|
+
inset 0 0 0 $spacing-01 $white-0;
|
272
359
|
}
|
273
360
|
}
|
274
361
|
}
|
@@ -301,6 +388,8 @@
|
|
301
388
|
}
|
302
389
|
|
303
390
|
.#{$carbon-prefix}--btn--ghost {
|
391
|
+
border-color: transparent;
|
392
|
+
|
304
393
|
&:hover {
|
305
394
|
background-color: $inverse-hover-ui;
|
306
395
|
}
|
@@ -310,11 +399,30 @@
|
|
310
399
|
}
|
311
400
|
|
312
401
|
&:focus {
|
313
|
-
box-shadow: inset 0 0 0
|
314
|
-
inset 0 0 0
|
402
|
+
box-shadow: inset 0 0 0 1px $blue-60,
|
403
|
+
inset 0 0 0 $spacing-01 $white-0;
|
404
|
+
}
|
405
|
+
}
|
406
|
+
}
|
407
|
+
.#{$draghandle-btn-class} {
|
408
|
+
&:focus {
|
409
|
+
&::before {
|
410
|
+
border: 1px solid $white-0;
|
411
|
+
outline: 1px solid $blue-60;
|
315
412
|
}
|
316
413
|
}
|
317
414
|
}
|
415
|
+
.#{$close-btn-class} {
|
416
|
+
border-color: transparent;
|
417
|
+
|
418
|
+
&:focus {
|
419
|
+
box-shadow: inset 0 0 0 1px $blue-60, inset 0 0 0 $spacing-01 $white-0;
|
420
|
+
}
|
421
|
+
|
422
|
+
&:active {
|
423
|
+
background-color: $button-tertiary-active;
|
424
|
+
}
|
425
|
+
}
|
318
426
|
}
|
319
427
|
.#{$carousel-class}__item {
|
320
428
|
flex: 0 0 100% !important;
|
@@ -35,6 +35,7 @@
|
|
35
35
|
// stylelint-disable-next-line carbon/motion-duration-use
|
36
36
|
transition: opacity 240ms carbon--motion(exit, productive) 300ms;
|
37
37
|
transition-delay: 240ms;
|
38
|
+
|
38
39
|
@media (prefers-reduced-motion) {
|
39
40
|
transition: none;
|
40
41
|
}
|
@@ -86,6 +87,11 @@
|
|
86
87
|
text-align: left;
|
87
88
|
@include carbon--type-style('body-short-01');
|
88
89
|
|
90
|
+
&:focus {
|
91
|
+
box-shadow: inset 0 0 0 3px $purple-70, inset 0 0 0 $spacing-02 $white-0;
|
92
|
+
outline: 1px solid transparent;
|
93
|
+
}
|
94
|
+
|
89
95
|
&:hover {
|
90
96
|
cursor: pointer !important;
|
91
97
|
}
|
@@ -98,8 +104,20 @@
|
|
98
104
|
&--close-btn {
|
99
105
|
width: $spacing-07;
|
100
106
|
height: $spacing-07;
|
107
|
+
border-color: transparent !important;
|
108
|
+
border-radius: 0;
|
101
109
|
margin-left: auto !important;
|
102
110
|
color: $white-0;
|
111
|
+
outline: 1px solid transparent;
|
112
|
+
|
113
|
+
&:active {
|
114
|
+
background-color: $active-secondary;
|
115
|
+
}
|
116
|
+
|
117
|
+
&:focus {
|
118
|
+
box-shadow: inset 0 0 0 1px $inverse-02,
|
119
|
+
inset 0 0 0 $spacing-01 $white-0 !important;
|
120
|
+
}
|
103
121
|
|
104
122
|
svg > path {
|
105
123
|
margin: 0;
|
@@ -32,6 +32,9 @@
|
|
32
32
|
|
33
33
|
&-default {
|
34
34
|
.#{$block-class}__target {
|
35
|
+
&::before {
|
36
|
+
display: none;
|
37
|
+
}
|
35
38
|
// the blue dot
|
36
39
|
&::after {
|
37
40
|
position: absolute;
|
@@ -43,9 +46,24 @@
|
|
43
46
|
background-color: $blue-50;
|
44
47
|
content: '';
|
45
48
|
}
|
49
|
+
|
50
|
+
&:focus {
|
51
|
+
outline: transparent;
|
52
|
+
|
53
|
+
&::before {
|
54
|
+
position: absolute;
|
55
|
+
top: 7px;
|
56
|
+
left: 7px;
|
57
|
+
display: block;
|
58
|
+
width: 18px;
|
59
|
+
height: 18px;
|
60
|
+
border-radius: 100%;
|
61
|
+
content: '';
|
62
|
+
outline: $spacing-01 $focus solid;
|
63
|
+
}
|
64
|
+
}
|
46
65
|
}
|
47
66
|
}
|
48
|
-
|
49
67
|
.#{$block-class}__target {
|
50
68
|
// the hit area
|
51
69
|
position: absolute;
|
@@ -28,6 +28,7 @@
|
|
28
28
|
bottom: -100%;
|
29
29
|
//opacity: 0;
|
30
30
|
transform: translateY(100%);
|
31
|
+
visibility: hidden;
|
31
32
|
|
32
33
|
&--is-mounted {
|
33
34
|
bottom: 0;
|
@@ -41,6 +42,7 @@
|
|
41
42
|
&--is-visible {
|
42
43
|
opacity: 1;
|
43
44
|
transform: translateY(0);
|
45
|
+
visibility: visible;
|
44
46
|
}
|
45
47
|
|
46
48
|
// Stack the level-one item behind the level-two item.
|
@@ -51,6 +53,7 @@
|
|
51
53
|
transform: perspective(carbon--mini-units(18))
|
52
54
|
translate3d(0, calc($spacing-09 * -1), calc($spacing-05 * -1));
|
53
55
|
transform-origin: top center;
|
56
|
+
visibility: visible;
|
54
57
|
|
55
58
|
&__light {
|
56
59
|
background-color: $gray-90;
|
@@ -80,7 +80,6 @@
|
|
80
80
|
}
|
81
81
|
|
82
82
|
&.#{$block-class}__variable-row-height {
|
83
|
-
&.#{$carbon-prefix}--data-table--compact,
|
84
83
|
&.#{$carbon-prefix}--data-table--xs {
|
85
84
|
.#{$block-class}__cell {
|
86
85
|
padding-top: $spacing-01;
|
@@ -88,7 +87,6 @@
|
|
88
87
|
}
|
89
88
|
}
|
90
89
|
|
91
|
-
&.#{$carbon-prefix}--data-table--short,
|
92
90
|
&.#{$carbon-prefix}--data-table--sm,
|
93
91
|
&.#{$carbon-prefix}--data-table--md {
|
94
92
|
.#{$block-class}__cell {
|
@@ -99,7 +97,6 @@
|
|
99
97
|
}
|
100
98
|
}
|
101
99
|
|
102
|
-
&.#{$carbon-prefix}--data-table--tall,
|
103
100
|
&.#{$carbon-prefix}--data-table--lg,
|
104
101
|
&.#{$carbon-prefix}--data-table--xl {
|
105
102
|
.#{$block-class}__cell {
|
@@ -111,7 +108,6 @@
|
|
111
108
|
}
|
112
109
|
|
113
110
|
&.#{$block-class}__vertical-align-top {
|
114
|
-
&.#{$carbon-prefix}--data-table--tall,
|
115
111
|
&.#{$carbon-prefix}--data-table--lg,
|
116
112
|
&.#{$carbon-prefix}--data-table--xl {
|
117
113
|
.#{$block-class}__cell {
|
@@ -129,7 +125,6 @@
|
|
129
125
|
}
|
130
126
|
|
131
127
|
&.#{$block-class}__variable-row-height {
|
132
|
-
&.#{$carbon-prefix}--data-table--tall,
|
133
128
|
&.#{$carbon-prefix}--data-table--lg,
|
134
129
|
&.#{$carbon-prefix}--data-table--xl {
|
135
130
|
.#{$block-class}__cell {
|
@@ -325,6 +320,11 @@
|
|
325
320
|
background-color: $hover-selected-ui;
|
326
321
|
}
|
327
322
|
|
323
|
+
.#{$block-class}__grid-container
|
324
|
+
table.#{$block-class}__table-simple.#{$carbon-prefix}--data-table.#{$block-class}__table-is-resizing {
|
325
|
+
overflow-y: hidden;
|
326
|
+
}
|
327
|
+
|
328
328
|
.#{$block-class}__resizableColumn {
|
329
329
|
&.#{$block-class}__isResizing {
|
330
330
|
.#{$block-class}__resizer {
|
@@ -346,6 +346,32 @@
|
|
346
346
|
}
|
347
347
|
}
|
348
348
|
|
349
|
+
.#{$block-class}__header-actions-column:hover {
|
350
|
+
background-color: $layer-accent;
|
351
|
+
}
|
352
|
+
|
353
|
+
.#{$block-class}
|
354
|
+
.#{$block-class}__carbon-row
|
355
|
+
.#{$block-class}__actions-column-cell-non-sticky
|
356
|
+
.#{$carbon-prefix}--overflow-menu {
|
357
|
+
opacity: 0;
|
358
|
+
}
|
359
|
+
|
360
|
+
.#{$block-class}
|
361
|
+
.#{$block-class}__carbon-row:hover
|
362
|
+
.#{$block-class}__actions-column-cell-non-sticky
|
363
|
+
.#{$carbon-prefix}--overflow-menu,
|
364
|
+
.#{$block-class}
|
365
|
+
.#{$block-class}__carbon-row
|
366
|
+
.#{$block-class}__actions-column-cell-non-sticky
|
367
|
+
.#{$carbon-prefix}--overflow-menu:focus,
|
368
|
+
.#{$block-class}
|
369
|
+
.#{$block-class}__carbon-row
|
370
|
+
.#{$block-class}__actions-column-cell-non-sticky
|
371
|
+
.#{$carbon-prefix}--overflow-menu[aria-expanded='true'] {
|
372
|
+
opacity: 1;
|
373
|
+
}
|
374
|
+
|
349
375
|
.#{$block-class}__head-hidden-select-all {
|
350
376
|
padding-right: $spacing-09;
|
351
377
|
|
@@ -63,3 +63,24 @@
|
|
63
63
|
.#{$block-class} .#{$block-class}__expandable-row--hover td {
|
64
64
|
background: $layer-hover;
|
65
65
|
}
|
66
|
+
|
67
|
+
.#{$block-class}
|
68
|
+
.#{$carbon-prefix}--data-table
|
69
|
+
tbody
|
70
|
+
tr:hover
|
71
|
+
td.#{$block-class}__expanded-row-cell-wrapper,
|
72
|
+
.#{$block-class}
|
73
|
+
.#{$carbon-prefix}--data-table
|
74
|
+
td.#{$block-class}__expanded-row-cell-wrapper,
|
75
|
+
.#{$block-class}
|
76
|
+
.#{$carbon-prefix}--data-table
|
77
|
+
.#{$block-class}__carbon-row-expanded
|
78
|
+
td.#{$block-class}__expandable-row-cell {
|
79
|
+
border: none;
|
80
|
+
}
|
81
|
+
|
82
|
+
.#{$block-class}
|
83
|
+
.#{$carbon-prefix}--data-table
|
84
|
+
td.#{$block-class}__expanded-row-cell-wrapper {
|
85
|
+
padding: 0;
|
86
|
+
}
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
.#{$block-class}
|
38
38
|
tr.#{$block-class}__carbon-nested-row
|
39
|
-
+ :not(tr.#{$block-class}__carbon-nested-row)::
|
39
|
+
+ :not(tr.#{$block-class}__carbon-nested-row)::after {
|
40
40
|
position: absolute;
|
41
41
|
/* stylelint-disable-next-line carbon/layout-token-use */
|
42
42
|
top: -1px;
|
@@ -67,3 +67,12 @@
|
|
67
67
|
.#{$block-class}__row-size__row-settings-trigger--open.#{$carbon-prefix}--btn--ghost {
|
68
68
|
background-color: $ui-02;
|
69
69
|
}
|
70
|
+
|
71
|
+
.#{$block-class}
|
72
|
+
table.#{$carbon-prefix}--data-table--xl.#{$block-class}__vertical-align-center
|
73
|
+
td.#{$block-class}__expandable-row-cell,
|
74
|
+
.#{$block-class}
|
75
|
+
table.#{$carbon-prefix}--data-table--xl.#{$block-class}__vertical-align-top
|
76
|
+
td.#{$block-class}__expandable-row-cell {
|
77
|
+
padding-top: $spacing-03;
|
78
|
+
}
|
@@ -1,98 +0,0 @@
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
|
-
/**
|
3
|
-
* Copyright IBM Corp. 2023, 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
|
-
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
10
|
-
export var useIntersection = function useIntersection(element, threshold) {
|
11
|
-
var _useState = useState(false),
|
12
|
-
_useState2 = _slicedToArray(_useState, 2),
|
13
|
-
isVisible = _useState2[0],
|
14
|
-
setState = _useState2[1];
|
15
|
-
useEffect(function () {
|
16
|
-
var el = element.current;
|
17
|
-
var observer = new IntersectionObserver(function (_ref) {
|
18
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
19
|
-
entry = _ref2[0];
|
20
|
-
setState(entry.isIntersecting);
|
21
|
-
}, {
|
22
|
-
threshold: threshold
|
23
|
-
});
|
24
|
-
el && observer.observe(el);
|
25
|
-
return function () {
|
26
|
-
return observer.unobserve(el);
|
27
|
-
};
|
28
|
-
}, [element, threshold]);
|
29
|
-
return isVisible;
|
30
|
-
};
|
31
|
-
export var useIsOverflow = function useIsOverflow(ref) {
|
32
|
-
var _useState3 = useState(),
|
33
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
34
|
-
isScrollable = _useState4[0],
|
35
|
-
setIsScrollable = _useState4[1];
|
36
|
-
var _useState5 = useState(),
|
37
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
38
|
-
mutationObserver = _useState6[0],
|
39
|
-
setMutationObserver = _useState6[1];
|
40
|
-
var _useState7 = useState(),
|
41
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
42
|
-
resizeObserver = _useState8[0],
|
43
|
-
setResizeObserver = _useState8[1];
|
44
|
-
var checkOverflow = useCallback(function () {
|
45
|
-
if (!ref.current) {
|
46
|
-
return;
|
47
|
-
}
|
48
|
-
var hasOverflow = ref.current.scrollWidth > ref.current.clientWidth;
|
49
|
-
setIsScrollable(hasOverflow);
|
50
|
-
}, [ref]);
|
51
|
-
useEffect(function () {
|
52
|
-
if (!mutationObserver) {
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
return function () {
|
56
|
-
if (mutationObserver) {
|
57
|
-
mutationObserver.disconnect();
|
58
|
-
}
|
59
|
-
if (resizeObserver) {
|
60
|
-
resizeObserver.disconnect();
|
61
|
-
}
|
62
|
-
};
|
63
|
-
});
|
64
|
-
useLayoutEffect(function () {
|
65
|
-
var current = ref.current;
|
66
|
-
if (current) {
|
67
|
-
if ('ResizeObserver' in window && !resizeObserver) {
|
68
|
-
setResizeObserver(new ResizeObserver(checkOverflow).observe(current));
|
69
|
-
}
|
70
|
-
if ('MutationObserver' in window && !mutationObserver) {
|
71
|
-
setMutationObserver(new MutationObserver(checkOverflow).observe(current, {
|
72
|
-
attributes: false,
|
73
|
-
childList: true,
|
74
|
-
subtree: false
|
75
|
-
}));
|
76
|
-
}
|
77
|
-
checkOverflow();
|
78
|
-
}
|
79
|
-
}, [ref, checkOverflow, mutationObserver, resizeObserver]);
|
80
|
-
return isScrollable;
|
81
|
-
};
|
82
|
-
export var useWindowEvent = function useWindowEvent(eventName, callback) {
|
83
|
-
var savedCallback = useRef(null);
|
84
|
-
useEffect(function () {
|
85
|
-
savedCallback.current = callback;
|
86
|
-
});
|
87
|
-
useEffect(function () {
|
88
|
-
function handler(event) {
|
89
|
-
if (savedCallback.current) {
|
90
|
-
savedCallback.current(event);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
window.addEventListener(eventName, handler);
|
94
|
-
return function () {
|
95
|
-
window.removeEventListener(eventName, handler);
|
96
|
-
};
|
97
|
-
}, [eventName]);
|
98
|
-
};
|
@@ -1,108 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.useWindowEvent = exports.useIsOverflow = exports.useIntersection = void 0;
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
|
-
var _react = require("react");
|
10
|
-
/**
|
11
|
-
* Copyright IBM Corp. 2023, 2023
|
12
|
-
*
|
13
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
15
|
-
*/
|
16
|
-
|
17
|
-
var useIntersection = function useIntersection(element, threshold) {
|
18
|
-
var _useState = (0, _react.useState)(false),
|
19
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
20
|
-
isVisible = _useState2[0],
|
21
|
-
setState = _useState2[1];
|
22
|
-
(0, _react.useEffect)(function () {
|
23
|
-
var el = element.current;
|
24
|
-
var observer = new IntersectionObserver(function (_ref) {
|
25
|
-
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
26
|
-
entry = _ref2[0];
|
27
|
-
setState(entry.isIntersecting);
|
28
|
-
}, {
|
29
|
-
threshold: threshold
|
30
|
-
});
|
31
|
-
el && observer.observe(el);
|
32
|
-
return function () {
|
33
|
-
return observer.unobserve(el);
|
34
|
-
};
|
35
|
-
}, [element, threshold]);
|
36
|
-
return isVisible;
|
37
|
-
};
|
38
|
-
exports.useIntersection = useIntersection;
|
39
|
-
var useIsOverflow = function useIsOverflow(ref) {
|
40
|
-
var _useState3 = (0, _react.useState)(),
|
41
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
42
|
-
isScrollable = _useState4[0],
|
43
|
-
setIsScrollable = _useState4[1];
|
44
|
-
var _useState5 = (0, _react.useState)(),
|
45
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
46
|
-
mutationObserver = _useState6[0],
|
47
|
-
setMutationObserver = _useState6[1];
|
48
|
-
var _useState7 = (0, _react.useState)(),
|
49
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
50
|
-
resizeObserver = _useState8[0],
|
51
|
-
setResizeObserver = _useState8[1];
|
52
|
-
var checkOverflow = (0, _react.useCallback)(function () {
|
53
|
-
if (!ref.current) {
|
54
|
-
return;
|
55
|
-
}
|
56
|
-
var hasOverflow = ref.current.scrollWidth > ref.current.clientWidth;
|
57
|
-
setIsScrollable(hasOverflow);
|
58
|
-
}, [ref]);
|
59
|
-
(0, _react.useEffect)(function () {
|
60
|
-
if (!mutationObserver) {
|
61
|
-
return;
|
62
|
-
}
|
63
|
-
return function () {
|
64
|
-
if (mutationObserver) {
|
65
|
-
mutationObserver.disconnect();
|
66
|
-
}
|
67
|
-
if (resizeObserver) {
|
68
|
-
resizeObserver.disconnect();
|
69
|
-
}
|
70
|
-
};
|
71
|
-
});
|
72
|
-
(0, _react.useLayoutEffect)(function () {
|
73
|
-
var current = ref.current;
|
74
|
-
if (current) {
|
75
|
-
if ('ResizeObserver' in window && !resizeObserver) {
|
76
|
-
setResizeObserver(new ResizeObserver(checkOverflow).observe(current));
|
77
|
-
}
|
78
|
-
if ('MutationObserver' in window && !mutationObserver) {
|
79
|
-
setMutationObserver(new MutationObserver(checkOverflow).observe(current, {
|
80
|
-
attributes: false,
|
81
|
-
childList: true,
|
82
|
-
subtree: false
|
83
|
-
}));
|
84
|
-
}
|
85
|
-
checkOverflow();
|
86
|
-
}
|
87
|
-
}, [ref, checkOverflow, mutationObserver, resizeObserver]);
|
88
|
-
return isScrollable;
|
89
|
-
};
|
90
|
-
exports.useIsOverflow = useIsOverflow;
|
91
|
-
var useWindowEvent = function useWindowEvent(eventName, callback) {
|
92
|
-
var savedCallback = (0, _react.useRef)(null);
|
93
|
-
(0, _react.useEffect)(function () {
|
94
|
-
savedCallback.current = callback;
|
95
|
-
});
|
96
|
-
(0, _react.useEffect)(function () {
|
97
|
-
function handler(event) {
|
98
|
-
if (savedCallback.current) {
|
99
|
-
savedCallback.current(event);
|
100
|
-
}
|
101
|
-
}
|
102
|
-
window.addEventListener(eventName, handler);
|
103
|
-
return function () {
|
104
|
-
window.removeEventListener(eventName, handler);
|
105
|
-
};
|
106
|
-
}, [eventName]);
|
107
|
-
};
|
108
|
-
exports.useWindowEvent = useWindowEvent;
|