carbon-addons-iot-react 2.70.0 → 2.72.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/carbon-addons-iot-react.css +43 -10
- package/css/carbon-addons-iot-react.css.map +1 -1
- package/es/node_modules/carbon-components-react/es/components/UIShell/Content.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/Header.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderGlobalAction.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderMenu.js +3 -3
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderMenuButton.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderName.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderNavigation.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderPanel.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/HeaderSideNavItems.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNav.js +3 -3
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavDetails.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavFooter.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavHeader.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavIcon.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavItem.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavItems.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavLink.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavLinkText.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavMenu.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavMenuItem.js +3 -3
- package/es/node_modules/carbon-components-react/es/components/UIShell/SideNavSwitcher.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SkipToContent.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/Switcher.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SwitcherDivider.js +2 -2
- package/es/node_modules/carbon-components-react/es/components/UIShell/SwitcherItem.js +3 -3
- package/es/node_modules/carbon-components-react/es/tools/wrapComponent.js +2 -2
- package/es/src/components/Accordion/AccordionItemDefer.jsx +52 -0
- package/es/src/components/AddCard/AddCard.jsx +2 -2
- package/es/src/components/BarChartCard/BarChartCard.jsx +2 -2
- package/es/src/components/Breadcrumb/Breadcrumb.jsx +5 -5
- package/es/src/components/Button/Button.jsx +2 -2
- package/es/src/components/Card/Card.jsx +5 -5
- package/es/src/components/Card/CardRangePicker.jsx +3 -3
- package/es/src/components/Card/CardToolbar.jsx +4 -4
- package/es/src/components/Card/DataStateRenderer.jsx +3 -3
- package/es/src/components/ComposedModal/ComposedModal.jsx +3 -3
- package/es/src/components/ComposedStructuredList/ComposedStructuredList.jsx +1 -1
- package/es/src/components/Dashboard/CardRenderer.jsx +1 -1
- package/es/src/components/Dashboard/Dashboard.jsx +1 -1
- package/es/src/components/Dashboard/DashboardGrid.jsx +1 -1
- package/es/src/components/DateTimePicker/DateTimePicker.jsx +5 -5
- package/es/src/components/GaugeCard/GaugeCard.jsx +17 -20
- package/es/src/components/Header/HeaderAction/HeaderAction.jsx +1 -1
- package/es/src/components/Header/HeaderAction/HeaderActionMenu.jsx +3 -3
- package/es/src/components/Header/HeaderAction/HeaderActionPanel.jsx +3 -3
- package/es/src/components/Hero/Hero.jsx +1 -1
- package/es/src/components/IconSwitch/IconSwitch.jsx +2 -2
- package/es/src/components/ImageCard/CardIcon.jsx +1 -1
- package/es/src/components/ImageCard/ImageHotspots.jsx +1 -1
- package/es/src/components/List/HierarchyList/HierarchyList.jsx +1 -1
- package/es/src/components/List/List.jsx +3 -3
- package/es/src/components/List/ListItem/ListItem.jsx +7 -7
- package/es/src/components/List/SimpleList/SimpleList.jsx +1 -1
- package/es/src/components/ListCard/ListCard.jsx +2 -2
- package/es/src/components/Page/EditPage.jsx +2 -2
- package/es/src/components/PageTitleBar/PageTitleBar.jsx +3 -3
- package/es/src/components/PageWizard/PageWizard.jsx +2 -2
- package/es/src/components/PageWizard/StatefulPageWizard.jsx +1 -1
- package/es/src/components/ProgressIndicator/ProgressIndicator.jsx +2 -2
- package/es/src/components/SideNav/SideNav.jsx +2 -2
- package/es/src/components/Table/Pagination.jsx +2 -2
- package/es/src/components/Table/StatefulTable.jsx +1 -1
- package/es/src/components/Table/Table.jsx +4 -4
- package/es/src/components/Table/TableBody/RowActionsCell/RowActionsCell.jsx +7 -14
- package/es/src/components/Table/TableBody/TableBodyRow/TableBodyRow.jsx +4 -4
- package/es/src/components/Table/TableCellRenderer/TableCellRenderer.jsx +2 -2
- package/es/src/components/Table/TableHead/ColumnHeaderRow/ColumnHeaderRow.jsx +1 -1
- package/es/src/components/Table/TableHead/ColumnHeaderSelect/ColumnHeaderSelect.jsx +2 -2
- package/es/src/components/Table/TableHead/ColumnResize.jsx +2 -2
- package/es/src/components/Table/TableHead/TableHead.jsx +6 -6
- package/es/src/components/Table/TableHead/TableHeader.js +3 -3
- package/es/src/components/Table/TableToolbar/TableToolbar.jsx +3 -3
- package/es/src/components/Table/TableToolbarSearch/TableToolbarSearch.jsx +3 -3
- package/es/src/components/Table/baseTableReducer.js +1 -1
- package/es/src/components/Table/tableReducer.js +1 -1
- package/es/src/components/TileCatalog/StatefulTileCatalog.jsx +1 -1
- package/es/src/components/TileCatalog/TileCatalog.jsx +2 -2
- package/es/src/components/TileCatalog/TileGroup.jsx +2 -2
- package/es/src/components/TileCatalogNew/TileCatalogNew.jsx +1 -1
- package/es/src/components/TileCatalogNew/TilePagination/TilePagination.jsx +5 -5
- package/es/src/components/TileGallery/StatefulTileGallery.jsx +1 -1
- package/es/src/components/TimePickerSpinner/TimePickerSpinner.jsx +4 -4
- package/es/src/components/ValueCard/Attribute.jsx +4 -4
- package/es/src/components/ValueCard/UnitRenderer.jsx +2 -2
- package/es/src/components/ValueCard/ValueRenderer.jsx +2 -2
- package/es/src/components/WizardInline/StatefulWizardInline.jsx +1 -1
- package/es/src/components/WizardInline/WizardHeader/WizardHeader.jsx +1 -1
- package/es/src/components/WizardModal/WizardModal.jsx +2 -2
- package/es/src/index.js +4 -5
- package/es/src/internal/deprecate.js +1 -1
- package/es/src/utils/cardUtilityFunctions.js +1 -1
- package/lib/css/carbon-addons-iot-react.css +43 -10
- package/lib/css/carbon-addons-iot-react.css.map +1 -1
- package/lib/node_modules/@carbon/charts-react/bar-chart-grouped.js +2 -2
- package/lib/node_modules/@carbon/charts-react/bar-chart-simple.js +2 -2
- package/lib/node_modules/@carbon/charts-react/bar-chart-stacked.js +2 -2
- package/lib/node_modules/@carbon/charts-react/line-chart.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/Content.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/Header.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderGlobalAction.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderMenu.js +8 -8
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderMenuButton.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderMenuItem.js +3 -3
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderName.js +5 -5
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderNavigation.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderPanel.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/HeaderSideNavItems.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNav.js +5 -5
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavDetails.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavFooter.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavHeader.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavIcon.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavItem.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavItems.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavLink.js +11 -11
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavLinkText.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavMenu.js +8 -8
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavMenuItem.js +7 -7
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SideNavSwitcher.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SkipToContent.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/Switcher.js +4 -4
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SwitcherDivider.js +2 -2
- package/lib/node_modules/carbon-components-react/es/components/UIShell/SwitcherItem.js +7 -7
- package/lib/node_modules/carbon-components-react/es/prop-types/AriaPropTypes.js +2 -2
- package/lib/node_modules/carbon-components-react/es/tools/wrapComponent.js +2 -2
- package/lib/scss/components/GaugeCard/_gauge-card.scss +33 -6
- package/lib/scss/components/Table/TableBody/RowActionsCell/_row-actions-cell.scss +25 -2
- package/lib/scss/components/TextInput/_text-input.scss +4 -0
- package/lib/src/components/Accordion/AccordionItemDefer.jsx +57 -0
- package/lib/src/components/AddCard/AddCard.jsx +2 -2
- package/lib/src/components/BarChartCard/BarChartCard.jsx +22 -22
- package/lib/src/components/Breadcrumb/Breadcrumb.jsx +7 -7
- package/lib/src/components/Button/Button.jsx +4 -4
- package/lib/src/components/Card/Card.jsx +32 -32
- package/lib/src/components/Card/CardRangePicker.jsx +5 -5
- package/lib/src/components/Card/CardToolbar.jsx +13 -13
- package/lib/src/components/Card/DataStateRenderer.jsx +14 -14
- package/lib/src/components/ComposedModal/ComposedModal.jsx +10 -10
- package/lib/src/components/ComposedStructuredList/ComposedStructuredList.jsx +5 -5
- package/lib/src/components/Dashboard/CardRenderer.jsx +23 -23
- package/lib/src/components/Dashboard/Dashboard.jsx +8 -8
- package/lib/src/components/Dashboard/DashboardGrid.jsx +22 -22
- package/lib/src/components/Dashboard/DashboardHeader.jsx +5 -5
- package/lib/src/components/DateTimePicker/DateTimePicker.jsx +9 -9
- package/lib/src/components/FileDrop/FileDrop.jsx +2 -2
- package/lib/src/components/GaugeCard/GaugeCard.jsx +26 -29
- package/lib/src/components/Header/Header.jsx +12 -12
- package/lib/src/components/Header/HeaderAction/HeaderAction.jsx +11 -11
- package/lib/src/components/Header/HeaderAction/HeaderActionMenu.jsx +9 -9
- package/lib/src/components/Header/HeaderAction/HeaderActionPanel.jsx +10 -10
- package/lib/src/components/Header/HeaderActionGroup.jsx +6 -6
- package/lib/src/components/Hero/Hero.jsx +3 -3
- package/lib/src/components/IconSwitch/IconSwitch.jsx +2 -2
- package/lib/src/components/ImageCard/CardIcon.jsx +5 -5
- package/lib/src/components/ImageCard/Hotspot.jsx +2 -2
- package/lib/src/components/ImageCard/ImageCard.jsx +12 -12
- package/lib/src/components/ImageCard/ImageControls.jsx +3 -3
- package/lib/src/components/ImageCard/ImageHotspots.jsx +6 -6
- package/lib/src/components/List/HierarchyList/HierarchyList.jsx +6 -6
- package/lib/src/components/List/HierarchyList/index.js +2 -2
- package/lib/src/components/List/List.jsx +10 -10
- package/lib/src/components/List/ListItem/ListItem.jsx +7 -7
- package/lib/src/components/List/SimpleList/SimpleList.jsx +3 -3
- package/lib/src/components/ListCard/ListCard.jsx +9 -9
- package/lib/src/components/NavigationBar/NavigationBar.jsx +5 -5
- package/lib/src/components/Page/EditPage.jsx +9 -9
- package/lib/src/components/Page/PageHero.jsx +9 -9
- package/lib/src/components/Page/PageTitle.jsx +2 -2
- package/lib/src/components/PageTitleBar/PageTitleBar.jsx +8 -8
- package/lib/src/components/PageWizard/PageWizard.jsx +2 -2
- package/lib/src/components/PageWizard/PageWizardStep/PageWizardStep.jsx +7 -7
- package/lib/src/components/PageWizard/PageWizardStep/PageWizardStepContent.jsx +2 -2
- package/lib/src/components/PageWizard/PageWizardStep/PageWizardStepDescription.jsx +2 -2
- package/lib/src/components/PageWizard/PageWizardStep/PageWizardStepExtraContent.jsx +2 -2
- package/lib/src/components/PageWizard/PageWizardStep/PageWizardStepTitle.jsx +2 -2
- package/lib/src/components/PageWizard/StatefulPageWizard.jsx +4 -4
- package/lib/src/components/ProgressIndicator/ProgressIndicator.jsx +2 -2
- package/lib/src/components/ResourceList/ResourceList.jsx +2 -2
- package/lib/src/components/SideNav/SideNav.jsx +12 -12
- package/lib/src/components/SimplePagination/SimplePagination.jsx +7 -7
- package/lib/src/components/Table/EmptyTable/EmptyTable.jsx +4 -4
- package/lib/src/components/Table/Pagination.jsx +2 -2
- package/lib/src/components/Table/StatefulTable.jsx +25 -25
- package/lib/src/components/Table/Table.jsx +38 -38
- package/lib/src/components/Table/TableBody/RowActionsCell/RowActionsCell.jsx +14 -21
- package/lib/src/components/Table/TableBody/RowActionsCell/RowActionsError.jsx +4 -4
- package/lib/src/components/Table/TableBody/TableBody.jsx +7 -7
- package/lib/src/components/Table/TableBody/TableBodyRow/TableBodyRow.jsx +24 -24
- package/lib/src/components/Table/TableCellRenderer/TableCellRenderer.jsx +2 -2
- package/lib/src/components/Table/TableHead/ColumnHeaderRow/ColumnHeaderRow.jsx +7 -7
- package/lib/src/components/Table/TableHead/ColumnHeaderSelect/ColumnHeaderSelect.jsx +4 -4
- package/lib/src/components/Table/TableHead/ColumnResize.jsx +6 -6
- package/lib/src/components/Table/TableHead/FilterHeaderRow/FilterHeaderRow.jsx +7 -7
- package/lib/src/components/Table/TableHead/TableHead.jsx +30 -30
- package/lib/src/components/Table/TableHead/TableHeader.js +3 -3
- package/lib/src/components/Table/TablePropTypes.js +2 -2
- package/lib/src/components/Table/TableSkeletonWithHeaders/TableSkeletonWithHeaders.jsx +2 -2
- package/lib/src/components/Table/TableToolbar/TableToolbar.jsx +17 -17
- package/lib/src/components/Table/TableToolbarSearch/TableToolbarSearch.jsx +3 -3
- package/lib/src/components/Table/baseTableReducer.js +18 -18
- package/lib/src/components/Table/tableReducer.js +34 -34
- package/lib/src/components/TableCard/TableCard.jsx +26 -26
- package/lib/src/components/TableCard/ThresholdIcon.jsx +2 -2
- package/lib/src/components/TileCatalog/StatefulTileCatalog.jsx +12 -12
- package/lib/src/components/TileCatalog/TileCatalog.jsx +8 -8
- package/lib/src/components/TileCatalog/TileGroup.jsx +2 -2
- package/lib/src/components/TileCatalog/tileCatalogReducer.js +3 -3
- package/lib/src/components/TileCatalogNew/TileCatalogNew.jsx +3 -3
- package/lib/src/components/TileCatalogNew/TilePagination/TilePagination.jsx +5 -5
- package/lib/src/components/TileGallery/StatefulTileGallery.jsx +17 -17
- package/lib/src/components/TileGallery/TileGallery.jsx +2 -2
- package/lib/src/components/TimePickerSpinner/TimePickerSpinner.jsx +12 -12
- package/lib/src/components/TimeSeriesCard/TimeSeriesCard.jsx +35 -35
- package/lib/src/components/ValueCard/Attribute.jsx +19 -19
- package/lib/src/components/ValueCard/UnitRenderer.jsx +4 -4
- package/lib/src/components/ValueCard/ValueCard.jsx +52 -52
- package/lib/src/components/ValueCard/ValueRenderer.jsx +12 -12
- package/lib/src/components/WizardInline/StatefulWizardInline.jsx +5 -5
- package/lib/src/components/WizardInline/WizardFooter/WizardFooter.jsx +5 -5
- package/lib/src/components/WizardInline/WizardHeader/WizardHeader.jsx +7 -7
- package/lib/src/components/WizardInline/WizardInline.jsx +14 -14
- package/lib/src/components/WizardModal/WizardModal.jsx +8 -8
- package/lib/src/constants/CardPropTypes.js +14 -14
- package/lib/src/index.js +144 -144
- package/lib/src/internal/deprecate.js +1 -1
- package/lib/src/utils/cardUtilityFunctions.js +10 -10
- package/lib/src/utils/componentUtilityFunctions.js +13 -13
- package/package.json +1 -1
- package/scss/components/GaugeCard/_gauge-card.scss +33 -6
- package/scss/components/Table/TableBody/RowActionsCell/_row-actions-cell.scss +25 -2
- package/scss/components/TextInput/_text-input.scss +4 -0
- package/umd/carbon-addons-iot-react.js +797 -1424
- package/es/node_modules/carbon-components-react/es/components/Accordion/Accordion.Skeleton.js +0 -96
- package/es/node_modules/carbon-components-react/es/components/Accordion/Accordion.js +0 -45
- package/es/node_modules/carbon-components-react/es/components/Accordion/AccordionItem.js +0 -163
- package/es/node_modules/carbon-components-react/es/components/SkeletonText/SkeletonText.js +0 -111
- package/es/node_modules/carbon-components-react/es/prop-types/deprecate.js +0 -30
- package/es/src/components/Accordion/AccordionItem.jsx +0 -180
- package/lib/node_modules/carbon-components-react/es/components/Accordion/Accordion.Skeleton.js +0 -101
- package/lib/node_modules/carbon-components-react/es/components/Accordion/Accordion.js +0 -50
- package/lib/node_modules/carbon-components-react/es/components/Accordion/AccordionItem.js +0 -168
- package/lib/node_modules/carbon-components-react/es/components/SkeletonText/SkeletonText.js +0 -116
- package/lib/node_modules/carbon-components-react/es/prop-types/deprecate.js +0 -34
- package/lib/src/components/Accordion/AccordionItem.jsx +0 -185
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -20,7 +20,7 @@ var Content = function Content(_ref) {
|
|
|
20
20
|
tagName = _ref.tagName,
|
|
21
21
|
rest = _objectWithoutProperties(_ref, ["className", "children", "tagName"]);
|
|
22
22
|
|
|
23
|
-
var className =
|
|
23
|
+
var className = classnames("".concat(prefix, "--content"), customClassName);
|
|
24
24
|
return React.createElement(tagName, _objectSpread({}, rest, {
|
|
25
25
|
className: className
|
|
26
26
|
}), children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ var Header = function Header(_ref) {
|
|
|
22
22
|
children = _ref.children,
|
|
23
23
|
rest = _objectWithoutProperties(_ref, ["className", "children"]);
|
|
24
24
|
|
|
25
|
-
var className =
|
|
25
|
+
var className = classnames("".concat(prefix, "--header"), customClassName);
|
|
26
26
|
return React.createElement("header", _extends({}, rest, {
|
|
27
27
|
className: className
|
|
28
28
|
}), children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@ var HeaderGlobalAction = React.forwardRef(function HeaderGlobalAction(_ref, ref)
|
|
|
36
36
|
isActive = _ref.isActive,
|
|
37
37
|
rest = _objectWithoutProperties(_ref, ["aria-label", "aria-labelledby", "children", "className", "onClick", "isActive"]);
|
|
38
38
|
|
|
39
|
-
var className =
|
|
39
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, customClassName, !!customClassName), _defineProperty(_cx, "".concat(prefix, "--header__action"), true), _defineProperty(_cx, "".concat(prefix, "--header__action--active"), isActive), _cx));
|
|
40
40
|
var accessibilityLabel = {
|
|
41
41
|
'aria-label': ariaLabel,
|
|
42
42
|
'aria-labelledby': ariaLabelledBy
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { ChevronDown16 } from '@carbon/icons-react';
|
|
6
|
+
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
7
|
import { Enter, Space, Escape } from '../../internal/keyboard/keys.js';
|
|
7
8
|
import { matches } from '../../internal/keyboard/match.js';
|
|
8
9
|
import '../../internal/keyboard/navigation.js';
|
|
9
|
-
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
|
|
@@ -180,7 +180,7 @@ function (_React$Component) {
|
|
|
180
180
|
'aria-label': ariaLabel,
|
|
181
181
|
'aria-labelledby': ariaLabelledBy
|
|
182
182
|
};
|
|
183
|
-
var className =
|
|
183
|
+
var className = classnames("".concat(prefix, "--header__submenu"), customClassName); // Notes on eslint comments and based on the examples in:
|
|
184
184
|
// https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html#
|
|
185
185
|
// - The focus is handled by the <a> menuitem, onMouseOver is for mouse
|
|
186
186
|
// users
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { Close20, Menu20 } from '@carbon/icons-react';
|
|
6
6
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
@@ -29,7 +29,7 @@ var HeaderMenuButton = function HeaderMenuButton(_ref) {
|
|
|
29
29
|
isCollapsible = _ref.isCollapsible,
|
|
30
30
|
rest = _objectWithoutProperties(_ref, ["aria-label", "aria-labelledby", "className", "onClick", "isActive", "isCollapsible"]);
|
|
31
31
|
|
|
32
|
-
var className =
|
|
32
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, customClassName, !!customClassName), _defineProperty(_cx, "".concat(prefix, "--header__action"), true), _defineProperty(_cx, "".concat(prefix, "--header__menu-trigger"), true), _defineProperty(_cx, "".concat(prefix, "--header__action--active"), isActive), _defineProperty(_cx, "".concat(prefix, "--header__menu-toggle"), true), _defineProperty(_cx, "".concat(prefix, "--header__menu-toggle__hidden"), !isCollapsible), _cx));
|
|
33
33
|
var accessibilityLabel = {
|
|
34
34
|
'aria-label': ariaLabel,
|
|
35
35
|
'aria-labelledby': ariaLabelledBy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import Link, { LinkPropTypes } from './Link.js';
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ var HeaderName = function HeaderName(_ref) {
|
|
|
24
24
|
href = _ref.href,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, ["children", "className", "prefix", "href"]);
|
|
26
26
|
|
|
27
|
-
var className =
|
|
27
|
+
var className = classnames("".concat(selectorPrefix, "--header__name"), customClassName);
|
|
28
28
|
return React.createElement(Link, _extends({}, rest, {
|
|
29
29
|
className: className,
|
|
30
30
|
href: href
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -83,7 +83,7 @@ function (_React$Component) {
|
|
|
83
83
|
customClassName = _this$props.className,
|
|
84
84
|
rest = _objectWithoutProperties(_this$props, ["aria-label", "aria-labelledby", "children", "className"]);
|
|
85
85
|
|
|
86
|
-
var className =
|
|
86
|
+
var className = classnames("".concat(prefix, "--header__nav"), customClassName); // Assign both label strategies in this option, only one should be defined
|
|
87
87
|
// so when we spread that should be the one that is applied to the node
|
|
88
88
|
|
|
89
89
|
var accessibilityLabel = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -30,7 +30,7 @@ var HeaderPanel = React.forwardRef(function HeaderPanel(_ref, ref) {
|
|
|
30
30
|
'aria-label': ariaLabel,
|
|
31
31
|
'aria-labelledby': ariaLabelledBy
|
|
32
32
|
};
|
|
33
|
-
var className =
|
|
33
|
+
var className = classnames("".concat(prefix, "--header-panel"), (_cx = {}, _defineProperty(_cx, "".concat(prefix, "--header-panel--expanded"), expanded), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
34
34
|
return React.createElement("div", _extends({}, other, {
|
|
35
35
|
className: className
|
|
36
36
|
}, accessibilityLabel, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -12,7 +12,7 @@ var HeaderSideNavItems = function HeaderSideNavItems(_ref) {
|
|
|
12
12
|
var customClassName = _ref.className,
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
hasDivider = _ref.hasDivider;
|
|
15
|
-
var className =
|
|
15
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__header-navigation"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__header-divider"), hasDivider), _cx), customClassName);
|
|
16
16
|
return React.createElement("div", {
|
|
17
17
|
className: className
|
|
18
18
|
}, children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React, { useRef, useState } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -78,8 +78,8 @@ var SideNav = React.forwardRef(function SideNav(props, ref) {
|
|
|
78
78
|
// ? t('carbon.sidenav.state.open')
|
|
79
79
|
// : t('carbon.sidenav.state.closed');
|
|
80
80
|
|
|
81
|
-
var className =
|
|
82
|
-
var overlayClassName =
|
|
81
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav--expanded"), expanded || expandedViaHoverState), _defineProperty(_cx, "".concat(prefix, "--side-nav--collapsed"), !expanded && isFixedNav), _defineProperty(_cx, "".concat(prefix, "--side-nav--rail"), isRail), _defineProperty(_cx, customClassName, !!customClassName), _defineProperty(_cx, "".concat(prefix, "--side-nav--ux"), isChildOfHeader), _defineProperty(_cx, "".concat(prefix, "--side-nav--hidden"), !isPersistent), _cx));
|
|
82
|
+
var overlayClassName = classnames((_cx2 = {}, _defineProperty(_cx2, "".concat(prefix, "--side-nav__overlay"), true), _defineProperty(_cx2, "".concat(prefix, "--side-nav__overlay-active"), expanded), _cx2));
|
|
83
83
|
var childrenToRender = children; // if a rail, pass the expansion state as a prop, so children can update themselves to match
|
|
84
84
|
|
|
85
85
|
if (isRail) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -15,7 +15,7 @@ var SideNavDetails = function SideNavDetails(_ref) {
|
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
customClassName = _ref.className,
|
|
17
17
|
title = _ref.title;
|
|
18
|
-
var className =
|
|
18
|
+
var className = classnames("".concat(prefix, "--side-nav__details"), customClassName);
|
|
19
19
|
return React.createElement("div", {
|
|
20
20
|
className: className
|
|
21
21
|
}, React.createElement("h2", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { Close20, ChevronRight20 } from '@carbon/icons-react';
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ var SideNavFooter = function SideNavFooter(_ref) {
|
|
|
22
22
|
customClassName = _ref.className,
|
|
23
23
|
expanded = _ref.expanded,
|
|
24
24
|
onToggle = _ref.onToggle;
|
|
25
|
-
var className =
|
|
25
|
+
var className = classnames("".concat(prefix, "--side-nav__footer"), customClassName);
|
|
26
26
|
return React.createElement("footer", {
|
|
27
27
|
className: className
|
|
28
28
|
}, React.createElement("button", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import SideNavIcon from './SideNavIcon.js';
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ var SideNavHeader = function SideNavHeader(_ref) {
|
|
|
16
16
|
var customClassName = _ref.className,
|
|
17
17
|
children = _ref.children,
|
|
18
18
|
IconElement = _ref.renderIcon;
|
|
19
|
-
var className =
|
|
19
|
+
var className = classnames("".concat(prefix, "--side-nav__header"), customClassName);
|
|
20
20
|
return React.createElement("header", {
|
|
21
21
|
className: className
|
|
22
22
|
}, React.createElement(SideNavIcon, null, React.createElement(IconElement, null)), children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -12,7 +12,7 @@ var SideNavIcon = function SideNavIcon(_ref) {
|
|
|
12
12
|
var children = _ref.children,
|
|
13
13
|
customClassName = _ref.className,
|
|
14
14
|
small = _ref.small;
|
|
15
|
-
var className =
|
|
15
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__icon"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__icon--small"), small), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
16
16
|
return React.createElement("div", {
|
|
17
17
|
className: className
|
|
18
18
|
}, children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -13,7 +13,7 @@ var SideNavItem = function SideNavItem(_ref) {
|
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
_ref$large = _ref.large,
|
|
15
15
|
large = _ref$large === void 0 ? false : _ref$large;
|
|
16
|
-
var className =
|
|
16
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__item"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__item--large"), large), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
17
17
|
return React.createElement("li", {
|
|
18
18
|
className: className
|
|
19
19
|
}, children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -15,7 +15,7 @@ var SideNavItems = function SideNavItems(_ref) {
|
|
|
15
15
|
var customClassName = _ref.className,
|
|
16
16
|
children = _ref.children,
|
|
17
17
|
isSideNavExpanded = _ref.isSideNavExpanded;
|
|
18
|
-
var className =
|
|
18
|
+
var className = classnames(["".concat(prefix, "--side-nav__items")], customClassName);
|
|
19
19
|
var childrenWithExpandedState = React.Children.map(children, function (child) {
|
|
20
20
|
if (React.isValidElement(child)) {
|
|
21
21
|
return React.cloneElement(child, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import Link, { LinkPropTypes } from './Link.js';
|
|
6
6
|
import SideNavIcon from './SideNavIcon.js';
|
|
@@ -31,7 +31,7 @@ var SideNavLink = function SideNavLink(_ref) {
|
|
|
31
31
|
isSideNavExpanded = _ref.isSideNavExpanded,
|
|
32
32
|
rest = _objectWithoutProperties(_ref, ["className", "children", "renderIcon", "isActive", "large", "isSideNavExpanded"]);
|
|
33
33
|
|
|
34
|
-
var className =
|
|
34
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__link"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__link--current"), isActive), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
35
35
|
return React.createElement(SideNavItem, {
|
|
36
36
|
large: large
|
|
37
37
|
}, React.createElement(Link, _extends({}, rest, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -15,7 +15,7 @@ var SideNavLinkText = function SideNavLinkText(_ref) {
|
|
|
15
15
|
children = _ref.children,
|
|
16
16
|
rest = _objectWithoutProperties(_ref, ["className", "children"]);
|
|
17
17
|
|
|
18
|
-
var className =
|
|
18
|
+
var className = classnames("".concat(prefix, "--side-nav__link-text"), customClassName);
|
|
19
19
|
return React.createElement("span", _extends({}, rest, {
|
|
20
20
|
className: className
|
|
21
21
|
}), children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { ChevronDown20 } from '@carbon/icons-react';
|
|
6
6
|
import { Escape } from '../../internal/keyboard/keys.js';
|
|
@@ -94,7 +94,7 @@ function (_React$Component) {
|
|
|
94
94
|
}) : children.props && (children.props.isActive === true || children.props['aria-current']);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
var className =
|
|
97
|
+
var className = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__item"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__item--active"), isActive || hasActiveChild && !isExpanded), _defineProperty(_cx, "".concat(prefix, "--side-nav__item--icon"), IconElement), _defineProperty(_cx, "".concat(prefix, "--side-nav__item--large"), large), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
98
98
|
return (// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
99
99
|
React.createElement("li", {
|
|
100
100
|
className: className,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import Link from './Link.js';
|
|
6
6
|
import SideNavLinkText from './SideNavLinkText.js';
|
|
@@ -21,8 +21,8 @@ var SideNavMenuItem = React.forwardRef(function SideNavMenuItem(props, ref) {
|
|
|
21
21
|
isActive = props.isActive,
|
|
22
22
|
rest = _objectWithoutProperties(props, ["children", "className", "isActive"]);
|
|
23
23
|
|
|
24
|
-
var className =
|
|
25
|
-
var linkClassName =
|
|
24
|
+
var className = classnames("".concat(prefix, "--side-nav__menu-item"), customClassName);
|
|
25
|
+
var linkClassName = classnames((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--side-nav__link"), true), _defineProperty(_cx, "".concat(prefix, "--side-nav__link--current"), isActive), _cx));
|
|
26
26
|
return React.createElement("li", {
|
|
27
27
|
className: className,
|
|
28
28
|
role: "none"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { ChevronDown20 } from '@carbon/icons-react';
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ var SideNavSwitcher = React.forwardRef(function SideNavSwitcher(props, ref) {
|
|
|
16
16
|
labelText = props.labelText,
|
|
17
17
|
onChange = props.onChange,
|
|
18
18
|
options = props.options;
|
|
19
|
-
var className =
|
|
19
|
+
var className = classnames("".concat(prefix, "--side-nav__switcher"), customClassName); // Note for usage around `onBlur`: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md
|
|
20
20
|
|
|
21
21
|
return React.createElement("div", {
|
|
22
22
|
className: className
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -17,7 +17,7 @@ var SkipToContent = function SkipToContent(_ref) {
|
|
|
17
17
|
tabIndex = _ref.tabIndex,
|
|
18
18
|
rest = _objectWithoutProperties(_ref, ["children", "className", "href", "tabIndex"]);
|
|
19
19
|
|
|
20
|
-
var className =
|
|
20
|
+
var className = classnames("".concat(prefix, "--skip-to-content"), customClassName);
|
|
21
21
|
return React.createElement("a", _extends({}, rest, {
|
|
22
22
|
className: className,
|
|
23
23
|
href: href,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ var Switcher = React.forwardRef(function Switcher(props, ref) {
|
|
|
21
21
|
'aria-label': ariaLabel,
|
|
22
22
|
'aria-labelledby': ariaLabelledBy
|
|
23
23
|
};
|
|
24
|
-
var className =
|
|
24
|
+
var className = classnames("".concat(prefix, "--switcher"), _defineProperty({}, customClassName, !!customClassName));
|
|
25
25
|
return React.createElement("ul", _extends({
|
|
26
26
|
ref: ref,
|
|
27
27
|
className: className
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
|
|
6
6
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -16,7 +16,7 @@ var SwitcherDivider = function SwitcherDivider(_ref) {
|
|
|
16
16
|
var customClassName = _ref.className,
|
|
17
17
|
other = _objectWithoutProperties(_ref, ["className"]);
|
|
18
18
|
|
|
19
|
-
var className =
|
|
19
|
+
var className = classnames("".concat(prefix, "--switcher__item--divider"), _defineProperty({}, customClassName, !!customClassName));
|
|
20
20
|
return React.createElement("hr", _extends({}, other, {
|
|
21
21
|
className: className
|
|
22
22
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
import { settings } from 'carbon-components';
|
|
5
5
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
6
6
|
import Link from './Link.js';
|
|
@@ -25,12 +25,12 @@ var SwitcherItem = React.forwardRef(function SwitcherItem(props, ref) {
|
|
|
25
25
|
isSelected = props.isSelected,
|
|
26
26
|
rest = _objectWithoutProperties(props, ["aria-label", "aria-labelledby", "className", "children", "isSelected"]);
|
|
27
27
|
|
|
28
|
-
var className =
|
|
28
|
+
var className = classnames("".concat(prefix, "--switcher__item"), _defineProperty({}, customClassName, !!customClassName));
|
|
29
29
|
var accessibilityLabel = {
|
|
30
30
|
'aria-label': ariaLabel,
|
|
31
31
|
'aria-labelledby': ariaLabelledBy
|
|
32
32
|
};
|
|
33
|
-
var linkClassName =
|
|
33
|
+
var linkClassName = classnames("".concat(prefix, "--switcher__item-link"), _defineProperty({}, "".concat(prefix, "--switcher__item-link--selected"), isSelected));
|
|
34
34
|
return React.createElement("li", {
|
|
35
35
|
className: className
|
|
36
36
|
}, React.createElement(Link, _extends({}, rest, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import classnames from 'classnames';
|
|
4
4
|
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ var wrapComponent = function wrapComponent(_ref) {
|
|
|
21
21
|
var baseClassName = _ref2.className,
|
|
22
22
|
other = _objectWithoutProperties(_ref2, ["className"]);
|
|
23
23
|
|
|
24
|
-
var componentClass =
|
|
24
|
+
var componentClass = classnames(className, baseClassName);
|
|
25
25
|
return React.createElement(type, _objectSpread({}, other, {
|
|
26
26
|
// Prevent Weird quirk where `cx` will evaluate to an empty string, '',
|
|
27
27
|
// and so we have empty `class` attributes in the resulting markup
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AccordionItem } from 'carbon-components-react';
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import _extends from '@babel/runtime/helpers/extends';
|
|
4
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
|
+
|
|
7
|
+
var AccordionItemDefer = function AccordionItemDefer(_ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
props = _objectWithoutProperties(_ref, ["children"]);
|
|
10
|
+
|
|
11
|
+
var open = props.open;
|
|
12
|
+
|
|
13
|
+
var _useState = useState(open),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
openState = _useState2[0],
|
|
16
|
+
setOpenState = _useState2[1];
|
|
17
|
+
|
|
18
|
+
var _useState3 = useState(open),
|
|
19
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
20
|
+
hasEverBeenOpened = _useState4[0],
|
|
21
|
+
setHasEverBeenOpened = _useState4[1];
|
|
22
|
+
|
|
23
|
+
useEffect(function () {
|
|
24
|
+
setOpenState(open);
|
|
25
|
+
}, [open]);
|
|
26
|
+
|
|
27
|
+
var handleToggle = function handleToggle(event) {
|
|
28
|
+
if (props.onHeadingClick) {
|
|
29
|
+
props.onHeadingClick(event);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setOpenState(!openState);
|
|
33
|
+
setHasEverBeenOpened(true);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return /*#__PURE__*/React.createElement(AccordionItem, _extends({
|
|
37
|
+
"data-testid": "accordion-item-deferred"
|
|
38
|
+
}, props, {
|
|
39
|
+
onHeadingClick: handleToggle
|
|
40
|
+
}), openState && children || hasEverBeenOpened && children);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
AccordionItemDefer.propTypes = AccordionItem.propTypes;
|
|
44
|
+
AccordionItemDefer.defaultProps = AccordionItem.defaultProps;
|
|
45
|
+
AccordionItemDefer.__docgenInfo = {
|
|
46
|
+
"description": "",
|
|
47
|
+
"methods": [],
|
|
48
|
+
"displayName": "AccordionItemDefer",
|
|
49
|
+
"composes": ["carbon-components-react"]
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default AccordionItemDefer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClickableTile } from 'carbon-components-react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import classnames from 'classnames';
|
|
5
5
|
import { g10 } from '@carbon/themes';
|
|
6
6
|
import Add from '../../../node_modules/@carbon/icons-react/es/add/20.js';
|
|
7
7
|
import { settings } from '../../constants/Settings.js';
|
|
@@ -23,7 +23,7 @@ var AddCard = function AddCard(_ref) {
|
|
|
23
23
|
title = _ref.title,
|
|
24
24
|
className = _ref.className;
|
|
25
25
|
return /*#__PURE__*/React.createElement(ClickableTile, {
|
|
26
|
-
className:
|
|
26
|
+
className: classnames("".concat(iotPrefix, "-add-card"), className),
|
|
27
27
|
handleClick: onClick
|
|
28
28
|
}, /*#__PURE__*/React.createElement("p", {
|
|
29
29
|
className: "".concat(iotPrefix, "-addcard-title")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import classnames from 'classnames';
|
|
3
3
|
import 'core-js/modules/es.symbol';
|
|
4
4
|
import 'core-js/modules/es.array.filter';
|
|
5
5
|
import 'core-js/modules/es.array.for-each';
|
|
@@ -155,7 +155,7 @@ var BarChartCard = function BarChartCard(_ref) {
|
|
|
155
155
|
isEmpty: isAllValuesEmpty,
|
|
156
156
|
isLazyLoading: isLazyLoading
|
|
157
157
|
}), !others.isLoading && !isAllValuesEmpty ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
158
|
-
className:
|
|
158
|
+
className: classnames("".concat(iotPrefix, "--bar-chart-container"), className)
|
|
159
159
|
}, /*#__PURE__*/React.createElement(ChartComponent, {
|
|
160
160
|
data: chartData,
|
|
161
161
|
options: {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Breadcrumb, OverflowMenu, OverflowMenuItem } from 'carbon-components-react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, { Children, useRef, useState, useEffect } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { OverflowMenuHorizontal20 } from '@carbon/icons-react';
|
|
6
|
-
import warning from 'warning';
|
|
4
|
+
import classnames from 'classnames';
|
|
7
5
|
import _extends from '@babel/runtime/helpers/extends';
|
|
8
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
9
6
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
7
|
import 'core-js/modules/es.array.concat';
|
|
11
8
|
import 'core-js/modules/es.array.map';
|
|
12
9
|
import 'core-js/modules/es.array.slice';
|
|
13
10
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
11
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
14
12
|
import useResizeObserver from 'use-resize-observer';
|
|
13
|
+
import { OverflowMenuHorizontal20 } from '@carbon/icons-react';
|
|
14
|
+
import warning from 'warning';
|
|
15
15
|
import { browserSupports } from '../../utils/componentUtilityFunctions.js';
|
|
16
16
|
import '../../index.js';
|
|
17
17
|
|
|
@@ -122,7 +122,7 @@ var Breadcrumb$1 = function Breadcrumb$$1(_ref) {
|
|
|
122
122
|
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
123
123
|
[(_breadcrumbRef$curren = breadcrumbRef.current) === null || _breadcrumbRef$curren === void 0 ? void 0 : _breadcrumbRef$curren.clientWidth, (_breadcrumbRef$curren2 = breadcrumbRef.current) === null || _breadcrumbRef$curren2 === void 0 ? void 0 : _breadcrumbRef$curren2.scrollWidth, prevChildren]);
|
|
124
124
|
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className:
|
|
125
|
+
className: classnames('breadcrumb--container', {
|
|
126
126
|
'breadcrumb--container__overflowfull': afterOverflowItems.length === 1
|
|
127
127
|
}),
|
|
128
128
|
ref: browserSupportsResizeObserver ? breadcrumbRef : null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button, Loading } from 'carbon-components-react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import classnames from 'classnames';
|
|
5
5
|
import { settings } from '../../constants/Settings.js';
|
|
6
6
|
import _extends from '@babel/runtime/helpers/extends';
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
@@ -47,7 +47,7 @@ var Button$1 = function Button$$1(props) {
|
|
|
47
47
|
|
|
48
48
|
return /*#__PURE__*/React.createElement(Button, _extends({}, other, {
|
|
49
49
|
onClick: onClick,
|
|
50
|
-
className:
|
|
50
|
+
className: classnames(className, "".concat(iotPrefix, "--btn")),
|
|
51
51
|
disabled: disabled || loading !== undefined && loading !== false
|
|
52
52
|
}), loading ? /*#__PURE__*/React.createElement(Loading, {
|
|
53
53
|
small: true,
|