@carbon/ibm-products 1.5.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/css/index-full-carbon.css +389 -139
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +9 -3
  4. package/css/index-full-carbon.min.css.map +1 -0
  5. package/css/index-without-carbon-released-only.css +33 -27
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -3
  8. package/css/index-without-carbon-released-only.min.css.map +1 -0
  9. package/css/index-without-carbon.css +330 -133
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +9 -3
  12. package/css/index-without-carbon.min.css.map +1 -0
  13. package/css/index.css +332 -135
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +9 -3
  16. package/css/index.min.css.map +1 -0
  17. package/es/components/APIKeyModal/APIKeyModal.js +10 -13
  18. package/es/components/ActionBar/ActionBar.js +0 -3
  19. package/es/components/ActionBar/ActionBarItem.js +2 -6
  20. package/es/components/ActionSet/ActionSet.js +11 -13
  21. package/es/components/AddSelect/AddSelect.js +122 -72
  22. package/es/components/AddSelect/AddSelectBreadcrumbs.js +56 -0
  23. package/es/components/AddSelect/AddSelectList.js +94 -0
  24. package/es/components/AddSelect/AddSelectSidebar.js +110 -0
  25. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -5
  26. package/es/components/ButtonMenu/ButtonMenu.js +6 -4
  27. package/es/components/ButtonMenu/ButtonMenuItem.js +1 -2
  28. package/es/components/Card/Card.js +37 -25
  29. package/es/components/Card/CardFooter.js +14 -10
  30. package/es/components/Card/CardHeader.js +8 -6
  31. package/es/components/Cascade/Cascade.js +5 -4
  32. package/es/components/ComboButton/ComboButton.js +0 -4
  33. package/es/components/ComboButton/ComboButtonItem/index.js +0 -5
  34. package/es/components/CreateFullPage/CreateFullPageStep.js +15 -8
  35. package/es/components/CreateModal/CreateModal.js +1 -4
  36. package/es/components/CreateTearsheet/CreateTearsheet.js +10 -11
  37. package/es/components/CreateTearsheet/CreateTearsheetStep.js +18 -14
  38. package/es/components/DataSpreadsheet/DataSpreadsheet.js +414 -0
  39. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +138 -0
  40. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +64 -0
  41. package/es/components/DataSpreadsheet/createActiveCellFn.js +45 -0
  42. package/es/components/DataSpreadsheet/generateData.js +47 -0
  43. package/es/components/DataSpreadsheet/getCellSize.js +30 -0
  44. package/es/components/{CancelableTextEdit → DataSpreadsheet}/index.js +2 -2
  45. package/es/components/EditSidePanel/EditSidePanel.js +9 -10
  46. package/es/components/EmptyStates/EmptyState.js +8 -7
  47. package/es/components/EmptyStates/EmptyStateContent.js +2 -2
  48. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +5 -9
  49. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +5 -9
  50. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +5 -9
  51. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +5 -9
  52. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +5 -9
  53. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +5 -9
  54. package/es/components/ExampleComponent/ExampleComponent.js +12 -13
  55. package/es/components/ExportModal/ExportModal.js +13 -9
  56. package/es/components/ExpressiveCard/ExpressiveCard.js +0 -8
  57. package/es/components/ImportModal/ImportModal.js +7 -5
  58. package/es/components/InlineEdit/InlineEdit.js +256 -88
  59. package/es/components/LoadingBar/LoadingBar.js +13 -17
  60. package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
  61. package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
  62. package/es/components/ModifiedTabs/ModifiedTabs.js +24 -18
  63. package/es/components/NotificationsPanel/NotificationsPanel.js +125 -89
  64. package/es/components/OptionsTile/OptionsTile.js +6 -9
  65. package/es/components/PageHeader/PageHeader.js +19 -13
  66. package/es/components/PageHeader/PageHeaderTitle.js +10 -6
  67. package/es/components/ProductiveCard/ProductiveCard.js +23 -12
  68. package/es/components/RemoveModal/RemoveModal.js +0 -3
  69. package/es/components/SidePanel/SidePanel.js +54 -32
  70. package/es/components/TagSet/TagSet.js +13 -9
  71. package/es/components/TagSet/TagSetModal.js +16 -12
  72. package/es/components/TagSet/TagSetOverflow.js +21 -13
  73. package/es/components/Tearsheet/Tearsheet.js +27 -18
  74. package/es/components/Tearsheet/TearsheetNarrow.js +18 -15
  75. package/es/components/Tearsheet/TearsheetShell.js +3 -4
  76. package/es/components/Toolbar/ToolbarButton.js +0 -3
  77. package/es/components/WebTerminal/WebTerminal.js +18 -19
  78. package/es/components/index.js +2 -2
  79. package/es/global/js/hooks/index.js +1 -0
  80. package/es/global/js/hooks/useActiveElement.js +27 -0
  81. package/es/global/js/package-settings.js +2 -1
  82. package/es/global/js/utils/Wrap.js +7 -5
  83. package/es/global/js/utils/getScrollbarWidth.js +14 -0
  84. package/es/settings.js +0 -5
  85. package/lib/components/APIKeyModal/APIKeyModal.js +10 -13
  86. package/lib/components/ActionBar/ActionBar.js +0 -3
  87. package/lib/components/ActionBar/ActionBarItem.js +2 -6
  88. package/lib/components/ActionSet/ActionSet.js +11 -13
  89. package/lib/components/AddSelect/AddSelect.js +126 -72
  90. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +71 -0
  91. package/lib/components/AddSelect/AddSelectList.js +112 -0
  92. package/lib/components/AddSelect/AddSelectSidebar.js +122 -0
  93. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +5 -5
  94. package/lib/components/ButtonMenu/ButtonMenu.js +6 -4
  95. package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
  96. package/lib/components/Card/Card.js +37 -25
  97. package/lib/components/Card/CardFooter.js +14 -10
  98. package/lib/components/Card/CardHeader.js +8 -6
  99. package/lib/components/Cascade/Cascade.js +5 -4
  100. package/lib/components/ComboButton/ComboButton.js +0 -4
  101. package/lib/components/ComboButton/ComboButtonItem/index.js +0 -5
  102. package/lib/components/CreateFullPage/CreateFullPageStep.js +17 -14
  103. package/lib/components/CreateModal/CreateModal.js +1 -4
  104. package/lib/components/CreateTearsheet/CreateTearsheet.js +10 -11
  105. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +20 -20
  106. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +438 -0
  107. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +161 -0
  108. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +80 -0
  109. package/lib/components/DataSpreadsheet/createActiveCellFn.js +56 -0
  110. package/lib/components/DataSpreadsheet/generateData.js +58 -0
  111. package/lib/components/DataSpreadsheet/getCellSize.js +39 -0
  112. package/lib/components/DataSpreadsheet/index.js +13 -0
  113. package/lib/components/EditSidePanel/EditSidePanel.js +9 -10
  114. package/lib/components/EmptyStates/EmptyState.js +10 -9
  115. package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
  116. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -8
  117. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -8
  118. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -8
  119. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -8
  120. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -8
  121. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -8
  122. package/lib/components/ExampleComponent/ExampleComponent.js +12 -13
  123. package/lib/components/ExportModal/ExportModal.js +13 -9
  124. package/lib/components/ExpressiveCard/ExpressiveCard.js +0 -8
  125. package/lib/components/ImportModal/ImportModal.js +7 -5
  126. package/lib/components/InlineEdit/InlineEdit.js +253 -87
  127. package/lib/components/LoadingBar/LoadingBar.js +13 -17
  128. package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
  129. package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
  130. package/lib/components/ModifiedTabs/ModifiedTabs.js +24 -18
  131. package/lib/components/NotificationsPanel/NotificationsPanel.js +122 -87
  132. package/lib/components/OptionsTile/OptionsTile.js +6 -9
  133. package/lib/components/PageHeader/PageHeader.js +18 -12
  134. package/lib/components/PageHeader/PageHeaderTitle.js +10 -6
  135. package/lib/components/ProductiveCard/ProductiveCard.js +24 -18
  136. package/lib/components/RemoveModal/RemoveModal.js +0 -3
  137. package/lib/components/SidePanel/SidePanel.js +54 -32
  138. package/lib/components/TagSet/TagSet.js +13 -9
  139. package/lib/components/TagSet/TagSetModal.js +17 -13
  140. package/lib/components/TagSet/TagSetOverflow.js +24 -19
  141. package/lib/components/Tearsheet/Tearsheet.js +26 -17
  142. package/lib/components/Tearsheet/TearsheetNarrow.js +18 -15
  143. package/lib/components/Tearsheet/TearsheetShell.js +2 -3
  144. package/lib/components/Toolbar/ToolbarButton.js +0 -3
  145. package/lib/components/WebTerminal/WebTerminal.js +18 -19
  146. package/lib/components/index.js +8 -8
  147. package/lib/global/js/hooks/index.js +8 -0
  148. package/lib/global/js/hooks/useActiveElement.js +39 -0
  149. package/lib/global/js/package-settings.js +2 -1
  150. package/lib/global/js/utils/Wrap.js +7 -5
  151. package/lib/global/js/utils/getScrollbarWidth.js +23 -0
  152. package/lib/settings.js +0 -6
  153. package/package.json +25 -23
  154. package/scss/components/AddSelect/_add-select.scss +59 -5
  155. package/scss/components/BreadcrumbWithOverflow/_index.scss +1 -1
  156. package/scss/components/CreateInfluencer/_create-influencer.scss +4 -4
  157. package/scss/components/CreateTearsheet/_create-tearsheet.scss +2 -2
  158. package/scss/components/CreateTearsheetNarrow/_storybook-styles.scss +0 -6
  159. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +102 -0
  160. package/scss/components/{CancelableTextEdit → DataSpreadsheet}/_index.scss +2 -2
  161. package/scss/components/DataSpreadsheet/_storybook-styles.scss +6 -0
  162. package/scss/components/EditSidePanel/_storybook-styles.scss +0 -8
  163. package/scss/components/InlineEdit/_inline-edit.scss +293 -10
  164. package/scss/components/InlineEdit/_storybook-styles.scss +12 -6
  165. package/scss/components/LoadingBar/_storybook-styles.scss +0 -5
  166. package/scss/components/NotificationsPanel/_notifications-panel.scss +2 -2
  167. package/scss/components/OptionsTile/_storybook-styles.scss +0 -7
  168. package/scss/components/PageHeader/_index.scss +1 -1
  169. package/scss/components/PageHeader/_page-header.scss +4 -1
  170. package/scss/components/ProductiveCard/_productive-card.scss +0 -4
  171. package/scss/components/SidePanel/_side-panel.scss +15 -6
  172. package/scss/components/StatusIcon/_index.scss +1 -1
  173. package/scss/components/StatusIcon/_status-icon.scss +4 -4
  174. package/scss/components/TagSet/_index.scss +1 -1
  175. package/scss/components/UserProfileImage/_index.scss +1 -1
  176. package/scss/components/UserProfileImage/_user-profile-image.scss +2 -2
  177. package/scss/components/WebTerminal/_web-terminal.scss +2 -2
  178. package/scss/components/_index.scss +1 -1
  179. package/scss/global/styles/_project-settings.scss +5 -1
  180. package/es/components/CancelableTextEdit/CancelableTextEdit.js +0 -245
  181. package/es/generated/feature-flags/feature-flags.js +0 -15
  182. package/lib/components/CancelableTextEdit/CancelableTextEdit.js +0 -265
  183. package/lib/components/CancelableTextEdit/index.js +0 -13
  184. package/lib/generated/feature-flags/feature-flags.js +0 -22
  185. package/scss/components/CancelableTextEdit/_cancelable-text-edit.scss +0 -211
  186. package/scss/components/CancelableTextEdit/_storybook-styles.scss +0 -15
  187. package/scss/generated/feature-flags/_feature-flags.scss +0 -19
@@ -1,211 +0,0 @@
1
- //
2
- // Copyright IBM Corp. 2021, 2021
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
-
8
- // Standard imports.
9
- @import '../../global/styles/project-settings';
10
- @import '../../global/styles/mixins';
11
-
12
- // Other Carbon settings.
13
- // TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
14
-
15
- // CancelableTextEdit uses the following Carbon components:
16
- // TODO: @import(s) of Carbon component styles used by CancelableTextEdit
17
-
18
- // CancelableTextEdit uses the following Carbon for IBM Products components:
19
- // TODO: @import(s) of IBM Products component styles used by CancelableTextEdit
20
-
21
- @mixin button-states($block-class) {
22
- .#{$block-class}__revert,
23
- .#{$block-class}__save {
24
- border: 1px solid transparent;
25
-
26
- // input does not have focus
27
- &:hover {
28
- border-color: $hover-field;
29
- border-bottom-color: transparent;
30
- background-clip: content-box;
31
- box-shadow: initial;
32
- outline: initial;
33
- }
34
-
35
- &:focus:active,
36
- &:focus {
37
- // border focus input does NOT have focus
38
- border-color: $focus;
39
- box-shadow: inset 0 0 0 1px $focus;
40
- outline: initial;
41
- }
42
-
43
- &:focus:active:hover {
44
- box-shadow: inset 0 0 0 1px $focus, inset 0 0 0 2px $field-01;
45
- }
46
-
47
- &::before {
48
- background-color: transparent;
49
- }
50
-
51
- &[disabled] {
52
- border-color: transparent;
53
- }
54
- }
55
-
56
- // invalid affects hover state
57
- &.#{$block-class}--invalid {
58
- // invalid does not have focus
59
- .#{$block-class}__save:hover,
60
- .#{$block-class}__revert:hover {
61
- border: 1px solid transparent;
62
- box-shadow: inset 0 1px 0 $support-01, inset 0 -1px 0 $support-01;
63
- }
64
-
65
- .#{$block-class}__save:hover {
66
- // invalid does not have focus
67
- box-shadow: inset 0 1px 0 $support-01, inset 0 -1px 0 $support-01,
68
- inset -1px 0 0 $support-01;
69
- }
70
- }
71
-
72
- // after other button states handle focus within input
73
- .#{$carbon-prefix}--text-input-wrapper:focus-within
74
- ~ .#{$block-class}__buttons {
75
- .#{$block-class}__revert,
76
- .#{$block-class}__save {
77
- border: 1px solid transparent;
78
- box-shadow: inset 0 1px 0 $focus, inset 0 -1px 0 $focus;
79
- // transition-property: initial; // turn off seems to cause a bit of a visual glitch
80
- }
81
-
82
- // button hover state
83
- .#{$block-class}__revert:hover,
84
- .#{$block-class}__save:hover {
85
- background-clip: content-box;
86
- }
87
-
88
- .#{$block-class}__save {
89
- // border hover input has focus or is in error
90
- box-shadow: inset 0 1px 0 $focus, inset 0 -1px 0 $focus,
91
- inset -1px 0 0 $focus;
92
- }
93
- }
94
- }
95
-
96
- // Define all component styles in a mixin which is then exported using
97
- // the Carbon import-once mechanism.
98
- @mixin cancelable-text-edit {
99
- // The block part of our conventional BEM class names (blockClass__E--M).
100
- $block-class: #{$pkg-prefix}--cancelable-text-edit;
101
-
102
- .#{$block-class} {
103
- --size: #{$spacing-08};
104
- --icon-size: #{$spacing-05};
105
- }
106
-
107
- .#{$block-class}--sm {
108
- --size: #{$spacing-07};
109
- --icon-size: #{$spacing-05};
110
- }
111
-
112
- .#{$block-class}--lg {
113
- --size: #{$spacing-09};
114
- --icon-size: #{$spacing-05};
115
- }
116
-
117
- // high specificity to override some icon button styles to work like the Carbon search clear button
118
- // but at sizes of text input
119
- .#{$block-class}.#{$block-class}.#{$block-class} {
120
- .#{$block-class}__main {
121
- position: relative;
122
- display: inline-flex;
123
- min-height: var(--size);
124
- vertical-align: top;
125
- }
126
-
127
- .#{$block-class}__input {
128
- height: var(--size);
129
- // stylelint-disable-next-line carbon/layout-token-use
130
- padding-right: calc(2 * var(--size));
131
- }
132
-
133
- .#{$block-class}__buttons {
134
- position: absolute;
135
- top: 0;
136
- right: 0;
137
- display: flex;
138
- flex-direction: column;
139
- }
140
-
141
- .#{$block-class}__buttons-inner {
142
- display: flex;
143
- }
144
-
145
- @include button-states($block-class);
146
-
147
- .#{$block-class}__revert,
148
- .#{$block-class}__save {
149
- display: flex;
150
- width: var(--size);
151
- height: var(--size);
152
- min-height: var(--size);
153
- flex-direction: column;
154
- align-items: center;
155
- justify-content: center;
156
- padding: 0;
157
-
158
- svg {
159
- width: var(--icon-size);
160
- height: var(--icon-size);
161
- // margin: calc(var(--size) / 4);
162
- }
163
- }
164
-
165
- // > only wish to affect version added for inline
166
- &.#{$block-class}--invalid .#{$carbon-prefix}--form-requirement,
167
- &.#{$block-class}--warn .#{$carbon-prefix}--form-requirement {
168
- display: block;
169
- max-height: initial;
170
- }
171
-
172
- &.#{$block-class}--invalid.#{$block-class}--inline
173
- .#{$carbon-prefix}--form-requirement,
174
- &.#{$block-class}--warn.#{$block-class}--inline
175
- .#{$carbon-prefix}--form-requirement {
176
- // stylelint-disable-next-line carbon/layout-token-use
177
- margin-left: calc(20% + 1.25rem); // needs to match inline input layout
178
- }
179
-
180
- // > only wish to affect version added for inline
181
- &.#{$block-class}--invalid .#{$carbon-prefix}--form-requirement {
182
- display: block;
183
- overflow: visible;
184
- // max-height: 12.5rem;
185
- // font-weight: 400;
186
- color: $text-error;
187
- }
188
-
189
- .#{$carbon-prefix}--text-input {
190
- // stylelint-disable-next-line carbon/layout-token-use
191
- padding-right: calc(
192
- 2 * var(--size)
193
- ); // to take account of save and revert
194
- }
195
-
196
- .#{$carbon-prefix}--text-input--invalid {
197
- // stylelint-disable-next-line carbon/layout-token-use
198
- padding-right: calc(
199
- 3 * var(--size)
200
- ); // to take account of save and revert
201
- }
202
-
203
- .#{$carbon-prefix}--text-input__invalid-icon {
204
- margin-right: $spacing-11;
205
- }
206
- }
207
- }
208
-
209
- @include exports('cancelable-text-edit') {
210
- @include cancelable-text-edit;
211
- }
@@ -1,15 +0,0 @@
1
- //
2
- // Copyright IBM Corp. 2021, 2021
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
-
8
- @import './index';
9
-
10
- // TODO: add any additional styles used by CancelableTextEdit.stories.js
11
-
12
- // Uncomment next line (which must appear last) to test in storybook
13
- // that the SCSS styles for this component are sufficiently specific
14
- // to override Carbon whichever order the styles get loaded in.
15
- //@import 'carbon-components/css/carbon-components.min';
@@ -1,19 +0,0 @@
1
- //
2
- // Copyright IBM Corp. 2020, 2020
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
-
8
- // ******************************
9
- // *
10
- // * ONLY EDIT IN /common-files/feature-flags files elsewhere are copies
11
- // * created by a pre-commit step
12
- // *
13
- // ******************************
14
-
15
- $feature-flags: (
16
- ui-shell: true,
17
- grid-columns-16: true,
18
- enable-css-custom-properties: true,
19
- );