@carbon/ibm-products 2.35.0 → 2.36.0-alpha.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/index-full-carbon.css +957 -567
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +67 -74
- 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 +227 -206
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +443 -247
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Coachmark/utils/enums.d.ts +36 -22
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/es/components/CreateFullPage/CreateFullPage.js +12 -8
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/es/components/EditFullPage/EditFullPage.js +3 -3
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/es/components/FullPageError/FullPageError.d.ts +2 -1
- package/es/components/FullPageError/FullPageError.js +24 -49
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/es/components/NonLinearReading/NonLinearReading.js +2 -7
- package/es/components/SearchBar/SearchBar.d.ts +51 -3
- package/es/components/SearchBar/SearchBar.js +5 -6
- package/es/components/SidePanel/SidePanel.js +10 -5
- package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/es/components/TruncatedList/TruncatedList.js +5 -4
- package/lib/components/Coachmark/utils/enums.d.ts +36 -22
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +5 -5
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +12 -8
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/lib/components/EditFullPage/EditFullPage.js +3 -3
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/lib/components/FullPageError/FullPageError.d.ts +2 -1
- package/lib/components/FullPageError/FullPageError.js +24 -49
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
- package/lib/components/SearchBar/SearchBar.d.ts +51 -3
- package/lib/components/SearchBar/SearchBar.js +5 -6
- package/lib/components/SidePanel/SidePanel.js +10 -5
- package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/lib/components/TruncatedList/TruncatedList.js +5 -4
- package/package.json +4 -4
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
- package/scss/components/FullPageError/_full-page-error.scss +10 -10
- package/scss/components/UserAvatar/_user-avatar.scss +6 -3
|
@@ -1,7 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2024, 2024
|
|
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 React, { PropsWithChildren, ReactNode } from 'react';
|
|
8
|
+
interface TruncatedListProps extends PropsWithChildren {
|
|
9
|
+
as?: React.ElementType | string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional class name for expand/collapse button.
|
|
12
|
+
*/
|
|
13
|
+
buttonClassName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The contents of the TruncatedList.
|
|
16
|
+
*/
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Provide an optional class to be applied to the containing node.
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Number of items to render and display when the list is truncated and collapsed.
|
|
24
|
+
* Scrolling is not enabled when collapsed. The smallest number is 1.
|
|
25
|
+
*/
|
|
26
|
+
collapsedItemsLimit?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum number of items to show when the list is expanded. All
|
|
29
|
+
* items are rendered when the list is expanded. Scrolling is enabled
|
|
30
|
+
* if there are more items to display than this number.
|
|
31
|
+
*/
|
|
32
|
+
expandedItemsLimit?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Optional callback reports the collapsed state of the list.
|
|
35
|
+
*/
|
|
36
|
+
onClick?: (value: any) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Text label for when the list is expanded.
|
|
39
|
+
*/
|
|
40
|
+
viewLessLabel?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Callback function for building the label when the list is collapsed.
|
|
43
|
+
*/
|
|
44
|
+
viewMoreLabel?: (value: any) => void;
|
|
45
|
+
}
|
|
1
46
|
/**
|
|
2
47
|
* The `TruncatedList` allows consumers to control how many items are
|
|
3
48
|
* revealed to the user while giving the user the ability to expand
|
|
4
49
|
* and see the entire list.
|
|
5
50
|
*/
|
|
6
|
-
export let TruncatedList: React.ForwardRefExoticComponent<React.RefAttributes<
|
|
7
|
-
|
|
51
|
+
export declare let TruncatedList: React.ForwardRefExoticComponent<TruncatedListProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export {};
|
|
@@ -37,7 +37,6 @@ var defaults = {
|
|
|
37
37
|
return "View more (".concat(value, ")");
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
|
|
41
40
|
/**
|
|
42
41
|
* The `TruncatedList` allows consumers to control how many items are
|
|
43
42
|
* revealed to the user while giving the user the ability to expand
|
|
@@ -93,13 +92,15 @@ exports.TruncatedList = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
|
93
92
|
// list is both collapsed and expanded.
|
|
94
93
|
React.useEffect(function () {
|
|
95
94
|
if (listRef && childrenArray.length > 0) {
|
|
95
|
+
var _listRef$current;
|
|
96
96
|
var numItemsToShow = isCollapsed ? minItems : maxItems;
|
|
97
|
-
var items = listRef.current.childNodes;
|
|
97
|
+
var items = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.childNodes;
|
|
98
98
|
var _listHeight = 0;
|
|
99
99
|
for (var index = 0; index < numItemsToShow; index++) {
|
|
100
|
-
if (items[index]) {
|
|
100
|
+
if (items && items[index]) {
|
|
101
101
|
var _window;
|
|
102
|
-
var
|
|
102
|
+
var itemElement = items[index];
|
|
103
|
+
var height = ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(itemElement)) === null || _window === void 0 ? void 0 : _window.height) || '16';
|
|
103
104
|
_listHeight += parseInt(height);
|
|
104
105
|
}
|
|
105
106
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ibm-products",
|
|
3
3
|
"description": "Carbon for IBM Products",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.36.0-alpha.27+3b4e0fa75",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
"@carbon/grid": "^11.22.0",
|
|
109
109
|
"@carbon/layout": "^11.21.0",
|
|
110
110
|
"@carbon/motion": "^11.17.0",
|
|
111
|
-
"@carbon/react": "^1.
|
|
112
|
-
"@carbon/themes": "^11.
|
|
111
|
+
"@carbon/react": "^1.55.0",
|
|
112
|
+
"@carbon/themes": "^11.34.0",
|
|
113
113
|
"@carbon/type": "^11.26.0",
|
|
114
114
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
|
115
115
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "3b4e0fa7593382128900e68051863dbc949a319b"
|
|
118
118
|
}
|
|
@@ -24,7 +24,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
|
24
24
|
.#{$block-class} {
|
|
25
25
|
height: inherit;
|
|
26
26
|
}
|
|
27
|
-
.#{$block-class}
|
|
27
|
+
.#{$block-class}__container {
|
|
28
28
|
height: 100%;
|
|
29
29
|
margin: 0 $spacing-06;
|
|
30
30
|
|
|
@@ -32,19 +32,19 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
|
32
32
|
margin: 0 $spacing-03;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
.#{$block-class}
|
|
35
|
+
.#{$block-class}__grid {
|
|
36
36
|
height: 100%;
|
|
37
37
|
padding-top: $spacing-07;
|
|
38
38
|
padding-bottom: $spacing-07;
|
|
39
39
|
}
|
|
40
|
-
.#{$block-class}
|
|
40
|
+
.#{$block-class}__column {
|
|
41
41
|
padding: 0;
|
|
42
42
|
@include breakpoint(lg) {
|
|
43
43
|
padding: 0 $spacing-07 0 0;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.#{$block-class}
|
|
47
|
+
.#{$block-class}__svg-container {
|
|
48
48
|
display: flex;
|
|
49
49
|
height: 100%;
|
|
50
50
|
padding: $spacing-03 $spacing-03 $spacing-11 $spacing-03;
|
|
@@ -53,16 +53,16 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.#{$block-class}
|
|
57
|
-
.#{$block-class}
|
|
56
|
+
.#{$block-class}__label,
|
|
57
|
+
.#{$block-class}__title {
|
|
58
58
|
@include type-style('fluid-heading-05', true);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.#{$block-class}
|
|
61
|
+
.#{$block-class}__label {
|
|
62
62
|
display: block;
|
|
63
63
|
color: $text-error;
|
|
64
64
|
}
|
|
65
|
-
.#{$block-class}
|
|
65
|
+
.#{$block-class}__title {
|
|
66
66
|
margin-bottom: $spacing-09;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -73,12 +73,12 @@ $block-class: #{c4p-settings.$pkg-prefix}--full-page-error;
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
// safari rendering fix
|
|
76
|
-
.#{$block-class}
|
|
76
|
+
.#{$block-class}__svg-container svg.#{$block-class}__svg {
|
|
77
77
|
width: 100%;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// svg theme styles
|
|
81
|
-
.#{$block-class}
|
|
81
|
+
.#{$block-class}__svg-container svg.#{$block-class}__svg path {
|
|
82
82
|
fill: $background;
|
|
83
83
|
stroke: $border-inverse;
|
|
84
84
|
}
|
|
@@ -65,7 +65,6 @@ $sizes: (
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
@mixin photo-styling {
|
|
68
|
-
position: fixed;
|
|
69
68
|
border-radius: 100%;
|
|
70
69
|
object-fit: fill;
|
|
71
70
|
}
|
|
@@ -78,14 +77,18 @@ $sizes: (
|
|
|
78
77
|
@mixin setLightBg($order, $color) {
|
|
79
78
|
:root .#{$block-class}--#{$order},
|
|
80
79
|
.#{$carbon-prefix}--g10 .#{$block-class}--#{$order},
|
|
81
|
-
.#{$carbon-prefix}--white .#{$block-class}--#{$order}
|
|
80
|
+
.#{$carbon-prefix}--white .#{$block-class}--#{$order},
|
|
81
|
+
[storybook-carbon-theme='g10'] .#{$block-class}--#{$order},
|
|
82
|
+
[storybook-carbon-theme='white'] .#{$block-class}--#{$order} {
|
|
82
83
|
@include setBgColor($color);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
@mixin setDarkBg($order, $color) {
|
|
87
88
|
.#{$carbon-prefix}--g90 .#{$block-class}--#{$order},
|
|
88
|
-
.#{$carbon-prefix}--g100 .#{$block-class}--#{$order}
|
|
89
|
+
.#{$carbon-prefix}--g100 .#{$block-class}--#{$order},
|
|
90
|
+
[storybook-carbon-theme='g90'] .#{$block-class}--#{$order},
|
|
91
|
+
[storybook-carbon-theme='g100'] .#{$block-class}--#{$order} {
|
|
89
92
|
@include setBgColor($color);
|
|
90
93
|
}
|
|
91
94
|
}
|