@carbon/ibm-products 2.98.0 → 2.99.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +463 -463
- package/css/carbon.css +9599 -6352
- package/css/carbon.css.map +1 -1
- package/css/index-full-carbon.css +5121 -1880
- 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 +29 -186
- 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 +29 -186
- 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 +397 -447
- 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/AddSelect/AddSelectColumn.js +4 -4
- package/es/components/AddSelect/next/AddSelectColumn.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts +21 -0
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilder.js +51 -44
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts +47 -9
- package/es/components/ConditionBuilder/ConditionBuilder.types.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +16 -3
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +37 -17
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +1 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -0
- package/es/components/ConditionBuilder/index.d.ts +1 -1
- package/es/components/ConditionBuilder/index.d.ts.map +1 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -2
- package/es/components/EmptyStates/assets/ErrorIllustration.js +2 -2
- package/es/components/EmptyStates/assets/NoDataIllustration.js +2 -2
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +2 -2
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +2 -2
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +2 -2
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +2 -2
- package/es/components/NotificationsPanel/NotificationsPanel.js +2 -2
- package/es/components/PageHeader/next/PageHeader.d.ts +10 -0
- package/es/components/PageHeader/next/PageHeader.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeader.js +6 -3
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.js +6 -3
- package/es/components/PageHeader/next/PageHeaderBreadcrumbPageActions.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderBreadcrumbPageActions.js +4 -10
- package/es/components/PageHeader/next/PageHeaderContent.d.ts +3 -2
- package/es/components/PageHeader/next/PageHeaderContent.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderContent.js +14 -11
- package/es/components/PageHeader/next/PageHeaderContentPageActions.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderContentPageActions.js +3 -2
- package/es/components/PageHeader/next/PageHeaderScrollButton.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderScrollButton.js +3 -0
- package/es/components/PageHeader/next/PageHeaderTabBar.js +11 -3
- package/es/components/PageHeader/next/PageHeaderTagOverflow.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderTagOverflow.js +10 -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/StatusIcon/StatusIcon.d.ts +11 -9
- package/es/components/StatusIcon/StatusIcon.d.ts.map +1 -1
- package/es/components/StatusIcon/StatusIcon.js +16 -0
- package/es/components/TagOverflow/TagOverflow.d.ts +9 -2
- package/es/components/TagOverflow/TagOverflow.d.ts.map +1 -1
- package/es/components/TagOverflow/TagOverflow.js +10 -4
- package/es/components/TagOverflow/TagOverflowModal.d.ts +22 -4
- package/es/components/TagOverflow/TagOverflowModal.d.ts.map +1 -1
- package/es/components/TagOverflow/TagOverflowModal.js +15 -6
- package/es/components/Tearsheet/TearsheetShell.js +2 -2
- package/es/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/es/components/Tearsheet/next/Tearsheet.js +4 -3
- package/es/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetBody.js +1 -3
- package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts +3 -2
- package/es/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/es/components/Tearsheet/next/TearsheetHeaderContent.js +3 -3
- package/es/components/index.d.ts +1 -1
- package/es/components/index.d.ts.map +1 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +1 -8
- package/es/global/js/utils/useId.js +2 -2
- package/es/index.js +3 -3
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-11.js +342 -310
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +48 -56
- package/es/settings.d.ts +4 -4
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +21 -0
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.js +51 -44
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts +47 -9
- package/lib/components/ConditionBuilder/ConditionBuilder.types.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +9 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +16 -3
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +36 -16
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +1 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -0
- package/lib/components/ConditionBuilder/index.d.ts +1 -1
- package/lib/components/ConditionBuilder/index.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +2 -2
- package/lib/components/PageHeader/next/PageHeader.d.ts +10 -0
- package/lib/components/PageHeader/next/PageHeader.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeader.js +6 -3
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.js +6 -3
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbPageActions.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbPageActions.js +3 -9
- package/lib/components/PageHeader/next/PageHeaderContent.d.ts +3 -2
- package/lib/components/PageHeader/next/PageHeaderContent.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderContent.js +13 -10
- package/lib/components/PageHeader/next/PageHeaderContentPageActions.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderContentPageActions.js +3 -2
- package/lib/components/PageHeader/next/PageHeaderScrollButton.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderScrollButton.js +3 -0
- package/lib/components/PageHeader/next/PageHeaderTabBar.js +11 -3
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.js +10 -2
- 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/StatusIcon/StatusIcon.d.ts +11 -9
- package/lib/components/StatusIcon/StatusIcon.d.ts.map +1 -1
- package/lib/components/StatusIcon/StatusIcon.js +16 -0
- package/lib/components/TagOverflow/TagOverflow.d.ts +9 -2
- package/lib/components/TagOverflow/TagOverflow.d.ts.map +1 -1
- package/lib/components/TagOverflow/TagOverflow.js +10 -4
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +22 -4
- package/lib/components/TagOverflow/TagOverflowModal.d.ts.map +1 -1
- package/lib/components/TagOverflow/TagOverflowModal.js +15 -6
- package/lib/components/Tearsheet/next/Tearsheet.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/Tearsheet.js +2 -1
- package/lib/components/Tearsheet/next/TearsheetBody.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetBody.js +1 -3
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts +3 -2
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.d.ts.map +1 -1
- package/lib/components/Tearsheet/next/TearsheetHeaderContent.js +3 -3
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/global/js/hooks/useCreateComponentFocus.js +1 -8
- package/lib/index.js +5 -9
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-0.js +33 -33
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-1.js +26 -29
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-10.js +336 -365
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-11.js +365 -333
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-12.js +600 -644
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-13.js +724 -662
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-14.js +608 -624
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-15.js +663 -662
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-16.js +533 -551
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-17.js +701 -725
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-18.js +669 -645
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-19.js +521 -496
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-2.js +29 -26
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-20.js +592 -633
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-21.js +688 -174
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-22.js +210 -0
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-3.js +52 -60
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-4.js +60 -52
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-5.js +65 -83
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-6.js +129 -121
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-7.js +199 -231
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-8.js +296 -264
- package/lib/node_modules/@carbon/icons-react/lib/generated/bucket-9.js +303 -336
- package/lib/node_modules/@carbon/icons-react/lib/index.js +535 -486
- package/lib/settings.d.ts +4 -4
- package/package.json +17 -17
- package/scss/components/PageHeader/_page-header.scss +32 -32
- package/scss/components/Tearsheet/_tearsheet_next.scss +10 -8
- package/telemetry.yml +7 -3
- package/es/components/Card/next/Card.js +0 -180
- package/es/components/Card/next/CardAction.js +0 -57
- package/es/components/Card/next/CardActions.js +0 -112
- package/es/components/Card/next/CardBody.js +0 -47
- package/es/components/Card/next/CardContext.js +0 -31
- package/es/components/Card/next/CardFooter.js +0 -47
- package/es/components/Card/next/CardHeader.js +0 -62
- package/es/components/Card/next/CardHeaderMedia.js +0 -46
- package/es/components/Card/next/CardMedia.js +0 -59
- package/es/components/Card/next/CardTitle.js +0 -121
- package/es/components/Card/next/CardTitleMedia.js +0 -49
- package/es/components/Card/next/index.js +0 -33
- package/lib/components/Card/next/Card.js +0 -182
- package/lib/components/Card/next/CardAction.js +0 -64
- package/lib/components/Card/next/CardActions.js +0 -119
- package/lib/components/Card/next/CardBody.js +0 -54
- package/lib/components/Card/next/CardContext.js +0 -33
- package/lib/components/Card/next/CardFooter.js +0 -54
- package/lib/components/Card/next/CardHeader.js +0 -69
- package/lib/components/Card/next/CardHeaderMedia.js +0 -53
- package/lib/components/Card/next/CardMedia.js +0 -66
- package/lib/components/Card/next/CardTitle.js +0 -128
- package/lib/components/Card/next/CardTitleMedia.js +0 -56
- package/lib/components/Card/next/index.js +0 -38
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_devtools = require("../../../global/js/utils/devtools.js");
|
|
12
|
-
let react = require("react");
|
|
13
|
-
react = require_runtime.__toESM(react);
|
|
14
|
-
let prop_types = require("prop-types");
|
|
15
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
16
|
-
//#region src/components/Card/next/CardAction.tsx
|
|
17
|
-
/**
|
|
18
|
-
* Copyright IBM Corp. 2026
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
24
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
25
|
-
const componentName = "CardAction";
|
|
26
|
-
/**
|
|
27
|
-
* CardAction is a wrapper for interactive elements in the card footer.
|
|
28
|
-
* Its presence signals action-set layout to the footer (no padding, auto
|
|
29
|
-
* border, stretch behavior).
|
|
30
|
-
*
|
|
31
|
-
* Note: do not use CardAction inside a clickable card — clickable cards
|
|
32
|
-
* should not contain interactive elements (see usage guidelines).
|
|
33
|
-
*/
|
|
34
|
-
let CardAction = (0, react.forwardRef)(({ children, className, ...rest }, ref) => {
|
|
35
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
36
|
-
...rest,
|
|
37
|
-
ref,
|
|
38
|
-
className: (0, import_classnames.default)(`${blockClass}__action`, className),
|
|
39
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
40
|
-
}, children);
|
|
41
|
-
});
|
|
42
|
-
CardAction.propTypes = {
|
|
43
|
-
/**
|
|
44
|
-
* Provide the contents of the CardAction.
|
|
45
|
-
*/
|
|
46
|
-
children: prop_types.default.node,
|
|
47
|
-
/**
|
|
48
|
-
* Provide an optional class to be applied to the containing node.
|
|
49
|
-
*/
|
|
50
|
-
className: prop_types.default.string,
|
|
51
|
-
/**
|
|
52
|
-
* Label shown in the overflow menu when this action is hidden.
|
|
53
|
-
*/
|
|
54
|
-
label: prop_types.default.string
|
|
55
|
-
};
|
|
56
|
-
CardAction = require_settings.pkg.checkComponentEnabled(CardAction, componentName);
|
|
57
|
-
CardAction.displayName = componentName;
|
|
58
|
-
//#endregion
|
|
59
|
-
Object.defineProperty(exports, "CardAction", {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: function() {
|
|
62
|
-
return CardAction;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_devtools = require("../../../global/js/utils/devtools.js");
|
|
12
|
-
let react = require("react");
|
|
13
|
-
react = require_runtime.__toESM(react);
|
|
14
|
-
let prop_types = require("prop-types");
|
|
15
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
16
|
-
let _carbon_react = require("@carbon/react");
|
|
17
|
-
let _carbon_utilities = require("@carbon/utilities");
|
|
18
|
-
//#region src/components/Card/next/CardActions.tsx
|
|
19
|
-
/**
|
|
20
|
-
* Copyright IBM Corp. 2026
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/
|
|
25
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
26
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
27
|
-
const componentName = "CardActions";
|
|
28
|
-
/**
|
|
29
|
-
* CardActions is a container for action buttons in the card header.
|
|
30
|
-
* Positioned in the top-right corner with 8px gap between actions.
|
|
31
|
-
* When actions exceed 50% of available header space, overflow menu is shown.
|
|
32
|
-
*/
|
|
33
|
-
let CardActions = (0, react.forwardRef)(({ children, className, overflowMenuLabel = "More actions", ...rest }, ref) => {
|
|
34
|
-
const containerRef = (0, react.useRef)(null);
|
|
35
|
-
const [hiddenItems, setHiddenItems] = (0, react.useState)([]);
|
|
36
|
-
const classes = (0, import_classnames.default)(`${blockClass}__actions`, className);
|
|
37
|
-
const actionItems = (0, react.useMemo)(() => {
|
|
38
|
-
const items = [];
|
|
39
|
-
react.Children.forEach(children, (child, index) => {
|
|
40
|
-
if (react.default.isValidElement(child)) {
|
|
41
|
-
const actionProps = child.props;
|
|
42
|
-
const button = actionProps.children;
|
|
43
|
-
const buttonProps = react.default.isValidElement(button) ? button.props : null;
|
|
44
|
-
const label = actionProps.label ?? buttonProps?.label ?? buttonProps?.iconDescription ?? (typeof buttonProps?.children === "string" ? buttonProps.children : `Action ${index + 1}`);
|
|
45
|
-
const id = `${label}-${index}`;
|
|
46
|
-
items.push({
|
|
47
|
-
id,
|
|
48
|
-
element: child,
|
|
49
|
-
label
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
return items;
|
|
54
|
-
}, [children]);
|
|
55
|
-
(0, react.useEffect)(() => {
|
|
56
|
-
if (!containerRef.current || actionItems.length === 0) return;
|
|
57
|
-
const handler = (0, _carbon_utilities.createOverflowHandler)({
|
|
58
|
-
container: containerRef.current,
|
|
59
|
-
onChange: (_visible, hidden) => {
|
|
60
|
-
const hiddenIds = hidden.map((el) => el.dataset.id);
|
|
61
|
-
setHiddenItems(actionItems.filter((item) => hiddenIds.includes(item.id)));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return () => handler.disconnect();
|
|
65
|
-
}, [children]);
|
|
66
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
67
|
-
ref: (node) => {
|
|
68
|
-
containerRef.current = node;
|
|
69
|
-
if (typeof ref === "function") ref(node);
|
|
70
|
-
else if (ref) ref.current = node;
|
|
71
|
-
},
|
|
72
|
-
className: classes,
|
|
73
|
-
...rest,
|
|
74
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
75
|
-
}, actionItems.map((item) => /* @__PURE__ */ react.default.createElement("div", {
|
|
76
|
-
key: item.id,
|
|
77
|
-
"data-id": item.id
|
|
78
|
-
}, item.element)), /* @__PURE__ */ react.default.createElement("div", {
|
|
79
|
-
"data-offset": true,
|
|
80
|
-
"data-hidden": true,
|
|
81
|
-
"data-floating-menu-container": true
|
|
82
|
-
}, /* @__PURE__ */ react.default.createElement(_carbon_react.FeatureFlags, { enableV12Overflowmenu: true }, /* @__PURE__ */ react.default.createElement(_carbon_react.OverflowMenu, {
|
|
83
|
-
size: "sm",
|
|
84
|
-
"aria-label": overflowMenuLabel
|
|
85
|
-
}, hiddenItems.map((item) => /* @__PURE__ */ react.default.createElement(_carbon_react.OverflowMenuItem, {
|
|
86
|
-
key: item.id,
|
|
87
|
-
itemText: item.label || "Action",
|
|
88
|
-
onClick: () => {
|
|
89
|
-
const button = item.element.props.children;
|
|
90
|
-
if (button && react.default.isValidElement(button)) {
|
|
91
|
-
const buttonProps = button.props;
|
|
92
|
-
if (buttonProps.onClick) buttonProps.onClick();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}))))));
|
|
96
|
-
});
|
|
97
|
-
CardActions.propTypes = {
|
|
98
|
-
/**
|
|
99
|
-
* Provide the contents of the CardActions.
|
|
100
|
-
*/
|
|
101
|
-
children: prop_types.default.node,
|
|
102
|
-
/**
|
|
103
|
-
* Provide an optional class to be applied to the containing node.
|
|
104
|
-
*/
|
|
105
|
-
className: prop_types.default.string,
|
|
106
|
-
/**
|
|
107
|
-
* Aria label for the overflow menu
|
|
108
|
-
*/
|
|
109
|
-
overflowMenuLabel: prop_types.default.string
|
|
110
|
-
};
|
|
111
|
-
CardActions = require_settings.pkg.checkComponentEnabled(CardActions, componentName);
|
|
112
|
-
CardActions.displayName = componentName;
|
|
113
|
-
//#endregion
|
|
114
|
-
Object.defineProperty(exports, "CardActions", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function() {
|
|
117
|
-
return CardActions;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
let react = require("react");
|
|
12
|
-
react = require_runtime.__toESM(react);
|
|
13
|
-
let prop_types = require("prop-types");
|
|
14
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
15
|
-
//#region src/components/Card/next/CardBody.tsx
|
|
16
|
-
/**
|
|
17
|
-
* Copyright IBM Corp. 2026
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
23
|
-
const componentName = "CardBody";
|
|
24
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next__body`;
|
|
25
|
-
/**
|
|
26
|
-
* CardBody component - Body section of the card for free-form content
|
|
27
|
-
*/
|
|
28
|
-
let CardBody = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
|
|
29
|
-
const bodyClasses = (0, import_classnames.default)(blockClass, className);
|
|
30
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
31
|
-
...rest,
|
|
32
|
-
ref,
|
|
33
|
-
className: bodyClasses
|
|
34
|
-
}, children);
|
|
35
|
-
});
|
|
36
|
-
CardBody.propTypes = {
|
|
37
|
-
/**
|
|
38
|
-
* Body content
|
|
39
|
-
*/
|
|
40
|
-
children: prop_types.default.node,
|
|
41
|
-
/**
|
|
42
|
-
* Additional CSS class names
|
|
43
|
-
*/
|
|
44
|
-
className: prop_types.default.string
|
|
45
|
-
};
|
|
46
|
-
CardBody = require_settings.pkg.checkComponentEnabled(CardBody, componentName);
|
|
47
|
-
CardBody.displayName = componentName;
|
|
48
|
-
//#endregion
|
|
49
|
-
Object.defineProperty(exports, "CardBody", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function() {
|
|
52
|
-
return CardBody;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
let react = require("react");
|
|
10
|
-
//#region src/components/Card/next/CardContext.tsx
|
|
11
|
-
/**
|
|
12
|
-
* Copyright IBM Corp. 2026
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Context for sharing Card state with child components
|
|
19
|
-
*/
|
|
20
|
-
const CardContext = (0, react.createContext)(void 0);
|
|
21
|
-
/**
|
|
22
|
-
* Hook to access Card context
|
|
23
|
-
* @returns CardContextValue
|
|
24
|
-
* @throws Error if used outside of Card component
|
|
25
|
-
*/
|
|
26
|
-
const useCardContext = () => {
|
|
27
|
-
const context = (0, react.useContext)(CardContext);
|
|
28
|
-
if (!context) throw new Error("Card subcomponents must be used within a Card component");
|
|
29
|
-
return context;
|
|
30
|
-
};
|
|
31
|
-
//#endregion
|
|
32
|
-
exports.CardContext = CardContext;
|
|
33
|
-
exports.useCardContext = useCardContext;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
let react = require("react");
|
|
12
|
-
react = require_runtime.__toESM(react);
|
|
13
|
-
let prop_types = require("prop-types");
|
|
14
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
15
|
-
//#region src/components/Card/next/CardFooter.tsx
|
|
16
|
-
/**
|
|
17
|
-
* Copyright IBM Corp. 2026
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
23
|
-
const componentName = "CardFooter";
|
|
24
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next__footer`;
|
|
25
|
-
/**
|
|
26
|
-
* CardFooter component - Footer section of the card
|
|
27
|
-
*/
|
|
28
|
-
let CardFooter = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
|
|
29
|
-
const footerClasses = (0, import_classnames.default)(blockClass, className);
|
|
30
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
31
|
-
...rest,
|
|
32
|
-
ref,
|
|
33
|
-
className: footerClasses
|
|
34
|
-
}, children);
|
|
35
|
-
});
|
|
36
|
-
CardFooter.propTypes = {
|
|
37
|
-
/**
|
|
38
|
-
* Footer content
|
|
39
|
-
*/
|
|
40
|
-
children: prop_types.default.node,
|
|
41
|
-
/**
|
|
42
|
-
* Additional CSS class names
|
|
43
|
-
*/
|
|
44
|
-
className: prop_types.default.string
|
|
45
|
-
};
|
|
46
|
-
CardFooter = require_settings.pkg.checkComponentEnabled(CardFooter, componentName);
|
|
47
|
-
CardFooter.displayName = componentName;
|
|
48
|
-
//#endregion
|
|
49
|
-
Object.defineProperty(exports, "CardFooter", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function() {
|
|
52
|
-
return CardFooter;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_CardContext = require("./CardContext.js");
|
|
12
|
-
let react = require("react");
|
|
13
|
-
react = require_runtime.__toESM(react);
|
|
14
|
-
let prop_types = require("prop-types");
|
|
15
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
16
|
-
//#region src/components/Card/next/CardHeader.tsx
|
|
17
|
-
/**
|
|
18
|
-
* Copyright IBM Corp. 2026
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
24
|
-
const componentName = "CardHeader";
|
|
25
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next__header`;
|
|
26
|
-
/**
|
|
27
|
-
* CardHeader component - Header section of the card.
|
|
28
|
-
* Layout is handled entirely by CSS Grid on __header:
|
|
29
|
-
* - CardHeaderMedia spans both columns (full-width row above the title area)
|
|
30
|
-
* - CardTitleMedia occupies column 1 (left icon slot)
|
|
31
|
-
* - CardTitle occupies column 2 (right text slot), or spans full width when
|
|
32
|
-
* CardTitleMedia is absent — detected by the :has selector in SCSS.
|
|
33
|
-
* No child-scanning or wrapper injection is needed.
|
|
34
|
-
*/
|
|
35
|
-
let CardHeader = (0, react.forwardRef)(({ className, children, ...rest }, ref) => {
|
|
36
|
-
const context = require_CardContext.useCardContext();
|
|
37
|
-
const cardBlockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
38
|
-
const handleDecoratorClick = (0, react.useCallback)((e) => e.stopPropagation(), []);
|
|
39
|
-
const handleDecoratorKeyDown = (0, react.useCallback)((e) => e.stopPropagation(), []);
|
|
40
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
41
|
-
...rest,
|
|
42
|
-
ref,
|
|
43
|
-
className: (0, import_classnames.default)(blockClass, className)
|
|
44
|
-
}, children, context.decorator && /* @__PURE__ */ react.default.createElement("div", {
|
|
45
|
-
className: `${cardBlockClass}__decorator`,
|
|
46
|
-
role: "presentation",
|
|
47
|
-
onClick: handleDecoratorClick,
|
|
48
|
-
onKeyDown: handleDecoratorKeyDown
|
|
49
|
-
}, context.decorator));
|
|
50
|
-
});
|
|
51
|
-
CardHeader.propTypes = {
|
|
52
|
-
/**
|
|
53
|
-
* Header content
|
|
54
|
-
*/
|
|
55
|
-
children: prop_types.default.node,
|
|
56
|
-
/**
|
|
57
|
-
* Additional CSS class names
|
|
58
|
-
*/
|
|
59
|
-
className: prop_types.default.string
|
|
60
|
-
};
|
|
61
|
-
CardHeader = require_settings.pkg.checkComponentEnabled(CardHeader, componentName);
|
|
62
|
-
CardHeader.displayName = componentName;
|
|
63
|
-
//#endregion
|
|
64
|
-
Object.defineProperty(exports, "CardHeader", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function() {
|
|
67
|
-
return CardHeader;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_devtools = require("../../../global/js/utils/devtools.js");
|
|
12
|
-
let react = require("react");
|
|
13
|
-
react = require_runtime.__toESM(react);
|
|
14
|
-
let prop_types = require("prop-types");
|
|
15
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
16
|
-
//#region src/components/Card/next/CardHeaderMedia.tsx
|
|
17
|
-
/**
|
|
18
|
-
* Copyright IBM Corp. 2026
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
24
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
25
|
-
const componentName = "CardHeaderMedia";
|
|
26
|
-
let CardHeaderMedia = (0, react.forwardRef)(({ children, className, ...rest }, ref) => {
|
|
27
|
-
const classes = (0, import_classnames.default)(`${blockClass}__header-media`, className);
|
|
28
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
29
|
-
...rest,
|
|
30
|
-
ref,
|
|
31
|
-
className: classes,
|
|
32
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
33
|
-
}, children);
|
|
34
|
-
});
|
|
35
|
-
CardHeaderMedia.propTypes = {
|
|
36
|
-
/**
|
|
37
|
-
* Provide the contents of the CardHeaderMedia.
|
|
38
|
-
*/
|
|
39
|
-
children: prop_types.default.node,
|
|
40
|
-
/**
|
|
41
|
-
* Provide an optional class to be applied to the containing node.
|
|
42
|
-
*/
|
|
43
|
-
className: prop_types.default.string
|
|
44
|
-
};
|
|
45
|
-
CardHeaderMedia = require_settings.pkg.checkComponentEnabled(CardHeaderMedia, componentName);
|
|
46
|
-
CardHeaderMedia.displayName = componentName;
|
|
47
|
-
//#endregion
|
|
48
|
-
Object.defineProperty(exports, "CardHeaderMedia", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function() {
|
|
51
|
-
return CardHeaderMedia;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_devtools = require("../../../global/js/utils/devtools.js");
|
|
12
|
-
const require_CardContext = require("./CardContext.js");
|
|
13
|
-
let react = require("react");
|
|
14
|
-
react = require_runtime.__toESM(react);
|
|
15
|
-
let prop_types = require("prop-types");
|
|
16
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
17
|
-
let _carbon_react = require("@carbon/react");
|
|
18
|
-
//#region src/components/Card/next/CardMedia.tsx
|
|
19
|
-
/**
|
|
20
|
-
* Copyright IBM Corp. 2026
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/
|
|
25
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
26
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
27
|
-
const componentName = "CardMedia";
|
|
28
|
-
/**
|
|
29
|
-
* CardMedia is a media slot component that maintains aspect ratio.
|
|
30
|
-
*
|
|
31
|
-
* In vertical (default) mode it delegates to Carbon's AspectRatio.
|
|
32
|
-
* In horizontal mode it renders a plain div sized to `mediaWidth` (default
|
|
33
|
-
* 33.33%) that stretches to the full card height — no aspect-ratio math needed.
|
|
34
|
-
*/
|
|
35
|
-
let CardMedia = (0, react.forwardRef)(({ children, className, ratio, mediaWidth = "33.33%", ...rest }, ref) => {
|
|
36
|
-
const { horizontal } = require_CardContext.useCardContext();
|
|
37
|
-
const classes = (0, import_classnames.default)(`${blockClass}__media`, className);
|
|
38
|
-
if (horizontal) return /* @__PURE__ */ react.default.createElement("div", {
|
|
39
|
-
ref,
|
|
40
|
-
className: `${blockClass}__media ${blockClass}__media--horizontal`,
|
|
41
|
-
style: { [`--${blockClass}--media-width`]: mediaWidth },
|
|
42
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
43
|
-
}, children);
|
|
44
|
-
return /* @__PURE__ */ react.default.createElement(_carbon_react.AspectRatio, {
|
|
45
|
-
ratio,
|
|
46
|
-
...rest,
|
|
47
|
-
ref,
|
|
48
|
-
className: classes,
|
|
49
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
50
|
-
}, children);
|
|
51
|
-
});
|
|
52
|
-
CardMedia.propTypes = {
|
|
53
|
-
children: prop_types.default.node,
|
|
54
|
-
className: prop_types.default.string,
|
|
55
|
-
/** Width of the media column in horizontal layout. Any valid CSS width value. */
|
|
56
|
-
mediaWidth: prop_types.default.string
|
|
57
|
-
};
|
|
58
|
-
CardMedia = require_settings.pkg.checkComponentEnabled(CardMedia, componentName);
|
|
59
|
-
CardMedia.displayName = componentName;
|
|
60
|
-
//#endregion
|
|
61
|
-
Object.defineProperty(exports, "CardMedia", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function() {
|
|
64
|
-
return CardMedia;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2020, 2026
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
|
|
9
|
-
const require_index = require("../../../node_modules/classnames/index.js");
|
|
10
|
-
const require_settings = require("../../../settings.js");
|
|
11
|
-
const require_devtools = require("../../../global/js/utils/devtools.js");
|
|
12
|
-
let react = require("react");
|
|
13
|
-
react = require_runtime.__toESM(react);
|
|
14
|
-
let prop_types = require("prop-types");
|
|
15
|
-
prop_types = require_runtime.__toESM(prop_types);
|
|
16
|
-
//#region src/components/Card/next/CardTitle.tsx
|
|
17
|
-
/**
|
|
18
|
-
* Copyright IBM Corp. 2026
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
21
|
-
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
24
|
-
const blockClass = `${require_settings.pkg.prefix}--card-next`;
|
|
25
|
-
const componentName = "CardTitle";
|
|
26
|
-
/**
|
|
27
|
-
* CardTitle displays the main title text in the card header.
|
|
28
|
-
* Typography is controlled via className:
|
|
29
|
-
* - Productive: Use $heading-compact-02 (16px/22px)
|
|
30
|
-
* - Expressive: Use $heading-03 (20px/28px)
|
|
31
|
-
* Color uses $text-primary token.
|
|
32
|
-
*/
|
|
33
|
-
let CardTitle = (0, react.forwardRef)(({ children, className, titleTruncate = false, maxWidth = "100%", titleStart, titleEnd, label, labelTruncate = false, description, descriptionTruncate = false, ...rest }, ref) => {
|
|
34
|
-
const isTitleMulti = typeof titleTruncate === "number";
|
|
35
|
-
const isLabelMulti = typeof labelTruncate === "number";
|
|
36
|
-
const isDescMulti = typeof descriptionTruncate === "number";
|
|
37
|
-
const containerClasses = (0, import_classnames.default)(`${blockClass}__title`, className);
|
|
38
|
-
const textRowClasses = (0, import_classnames.default)(`${blockClass}__title-text-row`, {
|
|
39
|
-
[`${blockClass}__title-text-row--truncate`]: titleTruncate === true,
|
|
40
|
-
[`${blockClass}__title-text-row--truncate-multi`]: isTitleMulti,
|
|
41
|
-
[`${blockClass}__title-text-row--with-start-icon`]: titleStart,
|
|
42
|
-
[`${blockClass}__title-text-row--with-end-icon`]: titleEnd
|
|
43
|
-
});
|
|
44
|
-
const titleVars = titleTruncate !== false ? {
|
|
45
|
-
[`--${blockClass}--title-max-width`]: maxWidth,
|
|
46
|
-
...isTitleMulti && { [`--${blockClass}--title-line-clamp`]: titleTruncate }
|
|
47
|
-
} : void 0;
|
|
48
|
-
const labelVars = isLabelMulti ? { [`--${blockClass}--label-line-clamp`]: labelTruncate } : void 0;
|
|
49
|
-
const descVars = isDescMulti ? { [`--${blockClass}--description-line-clamp`]: descriptionTruncate } : void 0;
|
|
50
|
-
return /* @__PURE__ */ react.default.createElement("div", {
|
|
51
|
-
...rest,
|
|
52
|
-
ref,
|
|
53
|
-
className: containerClasses,
|
|
54
|
-
...require_devtools.getDevtoolsProps(componentName)
|
|
55
|
-
}, label && /* @__PURE__ */ react.default.createElement("div", {
|
|
56
|
-
className: (0, import_classnames.default)(`${blockClass}__label`, {
|
|
57
|
-
[`${blockClass}__label--truncate`]: labelTruncate === true,
|
|
58
|
-
[`${blockClass}__label--truncate-multi`]: isLabelMulti
|
|
59
|
-
}),
|
|
60
|
-
style: labelVars
|
|
61
|
-
}, label), /* @__PURE__ */ react.default.createElement("span", {
|
|
62
|
-
className: textRowClasses,
|
|
63
|
-
style: titleVars
|
|
64
|
-
}, titleStart && /* @__PURE__ */ react.default.createElement("span", { className: `${blockClass}__title-start-icon` }, titleStart), children, titleEnd && /* @__PURE__ */ react.default.createElement("span", { className: `${blockClass}__title-end-icon` }, titleEnd)), description && /* @__PURE__ */ react.default.createElement("div", {
|
|
65
|
-
className: (0, import_classnames.default)(`${blockClass}__description`, {
|
|
66
|
-
[`${blockClass}__description--truncate`]: descriptionTruncate === true,
|
|
67
|
-
[`${blockClass}__description--truncate-multi`]: isDescMulti
|
|
68
|
-
}),
|
|
69
|
-
style: descVars
|
|
70
|
-
}, description));
|
|
71
|
-
});
|
|
72
|
-
CardTitle.propTypes = {
|
|
73
|
-
/**
|
|
74
|
-
* Provide the contents of the CardTitle.
|
|
75
|
-
*/
|
|
76
|
-
children: prop_types.default.node,
|
|
77
|
-
/**
|
|
78
|
-
* Provide an optional class to be applied to the containing node.
|
|
79
|
-
*/
|
|
80
|
-
className: prop_types.default.string,
|
|
81
|
-
/**
|
|
82
|
-
* Optional description rendered below the title text.
|
|
83
|
-
*/
|
|
84
|
-
description: prop_types.default.node,
|
|
85
|
-
/**
|
|
86
|
-
* Enable truncation on the description text.
|
|
87
|
-
* - `true`: Single line truncation
|
|
88
|
-
* - `number`: Multi-line truncation (line clamp)
|
|
89
|
-
*/
|
|
90
|
-
descriptionTruncate: prop_types.default.oneOfType([prop_types.default.bool, prop_types.default.number]),
|
|
91
|
-
/**
|
|
92
|
-
* Optional label rendered above the title text.
|
|
93
|
-
*/
|
|
94
|
-
label: prop_types.default.node,
|
|
95
|
-
/**
|
|
96
|
-
* Enable truncation on the label text.
|
|
97
|
-
* - `true`: Single line truncation
|
|
98
|
-
* - `number`: Multi-line truncation (line clamp)
|
|
99
|
-
*/
|
|
100
|
-
labelTruncate: prop_types.default.oneOfType([prop_types.default.bool, prop_types.default.number]),
|
|
101
|
-
/**
|
|
102
|
-
* Maximum width for the title when truncation is active.
|
|
103
|
-
*/
|
|
104
|
-
maxWidth: prop_types.default.string,
|
|
105
|
-
/**
|
|
106
|
-
* Optional trailing icon or content to display after the title text.
|
|
107
|
-
*/
|
|
108
|
-
titleEnd: prop_types.default.node,
|
|
109
|
-
/**
|
|
110
|
-
* Optional leading icon or content to display before the title text.
|
|
111
|
-
*/
|
|
112
|
-
titleStart: prop_types.default.node,
|
|
113
|
-
/**
|
|
114
|
-
* Enable text truncation with ellipsis.
|
|
115
|
-
* - `true`: Single line truncation
|
|
116
|
-
* - `number`: Multi-line truncation (line clamp)
|
|
117
|
-
*/
|
|
118
|
-
titleTruncate: prop_types.default.oneOfType([prop_types.default.bool, prop_types.default.number])
|
|
119
|
-
};
|
|
120
|
-
CardTitle = require_settings.pkg.checkComponentEnabled(CardTitle, componentName);
|
|
121
|
-
CardTitle.displayName = componentName;
|
|
122
|
-
//#endregion
|
|
123
|
-
Object.defineProperty(exports, "CardTitle", {
|
|
124
|
-
enumerable: true,
|
|
125
|
-
get: function() {
|
|
126
|
-
return CardTitle;
|
|
127
|
-
}
|
|
128
|
-
});
|