@councilbox/councilbox-ui 2.0.52 → 2.0.54
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/dist/HOCs/overlayA11yStack.js +47 -0
- package/dist/HOCs/useA11yGuard.js +38 -0
- package/dist/HOCs/useDynamicStyles.js +18 -38
- package/dist/HOCs/useMenuNavigation.js +110 -0
- package/dist/HOCs/useOverlay.js +87 -0
- package/dist/HOCs/usePopoverPosition.js +228 -0
- package/dist/HOCs/useRipple.js +17 -35
- package/dist/HOCs/useWindowSize.js +24 -42
- package/dist/build-index.js +49 -99
- package/dist/components/1.Introduction.stories.mdx +1 -1
- package/dist/components/2.Changelog.stories.mdx +45 -0
- package/dist/components/3.Guide.stories.mdx +1 -1
- package/dist/components/Accordion/Accordion.css +7 -0
- package/dist/components/Accordion/Accordion.js +97 -102
- package/dist/components/Accordion/Accordion.stories.js +10 -12
- package/dist/components/Accordion/AccordionOld.js +32 -56
- package/dist/components/Accordion/DesignAccordion.stories.js +10 -21
- package/dist/components/Alert/Alert.js +55 -55
- package/dist/components/Alert/Alert.stories.js +10 -11
- package/dist/components/Avatar/Avatar.js +82 -74
- package/dist/components/Avatar/Avatar.stories.js +19 -23
- package/dist/components/Avatar/AvatarOld.js +46 -60
- package/dist/components/Avatar/DesignAvatar.stories.js +18 -26
- package/dist/components/Avatar/DesignAvatarText.stories.js +31 -40
- package/dist/components/AvatarGroup/AvatarGroup.js +7 -14
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +6 -13
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +34 -45
- package/dist/components/Block/Block.css +3 -3
- package/dist/components/Block/Block.js +31 -45
- package/dist/components/Block/Block.stories.js +5 -12
- package/dist/components/Block/DesignBlock.stories.js +7 -13
- package/dist/components/Button/Button.js +44 -66
- package/dist/components/Button/Button.stories.js +8 -14
- package/dist/components/Button/button.css +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.css +6 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +96 -118
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +14 -15
- package/dist/components/ButtonBasic/ButtonBasicOld.js +57 -77
- package/dist/components/Checkbox/Checkbox.css +6 -0
- package/dist/components/Checkbox/Checkbox.js +81 -100
- package/dist/components/Checkbox/Checkbox.stories.js +10 -11
- package/dist/components/Checkbox/CheckboxOld.js +19 -35
- package/dist/components/DragDrop/DragDrop.css +20 -9
- package/dist/components/DragDrop/DragDrop.js +80 -76
- package/dist/components/DragDrop/DragDrop.stories.js +9 -16
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +35 -53
- package/dist/components/DrawerPanel/DrawerPanel.js +157 -146
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +10 -12
- package/dist/components/DrawerPanel/DrawerPanelOld.js +76 -98
- package/dist/components/DropDown/DesignDropDown.stories.js +79 -97
- package/dist/components/DropDown/DropDown.js +168 -342
- package/dist/components/DropDown/DropDown.stories.js +6 -12
- package/dist/components/DropDown/DropDownOld.js +57 -89
- package/dist/components/DropDown/PopoverPlayground.js +68 -98
- package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +26 -36
- package/dist/components/EnhancedTable/EnhancedMyTable.js +16 -19
- package/dist/components/EnhancedTable/EnhancedTable.js +77 -136
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +5 -12
- package/dist/components/EnhancedTable/EnhancedTableBody.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableCell.js +25 -34
- package/dist/components/EnhancedTable/EnhancedTableContainer.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableHead.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableRow.js +15 -18
- package/dist/components/EnhancedTable/EnhancedTableSortLabel.js +15 -18
- package/dist/components/FabButton/DesignFabButton.stories.js +9 -16
- package/dist/components/FabButton/FabButton.js +51 -54
- package/dist/components/FabButton/FabButton.stories.js +10 -12
- package/dist/components/Grid/DesignGrid.stories.js +7 -14
- package/dist/components/Grid/Grid.js +38 -46
- package/dist/components/Grid/Grid.stories.js +6 -13
- package/dist/components/Grid/GridItem.js +37 -39
- package/dist/components/Grid/GridItemOld.js +13 -18
- package/dist/components/Grid/GridOld.js +14 -21
- package/dist/components/Header/DesignHeader.stories.js +20 -24
- package/dist/components/Header/Header.js +201 -242
- package/dist/components/Header/Header.stories.js +9 -21
- package/dist/components/Header/header.css +10 -5
- package/dist/components/IconButton/DesignIconButton.stories.js +31 -36
- package/dist/components/IconButton/IconButton.css +6 -1
- package/dist/components/IconButton/IconButton.js +132 -138
- package/dist/components/IconButton/IconButton.stories.js +12 -13
- package/dist/components/IconButton/IconButtonOld.js +41 -57
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
- package/dist/components/IconButtonSquare/IconButtonSquare.js +11 -25
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +44 -62
- package/dist/components/IconFont/IconFont.js +27 -48
- package/dist/components/IconFont/IconFont.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocomplete.css +6 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +184 -260
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +43 -62
- package/dist/components/InputPassword/InputPassword.css +0 -6
- package/dist/components/InputPassword/InputPassword.js +58 -73
- package/dist/components/InputPassword/InputPassword.stories.js +5 -11
- package/dist/components/InputText/InputText.css +86 -78
- package/dist/components/InputText/InputText.js +207 -211
- package/dist/components/InputText/InputText.stories.js +11 -11
- package/dist/components/InputText/InputTextOld.js +48 -74
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +38 -51
- package/dist/components/InputTextArea/InputTextArea.js +84 -93
- package/dist/components/InputTextArea/InputTextArea.stories.js +5 -12
- package/dist/components/LoadingSection/LoadingSection.js +44 -51
- package/dist/components/LoadingSection/LoadingSection.stories.js +5 -11
- package/dist/components/MenuItem/DesignMenuItem.stories.js +20 -34
- package/dist/components/MenuItem/MenuItem.css +7 -2
- package/dist/components/MenuItem/MenuItem.js +100 -113
- package/dist/components/MenuItem/MenuItem.stories.js +6 -15
- package/dist/components/MenuItem/MenuItemOld.js +40 -56
- package/dist/components/MenuLateralLeft/MenuLateralLeft.css +24 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +123 -160
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +5 -12
- package/dist/components/MenuLateralRight/MenuLateralRight.css +2 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +73 -77
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +5 -12
- package/dist/components/Modal/DesignModal.stories.js +15 -30
- package/dist/components/Modal/Modal.css +35 -15
- package/dist/components/Modal/Modal.js +154 -145
- package/dist/components/Modal/Modal.stories.js +7 -16
- package/dist/components/Modal/ModalOld.js +73 -90
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +4 -10
- package/dist/components/PaginationFooter/PaginationFooter.css +10 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +99 -91
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +5 -12
- package/dist/components/RadioButton/Radio.css +19 -18
- package/dist/components/RadioButton/Radio.js +65 -83
- package/dist/components/RadioButton/Radio.stories.js +27 -36
- package/dist/components/RadioButton/RadioOld.js +23 -39
- package/dist/components/Ripple/DesignRipple.js +25 -41
- package/dist/components/Ripple/Ripple.stories.js +5 -11
- package/dist/components/Scrollbar/DesignScrollbar.js +5 -10
- package/dist/components/Scrollbar/Scrollbar.js +37 -56
- package/dist/components/Scrollbar/Scrollbar.stories.js +5 -12
- package/dist/components/SelectInput/DesignSelectInput.js +22 -45
- package/dist/components/SelectInput/SelectInput.js +101 -155
- package/dist/components/SelectInput/SelectInput.stories.js +6 -15
- package/dist/components/SelectInput/SelectInputOld.js +52 -81
- package/dist/components/Slider/DesignSlider.js +8 -14
- package/dist/components/Slider/Slider.css +57 -37
- package/dist/components/Slider/Slider.js +85 -84
- package/dist/components/Slider/Slider.stories.js +5 -12
- package/dist/components/Spacing/Spacing.js +38 -45
- package/dist/components/Spacing/Spacing.stories.js +5 -11
- package/dist/components/Stars/DesignStars.js +17 -30
- package/dist/components/Stars/Stars.css +55 -104
- package/dist/components/Stars/Stars.js +89 -73
- package/dist/components/Stars/Stars.stories.js +5 -12
- package/dist/components/Stepper/DesignStepper.stories.js +16 -30
- package/dist/components/Stepper/Stepper.css +46 -10
- package/dist/components/Stepper/Stepper.js +118 -134
- package/dist/components/Stepper/Stepper.stories.js +5 -12
- package/dist/components/Table/DesignTable.stories.js +200 -211
- package/dist/components/Table/Table.css +33 -2
- package/dist/components/Table/Table.js +30 -38
- package/dist/components/Table/Table.stories.js +5 -12
- package/dist/components/Table/TableBody.js +22 -34
- package/dist/components/Table/TableCell.js +71 -61
- package/dist/components/Table/TableContainer.js +22 -34
- package/dist/components/Table/TableHead.js +22 -34
- package/dist/components/Table/TableOld.js +52 -84
- package/dist/components/Table/TableRow.js +33 -37
- package/dist/components/Table/TableSortLabel.js +42 -52
- package/dist/components/Tabs/DesignTabs.js +14 -28
- package/dist/components/Tabs/Tabs.css +30 -11
- package/dist/components/Tabs/Tabs.js +151 -137
- package/dist/components/Tabs/Tabs.stories.js +5 -12
- package/dist/components/Tabs/TabsOld.js +28 -42
- package/dist/components/Tag/DesignTags.stories.js +24 -39
- package/dist/components/Tag/Tag.css +61 -42
- package/dist/components/Tag/Tag.js +93 -91
- package/dist/components/Tag/Tag.stories.js +5 -12
- package/dist/components/TextInput/TextInput.js +38 -54
- package/dist/components/TextInput/TextInput.stories.js +5 -11
- package/dist/components/ThemeProvider/Colors.js +2 -2
- package/dist/components/ThemeProvider/CouncilboxThemeContext.js +7 -10
- package/dist/components/ThemeProvider/ThemeProvider.js +34 -52
- package/dist/components/Timeline/DesignTimeline.stories.js +4 -10
- package/dist/components/Timeline/Timeline.js +66 -46
- package/dist/components/Timeline/Timeline.stories.js +5 -12
- package/dist/components/Toggle/Toggle.css +10 -0
- package/dist/components/Toggle/Toggle.js +115 -98
- package/dist/components/Toggle/Toggle.stories.js +10 -11
- package/dist/components/Tooltip/DesignTooltip.stories.js +10 -16
- package/dist/components/Tooltip/Tooltip.css +17 -1
- package/dist/components/Tooltip/Tooltip.js +190 -366
- package/dist/components/Tooltip/Tooltip.stories.js +5 -12
- package/dist/components/Typography/Typography.css +57 -6
- package/dist/components/Typography/Typography.js +44 -97
- package/dist/components/Typography/Typography.stories.js +5 -11
- package/dist/components/Typography/TypographyOld.js +29 -42
- package/dist/index.js +2 -6
- package/dist/reportWebVitals.js +8 -14
- package/dist/storybook.test.js +2 -4
- package/dist/styles/colorConsts.css +4 -4
- package/dist/styles/main.css +16 -0
- package/dist/styles/stylesheet.js +10 -22
- package/dist/testing/TestAutocomplete.js +74 -97
- package/dist/testing/TestComponents.js +5 -10
- package/dist/testing/TestDropdown.js +33 -41
- package/dist/utils/autoDetectScroll.js +12 -35
- package/dist/utils/index.js +37 -63
- package/dist/utils/useFallbackId.js +19 -0
- package/package.json +5 -2
|
@@ -1,69 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.TableSortLabel = exports.TableRow = exports.TableHead = exports.TableContainer = exports.TableCell = exports.TableBody = exports.Table = void 0;
|
|
7
|
-
|
|
8
8
|
var _Table = _interopRequireDefault(require("@mui/material/Table"));
|
|
9
|
-
|
|
10
9
|
var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
|
|
11
|
-
|
|
12
10
|
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
13
|
-
|
|
14
11
|
var _TableContainer = _interopRequireDefault(require("@mui/material/TableContainer"));
|
|
15
|
-
|
|
16
12
|
var _TableHead = _interopRequireDefault(require("@mui/material/TableHead"));
|
|
17
|
-
|
|
18
13
|
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
19
|
-
|
|
20
14
|
var _TableSortLabel = _interopRequireDefault(require("@mui/material/TableSortLabel"));
|
|
21
|
-
|
|
22
15
|
var _excluded = ["lastResponsive"],
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
|
-
|
|
42
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
|
-
|
|
16
|
+
_excluded2 = ["children", "component", "hover", "selected", "onClick", "className"],
|
|
17
|
+
_excluded3 = ["children", "component"],
|
|
18
|
+
_excluded4 = ["children", "component"],
|
|
19
|
+
_excluded5 = ["children", "active", "direction", "onClick", "hideSortIcon", "IconComponent"],
|
|
20
|
+
_excluded6 = ["children", "component", "padding", "scope", "size", "sortDirection", "variant", "align", "sx"],
|
|
21
|
+
_excluded7 = ["children", "component"];
|
|
22
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
23
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
29
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
30
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
44
31
|
// import './TableOld.css';
|
|
32
|
+
|
|
45
33
|
var Table = function Table(_ref) {
|
|
46
34
|
var lastResponsive = _ref.lastResponsive,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return /*#__PURE__*/React.createElement(_Table.default, _extends({
|
|
35
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
return /*#__PURE__*/React.createElement(_Table["default"], _extends({
|
|
50
37
|
className: lastResponsive ? 'cbx-table lastResponsive' : 'cbx-table'
|
|
51
38
|
}, props));
|
|
52
39
|
};
|
|
53
|
-
|
|
54
40
|
exports.Table = Table;
|
|
55
41
|
Table.displayName = "Table";
|
|
56
|
-
|
|
57
42
|
var TableRow = function TableRow(_ref2) {
|
|
58
43
|
var children = _ref2.children,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return /*#__PURE__*/React.createElement(_TableRow.default, _extends({
|
|
44
|
+
component = _ref2.component,
|
|
45
|
+
hover = _ref2.hover,
|
|
46
|
+
selected = _ref2.selected,
|
|
47
|
+
onClick = _ref2.onClick,
|
|
48
|
+
className = _ref2.className,
|
|
49
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
50
|
+
return /*#__PURE__*/React.createElement(_TableRow["default"], _extends({
|
|
67
51
|
className: className,
|
|
68
52
|
component: component,
|
|
69
53
|
hover: hover,
|
|
@@ -71,46 +55,37 @@ var TableRow = function TableRow(_ref2) {
|
|
|
71
55
|
onClick: onClick
|
|
72
56
|
}, props), children);
|
|
73
57
|
};
|
|
74
|
-
|
|
75
58
|
exports.TableRow = TableRow;
|
|
76
59
|
TableRow.displayName = "TableRow";
|
|
77
|
-
|
|
78
60
|
var TableBody = function TableBody(_ref3) {
|
|
79
61
|
var children = _ref3.children,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return /*#__PURE__*/React.createElement(_TableBody.default, _extends({
|
|
62
|
+
component = _ref3.component,
|
|
63
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
64
|
+
return /*#__PURE__*/React.createElement(_TableBody["default"], _extends({
|
|
84
65
|
component: component
|
|
85
66
|
}, props), children);
|
|
86
67
|
};
|
|
87
|
-
|
|
88
68
|
exports.TableBody = TableBody;
|
|
89
69
|
TableBody.displayName = "TableBody";
|
|
90
|
-
|
|
91
70
|
var TableHead = function TableHead(_ref4) {
|
|
92
71
|
var children = _ref4.children,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return /*#__PURE__*/React.createElement(_TableHead.default, _extends({
|
|
72
|
+
component = _ref4.component,
|
|
73
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
74
|
+
return /*#__PURE__*/React.createElement(_TableHead["default"], _extends({
|
|
97
75
|
component: component
|
|
98
76
|
}, props), children);
|
|
99
77
|
};
|
|
100
|
-
|
|
101
78
|
exports.TableHead = TableHead;
|
|
102
79
|
TableHead.displayName = "TableHead";
|
|
103
|
-
|
|
104
80
|
var TableSortLabel = function TableSortLabel(_ref5) {
|
|
105
81
|
var children = _ref5.children,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return /*#__PURE__*/React.createElement(_TableSortLabel.default, _extends({
|
|
82
|
+
active = _ref5.active,
|
|
83
|
+
direction = _ref5.direction,
|
|
84
|
+
onClick = _ref5.onClick,
|
|
85
|
+
hideSortIcon = _ref5.hideSortIcon,
|
|
86
|
+
IconComponent = _ref5.IconComponent,
|
|
87
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
88
|
+
return /*#__PURE__*/React.createElement(_TableSortLabel["default"], _extends({
|
|
114
89
|
onClick: onClick,
|
|
115
90
|
active: active,
|
|
116
91
|
direction: direction,
|
|
@@ -118,23 +93,20 @@ var TableSortLabel = function TableSortLabel(_ref5) {
|
|
|
118
93
|
IconComponent: IconComponent
|
|
119
94
|
}, props), children);
|
|
120
95
|
};
|
|
121
|
-
|
|
122
96
|
exports.TableSortLabel = TableSortLabel;
|
|
123
97
|
TableSortLabel.displayName = "TableSortLabel";
|
|
124
|
-
|
|
125
98
|
var TableCell = function TableCell(_ref6) {
|
|
126
99
|
var children = _ref6.children,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return /*#__PURE__*/React.createElement(_TableCell.default, _extends({
|
|
100
|
+
component = _ref6.component,
|
|
101
|
+
padding = _ref6.padding,
|
|
102
|
+
scope = _ref6.scope,
|
|
103
|
+
size = _ref6.size,
|
|
104
|
+
sortDirection = _ref6.sortDirection,
|
|
105
|
+
variant = _ref6.variant,
|
|
106
|
+
align = _ref6.align,
|
|
107
|
+
sx = _ref6.sx,
|
|
108
|
+
props = _objectWithoutProperties(_ref6, _excluded6);
|
|
109
|
+
return /*#__PURE__*/React.createElement(_TableCell["default"], _extends({
|
|
138
110
|
component: component,
|
|
139
111
|
padding: padding,
|
|
140
112
|
scope: scope,
|
|
@@ -147,19 +119,15 @@ var TableCell = function TableCell(_ref6) {
|
|
|
147
119
|
}, sx)
|
|
148
120
|
}, props), children);
|
|
149
121
|
};
|
|
150
|
-
|
|
151
122
|
exports.TableCell = TableCell;
|
|
152
123
|
TableCell.displayName = "TableCell";
|
|
153
|
-
|
|
154
124
|
var TableContainer = function TableContainer(_ref7) {
|
|
155
125
|
var children = _ref7.children,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
return /*#__PURE__*/React.createElement(_TableContainer.default, _extends({
|
|
126
|
+
component = _ref7.component,
|
|
127
|
+
props = _objectWithoutProperties(_ref7, _excluded7);
|
|
128
|
+
return /*#__PURE__*/React.createElement(_TableContainer["default"], _extends({
|
|
160
129
|
component: component
|
|
161
130
|
}, props), children);
|
|
162
131
|
};
|
|
163
|
-
|
|
164
132
|
exports.TableContainer = TableContainer;
|
|
165
133
|
TableContainer.displayName = "TableContainer";
|
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
require("./Table.css");
|
|
11
|
-
|
|
12
10
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
13
|
-
|
|
14
11
|
var _excluded = ["children", "hover", "selected", "onClick", "className", "sx", "prefixClass", "style", "styles"];
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
-
|
|
28
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
-
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
20
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
30
21
|
var TableRow = function TableRow(_ref) {
|
|
31
22
|
var children = _ref.children,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
45
|
-
|
|
23
|
+
hover = _ref.hover,
|
|
24
|
+
selected = _ref.selected,
|
|
25
|
+
onClick = _ref.onClick,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
sx = _ref.sx,
|
|
28
|
+
propPrefixClass = _ref.prefixClass,
|
|
29
|
+
style = _ref.style,
|
|
30
|
+
styles = _ref.styles,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
33
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
34
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
46
35
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
47
|
-
|
|
36
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
37
|
+
if (onClick && (e.key === 'Enter' || e.key === ' ')) {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
onClick(e);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/_react["default"].createElement("tr", _extends({
|
|
48
43
|
className: prefixClass("cbx-table-row ".concat(className || '', " ").concat(hover ? 'hover' : '', " ").concat(selected ? 'selected' : '')),
|
|
49
44
|
onClick: onClick,
|
|
45
|
+
onKeyDown: onClick ? handleKeyDown : undefined,
|
|
46
|
+
tabIndex: onClick ? 0 : undefined,
|
|
50
47
|
style: _objectSpread(_objectSpread(_objectSpread({}, styles), style), stylesInLine)
|
|
51
48
|
}, props), children);
|
|
52
49
|
};
|
|
53
|
-
|
|
54
50
|
TableRow.displayName = "TableRow";
|
|
55
51
|
var _default = TableRow;
|
|
56
|
-
exports
|
|
52
|
+
exports["default"] = _default;
|
|
@@ -1,90 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
require("./Table.css");
|
|
11
|
-
|
|
12
10
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
24
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
-
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
|
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
|
|
21
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
34
23
|
var TableSortLabel = function TableSortLabel(_ref) {
|
|
35
24
|
var children = _ref.children,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
48
|
-
|
|
25
|
+
_onClick = _ref.onClick,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
sx = _ref.sx,
|
|
28
|
+
propPrefixClass = _ref.prefixClass,
|
|
29
|
+
style = _ref.style,
|
|
30
|
+
styles = _ref.styles,
|
|
31
|
+
onSort = _ref.onSort,
|
|
32
|
+
active = _ref.active;
|
|
33
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
34
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
35
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
49
36
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
setDirection = _React$useState2[1];
|
|
55
|
-
|
|
37
|
+
var _React$useState = _react["default"].useState('asc'),
|
|
38
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
39
|
+
direction = _React$useState2[0],
|
|
40
|
+
setDirection = _React$useState2[1];
|
|
56
41
|
var handleSort = function handleSort() {
|
|
57
42
|
var newDirection = direction === 'asc' ? 'desc' : 'asc';
|
|
58
43
|
setDirection(newDirection);
|
|
59
|
-
|
|
60
44
|
if (onSort) {
|
|
61
45
|
onSort(newDirection);
|
|
62
46
|
}
|
|
63
47
|
};
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
|
+
role: "button",
|
|
50
|
+
tabIndex: 0,
|
|
66
51
|
className: prefixClass("".concat(className || '', " cbx-table-sort-label")),
|
|
67
52
|
onClick: function onClick() {
|
|
68
53
|
handleSort();
|
|
69
|
-
|
|
70
54
|
_onClick();
|
|
71
55
|
},
|
|
56
|
+
onKeyDown: function onKeyDown(e) {
|
|
57
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
handleSort();
|
|
60
|
+
_onClick();
|
|
61
|
+
}
|
|
62
|
+
},
|
|
72
63
|
style: _objectSpread(_objectSpread(_objectSpread({}, styles), style), stylesInLine)
|
|
73
|
-
}, /*#__PURE__*/_react
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
65
|
className: prefixClass('cbx-table-sort-label-text'),
|
|
75
66
|
style: {
|
|
76
67
|
color: active && 'black'
|
|
77
68
|
}
|
|
78
|
-
}, children), /*#__PURE__*/_react
|
|
69
|
+
}, children), /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
70
|
className: prefixClass("cbx-table-sort-label-arrow ".concat(active ? 'active' : '')),
|
|
80
71
|
style: {
|
|
81
72
|
transform: direction === 'asc' ? 'rotate(0deg)' : 'rotate(-180deg)'
|
|
82
73
|
}
|
|
83
|
-
}, /*#__PURE__*/_react
|
|
74
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
84
75
|
className: 'ri-arrow-down-line'
|
|
85
76
|
})));
|
|
86
77
|
};
|
|
87
|
-
|
|
88
78
|
TableSortLabel.displayName = "TableSortLabel";
|
|
89
79
|
var _default = TableSortLabel;
|
|
90
|
-
exports
|
|
80
|
+
exports["default"] = _default;
|
|
@@ -3,26 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Tabs = _interopRequireDefault(require("./Tabs"));
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
23
|
-
|
|
24
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
26
16
|
var data = [{
|
|
27
17
|
text: 'Tab 1',
|
|
28
18
|
badge: false,
|
|
@@ -53,25 +43,21 @@ var data = [{
|
|
|
53
43
|
badge: false,
|
|
54
44
|
value: 'aa7'
|
|
55
45
|
}];
|
|
56
|
-
|
|
57
46
|
var DesignDrawerPanel = function DesignDrawerPanel(_ref) {
|
|
58
47
|
var variant = _ref.variant;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
|
48
|
+
var _React$useState = _react["default"].useState(2),
|
|
49
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
|
+
selectTab = _React$useState2[0],
|
|
51
|
+
setSelectTab = _React$useState2[1];
|
|
52
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
|
|
66
53
|
onChange: function onChange(index) {
|
|
67
54
|
return setSelectTab(index);
|
|
68
55
|
},
|
|
69
56
|
value: selectTab,
|
|
70
57
|
itemsTab: data,
|
|
71
58
|
variant: variant
|
|
72
|
-
}), /*#__PURE__*/_react
|
|
59
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, selectTab === 0 && /*#__PURE__*/_react["default"].createElement("div", null, "Tab1"), selectTab === 1 && /*#__PURE__*/_react["default"].createElement("div", null, "Tab2"), selectTab === 2 && /*#__PURE__*/_react["default"].createElement("div", null, "Tab3")));
|
|
73
60
|
};
|
|
74
|
-
|
|
75
61
|
DesignDrawerPanel.displayName = "DesignDrawerPanel";
|
|
76
62
|
var _default = DesignDrawerPanel;
|
|
77
|
-
exports
|
|
63
|
+
exports["default"] = _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
position: relative;
|
|
15
15
|
display: flex;
|
|
16
16
|
width: 100%;
|
|
17
|
-
min-height: 3rem
|
|
17
|
+
min-height: 3rem;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.cbx-Tabs-container {
|
|
@@ -22,27 +22,46 @@
|
|
|
22
22
|
overflow-x: auto;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.cbx-Tab-item {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
/* .cbx-Tab-item {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 50%;
|
|
28
|
+
transform: translateY(-50%);
|
|
29
|
+
font-size: 1.125rem;
|
|
30
|
+
cursor: pointer;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.cbx-Tab-item:first-child {
|
|
34
|
-
|
|
34
|
+
left: 0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.cbx-Tab-item:last-child {
|
|
38
|
-
|
|
39
|
-
}
|
|
38
|
+
right: 0;
|
|
39
|
+
} */
|
|
40
40
|
|
|
41
|
-
.cbx-Tabs-button-left,
|
|
41
|
+
.cbx-Tabs-button-left,
|
|
42
|
+
.cbx-Tabs-button-right {
|
|
42
43
|
min-width: 2.5rem;
|
|
43
44
|
width: 2.5rem;
|
|
44
45
|
font-size: 1.375rem;
|
|
45
46
|
display: flex;
|
|
46
47
|
align-items: center;
|
|
47
48
|
justify-content: center;
|
|
49
|
+
border: none;
|
|
50
|
+
background: transparent;
|
|
51
|
+
padding: 0;
|
|
52
|
+
font: inherit;
|
|
53
|
+
color: inherit;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cbx-Tabs-button-left:disabled,
|
|
58
|
+
.cbx-Tabs-button-right:disabled {
|
|
59
|
+
cursor: default;
|
|
60
|
+
opacity: 0.4;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cbx-Tabs-button-left:focus-visible,
|
|
64
|
+
.cbx-Tabs-button-right:focus-visible {
|
|
65
|
+
outline: 2px solid var(--accent);
|
|
66
|
+
outline-offset: -2px;
|
|
48
67
|
}
|