@carbon/ibm-products 1.2.5 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. package/css/index-full-carbon.css +1028 -517
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-without-carbon-released-only.css +187 -108
  5. package/css/index-without-carbon-released-only.css.map +1 -1
  6. package/css/index-without-carbon-released-only.min.css +3 -3
  7. package/css/index-without-carbon.css +580 -114
  8. package/css/index-without-carbon.css.map +1 -1
  9. package/css/index-without-carbon.min.css +3 -3
  10. package/css/index.css +804 -116
  11. package/css/index.css.map +1 -1
  12. package/css/index.min.css +3 -3
  13. package/es/components/APIKeyModal/APIKeyModal.js +25 -29
  14. package/es/components/ActionBar/ActionBar.js +4 -1
  15. package/es/components/ActionSet/ActionSet.js +22 -10
  16. package/es/components/ActionSet/actions.js +25 -17
  17. package/es/components/AddSelect/AddSelect.js +198 -0
  18. package/es/components/AddSelect/AddSelectBreadcrumbs.js +56 -0
  19. package/es/components/AddSelect/AddSelectList.js +94 -0
  20. package/es/components/AddSelect/AddSelectSidebar.js +46 -0
  21. package/es/components/AddSelect/index.js +7 -0
  22. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +24 -17
  23. package/es/components/CancelableTextEdit/CancelableTextEdit.js +245 -0
  24. package/es/components/{CreateTearsheet/constants.js → CancelableTextEdit/index.js} +1 -2
  25. package/es/components/Card/Card.js +6 -4
  26. package/es/components/CreateFullPage/CreateFullPage.js +102 -258
  27. package/es/components/CreateFullPage/CreateFullPageStep.js +65 -13
  28. package/es/components/CreateFullPage/index.js +1 -2
  29. package/es/components/CreateInfluencer/CreateInfluencer.js +40 -220
  30. package/es/components/CreateTearsheet/CreateTearsheet.js +95 -146
  31. package/es/components/CreateTearsheet/CreateTearsheetStep.js +70 -20
  32. package/es/components/CreateTearsheet/index.js +0 -1
  33. package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +87 -28
  34. package/es/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +8 -6
  35. package/es/components/ExportModal/ExportModal.js +41 -12
  36. package/es/components/ImportModal/ImportModal.js +2 -1
  37. package/es/components/InlineEdit/InlineEdit.js +373 -0
  38. package/es/components/InlineEdit/index.js +7 -0
  39. package/es/components/MultiAddSelect/MultiAddSelect.js +16 -0
  40. package/es/components/MultiAddSelect/index.js +1 -0
  41. package/es/components/NotificationsPanel/NotificationsPanel.js +16 -3
  42. package/es/components/OptionsTile/OptionsTile.js +36 -15
  43. package/es/components/PageHeader/PageHeader.js +59 -35
  44. package/es/components/PageHeader/PageHeaderTitle.js +82 -7
  45. package/es/components/PageHeader/PageHeaderUtils.js +21 -2
  46. package/es/components/RemoveModal/RemoveModal.js +4 -2
  47. package/es/components/SidePanel/SidePanel.js +33 -16
  48. package/es/components/SingleAddSelect/SingleAddSelect.js +15 -0
  49. package/es/components/SingleAddSelect/index.js +1 -0
  50. package/es/components/TagSet/TagSet.js +4 -1
  51. package/es/components/Tearsheet/Tearsheet.js +1 -1
  52. package/es/components/Tearsheet/TearsheetNarrow.js +1 -1
  53. package/es/components/Tearsheet/TearsheetShell.js +1 -1
  54. package/es/components/Toolbar/Toolbar.js +69 -8
  55. package/es/components/WebTerminal/WebTerminal.js +1 -1
  56. package/es/components/index.js +5 -1
  57. package/es/global/js/hooks/index.js +1 -0
  58. package/es/global/js/hooks/useCreateComponentFocus.js +15 -19
  59. package/es/global/js/hooks/useCreateComponentStepChange.js +69 -79
  60. package/es/global/js/hooks/useResetCreateComponent.js +7 -4
  61. package/es/global/js/hooks/useRetrieveStepData.js +51 -0
  62. package/es/global/js/hooks/useValidCreateStepCount.js +4 -7
  63. package/es/global/js/package-settings.js +5 -1
  64. package/es/global/js/utils/lastIndexInArray.js +26 -0
  65. package/es/settings.js +0 -5
  66. package/lib/components/APIKeyModal/APIKeyModal.js +25 -29
  67. package/lib/components/ActionBar/ActionBar.js +4 -1
  68. package/lib/components/ActionSet/ActionSet.js +22 -10
  69. package/lib/components/ActionSet/actions.js +25 -17
  70. package/lib/components/AddSelect/AddSelect.js +223 -0
  71. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +71 -0
  72. package/lib/components/AddSelect/AddSelectList.js +112 -0
  73. package/lib/components/AddSelect/AddSelectSidebar.js +63 -0
  74. package/lib/components/AddSelect/index.js +13 -0
  75. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +23 -16
  76. package/lib/components/CancelableTextEdit/CancelableTextEdit.js +265 -0
  77. package/lib/components/CancelableTextEdit/index.js +13 -0
  78. package/lib/components/Card/Card.js +6 -4
  79. package/lib/components/CreateFullPage/CreateFullPage.js +102 -258
  80. package/lib/components/CreateFullPage/CreateFullPageStep.js +68 -13
  81. package/lib/components/CreateFullPage/index.js +1 -9
  82. package/lib/components/CreateInfluencer/CreateInfluencer.js +38 -231
  83. package/lib/components/CreateTearsheet/CreateTearsheet.js +97 -148
  84. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +72 -19
  85. package/lib/components/CreateTearsheet/index.js +0 -8
  86. package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +86 -34
  87. package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +8 -6
  88. package/lib/components/ExportModal/ExportModal.js +38 -11
  89. package/lib/components/ImportModal/ImportModal.js +2 -1
  90. package/lib/components/InlineEdit/InlineEdit.js +389 -0
  91. package/lib/components/InlineEdit/index.js +13 -0
  92. package/lib/components/MultiAddSelect/MultiAddSelect.js +37 -0
  93. package/lib/components/MultiAddSelect/index.js +13 -0
  94. package/lib/components/NotificationsPanel/NotificationsPanel.js +13 -1
  95. package/lib/components/OptionsTile/OptionsTile.js +36 -15
  96. package/lib/components/PageHeader/PageHeader.js +59 -35
  97. package/lib/components/PageHeader/PageHeaderTitle.js +91 -9
  98. package/lib/components/PageHeader/PageHeaderUtils.js +21 -2
  99. package/lib/components/RemoveModal/RemoveModal.js +4 -2
  100. package/lib/components/SidePanel/SidePanel.js +33 -16
  101. package/lib/components/SingleAddSelect/SingleAddSelect.js +36 -0
  102. package/lib/components/SingleAddSelect/index.js +13 -0
  103. package/lib/components/TagSet/TagSet.js +4 -1
  104. package/lib/components/Tearsheet/Tearsheet.js +1 -1
  105. package/lib/components/Tearsheet/TearsheetNarrow.js +1 -1
  106. package/lib/components/Tearsheet/TearsheetShell.js +1 -1
  107. package/lib/components/Toolbar/Toolbar.js +69 -6
  108. package/lib/components/WebTerminal/WebTerminal.js +1 -1
  109. package/lib/components/index.js +33 -1
  110. package/lib/global/js/hooks/index.js +8 -0
  111. package/lib/global/js/hooks/useCreateComponentFocus.js +15 -19
  112. package/lib/global/js/hooks/useCreateComponentStepChange.js +69 -79
  113. package/lib/global/js/hooks/useResetCreateComponent.js +7 -4
  114. package/lib/global/js/hooks/useRetrieveStepData.js +62 -0
  115. package/lib/global/js/hooks/useValidCreateStepCount.js +4 -7
  116. package/lib/global/js/package-settings.js +5 -1
  117. package/lib/global/js/utils/lastIndexInArray.js +35 -0
  118. package/lib/settings.js +0 -6
  119. package/package.json +19 -19
  120. package/scss/components/AddSelect/_add-select.scss +108 -0
  121. package/scss/components/AddSelect/_index.scss +10 -0
  122. package/scss/components/AddSelect/_storybook-styles.scss +6 -0
  123. package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +19 -15
  124. package/scss/components/BreadcrumbWithOverflow/_index.scss +1 -1
  125. package/scss/components/CancelableTextEdit/_cancelable-text-edit.scss +212 -0
  126. package/{es/components/CreateFullPage/constants.js → scss/components/CancelableTextEdit/_index.scss} +2 -2
  127. package/scss/components/CancelableTextEdit/_storybook-styles.scss +15 -0
  128. package/scss/components/CreateFullPage/_create-full-page.scss +4 -11
  129. package/scss/components/CreateInfluencer/_create-influencer.scss +4 -4
  130. package/scss/components/CreateTearsheet/_create-tearsheet.scss +6 -10
  131. package/scss/components/InlineEdit/_index.scss +8 -0
  132. package/scss/components/InlineEdit/_inline-edit.scss +245 -0
  133. package/scss/components/InlineEdit/_storybook-styles.scss +28 -0
  134. package/scss/components/MultiAddSelect/_index.scss +1 -0
  135. package/scss/components/MultiAddSelect/_multi-add-select.scss +1 -0
  136. package/scss/components/MultiAddSelect/_storybook-styles.scss +6 -0
  137. package/scss/components/NotificationsPanel/_notifications-panel.scss +2 -2
  138. package/scss/components/PageHeader/_index.scss +1 -1
  139. package/scss/components/PageHeader/_page-header.scss +15 -5
  140. package/scss/components/ProductiveCard/_productive-card.scss +0 -4
  141. package/scss/components/SidePanel/_side-panel.scss +15 -6
  142. package/scss/components/SingleAddSelect/_index.scss +1 -0
  143. package/scss/components/SingleAddSelect/_single-add-select.scss +1 -0
  144. package/scss/components/SingleAddSelect/_storybook-styles.scss +6 -0
  145. package/scss/components/StatusIcon/_index.scss +1 -1
  146. package/scss/components/StatusIcon/_status-icon.scss +2 -0
  147. package/scss/components/TagSet/_index.scss +1 -1
  148. package/scss/components/UserProfileImage/_index.scss +1 -1
  149. package/scss/components/WebTerminal/_web-terminal.scss +2 -2
  150. package/scss/components/_index.scss +4 -0
  151. package/scss/global/styles/_project-settings.scss +5 -1
  152. package/es/components/CreateFullPage/CreateFullPageSection.js +0 -53
  153. package/es/components/CreateTearsheet/CreateTearsheetSection.js +0 -83
  154. package/es/components/CreateTearsheet/preview-components/MultiStepWithSectionsTearsheet.js +0 -327
  155. package/es/generated/feature-flags/feature-flags.js +0 -15
  156. package/es/global/js/utils/hasValidType.js +0 -94
  157. package/lib/components/CreateFullPage/CreateFullPageSection.js +0 -74
  158. package/lib/components/CreateFullPage/constants.js +0 -16
  159. package/lib/components/CreateTearsheet/CreateTearsheetSection.js +0 -105
  160. package/lib/components/CreateTearsheet/constants.js +0 -17
  161. package/lib/components/CreateTearsheet/preview-components/MultiStepWithSectionsTearsheet.js +0 -354
  162. package/lib/generated/feature-flags/feature-flags.js +0 -22
  163. package/lib/global/js/utils/hasValidType.js +0 -110
  164. package/scss/generated/feature-flags/_feature-flags.scss +0 -19
@@ -30,6 +30,7 @@
30
30
  @mixin create-full-page {
31
31
  // The block part of our conventional BEM class names (blockClass__E--M).
32
32
  $block-class: #{$pkg-prefix}--create-full-page;
33
+ $step-block-class: #{$pkg-prefix}--create-full-page__step;
33
34
 
34
35
  .#{$block-class} .#{$block-class} {
35
36
  color: $text-01;
@@ -41,20 +42,14 @@
41
42
  margin-left: 0;
42
43
  }
43
44
 
44
- .#{$block-class} .#{$block-class}__step--hidden-step,
45
- .#{$block-class} .#{$block-class}__step--hidden-section {
45
+ .#{$block-class} .#{$step-block-class}__step--hidden-step {
46
46
  display: none;
47
47
  }
48
48
 
49
- .#{$block-class} .#{$block-class}__step--visible-section {
49
+ .#{$block-class} .#{$step-block-class}__step--visible-step {
50
50
  display: block;
51
51
  }
52
52
 
53
- .#{$block-class} .#{$block-class}__step--visible-step {
54
- opacity: 1;
55
- }
56
-
57
- .#{$block-class} .#{$block-class}__section-subtitle,
58
53
  .#{$block-class} .#{$block-class}__step-subtitle {
59
54
  @include carbon--type-style('productive-heading-01');
60
55
 
@@ -62,7 +57,6 @@
62
57
  margin-bottom: $spacing-03;
63
58
  }
64
59
 
65
- .#{$block-class} .#{$block-class}__section-description,
66
60
  .#{$block-class} .#{$block-class}__step-description {
67
61
  @include carbon--type-style('body-long-01');
68
62
 
@@ -150,8 +144,7 @@
150
144
  }
151
145
  }
152
146
 
153
- .#{$block-class} .#{$block-class}__step-title,
154
- .#{$block-class} .#{$block-class}__section-title {
147
+ .#{$block-class} .#{$block-class}__step-title {
155
148
  @include carbon--type-style('productive-heading-04');
156
149
 
157
150
  max-width: 50%;
@@ -13,7 +13,7 @@
13
13
  $block-class: #{$pkg-prefix}--create-influencer;
14
14
  $create-tearsheet-block-class: #{$pkg-prefix}--tearsheet-create;
15
15
  $influencerAnimationStart: calc(-1 * #{$spacing-05});
16
- @keyframes influencerMenuEntrance {
16
+ @keyframes influencer-menu-entrance {
17
17
  0% {
18
18
  opacity: 0;
19
19
  // stylelint-disable-next-line carbon/layout-token-use
@@ -24,7 +24,7 @@
24
24
  transform: translateX(0);
25
25
  }
26
26
  }
27
- @keyframes influencerMenuExit {
27
+ @keyframes influencer-menu-exit {
28
28
  0% {
29
29
  opacity: 1;
30
30
  transform: translateX(0);
@@ -60,7 +60,7 @@
60
60
  .#{$block-class}__side-nav-opening,
61
61
  .#{$block-class}__progress-indicator-opening {
62
62
  // stylelint-disable-next-line carbon/motion-token-use
63
- animation: influencerMenuEntrance $duration--moderate-02 1;
63
+ animation: influencer-menu-entrance $duration--moderate-02 1;
64
64
  animation-fill-mode: forwards;
65
65
  @include carbon--motion(entrance, productive);
66
66
  }
@@ -68,7 +68,7 @@
68
68
  .#{$block-class}__side-nav-closing,
69
69
  .#{$block-class}__progress-indicator-closing {
70
70
  // stylelint-disable-next-line carbon/motion-token-use
71
- animation: influencerMenuExit $duration--moderate-02 1;
71
+ animation: influencer-menu-exit $duration--moderate-02 1;
72
72
  animation-fill-mode: forwards;
73
73
  @include carbon--motion(exit, productive);
74
74
  }
@@ -23,7 +23,7 @@
23
23
  @import '../CreateInfluencer/index';
24
24
 
25
25
  @mixin create-tearsheet {
26
- @keyframes stepContentEntrance {
26
+ @keyframes step-content-entrance {
27
27
  0% {
28
28
  opacity: 0;
29
29
  // stylelint-disable-next-line carbon/layout-token-use
@@ -36,6 +36,7 @@
36
36
  }
37
37
 
38
38
  $block-class: #{$pkg-prefix}--tearsheet-create;
39
+ $step-block-class: #{$pkg-prefix}--tearsheet-create__step;
39
40
  $section-block-class: #{$pkg-prefix}--tearsheet-create__section;
40
41
  $tearsheet-divider-class: #{$pkg-prefix}--tearsheet-create__section--divider;
41
42
  $tearsheet-fieldset-class: #{$pkg-prefix}--tearsheet-create__step--fieldset;
@@ -44,24 +45,19 @@
44
45
  --#{$block-class}--total-width: 0;
45
46
  }
46
47
 
47
- .#{$block-class} .#{$block-class}__step--hidden-step,
48
- .#{$block-class} .#{$block-class}__step--hidden-section {
48
+ .#{$block-class} .#{$step-block-class}__step--hidden-step {
49
49
  display: none;
50
50
  }
51
51
 
52
- .#{$block-class} .#{$block-class}__step--visible-section {
53
- display: block;
54
- }
55
-
56
- .#{$block-class} .#{$block-class}__step--visible-step {
57
- animation: $duration--slow-01 stepContentEntrance;
52
+ .#{$block-class} .#{$step-block-class}__step--visible-step {
53
+ animation: $duration--slow-01 step-content-entrance;
58
54
  animation-fill-mode: forwards;
59
55
  animation-timing-function: $carbon--standard-easing;
60
56
  opacity: 0;
61
57
  }
62
58
 
63
59
  @media (prefers-reduced-motion) {
64
- .#{$block-class} .#{$block-class}__step--visible-step {
60
+ .#{$block-class} .#{$step-block-class}__step--visible-step {
65
61
  animation: none;
66
62
  opacity: 1;
67
63
  }
@@ -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 './inline-edit';
@@ -0,0 +1,245 @@
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
+ // InlineEdit uses the following Carbon components:
16
+ // TODO: @import(s) of Carbon component styles used by InlineEdit
17
+
18
+ // InlineEdit uses the following Carbon for IBM Products components:
19
+ // TODO: @import(s) of IBM Products component styles used by InlineEdit
20
+
21
+ // cut down version borrowed from 'carbon-components/scss/globals/scss/vendor/@carbon/styles/scss/utilities/focus-outline';
22
+ @mixin input-outline($color: $focus) {
23
+ outline: $spacing-01 solid $color;
24
+ outline-offset: calc(-1 * $spacing-01);
25
+
26
+ @media screen and (prefers-contrast) {
27
+ outline-style: dotted;
28
+ }
29
+ }
30
+
31
+ @function tooltip-top-bottom-safe-clip() {
32
+ @return polygon(
33
+ 0 0,
34
+ -100vw 0,
35
+ -100vw -100vh,
36
+ 100vw -100vh,
37
+ 100vw 0,
38
+ 100% 0,
39
+ 100% 100%,
40
+ 100vw 100%,
41
+ 100vw 100vh,
42
+ -100vw 100vh,
43
+ -100vw 100%,
44
+ 0 100%
45
+ );
46
+ }
47
+
48
+ @mixin input-button-defaults($block-class) {
49
+ width: var(--#{$block-class}--size);
50
+ height: 100%;
51
+ min-height: initial;
52
+ max-height: var(--#{$block-class}--size);
53
+
54
+ // stylelint-disable-next-line carbon/layout-token-use
55
+ padding: calc(
56
+ 0.5 * (var(--#{$block-class}--size) - var(--#{$block-class}--icon-size))
57
+ );
58
+ border: 2px solid transparent;
59
+ }
60
+
61
+ // Define all component styles in a mixin which is then exported using
62
+ // the Carbon import-once mechanism.
63
+ @mixin inline-edit {
64
+ // The block part of our conventional BEM class names (blockClass__E--M).
65
+ $block-class: #{$pkg-prefix}--inline-edit;
66
+
67
+ @include block-wrap($block-class) {
68
+ --#{$block-class}--size: #{$spacing-08};
69
+ --#{$block-class}--icon-size: #{$spacing-05};
70
+ --#{$block-class}--background-color: #{$ui-01};
71
+
72
+ &.#{$block-class}--light {
73
+ --#{$block-class}--background-color: transparent;
74
+ }
75
+
76
+ &:hover {
77
+ --#{$block-class}--background-color: #{$hover-field};
78
+ // background-color: $background-color;
79
+ }
80
+
81
+ position: relative;
82
+ display: inline-flex;
83
+ // min-width: 250px; // similar to min input box with room for edit-controls
84
+ max-width: 100%;
85
+ height: var(--#{$block-class}--size);
86
+ background-color: var(--#{$block-class}--background-color);
87
+ cursor: text; // appear to be part of the text box
88
+ transition: background-color $duration--fast-01 motion(entrance, productive),
89
+ box-shadow $duration--fast-01 motion(entrance, productive),
90
+ border-color $duration--fast-01 motion(entrance, productive);
91
+
92
+ white-space: nowrap;
93
+
94
+ &.#{$block-class}--sm {
95
+ --#{$block-class}--size: #{$spacing-07};
96
+ --#{$block-class}--icon-size: #{$spacing-05};
97
+ }
98
+
99
+ &.#{$block-class}--lg {
100
+ --#{$block-class}--size: #{$spacing-09};
101
+ --#{$block-class}--icon-size: #{$spacing-05};
102
+ }
103
+
104
+ &.#{$block-class}--editing {
105
+ @include input-outline($focus);
106
+
107
+ background-color: $ui-01;
108
+ }
109
+
110
+ .#{$block-class}--invalid {
111
+ @include input-outline($support-01);
112
+ }
113
+
114
+ .#{$block-class}__input {
115
+ display: flex;
116
+ overflow: hidden;
117
+ max-width: calc(100% - 2 * var(--#{$block-class}--size) - $spacing-05);
118
+ height: 100%;
119
+ flex: 1 1 100%;
120
+ align-items: center;
121
+ // stylelint-disable-next-line carbon/layout-token-use
122
+ margin-right: calc(2 * var(--#{$block-class}--size)); // room for controls
123
+ margin-left: $spacing-05;
124
+
125
+ &:focus {
126
+ outline: none;
127
+ }
128
+ }
129
+
130
+ .#{$block-class}__placeholder {
131
+ position: absolute;
132
+ left: $spacing-03;
133
+ }
134
+
135
+ .#{$block-class}__controls {
136
+ // not simply flexed in as this causes flexbox to mis-measure the size of the input
137
+ position: absolute;
138
+ top: 0;
139
+ right: 0;
140
+ width: calc(2 * var(--#{$block-class}--size));
141
+ height: 100%;
142
+ cursor: text;
143
+ }
144
+
145
+ .#{$block-class}__controls--animation {
146
+ // makes room for the top clip text but hides the side overflow
147
+ clip-path: tooltip-top-bottom-safe-clip();
148
+ // NOTE: The above allows the tooltip to show through when overflowX: hidden would not when at right edge.
149
+ // It is used with margin animation of contained buttons
150
+ }
151
+
152
+ &.#{$block-class}--editing .#{$block-class}__controls::after {
153
+ // cover top and bottom when focus within block
154
+ // doing the same on the buttons is problematic when animating
155
+ // and causes visual artifacts when the button is hovered without focus
156
+ // as the buttons leave a 45% join between sides with transparent borders and top/bottom with $focus
157
+ position: absolute;
158
+ top: 0;
159
+ left: 0;
160
+ display: block;
161
+ width: 100%;
162
+ height: 100%;
163
+ box-sizing: border-box;
164
+ border: 2px solid $focus;
165
+ border-left: 0;
166
+ content: '';
167
+ pointer-events: none;
168
+ }
169
+
170
+ &.#{$block-class}.#{$block-class} .#{$block-class}__save,
171
+ &.#{$block-class}.#{$block-class} .#{$block-class}__cancel {
172
+ @include input-button-defaults($block-class);
173
+
174
+ // input does not have focus
175
+ &:hover {
176
+ outline: initial;
177
+ }
178
+
179
+ &:focus:active,
180
+ &:focus {
181
+ // border focus input does NOT have focus
182
+ border-color: $focus;
183
+ box-shadow: initial;
184
+ outline: initial;
185
+ }
186
+
187
+ &:focus:active:hover {
188
+ box-shadow: inset 0 0 0 1px $field-01;
189
+ }
190
+
191
+ &::before {
192
+ background-color: transparent;
193
+ }
194
+
195
+ &[disabled] {
196
+ border-color: transparent;
197
+ }
198
+ }
199
+
200
+ .#{$block-class}__controls .#{$block-class}__edit {
201
+ margin-left: var(--#{$block-class}--size);
202
+ }
203
+
204
+ .#{$block-class}__controls--animation .#{$block-class}__cancel {
205
+ margin-left: var(--#{$block-class}--size);
206
+ transition: margin-left $duration--moderate-02
207
+ motion(standard, productive);
208
+ }
209
+
210
+ .#{$block-class}__controls--saveable .#{$block-class}__cancel {
211
+ margin-left: 0;
212
+ }
213
+
214
+ &.#{$block-class}.#{$block-class} .#{$block-class}__edit {
215
+ @include input-button-defaults($block-class);
216
+
217
+ position: absolute;
218
+ top: 0;
219
+ right: 0;
220
+ // pointer-events: none;
221
+
222
+ &:hover,
223
+ &:active,
224
+ &:focus {
225
+ border-color: transparent;
226
+ background-color: transparent;
227
+ box-shadow: initial;
228
+ outline: initial;
229
+ }
230
+ }
231
+
232
+ .#{$block-class}__edit--hover-visible {
233
+ opacity: 0;
234
+ transition: opacity $duration--fast-01 motion(entrance, productive);
235
+ }
236
+
237
+ &:hover .#{$block-class}__edit--hover-visible {
238
+ opacity: 1;
239
+ }
240
+ }
241
+ }
242
+
243
+ @include exports('inline-edit') {
244
+ @include inline-edit;
245
+ }
@@ -0,0 +1,28 @@
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 './index';
9
+
10
+ // TODO: add any additional styles used by InlineEdit.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';
16
+
17
+ .inline-edit-stories__viewport {
18
+ // width: 300px; // larger than standard size needed by text input at standard font size (html input attribute size)
19
+ // stylelint-disable-next-line carbon/layout-token-use
20
+ margin: 100px;
21
+ }
22
+
23
+ $block-class: #{$pkg-prefix}--inline-edit;
24
+ .component-full-width {
25
+ .#{$block-class} {
26
+ width: 100%;
27
+ }
28
+ }
@@ -0,0 +1 @@
1
+ @import './multi-add-select';
@@ -0,0 +1 @@
1
+ @import '../AddSelect/add-select';
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright IBM Corp. 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
+ //
@@ -20,7 +20,7 @@
20
20
 
21
21
  @mixin notifications-panel {
22
22
  $block-class: #{$pkg-prefix}--notifications-panel;
23
- @keyframes fadeIn {
23
+ @keyframes fade-in {
24
24
  0% {
25
25
  opacity: 0;
26
26
  // stylelint-disable-next-line carbon/layout-token-use
@@ -32,7 +32,7 @@
32
32
  }
33
33
  }
34
34
 
35
- @keyframes fadeOut {
35
+ @keyframes fade-out {
36
36
  0% {
37
37
  opacity: 1;
38
38
  transform: translateY(0);
@@ -7,4 +7,4 @@
7
7
 
8
8
  // An index file is most useful when you have multiple components
9
9
 
10
- @import './page-header.scss';
10
+ @import './page-header';
@@ -80,7 +80,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
80
80
  $duration: 1000ms;
81
81
 
82
82
  $animation: background-appear;
83
- @if ($with-shadow) {
83
+ @if $with-shadow {
84
84
  $animation: background-and-shadow-appear;
85
85
  }
86
86
 
@@ -144,7 +144,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
144
144
 
145
145
  .#{$block-class}__breadcrumb-row:not(.#{$block-class}__breadcrumb-row--has-action-bar) {
146
146
  // lifts up page title when there is no action bar
147
- margin-bottom: calc(-1 * #{$spacing-03});
147
+ min-height: $spacing-07;
148
148
  }
149
149
 
150
150
  .#{$block-class}__breadcrumb-row--container {
@@ -189,7 +189,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
189
189
  transition: all $duration--moderate-01 ease-out;
190
190
  }
191
191
 
192
- .#{$block-class}__breadcrumb-row--next-to-tabs::after,
192
+ .#{$block-class}__breadcrumb-row--next-to-tabs:not(.#{$block-class}__has-page-actions-without-action-bar)::after,
193
193
  .#{$block-class}__breadcrumb-row--has-action-bar::after {
194
194
  /* creates a full width box shadow without causing scroll */
195
195
  box-shadow: 25vw 1px 0 0 $ui-03, -25vw 1px 0 0 $ui-03;
@@ -408,7 +408,6 @@ $right-section-alt-width: 100% - $left-section-alt-width;
408
408
  }
409
409
 
410
410
  .#{$block-class}__title-column {
411
- overflow: hidden; /* required for ellipsis in title */
412
411
  min-height: 40px;
413
412
  flex: 0 0 100%;
414
413
 
@@ -421,11 +420,22 @@ $right-section-alt-width: 100% - $left-section-alt-width;
421
420
  .#{$block-class}__title {
422
421
  @include carbon--type-style('productive-heading-04');
423
422
 
424
- overflow: hidden;
423
+ overflow-x: hidden;
425
424
  text-overflow: ellipsis;
426
425
  white-space: nowrap;
427
426
  }
428
427
 
428
+ .#{$block-class}__title .#{$pkg-prefix}--inline-edit__value {
429
+ // The heading text sits 2px pixels lower in the inline edit which is aligned center
430
+ // stylelint-disable-next-line carbon/layout-token-use
431
+ transform: translateY(-2px);
432
+ }
433
+
434
+ .#{$block-class}__title--editable {
435
+ display: flex;
436
+ overflow: visible;
437
+ }
438
+
429
439
  .#{$block-class}__title-skeleton {
430
440
  height: $spacing-07;
431
441
  }
@@ -36,10 +36,6 @@
36
36
  align-items: center;
37
37
  justify-content: space-between;
38
38
  border-top: 1px solid $ui-03;
39
-
40
- .#{$carbon-prefix}--btn svg {
41
- margin-left: $spacing-03;
42
- }
43
39
  }
44
40
 
45
41
  .#{$block-class}__footer-no-button {
@@ -25,7 +25,7 @@ $block-class: #{$pkg-prefix}--side-panel;
25
25
  $action-set-block-class: #{$pkg-prefix}--action-set;
26
26
 
27
27
  @mixin sidePanelEntranceRight($size: map-get($side-panel-sizes, md)) {
28
- @keyframes sidePanelEntranceRight {
28
+ @keyframes side-panel-entrance-right {
29
29
  0% {
30
30
  opacity: 0;
31
31
  // stylelint-disable-next-line carbon/layout-token-use
@@ -39,7 +39,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
39
39
  }
40
40
 
41
41
  @mixin sidePanelEntranceLeft($size: map-get($side-panel-sizes, md)) {
42
- @keyframes sidePanelEntranceLeft {
42
+ @keyframes side-panel-entrance-left {
43
43
  0% {
44
44
  opacity: 0;
45
45
  // stylelint-disable-next-line carbon/layout-token-use
@@ -90,7 +90,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
90
90
  }
91
91
 
92
92
  @mixin side-panel {
93
- @keyframes sidePanelExitLeft {
93
+ @keyframes side-panel-exit-left {
94
94
  0% {
95
95
  opacity: 1;
96
96
  transform: translateX(0);
@@ -102,7 +102,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
102
102
  }
103
103
  }
104
104
 
105
- @keyframes sidePanelExitRight {
105
+ @keyframes side-panel-exit-right {
106
106
  0% {
107
107
  opacity: 1;
108
108
  transform: translateX(0);
@@ -186,6 +186,15 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
186
186
  &::before {
187
187
  @include setDividerStyles();
188
188
  }
189
+ &.#{$block-class}__title-container--reduced-motion {
190
+ z-index: 5;
191
+ border-bottom: 1px solid $decorative-01;
192
+ margin-bottom: $spacing-05;
193
+ }
194
+ &.#{$block-class}__title-container--reduced-motion.#{$block-class}__title-container--no-title-animation {
195
+ border-bottom: 0;
196
+ margin-bottom: 0;
197
+ }
189
198
  &.#{$block-class}__on-detail-step .#{$block-class}__collapsed-title-text {
190
199
  top: $spacing-09;
191
200
  }
@@ -444,7 +453,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
444
453
  background-color: $field-02;
445
454
  }
446
455
 
447
- @keyframes sidePanelOverlayEntrance {
456
+ @keyframes side-panel-overlay-entrance {
448
457
  0% {
449
458
  opacity: 0;
450
459
  }
@@ -453,7 +462,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
453
462
  }
454
463
  }
455
464
 
456
- @keyframes sidePanelOverlayExit {
465
+ @keyframes side-panel-overlay-exit {
457
466
  0% {
458
467
  opacity: 1;
459
468
  }
@@ -0,0 +1 @@
1
+ @import './single-add-select';
@@ -0,0 +1 @@
1
+ @import '../AddSelect/add-select';
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright IBM Corp. 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
+ //
@@ -5,4 +5,4 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @import './status-icon.scss';
8
+ @import './status-icon';
@@ -111,6 +111,8 @@ $block-class: #{$pkg-prefix}--status-icon;
111
111
  @each $theme in $themes {
112
112
  @each $icon in $icons {
113
113
  @each $theme-key in $themes {
114
+ .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger
115
+ .#{$block-class}--#{$theme}.#{$block-class}--#{$theme-key}-#{$icon},
114
116
  .#{$block-class}--#{$theme}.#{$block-class}--#{$theme-key}-#{$icon} {
115
117
  @if $icon == in-progress {
116
118
  @media (prefers-reduced-motion: reduce) {
@@ -5,4 +5,4 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @import './tag-set.scss';
8
+ @import './tag-set';
@@ -5,4 +5,4 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @import './user-profile-image.scss';
8
+ @import './user-profile-image';
@@ -4,7 +4,7 @@
4
4
  $web-terminal-width: 36.5rem;
5
5
  $block-class: #{$pkg-prefix}--web-terminal;
6
6
 
7
- @keyframes webTerminalEntrance {
7
+ @keyframes web-terminal-entrance {
8
8
  0% {
9
9
  opacity: 0;
10
10
  // stylelint-disable-next-line carbon/layout-token-use
@@ -16,7 +16,7 @@ $block-class: #{$pkg-prefix}--web-terminal;
16
16
  }
17
17
  }
18
18
 
19
- @keyframes webTerminalExit {
19
+ @keyframes web-terminal-exit {
20
20
  0% {
21
21
  opacity: 1;
22
22
  transform: translateX(0);
@@ -27,12 +27,14 @@
27
27
  @import './ImportModal/index';
28
28
  @import './LoadingBar/index';
29
29
  @import './ModifiedTabs/index';
30
+ @import './MultiAddSelect/index';
30
31
  @import './NotificationsPanel/index';
31
32
  @import './PageHeader/index';
32
33
  @import './ProductiveCard/index';
33
34
  @import './RemoveModal/index';
34
35
  @import './Saving/index';
35
36
  @import './SidePanel/index';
37
+ @import './SingleAddSelect/index';
36
38
  @import './StatusIcon/index';
37
39
  @import './TagSet/index';
38
40
  @import './Tearsheet/index';
@@ -41,3 +43,5 @@
41
43
  @import './UserProfileImage/index';
42
44
  @import './EditSidePanel/index';
43
45
  @import './OptionsTile/index';
46
+ @import './CancelableTextEdit/index';
47
+ @import './InlineEdit/index';