@carbon/ibm-products 1.51.0 → 1.53.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/README.md +10 -5
  2. package/css/index-full-carbon.css +89 -64
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +1 -1
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon.css +89 -64
  7. package/css/index-without-carbon.css.map +1 -1
  8. package/css/index-without-carbon.min.css +1 -1
  9. package/css/index-without-carbon.min.css.map +1 -1
  10. package/css/index.css +89 -64
  11. package/css/index.css.map +1 -1
  12. package/css/index.min.css +1 -1
  13. package/css/index.min.css.map +1 -1
  14. package/es/components/AboutModal/AboutModal.js +3 -4
  15. package/es/components/ActionBar/ActionBar.js +9 -18
  16. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -13
  17. package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
  18. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +5 -5
  19. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
  20. package/es/components/Datagrid/index.js +1 -0
  21. package/es/components/Datagrid/useActionsColumn.js +10 -7
  22. package/es/components/Datagrid/useCustomizeColumns.js +5 -1
  23. package/es/components/Datagrid/useEditableCell.js +12 -0
  24. package/es/components/Datagrid/useExpandedRow.js +11 -7
  25. package/es/components/Datagrid/useFiltering.js +11 -8
  26. package/es/components/Datagrid/useInlineEdit.js +17 -8
  27. package/es/components/Datagrid/useNestedRows.js +10 -6
  28. package/es/components/ExampleComponent/ExampleComponent.js +32 -4
  29. package/es/components/ExampleComponent/useExample.js +49 -0
  30. package/es/components/InlineEditV1/InlineEditV1.js +3 -1
  31. package/es/components/NonLinearReading/NonLinearReading.js +7 -7
  32. package/es/components/PageHeader/PageHeader.js +28 -31
  33. package/es/components/SidePanel/SidePanel.js +25 -26
  34. package/es/components/TagSet/TagSet.js +5 -7
  35. package/es/components/Tearsheet/TearsheetShell.js +4 -6
  36. package/es/components/index.js +1 -1
  37. package/es/global/js/hooks/useResizeObserver.js +74 -0
  38. package/es/global/js/package-settings.js +34 -4
  39. package/es/global/js/utils/test-helper.js +34 -3
  40. package/es/settings.js +26 -30
  41. package/lib/components/AboutModal/AboutModal.js +3 -4
  42. package/lib/components/ActionBar/ActionBar.js +9 -18
  43. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -13
  44. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
  45. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +4 -4
  46. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
  47. package/lib/components/Datagrid/index.js +7 -0
  48. package/lib/components/Datagrid/useActionsColumn.js +7 -1
  49. package/lib/components/Datagrid/useCustomizeColumns.js +4 -0
  50. package/lib/components/Datagrid/useEditableCell.js +20 -0
  51. package/lib/components/Datagrid/useExpandedRow.js +4 -0
  52. package/lib/components/Datagrid/useFiltering.js +4 -0
  53. package/lib/components/Datagrid/useInlineEdit.js +19 -8
  54. package/lib/components/Datagrid/useNestedRows.js +9 -6
  55. package/lib/components/ExampleComponent/ExampleComponent.js +35 -4
  56. package/lib/components/ExampleComponent/useExample.js +58 -0
  57. package/lib/components/InlineEditV1/InlineEditV1.js +3 -1
  58. package/lib/components/NonLinearReading/NonLinearReading.js +6 -6
  59. package/lib/components/PageHeader/PageHeader.js +28 -31
  60. package/lib/components/SidePanel/SidePanel.js +25 -26
  61. package/lib/components/TagSet/TagSet.js +5 -7
  62. package/lib/components/Tearsheet/TearsheetShell.js +4 -6
  63. package/lib/components/index.js +6 -0
  64. package/lib/global/js/hooks/useResizeObserver.js +83 -0
  65. package/lib/global/js/package-settings.js +33 -3
  66. package/lib/global/js/utils/test-helper.js +37 -5
  67. package/lib/settings.js +26 -30
  68. package/package.json +2 -3
  69. package/scss/components/NonLinearReading/_non-linear-reading.scss +76 -67
  70. package/scss/components/NonLinearReading/_storybook-styles.scss +16 -0
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": "1.51.0",
4
+ "version": "1.53.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -77,7 +77,6 @@
77
77
  "immutability-helper": "^3.1.1",
78
78
  "react-dnd": "^15.1.2",
79
79
  "react-dnd-html5-backend": "^15.1.3",
80
- "react-resize-detector": "^8.0.3",
81
80
  "react-table": "^7.8.0",
82
81
  "react-window": "^1.8.8"
83
82
  },
@@ -95,5 +94,5 @@
95
94
  "react": "^16.8.6 || ^17.0.1",
96
95
  "react-dom": "^16.8.6 || ^17.0.1"
97
96
  },
98
- "gitHead": "fb3bdbfbe2b40dc57f5c9657e83c9ef48ccd2520"
97
+ "gitHead": "7b07c65caa761dee2617c30cc8d299eed112d718"
99
98
  }
@@ -8,31 +8,35 @@
8
8
  // Standard imports.
9
9
  @import '../../global/styles/project-settings';
10
10
 
11
- @mixin term-closed-defaults {
11
+ @mixin keyword-closed-defaults {
12
+ height: rem(20px);
13
+ padding-top: 0;
12
14
  // stylelint-disable-next-line carbon/layout-token-use
13
- padding: rem(1px) $spacing-03 rem(1px) $spacing-03;
14
- border: none;
15
+ padding-right: rem(3px);
16
+ border-width: rem(1px);
17
+ border-style: solid;
15
18
  border-radius: $spacing-04;
16
- background-color: $interactive-02;
17
19
  white-space: nowrap;
18
20
 
19
21
  &:hover {
20
- background-color: $hover-secondary;
21
22
  cursor: pointer;
22
23
  }
23
- }
24
- @mixin term-open-defaults {
25
- @include term-closed-defaults();
26
-
27
- padding-right: 0;
28
24
 
25
+ // The "up" chevron
29
26
  svg {
30
27
  // stylelint-disable-next-line carbon/layout-token-use
31
- padding-top: rem(1px);
32
- margin: 0 $spacing-02 0 $spacing-01;
28
+ margin: rem(1px) 0 0 0;
33
29
  vertical-align: text-top;
34
30
  }
35
31
  }
32
+ @mixin keyword-open-defaults {
33
+ @include keyword-closed-defaults();
34
+
35
+ // The "up" chevron, flipped
36
+ svg {
37
+ transform: rotate(180deg);
38
+ }
39
+ }
36
40
  @mixin body-defaults {
37
41
  @include carbon--type-style('body-long-01');
38
42
 
@@ -48,10 +52,13 @@
48
52
 
49
53
  // Other Carbon settings.
50
54
  // TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
55
+
51
56
  // NonLinearReading uses the following Carbon components:
52
57
  // TODO: @import(s) of Carbon component styles used by NonLinearReading
58
+
53
59
  // NonLinearReading uses the following Carbon for IBM Products components:
54
60
  // TODO: @import(s) of IBM Products component styles used by NonLinearReading
61
+
55
62
  // Define all component styles in a mixin which is then exported using
56
63
  // the Carbon import-once mechanism.
57
64
  @mixin non-linear-reading {
@@ -72,86 +79,88 @@
72
79
  }
73
80
  }
74
81
 
75
- .#{$block-class} {
76
- &__term {
77
- &-light {
78
- &--closed {
79
- @include term-closed-defaults();
82
+ .#{$block-class}__light {
83
+ .#{$block-class}__keyword {
84
+ &-closed {
85
+ @include keyword-closed-defaults();
80
86
 
81
- background-color: $interactive-02;
82
- color: $inverse-01;
87
+ border-color: $interactive-03;
88
+ background-color: transparent;
89
+ color: $interactive-03;
83
90
 
84
- &:hover {
85
- background-color: $hover-secondary;
86
- }
91
+ &:hover {
92
+ background-color: $interactive-03;
93
+ color: $inverse-01;
87
94
  }
95
+ }
88
96
 
89
- &--open {
90
- @include term-open-defaults();
97
+ &-open {
98
+ @include keyword-open-defaults();
91
99
 
92
- // Novice to pro does not always use Carbon defaults/tokens
93
- // stylelint-disable-next-line carbon/theme-token-use
94
- background-color: $purple-20;
95
- color: $text-01;
100
+ border-color: $interactive-03;
101
+ background-color: $interactive-03;
102
+ color: $inverse-01;
96
103
 
97
- &:hover {
98
- // stylelint-disable-next-line carbon/theme-token-use
99
- background-color: #dcc7ff;
100
- }
104
+ &:hover {
105
+ background-color: transparent;
106
+ color: $interactive-03;
101
107
  }
102
108
  }
109
+ }
103
110
 
104
- &-dark {
105
- &--closed {
106
- @include carbon--theme($carbon--theme--g100, true);
107
- @include term-closed-defaults();
111
+ .#{$block-class}__body {
112
+ @include body-defaults();
108
113
 
109
- background-color: $interactive-02;
110
- color: $text-04;
114
+ border-left-color: $text-01;
115
+ }
116
+ }
117
+
118
+ .#{$block-class}__dark {
119
+ .#{$block-class}__keyword {
120
+ &-closed {
121
+ @include carbon--theme($carbon--theme--g100, true);
122
+ @include keyword-closed-defaults();
111
123
 
112
- &:hover {
113
- background-color: $hover-secondary;
114
- }
124
+ border-color: $icon-03;
125
+ background-color: transparent;
126
+ color: $text-01;
127
+
128
+ &:hover {
129
+ background-color: $icon-03;
130
+ color: $inverse-01;
115
131
  }
132
+ }
116
133
 
117
- &--open {
118
- @include carbon--theme($carbon--theme--g100, true);
119
- @include term-open-defaults();
134
+ &-open {
135
+ @include carbon--theme($carbon--theme--g100, true);
136
+ @include keyword-open-defaults();
120
137
 
121
- // stylelint-disable-next-line carbon/theme-token-use
122
- background-color: #491d8b;
123
- color: $text-04;
138
+ border-color: $icon-03;
139
+ background-color: $icon-03;
140
+ color: $inverse-01;
124
141
 
125
- &:hover {
126
- // stylelint-disable-next-line carbon/theme-token-use
127
- background-color: #7f3ae7;
128
- }
142
+ &:hover {
143
+ background-color: transparent;
144
+ color: $text-01;
129
145
  }
130
146
  }
131
147
  }
132
148
 
133
- &--body {
134
- &-light {
135
- @include body-defaults();
136
-
137
- // stylelint-disable-next-line carbon/theme-token-use
138
- border-left-color: #6929c4;
139
- // stylelint-disable-next-line carbon/theme-token-use
140
- color: #6929c4;
141
- }
149
+ .#{$block-class}__body {
150
+ @include carbon--theme($carbon--theme--g100, true);
151
+ @include body-defaults();
142
152
 
143
- &-dark {
144
- @include carbon--theme($carbon--theme--g100, true);
145
- @include body-defaults();
153
+ border-left-color: $text-01;
154
+ color: $text-01;
146
155
 
147
- // stylelint-disable-next-line carbon/theme-token-use
148
- border-left-color: #d4bbff;
149
- // stylelint-disable-next-line carbon/theme-token-use
150
- color: #d4bbff;
156
+ // override default link color to compensate for a gradient background.
157
+ a {
158
+ color: $link-01;
151
159
  }
152
160
  }
153
161
  }
154
162
  }
163
+
155
164
  @include exports('non-linear-reading') {
156
165
  @include non-linear-reading;
157
166
  }
@@ -11,3 +11,19 @@
11
11
  #root {
12
12
  @include carbon--type-style('body-long-01');
13
13
  }
14
+
15
+ // The layout has been changed from middle/center to top/left, because
16
+ // the component can expand, and it looks weird when expanding vertically
17
+ // from the middle of the page instead of "dropping down" from above.
18
+ // Margin provides spacing from the edge of the viewport.
19
+ .non-linear-reading-stories__viewport {
20
+ margin: $spacing-10; // 64px
21
+ }
22
+
23
+ .gradient-bg {
24
+ @include carbon--theme($carbon--theme--g100, true);
25
+
26
+ padding: $spacing-05;
27
+ background: linear-gradient(90deg, $blue-90 0%, $purple-70 100%);
28
+ color: $text-01;
29
+ }