@carbon/ibm-products 1.23.1 → 1.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/css/components/Datagrid/styles/datagrid.css +83 -11
  2. package/css/components/Datagrid/styles/datagrid.css.map +1 -1
  3. package/css/components/Datagrid/styles/index.css +83 -15
  4. package/css/components/Datagrid/styles/index.css.map +1 -1
  5. package/css/components/Datagrid/styles/useExpandedRow.css +0 -3
  6. package/css/components/Datagrid/styles/useExpandedRow.css.map +1 -1
  7. package/css/index-full-carbon.css +235 -44
  8. package/css/index-full-carbon.css.map +1 -1
  9. package/css/index-full-carbon.min.css +1 -7
  10. package/css/index-full-carbon.min.css.map +1 -1
  11. package/css/index-without-carbon-released-only.css +15 -28
  12. package/css/index-without-carbon-released-only.css.map +1 -1
  13. package/css/index-without-carbon-released-only.min.css +1 -7
  14. package/css/index-without-carbon-released-only.min.css.map +1 -1
  15. package/css/index-without-carbon.css +235 -44
  16. package/css/index-without-carbon.css.map +1 -1
  17. package/css/index-without-carbon.min.css +1 -7
  18. package/css/index-without-carbon.min.css.map +1 -1
  19. package/css/index.css +235 -44
  20. package/css/index.css.map +1 -1
  21. package/css/index.min.css +1 -7
  22. package/css/index.min.css.map +1 -1
  23. package/es/components/AddSelect/AddSelect.js +1 -2
  24. package/es/components/AddSelect/AddSelectBody.js +5 -9
  25. package/es/components/AddSelect/AddSelectColumn.js +4 -1
  26. package/es/components/AddSelect/AddSelectList.js +1 -1
  27. package/es/components/AddSelect/AddSelectSidebar.js +4 -26
  28. package/es/components/Datagrid/Datagrid/Datagrid.js +17 -12
  29. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -2
  30. package/es/components/Datagrid/useExpandedRow.js +5 -12
  31. package/es/components/Datagrid/useOnRowClick.js +10 -3
  32. package/es/components/EditFullPage/EditFullPage.js +79 -0
  33. package/es/components/EditFullPage/index.js +7 -0
  34. package/es/components/EditTearsheet/EditTearsheet.js +205 -0
  35. package/es/components/EditTearsheet/EditTearsheetForm.js +103 -0
  36. package/es/components/EditTearsheet/index.js +8 -0
  37. package/es/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +230 -0
  38. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +79 -0
  39. package/es/components/EditTearsheetNarrow/index.js +7 -0
  40. package/es/components/index.js +4 -1
  41. package/es/global/js/package-settings.js +4 -1
  42. package/lib/components/AddSelect/AddSelect.js +1 -2
  43. package/lib/components/AddSelect/AddSelectBody.js +5 -9
  44. package/lib/components/AddSelect/AddSelectColumn.js +3 -1
  45. package/lib/components/AddSelect/AddSelectList.js +1 -1
  46. package/lib/components/AddSelect/AddSelectSidebar.js +3 -26
  47. package/lib/components/Datagrid/Datagrid/Datagrid.js +17 -12
  48. package/lib/components/Datagrid/Datagrid/DatagridRow.js +3 -1
  49. package/lib/components/Datagrid/useExpandedRow.js +5 -20
  50. package/lib/components/Datagrid/useOnRowClick.js +10 -3
  51. package/lib/components/EditFullPage/EditFullPage.js +85 -0
  52. package/lib/components/EditFullPage/index.js +13 -0
  53. package/lib/components/EditTearsheet/EditTearsheet.js +229 -0
  54. package/lib/components/EditTearsheet/EditTearsheetForm.js +122 -0
  55. package/lib/components/EditTearsheet/index.js +21 -0
  56. package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +254 -0
  57. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +85 -0
  58. package/lib/components/EditTearsheetNarrow/index.js +13 -0
  59. package/lib/components/index.js +25 -1
  60. package/lib/global/js/package-settings.js +4 -1
  61. package/package.json +2 -2
  62. package/scss/components/Cascade/_cascade.scss +1 -1
  63. package/scss/components/CreateInfluencer/_create-influencer.scss +2 -0
  64. package/scss/components/Datagrid/_datagrid.scss +0 -1
  65. package/scss/components/Datagrid/_storybook-styles.scss +53 -0
  66. package/scss/components/Datagrid/styles/datagrid.scss +93 -12
  67. package/scss/components/Datagrid/styles/useExpandedRow.scss +0 -6
  68. package/scss/components/EditFullPage/_edit-full-page.scss +34 -0
  69. package/scss/components/EditFullPage/_index.scss +8 -0
  70. package/scss/components/EditFullPage/_storybook-styles.scss +10 -0
  71. package/scss/components/EditTearsheet/_edit-tearsheet.scss +132 -0
  72. package/scss/components/EditTearsheet/_index.scss +8 -0
  73. package/scss/components/EditTearsheet/_storybook-styles.scss +55 -0
  74. package/scss/components/EditTearsheetNarrow/_edit-tearsheet-narrow.scss +34 -0
  75. package/scss/components/EditTearsheetNarrow/_index.scss +8 -0
  76. package/scss/components/EditTearsheetNarrow/_storybook-styles.scss +10 -0
  77. package/scss/components/InlineEdit/_inline-edit.scss +8 -20
  78. package/scss/components/NotificationsPanel/_notifications-panel.scss +1 -0
  79. package/scss/components/PageHeader/_page-header.scss +3 -1
  80. package/scss/components/StatusIcon/_status-icon.scss +1 -1
  81. package/scss/components/Tearsheet/_tearsheet.scss +2 -2
  82. package/scss/components/_index.scss +3 -0
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ // EditFullPage uses the following Carbon components:
16
+ // TODO: @import(s) of Carbon component styles used by EditFullPage
17
+
18
+ // EditFullPage uses the following Carbon for IBM Products components:
19
+ // TODO: @import(s) of IBM Products component styles used by EditFullPage
20
+
21
+ // Define all component styles in a mixin which is then exported using
22
+ // the Carbon import-once mechanism.
23
+ @mixin edit-full-page {
24
+ // The block part of our conventional BEM class names (blockClass__E--M).
25
+ $block-class: #{$pkg-prefix}--edit-full-page;
26
+
27
+ .#{$block-class} {
28
+ // TODO: Styles.
29
+ }
30
+ }
31
+
32
+ @include exports('edit-full-page') {
33
+ @include edit-full-page;
34
+ }
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 './edit-full-page';
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 '../../global/styles/project-settings';
9
+
10
+ // TODO: add any additional styles used by EditFullPage.stories.js
@@ -0,0 +1,132 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+
11
+ // Other Carbon settings.
12
+ @import 'carbon-components/scss/globals/grid/grid';
13
+
14
+ // EditTearsheet uses the following Carbon components:
15
+ @import 'carbon-components/scss/components/toggle/toggle';
16
+ @import 'carbon-components/scss/components/ui-shell/side-nav';
17
+
18
+ // EditTearsheet uses the following IBM Products components:
19
+ // TearsheetShell
20
+ @import '../Tearsheet/tearsheet';
21
+ @import '../CreateInfluencer/index';
22
+
23
+ @mixin edit-tearsheet {
24
+ @keyframes form-content-entrance {
25
+ 0% {
26
+ opacity: 0;
27
+ // stylelint-disable-next-line carbon/layout-token-use
28
+ transform: translateY(-0.75rem);
29
+ }
30
+
31
+ 100% {
32
+ opacity: 1;
33
+ transform: translateY(0);
34
+ }
35
+ }
36
+
37
+ $block-class: #{$pkg-prefix}--tearsheet-edit;
38
+ $form-block-class: #{$pkg-prefix}--tearsheet-edit__form;
39
+ $section-block-class: #{$pkg-prefix}--tearsheet-edit__section;
40
+ $tearsheet-divider-class: #{$pkg-prefix}--tearsheet-edit__section--divider;
41
+ $tearsheet-fieldset-class: #{$pkg-prefix}--tearsheet-edit__form--fieldset;
42
+
43
+ .#{$block-class} {
44
+ --#{$block-class}--total-width: 0;
45
+ }
46
+
47
+ .#{$block-class} .#{$form-block-class}__form--hidden-form {
48
+ display: none;
49
+ }
50
+
51
+ .#{$block-class} .#{$form-block-class}__form--visible-form {
52
+ animation-duration: $duration--slow-01;
53
+ animation-fill-mode: forwards;
54
+ animation-name: form-content-entrance;
55
+ animation-timing-function: $carbon--standard-easing;
56
+ opacity: 0;
57
+ }
58
+
59
+ @media (prefers-reduced-motion) {
60
+ .#{$block-class} .#{$form-block-class}__form--visible-form {
61
+ animation: none;
62
+ opacity: 1;
63
+ }
64
+ }
65
+
66
+ .#{$block-class} .#{$block-class}__content {
67
+ height: 100%;
68
+ padding: $spacing-06;
69
+ overflow-x: hidden;
70
+ }
71
+
72
+ .#{$block-class} .#{$block-class}__content .#{$carbon-prefix}--grid {
73
+ padding: 0;
74
+ margin: 0;
75
+ }
76
+
77
+ .#{$block-class} .#{$block-class}__form--heading {
78
+ padding-bottom: $spacing-06;
79
+ }
80
+
81
+ .#{$block-class}
82
+ .#{$carbon-prefix}--btn-set
83
+ .#{$carbon-prefix}--btn.#{$carbon-prefix}--btn--disabled {
84
+ box-shadow: -0.0625rem 0 0 0 $button-separator;
85
+ }
86
+
87
+ .#{$block-class} .#{$carbon-prefix}--side-nav--ux {
88
+ position: initial;
89
+ width: 100%;
90
+ max-width: 100%;
91
+ background-color: transparent;
92
+ }
93
+
94
+ .#{$block-class} .#{$carbon-prefix}--side-nav__link:hover {
95
+ cursor: pointer;
96
+ }
97
+
98
+ .#{$block-class} .#{$carbon-prefix}--side-nav__overlay-active {
99
+ display: none;
100
+ }
101
+
102
+ .#{$block-class} .#{$block-class}__form--title,
103
+ .#{$block-class} .#{$block-class}__section--title {
104
+ margin-bottom: $spacing-05;
105
+ }
106
+
107
+ .#{$block-class} .#{$block-class}__section--subtitle,
108
+ .#{$block-class} .#{$block-class}__form--subtitle {
109
+ @include carbon--type-style('productive-heading-01');
110
+
111
+ margin-bottom: $spacing-03;
112
+ }
113
+
114
+ .#{$block-class} .#{$block-class}__section--description,
115
+ .#{$block-class} .#{$block-class}__form--description {
116
+ @include carbon--type-style('body-long-01');
117
+
118
+ margin-bottom: $spacing-06;
119
+ }
120
+
121
+ .#{$block-class} .#{$carbon-prefix}--fieldset {
122
+ margin-bottom: 0;
123
+ }
124
+
125
+ .#{$block-class} .#{$block-class}__form--fieldset > * {
126
+ margin-bottom: $spacing-05;
127
+ }
128
+ }
129
+
130
+ @include exports('edit-tearsheet') {
131
+ @include edit-tearsheet;
132
+ }
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 './edit-tearsheet';
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 '../../global/styles/project-settings';
9
+
10
+ // TODO: add any additional styles used by EditTearsheet.stories.js
11
+
12
+ $preview-block-class: #{$pkg-prefix}--tearsheet-edit-multi-form;
13
+
14
+ .#{$preview-block-class}__description {
15
+ @include carbon--type-style('body-short-01');
16
+
17
+ padding-bottom: $spacing-04;
18
+ }
19
+
20
+ p.#{$preview-block-class}__description:last-of-type {
21
+ padding-bottom: $spacing-07;
22
+ }
23
+
24
+ .#{$preview-block-class}__heading {
25
+ @include carbon--font-weight('semibold');
26
+ }
27
+
28
+ .#{$preview-block-class}
29
+ .#{$pkg-prefix}--tearsheet__content
30
+ .#{$carbon-prefix}--form-item {
31
+ margin-bottom: $spacing-05;
32
+ }
33
+
34
+ .#{$prefix}--tile-group div {
35
+ display: flex;
36
+ flex-wrap: wrap;
37
+ }
38
+
39
+ .#{$pkg-prefix}--tearsheet-edit-multi-form--custom-tile {
40
+ width: 280px;
41
+ height: 240px;
42
+ margin-right: $spacing-05;
43
+ }
44
+
45
+ .#{$pkg-prefix}--tearsheet-edit-multi-form--custom-tile
46
+ .#{$pkg-prefix}--empty-state__illustration.#{$pkg-prefix}--empty-state__illustration--lg {
47
+ min-width: 120px;
48
+ height: 120px;
49
+ }
50
+
51
+ .#{$pkg-prefix}--tearsheet-edit-multi-form--custom-tile-label {
52
+ position: absolute;
53
+ bottom: $spacing-05;
54
+ left: $spacing-05;
55
+ }
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ // EditTearsheetNarrow uses the following Carbon components:
16
+ // TODO: @import(s) of Carbon component styles used by EditTearsheetNarrow
17
+
18
+ // EditTearsheetNarrow uses the following Carbon for IBM Products components:
19
+ // TODO: @import(s) of IBM Products component styles used by EditTearsheetNarrow
20
+
21
+ // Define all component styles in a mixin which is then exported using
22
+ // the Carbon import-once mechanism.
23
+ @mixin edit-tearsheet-narrow {
24
+ // The block part of our conventional BEM class names (blockClass__E--M).
25
+ $block-class: #{$pkg-prefix}--edit-tearsheet-narrow;
26
+
27
+ .#{$block-class} {
28
+ // TODO: Styles.
29
+ }
30
+ }
31
+
32
+ @include exports('edit-tearsheet-narrow') {
33
+ @include edit-tearsheet-narrow;
34
+ }
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 './edit-tearsheet-narrow';
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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 '../../global/styles/project-settings';
9
+
10
+ // TODO: add any additional styles used by EditTearsheetNarrow.stories.js
@@ -32,14 +32,13 @@
32
32
  @mixin input-button-defaults($block-class) {
33
33
  display: inline-flex;
34
34
  width: var(--#{$block-class}--size);
35
+ max-width: var(--#{$block-class}--size);
35
36
  height: 100%;
36
37
  min-height: initial;
37
38
  max-height: var(--#{$block-class}--size);
39
+ align-items: center;
40
+ justify-content: center;
38
41
 
39
- // stylelint-disable-next-line carbon/layout-token-use
40
- padding: calc(
41
- 0.5 * (var(--#{$block-class}--size) - var(--#{$block-class}--icon-size)) - #{$spacing-01}
42
- );
43
42
  border: 2px solid transparent;
44
43
  }
45
44
 
@@ -260,31 +259,20 @@
260
259
  &.#{$block-class}--editing
261
260
  .#{$block-class}__toolbar--animation
262
261
  .#{$block-class}__save {
263
- margin-right: 0;
262
+ overflow: visible;
263
+ width: var(--#{$block-class}--edit-size);
264
264
  transition: all $duration--moderate-02 motion(standard, productive);
265
265
  transition-property: margin, padding;
266
-
267
- svg {
268
- transition: width $duration--moderate-02 motion(standard, productive);
269
- @media (prefers-reduced-motion: reduce) {
270
- transition: none;
271
- }
272
- }
273
266
  }
274
267
 
275
268
  &.#{$block-class}--editing
276
269
  .#{$block-class}__toolbar--animation:not(.#{$block-class}__toolbar--saveable)
277
270
  .#{$block-class}__save {
278
- padding-right: 0;
279
- padding-left: 0;
271
+ overflow: hidden;
272
+ width: 0;
273
+ padding: 0;
280
274
  border-right: 0;
281
275
  border-left: 0;
282
- margin-right: calc(-1 * var(--#{$block-class}--size));
283
-
284
- svg {
285
- overflow: hidden;
286
- width: 0;
287
- }
288
276
  }
289
277
 
290
278
  &.#{$block-class}.#{$block-class} .#{$block-class}__edit {
@@ -185,6 +185,7 @@
185
185
  padding: 0;
186
186
 
187
187
  .#{$carbon-prefix}--btn__icon {
188
+ // stylelint-disable-next-line carbon/motion-easing-use
188
189
  transition: transform $duration--moderate-02 ease;
189
190
  @media (prefers-reduced-motion: reduce) {
190
191
  transition: none;
@@ -92,7 +92,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
92
92
  $animation: background-and-shadow-appear;
93
93
  }
94
94
 
95
- /* stylelint-disable-next-line carbon/motion-token-use */
95
+ // stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
96
96
  animation: $animation $duration linear paused forwards;
97
97
  // Added separately for clarity
98
98
  animation-delay: calc(
@@ -196,6 +196,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
196
196
  content: '';
197
197
  opacity: 0;
198
198
  transform: translateX(-50%) scaleX(1);
199
+ // stylelint-disable-next-line carbon/motion-easing-use
199
200
  transition: all $duration--moderate-01 ease-out;
200
201
  }
201
202
 
@@ -432,6 +433,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
432
433
  .#{$block-class}__title {
433
434
  @include carbon--type-style('productive-heading-04');
434
435
 
436
+ min-height: $spacing-08;
435
437
  overflow-x: hidden;
436
438
  text-overflow: ellipsis;
437
439
  white-space: nowrap;
@@ -119,7 +119,7 @@ $block-class: #{$pkg-prefix}--status-icon;
119
119
  @media (prefers-reduced-motion: reduce) {
120
120
  animation: none;
121
121
  }
122
- // stylelint-disable-next-line carbon/motion-token-use
122
+ // stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
123
123
  animation: rotating 8000ms infinite linear;
124
124
  // stylelint-disable-next-line carbon/theme-token-use
125
125
  fill: --clr($icon, $theme);
@@ -32,7 +32,7 @@
32
32
  z-index: z('modal') + 1;
33
33
  align-items: flex-end;
34
34
  color: $text-01;
35
- // stylelint-disable-next-line carbon/motion-token-use
35
+ // stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
36
36
  transition: visibility 0s linear $motion-duration,
37
37
  background-color $motion-duration motion(exit, expressive),
38
38
  opacity $motion-duration motion(exit, expressive);
@@ -43,7 +43,7 @@
43
43
  &.is-visible {
44
44
  z-index: z('modal');
45
45
  align-items: flex-end;
46
- // stylelint-disable-next-line carbon/motion-token-use
46
+ // stylelint-disable-next-line carbon/motion-duration-use, carbon/motion-easing-use
47
47
  transition: visibility 0s linear,
48
48
  background-color $motion-duration motion(entrance, expressive),
49
49
  opacity $motion-duration motion(entrance, expressive);
@@ -45,3 +45,6 @@
45
45
  @import './InlineEdit/index';
46
46
  @import './DataSpreadsheet/index';
47
47
  @import './Datagrid/index';
48
+ @import './EditTearsheet/index';
49
+ @import './EditTearsheetNarrow/index';
50
+ @import './EditFullPage/index';