@carbon/ibm-products 2.10.2 → 2.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. package/README.md +7 -0
  2. package/css/index-full-carbon.css +71 -26
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +3 -3
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +1 -0
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +71 -26
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -3
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +68 -25
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +2 -2
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/APIKeyModal/APIKeyModal.js +10 -3
  18. package/es/components/AboutModal/AboutModal.js +10 -3
  19. package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +17 -5
  20. package/es/components/CreateModal/CreateModal.js +10 -3
  21. package/es/components/Datagrid/Datagrid/DatagridContent.js +9 -7
  22. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +3 -2
  23. package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
  24. package/es/components/Datagrid/Datagrid/DatagridRow.js +47 -40
  25. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +30 -37
  26. package/es/components/Datagrid/Datagrid/DraggableElement.js +36 -132
  27. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +17 -49
  28. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +125 -40
  29. package/es/components/Datagrid/Extensions/ExpandableRow/ExpandableRow.docs-page.js +1 -1
  30. package/es/components/Datagrid/useExpandedRow.js +1 -1
  31. package/es/components/Datagrid/useNestedRowExpander.js +22 -9
  32. package/es/components/Datagrid/useRowExpander.js +22 -9
  33. package/es/components/Datagrid/utils/DatagridActions.js +1 -1
  34. package/es/components/Datagrid/utils/DatagridPagination.js +1 -1
  35. package/es/components/Datagrid/utils/getArgTypes.js +12 -0
  36. package/es/components/EditTearsheet/EditTearsheet.js +47 -38
  37. package/es/components/EditTearsheet/EditTearsheetForm.js +6 -0
  38. package/es/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +6 -1
  39. package/es/components/EmptyStates/EmptyState.js +1 -1
  40. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  41. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  42. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  43. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  44. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  45. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  46. package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -11
  47. package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -11
  48. package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
  49. package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
  50. package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
  51. package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
  52. package/es/components/ExportModal/ExportModal.js +10 -3
  53. package/es/components/ImportModal/ImportModal.js +10 -3
  54. package/es/components/RemoveModal/RemoveModal.js +10 -3
  55. package/es/components/TagSet/TagSet.js +5 -21
  56. package/es/components/TagSet/TagSetModal.js +7 -3
  57. package/es/components/Tearsheet/Tearsheet.js +2 -2
  58. package/es/components/Tearsheet/TearsheetNarrow.js +2 -2
  59. package/es/components/Tearsheet/TearsheetShell.js +14 -28
  60. package/es/global/decorators/sidePanelDecorator.js +7 -0
  61. package/es/global/js/hooks/usePortalTarget.js +30 -0
  62. package/es/global/js/hooks/useRetrieveFormTitles.js +20 -0
  63. package/es/global/js/hooks/useWindowScroll.js +5 -0
  64. package/es/global/js/package-settings.js +0 -1
  65. package/es/global/js/utils/getNodeTextContent.js +47 -0
  66. package/flags.js +6 -0
  67. package/lib/components/APIKeyModal/APIKeyModal.js +10 -3
  68. package/lib/components/AboutModal/AboutModal.js +10 -3
  69. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +17 -5
  70. package/lib/components/CreateModal/CreateModal.js +10 -3
  71. package/lib/components/Datagrid/Datagrid/DatagridContent.js +9 -7
  72. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -1
  73. package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
  74. package/lib/components/Datagrid/Datagrid/DatagridRow.js +46 -41
  75. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +30 -37
  76. package/lib/components/Datagrid/Datagrid/DraggableElement.js +37 -137
  77. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +20 -49
  78. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +130 -47
  79. package/lib/components/Datagrid/Extensions/ExpandableRow/ExpandableRow.docs-page.js +1 -1
  80. package/lib/components/Datagrid/useExpandedRow.js +1 -1
  81. package/lib/components/Datagrid/useNestedRowExpander.js +24 -9
  82. package/lib/components/Datagrid/useRowExpander.js +24 -9
  83. package/lib/components/Datagrid/utils/DatagridActions.js +1 -1
  84. package/lib/components/Datagrid/utils/DatagridPagination.js +1 -1
  85. package/lib/components/Datagrid/utils/getArgTypes.js +12 -0
  86. package/lib/components/EditTearsheet/EditTearsheet.js +47 -38
  87. package/lib/components/EditTearsheet/EditTearsheetForm.js +6 -0
  88. package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +6 -1
  89. package/lib/components/EmptyStates/EmptyState.js +1 -1
  90. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
  91. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
  92. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
  93. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
  94. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
  95. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
  96. package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -11
  97. package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -11
  98. package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
  99. package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
  100. package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
  101. package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
  102. package/lib/components/ExportModal/ExportModal.js +10 -3
  103. package/lib/components/ImportModal/ImportModal.js +10 -3
  104. package/lib/components/RemoveModal/RemoveModal.js +10 -3
  105. package/lib/components/TagSet/TagSet.js +5 -21
  106. package/lib/components/TagSet/TagSetModal.js +7 -3
  107. package/lib/components/Tearsheet/Tearsheet.js +2 -2
  108. package/lib/components/Tearsheet/TearsheetNarrow.js +2 -2
  109. package/lib/components/Tearsheet/TearsheetShell.js +14 -28
  110. package/lib/global/decorators/sidePanelDecorator.js +7 -0
  111. package/lib/global/js/hooks/usePortalTarget.js +38 -0
  112. package/lib/global/js/hooks/useRetrieveFormTitles.js +28 -0
  113. package/lib/global/js/hooks/useWindowScroll.js +6 -0
  114. package/lib/global/js/package-settings.js +0 -1
  115. package/lib/global/js/utils/getNodeTextContent.js +55 -0
  116. package/package.json +7 -3
  117. package/scss/components/ActionSet/_action-set.scss +2 -1
  118. package/scss/components/Datagrid/_datagrid.scss +9 -0
  119. package/scss/components/Datagrid/styles/_datagrid.scss +7 -6
  120. package/scss/components/Datagrid/styles/_draggableElement.scss +34 -16
  121. package/scss/components/Datagrid/styles/_useExpandedRow.scss +13 -0
  122. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +1 -1
  123. package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +23 -11
  124. package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +7 -3
  125. package/scss/components/FilterSummary/_filter-summary.scss +3 -1
  126. package/scss/global/decorators/_side-panel-decorator.scss +7 -0
  127. package/scss/global/js/utils/_story-as-full-page.scss +0 -6
@@ -15,7 +15,6 @@
15
15
  display: flex;
16
16
  align-items: center;
17
17
  margin-right: $spacing-03;
18
- cursor: grab;
19
18
  }
20
19
 
21
20
  .#{variables.$block-class}__draggable-handleStyle.disabled {
@@ -26,32 +25,56 @@
26
25
  fill: $icon-on-color-disabled;
27
26
  }
28
27
 
28
+ .#{variables.$block-class}__draggable-underlay {
29
+ position: absolute;
30
+ width: 100%;
31
+ }
32
+
33
+ .#{variables.$block-class}__draggable-underlay-item {
34
+ // must match draggable item size
35
+ width: 100%;
36
+ height: $spacing-09;
37
+ border: 2px dashed $focus;
38
+ /* stylelint-disable-next-line carbon/theme-token-use */
39
+ background-color: colors.$blue-10; // not good in dark mode
40
+ }
41
+
29
42
  .#{variables.$block-class}__draggable-handleHolder {
43
+ position: relative; // above underlay
30
44
  display: flex;
31
45
  height: $spacing-09;
32
46
  border-bottom: 1px solid $layer-active;
33
47
  background-color: $layer;
48
+ cursor: grab;
34
49
  }
35
50
 
36
51
  .#{variables.$block-class}__draggable-handleHolder:hover {
37
52
  background-color: $layer-hover;
38
53
  }
39
54
 
40
- .#{variables.$block-class}__draggable-handleHolder-selected {
41
- display: flex;
42
- height: $spacing-09;
43
- border-bottom: 1px solid $layer-active;
55
+ .#{variables.$block-class}__draggable-handleHolder:focus {
56
+ box-shadow: inset 0 0 0 1px $focus;
57
+ outline: none;
58
+ }
59
+
60
+ .#{variables.$block-class}__draggable-handleHolder--selected {
44
61
  background-color: $layer-selected;
45
62
  }
46
63
 
47
- .#{variables.$block-class}__draggable-handleHolder-selected:hover {
48
- background-color: $layer-selected-hover-01;
64
+ .#{variables.$block-class}__draggable-handleHolder--dragging {
65
+ z-index: 2; // raise above other items in draggable list
66
+ background-color: $highlight;
67
+ color: $text-primary;
68
+ outline: none;
49
69
  }
50
70
 
51
- .#{variables.$block-class}__draggable-handleHolder-isOver {
52
- border: 2px dashed $focus;
53
- /* stylelint-disable-next-line carbon/theme-token-use */
54
- background-color: colors.$blue-10;
71
+ .#{variables.$block-class}__draggable-handleHolder:active,
72
+ .#{variables.$block-class}__draggable-handleHolder--dragging {
73
+ cursor: grabbing;
74
+ }
75
+
76
+ .#{variables.$block-class}__draggable-handleHolder-selected:hover {
77
+ background-color: $layer-selected-hover-01;
55
78
  }
56
79
 
57
80
  .#{variables.$block-class}__draggable-handleHolder-droppable {
@@ -69,11 +92,6 @@
69
92
  transition: opacity $duration-moderate-01 motion(entrance, productive);
70
93
  }
71
94
 
72
- .#{variables.$block-class}__draggable-handleHolder-grabbed {
73
- background-color: $highlight;
74
- color: $text-primary;
75
- }
76
-
77
95
  .#{variables.$block-class}__draggable-handleHolder--sticky {
78
96
  color: $text-on-color-disabled;
79
97
  }
@@ -52,9 +52,22 @@
52
52
  width: $spacing-07;
53
53
  height: $spacing-07;
54
54
  min-height: $spacing-07;
55
+ align-items: center;
55
56
  justify-content: center;
56
57
  padding: 0;
57
58
  .#{variables.$block-class}__row-expander--icon {
58
59
  fill: $layer-selected-inverse;
59
60
  }
60
61
  }
62
+
63
+ .#{variables.$block-class}
64
+ .#{c4p-settings.$carbon-prefix}--data-table
65
+ tbody
66
+ tr:hover
67
+ + .#{variables.$block-class}__expanded-row,
68
+ .#{variables.$block-class} .#{variables.$block-class}__expanded-row:hover,
69
+ .#{variables.$block-class}
70
+ .#{variables.$block-class}__expandable-row--hover
71
+ td {
72
+ background: $layer-hover;
73
+ }
@@ -40,7 +40,7 @@
40
40
  .#{variables.$block-class}__customize-columns-checkbox-visible-label {
41
41
  // Disabling linter only to match the spacing that Carbon uses for the Checkbox label
42
42
  /* stylelint-disable-next-line */
43
- padding-left: convert.rem(6px);
43
+ padding-left: convert.to-rem(6px);
44
44
  }
45
45
 
46
46
  .#{variables.$block-class}__customize-columns-column-list
@@ -9,6 +9,7 @@
9
9
  // stylelint-disable carbon/layout-token-use
10
10
 
11
11
  @use '@carbon/styles/scss/theme' as *;
12
+ @use '@carbon/layout/scss/convert' as *;
12
13
  @use '@carbon/styles/scss/spacing' as *;
13
14
  @use '@carbon/styles/scss/type' as *;
14
15
  @use '@carbon/layout' as *;
@@ -16,7 +17,8 @@
16
17
  @use '../../../../global/styles/project-settings' as c4p-settings;
17
18
  @use '../variables';
18
19
 
19
- $action-set-height: rem(64px);
20
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
21
+ $action-set-height: to-rem(64px);
20
22
 
21
23
  .#{variables.$block-class}-filter-flyout__container {
22
24
  position: relative;
@@ -27,9 +29,11 @@ $action-set-height: rem(64px);
27
29
  top: $spacing-09;
28
30
  right: 0;
29
31
  display: none;
30
- width: rem(642px);
32
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
33
+ width: to-rem(642px);
31
34
  background-color: $layer-02;
32
- box-shadow: 0 1px rem(8px) 0 rgba(0, 0, 0, 0.25);
35
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
36
+ box-shadow: 0 1px to-rem(8px) 0 rgba(0, 0, 0, 0.25);
33
37
  }
34
38
 
35
39
  .#{variables.$block-class}-filter-flyout--open {
@@ -37,12 +41,15 @@ $action-set-height: rem(64px);
37
41
  }
38
42
 
39
43
  .#{variables.$block-class}-filter-flyout--batch {
40
- min-height: rem(346px);
41
- grid-template-rows: 1fr rem(48px);
44
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
45
+ min-height: to-rem(346px);
46
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
47
+ grid-template-rows: 1fr to-rem(48px);
42
48
  }
43
49
 
44
50
  .#{variables.$block-class}-filter-flyout--instant {
45
- min-height: rem(282px);
51
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
52
+ min-height: to-rem(282px);
46
53
  grid-template-rows: 1fr;
47
54
  }
48
55
 
@@ -52,11 +59,14 @@ $action-set-height: rem(64px);
52
59
 
53
60
  .#{variables.$block-class}-filter-flyout__inner-container::before {
54
61
  position: absolute;
55
- top: rem(-7px);
62
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
63
+ top: to-rem(-7px);
56
64
  right: 1px;
57
65
  display: block;
58
- width: rem(46px);
59
- height: rem(15px);
66
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
67
+ width: to-rem(46px);
68
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
69
+ height: to-rem(15px);
60
70
  background-color: $layer-02;
61
71
  content: '';
62
72
  }
@@ -70,7 +80,8 @@ $action-set-height: rem(64px);
70
80
 
71
81
  .#{variables.$block-class}-filter-flyout__filters {
72
82
  display: grid;
73
- gap: rem(16px) rem(32px);
83
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
84
+ gap: to-rem(16px) rem(32px);
74
85
  grid-template-columns: 1fr 1fr;
75
86
  }
76
87
 
@@ -85,7 +96,8 @@ $action-set-height: rem(64px);
85
96
  .#{variables.$block-class}-filter-flyout__trigger--open.#{c4p-settings.$carbon-prefix}--btn.#{c4p-settings.$carbon-prefix}--btn--icon-only {
86
97
  position: relative;
87
98
  background-color: $layer-02;
88
- box-shadow: 0 1px rem(8px) 0 rgba(0, 0, 0, 0.25);
99
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
100
+ box-shadow: 0 1px to-rem(8px) 0 rgba(0, 0, 0, 0.25);
89
101
  }
90
102
 
91
103
  .#{variables.$block-class}-filter-flyout
@@ -8,13 +8,15 @@
8
8
 
9
9
  @use '../variables' as *;
10
10
  @use '@carbon/styles/scss/theme' as *;
11
+ @use '@carbon/layout/scss/convert' as *;
11
12
  @use '@carbon/styles/scss/spacing' as *;
12
13
  @use '@carbon/styles/scss/type' as *;
13
14
  @use '../../../../global/styles/project-settings' as c4p-settings;
14
15
 
15
16
  .#{$block-class}-filter-panel__container {
16
17
  position: relative;
17
- width: rem(320px);
18
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
19
+ width: to-rem(320px);
18
20
  height: clamp(var(--filter-panel-min-height), 100%, 100vh);
19
21
  border-top: 1px $layer-accent-01 solid;
20
22
  background-color: $layer-01;
@@ -29,7 +31,8 @@
29
31
  top: -1px; // stylelint-disable-line
30
32
  left: 0;
31
33
  display: block;
32
- width: rem(47px); // size of filter panel button
34
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
35
+ width: to-rem(47px); // size of filter panel button
33
36
  height: 1px;
34
37
  background-color: $layer-01;
35
38
  content: '';
@@ -95,7 +98,8 @@
95
98
  position: sticky;
96
99
  z-index: 1; // To layer action set on top of content behind when sticky
97
100
  bottom: 0;
98
- height: rem(64px);
101
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
102
+ height: to-rem(64px);
99
103
  margin-top: auto;
100
104
  }
101
105
 
@@ -5,6 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
  @use '../../global/styles/project-settings' as *;
8
+ @use '@carbon/layout/scss/convert' as *;
8
9
  @use '@carbon/styles/scss/spacing' as *;
9
10
  @use '@carbon/styles/scss/theme' as *;
10
11
 
@@ -13,7 +14,8 @@ $block-class: #{$pkg-prefix}--filter-summary;
13
14
  .#{$block-class} {
14
15
  display: flex;
15
16
  width: 100%;
16
- height: rem(48px);
17
+ /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
18
+ height: to-rem(48px);
17
19
  align-items: center;
18
20
  padding: $spacing-03;
19
21
  border-top: 1px solid $border-subtle-01;
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 2023
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
+
1
8
  @mixin side-panel-decorator($prefix) {
2
9
  .#{$prefix}container {
3
10
  display: flex;
@@ -1,6 +0,0 @@
1
- .story-helper__full-page {
2
- display: flex;
3
- width: 100vw;
4
- height: 100vh;
5
- flex-direction: column;
6
- }