@carbon/ibm-products 2.34.0 → 2.36.0-alpha.27
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +32448 -32421
- 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 +105 -91
- 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 +765 -24496
- 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 +2543 -18127
- 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/ActionSet/ActionSet.d.ts +38 -2
- package/es/components/ActionSet/ActionSet.js +3 -5
- package/es/components/Coachmark/utils/enums.d.ts +36 -22
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
- package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/es/components/CreateFullPage/CreateFullPage.js +14 -26
- package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
- package/es/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +10 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/es/components/Datagrid/useEditableCell.js +15 -0
- package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/es/components/DelimitedList/DelimitedList.js +0 -1
- package/es/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/es/components/EditFullPage/EditFullPage.js +3 -3
- package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/es/components/EditInPlace/EditInPlace.js +10 -6
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/es/components/ExportModal/ExportModal.d.ts +110 -2
- package/es/components/ExportModal/ExportModal.js +10 -4
- package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
- package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
- package/es/components/FilterPanel/index.d.ts +1 -0
- package/es/components/FullPageError/FullPageError.d.ts +2 -1
- package/es/components/FullPageError/FullPageError.js +24 -49
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/es/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/es/components/ImportModal/ImportModal.d.ts +136 -2
- package/es/components/ImportModal/ImportModal.js +3 -2
- package/es/components/InlineTip/InlineTip.d.ts +90 -2
- package/es/components/InlineTip/InlineTip.js +3 -2
- package/es/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/es/components/Nav/Nav.js +1 -1
- package/es/components/Nav/NavList.js +7 -7
- package/es/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/es/components/NonLinearReading/NonLinearReading.js +2 -7
- package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/es/components/PageHeader/PageHeader.js +3 -3
- package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/es/components/PageHeader/PageHeaderUtils.js +4 -3
- package/es/components/SearchBar/SearchBar.d.ts +51 -3
- package/es/components/SearchBar/SearchBar.js +5 -6
- package/es/components/SidePanel/SidePanel.js +62 -41
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +209 -0
- package/es/components/TagOverflow/constants.d.ts +14 -0
- package/es/components/TagOverflow/constants.js +30 -0
- package/es/components/TagOverflow/index.d.ts +1 -0
- package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/es/components/Toolbar/Toolbar.d.ts +23 -5
- package/es/components/Toolbar/Toolbar.js +30 -26
- package/es/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/es/components/TruncatedList/TruncatedList.js +5 -4
- package/es/components/UserAvatar/UserAvatar.js +4 -2
- package/es/components/index.d.ts +4 -2
- package/es/global/js/package-settings.d.ts +3 -0
- package/es/global/js/package-settings.js +3 -0
- package/es/index.js +4 -0
- package/es/settings.d.ts +3 -0
- package/lib/components/ActionSet/ActionSet.d.ts +38 -2
- package/lib/components/ActionSet/ActionSet.js +3 -5
- package/lib/components/Coachmark/utils/enums.d.ts +36 -22
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +26 -2
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +1 -3
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.d.ts +28 -2
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
- package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
- package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/CreateFullPage/CreateFullPage.d.ts +121 -4
- package/lib/components/CreateFullPage/CreateFullPage.js +13 -25
- package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
- package/lib/components/CreateTearsheet/CreateTearsheet.js +2 -0
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +11 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
- package/lib/components/Datagrid/useEditableCell.js +19 -0
- package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
- package/lib/components/DelimitedList/DelimitedList.js +0 -1
- package/lib/components/EditFullPage/EditFullPage.d.ts +19 -2
- package/lib/components/EditFullPage/EditFullPage.js +3 -3
- package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
- package/lib/components/EditInPlace/EditInPlace.js +10 -6
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -3
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.d.ts +61 -2
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -2
- package/lib/components/ExportModal/ExportModal.d.ts +110 -2
- package/lib/components/ExportModal/ExportModal.js +10 -4
- package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
- package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
- package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
- package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
- package/lib/components/FilterPanel/index.d.ts +1 -0
- package/lib/components/FullPageError/FullPageError.d.ts +2 -1
- package/lib/components/FullPageError/FullPageError.js +24 -49
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.d.ts +40 -2
- package/lib/components/HTTPErrors/HTTPErrorOther/HTTPErrorOther.js +1 -1
- package/lib/components/ImportModal/ImportModal.d.ts +136 -2
- package/lib/components/ImportModal/ImportModal.js +3 -2
- package/lib/components/InlineTip/InlineTip.d.ts +90 -2
- package/lib/components/InlineTip/InlineTip.js +3 -2
- package/lib/components/InlineTip/InlineTipLink.d.ts +19 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.d.ts +23 -2
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +0 -1
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.d.ts +23 -2
- package/lib/components/Nav/Nav.js +1 -1
- package/lib/components/Nav/NavList.js +7 -7
- package/lib/components/NonLinearReading/NonLinearReading.d.ts +28 -2
- package/lib/components/NonLinearReading/NonLinearReading.js +2 -7
- package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
- package/lib/components/PageHeader/PageHeader.js +3 -3
- package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
- package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
- package/lib/components/SearchBar/SearchBar.d.ts +51 -3
- package/lib/components/SearchBar/SearchBar.js +5 -6
- package/lib/components/SidePanel/SidePanel.js +62 -41
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
- package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +216 -0
- package/lib/components/TagOverflow/constants.d.ts +14 -0
- package/lib/components/TagOverflow/constants.js +34 -0
- package/lib/components/TagOverflow/index.d.ts +1 -0
- package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
- package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
- package/lib/components/Toolbar/Toolbar.d.ts +23 -5
- package/lib/components/Toolbar/Toolbar.js +30 -26
- package/lib/components/TruncatedList/TruncatedList.d.ts +47 -2
- package/lib/components/TruncatedList/TruncatedList.js +5 -4
- package/lib/components/UserAvatar/UserAvatar.js +4 -2
- package/lib/components/index.d.ts +4 -2
- package/lib/global/js/package-settings.d.ts +3 -0
- package/lib/global/js/package-settings.js +3 -0
- package/lib/index.js +17 -0
- package/lib/settings.d.ts +3 -0
- package/package.json +5 -5
- package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
- package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
- package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
- package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
- package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
- package/scss/components/ConditionBuilder/_index.scss +8 -0
- package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
- package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
- package/scss/components/Datagrid/styles/_useSortableColumns.scss +2 -0
- package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
- package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +1 -3
- package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +0 -2
- package/scss/components/FilterPanel/_filter-panel-checkbox.scss +0 -1
- package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
- package/scss/components/FilterPanel/_index-with-carbon.scss +1 -0
- package/scss/components/FilterPanel/_index.scss +1 -0
- package/scss/components/FullPageError/_full-page-error.scss +10 -10
- package/scss/components/Guidebanner/_guidebanner.scss +1 -1
- package/scss/components/InlineTip/_inline-tip.scss +1 -1
- package/scss/components/ProductiveCard/_productive-card.scss +13 -0
- package/scss/components/SidePanel/_side-panel.scss +9 -9
- package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
- package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
- package/scss/components/TagOverflow/_index.scss +8 -0
- package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
- package/scss/components/Tearsheet/_tearsheet.scss +10 -0
- package/scss/components/UserAvatar/_user-avatar.scss +7 -3
- package/scss/components/_index-with-carbon.scss +2 -0
- package/scss/components/_index.scss +2 -0
@@ -1,3 +1,94 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React, { ReactNode, PropsWithChildren } from 'react';
|
9
|
+
import PropTypes from 'prop-types';
|
10
|
+
import { ButtonProps } from '@carbon/react';
|
11
|
+
type closeIconDescriptionTypes = {
|
12
|
+
hasCloseIcon: true;
|
13
|
+
closeIconDescription: string;
|
14
|
+
};
|
15
|
+
interface TearsheetNarrowProps extends PropsWithChildren {
|
16
|
+
/**
|
17
|
+
* The navigation actions to be shown as buttons in the action area at the
|
18
|
+
* bottom of the tearsheet. Each action is specified as an object with
|
19
|
+
* optional fields: 'label' to supply the button label, 'kind' to select the
|
20
|
+
* button kind (must be 'primary', 'secondary' or 'ghost'), 'loading' to
|
21
|
+
* display a loading indicator, and 'onClick' to receive notifications when
|
22
|
+
* the button is clicked. Additional fields in the object will be passed to
|
23
|
+
* the Button component, and these can include 'disabled', 'ref', 'className',
|
24
|
+
* and any other Button props. Any other fields in the object will be passed
|
25
|
+
* through to the button element as HTML attributes.
|
26
|
+
*
|
27
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
28
|
+
*/
|
29
|
+
actions?: ButtonProps[];
|
30
|
+
/**
|
31
|
+
* The aria-label for the tearsheet, which is optional.
|
32
|
+
* if it is not passed, the title will be used as the aria-label.
|
33
|
+
*/
|
34
|
+
ariaLabel?: string;
|
35
|
+
/**
|
36
|
+
* An optional class or classes to be added to the outermost element.
|
37
|
+
*/
|
38
|
+
className?: string;
|
39
|
+
/**
|
40
|
+
* The accessibility title for the close icon (if shown).
|
41
|
+
*
|
42
|
+
* **Note:** This prop is only required if a close icon is shown, i.e. if
|
43
|
+
* there are a no navigation actions and/or hasCloseIcon is true.
|
44
|
+
*/
|
45
|
+
closeIconDescription?: closeIconDescriptionTypes;
|
46
|
+
/**
|
47
|
+
* A description of the flow, displayed in the header area of the tearsheet.
|
48
|
+
*/
|
49
|
+
description?: ReactNode;
|
50
|
+
/**
|
51
|
+
* Enable a close icon ('x') in the header area of the tearsheet. By default,
|
52
|
+
* a tearsheet does not display a close icon, but one should be enabled if
|
53
|
+
* the tearsheet is read-only or has no navigation actions (sometimes called
|
54
|
+
* a "passive tearsheet").
|
55
|
+
*/
|
56
|
+
hasCloseIcon?: boolean;
|
57
|
+
/**
|
58
|
+
* A label for the tearsheet, displayed in the header area of the tearsheet
|
59
|
+
* to maintain context for the tearsheet (e.g. as the title changes from page
|
60
|
+
* to page of a multi-page task).
|
61
|
+
*/
|
62
|
+
label?: ReactNode;
|
63
|
+
/**
|
64
|
+
* An optional handler that is called when the user closes the tearsheet (by
|
65
|
+
* clicking the close button, if enabled, or clicking outside, if enabled).
|
66
|
+
* Returning `false` here prevents the modal from closing.
|
67
|
+
*/
|
68
|
+
onClose?: () => boolean | void;
|
69
|
+
/**
|
70
|
+
* Specifies whether the tearsheet is currently open.
|
71
|
+
*/
|
72
|
+
open?: boolean;
|
73
|
+
/**
|
74
|
+
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
75
|
+
*/
|
76
|
+
portalTarget?: ReactNode;
|
77
|
+
/**
|
78
|
+
* The main title of the tearsheet, displayed in the header area.
|
79
|
+
*/
|
80
|
+
title?: ReactNode;
|
81
|
+
/**
|
82
|
+
* **Deprecated**
|
83
|
+
*
|
84
|
+
* The position of the top of tearsheet in the viewport. The 'normal'
|
85
|
+
* position is a short distance down from the top of the
|
86
|
+
* viewport, leaving room at the top for a global header bar to show through
|
87
|
+
* from below. The 'lower' position (the default) provides a little extra room at the top
|
88
|
+
* to allow an action bar navigation or breadcrumbs to also show through.
|
89
|
+
*/
|
90
|
+
verticalPosition?: 'normal' | 'lower';
|
91
|
+
}
|
1
92
|
/**
|
2
93
|
* A narrow tearsheet is a slimmer variant of the tearsheet, providing a dialog
|
3
94
|
* that keeps users in-context and focused by bringing actionable content front
|
@@ -6,9 +97,17 @@
|
|
6
97
|
* A narrow tearsheet comprises 3 zones: a heading area including a title, the
|
7
98
|
* main content area, and a set of action buttons.
|
8
99
|
*/
|
9
|
-
export let TearsheetNarrow: React.ForwardRefExoticComponent<React.RefAttributes<
|
10
|
-
export
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
100
|
+
export declare let TearsheetNarrow: React.ForwardRefExoticComponent<TearsheetNarrowProps & React.RefAttributes<unknown>>;
|
101
|
+
export declare const deprecatedProps: {
|
102
|
+
/**
|
103
|
+
* **Deprecated**
|
104
|
+
*
|
105
|
+
* The position of the top of tearsheet in the viewport. The 'normal'
|
106
|
+
* position is a short distance down from the top of the
|
107
|
+
* viewport, leaving room at the top for a global header bar to show through
|
108
|
+
* from below. The 'lower' position (the default) provides a little extra room at the top
|
109
|
+
* to allow an action bar navigation or breadcrumbs to also show through.
|
110
|
+
*/
|
111
|
+
verticalPosition: PropTypes.Requireable<string>;
|
112
|
+
};
|
113
|
+
export {};
|
@@ -33,6 +33,7 @@ var defaults = {
|
|
33
33
|
* A narrow tearsheet comprises 3 zones: a heading area including a title, the
|
34
34
|
* main content area, and a set of action buttons.
|
35
35
|
*/
|
36
|
+
|
36
37
|
var TearsheetNarrow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
37
38
|
var _ref$verticalPosition = _ref.verticalPosition,
|
38
39
|
verticalPosition = _ref$verticalPosition === void 0 ? defaults.verticalPosition : _ref$verticalPosition,
|
@@ -83,7 +84,8 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
83
84
|
*
|
84
85
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
85
86
|
*/
|
86
|
-
actions: allPropTypes([
|
87
|
+
actions: allPropTypes([/**@ts-ignore */
|
88
|
+
ActionSet.validateActions(function () {
|
87
89
|
return 'lg';
|
88
90
|
}), PropTypes.arrayOf(PropTypes.shape(_objectSpread2(_objectSpread2({}, Button.propTypes), {}, {
|
89
91
|
kind: PropTypes.oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
|
@@ -107,6 +109,7 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
107
109
|
* **Note:** This prop is only required if a close icon is shown, i.e. if
|
108
110
|
* there are a no navigation actions and/or hasCloseIcon is true.
|
109
111
|
*/
|
112
|
+
/**@ts-ignore */
|
110
113
|
closeIconDescription: PropTypes.string.isRequired.if(function (_ref2) {
|
111
114
|
var actions = _ref2.actions,
|
112
115
|
hasCloseIcon = _ref2.hasCloseIcon;
|
@@ -122,6 +125,7 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
122
125
|
* the tearsheet is read-only or has no navigation actions (sometimes called
|
123
126
|
* a "passive tearsheet").
|
124
127
|
*/
|
128
|
+
/**@ts-ignore*/
|
125
129
|
hasCloseIcon: PropTypes.bool,
|
126
130
|
/**
|
127
131
|
* A label for the tearsheet, displayed in the header area of the tearsheet
|
@@ -142,6 +146,7 @@ TearsheetNarrow.propTypes = _objectSpread2({
|
|
142
146
|
/**
|
143
147
|
* The DOM element that the tearsheet should be rendered within. Defaults to document.body.
|
144
148
|
*/
|
149
|
+
/**@ts-ignore */
|
145
150
|
portalTarget: portalType,
|
146
151
|
/**
|
147
152
|
* The main title of the tearsheet, displayed in the header area.
|
@@ -1,6 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2022
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
6
7
|
import React from 'react';
|
8
|
+
declare const blockClass: string;
|
9
|
+
interface ToolbarProps {
|
10
|
+
/** Provide an optional class to be applied to the containing node */
|
11
|
+
className?: string;
|
12
|
+
/** Determines whether the `Toolbar` is rendered vertically */
|
13
|
+
vertical?: boolean;
|
14
|
+
}
|
15
|
+
interface ToolbarContextType {
|
16
|
+
vertical?: boolean;
|
17
|
+
}
|
18
|
+
declare const ToolbarContext: React.Context<ToolbarContextType>;
|
19
|
+
/** Toolbars are a collection of action items that organize a program’s interaction patterns into a series of closely related commands. */
|
20
|
+
declare let Toolbar: React.ForwardRefExoticComponent<ToolbarProps & {
|
21
|
+
children?: React.ReactNode;
|
22
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
23
|
+
declare const componentName = "Toolbar";
|
24
|
+
export { blockClass, componentName, Toolbar, ToolbarContext };
|
@@ -17,50 +17,54 @@ var _excluded = ["children", "className", "vertical"];
|
|
17
17
|
var checkComponentEnabled = pkg.checkComponentEnabled,
|
18
18
|
prefix = pkg.prefix;
|
19
19
|
var blockClass = "".concat(prefix, "--toolbar");
|
20
|
-
var ToolbarContext = /*#__PURE__*/createContext();
|
20
|
+
var ToolbarContext = /*#__PURE__*/createContext({});
|
21
21
|
|
22
22
|
/** Toolbars are a collection of action items that organize a program’s interaction patterns into a series of closely related commands. */
|
23
|
-
var Toolbar = /*#__PURE__*/forwardRef(function (
|
24
|
-
var children =
|
25
|
-
className =
|
26
|
-
vertical =
|
27
|
-
rest = _objectWithoutProperties(
|
23
|
+
var Toolbar = /*#__PURE__*/forwardRef(function (_ref, r) {
|
24
|
+
var children = _ref.children,
|
25
|
+
className = _ref.className,
|
26
|
+
vertical = _ref.vertical,
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
28
28
|
var focusableElements = useRef();
|
29
29
|
var getFocusableElements$1 = useCallback(function () {
|
30
30
|
return focusableElements.current;
|
31
31
|
}, [focusableElements]);
|
32
|
-
var
|
33
|
-
var ref = r ||
|
34
|
-
var _useState = useState(),
|
32
|
+
var localRef = useRef(null);
|
33
|
+
var ref = r || localRef;
|
34
|
+
var _useState = useState(-1),
|
35
35
|
_useState2 = _slicedToArray(_useState, 2),
|
36
36
|
focus = _useState2[0],
|
37
37
|
setFocus = _useState2[1];
|
38
38
|
useEffect(function () {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
var _getFocusableElements2;
|
40
|
+
focusableElements.current = getFocusableElements(ref === null || ref === void 0 ? void 0 : ref['current']);
|
41
|
+
focus !== -1 && ((_getFocusableElements2 = getFocusableElements$1()) === null || _getFocusableElements2 === void 0 ? void 0 : _getFocusableElements2.forEach(function (element, index) {
|
42
|
+
element[index !== focus ? 'setAttribute' : 'removeAttribute']('tabindex', '-1');
|
43
|
+
}));
|
43
44
|
});
|
44
45
|
useEffect(function () {
|
45
|
-
|
46
|
+
var _getFocusableElements3;
|
47
|
+
focus !== -1 && ((_getFocusableElements3 = getFocusableElements$1()) === null || _getFocusableElements3 === void 0 ? void 0 : _getFocusableElements3[focus].focus());
|
46
48
|
}, [focus, getFocusableElements$1]);
|
47
|
-
var
|
48
|
-
|
49
|
-
arrowNext =
|
50
|
-
arrowPrevious =
|
49
|
+
var _ref2 = !vertical ? ['ArrowRight', 'ArrowLeft'] : ['ArrowDown', 'ArrowUp'],
|
50
|
+
_ref3 = _slicedToArray(_ref2, 2),
|
51
|
+
arrowNext = _ref3[0],
|
52
|
+
arrowPrevious = _ref3[1];
|
51
53
|
function onArrowDown(increment) {
|
54
|
+
var _getFocusableElements4;
|
52
55
|
var nextFocus = focus + increment;
|
53
|
-
getFocusableElements$1()[nextFocus] && setFocus(nextFocus);
|
56
|
+
((_getFocusableElements4 = getFocusableElements$1()) === null || _getFocusableElements4 === void 0 ? void 0 : _getFocusableElements4[nextFocus]) && setFocus(nextFocus);
|
54
57
|
}
|
55
|
-
function onFocus(
|
56
|
-
var target =
|
58
|
+
function onFocus(_ref4) {
|
59
|
+
var target = _ref4.target;
|
57
60
|
var elements = getFocusableElements$1();
|
58
|
-
elements.includes(target) && setFocus(elements.indexOf(target));
|
61
|
+
(elements === null || elements === void 0 ? void 0 : elements.includes(target)) && setFocus(elements.indexOf(target));
|
59
62
|
}
|
60
|
-
function onKeyDown(
|
61
|
-
var
|
62
|
-
|
63
|
-
|
63
|
+
function onKeyDown(_ref5) {
|
64
|
+
var _getFocusableElements5;
|
65
|
+
var key = _ref5.key,
|
66
|
+
target = _ref5.target;
|
67
|
+
if ((_getFocusableElements5 = getFocusableElements$1()) !== null && _getFocusableElements5 !== void 0 && _getFocusableElements5.includes(target)) {
|
64
68
|
switch (key) {
|
65
69
|
case arrowNext:
|
66
70
|
onArrowDown(1);
|
@@ -1,7 +1,52 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
interface TruncatedListProps extends PropsWithChildren {
|
9
|
+
as?: React.ElementType | string;
|
10
|
+
/**
|
11
|
+
* Optional class name for expand/collapse button.
|
12
|
+
*/
|
13
|
+
buttonClassName?: string;
|
14
|
+
/**
|
15
|
+
* The contents of the TruncatedList.
|
16
|
+
*/
|
17
|
+
children: ReactNode;
|
18
|
+
/**
|
19
|
+
* Provide an optional class to be applied to the containing node.
|
20
|
+
*/
|
21
|
+
className?: string;
|
22
|
+
/**
|
23
|
+
* Number of items to render and display when the list is truncated and collapsed.
|
24
|
+
* Scrolling is not enabled when collapsed. The smallest number is 1.
|
25
|
+
*/
|
26
|
+
collapsedItemsLimit?: number;
|
27
|
+
/**
|
28
|
+
* Maximum number of items to show when the list is expanded. All
|
29
|
+
* items are rendered when the list is expanded. Scrolling is enabled
|
30
|
+
* if there are more items to display than this number.
|
31
|
+
*/
|
32
|
+
expandedItemsLimit?: number;
|
33
|
+
/**
|
34
|
+
* Optional callback reports the collapsed state of the list.
|
35
|
+
*/
|
36
|
+
onClick?: (value: any) => void;
|
37
|
+
/**
|
38
|
+
* Text label for when the list is expanded.
|
39
|
+
*/
|
40
|
+
viewLessLabel?: string;
|
41
|
+
/**
|
42
|
+
* Callback function for building the label when the list is collapsed.
|
43
|
+
*/
|
44
|
+
viewMoreLabel?: (value: any) => void;
|
45
|
+
}
|
1
46
|
/**
|
2
47
|
* The `TruncatedList` allows consumers to control how many items are
|
3
48
|
* revealed to the user while giving the user the ability to expand
|
4
49
|
* and see the entire list.
|
5
50
|
*/
|
6
|
-
export let TruncatedList: React.ForwardRefExoticComponent<React.RefAttributes<
|
7
|
-
|
51
|
+
export declare let TruncatedList: React.ForwardRefExoticComponent<TruncatedListProps & React.RefAttributes<HTMLDivElement>>;
|
52
|
+
export {};
|
@@ -28,7 +28,6 @@ var defaults = {
|
|
28
28
|
return "View more (".concat(value, ")");
|
29
29
|
}
|
30
30
|
};
|
31
|
-
|
32
31
|
/**
|
33
32
|
* The `TruncatedList` allows consumers to control how many items are
|
34
33
|
* revealed to the user while giving the user the ability to expand
|
@@ -84,13 +83,15 @@ var TruncatedList = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
84
83
|
// list is both collapsed and expanded.
|
85
84
|
useEffect(function () {
|
86
85
|
if (listRef && childrenArray.length > 0) {
|
86
|
+
var _listRef$current;
|
87
87
|
var numItemsToShow = isCollapsed ? minItems : maxItems;
|
88
|
-
var items = listRef.current.childNodes;
|
88
|
+
var items = (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.childNodes;
|
89
89
|
var _listHeight = 0;
|
90
90
|
for (var index = 0; index < numItemsToShow; index++) {
|
91
|
-
if (items[index]) {
|
91
|
+
if (items && items[index]) {
|
92
92
|
var _window;
|
93
|
-
var
|
93
|
+
var itemElement = items[index];
|
94
|
+
var height = ((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(itemElement)) === null || _window === void 0 ? void 0 : _window.height) || '16';
|
94
95
|
_listHeight += parseInt(height);
|
95
96
|
}
|
96
97
|
}
|
@@ -46,10 +46,12 @@ var componentName = 'UserAvatar';
|
|
46
46
|
|
47
47
|
var defaults = {
|
48
48
|
size: 'md',
|
49
|
-
tooltipAlignment: 'bottom'
|
49
|
+
tooltipAlignment: 'bottom',
|
50
|
+
backgroundColor: 'order-1-cyan'
|
50
51
|
};
|
51
52
|
var UserAvatar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
52
|
-
var backgroundColor = _ref.backgroundColor,
|
53
|
+
var _ref$backgroundColor = _ref.backgroundColor,
|
54
|
+
backgroundColor = _ref$backgroundColor === void 0 ? defaults.backgroundColor : _ref$backgroundColor,
|
53
55
|
className = _ref.className,
|
54
56
|
image = _ref.image,
|
55
57
|
imageDescription = _ref.imageDescription,
|
package/es/components/index.d.ts
CHANGED
@@ -51,7 +51,9 @@ export { StringFormatter } from "./StringFormatter";
|
|
51
51
|
export { UserAvatar } from "./UserAvatar";
|
52
52
|
export { ScrollGradient } from "./ScrollGradient";
|
53
53
|
export { StatusIndicator } from "./StatusIndicator";
|
54
|
+
export { TagOverflow } from "./TagOverflow";
|
54
55
|
export { ActionBar } from "./ActionBar";
|
56
|
+
export { ConditionBuilder } from "./ConditionBuilder";
|
55
57
|
export { ComboButton, ComboButtonItem } from "./ComboButton";
|
56
58
|
export { CreateFullPage, CreateFullPageStep } from "./CreateFullPage";
|
57
59
|
export { CreateTearsheet, CreateTearsheetStep, CreateTearsheetDivider } from "./CreateTearsheet";
|
@@ -60,9 +62,9 @@ export { HTTPError403, HTTPError404, HTTPErrorOther } from "./HTTPErrors";
|
|
60
62
|
export { Tearsheet, TearsheetNarrow } from "./Tearsheet";
|
61
63
|
export { Toolbar, ToolbarButton, ToolbarGroup } from "./Toolbar";
|
62
64
|
export { WebTerminal, WebTerminalContentWrapper, useWebTerminal, WebTerminalProvider } from "./WebTerminal";
|
63
|
-
export { Datagrid, useDatagrid, useInfiniteScroll, useNestedRows, useSelectRows, useExpandedRow, useOnRowClick, useSortableColumns, useRowIsMouseOver, useColumnCenterAlign, useColumnRightAlign, useDisableSelectRows, useStickyColumn, useActionsColumn, useCustomizeColumns, useSelectAllWithToggle, useColumnOrder, useInlineEdit, useFiltering, getAutoSizedColumnWidth, useFilterContext } from "./Datagrid";
|
65
|
+
export { Datagrid, useDatagrid, useInfiniteScroll, useNestedRows, useSelectRows, useExpandedRow, useOnRowClick, useSortableColumns, useRowIsMouseOver, useColumnCenterAlign, useColumnRightAlign, useDisableSelectRows, useStickyColumn, useActionsColumn, useCustomizeColumns, useSelectAllWithToggle, useColumnOrder, useInlineEdit, useFiltering, getAutoSizedColumnWidth, useFilterContext, useEditableCell } from "./Datagrid";
|
64
66
|
export { EditTearsheet, EditTearsheetForm } from "./EditTearsheet";
|
65
67
|
export { Guidebanner, GuidebannerElement, GuidebannerElementButton, GuidebannerElementLink } from "./Guidebanner";
|
66
68
|
export { InlineTip, InlineTipButton, InlineTipLink } from "./InlineTip";
|
67
69
|
export { DescriptionList, DescriptionListBody, DescriptionListCell, DescriptionListRow } from "./DescriptionList";
|
68
|
-
export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel } from "./FilterPanel";
|
70
|
+
export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel, FilterPanelSearch } from "./FilterPanel";
|
@@ -84,6 +84,7 @@ declare namespace defaults {
|
|
84
84
|
let StringFormatter: boolean;
|
85
85
|
let StatusIndicator: boolean;
|
86
86
|
let StatusIndicatorStep: boolean;
|
87
|
+
let TagOverflow: boolean;
|
87
88
|
let ActionBar: boolean;
|
88
89
|
let FilterPanel: boolean;
|
89
90
|
let FilterPanelAccordion: boolean;
|
@@ -92,6 +93,8 @@ declare namespace defaults {
|
|
92
93
|
let FilterPanelCheckboxWithOverflow: boolean;
|
93
94
|
let FilterPanelGroup: boolean;
|
94
95
|
let FilterPanelLabel: boolean;
|
96
|
+
let FilterPanelSearch: boolean;
|
97
|
+
let ConditionBuilder: boolean;
|
95
98
|
let Coachmark: boolean;
|
96
99
|
let CoachmarkBeacon: boolean;
|
97
100
|
let CoachmarkButton: boolean;
|
@@ -83,6 +83,7 @@ var defaults = {
|
|
83
83
|
StringFormatter: false,
|
84
84
|
StatusIndicator: false,
|
85
85
|
StatusIndicatorStep: false,
|
86
|
+
TagOverflow: false,
|
86
87
|
ActionBar: false,
|
87
88
|
FilterPanel: false,
|
88
89
|
FilterPanelAccordion: false,
|
@@ -91,6 +92,8 @@ var defaults = {
|
|
91
92
|
FilterPanelCheckboxWithOverflow: false,
|
92
93
|
FilterPanelGroup: false,
|
93
94
|
FilterPanelLabel: false,
|
95
|
+
FilterPanelSearch: false,
|
96
|
+
ConditionBuilder: false,
|
94
97
|
/* new component flags here - comment used by generate CLI */
|
95
98
|
|
96
99
|
// Novice to pro components not yet reviewed and released:
|
package/es/index.js
CHANGED
@@ -78,6 +78,7 @@ export { default as useInlineEdit } from './components/Datagrid/useInlineEdit.js
|
|
78
78
|
export { default as useFiltering } from './components/Datagrid/useFiltering.js';
|
79
79
|
export { getAutoSizedColumnWidth } from './components/Datagrid/utils/getAutoSizedColumnWidth.js';
|
80
80
|
export { default as useFilterContext } from './components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.js';
|
81
|
+
export { default as useEditableCell } from './components/Datagrid/useEditableCell.js';
|
81
82
|
export { EditTearsheet } from './components/EditTearsheet/EditTearsheet.js';
|
82
83
|
export { EditTearsheetForm } from './components/EditTearsheet/EditTearsheetForm.js';
|
83
84
|
export { EditTearsheetNarrow } from './components/EditTearsheetNarrow/EditTearsheetNarrow.js';
|
@@ -120,6 +121,7 @@ export { StringFormatter } from './components/StringFormatter/StringFormatter.js
|
|
120
121
|
export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
|
121
122
|
export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
|
122
123
|
export { StatusIndicator } from './components/StatusIndicator/StatusIndicator.js';
|
124
|
+
export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
|
123
125
|
export { ActionBar } from './components/ActionBar/ActionBar.js';
|
124
126
|
export { FilterPanel } from './components/FilterPanel/FilterPanel.js';
|
125
127
|
export { FilterPanelAccordion } from './components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js';
|
@@ -128,3 +130,5 @@ export { FilterPanelCheckbox } from './components/FilterPanel/FilterPanelCheckbo
|
|
128
130
|
export { FilterPanelCheckboxWithOverflow } from './components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js';
|
129
131
|
export { FilterPanelGroup } from './components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js';
|
130
132
|
export { FilterPanelLabel } from './components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js';
|
133
|
+
export { FilterPanelSearch } from './components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js';
|
134
|
+
export { ConditionBuilder } from './components/ConditionBuilder/ConditionBuilder.js';
|
package/es/settings.d.ts
CHANGED
@@ -70,6 +70,7 @@ export const pkg: {
|
|
70
70
|
StringFormatter: boolean;
|
71
71
|
StatusIndicator: boolean;
|
72
72
|
StatusIndicatorStep: boolean;
|
73
|
+
TagOverflow: boolean;
|
73
74
|
ActionBar: boolean;
|
74
75
|
FilterPanel: boolean;
|
75
76
|
FilterPanelAccordion: boolean;
|
@@ -78,6 +79,8 @@ export const pkg: {
|
|
78
79
|
FilterPanelCheckboxWithOverflow: boolean;
|
79
80
|
FilterPanelGroup: boolean;
|
80
81
|
FilterPanelLabel: boolean;
|
82
|
+
FilterPanelSearch: boolean;
|
83
|
+
ConditionBuilder: boolean;
|
81
84
|
Coachmark: boolean;
|
82
85
|
CoachmarkBeacon: boolean;
|
83
86
|
CoachmarkButton: boolean;
|
@@ -1,3 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
/// <reference path="../../../src/custom-typings/index.d.ts" />
|
8
|
+
import React from 'react';
|
9
|
+
import { ButtonProps } from '@carbon/react';
|
10
|
+
export declare const ButtonSizes: readonly ["sm", "md", "lg", "xl", "2xl"];
|
11
|
+
export type ButtonSize = (typeof ButtonSizes)[number];
|
12
|
+
interface ActionSetProps {
|
13
|
+
/**
|
14
|
+
* The action buttons to show. Each action is specified as an object
|
15
|
+
* representation of a Carbon button.
|
16
|
+
*
|
17
|
+
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
18
|
+
*/
|
19
|
+
actions: ButtonProps[];
|
20
|
+
/**
|
21
|
+
* The size of buttons to use for the actions. The allowed values are
|
22
|
+
* those for the size prop of carbon Button. If this prop is specified, all
|
23
|
+
* the buttons will be set to this size, overriding any 'size' values (if any)
|
24
|
+
* supplied in the actions array (if any).
|
25
|
+
*/
|
26
|
+
buttonSize?: ButtonSize;
|
27
|
+
/**
|
28
|
+
* An optional class or classes to be added to the outermost element.
|
29
|
+
*/
|
30
|
+
className?: string;
|
31
|
+
/**
|
32
|
+
* The size of the action set. Different button arrangements are used at
|
33
|
+
* different sizes, to make best use of the available space.
|
34
|
+
*/
|
35
|
+
size?: ButtonSize;
|
36
|
+
}
|
1
37
|
/**
|
2
38
|
* An ActionSet presents a set of action buttons, constructed from bundles
|
3
39
|
* of prop values and applying some layout rules. When the size is 'sm'
|
@@ -10,5 +46,5 @@
|
|
10
46
|
* it appears at the left side. If there is a primary button it appears at the
|
11
47
|
* right.
|
12
48
|
*/
|
13
|
-
export const ActionSet: React.ForwardRefExoticComponent<React.RefAttributes<
|
14
|
-
|
49
|
+
export declare const ActionSet: React.ForwardRefExoticComponent<ActionSetProps & React.RefAttributes<HTMLDivElement>>;
|
50
|
+
export {};
|
@@ -27,9 +27,6 @@ var _excluded = ["className", "disabled", "kind", "label", "loading", "isExpress
|
|
27
27
|
_excluded2 = ["actions", "buttonSize", "className", "size"];
|
28
28
|
var blockClass = "".concat(settings.pkg.prefix, "--action-set");
|
29
29
|
var componentName = 'ActionSet';
|
30
|
-
|
31
|
-
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
32
|
-
|
33
30
|
var ActionSetButton = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
34
31
|
var className = _ref.className,
|
35
32
|
disabled = _ref.disabled,
|
@@ -62,7 +59,6 @@ var willStack = function willStack(size, numberOfActions) {
|
|
62
59
|
var defaults = {
|
63
60
|
size: 'md'
|
64
61
|
};
|
65
|
-
|
66
62
|
/**
|
67
63
|
* An ActionSet presents a set of action buttons, constructed from bundles
|
68
64
|
* of prop values and applying some layout rules. When the size is 'sm'
|
@@ -133,6 +129,7 @@ ActionSet.displayName = componentName;
|
|
133
129
|
* @returns null if the actions meet the requirements, or an Error object with
|
134
130
|
* an explanatory message.
|
135
131
|
*/
|
132
|
+
/**@ts-ignore*/
|
136
133
|
ActionSet.validateActions = function (sizeFn) {
|
137
134
|
return function (props, propName, componentName, location, propFullName) {
|
138
135
|
var name = propFullName || propName;
|
@@ -175,7 +172,8 @@ ActionSet.propTypes = {
|
|
175
172
|
*
|
176
173
|
* See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
|
177
174
|
*/
|
178
|
-
actions: propsHelper.allPropTypes([
|
175
|
+
actions: propsHelper.allPropTypes([/**@ts-ignore*/
|
176
|
+
ActionSet.validateActions(), index["default"].arrayOf(index["default"].shape(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, react.Button.propTypes), {}, {
|
179
177
|
kind: index["default"].oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
|
180
178
|
label: index["default"].string,
|
181
179
|
loading: index["default"].bool,
|
@@ -1,23 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
export
|
5
|
-
|
6
|
-
let FLOATING: string;
|
7
|
-
let FIXED: string;
|
8
|
-
let STACKED: string;
|
9
|
-
}
|
10
|
-
export namespace COACHMARK_ALIGNMENT {
|
11
|
-
let BOTTOM: string;
|
12
|
-
let BOTTOM_LEFT: string;
|
13
|
-
let BOTTOM_RIGHT: string;
|
14
|
-
let LEFT: string;
|
15
|
-
let LEFT_TOP: string;
|
16
|
-
let LEFT_BOTTOM: string;
|
17
|
-
let RIGHT: string;
|
18
|
-
let RIGHT_TOP: string;
|
19
|
-
let RIGHT_BOTTOM: string;
|
20
|
-
let TOP: string;
|
21
|
-
let TOP_LEFT: string;
|
22
|
-
let TOP_RIGHT: string;
|
1
|
+
/**
|
2
|
+
* Reserved for future expansion, i.e. "RING".
|
3
|
+
*/
|
4
|
+
export declare enum BEACON_KIND {
|
5
|
+
DEFAULT = "default"
|
23
6
|
}
|
7
|
+
/**
|
8
|
+
* Describes the style and behavior of a Coachmark.
|
9
|
+
* @param TOOLTIP includes a caret pointing to the animated beacon.
|
10
|
+
* @param FLOATING includes a drag handle across the top.
|
11
|
+
* @param FIXED is fixed to the bottom-right of the viewport.
|
12
|
+
* @param STACKED is fixed to the bottom-right of the viewport, includes links to show more, stackable Coachmarks if included.
|
13
|
+
*/
|
14
|
+
export declare const COACHMARK_OVERLAY_KIND: {
|
15
|
+
TOOLTIP: string;
|
16
|
+
FLOATING: string;
|
17
|
+
FIXED: string;
|
18
|
+
STACKED: string;
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* Where to render the Coachmark relative to its target.
|
22
|
+
* Applies only to Floating and Tooltip Coachmarks.
|
23
|
+
*/
|
24
|
+
export declare const COACHMARK_ALIGNMENT: {
|
25
|
+
BOTTOM: string;
|
26
|
+
BOTTOM_LEFT: string;
|
27
|
+
BOTTOM_RIGHT: string;
|
28
|
+
LEFT: string;
|
29
|
+
LEFT_TOP: string;
|
30
|
+
LEFT_BOTTOM: string;
|
31
|
+
RIGHT: string;
|
32
|
+
RIGHT_TOP: string;
|
33
|
+
RIGHT_BOTTOM: string;
|
34
|
+
TOP: string;
|
35
|
+
TOP_LEFT: string;
|
36
|
+
TOP_RIGHT: string;
|
37
|
+
};
|
@@ -1,5 +1,29 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Copyright IBM Corp. 2023, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
3
6
|
*/
|
4
|
-
export let CoachmarkBeacon: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
7
|
import React from 'react';
|
8
|
+
import { BEACON_KIND } from '../Coachmark';
|
9
|
+
interface CoachmarkBeaconProps {
|
10
|
+
/**
|
11
|
+
* Optional class name for this component.
|
12
|
+
*/
|
13
|
+
className?: string;
|
14
|
+
/**
|
15
|
+
* What style of beacon.
|
16
|
+
* BEACON_KIND is an exported enum from the Coachmark and can be used for this value.
|
17
|
+
* @see {@link BEACON_KIND}
|
18
|
+
*/
|
19
|
+
kind?: BEACON_KIND;
|
20
|
+
/**
|
21
|
+
* The aria label.
|
22
|
+
*/
|
23
|
+
label: string;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Use beacon for the target prop of a Coachmark component.
|
27
|
+
*/
|
28
|
+
export declare let CoachmarkBeacon: React.ForwardRefExoticComponent<CoachmarkBeaconProps & React.RefAttributes<HTMLDivElement>>;
|
29
|
+
export {};
|