@carbon/ibm-products 2.92.1 → 2.93.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 +99 -20
- 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 +70 -20
- 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 +99 -20
- 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 +70 -20
- 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/Coachmark.d.ts +9 -12
- package/es/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/Coachmark.js +16 -27
- package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -1
- package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.js +3 -4
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +8 -4
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/CoachmarkContent.js +19 -5
- package/es/components/Coachmark/next/Coachmark/{ContentBody.d.ts → CoachmarkContentBody.d.ts} +5 -5
- package/es/components/Coachmark/next/Coachmark/CoachmarkContentBody.d.ts.map +1 -0
- package/es/components/Coachmark/next/Coachmark/{ContentBody.js → CoachmarkContentBody.js} +10 -6
- package/{lib/components/Coachmark/next/Coachmark/ContentHeader.d.ts → es/components/Coachmark/next/Coachmark/CoachmarkContentHeader.d.ts} +7 -3
- package/es/components/Coachmark/next/Coachmark/CoachmarkContentHeader.d.ts.map +1 -0
- package/es/components/Coachmark/next/Coachmark/{ContentHeader.js → CoachmarkContentHeader.js} +55 -12
- package/es/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.d.ts.map +1 -1
- package/es/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +2 -2
- package/es/components/Coachmark/next/Coachmark/index.d.ts +5 -4
- package/es/components/Coachmark/next/Coachmark/index.d.ts.map +1 -1
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts +3 -3
- package/es/components/ExpressiveCard/ExpressiveCard.d.ts.map +1 -1
- package/es/components/ExpressiveCard/ExpressiveCard.js +3 -15
- package/es/components/InterstitialScreen/InterstitialScreenBody.js +1 -1
- package/es/components/PageHeader/next/PageHeader.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeader.js +6 -2
- package/es/components/PageHeader/next/PageHeaderTabBar.d.ts +4 -0
- package/es/components/PageHeader/next/PageHeaderTabBar.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderTabBar.js +7 -2
- package/es/components/PageHeader/next/context.d.ts +2 -0
- package/es/components/PageHeader/next/context.d.ts.map +1 -1
- package/es/components/PageHeader/next/context.js +3 -1
- package/es/components/ProductiveCard/ProductiveCard.d.ts +3 -3
- package/es/components/ProductiveCard/ProductiveCard.d.ts.map +1 -1
- package/es/components/ProductiveCard/ProductiveCard.js +3 -15
- package/es/components/Tearsheet/TearsheetShell.d.ts.map +1 -1
- package/es/components/Tearsheet/TearsheetShell.js +17 -8
- package/es/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/es/components/Tearsheet/next/Tearsheet.js +21 -2
- package/es/components/Tearsheet/next/TearsheetBody.d.ts +16 -0
- package/es/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetBody.js +22 -4
- package/es/components/Tearsheet/next/TearsheetFooter.js +1 -1
- package/es/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeader.js +3 -1
- package/es/components/Tearsheet/next/TearsheetHeaderActions.d.ts +1 -1
- package/es/components/Tearsheet/next/TearsheetHeaderActions.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeaderActions.js +6 -3
- package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeaderContent.js +9 -3
- package/es/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +1 -1
- package/es/components/Tearsheet/next/context.d.ts +1 -0
- package/es/components/Tearsheet/next/context.d.ts.map +1 -1
- package/es/components/Tearsheet/usePresence.d.ts.map +1 -1
- package/es/components/Tearsheet/usePresence.js +3 -2
- package/es/global/js/package-settings.d.ts +1 -0
- package/es/global/js/package-settings.d.ts.map +1 -1
- package/es/global/js/package-settings.js +1 -0
- package/es/global/js/utils/makeDraggable/makeDraggable.d.ts +8 -2
- package/es/global/js/utils/makeDraggable/makeDraggable.d.ts.map +1 -1
- package/es/global/js/utils/makeDraggable/makeDraggable.js +87 -17
- package/es/settings.d.ts +1 -0
- package/es/settings.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts +9 -12
- package/lib/components/Coachmark/next/Coachmark/Coachmark.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/Coachmark.js +16 -27
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts +1 -1
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/CoachmarkBeacon/CoachmarkBeacon.js +3 -4
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts +8 -4
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContent.js +19 -5
- package/lib/components/Coachmark/next/Coachmark/{ContentBody.d.ts → CoachmarkContentBody.d.ts} +5 -5
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContentBody.d.ts.map +1 -0
- package/lib/components/Coachmark/next/Coachmark/{ContentBody.js → CoachmarkContentBody.js} +10 -6
- package/{es/components/Coachmark/next/Coachmark/ContentHeader.d.ts → lib/components/Coachmark/next/Coachmark/CoachmarkContentHeader.d.ts} +7 -3
- package/lib/components/Coachmark/next/Coachmark/CoachmarkContentHeader.d.ts.map +1 -0
- package/lib/components/Coachmark/next/Coachmark/{ContentHeader.js → CoachmarkContentHeader.js} +54 -11
- package/lib/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.d.ts.map +1 -1
- package/lib/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.js +2 -2
- package/lib/components/Coachmark/next/Coachmark/index.d.ts +5 -4
- package/lib/components/Coachmark/next/Coachmark/index.d.ts.map +1 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +3 -3
- package/lib/components/ExpressiveCard/ExpressiveCard.d.ts.map +1 -1
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -15
- package/lib/components/InterstitialScreen/InterstitialScreenBody.js +1 -1
- package/lib/components/PageHeader/next/PageHeader.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeader.js +6 -2
- package/lib/components/PageHeader/next/PageHeaderTabBar.d.ts +4 -0
- package/lib/components/PageHeader/next/PageHeaderTabBar.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderTabBar.js +6 -1
- package/lib/components/PageHeader/next/context.d.ts +2 -0
- package/lib/components/PageHeader/next/context.d.ts.map +1 -1
- package/lib/components/PageHeader/next/context.js +3 -1
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +3 -3
- package/lib/components/ProductiveCard/ProductiveCard.d.ts.map +1 -1
- package/lib/components/ProductiveCard/ProductiveCard.js +3 -15
- package/lib/components/Tearsheet/TearsheetShell.d.ts.map +1 -1
- package/lib/components/Tearsheet/TearsheetShell.js +15 -6
- package/lib/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/Tearsheet.js +21 -2
- package/lib/components/Tearsheet/next/TearsheetBody.d.ts +16 -0
- package/lib/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetBody.js +22 -4
- package/lib/components/Tearsheet/next/TearsheetFooter.js +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeader.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeader.js +3 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderActions.d.ts +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderActions.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderActions.js +5 -2
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +9 -3
- package/lib/components/Tearsheet/next/_story-assets/StepTearsheet.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/context.d.ts +1 -0
- package/lib/components/Tearsheet/next/context.d.ts.map +1 -1
- package/lib/components/Tearsheet/usePresence.d.ts.map +1 -1
- package/lib/components/Tearsheet/usePresence.js +2 -1
- package/lib/global/js/package-settings.d.ts +1 -0
- package/lib/global/js/package-settings.d.ts.map +1 -1
- package/lib/global/js/package-settings.js +1 -0
- package/lib/global/js/utils/makeDraggable/makeDraggable.d.ts +8 -2
- package/lib/global/js/utils/makeDraggable/makeDraggable.d.ts.map +1 -1
- package/lib/global/js/utils/makeDraggable/makeDraggable.js +87 -17
- package/lib/settings.d.ts +1 -0
- package/lib/settings.d.ts.map +1 -1
- package/package.json +7 -7
- package/scss/components/Coachmark/_carbon-imports.scss +2 -1
- package/scss/components/Coachmark/_coachmark_next.scss +53 -0
- package/scss/components/Coachmark/_index.scss +4 -1
- package/scss/components/PageHeader/_page-header.scss +44 -8
- package/scss/components/Tearsheet/_tearsheet.scss +26 -2
- package/scss/components/Tearsheet/_tearsheet_next.scss +5 -0
- package/telemetry.yml +11 -3
- package/es/components/Coachmark/next/Coachmark/ContentBody.d.ts.map +0 -1
- package/es/components/Coachmark/next/Coachmark/ContentHeader.d.ts.map +0 -1
- package/lib/components/Coachmark/next/Coachmark/ContentBody.d.ts.map +0 -1
- package/lib/components/Coachmark/next/Coachmark/ContentHeader.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface CoachmarkContentHeaderProps {
|
|
3
3
|
/**
|
|
4
4
|
* Provide an optional class to be applied to the containing node.
|
|
5
5
|
*/
|
|
@@ -12,10 +12,14 @@ export interface ContentHeaderProps {
|
|
|
12
12
|
* Tooltip text and aria label for the Drag button icon.
|
|
13
13
|
*/
|
|
14
14
|
dragIconDescription?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Aria label for the coachmark when it is being dragged.
|
|
17
|
+
*/
|
|
18
|
+
dragAriaLabel?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional contents of the Coachmark Header.
|
|
17
21
|
*/
|
|
18
22
|
children?: string;
|
|
19
23
|
}
|
|
20
|
-
export declare const
|
|
21
|
-
//# sourceMappingURL=
|
|
24
|
+
export declare const CoachmarkContentHeader: React.ForwardRefExoticComponent<CoachmarkContentHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
//# sourceMappingURL=CoachmarkContentHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoachmarkContentHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/CoachmarkContentHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAON,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,sBAAsB,oGA4KjC,CAAC"}
|
package/lib/components/Coachmark/next/Coachmark/{ContentHeader.js → CoachmarkContentHeader.js}
RENAMED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
9
9
|
const require_index = require("../../../../node_modules/classnames/index.js");
|
|
10
10
|
const require_settings = require("../../../../settings.js");
|
|
11
|
+
const require_devtools = require("../../../../global/js/utils/devtools.js");
|
|
11
12
|
const require_context = require("./context.js");
|
|
12
13
|
const require_makeDraggable = require("../../../../global/js/utils/makeDraggable/makeDraggable.js");
|
|
13
14
|
let react = require("react");
|
|
@@ -16,20 +17,26 @@ let prop_types = require("prop-types");
|
|
|
16
17
|
prop_types = require_runtime.__toESM(prop_types);
|
|
17
18
|
let _carbon_react = require("@carbon/react");
|
|
18
19
|
let _carbon_react_icons = require("@carbon/react/icons");
|
|
19
|
-
//#region src/components/Coachmark/next/Coachmark/
|
|
20
|
+
//#region src/components/Coachmark/next/Coachmark/CoachmarkContentHeader.tsx
|
|
20
21
|
/**
|
|
21
22
|
* Copyright IBM Corp. 2024, 2026
|
|
22
23
|
*
|
|
23
24
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
24
25
|
* LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/ var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
26
|
-
const
|
|
27
|
-
const { className = "", closeIconDescription, dragIconDescription, children, ...rest } = props;
|
|
27
|
+
const CoachmarkContentHeader = (0, react.forwardRef)((props, ref) => {
|
|
28
|
+
const { className = "", closeIconDescription, dragIconDescription, dragAriaLabel, children, ...rest } = props;
|
|
28
29
|
const { setOpen, onClose, contentRef, floating } = (0, react.useContext)(require_context.CoachmarkContext);
|
|
29
30
|
const headerRef = (0, react.useRef)(null);
|
|
30
31
|
const dragRef = (0, react.useRef)(null);
|
|
31
32
|
const handleRef = ref || headerRef;
|
|
32
33
|
const contentHeaderBlockClass = `${require_context.blockClass}--content-header`;
|
|
34
|
+
const [isDragging, setIsDragging] = (0, react.useState)(null);
|
|
35
|
+
const [moveAnnouncement, setMoveAnnouncement] = (0, react.useState)("");
|
|
36
|
+
const moveCounterRef = (0, react.useRef)(0);
|
|
37
|
+
const dragInstructionsId = `${contentHeaderBlockClass}--drag-instructions`;
|
|
38
|
+
const dragStatusId = `${contentHeaderBlockClass}--drag-status`;
|
|
39
|
+
const dragMoveId = `${contentHeaderBlockClass}--drag-move`;
|
|
33
40
|
const closeBubble = (e) => {
|
|
34
41
|
e?.stopPropagation();
|
|
35
42
|
onClose?.();
|
|
@@ -47,22 +54,33 @@ const ContentHeader = (0, react.forwardRef)((props, ref) => {
|
|
|
47
54
|
focusableDragHandle: dragRef.current
|
|
48
55
|
});
|
|
49
56
|
const onDragStart = () => {
|
|
57
|
+
setIsDragging(true);
|
|
58
|
+
setMoveAnnouncement("");
|
|
50
59
|
if (dragStyleContainer) {
|
|
51
60
|
dragStyleContainer.classList.add(`${contentHeaderBlockClass}--is-dragging`);
|
|
52
|
-
dragStyleContainer.setAttribute("aria-label",
|
|
61
|
+
if (dragAriaLabel) dragStyleContainer.setAttribute("aria-label", dragAriaLabel);
|
|
53
62
|
}
|
|
54
63
|
};
|
|
55
64
|
const onDragEnd = () => {
|
|
65
|
+
setIsDragging(false);
|
|
66
|
+
setMoveAnnouncement("");
|
|
56
67
|
if (dragStyleContainer) {
|
|
57
68
|
dragStyleContainer.classList.remove(`${contentHeaderBlockClass}--is-dragging`);
|
|
58
69
|
dragStyleContainer.removeAttribute("aria-label");
|
|
59
70
|
}
|
|
60
71
|
};
|
|
72
|
+
const onDragMove = (event) => {
|
|
73
|
+
const { direction, distance } = event.detail;
|
|
74
|
+
moveCounterRef.current += 1;
|
|
75
|
+
setMoveAnnouncement(`Moved ${direction} ${distance} pixels${"".repeat(moveCounterRef.current)}`);
|
|
76
|
+
};
|
|
61
77
|
contentRef.addEventListener("dragstart", onDragStart);
|
|
62
78
|
contentRef.addEventListener("dragend", onDragEnd);
|
|
79
|
+
contentRef.addEventListener("dragmove", onDragMove);
|
|
63
80
|
return () => {
|
|
64
81
|
contentRef.removeEventListener("dragstart", onDragStart);
|
|
65
82
|
contentRef.removeEventListener("dragend", onDragEnd);
|
|
83
|
+
contentRef.removeEventListener("dragmove", onDragMove);
|
|
66
84
|
draggable.cleanup();
|
|
67
85
|
};
|
|
68
86
|
}
|
|
@@ -76,25 +94,46 @@ const ContentHeader = (0, react.forwardRef)((props, ref) => {
|
|
|
76
94
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
77
95
|
ref: handleRef,
|
|
78
96
|
className: (0, import_classnames.default)(contentHeaderBlockClass, className),
|
|
79
|
-
...rest
|
|
80
|
-
|
|
97
|
+
...rest,
|
|
98
|
+
...require_devtools.getDevtoolsProps("CoachmarkContentHeader")
|
|
99
|
+
}, floating && /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("span", {
|
|
100
|
+
id: dragInstructionsId,
|
|
101
|
+
className: "cds--visually-hidden"
|
|
102
|
+
}, isDragging ? "Use arrow keys to move the coachmark. Press Enter or Space to exit drag mode." : "Press Enter or Space to activate drag mode."), /* @__PURE__ */ react.default.createElement("div", {
|
|
103
|
+
id: dragStatusId,
|
|
104
|
+
role: "status",
|
|
105
|
+
"aria-live": "polite",
|
|
106
|
+
"aria-atomic": "true",
|
|
107
|
+
className: "cds--visually-hidden"
|
|
108
|
+
}, isDragging === true ? "Drag mode active." : isDragging === false ? "Drag mode ended." : ""), /* @__PURE__ */ react.default.createElement("div", {
|
|
109
|
+
id: dragMoveId,
|
|
110
|
+
role: "status",
|
|
111
|
+
"aria-live": "assertive",
|
|
112
|
+
"aria-atomic": "true",
|
|
113
|
+
className: "cds--visually-hidden"
|
|
114
|
+
}, moveAnnouncement), /* @__PURE__ */ react.default.createElement(_carbon_react.Button, {
|
|
81
115
|
kind: "ghost",
|
|
82
116
|
size: "sm",
|
|
83
117
|
ref: dragRef,
|
|
84
118
|
renderIcon: _carbon_react_icons.Draggable,
|
|
85
119
|
iconDescription: dragIconDescription,
|
|
86
120
|
hasIconOnly: true,
|
|
87
|
-
className: `${contentHeaderBlockClass}--drag-icon
|
|
88
|
-
|
|
121
|
+
className: `${contentHeaderBlockClass}--drag-icon`,
|
|
122
|
+
"aria-label": dragIconDescription,
|
|
123
|
+
"aria-describedby": dragInstructionsId,
|
|
124
|
+
"aria-pressed": isDragging
|
|
125
|
+
})), children, /* @__PURE__ */ react.default.createElement(_carbon_react.Button, {
|
|
89
126
|
kind: "ghost",
|
|
90
127
|
size: "sm",
|
|
91
128
|
renderIcon: _carbon_react_icons.Close,
|
|
92
129
|
iconDescription: closeIconDescription,
|
|
93
130
|
hasIconOnly: true,
|
|
94
|
-
onClick: closeBubble
|
|
131
|
+
onClick: closeBubble,
|
|
132
|
+
className: `${contentHeaderBlockClass}--close-button`
|
|
95
133
|
}));
|
|
96
134
|
});
|
|
97
|
-
|
|
135
|
+
CoachmarkContentHeader.displayName = "CoachmarkContentHeader";
|
|
136
|
+
CoachmarkContentHeader.propTypes = {
|
|
98
137
|
/**
|
|
99
138
|
* Optional contents of the Coachmark Header.
|
|
100
139
|
*/
|
|
@@ -108,9 +147,13 @@ ContentHeader.propTypes = {
|
|
|
108
147
|
*/
|
|
109
148
|
closeIconDescription: prop_types.default.string,
|
|
110
149
|
/**
|
|
150
|
+
* Aria label for the coachmark when it is being dragged.
|
|
151
|
+
*/
|
|
152
|
+
dragAriaLabel: prop_types.default.string,
|
|
153
|
+
/**
|
|
111
154
|
* Tooltip text and aria label for the Drag button icon.
|
|
112
155
|
*/
|
|
113
156
|
dragIconDescription: prop_types.default.string
|
|
114
157
|
};
|
|
115
158
|
//#endregion
|
|
116
|
-
exports.
|
|
159
|
+
exports.CoachmarkContentHeader = CoachmarkContentHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoachmarkTagline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAapD,MAAM,WAAW,oBAAqB,SAAQ,WAAW,CAAC,WAAW,CAAC;IACpE,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,aAAa,CAAC,IAAI,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"CoachmarkTagline.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Coachmark/next/Coachmark/CoachmarkTagline/CoachmarkTagline.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAapD,MAAM,WAAW,oBAAqB,SAAQ,WAAW,CAAC,WAAW,CAAC;IACpE,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,aAAa,CAAC,IAAI,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8FAwD5B,CAAC"}
|
|
@@ -42,6 +42,8 @@ const CoachmarkTagline = react.default.forwardRef(({ closeIconDescription = defa
|
|
|
42
42
|
}, /* @__PURE__ */ react.default.createElement("button", {
|
|
43
43
|
className: `${blockClass}__cta`,
|
|
44
44
|
type: "button",
|
|
45
|
+
"aria-label": title,
|
|
46
|
+
title,
|
|
45
47
|
...buttonProps
|
|
46
48
|
}, /* @__PURE__ */ react.default.createElement("div", {
|
|
47
49
|
className: `${blockClass}__idea`,
|
|
@@ -62,9 +64,7 @@ CoachmarkTagline.propTypes = {
|
|
|
62
64
|
* button props
|
|
63
65
|
*/
|
|
64
66
|
buttonProps: prop_types.default.shape({
|
|
65
|
-
/**@ts-ignore*/
|
|
66
67
|
..._carbon_react.Button.propTypes,
|
|
67
|
-
/**@ts-ignore*/
|
|
68
68
|
id: prop_types.default.string,
|
|
69
69
|
onClick: prop_types.default.func,
|
|
70
70
|
onDoubleClick: prop_types.default.func,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2024,
|
|
2
|
+
* Copyright IBM Corp. 2024, 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
7
|
export { Coachmark } from './Coachmark';
|
|
8
8
|
export type { CoachmarkPropsNext, CoachmarkComponent } from './Coachmark';
|
|
9
|
-
export type {
|
|
10
|
-
export type {
|
|
11
|
-
export type { CoachmarkContentProps } from './CoachmarkContent';
|
|
9
|
+
export type { CoachmarkContentBodyProps } from './CoachmarkContentBody';
|
|
10
|
+
export type { CoachmarkContentHeaderProps } from './CoachmarkContentHeader';
|
|
11
|
+
export type { CoachmarkContentProps, CoachmarkContentComponent, } from './CoachmarkContent';
|
|
12
|
+
export type { CoachmarkButtonProps } from './CoachmarkBeacon/CoachmarkBeacon';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE1E,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Coachmark/next/Coachmark/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EACV,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -20,11 +20,11 @@ export interface ExpressiveCardProps extends PropsWithChildren {
|
|
|
20
20
|
/**
|
|
21
21
|
* Optional header description
|
|
22
22
|
*/
|
|
23
|
-
description?:
|
|
23
|
+
description?: ReactNode;
|
|
24
24
|
/**
|
|
25
25
|
* Optional label for the top of the card
|
|
26
26
|
*/
|
|
27
|
-
label?:
|
|
27
|
+
label?: ReactNode;
|
|
28
28
|
/**
|
|
29
29
|
* Optional media content like an image to be placed in the card
|
|
30
30
|
*/
|
|
@@ -90,7 +90,7 @@ export interface ExpressiveCardProps extends PropsWithChildren {
|
|
|
90
90
|
/**
|
|
91
91
|
* Title that's displayed at the top of the card
|
|
92
92
|
*/
|
|
93
|
-
title?:
|
|
93
|
+
title?: ReactNode;
|
|
94
94
|
}
|
|
95
95
|
export declare const ExpressiveCard: React.ForwardRefExoticComponent<ExpressiveCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
96
96
|
//# sourceMappingURL=ExpressiveCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressiveCard.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressiveCard/ExpressiveCard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAMpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B;;OAEG;IAEH;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"ExpressiveCard.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressiveCard/ExpressiveCard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAMpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B;;OAEG;IAEH;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,GAAG,MAAM,CAAC;IACxC;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACxC;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAC5C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAID,eAAO,MAAM,cAAc,4FAa1B,CAAC"}
|
|
@@ -60,19 +60,11 @@ ExpressiveCard.propTypes = {
|
|
|
60
60
|
/**
|
|
61
61
|
* Optional header description
|
|
62
62
|
*/
|
|
63
|
-
description: prop_types.default.oneOfType([
|
|
64
|
-
prop_types.default.string,
|
|
65
|
-
prop_types.default.object,
|
|
66
|
-
prop_types.default.node
|
|
67
|
-
]),
|
|
63
|
+
description: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
|
|
68
64
|
/**
|
|
69
65
|
* Optional label for the top of the card
|
|
70
66
|
*/
|
|
71
|
-
label: prop_types.default.oneOfType([
|
|
72
|
-
prop_types.default.string,
|
|
73
|
-
prop_types.default.object,
|
|
74
|
-
prop_types.default.node
|
|
75
|
-
]),
|
|
67
|
+
label: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
|
|
76
68
|
/**
|
|
77
69
|
* Optional media content like an image to be placed in the card
|
|
78
70
|
*/
|
|
@@ -141,11 +133,7 @@ ExpressiveCard.propTypes = {
|
|
|
141
133
|
/**
|
|
142
134
|
* Title that's displayed at the top of the card
|
|
143
135
|
*/
|
|
144
|
-
title: prop_types.default.oneOfType([
|
|
145
|
-
prop_types.default.string,
|
|
146
|
-
prop_types.default.object,
|
|
147
|
-
prop_types.default.node
|
|
148
|
-
])
|
|
136
|
+
title: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node])
|
|
149
137
|
};
|
|
150
138
|
ExpressiveCard.displayName = componentName;
|
|
151
139
|
//#endregion
|
|
@@ -61,7 +61,7 @@ const InterstitialScreenBody = react.default.forwardRef((props, ref) => {
|
|
|
61
61
|
carouselInitRef.current?.destroyEvents?.();
|
|
62
62
|
carouselInitRef.current = null;
|
|
63
63
|
};
|
|
64
|
-
}, [stepType
|
|
64
|
+
}, [stepType]);
|
|
65
65
|
(0, react.useEffect)(() => {
|
|
66
66
|
if (stepType === "multi" && typeof progStep === "number") {
|
|
67
67
|
const activeIndex = (carouselInitRef.current?.getActiveItem?.())?.index ?? -1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAS/E,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,KAAK,iCAAiC,EACvC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EACL,4BAA4B,EAC5B,KAAK,iCAAiC,EACvC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,EACxC,MAAM,mCAAmC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,uBAAuB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACtD;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAS/E,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,4BAA4B,EAC5B,KAAK,iCAAiC,EACvC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,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BAAiB,EACjB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,+BAA+B,EAE/B,IAAI,EACJ,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,MAAM,EACN,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,qBAAqB,GACtB,CAAC;AACF,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,iCAAiC,EACjC,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,iCAAiC,EACjC,oCAAoC,EACpC,kCAAkC,GACnC,CAAC"}
|
|
@@ -36,11 +36,13 @@ var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.de
|
|
|
36
36
|
const PageHeader = react.default.forwardRef(function PageHeader({ className, children, onContentFullyCollapsed, onTitleClipped, onContentActionsClipped, ...other }, ref) {
|
|
37
37
|
const [refs, setRefs] = (0, react.useState)({});
|
|
38
38
|
const [pageActionsInstance, setPageActionsInstance] = (0, react.useState)(null);
|
|
39
|
+
const [disableStickyTabBar, setDisableStickyTabBar] = (0, react.useState)(false);
|
|
39
40
|
const tempRef = (0, react.useRef)(null);
|
|
40
41
|
const componentRef = ref ?? tempRef;
|
|
41
42
|
const classNames = (0, import_classnames.default)({
|
|
42
43
|
[`${require_PageHeaderUtils.blockClass}`]: true,
|
|
43
|
-
[`${require_PageHeaderUtils.blockClass}__next`]: true
|
|
44
|
+
[`${require_PageHeaderUtils.blockClass}__next`]: true,
|
|
45
|
+
[`${require_PageHeaderUtils.blockClass}--disable-sticky-tab-bar`]: disableStickyTabBar
|
|
44
46
|
}, className);
|
|
45
47
|
require_useResizeObserver.useResizeObserver(componentRef, () => {
|
|
46
48
|
if (componentRef?.current) {
|
|
@@ -127,7 +129,9 @@ const PageHeader = react.default.forwardRef(function PageHeader({ className, chi
|
|
|
127
129
|
setRefs,
|
|
128
130
|
pageActionsInstance,
|
|
129
131
|
setPageActionsInstance,
|
|
130
|
-
observerState
|
|
132
|
+
observerState,
|
|
133
|
+
disableStickyTabBar,
|
|
134
|
+
setDisableStickyTabBar
|
|
131
135
|
} }, /* @__PURE__ */ react.default.createElement("div", {
|
|
132
136
|
className: classNames,
|
|
133
137
|
ref: componentRef,
|
|
@@ -13,6 +13,10 @@ import React from 'react';
|
|
|
13
13
|
export interface PageHeaderTabBarProps {
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Disable sticky positioning for the tab bar. When true, the tab bar will scroll with the page content.
|
|
18
|
+
*/
|
|
19
|
+
disableStickyTabBar?: boolean;
|
|
16
20
|
tags?: React.ReactNode;
|
|
17
21
|
scroller?: React.ReactNode;
|
|
18
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderTabBar.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTabBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"PageHeaderTabBar.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTabBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,8FAkE3B,CAAC"}
|
|
@@ -9,6 +9,7 @@ const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
|
9
9
|
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
10
|
const require_settings = require("../../../settings.js");
|
|
11
11
|
const require_PageHeaderUtils = require("../PageHeaderUtils.js");
|
|
12
|
+
const require_context = require("./context.js");
|
|
12
13
|
let react = require("react");
|
|
13
14
|
react = require_runtime.__toESM(react);
|
|
14
15
|
let _carbon_react = require("@carbon/react");
|
|
@@ -20,7 +21,11 @@ let _carbon_react = require("@carbon/react");
|
|
|
20
21
|
* LICENSE file in the root directory of this source tree.
|
|
21
22
|
*/
|
|
22
23
|
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
23
|
-
const PageHeaderTabBar = react.default.forwardRef(function PageHeaderTabBar({ className, children, tags, scroller, ...other }, ref) {
|
|
24
|
+
const PageHeaderTabBar = react.default.forwardRef(function PageHeaderTabBar({ className, children, tags, scroller, disableStickyTabBar = false, ...other }, ref) {
|
|
25
|
+
const { setDisableStickyTabBar } = require_context.usePageHeader();
|
|
26
|
+
(0, react.useEffect)(() => {
|
|
27
|
+
setDisableStickyTabBar?.(disableStickyTabBar);
|
|
28
|
+
}, [disableStickyTabBar, setDisableStickyTabBar]);
|
|
24
29
|
const classNames = (0, import_classnames.default)({ [`${require_PageHeaderUtils.blockClass}__tab-bar`]: true }, className);
|
|
25
30
|
const renderScroller = () => scroller && /* @__PURE__ */ react.default.createElement("div", { className: `${require_settings.pkg.prefix}--page-header--scroller-button-container` }, scroller);
|
|
26
31
|
if (!tags) return /* @__PURE__ */ react.default.createElement("div", {
|
|
@@ -29,6 +29,8 @@ type PageHeaderContextType = {
|
|
|
29
29
|
observerState: PageHeaderObserverState;
|
|
30
30
|
isContentActionsInBreadcrumbBar?: boolean;
|
|
31
31
|
isFunctionalContentActions?: boolean;
|
|
32
|
+
disableStickyTabBar?: boolean;
|
|
33
|
+
setDisableStickyTabBar?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
32
34
|
};
|
|
33
35
|
export declare const PageHeaderContext: import("react").Context<PageHeaderContextType | undefined>;
|
|
34
36
|
export declare function usePageHeader(): PageHeaderContextType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAC;AAE7D;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAChD,cAAc,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9D,mBAAmB,CAAC,EAChB,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D,sBAAsB,EAAE,KAAK,CAAC,QAAQ,CACpC,KAAK,CAAC,cAAc,CAClB,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CACxE,CACF,CAAC;IACF,aAAa,EAAE,uBAAuB,CAAC;IACvC,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AAC,EAAE,OAAO,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,4DAc5B,CAAC;AAEH,wBAAgB,aAAa,0BAQ5B"}
|
|
@@ -23,7 +23,9 @@ const PageHeaderContext = (0, react.createContext)({
|
|
|
23
23
|
fullyCollapsed: false,
|
|
24
24
|
titleClipped: false,
|
|
25
25
|
contentActionsClipped: false
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
|
+
disableStickyTabBar: false,
|
|
28
|
+
setDisableStickyTabBar: () => {}
|
|
27
29
|
});
|
|
28
30
|
function usePageHeader() {
|
|
29
31
|
const context = (0, react.useContext)(PageHeaderContext);
|
|
@@ -33,11 +33,11 @@ export interface ProductiveCardProps extends PropsWithChildren {
|
|
|
33
33
|
/**
|
|
34
34
|
* Optional header description
|
|
35
35
|
*/
|
|
36
|
-
description?:
|
|
36
|
+
description?: ReactNode;
|
|
37
37
|
/**
|
|
38
38
|
* Optional label for the top of the card
|
|
39
39
|
*/
|
|
40
|
-
label?:
|
|
40
|
+
label?: ReactNode;
|
|
41
41
|
/**
|
|
42
42
|
* Provides the callback for a clickable card
|
|
43
43
|
*/
|
|
@@ -108,7 +108,7 @@ export interface ProductiveCardProps extends PropsWithChildren {
|
|
|
108
108
|
/**
|
|
109
109
|
* Title that's displayed at the top of the card
|
|
110
110
|
*/
|
|
111
|
-
title?:
|
|
111
|
+
title?: ReactNode;
|
|
112
112
|
/**
|
|
113
113
|
* Determines title size
|
|
114
114
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductiveCard.d.ts","sourceRoot":"","sources":["../../../src/components/ProductiveCard/ProductiveCard.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAEZ,iBAAiB,EACjB,SAAS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AiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,mBAAmB,CAAC,EAAE,cAAc,CAAC;IACrC;;OAEG;IACH,wBAAwB,CAAC,EAAE,aAAa,CAAC;IACzC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAEhC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,4FA2B1B,CAAC"}
|
|
@@ -76,11 +76,7 @@ ProductiveCard.propTypes = {
|
|
|
76
76
|
/**
|
|
77
77
|
* Optional header description
|
|
78
78
|
*/
|
|
79
|
-
description: prop_types.default.oneOfType([
|
|
80
|
-
prop_types.default.string,
|
|
81
|
-
prop_types.default.object,
|
|
82
|
-
prop_types.default.node
|
|
83
|
-
]),
|
|
79
|
+
description: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
|
|
84
80
|
/**
|
|
85
81
|
* Sets the text for the OverflowMenu trigger button tooltip and OverflowMenu aria label,
|
|
86
82
|
* gets overridden by the `overflowAriaLabel` prop.
|
|
@@ -91,11 +87,7 @@ ProductiveCard.propTypes = {
|
|
|
91
87
|
/**
|
|
92
88
|
* Optional label for the top of the card
|
|
93
89
|
*/
|
|
94
|
-
label: prop_types.default.oneOfType([
|
|
95
|
-
prop_types.default.string,
|
|
96
|
-
prop_types.default.object,
|
|
97
|
-
prop_types.default.node
|
|
98
|
-
]),
|
|
90
|
+
label: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
|
|
99
91
|
/**
|
|
100
92
|
* Provides the callback for a clickable card
|
|
101
93
|
*/
|
|
@@ -171,11 +163,7 @@ ProductiveCard.propTypes = {
|
|
|
171
163
|
/**
|
|
172
164
|
* Title that's displayed at the top of the card
|
|
173
165
|
*/
|
|
174
|
-
title: prop_types.default.oneOfType([
|
|
175
|
-
prop_types.default.string,
|
|
176
|
-
prop_types.default.object,
|
|
177
|
-
prop_types.default.node
|
|
178
|
-
]),
|
|
166
|
+
title: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.node]),
|
|
179
167
|
/**
|
|
180
168
|
* Determines title size
|
|
181
169
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TearsheetShell.d.ts","sourceRoot":"","sources":["../../../src/components/Tearsheet/TearsheetShell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,EAMZ,iBAAiB,EACjB,SAAS,EAET,SAAS,
|
|
1
|
+
{"version":3,"file":"TearsheetShell.d.ts","sourceRoot":"","sources":["../../../src/components/Tearsheet/TearsheetShell.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,EAMZ,iBAAiB,EACjB,SAAS,EAET,SAAS,EAIV,MAAM,OAAO,CAAC;AAIf,OAAO,SAAS,MAAM,YAAY,CAAC;AA4BnC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAc9C,UAAU,mBAAoB,SAAQ,iBAAiB;IACrD,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CA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IAGH;;;;;;;;OAQG;;CAEJ,CAAC"}
|
|
@@ -26,6 +26,7 @@ react = require_runtime.__toESM(react);
|
|
|
26
26
|
let prop_types = require("prop-types");
|
|
27
27
|
prop_types = require_runtime.__toESM(prop_types);
|
|
28
28
|
let _carbon_react = require("@carbon/react");
|
|
29
|
+
let _carbon_react_icons = require("@carbon/react/icons");
|
|
29
30
|
//#region src/components/Tearsheet/TearsheetShell.tsx
|
|
30
31
|
/**
|
|
31
32
|
* Copyright IBM Corp. 2020, 2024
|
|
@@ -205,6 +206,7 @@ const TearsheetShellDialog = react.default.forwardRef(({ actions, decorator, ari
|
|
|
205
206
|
const includeHeader = label || title || description || headerActions || navigation || effectiveHasCloseIcon;
|
|
206
207
|
const includeActions = actions && actions?.length > 0;
|
|
207
208
|
const areAllSameSizeVariant = () => new Set(stack.sizes).size === 1;
|
|
209
|
+
const normalizedDecorator = (0, react.isValidElement)(decorator) && decorator.type === _carbon_react.AILabel ? (0, react.cloneElement)(decorator, { size: "sm" }) : decorator;
|
|
208
210
|
return renderPortalUse(/* @__PURE__ */ react.default.createElement(_carbon_react.unstable_FeatureFlags, { enableExperimentalFocusWrapWithoutSentinels: true }, /* @__PURE__ */ react.default.createElement(_carbon_react.ComposedModal, {
|
|
209
211
|
...rest,
|
|
210
212
|
"aria-label": ariaLabel || require_getNodeTextContent.getNodeTextContent(title),
|
|
@@ -219,7 +221,6 @@ const TearsheetShellDialog = react.default.forwardRef(({ actions, decorator, ari
|
|
|
219
221
|
["is-visible"]: enablePresence,
|
|
220
222
|
[`${bc}--tearsheet-enable-presence`]: presenceContext?.autoEnablePresence
|
|
221
223
|
}),
|
|
222
|
-
decorator: decorator || deprecated_slug,
|
|
223
224
|
containerClassName: (0, import_classnames.default)(`${bc}__container`, {
|
|
224
225
|
[`${bc}__container--lower`]: verticalPosition === "lower",
|
|
225
226
|
[`${bc}__container--mixed-size-stacking`]: !areAllSameSizeVariant()
|
|
@@ -245,16 +246,24 @@ const TearsheetShellDialog = react.default.forwardRef(({ actions, decorator, ari
|
|
|
245
246
|
[`${bc}__header--with-close-icon`]: effectiveHasCloseIcon,
|
|
246
247
|
[`${bc}__header--with-nav`]: navigation
|
|
247
248
|
}),
|
|
248
|
-
closeClassName: (0, import_classnames.default)(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
closeClassName: (0, import_classnames.default)(`${bc}__header--no-close-icon`)
|
|
250
|
+
}, headerActions && /* @__PURE__ */ react.default.createElement("div", { className: `${bc}__header-actions` }, headerActions), (decorator || deprecated_slug) && /* @__PURE__ */ react.default.createElement("div", { className: `${bc}__decorator` }, normalizedDecorator || deprecated_slug), effectiveHasCloseIcon && /* @__PURE__ */ react.default.createElement("div", { className: `${bc}__close-button ${carbonPrefix}--modal-close-button` }, /* @__PURE__ */ react.default.createElement(_carbon_react.IconButton, {
|
|
251
|
+
className: `${carbonPrefix}--modal-close`,
|
|
252
|
+
label: closeIconDescription,
|
|
253
|
+
onClick: onClose,
|
|
254
|
+
align: "left"
|
|
255
|
+
}, /* @__PURE__ */ react.default.createElement(_carbon_react_icons.Close, {
|
|
256
|
+
size: 20,
|
|
257
|
+
"aria-hidden": "true",
|
|
258
|
+
tabIndex: "-1",
|
|
259
|
+
className: `${carbonPrefix}--modal-close__icon`
|
|
260
|
+
}))), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, {
|
|
252
261
|
className: `${bc}__header-content`,
|
|
253
262
|
element: wide ? _carbon_react.Layer : void 0
|
|
254
263
|
}, /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, { className: `${bc}__header-fields` }, /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, { className: `${bcModalHeader}__label` }, label), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, {
|
|
255
264
|
element: "h3",
|
|
256
265
|
className: (0, import_classnames.default)(`${bcModalHeader}__heading`, `${bc}__heading`)
|
|
257
|
-
}, title), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, { className: `${bc}__header-description` }, description))
|
|
266
|
+
}, title), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, { className: `${bc}__header-description` }, description))), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, { className: `${bc}__header-navigation` }, navigation)), /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, {
|
|
258
267
|
ref: modalBodyRef,
|
|
259
268
|
className: `${carbonPrefix}--modal-content ${bc}__body`
|
|
260
269
|
}, /* @__PURE__ */ react.default.createElement(require_Wrap.Wrap, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tearsheet.d.ts","sourceRoot":"","sources":["../../../../src/components/Tearsheet/next/Tearsheet.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAKZ,SAAS,EAET,EAAE,EAEH,MAAM,OAAO,CAAC;AAOf,OAAO,EAEL,kBAAkB,EAKnB,MAAM,eAAe,CAAC;AAEvB,OAAwB,EACtB,oBAAoB,EAEpB,2BAA2B,EAE3B,0BAA0B,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAA+B,EAC7B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAsB,EAEpB,eAAe,EAEf,gBAAgB,EAEhB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,8BAA8B,EAE9B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAwB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQ1E;;;;GAIG;AAEH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CA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AE,MAAM,EAAE,CAAC;IAElC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,yBAAyB,CAClE,cAAc,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CACrD,GAAG;IACF,MAAM,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACjC,aAAa,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAC/C,UAAU,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC;IAChC,aAAa,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAC/C,YAAY,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC;IAC7C,aAAa,EAAE,EAAE,CAAC,2BAA2B,CAAC,CAAC;IAC/C,gBAAgB,EAAE,EAAE,CAAC,8BAA8B,CAAC,CAAC;IACrD,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;IAClC,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC;IACxC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC;IAC7B,MAAM,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC;CAClC,CAAC;AAqQF;;;GAGG;AACH,eAAO,MAAM,SAAS,EA0BjB,sBAAsB,CAAC"}
|
|
@@ -37,7 +37,7 @@ var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.de
|
|
|
37
37
|
* Internal component that handles the actual tearsheet rendering.
|
|
38
38
|
* This component is always "present" when mounted - the wrapper handles presence logic.
|
|
39
39
|
*/
|
|
40
|
-
const TearsheetInternal = (0, react.forwardRef)(({ children, variant = "wide", selectorsFloatingMenus = [], className, influencerWidth, summaryContentWidth, ariaLabel, onClose, selectorPrimaryFocus, open = false, portalTarget, disablePortal = false, verticalGap, containerClassName, keepMounted = false, isExiting = false, presenceRef, decorator, ...rest }, ref) => {
|
|
40
|
+
const TearsheetInternal = (0, react.forwardRef)(({ children, variant = "wide", selectorsFloatingMenus = [], className, influencerWidth, summaryContentWidth, ariaLabel, onClose, selectorPrimaryFocus, open = false, portalTarget, disablePortal = false, verticalGap, containerClassName, keepMounted = false, isExiting = false, presenceRef, decorator, launcherButtonRef, ...rest }, ref) => {
|
|
41
41
|
const carbonPrefix = (0, _carbon_react.usePrefix)();
|
|
42
42
|
const localRef = (0, react.useRef)(null);
|
|
43
43
|
const bodyRef = (0, react.useRef)(null);
|
|
@@ -56,6 +56,7 @@ const TearsheetInternal = (0, react.forwardRef)(({ children, variant = "wide", s
|
|
|
56
56
|
const body = arr.find((child) => child.type === require_TearsheetBody.default);
|
|
57
57
|
const footer = arr.find((child) => child.type === require_TearsheetFooter.default);
|
|
58
58
|
const uniqueId = (0, react.useRef)(require_useId.useId());
|
|
59
|
+
const titleId = (0, react.useRef)(`${require_context.blockClass}__title-${uniqueId.current}`);
|
|
59
60
|
const { notifyStack, stack, getDepth, getScaleFactor, getBlockSizeChange } = require_StackContext.useStackContext();
|
|
60
61
|
const [depth, setDepth] = (0, react.useState)(0);
|
|
61
62
|
const [mountNode, setMountNode] = (0, react.useState)(null);
|
|
@@ -91,6 +92,22 @@ const TearsheetInternal = (0, react.forwardRef)(({ children, variant = "wide", s
|
|
|
91
92
|
localRef.current.style.setProperty("--scale-factor", scaleFactor + "");
|
|
92
93
|
}
|
|
93
94
|
}, [stack]);
|
|
95
|
+
(0, react.useEffect)(() => {
|
|
96
|
+
if (!open && launcherButtonRef?.current) {
|
|
97
|
+
const timeoutId = setTimeout(() => {
|
|
98
|
+
const refCurrent = launcherButtonRef.current;
|
|
99
|
+
if (refCurrent instanceof HTMLElement) {
|
|
100
|
+
const headerActionItem = refCurrent.closest(`.${require_context.blockClass}__header-action-item`);
|
|
101
|
+
if (headerActionItem) {
|
|
102
|
+
const menuButton = headerActionItem.closest(`.${require_context.blockClass}__content__header-actions`)?.querySelector(`.${require_context.blockClass}__header-actions-menuButton:not(.${require_context.blockClass}__header-actions-menuButton--hidden) button`);
|
|
103
|
+
if (menuButton instanceof HTMLElement) menuButton.focus();
|
|
104
|
+
else refCurrent.focus();
|
|
105
|
+
} else refCurrent.focus();
|
|
106
|
+
}
|
|
107
|
+
}, 100);
|
|
108
|
+
return () => clearTimeout(timeoutId);
|
|
109
|
+
}
|
|
110
|
+
}, [open, launcherButtonRef]);
|
|
94
111
|
const content = /* @__PURE__ */ react.default.createElement(require_context.TearsheetContext.Provider, { value: {
|
|
95
112
|
fullyCollapsed,
|
|
96
113
|
setFullyCollapsed,
|
|
@@ -99,13 +116,15 @@ const TearsheetInternal = (0, react.forwardRef)(({ children, variant = "wide", s
|
|
|
99
116
|
setDisableHeaderCollapse,
|
|
100
117
|
variant,
|
|
101
118
|
isSm,
|
|
102
|
-
decorator
|
|
119
|
+
decorator,
|
|
120
|
+
titleId: titleId.current
|
|
103
121
|
} }, /* @__PURE__ */ react.default.createElement(_carbon_react.unstable_FeatureFlags, { flags: {
|
|
104
122
|
...parentFlagsObject,
|
|
105
123
|
"enable-experimental-focus-wrap-without-sentinels": true
|
|
106
124
|
} }, /* @__PURE__ */ react.default.createElement(_carbon_react.ComposedModal, {
|
|
107
125
|
...rest,
|
|
108
126
|
"aria-label": ariaLabel,
|
|
127
|
+
"aria-labelledby": !ariaLabel ? titleId.current : void 0,
|
|
109
128
|
className: (0, import_classnames.default)(require_context.blockClass, className, {
|
|
110
129
|
[`${require_context.blockClass}--wide`]: variant === "wide",
|
|
111
130
|
[`${require_context.blockClass}--narrow`]: variant === "narrow",
|