@carbon/ibm-products 1.6.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +224 -143
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1 -2
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +178 -142
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +178 -142
- package/css/index.css.map +1 -1
- package/css/index.min.css +3 -3
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +10 -13
- package/es/components/ActionBar/ActionBar.js +0 -3
- package/es/components/ActionBar/ActionBarItem.js +2 -6
- package/es/components/ActionSet/ActionSet.js +11 -13
- package/es/components/AddSelect/AddSelect.js +121 -25
- package/es/components/AddSelect/AddSelectBreadcrumbs.js +5 -5
- package/es/components/AddSelect/AddSelectColumn.js +21 -0
- package/es/components/AddSelect/AddSelectList.js +68 -9
- package/es/components/AddSelect/AddSelectSidebar.js +43 -5
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +0 -3
- package/es/components/ButtonMenu/ButtonMenu.js +6 -4
- package/es/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/es/components/Card/Card.js +31 -21
- package/es/components/Card/CardFooter.js +14 -10
- package/es/components/Card/CardHeader.js +8 -6
- package/es/components/Cascade/Cascade.js +5 -4
- package/es/components/ComboButton/ComboButton.js +0 -4
- package/es/components/ComboButton/ComboButtonItem/index.js +0 -5
- package/es/components/CreateFullPage/CreateFullPageStep.js +15 -8
- package/es/components/CreateModal/CreateModal.js +1 -4
- package/es/components/CreateTearsheet/CreateTearsheet.js +10 -11
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +18 -14
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +454 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +322 -0
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +64 -0
- package/es/components/DataSpreadsheet/createActiveCellFn.js +45 -0
- package/es/components/DataSpreadsheet/createCellSelectionArea.js +45 -0
- package/es/components/DataSpreadsheet/generateData.js +47 -0
- package/es/components/DataSpreadsheet/getCellSize.js +30 -0
- package/es/components/{CancelableTextEdit → DataSpreadsheet}/index.js +2 -2
- package/es/components/EditSidePanel/EditSidePanel.js +9 -10
- package/es/components/EmptyStates/EmptyState.js +7 -6
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -8
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -8
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -8
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -8
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -8
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -8
- package/es/components/ExampleComponent/ExampleComponent.js +12 -13
- package/es/components/ExportModal/ExportModal.js +13 -9
- package/es/components/ExpressiveCard/ExpressiveCard.js +0 -8
- package/es/components/ImportModal/ImportModal.js +7 -5
- package/es/components/InlineEdit/InlineEdit.js +51 -46
- package/es/components/LoadingBar/LoadingBar.js +13 -17
- package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
- package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
- package/es/components/ModifiedTabs/ModifiedTabs.js +24 -18
- package/es/components/NotificationsPanel/NotificationsPanel.js +109 -86
- package/es/components/OptionsTile/OptionsTile.js +6 -9
- package/es/components/PageHeader/PageHeader.js +10 -7
- package/es/components/ProductiveCard/ProductiveCard.js +23 -12
- package/es/components/RemoveModal/RemoveModal.js +0 -3
- package/es/components/SidePanel/SidePanel.js +22 -17
- package/es/components/TagSet/TagSet.js +13 -9
- package/es/components/TagSet/TagSetModal.js +16 -12
- package/es/components/TagSet/TagSetOverflow.js +21 -13
- package/es/components/Tearsheet/Tearsheet.js +27 -18
- package/es/components/Tearsheet/TearsheetNarrow.js +18 -15
- package/es/components/Tearsheet/TearsheetShell.js +3 -4
- package/es/components/Toolbar/ToolbarButton.js +0 -3
- package/es/components/WebTerminal/WebTerminal.js +17 -18
- package/es/components/index.js +2 -2
- package/es/global/js/hooks/index.js +1 -0
- package/es/global/js/hooks/useActiveElement.js +27 -0
- package/es/global/js/package-settings.js +2 -1
- package/es/global/js/utils/DisplayBox.js +31 -0
- package/es/global/js/utils/Wrap.js +7 -5
- package/es/global/js/utils/deepCloneObject.js +26 -0
- package/es/global/js/utils/getScrollbarWidth.js +14 -0
- package/lib/components/APIKeyModal/APIKeyModal.js +10 -13
- package/lib/components/ActionBar/ActionBar.js +0 -3
- package/lib/components/ActionBar/ActionBarItem.js +2 -6
- package/lib/components/ActionSet/ActionSet.js +11 -13
- package/lib/components/AddSelect/AddSelect.js +119 -24
- package/lib/components/AddSelect/AddSelectBreadcrumbs.js +3 -4
- package/lib/components/AddSelect/AddSelectColumn.js +37 -0
- package/lib/components/AddSelect/AddSelectList.js +66 -9
- package/lib/components/AddSelect/AddSelectSidebar.js +43 -4
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +0 -3
- package/lib/components/ButtonMenu/ButtonMenu.js +6 -4
- package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
- package/lib/components/Card/Card.js +31 -21
- package/lib/components/Card/CardFooter.js +14 -10
- package/lib/components/Card/CardHeader.js +8 -6
- package/lib/components/Cascade/Cascade.js +5 -4
- package/lib/components/ComboButton/ComboButton.js +0 -4
- package/lib/components/ComboButton/ComboButtonItem/index.js +0 -5
- package/lib/components/CreateFullPage/CreateFullPageStep.js +17 -14
- package/lib/components/CreateModal/CreateModal.js +1 -4
- package/lib/components/CreateTearsheet/CreateTearsheet.js +10 -11
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +20 -20
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +478 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +349 -0
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +80 -0
- package/lib/components/DataSpreadsheet/createActiveCellFn.js +56 -0
- package/lib/components/DataSpreadsheet/createCellSelectionArea.js +56 -0
- package/lib/components/DataSpreadsheet/generateData.js +58 -0
- package/lib/components/DataSpreadsheet/getCellSize.js +39 -0
- package/lib/components/DataSpreadsheet/index.js +13 -0
- package/lib/components/EditSidePanel/EditSidePanel.js +9 -10
- package/lib/components/EmptyStates/EmptyState.js +9 -8
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -7
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -7
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -7
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -7
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -7
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -7
- package/lib/components/ExampleComponent/ExampleComponent.js +12 -13
- package/lib/components/ExportModal/ExportModal.js +13 -9
- package/lib/components/ExpressiveCard/ExpressiveCard.js +0 -8
- package/lib/components/ImportModal/ImportModal.js +7 -5
- package/lib/components/InlineEdit/InlineEdit.js +51 -46
- package/lib/components/LoadingBar/LoadingBar.js +13 -17
- package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
- package/lib/components/ModifiedTabs/ModifiedTabs.js +24 -18
- package/lib/components/NotificationsPanel/NotificationsPanel.js +109 -86
- package/lib/components/OptionsTile/OptionsTile.js +6 -9
- package/lib/components/PageHeader/PageHeader.js +9 -6
- package/lib/components/ProductiveCard/ProductiveCard.js +24 -18
- package/lib/components/RemoveModal/RemoveModal.js +0 -3
- package/lib/components/SidePanel/SidePanel.js +22 -17
- package/lib/components/TagSet/TagSet.js +13 -9
- package/lib/components/TagSet/TagSetModal.js +17 -13
- package/lib/components/TagSet/TagSetOverflow.js +24 -19
- package/lib/components/Tearsheet/Tearsheet.js +26 -17
- package/lib/components/Tearsheet/TearsheetNarrow.js +18 -15
- package/lib/components/Tearsheet/TearsheetShell.js +2 -3
- package/lib/components/Toolbar/ToolbarButton.js +0 -3
- package/lib/components/WebTerminal/WebTerminal.js +17 -18
- package/lib/components/index.js +8 -8
- package/lib/global/js/hooks/index.js +8 -0
- package/lib/global/js/hooks/useActiveElement.js +39 -0
- package/lib/global/js/package-settings.js +2 -1
- package/lib/global/js/utils/DisplayBox.js +46 -0
- package/lib/global/js/utils/Wrap.js +7 -5
- package/lib/global/js/utils/deepCloneObject.js +37 -0
- package/lib/global/js/utils/getScrollbarWidth.js +23 -0
- package/package.json +18 -16
- package/scss/components/{CancelableTextEdit → ActionBar}/_storybook-styles.scss +2 -2
- package/scss/components/ActionSet/_storybook-styles.scss +1 -3
- package/scss/components/AddSelect/_add-select.scss +77 -1
- package/scss/components/BreadcrumbWithOverflow/_storybook-styles.scss +8 -0
- package/scss/components/ButtonSetWithOverflow/_storybook-styles.scss +8 -0
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +120 -0
- package/scss/components/{CancelableTextEdit → DataSpreadsheet}/_index.scss +2 -2
- package/scss/components/DataSpreadsheet/_storybook-styles.scss +6 -0
- package/scss/components/InlineEdit/_inline-edit.scss +22 -8
- package/scss/components/InlineEdit/_storybook-styles.scss +1 -0
- package/scss/components/TagSet/_storybook-styles.scss +8 -0
- package/scss/components/Tearsheet/_tearsheet.scss +1 -2
- package/scss/components/_index.scss +1 -1
- package/scss/global/styles/_display-box.scss +62 -0
- package/es/components/CancelableTextEdit/CancelableTextEdit.js +0 -245
- package/lib/components/CancelableTextEdit/CancelableTextEdit.js +0 -265
- package/lib/components/CancelableTextEdit/index.js +0 -13
- package/scss/components/CancelableTextEdit/_cancelable-text-edit.scss +0 -212
@@ -1,8 +1,8 @@
|
|
1
1
|
//
|
2
|
-
// Copyright IBM Corp.
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
3
|
//
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
6
6
|
//
|
7
7
|
|
8
|
-
|
8
|
+
@import '../../global/styles/display-box';
|
@@ -6,15 +6,13 @@
|
|
6
6
|
//
|
7
7
|
|
8
8
|
@import '../../global/styles/project-settings';
|
9
|
+
@import '../../global/styles/display-box';
|
9
10
|
|
10
11
|
$block-class: #{$pkg-prefix}--action-set;
|
11
12
|
|
12
13
|
.#{$block-class}__story-container {
|
13
14
|
width: 96vw;
|
14
15
|
min-height: 3rem;
|
15
|
-
border: 1px solid $decorative-01;
|
16
|
-
margin: $spacing-04 auto 0;
|
17
|
-
box-shadow: 0 0 10px 5px $ui-04;
|
18
16
|
}
|
19
17
|
|
20
18
|
.#{$block-class}__story-container--xlg {
|
@@ -47,6 +47,18 @@
|
|
47
47
|
align-items: center;
|
48
48
|
justify-content: space-between;
|
49
49
|
}
|
50
|
+
|
51
|
+
&-cell-title {
|
52
|
+
display: block;
|
53
|
+
color: $text-01;
|
54
|
+
}
|
55
|
+
|
56
|
+
&-cell-subtitle {
|
57
|
+
@include carbon--type-style('label-01');
|
58
|
+
|
59
|
+
display: block;
|
60
|
+
color: $text-02;
|
61
|
+
}
|
50
62
|
}
|
51
63
|
|
52
64
|
// sidebar
|
@@ -65,18 +77,60 @@
|
|
65
77
|
margin-right: $spacing-03;
|
66
78
|
}
|
67
79
|
|
80
|
+
.#{$block-class}__sidebar-selected-item {
|
81
|
+
&-title {
|
82
|
+
color: $text-01;
|
83
|
+
}
|
84
|
+
|
85
|
+
&-subtitle {
|
86
|
+
@include carbon--type-style('label-01');
|
87
|
+
|
88
|
+
color: $text-02;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
68
92
|
.#{$block-class}__sidebar-body {
|
69
93
|
padding: $spacing-05;
|
70
94
|
}
|
71
95
|
|
72
96
|
.#{$block-class} .#{$block-class}__sidebar-item-header {
|
73
97
|
@include carbon--type-style('label-01');
|
98
|
+
|
99
|
+
margin-bottom: $spacing-03;
|
100
|
+
color: $text-02;
|
74
101
|
}
|
75
102
|
|
76
103
|
.#{$block-class} .#{$block-class}__sidebar-item-body {
|
77
104
|
@include carbon--type-style('body-long-01');
|
78
105
|
|
79
|
-
margin-bottom: $spacing-
|
106
|
+
margin-bottom: $spacing-05;
|
107
|
+
}
|
108
|
+
|
109
|
+
.#{$block-class} .#{$block-class}__sidebar-item-remove-button:hover {
|
110
|
+
background: $disabled-02;
|
111
|
+
}
|
112
|
+
|
113
|
+
.#{$block-class} .#{$block-class}__sidebar-accordion-title {
|
114
|
+
display: flex;
|
115
|
+
align-items: center;
|
116
|
+
justify-content: space-between;
|
117
|
+
}
|
118
|
+
|
119
|
+
// columns
|
120
|
+
|
121
|
+
.#{$block-class}__columns {
|
122
|
+
display: flex;
|
123
|
+
flex-direction: row;
|
124
|
+
}
|
125
|
+
|
126
|
+
.#{$block-class}__columns .#{$block-class}__selections-cell {
|
127
|
+
// stylelint-disable-next-line
|
128
|
+
padding: 0 $spacing-05 !important;
|
129
|
+
}
|
130
|
+
|
131
|
+
.#{$block-class}__column {
|
132
|
+
padding: $spacing-05;
|
133
|
+
border-right: $ui-03;
|
80
134
|
}
|
81
135
|
|
82
136
|
// overrides
|
@@ -87,6 +141,10 @@
|
|
87
141
|
flex: 0 0 50%;
|
88
142
|
}
|
89
143
|
|
144
|
+
.#{$block-class} .#{$tearsheet-class}__header-description {
|
145
|
+
color: $text-02;
|
146
|
+
}
|
147
|
+
|
90
148
|
.#{$block-class} .#{$block-class}__items-label {
|
91
149
|
@include carbon--type-style('productive-heading-01');
|
92
150
|
}
|
@@ -102,6 +160,10 @@
|
|
102
160
|
padding-bottom: $spacing-05;
|
103
161
|
}
|
104
162
|
|
163
|
+
.#{$block-class} .#{$carbon-prefix}--radio-button__appearance {
|
164
|
+
margin: 0 $spacing-05 0 0;
|
165
|
+
}
|
166
|
+
|
105
167
|
.#{$block-class}
|
106
168
|
.#{$carbon-prefix}--radio-button-wrapper
|
107
169
|
.#{$carbon-prefix}--radio-button__label {
|
@@ -111,6 +173,20 @@
|
|
111
173
|
.#{$block-class} .#{$carbon-prefix}--breadcrumb .#{$carbon-prefix}--link {
|
112
174
|
cursor: pointer;
|
113
175
|
}
|
176
|
+
|
177
|
+
.#{$block-class} .#{$carbon-prefix}--accordion__item {
|
178
|
+
&:hover .#{$block-class}__sidebar-accordion-title button {
|
179
|
+
opacity: 1;
|
180
|
+
}
|
181
|
+
|
182
|
+
.#{$block-class}__sidebar-accordion-title button {
|
183
|
+
opacity: 0;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
.#{$block-class} .#{$carbon-prefix}--checkbox-label-text {
|
188
|
+
padding-left: $spacing-05;
|
189
|
+
}
|
114
190
|
}
|
115
191
|
|
116
192
|
@include exports('add-select') {
|
@@ -0,0 +1,120 @@
|
|
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
|
+
// Define all component styles in a mixin which is then exported using
|
13
|
+
// the Carbon import-once mechanism.
|
14
|
+
@mixin set-header-borders {
|
15
|
+
border-right: 1px solid $text-03;
|
16
|
+
border-bottom: 1px solid $text-03;
|
17
|
+
}
|
18
|
+
@mixin set-body-borders {
|
19
|
+
border-right: 1px solid $ui-03;
|
20
|
+
border-bottom: 1px solid $ui-03;
|
21
|
+
}
|
22
|
+
@mixin data-spreadsheet {
|
23
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
24
|
+
$block-class: #{$pkg-prefix}--data-spreadsheet;
|
25
|
+
|
26
|
+
.#{$block-class} {
|
27
|
+
display: inline-block;
|
28
|
+
border-spacing: 0;
|
29
|
+
|
30
|
+
&.#{$block-class}__container-has-focus {
|
31
|
+
outline: 2px solid $inverse-link;
|
32
|
+
}
|
33
|
+
|
34
|
+
.#{$block-class}__header--container {
|
35
|
+
position: relative;
|
36
|
+
}
|
37
|
+
|
38
|
+
button.#{$block-class}__td {
|
39
|
+
margin: 0;
|
40
|
+
background-color: transparent;
|
41
|
+
}
|
42
|
+
.#{$block-class}__tr {
|
43
|
+
:last-child {
|
44
|
+
.#{$block-class}__td {
|
45
|
+
border-bottom: 0;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.#{$block-class}__th,
|
51
|
+
.#{$block-class}__td {
|
52
|
+
// height: 2.25rem; // update to be controlled by cellSize prop later
|
53
|
+
padding: 0 $spacing-03;
|
54
|
+
border: 0;
|
55
|
+
margin: 0;
|
56
|
+
color: $text-01;
|
57
|
+
}
|
58
|
+
.#{$block-class}__th:last-child,
|
59
|
+
.#{$block-class}__td:last-child {
|
60
|
+
border-right: 1px solid $text-03;
|
61
|
+
}
|
62
|
+
.#{$block-class}__th,
|
63
|
+
button.#{$block-class}__td-th {
|
64
|
+
@include set-header-borders();
|
65
|
+
|
66
|
+
background-color: $ui-01;
|
67
|
+
cursor: pointer;
|
68
|
+
}
|
69
|
+
.#{$block-class}__td-th {
|
70
|
+
@include carbon--font-weight('semibold');
|
71
|
+
|
72
|
+
display: flex;
|
73
|
+
align-items: center;
|
74
|
+
justify-content: flex-end;
|
75
|
+
}
|
76
|
+
.#{$block-class}__td {
|
77
|
+
@include set-body-borders();
|
78
|
+
|
79
|
+
cursor: cell;
|
80
|
+
text-align: left;
|
81
|
+
}
|
82
|
+
.#{$block-class}__th {
|
83
|
+
@include carbon--type-style('productive-heading-01');
|
84
|
+
|
85
|
+
color: $text-01;
|
86
|
+
text-align: left;
|
87
|
+
}
|
88
|
+
.#{$block-class}__active-cell--highlight {
|
89
|
+
position: absolute;
|
90
|
+
z-index: 2;
|
91
|
+
border: $spacing-01 solid $interactive-01;
|
92
|
+
background-color: transparent;
|
93
|
+
&:focus {
|
94
|
+
border: $spacing-01 solid $interactive-01;
|
95
|
+
outline: 0;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
.#{$block-class}__selection-area--element {
|
99
|
+
position: absolute;
|
100
|
+
z-index: 2;
|
101
|
+
border: 1px solid $interactive-01;
|
102
|
+
pointer-events: none;
|
103
|
+
&::before {
|
104
|
+
position: absolute;
|
105
|
+
top: 0;
|
106
|
+
left: 0;
|
107
|
+
display: block;
|
108
|
+
width: 100%;
|
109
|
+
height: 100%;
|
110
|
+
background-color: $interactive-01;
|
111
|
+
content: '';
|
112
|
+
opacity: 0.25;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
@include exports('data-spreadsheet') {
|
119
|
+
@include data-spreadsheet;
|
120
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
//
|
2
|
-
// Copyright IBM Corp.
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
3
|
//
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
6
6
|
//
|
7
7
|
|
8
|
-
@import './
|
8
|
+
@import './data-spreadsheet';
|
@@ -89,6 +89,7 @@
|
|
89
89
|
transition: background-color $duration--fast-01 motion(entrance, productive),
|
90
90
|
box-shadow $duration--fast-01 motion(entrance, productive),
|
91
91
|
border-color $duration--fast-01 motion(entrance, productive);
|
92
|
+
vertical-align: middle; // mis-aligned items cause height to grow beyond setting.
|
92
93
|
|
93
94
|
white-space: nowrap;
|
94
95
|
|
@@ -102,16 +103,17 @@
|
|
102
103
|
--#{$block-class}--icon-size: #{$spacing-05};
|
103
104
|
}
|
104
105
|
|
106
|
+
&.#{$block-class}--invalid {
|
107
|
+
// editing takes precedence over invalid
|
108
|
+
@include input-outline($support-01);
|
109
|
+
}
|
110
|
+
|
105
111
|
&.#{$block-class}--editing {
|
106
112
|
@include input-outline($focus);
|
107
113
|
|
108
114
|
background-color: $ui-01;
|
109
115
|
}
|
110
116
|
|
111
|
-
.#{$block-class}--invalid {
|
112
|
-
@include input-outline($support-01);
|
113
|
-
}
|
114
|
-
|
115
117
|
.#{$block-class}__input {
|
116
118
|
display: inline-block;
|
117
119
|
overflow: hidden;
|
@@ -137,10 +139,13 @@
|
|
137
139
|
top: 0;
|
138
140
|
left: 0;
|
139
141
|
display: block;
|
142
|
+
overflow: hidden;
|
143
|
+
width: 0;
|
140
144
|
margin-left: $spacing-05;
|
141
145
|
color: $text-05;
|
142
146
|
content: attr(data-placeholder);
|
143
147
|
opacity: 0;
|
148
|
+
visibility: hidden;
|
144
149
|
}
|
145
150
|
|
146
151
|
.#{$block-class}__ellipsis {
|
@@ -179,9 +184,11 @@
|
|
179
184
|
}
|
180
185
|
|
181
186
|
.#{$block-class}__input--empty::after {
|
187
|
+
width: initial;
|
182
188
|
opacity: 1;
|
183
189
|
// only transition fade in
|
184
190
|
transition: opacity $duration--moderate-02 motion(standard, productive);
|
191
|
+
visibility: visible;
|
185
192
|
}
|
186
193
|
|
187
194
|
.#{$block-class}__after-input-elements {
|
@@ -282,12 +289,19 @@
|
|
282
289
|
}
|
283
290
|
}
|
284
291
|
|
285
|
-
|
286
|
-
|
287
|
-
|
292
|
+
@media (hover: hover) {
|
293
|
+
// if hover is the primary input mechanism hide edit button
|
294
|
+
.#{$block-class}__edit {
|
295
|
+
opacity: 0;
|
296
|
+
transition: opacity $duration--fast-01 motion(entrance, productive);
|
297
|
+
}
|
298
|
+
|
299
|
+
&:hover .#{$block-class}__edit {
|
300
|
+
opacity: 1;
|
301
|
+
}
|
288
302
|
}
|
289
303
|
|
290
|
-
|
304
|
+
.#{$block-class}__edit--always-visible {
|
291
305
|
opacity: 1;
|
292
306
|
}
|
293
307
|
|
@@ -0,0 +1,62 @@
|
|
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
|
+
@import '../../global/styles/project-settings';
|
8
|
+
|
9
|
+
$block-class: 'ccs-sb--display-box';
|
10
|
+
|
11
|
+
$indicator-width: $spacing-02;
|
12
|
+
$indicator-height: $spacing-04;
|
13
|
+
|
14
|
+
/**
|
15
|
+
Adds a box indicating the extent of the available space to the displayed component
|
16
|
+
*/
|
17
|
+
.#{$block-class} {
|
18
|
+
position: relative;
|
19
|
+
display: inline-block;
|
20
|
+
padding-top: $spacing-05; // space for the indicators
|
21
|
+
color: $text-05;
|
22
|
+
}
|
23
|
+
|
24
|
+
.#{$block-class}__indicator {
|
25
|
+
position: absolute;
|
26
|
+
top: 0;
|
27
|
+
width: 100%;
|
28
|
+
border-bottom: 1px solid $text-05;
|
29
|
+
white-space: nowrap;
|
30
|
+
@include carbon--type-style('helper-text-01');
|
31
|
+
}
|
32
|
+
|
33
|
+
.#{$block-class}__message {
|
34
|
+
position: absolute;
|
35
|
+
bottom: $spacing-02;
|
36
|
+
}
|
37
|
+
|
38
|
+
.sb-main-centered .#{$block-class}__message {
|
39
|
+
left: 50%;
|
40
|
+
min-width: 100vh;
|
41
|
+
text-align: center;
|
42
|
+
transform: translateX(-50%);
|
43
|
+
}
|
44
|
+
|
45
|
+
.#{$block-class}__indicator--left,
|
46
|
+
.#{$block-class}__indicator--right {
|
47
|
+
position: absolute;
|
48
|
+
bottom: calc(-1 * $indicator-height);
|
49
|
+
width: 0;
|
50
|
+
height: 0;
|
51
|
+
border-top: $indicator-height solid $text-05;
|
52
|
+
border-right: $indicator-width solid transparent;
|
53
|
+
border-left: $indicator-width solid transparent;
|
54
|
+
}
|
55
|
+
|
56
|
+
.#{$block-class}__indicator--left {
|
57
|
+
left: calc(-1 * $indicator-width);
|
58
|
+
}
|
59
|
+
|
60
|
+
.#{$block-class}__indicator--right {
|
61
|
+
right: calc(-1 * $indicator-width);
|
62
|
+
}
|