@carbon/ibm-products 2.84.0 → 2.85.0
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 +18 -13
- 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 +18 -13
- 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 +18 -13
- 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 +18 -13
- 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/next/Coachmark/ContentHeader.js +2 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +12 -1
- package/es/components/CreateTearsheet/CreateTearsheet.d.ts +1 -0
- package/es/components/CreateTearsheet/CreateTearsheet.js +3 -0
- package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +4 -0
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +7 -1
- package/es/components/EditInPlace/EditInPlace.d.ts +12 -1
- package/es/components/EditInPlace/EditInPlace.js +52 -31
- package/es/components/ImportModal/ImportModal.d.ts +5 -1
- package/es/components/ImportModal/ImportModal.js +12 -6
- package/es/components/PageHeader/next/PageHeader.d.ts +15 -238
- package/es/components/PageHeader/next/PageHeader.js +25 -637
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts +41 -0
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.js +74 -0
- package/es/components/PageHeader/next/PageHeaderBreadcrumbOverflow.d.ts +12 -0
- package/es/components/PageHeader/next/PageHeaderBreadcrumbOverflow.js +82 -0
- package/es/components/PageHeader/next/PageHeaderContent.d.ts +39 -0
- package/es/components/PageHeader/next/PageHeaderContent.js +129 -0
- package/es/components/PageHeader/next/PageHeaderContentPageActions.d.ts +52 -0
- package/es/components/PageHeader/next/PageHeaderContentPageActions.js +126 -0
- package/es/components/PageHeader/next/PageHeaderContentText.d.ts +44 -0
- package/es/components/PageHeader/next/PageHeaderContentText.js +54 -0
- package/es/components/PageHeader/next/PageHeaderHeroImage.d.ts +36 -0
- package/es/components/PageHeader/next/PageHeaderHeroImage.js +62 -0
- package/es/components/PageHeader/next/PageHeaderScrollButton.d.ts +13 -0
- package/es/components/PageHeader/next/PageHeaderScrollButton.js +73 -0
- package/es/components/PageHeader/next/PageHeaderTabBar.d.ts +19 -0
- package/es/components/PageHeader/next/PageHeaderTabBar.js +66 -0
- package/es/components/PageHeader/next/PageHeaderTagOverflow.d.ts +13 -0
- package/es/components/PageHeader/next/PageHeaderTagOverflow.js +68 -0
- package/es/components/PageHeader/next/PageHeaderTitleBreadcrumb.d.ts +9 -0
- package/es/components/PageHeader/next/PageHeaderTitleBreadcrumb.js +43 -0
- package/es/components/PageHeader/next/index.d.ts +3 -2
- package/es/components/PageHeader/next/index.js +11 -1
- package/es/global/js/hooks/useCreateComponentStepChange.d.ts +2 -1
- package/es/global/js/hooks/useCreateComponentStepChange.js +3 -2
- package/es/global/js/hooks/usePortalTarget.js +1 -1
- package/es/global/js/utils/makeDraggable/makeDraggable.js +22 -13
- package/lib/components/Coachmark/next/Coachmark/ContentHeader.js +2 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +12 -1
- package/lib/components/CreateTearsheet/CreateTearsheet.d.ts +1 -0
- package/lib/components/CreateTearsheet/CreateTearsheet.js +3 -0
- package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +4 -0
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -1
- package/lib/components/EditInPlace/EditInPlace.d.ts +12 -1
- package/lib/components/EditInPlace/EditInPlace.js +50 -29
- package/lib/components/ImportModal/ImportModal.d.ts +5 -1
- package/lib/components/ImportModal/ImportModal.js +12 -6
- package/lib/components/PageHeader/next/PageHeader.d.ts +15 -238
- package/lib/components/PageHeader/next/PageHeader.js +42 -654
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts +41 -0
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.js +76 -0
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbOverflow.d.ts +12 -0
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbOverflow.js +84 -0
- package/lib/components/PageHeader/next/PageHeaderContent.d.ts +39 -0
- package/lib/components/PageHeader/next/PageHeaderContent.js +131 -0
- package/lib/components/PageHeader/next/PageHeaderContentPageActions.d.ts +52 -0
- package/lib/components/PageHeader/next/PageHeaderContentPageActions.js +128 -0
- package/lib/components/PageHeader/next/PageHeaderContentText.d.ts +44 -0
- package/lib/components/PageHeader/next/PageHeaderContentText.js +56 -0
- package/lib/components/PageHeader/next/PageHeaderHeroImage.d.ts +36 -0
- package/lib/components/PageHeader/next/PageHeaderHeroImage.js +64 -0
- package/lib/components/PageHeader/next/PageHeaderScrollButton.d.ts +13 -0
- package/lib/components/PageHeader/next/PageHeaderScrollButton.js +75 -0
- package/lib/components/PageHeader/next/PageHeaderTabBar.d.ts +19 -0
- package/lib/components/PageHeader/next/PageHeaderTabBar.js +68 -0
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.d.ts +13 -0
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.js +70 -0
- package/lib/components/PageHeader/next/PageHeaderTitleBreadcrumb.d.ts +9 -0
- package/lib/components/PageHeader/next/PageHeaderTitleBreadcrumb.js +45 -0
- package/lib/components/PageHeader/next/index.d.ts +3 -2
- package/lib/components/PageHeader/next/index.js +20 -10
- package/lib/global/js/hooks/useCreateComponentStepChange.d.ts +2 -1
- package/lib/global/js/hooks/useCreateComponentStepChange.js +3 -2
- package/lib/global/js/hooks/usePortalTarget.js +1 -1
- package/lib/global/js/utils/makeDraggable/makeDraggable.js +22 -13
- package/package.json +7 -7
- package/scss/components/Datagrid/_datagrid.scss +7 -10
- package/scss/components/EditInPlace/_edit-in-place.scss +11 -3
- package/scss/components/PageHeader/_page-header.scss +2 -1
- package/telemetry.yml +13 -0
|
@@ -34,7 +34,8 @@ const ContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
34
34
|
const dragRef = useRef(null);
|
|
35
35
|
const handleRef = ref || headerRef;
|
|
36
36
|
const contentHeaderBlockClass = `${blockClass}--content-header`;
|
|
37
|
-
const closeBubble =
|
|
37
|
+
const closeBubble = e => {
|
|
38
|
+
e?.stopPropagation();
|
|
38
39
|
onClose?.();
|
|
39
40
|
setOpen(false);
|
|
40
41
|
};
|
|
@@ -190,7 +190,18 @@ const ConditionBuilderItem = _ref => {
|
|
|
190
190
|
role: "gridcell",
|
|
191
191
|
className: `${popOverClassName} ${blockClass}__popover`,
|
|
192
192
|
ref: popoverRef,
|
|
193
|
-
onRequestClose:
|
|
193
|
+
onRequestClose: () => {
|
|
194
|
+
// Workaround: prevent closing the popover when a date is selected
|
|
195
|
+
// from the flatpickr calendar, which is rendered outside the popover DOM.
|
|
196
|
+
// The flatpickr calendar is appended outside the popover DOM, so clicks on it
|
|
197
|
+
// trigger onRequestClose. We use the global event object to check the click target.
|
|
198
|
+
// carbon issue: https://github.com/carbon-design-system/carbon/issues/21690
|
|
199
|
+
const target = event?.target;
|
|
200
|
+
if (target?.closest('.flatpickr-calendar')) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
closePopover();
|
|
204
|
+
}
|
|
194
205
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, _extends({
|
|
195
206
|
label: getLabel(),
|
|
196
207
|
hideLabel: !label ? true : false,
|
|
@@ -13,6 +13,7 @@ export interface StepsContextType {
|
|
|
13
13
|
setOnPrevious: (fn: any) => void;
|
|
14
14
|
setOnNext: (fn: any) => void;
|
|
15
15
|
setOnMount: (fn: any) => void;
|
|
16
|
+
setSecondaryButtonDisabled?: Dispatch<SetStateAction<boolean>>;
|
|
16
17
|
setStepData: Dispatch<SetStateAction<Step[]>>;
|
|
17
18
|
stepData: Step[];
|
|
18
19
|
}
|
|
@@ -72,6 +72,7 @@ const CreateTearsheet = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
72
72
|
const [onPrevious, setOnPrevious] = useState();
|
|
73
73
|
const [onNext, setOnNext] = useState();
|
|
74
74
|
const [onMount, setOnMount] = useState();
|
|
75
|
+
const [secondaryButtonDisabled, setSecondaryButtonDisabled] = useState(false);
|
|
75
76
|
const [stepData, setStepData] = useState([]);
|
|
76
77
|
const [firstIncludedStep, setFirstIncludedStep] = useState(1);
|
|
77
78
|
const [lastIncludedStep, setLastIncludedStep] = useState();
|
|
@@ -137,6 +138,7 @@ const CreateTearsheet = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
137
138
|
submitButtonText,
|
|
138
139
|
nextButtonText,
|
|
139
140
|
isSubmitting,
|
|
141
|
+
secondaryButtonDisabled,
|
|
140
142
|
componentBlockClass: blockClass,
|
|
141
143
|
experimentalSecondarySubmit,
|
|
142
144
|
experimentalSecondarySubmitText: experimentalSecondarySubmit?.labelText ? experimentalSecondarySubmit.labelText : experimentalSecondarySubmitText,
|
|
@@ -177,6 +179,7 @@ const CreateTearsheet = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
177
179
|
setOnPrevious: fn => setOnPrevious(() => fn),
|
|
178
180
|
setOnNext: fn => setOnNext(() => fn),
|
|
179
181
|
setOnMount: fn => setOnMount(() => fn),
|
|
182
|
+
setSecondaryButtonDisabled,
|
|
180
183
|
setStepData,
|
|
181
184
|
stepData
|
|
182
185
|
}
|
|
@@ -89,6 +89,10 @@ interface CreateTearsheetStepBaseProps extends PropsWithChildren {
|
|
|
89
89
|
* Optional function to be called when you move to the previous step.
|
|
90
90
|
*/
|
|
91
91
|
onPrevious?: () => void;
|
|
92
|
+
/**
|
|
93
|
+
* This will conditionally disable the secondary (Back) button in the multi step Tearsheet
|
|
94
|
+
*/
|
|
95
|
+
secondaryButtonDisabled?: boolean;
|
|
92
96
|
/**
|
|
93
97
|
* Sets the optional secondary label on the progress step component
|
|
94
98
|
*/
|
|
@@ -52,6 +52,7 @@ const CreateTearsheetStep = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
52
52
|
onMount,
|
|
53
53
|
onNext,
|
|
54
54
|
onPrevious,
|
|
55
|
+
secondaryButtonDisabled,
|
|
55
56
|
secondaryLabel,
|
|
56
57
|
subtitle,
|
|
57
58
|
title,
|
|
@@ -98,11 +99,12 @@ const CreateTearsheetStep = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
98
99
|
stepsContext.setIsDisabled(!!disableSubmit);
|
|
99
100
|
stepsContext?.setOnNext(onNext); // needs to be updated here otherwise there could be stale state values from only initially setting onNext
|
|
100
101
|
stepsContext?.setOnPrevious(onPrevious);
|
|
102
|
+
stepsContext?.setSecondaryButtonDisabled?.(!!secondaryButtonDisabled);
|
|
101
103
|
|
|
102
104
|
//Handle props for experimentalSecondarySubmit button, depending on state change
|
|
103
105
|
stepsContext?.setExperimentalSecondarySubmit(experimentalSecondarySubmit);
|
|
104
106
|
}
|
|
105
|
-
}, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, stepRef, stepRefValue, experimentalSecondarySubmit]);
|
|
107
|
+
}, [stepsContext, stepNumber, disableSubmit, onNext, onPrevious, secondaryButtonDisabled, stepRef, stepRefValue, experimentalSecondarySubmit]);
|
|
106
108
|
const renderDescription = () => {
|
|
107
109
|
if (description) {
|
|
108
110
|
if (typeof description === 'string') {
|
|
@@ -222,6 +224,10 @@ CreateTearsheetStep.propTypes = {
|
|
|
222
224
|
* Optional function to be called when you move to the previous step.
|
|
223
225
|
*/
|
|
224
226
|
onPrevious: PropTypes.func,
|
|
227
|
+
/**
|
|
228
|
+
* This will conditionally disable the secondary (Back) button in the multi step Tearsheet
|
|
229
|
+
*/
|
|
230
|
+
secondaryButtonDisabled: PropTypes.bool,
|
|
225
231
|
/**
|
|
226
232
|
* Sets the optional secondary label on the progress step component
|
|
227
233
|
*/
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, { PropsWithChildren } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
type Size = 'sm' | 'md' | 'lg';
|
|
9
10
|
type AlignPropType = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
|
|
10
11
|
type Shape = {
|
|
@@ -68,13 +69,23 @@ export interface EditInplaceProps extends PropsWithChildren {
|
|
|
68
69
|
/**
|
|
69
70
|
* determines if the input is in readOnly mode
|
|
70
71
|
*/
|
|
72
|
+
readOnly: PropTypes.bool;
|
|
71
73
|
/**
|
|
72
|
-
* label for the edit button that displays when in read only mode
|
|
74
|
+
* label for the edit off button that displays when in read only mode
|
|
73
75
|
*/
|
|
76
|
+
readOnlyLabel?: PropTypes.string;
|
|
77
|
+
/**
|
|
78
|
+
* text for the toggletip that displays when in read only mode
|
|
79
|
+
*/
|
|
80
|
+
readOnlyToggleTipText?: string;
|
|
74
81
|
/**
|
|
75
82
|
* label for save button
|
|
76
83
|
*/
|
|
77
84
|
saveLabel: string;
|
|
85
|
+
/**
|
|
86
|
+
* alignment for the toggletip that displays when in read only mode
|
|
87
|
+
*/
|
|
88
|
+
toggleTipAlignment?: AlignPropType;
|
|
78
89
|
/**
|
|
79
90
|
* vertical size of control
|
|
80
91
|
*/
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import { WarningFilled, Close, Checkmark, Edit } from '@carbon/react/icons';
|
|
9
|
+
import { WarningFilled, EditOff, Close, Checkmark, Edit } from '@carbon/react/icons';
|
|
10
10
|
import React__default, { forwardRef, useState, useRef, useEffect } from 'react';
|
|
11
11
|
import { pkg } from '../../settings.js';
|
|
12
|
-
import { usePrefix, IconButton } from '@carbon/react';
|
|
12
|
+
import { usePrefix, Toggletip, ToggletipButton, ToggletipContent, IconButton } from '@carbon/react';
|
|
13
13
|
import PropTypes from '../../_virtual/index.js';
|
|
14
14
|
import cx from 'classnames';
|
|
15
15
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
|
16
16
|
|
|
17
|
-
var _Close, _Checkmark, _Edit;
|
|
17
|
+
var _EditOff, _Close, _Checkmark, _Edit;
|
|
18
18
|
const componentName = 'EditInPlace';
|
|
19
19
|
const blockClass = `${pkg.prefix}--edit-in-place`;
|
|
20
20
|
const defaults = {
|
|
@@ -34,10 +34,12 @@ const EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
34
34
|
onChange,
|
|
35
35
|
onSave,
|
|
36
36
|
onBlur,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
readOnly,
|
|
38
|
+
readOnlyLabel,
|
|
39
|
+
readOnlyToggleTipText,
|
|
39
40
|
saveLabel,
|
|
40
41
|
size = 'sm',
|
|
42
|
+
toggleTipAlignment,
|
|
41
43
|
tooltipAlignment,
|
|
42
44
|
value,
|
|
43
45
|
placeholder,
|
|
@@ -77,10 +79,6 @@ const EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
77
79
|
onChange(target.value);
|
|
78
80
|
};
|
|
79
81
|
const onFocusHandler = e => {
|
|
80
|
-
// if (readOnly) {
|
|
81
|
-
// return;
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
82
|
if (!isTargetingChild(e)) {
|
|
85
83
|
inputRef.current?.focus();
|
|
86
84
|
setFocused(true);
|
|
@@ -143,37 +141,49 @@ const EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
143
141
|
}
|
|
144
142
|
escaping.current = false;
|
|
145
143
|
};
|
|
146
|
-
|
|
147
|
-
ref: ref
|
|
148
|
-
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
|
|
149
|
-
className: cx(blockClass, `${blockClass}--${size}`, {
|
|
150
|
-
[`${blockClass}--focused`]: focused,
|
|
151
|
-
[`${blockClass}--invalid`]: invalid,
|
|
152
|
-
[`${blockClass}--inherit-type`]: inheritTypography,
|
|
153
|
-
[`${blockClass}--overflows`]: inputRef.current && inputRef.current.scrollWidth > inputRef.current.offsetWidth
|
|
154
|
-
// [`${blockClass}--readonly`]: readOnly,
|
|
155
|
-
}),
|
|
156
|
-
onFocus: onFocusHandler,
|
|
157
|
-
onBlur: onBlurHandler
|
|
158
|
-
}, /*#__PURE__*/React__default.createElement("input", {
|
|
144
|
+
const inputElement = /*#__PURE__*/React__default.createElement("input", {
|
|
159
145
|
id: id,
|
|
160
146
|
className: cx(`${blockClass}__text-input`, `${carbonPrefix}--text-input`, `${carbonPrefix}--text-input--${size}`),
|
|
161
147
|
type: "text",
|
|
162
148
|
placeholder: placeholder,
|
|
163
149
|
value: value,
|
|
164
150
|
onChange: onChangeHandler,
|
|
165
|
-
ref: inputRef
|
|
166
|
-
|
|
167
|
-
,
|
|
151
|
+
ref: inputRef,
|
|
152
|
+
readOnly: readOnly,
|
|
168
153
|
onKeyDown: onKeyHandler,
|
|
169
154
|
"aria-label": labelText,
|
|
170
155
|
"aria-invalid": invalid
|
|
171
|
-
})
|
|
156
|
+
});
|
|
157
|
+
const inputContainer = /*#__PURE__*/React__default.createElement("div", {
|
|
158
|
+
className: cx(blockClass, `${blockClass}--${size}`, {
|
|
159
|
+
[`${blockClass}--focused`]: focused,
|
|
160
|
+
[`${blockClass}--invalid`]: invalid,
|
|
161
|
+
[`${blockClass}--inherit-type`]: inheritTypography,
|
|
162
|
+
[`${blockClass}--overflows`]: inputRef.current && inputRef.current.scrollWidth > inputRef.current.offsetWidth,
|
|
163
|
+
[`${blockClass}--readonly`]: readOnly
|
|
164
|
+
}),
|
|
165
|
+
onFocus: onFocusHandler,
|
|
166
|
+
onBlur: onBlurHandler
|
|
167
|
+
}, readOnly ? /*#__PURE__*/React__default.createElement(Toggletip, {
|
|
168
|
+
align: toggleTipAlignment,
|
|
169
|
+
className: `${blockClass}__toggletip-wrapper`
|
|
170
|
+
}, /*#__PURE__*/React__default.createElement(ToggletipButton, {
|
|
171
|
+
label: readOnlyLabel || 'Edit off'
|
|
172
|
+
}, inputElement), /*#__PURE__*/React__default.createElement(ToggletipContent, null, /*#__PURE__*/React__default.createElement("p", null, readOnlyToggleTipText || 'This field is read-only and cannot be edited'))) : inputElement, /*#__PURE__*/React__default.createElement("div", {
|
|
172
173
|
className: `${blockClass}__toolbar`
|
|
173
174
|
}, invalid && /*#__PURE__*/React__default.createElement(WarningFilled, {
|
|
174
175
|
size: 16,
|
|
175
176
|
className: `${blockClass}__warning-icon`
|
|
176
|
-
}),
|
|
177
|
+
}), readOnly ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
178
|
+
className: `${blockClass}__btn-readonly`,
|
|
179
|
+
size: size,
|
|
180
|
+
label: readOnlyLabel || 'Edit off',
|
|
181
|
+
kind: "ghost",
|
|
182
|
+
key: "readonly",
|
|
183
|
+
onClick: onFocusHandler
|
|
184
|
+
}, _EditOff || (_EditOff = /*#__PURE__*/React__default.createElement(EditOff, {
|
|
185
|
+
size: 16
|
|
186
|
+
}))) : focused ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
177
187
|
align: tipAlignments.cancel,
|
|
178
188
|
size: size,
|
|
179
189
|
label: cancelLabel,
|
|
@@ -206,7 +216,10 @@ const EditInPlace = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
206
216
|
key: "edit"
|
|
207
217
|
}, _Edit || (_Edit = /*#__PURE__*/React__default.createElement(Edit, {
|
|
208
218
|
size: 16
|
|
209
|
-
})))))
|
|
219
|
+
})))));
|
|
220
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
221
|
+
ref: ref
|
|
222
|
+
}, getDevtoolsProps(componentName)), inputContainer, invalid && /*#__PURE__*/React__default.createElement("p", {
|
|
210
223
|
className: `${blockClass}__warning-text`
|
|
211
224
|
}, invalidText ?? deprecated_invalidLabel));
|
|
212
225
|
});
|
|
@@ -280,11 +293,15 @@ EditInPlace.propTypes = {
|
|
|
280
293
|
/**
|
|
281
294
|
* determines if the input is in readOnly mode
|
|
282
295
|
*/
|
|
283
|
-
|
|
296
|
+
readOnly: PropTypes.bool,
|
|
297
|
+
/**
|
|
298
|
+
* label for the edit off button that displays when in read only mode
|
|
299
|
+
*/
|
|
300
|
+
readOnlyLabel: PropTypes.string,
|
|
284
301
|
/**
|
|
285
|
-
*
|
|
302
|
+
* text for the toggletip that displays when in read only mode
|
|
286
303
|
*/
|
|
287
|
-
|
|
304
|
+
readOnlyToggleTipText: PropTypes.string,
|
|
288
305
|
/**
|
|
289
306
|
* label for save button
|
|
290
307
|
*/
|
|
@@ -293,6 +310,10 @@ EditInPlace.propTypes = {
|
|
|
293
310
|
* vertical size of control
|
|
294
311
|
*/
|
|
295
312
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
313
|
+
/**
|
|
314
|
+
* alignment for the toggletip that displays when in read only mode
|
|
315
|
+
*/
|
|
316
|
+
toggleTipAlignment: alignPropType,
|
|
296
317
|
/**
|
|
297
318
|
* tooltipAlignment from the standard tooltip. Default center.
|
|
298
319
|
*
|
|
@@ -59,6 +59,10 @@ export interface ImportModalProps {
|
|
|
59
59
|
* Label that appears when a file is uploaded to show number of files (1 / 1)
|
|
60
60
|
*/
|
|
61
61
|
fileUploadLabel?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Hide input label
|
|
64
|
+
*/
|
|
65
|
+
hideInputLabel?: boolean;
|
|
62
66
|
/**
|
|
63
67
|
* Button icon for import by url button
|
|
64
68
|
*/
|
|
@@ -74,7 +78,7 @@ export interface ImportModalProps {
|
|
|
74
78
|
/**
|
|
75
79
|
* Header to display above import by url
|
|
76
80
|
*/
|
|
77
|
-
inputLabel
|
|
81
|
+
inputLabel: string;
|
|
78
82
|
/**
|
|
79
83
|
* Placeholder for text input
|
|
80
84
|
*/
|
|
@@ -31,6 +31,7 @@ const ImportModal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
31
31
|
fileDropHeader,
|
|
32
32
|
fileDropLabel,
|
|
33
33
|
fileUploadLabel,
|
|
34
|
+
hideInputLabel,
|
|
34
35
|
inputButtonIcon,
|
|
35
36
|
inputButtonText,
|
|
36
37
|
inputId,
|
|
@@ -180,18 +181,19 @@ const ImportModal = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
180
181
|
onAddFiles: onAddFile,
|
|
181
182
|
disabled: hasFiles,
|
|
182
183
|
"data-modal-primary-focus": true
|
|
183
|
-
}),
|
|
184
|
-
className: `${blockClass}__label`
|
|
185
|
-
}, inputLabel), /*#__PURE__*/React__default.createElement("div", {
|
|
184
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
186
185
|
className: `${blockClass}__input-group`
|
|
187
186
|
}, /*#__PURE__*/React__default.createElement(TextInput, {
|
|
188
|
-
labelText: "",
|
|
187
|
+
labelText: /*#__PURE__*/React__default.createElement("p", {
|
|
188
|
+
className: `${blockClass}__label`
|
|
189
|
+
}, inputLabel),
|
|
189
190
|
id: inputId || '',
|
|
190
191
|
onChange: inputHandler,
|
|
191
192
|
placeholder: inputPlaceholder,
|
|
192
193
|
value: importUrl,
|
|
193
194
|
disabled: hasFiles,
|
|
194
|
-
"aria-label": inputLabel
|
|
195
|
+
"aria-label": inputLabel,
|
|
196
|
+
hideLabel: hideInputLabel
|
|
195
197
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
196
198
|
onClick: fetchFile,
|
|
197
199
|
className: `${blockClass}__import-button`,
|
|
@@ -273,6 +275,10 @@ ImportModal.propTypes = {
|
|
|
273
275
|
* Label that appears when a file is uploaded to show number of files (1 / 1)
|
|
274
276
|
*/
|
|
275
277
|
fileUploadLabel: PropTypes.string,
|
|
278
|
+
/**
|
|
279
|
+
* Hide input label
|
|
280
|
+
*/
|
|
281
|
+
hideInputLabel: PropTypes.bool,
|
|
276
282
|
/**
|
|
277
283
|
* Button icon for import by url button
|
|
278
284
|
*/
|
|
@@ -288,7 +294,7 @@ ImportModal.propTypes = {
|
|
|
288
294
|
/**
|
|
289
295
|
* Header to display above import by url
|
|
290
296
|
*/
|
|
291
|
-
inputLabel: PropTypes.string,
|
|
297
|
+
inputLabel: PropTypes.string.isRequired,
|
|
292
298
|
/**
|
|
293
299
|
* Placeholder for text input
|
|
294
300
|
*/
|
|
@@ -1,226 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2025,
|
|
2
|
+
* Copyright IBM Corp. 2025, 2026
|
|
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
|
-
import React
|
|
8
|
-
import {
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { PageHeaderBreadcrumbBar, type PageHeaderBreadcrumbBarProps } from './PageHeaderBreadcrumbBar';
|
|
9
|
+
import { PageHeaderContent, type PageHeaderContentProps } from './PageHeaderContent';
|
|
10
|
+
import { PageHeaderContentPageActions, type PageHeaderContentPageActionsProps } from './PageHeaderContentPageActions';
|
|
11
|
+
import { PageHeaderContentText, type PageHeaderContentTextProps } from './PageHeaderContentText';
|
|
12
|
+
import { PageHeaderHeroImage, type PageHeaderHeroImageProps } from './PageHeaderHeroImage';
|
|
13
|
+
import { PageHeaderTabBar, type PageHeaderTabBarProps } from './PageHeaderTabBar';
|
|
14
|
+
import { PageHeaderTagOverflow, type PageHeaderTagOverflowProps } from './PageHeaderTagOverflow';
|
|
15
|
+
import { PageHeaderScrollButton, type PageHeaderScrollButtonProps } from './PageHeaderScrollButton';
|
|
16
|
+
import { PageHeaderTitleBreadcrumb } from './PageHeaderTitleBreadcrumb';
|
|
17
|
+
import { PageHeaderBreadcrumbOverflow, type PageHeaderBreadcrumbOverflowProps } from './PageHeaderBreadcrumbOverflow';
|
|
9
18
|
/**
|
|
10
19
|
* ----------
|
|
11
20
|
* PageHeader
|
|
12
21
|
* ----------
|
|
13
22
|
*/
|
|
14
|
-
interface PageHeaderProps {
|
|
23
|
+
export interface PageHeaderProps {
|
|
15
24
|
children?: React.ReactNode;
|
|
16
25
|
className?: string;
|
|
17
26
|
}
|
|
18
27
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
/**
|
|
20
|
-
* -----------------------
|
|
21
|
-
* PageHeaderBreadcrumbBar
|
|
22
|
-
* -----------------------
|
|
23
|
-
*/
|
|
24
|
-
interface PageHeaderBreadcrumbBarProps {
|
|
25
|
-
/**
|
|
26
|
-
* `true` by default to render BreadcrumbBar bottom border.
|
|
27
|
-
*/
|
|
28
|
-
border?: boolean;
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
className?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Provide an optional icon to render in front of the PageHeaderContent's title.
|
|
33
|
-
*/
|
|
34
|
-
renderIcon?: ComponentType | FunctionComponent;
|
|
35
|
-
/**
|
|
36
|
-
* The PageHeaderBreadcrumbBar's content actions
|
|
37
|
-
*/
|
|
38
|
-
contentActions?: React.ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* `true` to set content actions flush against page actions
|
|
41
|
-
*/
|
|
42
|
-
contentActionsFlush?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* The PageHeaderContent's page actions
|
|
45
|
-
*/
|
|
46
|
-
pageActions?: React.ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* `true` to set page actions flush with page
|
|
49
|
-
*/
|
|
50
|
-
pageActionsFlush?: boolean;
|
|
51
|
-
}
|
|
52
|
-
declare const PageHeaderBreadcrumbBar: React.ForwardRefExoticComponent<PageHeaderBreadcrumbBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
-
/**
|
|
54
|
-
* -----------------
|
|
55
|
-
* PageHeaderContent
|
|
56
|
-
* -----------------
|
|
57
|
-
*/
|
|
58
|
-
interface PageHeaderContentProps {
|
|
59
|
-
/**
|
|
60
|
-
* Provide child elements to be rendered inside PageHeaderContent.
|
|
61
|
-
*/
|
|
62
|
-
children?: React.ReactNode;
|
|
63
|
-
/**
|
|
64
|
-
* Specify an optional className to be added to your PageHeaderContent
|
|
65
|
-
*/
|
|
66
|
-
className?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Provide an optional icon to render in front of the PageHeaderContent's title.
|
|
69
|
-
*/
|
|
70
|
-
renderIcon?: ComponentType | FunctionComponent;
|
|
71
|
-
/**
|
|
72
|
-
* The PageHeaderContent's title
|
|
73
|
-
*/
|
|
74
|
-
title: string;
|
|
75
|
-
/**
|
|
76
|
-
* The PageHeaderContent's contextual actions
|
|
77
|
-
*/
|
|
78
|
-
contextualActions?: React.ReactNode;
|
|
79
|
-
/**
|
|
80
|
-
* The PageHeaderContent's page actions
|
|
81
|
-
*/
|
|
82
|
-
pageActions?: React.ReactNode;
|
|
83
|
-
}
|
|
84
|
-
declare const PageHeaderContent: React.ForwardRefExoticComponent<PageHeaderContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
/**
|
|
86
|
-
* ----------------
|
|
87
|
-
* PageHeaderContentPageActions
|
|
88
|
-
* ----------------
|
|
89
|
-
*/
|
|
90
|
-
interface PageHeaderContentPageActionsProps {
|
|
91
|
-
/**
|
|
92
|
-
* Provide child elements to be rendered inside PageHeaderContentPageActions.
|
|
93
|
-
*/
|
|
94
|
-
children?: React.ReactNode;
|
|
95
|
-
/**
|
|
96
|
-
* Specify an optional className to be added to your PageHeaderContentPageActions
|
|
97
|
-
*/
|
|
98
|
-
className?: string;
|
|
99
|
-
/**
|
|
100
|
-
* The PageHeaderContent's page actions collapsible Menu button label
|
|
101
|
-
*/
|
|
102
|
-
menuButtonLabel?: string;
|
|
103
|
-
/**
|
|
104
|
-
* The PageHeaderContent's page actions
|
|
105
|
-
*/
|
|
106
|
-
actions?: React.ReactNode;
|
|
107
|
-
}
|
|
108
|
-
declare const PageHeaderContentPageActions: {
|
|
109
|
-
({ className, children, menuButtonLabel, actions, ...other }: PageHeaderContentPageActionsProps): React.JSX.Element;
|
|
110
|
-
displayName: string;
|
|
111
|
-
propTypes: {
|
|
112
|
-
/**
|
|
113
|
-
* The PageHeaderContent's page actions
|
|
114
|
-
*/
|
|
115
|
-
actions: any;
|
|
116
|
-
/**
|
|
117
|
-
* Provide child elements to be rendered inside PageHeaderContentPageActions.
|
|
118
|
-
*/
|
|
119
|
-
children: any;
|
|
120
|
-
/**
|
|
121
|
-
* Specify an optional className to be added to your PageHeaderContentPageActions
|
|
122
|
-
*/
|
|
123
|
-
className: any;
|
|
124
|
-
/**
|
|
125
|
-
* The PageHeaderContent's collapsible Menu button label
|
|
126
|
-
*/
|
|
127
|
-
menuButtonLabel: any;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* ----------------
|
|
132
|
-
* PageHeaderContentText
|
|
133
|
-
* ----------------
|
|
134
|
-
*/
|
|
135
|
-
interface PageHeaderContentTextProps {
|
|
136
|
-
/**
|
|
137
|
-
* Provide child elements to be rendered inside PageHeaderContentText.
|
|
138
|
-
*/
|
|
139
|
-
children?: React.ReactNode;
|
|
140
|
-
/**
|
|
141
|
-
* Specify an optional className to be added to your PageHeaderContentText
|
|
142
|
-
*/
|
|
143
|
-
className?: string;
|
|
144
|
-
/**
|
|
145
|
-
* The PageHeaderContent's subtitle
|
|
146
|
-
*/
|
|
147
|
-
subtitle?: string;
|
|
148
|
-
}
|
|
149
|
-
declare const PageHeaderContentText: {
|
|
150
|
-
({ className, children, subtitle, ...other }: PageHeaderContentTextProps): React.JSX.Element;
|
|
151
|
-
displayName: string;
|
|
152
|
-
propTypes: {
|
|
153
|
-
/**
|
|
154
|
-
* Provide child elements to be rendered inside PageHeaderContentText.
|
|
155
|
-
*/
|
|
156
|
-
children: any;
|
|
157
|
-
/**
|
|
158
|
-
* Specify an optional className to be added to your PageHeaderContentText
|
|
159
|
-
*/
|
|
160
|
-
className: any;
|
|
161
|
-
/**
|
|
162
|
-
* The PageHeaderContent's subtitle
|
|
163
|
-
*/
|
|
164
|
-
subtitle: any;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* ----------------
|
|
169
|
-
* PageHeaderHeroImage
|
|
170
|
-
* ----------------
|
|
171
|
-
*/
|
|
172
|
-
interface PageHeaderHeroImageProps {
|
|
173
|
-
/**
|
|
174
|
-
* Provide child elements to be rendered inside PageHeaderHeroImage.
|
|
175
|
-
*/
|
|
176
|
-
children?: React.ReactNode;
|
|
177
|
-
/**
|
|
178
|
-
* Specify an optional className to be added to your PageHeaderHeroImage
|
|
179
|
-
*/
|
|
180
|
-
className?: string;
|
|
181
|
-
}
|
|
182
|
-
declare const PageHeaderHeroImage: {
|
|
183
|
-
({ className, children, ...other }: PageHeaderHeroImageProps): React.JSX.Element;
|
|
184
|
-
displayName: string;
|
|
185
|
-
propTypes: {
|
|
186
|
-
/**
|
|
187
|
-
* Provide child elements to be rendered inside PageHeaderHeroImage.
|
|
188
|
-
*/
|
|
189
|
-
children: any;
|
|
190
|
-
/**
|
|
191
|
-
* Specify an optional className to be added to your PageHeaderHeroImage
|
|
192
|
-
*/
|
|
193
|
-
className: any;
|
|
194
|
-
};
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* ----------------
|
|
198
|
-
* PageHeaderTabBar
|
|
199
|
-
* ----------------
|
|
200
|
-
*/
|
|
201
|
-
interface PageHeaderTabBarProps {
|
|
202
|
-
children?: React.ReactNode;
|
|
203
|
-
className?: string;
|
|
204
|
-
tags?: React.ReactNode;
|
|
205
|
-
scroller?: React.ReactNode;
|
|
206
|
-
}
|
|
207
|
-
declare const PageHeaderTabBar: React.ForwardRefExoticComponent<PageHeaderTabBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
208
|
-
interface PageHeaderTagOverflowProps {
|
|
209
|
-
children: React.ReactNode;
|
|
210
|
-
renderOverflowTag?: (hiddenBreadcrumbs: HTMLElement[], handleOverflowClick: (event: React.MouseEvent) => void, openPopover: boolean) => React.ReactElement;
|
|
211
|
-
renderPopoverContent?: (hiddenBreadcrumbs: HTMLElement[]) => React.ReactElement;
|
|
212
|
-
}
|
|
213
|
-
declare const PageHeaderTagOverflow: React.ForwardRefExoticComponent<PageHeaderTagOverflowProps & React.RefAttributes<HTMLDivElement>>;
|
|
214
|
-
interface PageHeaderScrollButtonProps extends IconButtonProps {
|
|
215
|
-
collapseText?: string;
|
|
216
|
-
expandText?: string;
|
|
217
|
-
}
|
|
218
|
-
declare const PageHeaderScrollButton: React.ForwardRefExoticComponent<PageHeaderScrollButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
219
|
-
declare const PageHeaderTitleBreadcrumb: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
220
|
-
interface PageHeaderBreadcrumbOverflowProps extends BreadcrumbProps {
|
|
221
|
-
renderOverflowBreadcrumb?: (hiddenBreadcrumbs: HTMLElement[]) => React.ReactElement<BreadcrumbItemProps>;
|
|
222
|
-
}
|
|
223
|
-
declare const PageHeaderBreadcrumbOverflow: React.ForwardRefExoticComponent<PageHeaderBreadcrumbOverflowProps & React.RefAttributes<HTMLElement>>;
|
|
224
28
|
/**
|
|
225
29
|
* -------
|
|
226
30
|
* Exports
|
|
@@ -233,21 +37,9 @@ declare const ContentPageActions: {
|
|
|
233
37
|
({ className, children, menuButtonLabel, actions, ...other }: PageHeaderContentPageActionsProps): React.JSX.Element;
|
|
234
38
|
displayName: string;
|
|
235
39
|
propTypes: {
|
|
236
|
-
/**
|
|
237
|
-
* The PageHeaderContent's page actions
|
|
238
|
-
*/
|
|
239
40
|
actions: any;
|
|
240
|
-
/**
|
|
241
|
-
* Provide child elements to be rendered inside PageHeaderContentPageActions.
|
|
242
|
-
*/
|
|
243
41
|
children: any;
|
|
244
|
-
/**
|
|
245
|
-
* Specify an optional className to be added to your PageHeaderContentPageActions
|
|
246
|
-
*/
|
|
247
42
|
className: any;
|
|
248
|
-
/**
|
|
249
|
-
* The PageHeaderContent's collapsible Menu button label
|
|
250
|
-
*/
|
|
251
43
|
menuButtonLabel: any;
|
|
252
44
|
};
|
|
253
45
|
};
|
|
@@ -255,17 +47,8 @@ declare const ContentText: {
|
|
|
255
47
|
({ className, children, subtitle, ...other }: PageHeaderContentTextProps): React.JSX.Element;
|
|
256
48
|
displayName: string;
|
|
257
49
|
propTypes: {
|
|
258
|
-
/**
|
|
259
|
-
* Provide child elements to be rendered inside PageHeaderContentText.
|
|
260
|
-
*/
|
|
261
50
|
children: any;
|
|
262
|
-
/**
|
|
263
|
-
* Specify an optional className to be added to your PageHeaderContentText
|
|
264
|
-
*/
|
|
265
51
|
className: any;
|
|
266
|
-
/**
|
|
267
|
-
* The PageHeaderContent's subtitle
|
|
268
|
-
*/
|
|
269
52
|
subtitle: any;
|
|
270
53
|
};
|
|
271
54
|
};
|
|
@@ -273,20 +56,14 @@ declare const HeroImage: {
|
|
|
273
56
|
({ className, children, ...other }: PageHeaderHeroImageProps): React.JSX.Element;
|
|
274
57
|
displayName: string;
|
|
275
58
|
propTypes: {
|
|
276
|
-
/**
|
|
277
|
-
* Provide child elements to be rendered inside PageHeaderHeroImage.
|
|
278
|
-
*/
|
|
279
59
|
children: any;
|
|
280
|
-
/**
|
|
281
|
-
* Specify an optional className to be added to your PageHeaderHeroImage
|
|
282
|
-
*/
|
|
283
60
|
className: any;
|
|
284
61
|
};
|
|
285
62
|
};
|
|
286
63
|
declare const TabBar: React.ForwardRefExoticComponent<PageHeaderTabBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
287
64
|
declare const ScrollButton: React.ForwardRefExoticComponent<PageHeaderScrollButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
288
|
-
declare const TitleBreadcrumb: React.ForwardRefExoticComponent<BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
65
|
+
declare const TitleBreadcrumb: React.ForwardRefExoticComponent<import("@carbon/react").BreadcrumbItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
289
66
|
declare const BreadcrumbOverflow: React.ForwardRefExoticComponent<PageHeaderBreadcrumbOverflowProps & React.RefAttributes<HTMLElement>>;
|
|
290
67
|
declare const TagOverflow: React.ForwardRefExoticComponent<PageHeaderTagOverflowProps & React.RefAttributes<HTMLDivElement>>;
|
|
291
68
|
export { PageHeader, PageHeaderBreadcrumbBar, PageHeaderContent, PageHeaderContentPageActions, PageHeaderContentText, PageHeaderHeroImage, PageHeaderTabBar, PageHeaderScrollButton, PageHeaderTitleBreadcrumb, PageHeaderBreadcrumbOverflow, PageHeaderTagOverflow, Root, BreadcrumbBar, Content, ContentPageActions, ContentText, HeroImage, TabBar, ScrollButton, TitleBreadcrumb, BreadcrumbOverflow, TagOverflow, };
|
|
292
|
-
export type {
|
|
69
|
+
export type { PageHeaderBreadcrumbBarProps, PageHeaderContentProps, PageHeaderContentPageActionsProps, PageHeaderContentTextProps, PageHeaderHeroImageProps, PageHeaderTabBarProps, PageHeaderScrollButtonProps, PageHeaderTagOverflowProps, PageHeaderBreadcrumbOverflowProps, };
|