@carbon/ibm-products 1.23.0 → 1.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) 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 +263 -60
  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 +41 -43
  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 +263 -60
  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 +263 -60
  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 +5 -7
  24. package/es/components/AddSelect/AddSelectBody.js +6 -10
  25. package/es/components/AddSelect/AddSelectColumn.js +4 -1
  26. package/es/components/AddSelect/AddSelectFilter.js +1 -1
  27. package/es/components/AddSelect/AddSelectList.js +1 -1
  28. package/es/components/AddSelect/AddSelectMetaPanel.js +8 -7
  29. package/es/components/AddSelect/AddSelectSidebar.js +4 -26
  30. package/es/components/AddSelect/AddSelectSort.js +2 -0
  31. package/es/components/Card/Card.js +1 -1
  32. package/es/components/Datagrid/Datagrid/Datagrid.js +17 -12
  33. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -2
  34. package/es/components/Datagrid/useExpandedRow.js +5 -12
  35. package/es/components/Datagrid/useOnRowClick.js +10 -3
  36. package/es/components/EditFullPage/EditFullPage.js +79 -0
  37. package/es/components/EditFullPage/index.js +7 -0
  38. package/es/components/EditTearsheet/EditTearsheet.js +205 -0
  39. package/es/components/EditTearsheet/EditTearsheetForm.js +103 -0
  40. package/es/components/EditTearsheet/index.js +8 -0
  41. package/es/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +230 -0
  42. package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.js +79 -0
  43. package/es/components/EditTearsheetNarrow/index.js +7 -0
  44. package/es/components/EmptyStates/EmptyStateContent.js +2 -1
  45. package/es/components/ImportModal/ImportModal.js +10 -2
  46. package/es/components/WebTerminal/WebTerminal.js +30 -16
  47. package/es/components/WebTerminal/WebTerminalContentWrapper.js +8 -10
  48. package/es/components/WebTerminal/hooks/index.js +45 -0
  49. package/es/components/WebTerminal/index.js +2 -1
  50. package/es/components/WebTerminal/preview-components/Navigation.js +6 -10
  51. package/es/components/index.js +5 -2
  52. package/es/global/js/package-settings.js +5 -1
  53. package/lib/components/AddSelect/AddSelect.js +5 -7
  54. package/lib/components/AddSelect/AddSelectBody.js +6 -10
  55. package/lib/components/AddSelect/AddSelectColumn.js +3 -1
  56. package/lib/components/AddSelect/AddSelectFilter.js +1 -1
  57. package/lib/components/AddSelect/AddSelectList.js +1 -1
  58. package/lib/components/AddSelect/AddSelectMetaPanel.js +8 -7
  59. package/lib/components/AddSelect/AddSelectSidebar.js +3 -26
  60. package/lib/components/AddSelect/AddSelectSort.js +2 -0
  61. package/lib/components/Card/Card.js +1 -1
  62. package/lib/components/Datagrid/Datagrid/Datagrid.js +17 -12
  63. package/lib/components/Datagrid/Datagrid/DatagridRow.js +3 -1
  64. package/lib/components/Datagrid/useExpandedRow.js +5 -20
  65. package/lib/components/Datagrid/useOnRowClick.js +10 -3
  66. package/lib/components/EditFullPage/EditFullPage.js +85 -0
  67. package/lib/components/EditFullPage/index.js +13 -0
  68. package/lib/components/EditTearsheet/EditTearsheet.js +229 -0
  69. package/lib/components/EditTearsheet/EditTearsheetForm.js +122 -0
  70. package/lib/components/EditTearsheet/index.js +21 -0
  71. package/lib/components/EditTearsheet/preview-components/MultiFormEditTearsheet.js +254 -0
  72. package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.js +85 -0
  73. package/lib/components/EditTearsheetNarrow/index.js +13 -0
  74. package/lib/components/EmptyStates/EmptyStateContent.js +2 -1
  75. package/lib/components/ImportModal/ImportModal.js +11 -2
  76. package/lib/components/WebTerminal/WebTerminal.js +31 -15
  77. package/lib/components/WebTerminal/WebTerminalContentWrapper.js +9 -9
  78. package/lib/components/WebTerminal/hooks/index.js +69 -0
  79. package/lib/components/WebTerminal/index.js +15 -1
  80. package/lib/components/WebTerminal/preview-components/Navigation.js +6 -10
  81. package/lib/components/index.js +37 -1
  82. package/lib/global/js/package-settings.js +5 -1
  83. package/package.json +12 -12
  84. package/scss/components/Cascade/_cascade.scss +1 -1
  85. package/scss/components/CreateInfluencer/_create-influencer.scss +2 -0
  86. package/scss/components/Datagrid/_datagrid.scss +0 -1
  87. package/scss/components/Datagrid/_storybook-styles.scss +53 -0
  88. package/scss/components/Datagrid/styles/datagrid.scss +93 -12
  89. package/scss/components/Datagrid/styles/useExpandedRow.scss +0 -6
  90. package/scss/components/EditFullPage/_edit-full-page.scss +34 -0
  91. package/scss/components/EditFullPage/_index.scss +8 -0
  92. package/scss/components/EditFullPage/_storybook-styles.scss +10 -0
  93. package/scss/components/EditTearsheet/_edit-tearsheet.scss +132 -0
  94. package/scss/components/EditTearsheet/_index.scss +8 -0
  95. package/scss/components/EditTearsheet/_storybook-styles.scss +55 -0
  96. package/scss/components/EditTearsheetNarrow/_edit-tearsheet-narrow.scss +34 -0
  97. package/scss/components/EditTearsheetNarrow/_index.scss +8 -0
  98. package/scss/components/EditTearsheetNarrow/_storybook-styles.scss +10 -0
  99. package/scss/components/EmptyStates/_empty-state.scss +16 -9
  100. package/scss/components/InlineEdit/_inline-edit.scss +8 -20
  101. package/scss/components/NotificationsPanel/_notifications-panel.scss +1 -0
  102. package/scss/components/PageHeader/_page-header.scss +3 -1
  103. package/scss/components/StatusIcon/_status-icon.scss +1 -1
  104. package/scss/components/Tearsheet/_tearsheet.scss +2 -2
  105. package/scss/components/WebTerminal/_web-terminal.scss +2 -1
  106. package/scss/components/_index.scss +3 -0
@@ -12,6 +12,10 @@
12
12
 
13
13
  $block-class: #{$pkg-prefix}--datagrid;
14
14
 
15
+ .sb-show-main.sb-main-centered {
16
+ height: 100vh;
17
+ }
18
+
15
19
  .sb-show-main.sb-main-centered #root {
16
20
  width: 100%;
17
21
  height: 100vh;
@@ -33,3 +37,52 @@ $block-class: #{$pkg-prefix}--datagrid;
33
37
  .#{$block-class}__panelContent {
34
38
  display: inline;
35
39
  }
40
+
41
+ /* only for storybook purpose. */
42
+ .#{$pkg-prefix}--side-panel.#{$pkg-prefix}--side-panel__container {
43
+ top: 0;
44
+ height: 100%;
45
+ }
46
+
47
+ .page-content-wrapper.side-panel-open {
48
+ .#{$block-class} {
49
+ padding-right: $spacing-05;
50
+ }
51
+ }
52
+
53
+ .#{$block-class}__side-panel-sections {
54
+ padding-bottom: $spacing-06;
55
+ }
56
+
57
+ .#{$block-class}__side-panel-section-inner {
58
+ display: flex;
59
+ padding: $spacing-01 0;
60
+ }
61
+
62
+ .#{$block-class}__side-panel-label-text {
63
+ @include carbon--type-style('label-02');
64
+
65
+ color: $text-02;
66
+ }
67
+
68
+ .#{$block-class}__side-panel-value {
69
+ @include carbon--type-style('body-short-01');
70
+
71
+ padding-left: $spacing-03;
72
+ }
73
+
74
+ .#{$block-class}__side-panel-section-header {
75
+ @include carbon--type-style('productive-heading-01');
76
+
77
+ padding-bottom: $spacing-02;
78
+ }
79
+
80
+ .#{$pkg-prefix}--side-panel.#{$pkg-prefix}--side-panel__container.#{$pkg-prefix}--side-panel__container-right-placement {
81
+ border: 0 none;
82
+ box-shadow: none;
83
+ }
84
+
85
+ .#{$pkg-prefix}--side-panel__container
86
+ .#{$pkg-prefix}--side-panel__inner-content {
87
+ height: 100%;
88
+ }
@@ -144,26 +144,18 @@
144
144
  }
145
145
  .#{$block-class}__grid-container {
146
146
  display: block;
147
- overflow: auto;
148
147
  width: 100%;
149
148
  padding-top: 0;
150
149
 
151
150
  .#{$carbon-prefix}--data-table-content {
152
151
  width: 100%;
153
152
  height: 100%;
154
- /* stylelint-disable-next-line declaration-property-value-disallowed-list */
155
- overflow-x: unset;
153
+ overflow-x: auto;
156
154
  }
157
155
 
158
156
  .#{$block-class}__table-simple {
159
- display: flex;
160
- overflow: auto;
157
+ overflow: hidden;
161
158
  max-height: 100%;
162
- flex-direction: column;
163
- }
164
-
165
- .#{$block-class}__with-pagination tr:last-of-type > td {
166
- border-bottom: none;
167
159
  }
168
160
 
169
161
  .#{$block-class}__head {
@@ -261,6 +253,10 @@
261
253
  flex: 1 1 auto;
262
254
  }
263
255
 
256
+ .#{$block-class}__with-pagination table tr:last-of-type > td {
257
+ border-bottom: none;
258
+ }
259
+
264
260
  .#{$block-class}__resizer {
265
261
  position: absolute;
266
262
  z-index: 1;
@@ -359,7 +355,6 @@
359
355
  .#{$block-class}__datagridLeftPanel {
360
356
  display: flex;
361
357
  width: 388px; // as per UX specs.
362
- height: 100%;
363
358
  background-color: $ui-01;
364
359
  }
365
360
 
@@ -370,9 +365,38 @@
370
365
  .#{$block-class}__datagridWithPanel {
371
366
  position: relative;
372
367
  display: flex;
373
- overflow: auto;
374
368
  width: 100%;
369
+ height: 100%;
375
370
  flex-direction: column;
371
+
372
+ .#{$block-class}__grid-container {
373
+ display: flex;
374
+ overflow: hidden;
375
+ flex-direction: column;
376
+ }
377
+
378
+ .#{$block-class}__table-toolbar {
379
+ width: 100%;
380
+ }
381
+
382
+ .#{$block-class}__datagridLeftPanel {
383
+ flex: 0 0 auto;
384
+ }
385
+
386
+ .#{$carbon-prefix}--data-table-content {
387
+ flex: 1 1 0%;
388
+ }
389
+ .#{$block-class}__table-container {
390
+ overflow: hidden;
391
+ }
392
+ }
393
+
394
+ .#{$block-class}__table-container {
395
+ position: relative;
396
+ display: flex;
397
+ overflow: auto;
398
+ width: 100%;
399
+ max-height: 100%;
376
400
  }
377
401
 
378
402
  .#{$block-class}__carbon-row-expanded {
@@ -382,3 +406,60 @@
382
406
  border-left: 1px solid $interactive-01;
383
407
  }
384
408
  }
409
+
410
+ .#{$block-class} .#{$carbon-prefix}--data-table-header {
411
+ background: transparent;
412
+ }
413
+
414
+ .#{$block-class}__dense-header {
415
+ display: flex;
416
+ flex-wrap: wrap;
417
+
418
+ .#{$carbon-prefix}--data-table-header {
419
+ flex: 1 1 auto;
420
+ padding-bottom: $spacing-05;
421
+ }
422
+
423
+ .#{$block-class}__table-toolbar {
424
+ flex: 0 0 auto;
425
+ }
426
+ .#{$carbon-prefix}--table-toolbar {
427
+ background: transparent;
428
+ }
429
+
430
+ .#{$carbon-prefix}__table-container {
431
+ flex: 1 1 100%;
432
+ }
433
+
434
+ .#{$carbon-prefix}--table-toolbar {
435
+ padding-top: $spacing-07;
436
+ }
437
+
438
+ .#{$block-class}__toolbar-divider {
439
+ position: relative;
440
+ }
441
+
442
+ .#{$block-class}__toolbar-divider::before {
443
+ position: absolute;
444
+ top: 50%;
445
+ left: 0;
446
+ width: 1px;
447
+ height: $spacing-05;
448
+ border-left: 1px solid $ui-03;
449
+ content: '';
450
+ transform: translateY(-50%);
451
+ }
452
+ }
453
+
454
+ .#{$carbon-prefix}--data-table--selected {
455
+ position: relative;
456
+ }
457
+
458
+ .#{$carbon-prefix}--data-table--selected::before {
459
+ position: absolute;
460
+ left: 0;
461
+ width: $spacing-02;
462
+ height: 100%;
463
+ background-color: $interactive-01;
464
+ content: '';
465
+ }
@@ -5,9 +5,3 @@
5
5
  * US Government Users Restricted Rights - Use, duplication or disclosure
6
6
  * restricted by GSA ADP Schedule Contract with IBM Corp.
7
7
  */
8
-
9
- @import './variables';
10
-
11
- .#{$block-class}__expanded-row-content {
12
- padding: $spacing-05 $spacing-05 $spacing-06 $spacing-10;
13
- }
@@ -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
@@ -21,20 +21,30 @@
21
21
  .#{$block-class} {
22
22
  color: $text-01;
23
23
 
24
- .#{$block-class}__header,
25
- .#{$block-class}__subtitle {
26
- padding-bottom: $spacing-02;
24
+ .#{$block-class}__header {
25
+ @include carbon--type-style('productive-heading-03');
26
+ // stylelint-disable-next-line carbon/layout-token-use
27
+ padding-bottom: calc($spacing-01 + $spacing-02);
27
28
  margin: 0;
28
29
  }
30
+ .#{$block-class}__subtitle {
31
+ @include carbon--type-style('body-long-01');
32
+
33
+ padding-bottom: $spacing-05;
34
+ }
29
35
  .#{$block-class}__header--small {
30
- @include carbon--type-style('productive-heading-03');
36
+ @include carbon--type-style('body-short-02');
37
+
38
+ padding-bottom: $spacing-03;
31
39
  }
32
40
  .#{$block-class}__subtitle--small {
33
- @include carbon--type-style('body-short-01');
41
+ @include carbon--type-style('caption-01');
34
42
  }
35
43
  }
36
44
 
37
45
  .#{$block-class}__illustration {
46
+ height: auto;
47
+ margin-bottom: $spacing-05;
38
48
  &.#{$block-class}__illustration--lg {
39
49
  min-width: $spacing-11;
40
50
  max-width: $spacing-11;
@@ -45,12 +55,9 @@
45
55
  }
46
56
  }
47
57
 
48
- .#{$block-class}__action-button,
49
- .#{$block-class}__link {
50
- margin-top: $spacing-06;
51
- }
52
58
  .#{$block-class} .#{$block-class}__action-button {
53
59
  display: block;
60
+ margin-bottom: $spacing-05;
54
61
  }
55
62
  .#{$block-class} .#{$block-class}__link {
56
63
  display: block;
@@ -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);